array C_nextFree164 integer C_firstFree183 integer C_maxIndex140 array Iterator_nextFree148 integer Iterator_firstFree176 integer Iterator_maxIndex151 array Iterator_typeId970 array Iterator_i204 integer C_firstFree183 = 0 integer C_maxIndex140 = 0 integer Iterator_firstFree176 = 0 integer Iterator_maxIndex151 = 0 function initGlobals837() { } function main509() { initGlobals837(); init_test275(); } function config180() { } function init_test275() { local integer iterator165 local integer i844 local integer this178 local integer this934 local integer this171 new_C631(); iterator_165 = new_Iterator195(); loop { this_178 = iterator_165; exitwhen (not (Iterator_i_204[this_178] < 10)); this_934 = iterator_165; Iterator_i_204[this_934] = (Iterator_i_204[this_934] + 1); i_844 = (Iterator_i_204[this_934] castTo any); if (i_844 == 5) { testSuccess421(); } else { }; }; this_171 = iterator_165; dispatch_Iterator_destroyIterator995(this_171); } IS_NATIVE function testSuccess421() { } function new_C631() returns integer { local integer this519 local integer this121 if (C_firstFree_183 == 0) { if (C_maxIndex_140 < 32768) { C_maxIndex_140 = (C_maxIndex_140 + 1); this_121 = C_maxIndex_140; } else { error202("Out of memory: Could not create C."); this_121 = 0; }; } else { C_firstFree_183 = (C_firstFree_183 - 1); this_121 = C_nextFree_164[C_firstFree_183]; }; this_519 = this_121; return this_519; } function new_Iterator195() returns integer { local integer this431 local integer this317 local integer this211 local integer this788 if (Iterator_firstFree_176 == 0) { if (Iterator_maxIndex_151 < 32768) { Iterator_maxIndex_151 = (Iterator_maxIndex_151 + 1); this_317 = Iterator_maxIndex_151; Iterator_typeId_970[this_317] = 2; } else { error202("Out of memory: Could not create Iterator."); this_317 = 0; }; } else { Iterator_firstFree_176 = (Iterator_firstFree_176 - 1); this_317 = Iterator_nextFree_148[Iterator_firstFree_176]; Iterator_typeId_970[this_317] = 2; }; this_431 = this_317; this_211 = this_431; this_788 = this_211; Iterator_i_204[this_788] = 0; return this_431; } function error202(string msg188) { $debugPrint105((msg_188 + (" " + #getStackTrace()))); } function dispatch_Iterator_destroyIterator995(integer this139) { local integer this379 local integer obj214 if (Iterator_typeId_970[this_139] == 0) { if (this_139 == 0) { error202("Nullpointer exception when calling Iterator.Iterator"); } else { error202("Called Iterator.Iterator on invalid object."); }; } else { }; this_379 = this_139; obj_214 = this_379; if (Iterator_typeId_970[obj_214] == 0) { error202("Double free: object of type Iterator"); } else { Iterator_nextFree_148[Iterator_firstFree_176] = obj_214; Iterator_firstFree_176 = (Iterator_firstFree_176 + 1); Iterator_typeId_970[obj_214] = 0; }; }