array C_nextFree115 integer C_firstFree411 integer C_maxIndex394 array C_typeId422 array Iterator_nextFree124 integer Iterator_firstFree171 integer Iterator_maxIndex115 array Iterator_i520 integer C_firstFree411 = 0 integer C_maxIndex394 = 0 integer Iterator_firstFree171 = 0 integer Iterator_maxIndex115 = 0 function initGlobals951() { } function main881() { initGlobals951(); init_test664(); } function config896() { } function init_test664() { local integer from534 from_534 = dispatch_C_test_C_iterator187(new_C137()); loop { exitwhen (not Iterator_hasNext742(from_534)); if (Iterator_next111(from_534) == 5) { testSuccess724(); } else { }; }; } IS_NATIVE function testSuccess724() { } function C_iterator159(integer this207) returns integer { return new_Iterator150(); } function C_init207(integer this848) { } function new_C137() returns integer { local integer this158 this_158 = alloc_C157(); construct_C843(this_158); return this_158; } function construct_C843(integer this769) { C_init207(this_769); } function new_Iterator150() returns integer { local integer this100 this_100 = alloc_Iterator172(); construct_Iterator118(this_100); return this_100; } function Iterator_next111(integer this199) returns any { Iterator_i_520[this_199] = (Iterator_i_520[this_199] + 1); return (Iterator_i_520[this_199] castTo any); } function Iterator_hasNext742(integer this212) returns boolean { return (Iterator_i_520[this_212] < 10); } function Iterator_init559(integer this988) { Iterator_i_520[this_988] = 0; } function construct_Iterator118(integer this191) { Iterator_init559(this_191); } function alloc_C157() returns integer { local integer this808 if (C_firstFree_411 == 0) { if (C_maxIndex_394 < 32768) { C_maxIndex_394 = (C_maxIndex_394 + 1); this_808 = C_maxIndex_394; C_typeId_422[this_808] = 1; } else { error138("Out of memory: Could not create C."); this_808 = 0; }; } else { C_firstFree_411 = (C_firstFree_411 - 1); this_808 = C_nextFree_115[C_firstFree_411]; C_typeId_422[this_808] = 1; }; return this_808; } function error138(string msg134) { $debugPrint156((msg_134 + (" " + #getStackTrace()))); } function alloc_Iterator172() returns integer { local integer this203 if (Iterator_firstFree_171 == 0) { if (Iterator_maxIndex_115 < 32768) { Iterator_maxIndex_115 = (Iterator_maxIndex_115 + 1); this_203 = Iterator_maxIndex_115; } else { error138("Out of memory: Could not create Iterator."); this_203 = 0; }; } else { Iterator_firstFree_171 = (Iterator_firstFree_171 - 1); this_203 = Iterator_nextFree_124[Iterator_firstFree_171]; }; return this_203; } function dispatch_C_test_C_iterator187(integer this168) returns integer { if (C_typeId_422[this_168] == 0) { if (this_168 == 0) { error138("Nullpointer exception when calling C.iterator"); } else { error138("Called C.iterator on invalid object."); }; } else { }; return C_iterator159(this_168); }