array C_nextFree320 integer C_firstFree177 integer C_maxIndex137 array C_typeId115 integer wurst_stack_depth355 array wurst_stack692 integer C_firstFree177 = 0 integer C_maxIndex137 = 0 integer wurst_stack_depth355 = 0 function initGlobals154() { } function main751() { initGlobals154(); init_test921("when calling init_test in recyling2, line 1"); } function config178() { } function init_test921(string __wurst_stackPos171) { local integer a136 wurst_stack_692[wurst_stack_depth_355] = __wurst_stackPos_171; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); a_136 = new_C169("when calling new_C in recyling2, line 9"); dispatch_C_destroyC111(a_136, "when calling dispatch_C_destroyC in recyling2, line 10"); a_136 = new_C169("when calling new_C in recyling2, line 11"); dispatch_C_destroyC111(a_136, "when calling dispatch_C_destroyC in recyling2, line 12"); a_136 = new_C169("when calling new_C in recyling2, line 13"); if (a_136 != new_C169("when calling new_C in recyling2, line 14")) { testSuccess346(); } else { }; wurst_stack_depth_355 = (wurst_stack_depth_355 - 1); } IS_NATIVE function testSuccess346() { } function new_C169(string __wurst_stackPos799) returns integer { local integer this204 wurst_stack_692[wurst_stack_depth_355] = __wurst_stackPos_799; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); wurst_stack_692[wurst_stack_depth_355] = "when calling alloc_C in recyling2, line 5"; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); if (C_firstFree_177 == 0) { if (C_maxIndex_137 < 32768) { C_maxIndex_137 = (C_maxIndex_137 + 1); this_204 = C_maxIndex_137; C_typeId_115[this_204] = 1; } else { error175("Out of memory: Could not create C.", "when calling error in recyling2, line 5"); this_204 = 0; }; } else { C_firstFree_177 = (C_firstFree_177 - 1); this_204 = C_nextFree_320[C_firstFree_177]; C_typeId_115[this_204] = 1; }; wurst_stack_depth_355 = ((wurst_stack_depth_355 - 1) - 1); return this_204; } function error175(string msg116, string __wurst_stackPos916) { local integer stacktraceIndex202 local integer stacktraceLimit182 wurst_stack_692[wurst_stack_depth_355] = __wurst_stackPos_916; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); __wurst_stackPos_916 = ""; stacktraceIndex_202 = wurst_stack_depth_355; stacktraceLimit_182 = 0; loop { stacktraceIndex_202 = (stacktraceIndex_202 - 1); stacktraceLimit_182 = (stacktraceLimit_182 + 1); exitwhen ((stacktraceLimit_182 > 20) or (stacktraceIndex_202 < 0)); __wurst_stackPos_916 = (__wurst_stackPos_916 + (" " + wurst_stack_692[stacktraceIndex_202])); }; $debugPrint102((msg_116 + (" " + __wurst_stackPos_916))); wurst_stack_depth_355 = (wurst_stack_depth_355 - 1); } function dispatch_C_destroyC111(integer this212, string __wurst_stackPos184) { wurst_stack_692[wurst_stack_depth_355] = __wurst_stackPos_184; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); if (C_typeId_115[this_212] == 0) { if (this_212 == 0) { error175("Nullpointer exception when calling C.C", "when calling error in recyling2, line 5"); } else { error175("Called C.C on invalid object.", "when calling error in recyling2, line 5"); }; } else { }; wurst_stack_692[wurst_stack_depth_355] = "when calling destroyC in recyling2, line 5"; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); wurst_stack_692[wurst_stack_depth_355] = "when calling dealloc_C in recyling2, line 5"; wurst_stack_depth_355 = (wurst_stack_depth_355 + 1); if (C_typeId_115[this_212] == 0) { error175("Double free: object of type C", "when calling error in recyling2, line 5"); } else { C_nextFree_320[C_firstFree_177] = this_212; C_firstFree_177 = (C_firstFree_177 + 1); C_typeId_115[this_212] = 0; }; wurst_stack_depth_355 = (((wurst_stack_depth_355 - 1) - 1) - 1); }