array<integer> I_nextFree195
integer I_firstFree151
integer I_maxIndex784
array<integer> I_typeId139


integer I_firstFree151 = 0
integer I_maxIndex784 = 0


function initGlobals886() { 
    I_firstFree_151 = 0;
    I_maxIndex_784 = 0;
}


function main196() { 
    initGlobals886();
    init_test954();
}


function config735() { 
}


function init_test954() { 
    local integer i921
    i_921 = new_C122();
    dispatch_I_test_I_foo751(i_921, 7);
}


IS_NATIVE function testSuccess809() { 
}


function C_foo179(integer this137, integer x775) { 
    testSuccess809();
}


function C_init133(integer this837) { 
}


function new_C122() returns integer { 
    local integer this188
    this_188 = alloc_C198();
    construct_C798(this_188);
    return this_188;
}


function construct_C798(integer this163) { 
    C_init133(this_163);
}


function alloc_C198() returns integer { 
    local integer this182
    if (I_firstFree_151 == 0) {
        if (I_maxIndex_784 < 32768) {
            I_maxIndex_784 = (I_maxIndex_784 + 1);
            this_182 = I_maxIndex_784;
            I_typeId_139[this_182] = 2;
        } else {
            error140("Out of memory: Could not create C.");
            this_182 = 0;
        };
    } else {
        I_firstFree_151 = (I_firstFree_151 - 1);
        this_182 = I_nextFree_195[I_firstFree_151];
        I_typeId_139[this_182] = 2;
    };
    return this_182;
}


function error140(string msg113) { 
    $debugPrint152((msg_113 + ("
" + #getStackTrace())));
}


function dispatch_I_test_I_foo751(integer this106, integer x699) { 
    if (I_typeId_139[this_106] == 0) {
        if (this_106 == 0) {
            error140("Nullpointer exception when calling I.foo");
        } else {
            error140("Called I.foo on invalid object.");
        };
    } else {
    };
    C_foo179(this_106, x_699);
}