integer test_x110 array B_nextFree132 integer B_firstFree212 integer B_maxIndex265 array B_typeId140 integer test_x110 = 2 integer B_firstFree212 = 0 integer B_maxIndex265 = 0 function initGlobals771() { } function main204() { initGlobals771(); init_test137(); } function config835() { } function init_test137() { local integer a147 local integer this190 test_x_110 = 2; a_147 = new_X209(); this_190 = a_147; if (B_typeId_140[this_190] == 0) { if (this_190 == 0) { error112("Nullpointer exception when calling X.X"); } else { error112("Called X.X on invalid object."); }; } else { }; destroyX402(this_190); if (test_x_110 == 6) { testSuccess800(); } else { }; } IS_NATIVE function testSuccess800() { } function destroyX402(integer this763) { local integer z116 local integer y988 local integer obj193 z_116 = 1; test_x_110 = (test_x_110 + z_116); y_988 = 2; test_x_110 = (test_x_110 * y_988); obj_193 = this_763; if (B_typeId_140[obj_193] == 0) { error112("Double free: object of type X"); } else { B_nextFree_132[B_firstFree_212] = obj_193; B_firstFree_212 = (B_firstFree_212 + 1); B_typeId_140[obj_193] = 0; }; } function new_X209() returns integer { local integer this290 local integer this194 local integer this148 if (B_firstFree_212 == 0) { if (B_maxIndex_265 < 32768) { B_maxIndex_265 = (B_maxIndex_265 + 1); this_194 = B_maxIndex_265; B_typeId_140[this_194] = 3; } else { error112("Out of memory: Could not create X."); this_194 = 0; }; } else { B_firstFree_212 = (B_firstFree_212 - 1); this_194 = B_nextFree_132[B_firstFree_212]; B_typeId_140[this_194] = 3; }; this_290 = this_194; this_148 = this_290; return this_290; } function error112(string msg203) { $debugPrint173((msg_203 + (" " + #getStackTrace()))); }