integer test_x159 array B_nextFree127 integer B_firstFree186 integer B_maxIndex207 array B_typeId176 array B_y104 integer test_x159 = 2 integer B_firstFree186 = 0 integer B_maxIndex207 = 0 function initGlobals213() { } function main212() { initGlobals213(); init_test172(); } function config736() { } function init_test172() { local integer a695 local integer this483 test_x_159 = 2; a_695 = new_A175(); this_483 = a_695; if (B_typeId_176[this_483] == 0) { if (this_483 == 0) { error112("Nullpointer exception when calling A.A"); } else { error112("Called A.A on invalid object."); }; } else { }; destroyA124(this_483); if (test_x_159 == 8) { testSuccess130(); } else { }; } IS_NATIVE function testSuccess130() { } function destroyA124(integer this146) { local integer this108 local integer this101 local integer obj138 this_108 = this_146; test_x_159 = (test_x_159 + B_y_104[this_108]); this_101 = this_108; test_x_159 = (test_x_159 * B_y_104[this_101]); obj_138 = this_146; if (B_typeId_176[obj_138] == 0) { error112("Double free: object of type A"); } else { B_nextFree_127[B_firstFree_186] = obj_138; B_firstFree_186 = (B_firstFree_186 + 1); B_typeId_176[obj_138] = 0; }; } function new_A175() returns integer { local integer this162 local integer this117 local integer this139 local integer this904 local integer this806 if (B_firstFree_186 == 0) { if (B_maxIndex_207 < 32768) { B_maxIndex_207 = (B_maxIndex_207 + 1); this_117 = B_maxIndex_207; B_typeId_176[this_117] = 2; } else { error112("Out of memory: Could not create A."); this_117 = 0; }; } else { B_firstFree_186 = (B_firstFree_186 - 1); this_117 = B_nextFree_127[B_firstFree_186]; B_typeId_176[this_117] = 2; }; this_162 = this_117; this_139 = this_162; this_904 = this_139; this_806 = this_904; B_y_104[this_806] = 2; return this_162; } function error112(string msg543) { $debugPrint156((msg_543 + (" " + #getStackTrace()))); }