integer test_x716 array B_nextFree180 integer B_firstFree111 integer B_maxIndex265 array B_typeId998 integer test_x716 = 2 integer B_firstFree111 = 0 integer B_maxIndex265 = 0 function initGlobals170() { } function main851() { initGlobals170(); test_x_716 = 2; dispatch_B_destroyB168(new_A380()); if (test_x_716 == 6) { testSuccess390(); } else { }; } function config175() { } IS_NATIVE function testSuccess390() { } function destroyA999(integer this495) { test_x_716 = ((test_x_716 + 1) * 2); if (B_typeId_998[this_495] == 0) { error211("Double free: object of type A"); } else { B_nextFree_180[B_firstFree_111] = this_495; B_firstFree_111 = (B_firstFree_111 + 1); B_typeId_998[this_495] = 0; }; } function new_A380() returns integer { local integer this204 if (B_firstFree_111 == 0) { if (B_maxIndex_265 < 32768) { B_maxIndex_265 = (B_maxIndex_265 + 1); this_204 = B_maxIndex_265; B_typeId_998[this_204] = 2; } else { error211("Out of memory: Could not create A."); this_204 = 0; }; } else { B_firstFree_111 = (B_firstFree_111 - 1); this_204 = B_nextFree_180[B_firstFree_111]; B_typeId_998[this_204] = 2; }; return this_204; } function error211(string msg156) { $debugPrint171((msg_156 + (" " + #getStackTrace()))); } function dispatch_B_destroyB168(integer this200) { if (B_typeId_998[this_200] == 0) { if (this_200 == 0) { error211("Nullpointer exception when calling B.B"); } else { error211("Called B.B on invalid object."); }; } else { }; if (B_typeId_998[this_200] <= 1) { test_x_716 = (test_x_716 * 2); if (B_typeId_998[this_200] == 0) { error211("Double free: object of type B"); } else { B_nextFree_180[B_firstFree_111] = this_200; B_firstFree_111 = (B_firstFree_111 + 1); B_typeId_998[this_200] = 0; }; } else { destroyA999(this_200); }; }