array<integer> C_nextFree206
integer C_firstFree162
integer C_maxIndex129
array<integer> C_B_A_x412


integer C_firstFree162 = 0
integer C_maxIndex129 = 0


function initGlobals405() { 
}


function main140() { 
    initGlobals405();
    init_Test556();
}


function config143() { 
}


function init_Test556() { 
    if (C_B_A_x_412[new_C138()] == 2) {
        testSuccess202();
    } else {
    };
}


IS_NATIVE function testSuccess202() { 
}


function C_init126(integer this654) { 
    C_B_A_x_412[this_654] = 3;
    construct_C_B278(this_654);
}


function construct_C_B278(integer this922) { 
    construct_C_B_A337(this_922);
}


function construct_C_B_A337(integer this396) { 
    C_B_A_x_412[this_396] = (C_B_A_x_412[this_396] - 1);
}


function new_C138() returns integer { 
    local integer this158
    this_158 = alloc_C200();
    construct_C205(this_158);
    return this_158;
}


function construct_C205(integer this209) { 
    C_init126(this_209);
}


function alloc_C200() returns integer { 
    local integer this714
    if (C_firstFree_162 == 0) {
        if (C_maxIndex_129 < 32768) {
            C_maxIndex_129 = (C_maxIndex_129 + 1);
            this_714 = C_maxIndex_129;
        } else {
            error146("Out of memory: Could not create C.");
            this_714 = 0;
        };
    } else {
        C_firstFree_162 = (C_firstFree_162 - 1);
        this_714 = C_nextFree_206[C_firstFree_162];
    };
    return this_714;
}


function error146(string msg126) { 
    $debugPrint113((msg_126 + ("
" + #getStackTrace())));
}