array C_nextFree926 integer C_firstFree881 integer C_maxIndex717 array Iterator_nextFree143 integer Iterator_firstFree179 integer Iterator_maxIndex807 array Iterator_typeId102 array Iterator_i176 integer C_firstFree881 = 0 integer C_maxIndex717 = 0 integer Iterator_firstFree179 = 0 integer Iterator_maxIndex807 = 0 function initGlobals142() { } function main105() { initGlobals142(); init_test999(); } function config114() { } function init_test999() { local integer iterator432 new_C145(); iterator_432 = new_Iterator166(); loop { exitwhen (Iterator_i_176[iterator_432] >= 10); Iterator_i_176[iterator_432] = (Iterator_i_176[iterator_432] + 1); if ((Iterator_i_176[iterator_432] castTo any) == 5) { testSuccess111(); } else { }; }; dispatch_Iterator_destroyIterator730(iterator_432); } IS_NATIVE function testSuccess111() { } function new_C145() returns integer { local integer this461 if (C_firstFree_881 == 0) { if (C_maxIndex_717 < 32768) { C_maxIndex_717 = (C_maxIndex_717 + 1); this_461 = C_maxIndex_717; } else { error389("Out of memory: Could not create C."); this_461 = 0; }; } else { C_firstFree_881 = (C_firstFree_881 - 1); this_461 = C_nextFree_926[C_firstFree_881]; }; return this_461; } function new_Iterator166() returns integer { local integer this104 if (Iterator_firstFree_179 == 0) { if (Iterator_maxIndex_807 < 32768) { Iterator_maxIndex_807 = (Iterator_maxIndex_807 + 1); this_104 = Iterator_maxIndex_807; Iterator_typeId_102[this_104] = 2; } else { error389("Out of memory: Could not create Iterator."); this_104 = 0; }; } else { Iterator_firstFree_179 = (Iterator_firstFree_179 - 1); this_104 = Iterator_nextFree_143[Iterator_firstFree_179]; Iterator_typeId_102[this_104] = 2; }; Iterator_i_176[this_104] = 0; return this_104; } function error389(string msg226) { $debugPrint136((msg_226 + (" " + #getStackTrace()))); } function dispatch_Iterator_destroyIterator730(integer this212) { if (Iterator_typeId_102[this_212] == 0) { if (this_212 == 0) { error389("Nullpointer exception when calling Iterator.Iterator"); } else { error389("Called Iterator.Iterator on invalid object."); }; } else { }; if (Iterator_typeId_102[this_212] == 0) { error389("Double free: object of type Iterator"); } else { Iterator_nextFree_143[Iterator_firstFree_179] = this_212; Iterator_firstFree_179 = (Iterator_firstFree_179 + 1); Iterator_typeId_102[this_212] = 0; }; }