integer test_x711 array B_nextFree616 integer B_firstFree241 integer B_maxIndex398 array B_typeId117 integer test_x711 = 2 integer B_firstFree241 = 0 integer B_maxIndex398 = 0 function initGlobals182() { } function main192() { initGlobals182(); init_test298(); } function config182() { } function init_test298() { local integer a131 test_x_711 = 2; a_131 = new_X111(); if (B_typeId_117[a_131] == 0) { if (a_131 == 0) { error191("Nullpointer exception when calling A.A"); } else { error191("Called A.A on invalid object."); }; } else { }; destroyA206(a_131); if (test_x_711 == 6) { testSuccess174(); } else { }; } IS_NATIVE function testSuccess174() { } function destroyA206(integer this582) { test_x_711 = ((test_x_711 + 1) * 2); if (B_typeId_117[this_582] == 0) { error191("Double free: object of type A"); } else { B_nextFree_616[B_firstFree_241] = this_582; B_firstFree_241 = (B_firstFree_241 + 1); B_typeId_117[this_582] = 0; }; } function new_X111() returns integer { local integer this502 if (B_firstFree_241 == 0) { if (B_maxIndex_398 < 32768) { B_maxIndex_398 = (B_maxIndex_398 + 1); this_502 = B_maxIndex_398; B_typeId_117[this_502] = 3; } else { error191("Out of memory: Could not create X."); this_502 = 0; }; } else { B_firstFree_241 = (B_firstFree_241 - 1); this_502 = B_nextFree_616[B_firstFree_241]; B_typeId_117[this_502] = 3; }; return this_502; } function error191(string msg135) { $debugPrint154((msg_135 + (" " + #getStackTrace()))); }