string test_s190 array T_nextFree125 integer T_firstFree883 integer T_maxIndex209 array T_typeId143 string test_s190 = "" integer T_firstFree883 = 0 integer T_maxIndex209 = 0 function initGlobals104() { } function main177() { initGlobals104(); test_s_190 = ""; dispatch_T_destroyT200(new_A163()); if (test_s_190 == "") { testSuccess180(); } else { }; } function config125() { } IS_NATIVE function testSuccess180() { } function new_A163() returns integer { local integer this123 if (T_firstFree_883 == 0) { if (T_maxIndex_209 < 32768) { T_maxIndex_209 = (T_maxIndex_209 + 1); this_123 = T_maxIndex_209; T_typeId_143[this_123] = 2; } else { error164("Out of memory: Could not create A."); this_123 = 0; }; } else { T_firstFree_883 = (T_firstFree_883 - 1); this_123 = T_nextFree_125[T_firstFree_883]; T_typeId_143[this_123] = 2; }; return this_123; } function error164(string msg143) { $debugPrint142((msg_143 + (" " + #getStackTrace()))); } function dispatch_T_destroyT200(integer this324) { if (T_typeId_143[this_324] == 0) { if (this_324 == 0) { error164("Nullpointer exception when calling T.T"); } else { error164("Called T.T on invalid object."); }; } else { }; if (T_typeId_143[this_324] <= 2) { if (T_typeId_143[this_324] <= 1) { if (T_typeId_143[this_324] == 0) { error164("Double free: object of type T"); } else { T_nextFree_125[T_firstFree_883] = this_324; T_firstFree_883 = (T_firstFree_883 + 1); T_typeId_143[this_324] = 0; }; } else { if (T_typeId_143[this_324] == 0) { error164("Double free: object of type A"); } else { T_nextFree_125[T_firstFree_883] = this_324; T_firstFree_883 = (T_firstFree_883 + 1); T_typeId_143[this_324] = 0; }; }; } else { test_s_190 = (test_s_190 + "B"); if (T_typeId_143[this_324] == 0) { error164("Double free: object of type B"); } else { T_nextFree_125[T_firstFree_883] = this_324; T_firstFree_883 = (T_firstFree_883 + 1); T_typeId_143[this_324] = 0; }; }; }