array<integer> Blub_nextFree214
integer Blub_firstFree160
integer Blub_maxIndex912


integer Blub_firstFree160 = 0
integer Blub_maxIndex912 = 0


function initGlobals132() { 
    Blub_firstFree_160 = 0;
    Blub_maxIndex_912 = 0;
}


function main101() { 
    initGlobals132();
    init_Test189();
}


function config151() { 
}


function init_Test189() { 
    Blub_bla568(new_Blub104());
}


function Blub_bla568(integer this195) { 
}


function Blub_init618(integer this154) { 
}


function new_Blub104() returns integer { 
    local integer this145
    this_145 = alloc_Blub167();
    construct_Blub179(this_145);
    return this_145;
}


function construct_Blub179(integer this160) { 
    Blub_init618(this_160);
}


function alloc_Blub167() returns integer { 
    local integer this203
    if (Blub_firstFree_160 == 0) {
        if (Blub_maxIndex_912 < 32768) {
            Blub_maxIndex_912 = (Blub_maxIndex_912 + 1);
            this_203 = Blub_maxIndex_912;
        } else {
            error183("Out of memory: Could not create Blub.");
            this_203 = 0;
        };
    } else {
        Blub_firstFree_160 = (Blub_firstFree_160 - 1);
        this_203 = Blub_nextFree_214[Blub_firstFree_160];
    };
    return this_203;
}


function error183(string msg418) { 
    $debugPrint404((msg_418 + ("
" + #getStackTrace())));
}