array<integer> I_nextFree952
integer I_firstFree123
integer I_maxIndex213
array<integer> I_typeId157


integer I_firstFree123 = 0
integer I_maxIndex213 = 0


function initGlobals185() { 
}


function main138() { 
    initGlobals185();
    init_test508();
}


function config389() { 
}


function init_test508() { 
    local integer i547
    i_547 = new_C127();
    if (I_typeId_157[i_547] == 0) {
        if (i_547 == 0) {
            error108("Nullpointer exception when calling I.foo");
        } else {
            error108("Called I.foo on invalid object.");
        };
    } else {
    };
    testSuccess131();
}


IS_NATIVE function testSuccess131() { 
}


function new_C127() returns integer { 
    local integer this189
    if (I_firstFree_123 == 0) {
        if (I_maxIndex_213 < 32768) {
            I_maxIndex_213 = (I_maxIndex_213 + 1);
            this_189 = I_maxIndex_213;
            I_typeId_157[this_189] = 2;
        } else {
            error108("Out of memory: Could not create C.");
            this_189 = 0;
        };
    } else {
        I_firstFree_123 = (I_firstFree_123 - 1);
        this_189 = I_nextFree_952[I_firstFree_123];
        I_typeId_157[this_189] = 2;
    };
    return this_189;
}


function error108(string msg887) { 
    $debugPrint130((msg_887 + ("
" + #getStackTrace())));
}