array IntList_elements163 array IntList_nextFree175 integer IntList_firstFree107 integer IntList_maxIndex373 array IntList_typeId372 array IntListIterator_nextFree852 integer IntListIterator_firstFree205 integer IntListIterator_maxIndex164 array IntListIterator_typeId109 array IntList_size904 array IntListIterator_list103 array IntListIterator_pos451 integer IntList_firstFree107 = 0 integer IntList_maxIndex373 = 0 integer IntListIterator_firstFree205 = 0 integer IntListIterator_maxIndex164 = 0 function initGlobals167() { } function main708() { initGlobals167(); init_test174(); } function config753() { } function init_test174() { local integer list183 local integer sum147 local integer listIterator152 local integer i190 local integer from135 local integer this782 local integer test_IntList_iterator_result199 local integer this134 local integer this682 local integer this159 local integer this729 local integer this386 list_183 = dispatch_IntList_test_IntList_add201(dispatch_IntList_test_IntList_add201(dispatch_IntList_test_IntList_add201(new_IntList137(), 7), 3), 5); sum_147 = 0; this_782 = list_183; if (IntList_typeId_372[this_782] == 0) { if (this_782 == 0) { error853("Nullpointer exception when calling IntList.iterator"); } else { error853("Called IntList.iterator on invalid object."); }; } else { }; this_134 = this_782; test_IntList_iterator_result_199 = new_IntListIterator571(this_134); listIterator_152 = test_IntList_iterator_result_199; from_135 = listIterator_152; loop { this_682 = from_135; exitwhen (not (IntListIterator_pos_451[this_682] < IntList_size_904[IntListIterator_list_103[this_682]])); this_159 = from_135; IntListIterator_pos_451[this_159] = (IntListIterator_pos_451[this_159] + 1); i_190 = dispatch_IntList_test_IntList_get182(IntListIterator_list_103[this_159], (IntListIterator_pos_451[this_159] - 1)); sum_147 = (sum_147 + i_190); }; this_729 = listIterator_152; if (IntListIterator_typeId_109[this_729] == 0) { if (this_729 == 0) { error853("Nullpointer exception when calling IntListIterator.close"); } else { error853("Called IntListIterator.close on invalid object."); }; } else { }; this_386 = this_729; dispatch_IntListIterator_destroyIntListIterator198(this_386); if (sum_147 == 15) { testSuccess143(); } else { }; } IS_NATIVE function testSuccess143() { } function new_IntList137() returns integer { local integer this833 local integer this189 local integer this193 local integer this119 if (IntList_firstFree_107 == 0) { if (IntList_maxIndex_373 < 32768) { IntList_maxIndex_373 = (IntList_maxIndex_373 + 1); this_189 = IntList_maxIndex_373; IntList_typeId_372[this_189] = 1; } else { error853("Out of memory: Could not create IntList."); this_189 = 0; }; } else { IntList_firstFree_107 = (IntList_firstFree_107 - 1); this_189 = IntList_nextFree_175[IntList_firstFree_107]; IntList_typeId_372[this_189] = 1; }; this_833 = this_189; this_193 = this_833; this_119 = this_193; IntList_size_904[this_119] = 0; return this_833; } function new_IntListIterator571(integer list137) returns integer { local integer this202 local integer this769 local integer this202 local integer list125 local integer this949 if (IntListIterator_firstFree_205 == 0) { if (IntListIterator_maxIndex_164 < 32768) { IntListIterator_maxIndex_164 = (IntListIterator_maxIndex_164 + 1); this_769 = IntListIterator_maxIndex_164; IntListIterator_typeId_109[this_769] = 2; } else { error853("Out of memory: Could not create IntListIterator."); this_769 = 0; }; } else { IntListIterator_firstFree_205 = (IntListIterator_firstFree_205 - 1); this_769 = IntListIterator_nextFree_852[IntListIterator_firstFree_205]; IntListIterator_typeId_109[this_769] = 2; }; this_202 = this_769; this_202 = this_202; list_125 = list_137; this_949 = this_202; IntListIterator_pos_451[this_949] = 0; IntListIterator_list_103[this_202] = list_125; return this_202; } function error853(string msg438) { $debugPrint565((msg_438 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add201(integer this684, integer x688) returns integer { local integer test_IntList_add_result105 local integer this492 local integer x171 local integer this834 local integer test_IntList_getOffset_result181 local integer this292 if (IntList_typeId_372[this_684] == 0) { if (this_684 == 0) { error853("Nullpointer exception when calling IntList.add"); } else { error853("Called IntList.add on invalid object."); }; } else { }; this_492 = this_684; x_171 = x_688; this_834 = this_492; if (IntList_typeId_372[this_834] == 0) { if (this_834 == 0) { error853("Nullpointer exception when calling IntList.getOffset"); } else { error853("Called IntList.getOffset on invalid object."); }; } else { }; this_292 = this_834; test_IntList_getOffset_result_181 = (64 * ((this_292 castTo integer) - 1)); IntList_elements_163[(test_IntList_getOffset_result_181 + IntList_size_904[this_492])] = x_171; IntList_size_904[this_492] = (IntList_size_904[this_492] + 1); test_IntList_add_result_105 = this_492; return test_IntList_add_result_105; } function dispatch_IntList_test_IntList_get182(integer this171, integer i750) returns integer { local integer test_IntList_get_result204 local integer this144 local integer i128 local integer this546 local integer test_IntList_getOffset_result121 local integer this185 if (IntList_typeId_372[this_171] == 0) { if (this_171 == 0) { error853("Nullpointer exception when calling IntList.get"); } else { error853("Called IntList.get on invalid object."); }; } else { }; this_144 = this_171; i_128 = i_750; this_546 = this_144; if (IntList_typeId_372[this_546] == 0) { if (this_546 == 0) { error853("Nullpointer exception when calling IntList.getOffset"); } else { error853("Called IntList.getOffset on invalid object."); }; } else { }; this_185 = this_546; test_IntList_getOffset_result_121 = (64 * ((this_185 castTo integer) - 1)); test_IntList_get_result_204 = IntList_elements_163[(test_IntList_getOffset_result_121 + i_128)]; return test_IntList_get_result_204; } function dispatch_IntListIterator_destroyIntListIterator198(integer this121) { local integer this112 local integer obj113 if (IntListIterator_typeId_109[this_121] == 0) { if (this_121 == 0) { error853("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error853("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; this_112 = this_121; obj_113 = this_112; if (IntListIterator_typeId_109[obj_113] == 0) { error853("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_852[IntListIterator_firstFree_205] = obj_113; IntListIterator_firstFree_205 = (IntListIterator_firstFree_205 + 1); IntListIterator_typeId_109[obj_113] = 0; }; }