array C_nextFree401 integer C_firstFree186 integer C_maxIndex423 array C_typeId190 array Iterator_nextFree803 integer Iterator_firstFree207 integer Iterator_maxIndex117 array Iterator_i210 integer C_firstFree186 = 0 integer C_maxIndex423 = 0 integer Iterator_firstFree207 = 0 integer Iterator_maxIndex117 = 0 function initGlobals199() { } function main116() { initGlobals199(); init_test406(); } function config250() { } function init_test406() { local integer from145 from_145 = dispatch_C_test_C_iterator888(new_C102()); loop { exitwhen (not Iterator_hasNext202(from_145)); if (Iterator_next720(from_145) == 5) { testSuccess114(); } else { }; }; } IS_NATIVE function testSuccess114() { } function C_iterator104(integer this842) returns integer { return new_Iterator801(); } function C_init104(integer this171) { } function new_C102() returns integer { local integer this724 this_724 = alloc_C826(); construct_C131(this_724); return this_724; } function construct_C131(integer this882) { C_init104(this_882); } function new_Iterator801() returns integer { local integer this155 this_155 = alloc_Iterator134(); construct_Iterator444(this_155); return this_155; } function Iterator_next720(integer this130) returns any { Iterator_i_210[this_130] = (Iterator_i_210[this_130] + 1); return (Iterator_i_210[this_130] castTo any); } function Iterator_hasNext202(integer this188) returns boolean { return (Iterator_i_210[this_188] < 10); } function Iterator_init114(integer this174) { Iterator_i_210[this_174] = 0; } function construct_Iterator444(integer this795) { Iterator_init114(this_795); } function alloc_C826() returns integer { local integer this382 if (C_firstFree_186 == 0) { if (C_maxIndex_423 < 32768) { C_maxIndex_423 = (C_maxIndex_423 + 1); this_382 = C_maxIndex_423; C_typeId_190[this_382] = 1; } else { error165("Out of memory: Could not create C."); this_382 = 0; }; } else { C_firstFree_186 = (C_firstFree_186 - 1); this_382 = C_nextFree_401[C_firstFree_186]; C_typeId_190[this_382] = 1; }; return this_382; } function error165(string msg186) { $debugPrint141((msg_186 + (" " + #getStackTrace()))); } function alloc_Iterator134() returns integer { local integer this916 if (Iterator_firstFree_207 == 0) { if (Iterator_maxIndex_117 < 32768) { Iterator_maxIndex_117 = (Iterator_maxIndex_117 + 1); this_916 = Iterator_maxIndex_117; } else { error165("Out of memory: Could not create Iterator."); this_916 = 0; }; } else { Iterator_firstFree_207 = (Iterator_firstFree_207 - 1); this_916 = Iterator_nextFree_803[Iterator_firstFree_207]; }; return this_916; } function dispatch_C_test_C_iterator888(integer this303) returns integer { if (C_typeId_190[this_303] == 0) { if (this_303 == 0) { error165("Nullpointer exception when calling C.iterator"); } else { error165("Called C.iterator on invalid object."); }; } else { }; return C_iterator104(this_303); }