array A_nextFree292 integer A_firstFree144 integer A_maxIndex513 array A_typeId214 integer A_firstFree144 = 0 integer A_maxIndex513 = 0 function initGlobals803() { } function main132() { initGlobals803(); dispatch_A_destroyA108(new_B365()); } function config213() { } IS_NATIVE function testSuccess174() { } function destroyB184(integer this205) { testSuccess174(); if (A_typeId_214[this_205] == 0) { error606("Double free: object of type B"); } else { A_nextFree_292[A_firstFree_144] = this_205; A_firstFree_144 = (A_firstFree_144 + 1); A_typeId_214[this_205] = 0; }; } function new_B365() returns integer { local integer this446 if (A_firstFree_144 == 0) { if (A_maxIndex_513 < 32768) { A_maxIndex_513 = (A_maxIndex_513 + 1); this_446 = A_maxIndex_513; A_typeId_214[this_446] = 2; } else { error606("Out of memory: Could not create B."); this_446 = 0; }; } else { A_firstFree_144 = (A_firstFree_144 - 1); this_446 = A_nextFree_292[A_firstFree_144]; A_typeId_214[this_446] = 2; }; return this_446; } function error606(string msg303) { $debugPrint507((msg_303 + (" " + #getStackTrace()))); } function dispatch_A_destroyA108(integer this701) { if (A_typeId_214[this_701] == 0) { if (this_701 == 0) { error606("Nullpointer exception when calling A.A"); } else { error606("Called A.A on invalid object."); }; } else { }; if (A_typeId_214[this_701] <= 1) { if (A_typeId_214[this_701] == 0) { error606("Double free: object of type A"); } else { A_nextFree_292[A_firstFree_144] = this_701; A_firstFree_144 = (A_firstFree_144 + 1); A_typeId_214[this_701] = 0; }; } else { destroyB184(this_701); }; }