array<integer> C_nextFree672
integer C_firstFree476
integer C_maxIndex815


integer C_firstFree476 = 0
integer C_maxIndex815 = 0


function initGlobals997() { 
}


function main187() { 
    initGlobals997();
    init_Test189();
}


function config569() { 
}


function init_Test189() { 
    testEnum346();
    testClass479();
}


function testEnum346() { 
    local integer zeroInt373
    zeroInt_373 = (0 castTo integer);
    takesInt107((0 castTo integer));
    takesInt107(zeroInt_373);
    takesInt107(((zeroInt_373 castTo integer) castTo integer));
}


IS_NATIVE function takesInt107(integer i199) { 
}


function testClass479() { 
    local integer cObj101
    local integer cInt130
    cObj_101 = new_C179();
    cInt_130 = (cObj_101 castTo integer);
    takesC119(cObj_101);
    takesInt107(cInt_130);
    takesC119((cInt_130 castTo integer));
}


IS_NATIVE function takesC119(integer c739) { 
}


function C_init622(integer this211) { 
}


function new_C179() returns integer { 
    local integer this101
    this_101 = alloc_C180();
    construct_C209(this_101);
    return this_101;
}


function construct_C209(integer this761) { 
    C_init622(this_761);
}


function alloc_C180() returns integer { 
    local integer this778
    if (C_firstFree_476 == 0) {
        if (C_maxIndex_815 < 32768) {
            C_maxIndex_815 = (C_maxIndex_815 + 1);
            this_778 = C_maxIndex_815;
        } else {
            error125("Out of memory: Could not create C.");
            this_778 = 0;
        };
    } else {
        C_firstFree_476 = (C_firstFree_476 - 1);
        this_778 = C_nextFree_672[C_firstFree_476];
    };
    return this_778;
}


function error125(string msg179) { 
    $debugPrint140((msg_179 + ("
" + #getStackTrace())));
}