array D_nextFree678 integer D_firstFree181 integer D_maxIndex133 array D_typeId185 array D_B_A_x144 array D_C_A_x265 integer D_firstFree181 = 0 integer D_maxIndex133 = 0 function initGlobals963() { } function main123() { initGlobals963(); init_test141(); } function config124() { } function init_test141() { local integer d213 local integer this146 local integer x187 d_213 = new_D198(); this_146 = d_213; x_187 = 5; if (D_typeId_185[this_146] == 0) { if (this_146 == 0) { error891("Nullpointer exception when calling D.setX"); } else { error891("Called D.setX on invalid object."); }; } else { }; D_setX158(this_146, x_187); if (dispatch_D_test_D_getX734(d_213) != 5) { testFail192(("foo fail" + I2S203(dispatch_D_test_D_getX734(d_213)))); } else { }; testSuccess181(); } IS_NATIVE IS_EXTERN @extern function I2S203(integer x128) returns string { } IS_NATIVE function println140(string s142) { } IS_NATIVE function testFail192(string msg230) { } IS_NATIVE function testSuccess181() { } function D_setX158(integer this965, integer x614) { local integer this102 local integer x114 local integer this195 local integer x155 local integer this161 local integer temp119 this_102 = this_965; x_114 = (x_614 div 2); println140(("set x " + I2S203(x_114))); D_B_A_x_144[this_102] = x_114; this_195 = this_965; temp_119 = x_614; this_161 = this_965; println140(("get x " + I2S203(D_B_A_x_144[this_161]))); x_155 = (temp_119 - D_B_A_x_144[this_161]); println140(("set x " + I2S203(x_155))); D_C_A_x_265[this_195] = x_155; } function new_D198() returns integer { local integer this130 local integer this423 local integer this275 if (D_firstFree_181 == 0) { if (D_maxIndex_133 < 32768) { D_maxIndex_133 = (D_maxIndex_133 + 1); this_423 = D_maxIndex_133; D_typeId_185[this_423] = 1; } else { error891("Out of memory: Could not create D."); this_423 = 0; }; } else { D_firstFree_181 = (D_firstFree_181 - 1); this_423 = D_nextFree_678[D_firstFree_181]; D_typeId_185[this_423] = 1; }; this_130 = this_423; this_275 = this_130; return this_130; } function error891(string msg657) { $debugPrint597((msg_657 + (" " + #getStackTrace()))); } function dispatch_D_test_D_getX734(integer this773) returns integer { local integer test_D_getX_result207 local integer this191 local integer this915 local integer this124 local integer temp139 if (D_typeId_185[this_773] == 0) { if (this_773 == 0) { error891("Nullpointer exception when calling D.getX"); } else { error891("Called D.getX on invalid object."); }; } else { }; this_191 = this_773; this_915 = this_191; println140(("get x " + I2S203(D_B_A_x_144[this_915]))); temp_139 = D_B_A_x_144[this_915]; this_124 = this_191; println140(("get x " + I2S203(D_C_A_x_265[this_124]))); test_D_getX_result_207 = (temp_139 + D_C_A_x_265[this_124]); return test_D_getX_result_207; }