integer test_x972 array B_nextFree148 integer B_firstFree941 integer B_maxIndex148 array B_typeId192 integer test_x972 = 2 integer B_firstFree941 = 0 integer B_maxIndex148 = 0 function initGlobals330() { } function main169() { initGlobals330(); init_test214(); } function config252() { } function init_test214() { local integer a710 local integer this567 test_x_972 = 2; a_710 = new_X190(); this_567 = a_710; if (B_typeId_192[this_567] == 0) { if (this_567 == 0) { error140("Nullpointer exception when calling X.X"); } else { error140("Called X.X on invalid object."); }; } else { }; destroyX170(this_567); if (test_x_972 == 6) { testSuccess181(); } else { }; } IS_NATIVE function testSuccess181() { } function destroyX170(integer this163) { local integer z561 local integer y557 local integer obj155 z_561 = 1; test_x_972 = (test_x_972 + z_561); y_557 = 2; test_x_972 = (test_x_972 * y_557); obj_155 = this_163; if (B_typeId_192[obj_155] == 0) { error140("Double free: object of type X"); } else { B_nextFree_148[B_firstFree_941] = obj_155; B_firstFree_941 = (B_firstFree_941 + 1); B_typeId_192[obj_155] = 0; }; } function new_X190() returns integer { local integer this124 local integer this139 local integer this135 if (B_firstFree_941 == 0) { if (B_maxIndex_148 < 32768) { B_maxIndex_148 = (B_maxIndex_148 + 1); this_139 = B_maxIndex_148; B_typeId_192[this_139] = 3; } else { error140("Out of memory: Could not create X."); this_139 = 0; }; } else { B_firstFree_941 = (B_firstFree_941 - 1); this_139 = B_nextFree_148[B_firstFree_941]; B_typeId_192[this_139] = 3; }; this_124 = this_139; this_135 = this_124; return this_124; } function error140(string msg105) { $debugPrint167((msg_105 + (" " + #getStackTrace()))); }