integer test_x733 array B_nextFree100 integer B_firstFree119 integer B_maxIndex794 array B_typeId195 array B_y424 integer test_x733 = 2 integer B_firstFree119 = 0 integer B_maxIndex794 = 0 function initGlobals208() { } function main122() { initGlobals208(); init_test814(); } function config785() { } function init_test814() { local integer a800 test_x_733 = 2; a_800 = new_A208(); if (B_typeId_195[a_800] == 0) { if (a_800 == 0) { error131("Nullpointer exception when calling A.A"); } else { error131("Called A.A on invalid object."); }; } else { }; destroyA511(a_800); if (test_x_733 == 8) { testSuccess107(); } else { }; } IS_NATIVE function testSuccess107() { } function destroyA511(integer this202) { test_x_733 = (test_x_733 + B_y_424[this_202]); test_x_733 = (test_x_733 * B_y_424[this_202]); if (B_typeId_195[this_202] == 0) { error131("Double free: object of type A"); } else { B_nextFree_100[B_firstFree_119] = this_202; B_firstFree_119 = (B_firstFree_119 + 1); B_typeId_195[this_202] = 0; }; } function new_A208() returns integer { local integer this607 if (B_firstFree_119 == 0) { if (B_maxIndex_794 < 32768) { B_maxIndex_794 = (B_maxIndex_794 + 1); this_607 = B_maxIndex_794; B_typeId_195[this_607] = 2; } else { error131("Out of memory: Could not create A."); this_607 = 0; }; } else { B_firstFree_119 = (B_firstFree_119 - 1); this_607 = B_nextFree_100[B_firstFree_119]; B_typeId_195[this_607] = 2; }; B_y_424[this_607] = 2; return this_607; } function error131(string msg168) { $debugPrint106((msg_168 + (" " + #getStackTrace()))); }