string test_s201 array T_nextFree593 integer T_firstFree419 integer T_maxIndex134 array T_typeId230 string test_s201 = "" integer T_firstFree419 = 0 integer T_maxIndex134 = 0 function initGlobals530() { } function main816() { local integer t852 initGlobals530(); test_s_201 = ""; t_852 = new_A197(); dispatch_T_destroyT553(t_852); if (test_s_201 == "") { testSuccess821(); } else { }; } function config145() { } IS_NATIVE function testSuccess821() { } function new_A197() returns integer { local integer this143 local integer this745 if (T_firstFree_419 == 0) { if (T_maxIndex_134 < 32768) { T_maxIndex_134 = (T_maxIndex_134 + 1); this_745 = T_maxIndex_134; T_typeId_230[this_745] = 2; } else { error200("Out of memory: Could not create A."); this_745 = 0; }; } else { T_firstFree_419 = (T_firstFree_419 - 1); this_745 = T_nextFree_593[T_firstFree_419]; T_typeId_230[this_745] = 2; }; this_143 = this_745; return this_143; } function error200(string msg400) { $debugPrint454((msg_400 + (" " + #getStackTrace()))); } function dispatch_T_destroyT553(integer this187) { local integer this392 local integer obj366 local integer this182 local integer obj123 local integer this245 local integer obj165 if (T_typeId_230[this_187] == 0) { if (this_187 == 0) { error200("Nullpointer exception when calling T.T"); } else { error200("Called T.T on invalid object."); }; } else { }; if (T_typeId_230[this_187] <= 2) { if (T_typeId_230[this_187] <= 1) { this_392 = this_187; obj_366 = this_392; if (T_typeId_230[obj_366] == 0) { error200("Double free: object of type T"); } else { T_nextFree_593[T_firstFree_419] = obj_366; T_firstFree_419 = (T_firstFree_419 + 1); T_typeId_230[obj_366] = 0; }; } else { this_182 = this_187; obj_123 = this_182; if (T_typeId_230[obj_123] == 0) { error200("Double free: object of type A"); } else { T_nextFree_593[T_firstFree_419] = obj_123; T_firstFree_419 = (T_firstFree_419 + 1); T_typeId_230[obj_123] = 0; }; }; } else { this_245 = this_187; test_s_201 = (test_s_201 + "B"); obj_165 = this_245; if (T_typeId_230[obj_165] == 0) { error200("Double free: object of type B"); } else { T_nextFree_593[T_firstFree_419] = obj_165; T_firstFree_419 = (T_firstFree_419 + 1); T_typeId_230[obj_165] = 0; }; }; }