integer test_x610 array B_nextFree167 integer B_firstFree788 integer B_maxIndex183 array B_typeId293 integer test_x610 = 2 integer B_firstFree788 = 0 integer B_maxIndex183 = 0 function initGlobals122() { } function main110() { initGlobals122(); init_test113(); } function config206() { } function init_test113() { local integer a192 local integer this990 test_x_610 = 2; a_192 = new_X828(); this_990 = a_192; if (B_typeId_293[this_990] == 0) { if (this_990 == 0) { error184("Nullpointer exception when calling A.A"); } else { error184("Called A.A on invalid object."); }; } else { }; destroyA744(this_990); if (test_x_610 == 6) { testSuccess203(); } else { }; } IS_NATIVE function testSuccess203() { } function destroyA744(integer this212) { local integer obj227 test_x_610 = (test_x_610 + 1); test_x_610 = (test_x_610 * 2); obj_227 = this_212; if (B_typeId_293[obj_227] == 0) { error184("Double free: object of type A"); } else { B_nextFree_167[B_firstFree_788] = obj_227; B_firstFree_788 = (B_firstFree_788 + 1); B_typeId_293[obj_227] = 0; }; } function new_X828() returns integer { local integer this112 local integer this222 local integer this126 if (B_firstFree_788 == 0) { if (B_maxIndex_183 < 32768) { B_maxIndex_183 = (B_maxIndex_183 + 1); this_222 = B_maxIndex_183; B_typeId_293[this_222] = 3; } else { error184("Out of memory: Could not create X."); this_222 = 0; }; } else { B_firstFree_788 = (B_firstFree_788 - 1); this_222 = B_nextFree_167[B_firstFree_788]; B_typeId_293[this_222] = 3; }; this_112 = this_222; this_126 = this_112; return this_112; } function error184(string msg546) { $debugPrint110((msg_546 + (" " + #getStackTrace()))); }