array<integer> Iterator_nextFree846
integer Iterator_firstFree119
integer Iterator_maxIndex137
array<integer> Iterator_typeId768
array<integer> List_nextFree645
integer List_firstFree193
integer List_maxIndex632
array<integer> List_typeId153
array<any> Iterator_t668


integer A_firstFree874 = 0
integer A_maxIndex626 = 0
integer B_firstFree658 = 0
integer B_maxIndex213 = 0
integer C_firstFree363 = 0
integer C_maxIndex166 = 0
integer Iterator_firstFree119 = 0
integer Iterator_maxIndex137 = 0
integer List_firstFree193 = 0
integer List_maxIndex632 = 0


function initGlobals120() { 
    Iterator_firstFree_119 = 0;
    Iterator_maxIndex_137 = 0;
    List_firstFree_193 = 0;
    List_maxIndex_632 = 0;
}


function main115() { 
    initGlobals120();
    init_test123();
}


function config149() { 
}


function init_test123() { 
    local integer a112
    local integer iterator108
    a_112 = new_List113();
    iterator_108 = dispatch_List_test_List_iterator211(a_112);
    loop {
        exitwhen (not dispatch_Iterator_test_Iterator_hasNext175(iterator_108));
        dispatch_Iterator_test_Iterator_next214(iterator_108);
        testSuccess103();
    };
}


IS_NATIVE function testSuccess103() { 
}


function new_Iterator850(integer t161) returns integer { 
    local integer this151
    this_151 = alloc_Iterator163();
    construct_Iterator200(this_151, t_161);
    return this_151;
}


function Iterator_hasNext184(integer this126) returns boolean { 
    return true;
}


function Iterator_next421(integer this109) returns any { 
    return Iterator_t_668[this_109];
}


function Iterator_init115(integer this397) { 
}


function construct_Iterator200(integer this106, integer t628) { 
    Iterator_init115(this_106);
}


function List_iterator121(integer this178) returns integer { 
    return new_Iterator850(this_178);
}


function List_init195(integer this578) { 
}


function new_List113() returns integer { 
    local integer this215
    this_215 = alloc_List968();
    construct_List124(this_215);
    return this_215;
}


function construct_List124(integer this481) { 
    List_init195(this_481);
}


function error121(string msg180) { 
    $debugPrint144((msg_180 + ("
" + #getStackTrace())));
}


function alloc_Iterator163() returns integer { 
    local integer this554
    if (Iterator_firstFree_119 == 0) {
        if (Iterator_maxIndex_137 < 32768) {
            Iterator_maxIndex_137 = (Iterator_maxIndex_137 + 1);
            this_554 = Iterator_maxIndex_137;
            Iterator_typeId_768[this_554] = 4;
        } else {
            error121("Out of memory: Could not create Iterator.");
            this_554 = 0;
        };
    } else {
        Iterator_firstFree_119 = (Iterator_firstFree_119 - 1);
        this_554 = Iterator_nextFree_846[Iterator_firstFree_119];
        Iterator_typeId_768[this_554] = 4;
    };
    return this_554;
}


function alloc_List968() returns integer { 
    local integer this141
    if (List_firstFree_193 == 0) {
        if (List_maxIndex_632 < 32768) {
            List_maxIndex_632 = (List_maxIndex_632 + 1);
            this_141 = List_maxIndex_632;
            List_typeId_153[this_141] = 5;
        } else {
            error121("Out of memory: Could not create List.");
            this_141 = 0;
        };
    } else {
        List_firstFree_193 = (List_firstFree_193 - 1);
        this_141 = List_nextFree_645[List_firstFree_193];
        List_typeId_153[this_141] = 5;
    };
    return this_141;
}


function dispatch_Iterator_test_Iterator_hasNext175(integer this152) returns boolean { 
    local boolean test_Iterator_hasNext_result603
    if (Iterator_typeId_768[this_152] == 0) {
        if (this_152 == 0) {
            error121("Nullpointer exception when calling Iterator.hasNext");
        } else {
            error121("Called Iterator.hasNext on invalid object.");
        };
    } else {
    };
    test_Iterator_hasNext_result_603 = Iterator_hasNext184(this_152);
    return test_Iterator_hasNext_result_603;
}


function dispatch_Iterator_test_Iterator_next214(integer this137) returns any { 
    local any test_Iterator_next_result235
    if (Iterator_typeId_768[this_137] == 0) {
        if (this_137 == 0) {
            error121("Nullpointer exception when calling Iterator.next");
        } else {
            error121("Called Iterator.next on invalid object.");
        };
    } else {
    };
    test_Iterator_next_result_235 = Iterator_next421(this_137);
    return test_Iterator_next_result_235;
}


function dispatch_List_test_List_iterator211(integer this625) returns integer { 
    local integer test_List_iterator_result167
    if (List_typeId_153[this_625] == 0) {
        if (this_625 == 0) {
            error121("Nullpointer exception when calling List.iterator");
        } else {
            error121("Called List.iterator on invalid object.");
        };
    } else {
    };
    test_List_iterator_result_167 = List_iterator121(this_625);
    return test_List_iterator_result_167;
}