array<integer> A_nextFree186
integer A_firstFree134
integer A_maxIndex786
array<integer> A_i114


integer A_firstFree134 = 0
integer A_maxIndex786 = 0


function initGlobals104() { 
}


function main960() { 
    initGlobals104();
    init_test211();
}


function config626() { 
}


function init_test211() { 
    local integer a1990
    local integer a2530
    local integer result178
    local integer this111
    local integer a122
    a1_990 = new_A140();
    a2_530 = new_A140();
    this_111 = a1_990;
    a_122 = a2_530;
    result_178 = (A_i_114[this_111] + A_i_114[a_122]);
    if (result_178 == 4) {
        testSuccess934();
    } else {
    };
}


IS_NATIVE function testSuccess934() { 
}


function new_A140() returns integer { 
    local integer this144
    local integer this182
    local integer this107
    local integer this147
    if (A_firstFree_134 == 0) {
        if (A_maxIndex_786 < 32768) {
            A_maxIndex_786 = (A_maxIndex_786 + 1);
            this_182 = A_maxIndex_786;
        } else {
            error954("Out of memory: Could not create A.");
            this_182 = 0;
        };
    } else {
        A_firstFree_134 = (A_firstFree_134 - 1);
        this_182 = A_nextFree_186[A_firstFree_134];
    };
    this_144 = this_182;
    this_107 = this_144;
    this_147 = this_107;
    A_i_114[this_147] = 2;
    return this_144;
}


function error954(string msg167) { 
    $debugPrint195((msg_167 + ("
" + #getStackTrace())));
}