array<integer> C_nextFree546
integer C_firstFree207
integer C_maxIndex176
array<integer> C_typeId729


integer C_firstFree207 = 0
integer C_maxIndex176 = 0


function initGlobals566() { 
}


function main786() { 
    initGlobals566();
    init_test229();
}


function config101() { 
}


function init_test229() { 
    local integer c205
    local integer this461
    local real b209
    local real b611
    c_205 = new_C182();
    this_461 = c_205;
    b_209 = 1.23;
    if (C_typeId_729[this_461] == 0) {
        if (this_461 == 0) {
            error211("Nullpointer exception when calling C.set");
        } else {
            error211("Called C.set on invalid object.");
        };
    } else {
    };
    b_611 = b_209;
}


function new_C182() returns integer { 
    local integer this129
    local integer this169
    if (C_firstFree_207 == 0) {
        if (C_maxIndex_176 < 32768) {
            C_maxIndex_176 = (C_maxIndex_176 + 1);
            this_169 = C_maxIndex_176;
            C_typeId_729[this_169] = 1;
        } else {
            error211("Out of memory: Could not create C.");
            this_169 = 0;
        };
    } else {
        C_firstFree_207 = (C_firstFree_207 - 1);
        this_169 = C_nextFree_546[C_firstFree_207];
        C_typeId_729[this_169] = 1;
    };
    this_129 = this_169;
    return this_129;
}


function error211(string msg131) { 
    $debugPrint142((msg_131 + ("
" + #getStackTrace())));
}