integer test_x180 array B_nextFree163 integer B_firstFree154 integer B_maxIndex910 array B_typeId606 array B_y204 integer test_x180 = 2 integer B_firstFree154 = 0 integer B_maxIndex910 = 0 function initGlobals213() { } function main151() { initGlobals213(); init_test637(); } function config463() { } function init_test637() { local integer a693 test_x_180 = 2; a_693 = new_A127(); if (B_typeId_606[a_693] == 0) { if (a_693 == 0) { error213("Nullpointer exception when calling A.A"); } else { error213("Called A.A on invalid object."); }; } else { }; destroyA123(a_693); if (test_x_180 == 8) { testSuccess845(); } else { }; } IS_NATIVE function testSuccess845() { } function destroyA123(integer this798) { test_x_180 = (test_x_180 + B_y_204[this_798]); test_x_180 = (test_x_180 * B_y_204[this_798]); if (B_typeId_606[this_798] == 0) { error213("Double free: object of type A"); } else { B_nextFree_163[B_firstFree_154] = this_798; B_firstFree_154 = (B_firstFree_154 + 1); B_typeId_606[this_798] = 0; }; } function new_A127() returns integer { local integer this521 if (B_firstFree_154 == 0) { if (B_maxIndex_910 < 32768) { B_maxIndex_910 = (B_maxIndex_910 + 1); this_521 = B_maxIndex_910; B_typeId_606[this_521] = 2; } else { error213("Out of memory: Could not create A."); this_521 = 0; }; } else { B_firstFree_154 = (B_firstFree_154 - 1); this_521 = B_nextFree_163[B_firstFree_154]; B_typeId_606[this_521] = 2; }; B_y_204[this_521] = 2; return this_521; } function error213(string msg152) { $debugPrint135((msg_152 + (" " + #getStackTrace()))); }