integer test_x141 array B_nextFree104 integer B_firstFree126 integer B_maxIndex105 array B_typeId197 array B_y487 integer test_x141 = 2 integer B_firstFree126 = 0 integer B_maxIndex105 = 0 function initGlobals152() { } function main186() { initGlobals152(); init_test529(); } function config178() { } function init_test529() { local integer a266 local integer this103 test_x_141 = 2; a_266 = new_A382(); this_103 = a_266; if (B_typeId_197[this_103] == 0) { if (this_103 == 0) { error853("Nullpointer exception when calling A.A"); } else { error853("Called A.A on invalid object."); }; } else { }; destroyA212(this_103); if (test_x_141 == 8) { testSuccess130(); } else { }; } IS_NATIVE function testSuccess130() { } function destroyA212(integer this372) { local integer this182 local integer this109 local integer obj153 this_182 = this_372; test_x_141 = (test_x_141 + B_y_487[this_182]); this_109 = this_182; test_x_141 = (test_x_141 * B_y_487[this_109]); obj_153 = this_372; if (B_typeId_197[obj_153] == 0) { error853("Double free: object of type A"); } else { B_nextFree_104[B_firstFree_126] = obj_153; B_firstFree_126 = (B_firstFree_126 + 1); B_typeId_197[obj_153] = 0; }; } function new_A382() returns integer { local integer this157 local integer this125 local integer this121 local integer this171 local integer this159 if (B_firstFree_126 == 0) { if (B_maxIndex_105 < 32768) { B_maxIndex_105 = (B_maxIndex_105 + 1); this_125 = B_maxIndex_105; B_typeId_197[this_125] = 2; } else { error853("Out of memory: Could not create A."); this_125 = 0; }; } else { B_firstFree_126 = (B_firstFree_126 - 1); this_125 = B_nextFree_104[B_firstFree_126]; B_typeId_197[this_125] = 2; }; this_157 = this_125; this_121 = this_157; this_171 = this_121; this_159 = this_171; B_y_487[this_159] = 2; return this_157; } function error853(string msg111) { $debugPrint146((msg_111 + (" " + #getStackTrace()))); }