array C_nextFree197 integer C_firstFree154 integer C_maxIndex731 array C_typeId746 array Iterator_nextFree154 integer Iterator_firstFree188 integer Iterator_maxIndex607 array Iterator_i747 integer C_firstFree154 = 0 integer C_maxIndex731 = 0 integer Iterator_firstFree188 = 0 integer Iterator_maxIndex607 = 0 function initGlobals101() { C_firstFree_154 = 0; C_maxIndex_731 = 0; Iterator_firstFree_188 = 0; Iterator_maxIndex_607 = 0; } function main147() { initGlobals101(); init_test174(); } function config180() { } function init_test174() { local integer c178 local integer iter101 local integer i969 local integer from556 c_178 = new_C779(); iter_101 = dispatch_C_test_C_iterator163(c_178); from_556 = iter_101; loop { exitwhen (not Iterator_hasNext202(from_556)); i_969 = Iterator_next914(from_556); if (i_969 == 5) { testSuccess453(); } else { }; }; } IS_NATIVE function testSuccess453() { } function C_iterator138(integer this413) returns integer { return new_Iterator165(); } function C_init132(integer this808) { } function new_C779() returns integer { local integer this151 this_151 = alloc_C102(); construct_C200(this_151); return this_151; } function construct_C200(integer this126) { C_init132(this_126); } function new_Iterator165() returns integer { local integer this111 this_111 = alloc_Iterator140(); construct_Iterator153(this_111); return this_111; } function Iterator_next914(integer this212) returns any { Iterator_i_747[this_212] = (Iterator_i_747[this_212] + 1); return (Iterator_i_747[this_212] castTo any); } function Iterator_hasNext202(integer this990) returns boolean { return (Iterator_i_747[this_990] < 10); } function Iterator_init171(integer this757) { Iterator_i_747[this_757] = 0; } function construct_Iterator153(integer this555) { Iterator_init171(this_555); } function alloc_C102() returns integer { local integer this197 if (C_firstFree_154 == 0) { if (C_maxIndex_731 < 32768) { C_maxIndex_731 = (C_maxIndex_731 + 1); this_197 = C_maxIndex_731; C_typeId_746[this_197] = 1; } else { error996("Out of memory: Could not create C."); this_197 = 0; }; } else { C_firstFree_154 = (C_firstFree_154 - 1); this_197 = C_nextFree_197[C_firstFree_154]; C_typeId_746[this_197] = 1; }; return this_197; } function error996(string msg663) { $debugPrint931((msg_663 + (" " + #getStackTrace()))); } function alloc_Iterator140() returns integer { local integer this213 if (Iterator_firstFree_188 == 0) { if (Iterator_maxIndex_607 < 32768) { Iterator_maxIndex_607 = (Iterator_maxIndex_607 + 1); this_213 = Iterator_maxIndex_607; } else { error996("Out of memory: Could not create Iterator."); this_213 = 0; }; } else { Iterator_firstFree_188 = (Iterator_firstFree_188 - 1); this_213 = Iterator_nextFree_154[Iterator_firstFree_188]; }; return this_213; } function dispatch_C_test_C_iterator163(integer this211) returns integer { local integer test_C_iterator_result102 if (C_typeId_746[this_211] == 0) { if (this_211 == 0) { error996("Nullpointer exception when calling C.iterator"); } else { error996("Called C.iterator on invalid object."); }; } else { }; test_C_iterator_result_102 = C_iterator138(this_211); return test_C_iterator_result_102; }