array<integer> Pair_nextFree637
integer Pair_firstFree207
integer Pair_maxIndex547
array<integer> Pair_a175


integer Pair_firstFree207 = 0
integer Pair_maxIndex547 = 0


function initGlobals134() { 
}


function main141() { 
    initGlobals134();
    init_test102();
}


function config126() { 
}


function init_test102() { 
    local integer p882
    p_882 = new_Pair359();
    Pair_a_175[p_882] = 4;
    if (Pair_a_175[p_882] == 4) {
        testSuccess203();
    } else {
        testFail100("Array Test 1 failed.");
    };
}


IS_NATIVE function testSuccess203() { 
}


IS_NATIVE function testFail100(string msg716) { 
}


function new_Pair359() returns integer { 
    local integer this106
    if (Pair_firstFree_207 == 0) {
        if (Pair_maxIndex_547 < 32768) {
            Pair_maxIndex_547 = (Pair_maxIndex_547 + 1);
            this_106 = Pair_maxIndex_547;
        } else {
            error195("Out of memory: Could not create Pair.");
            this_106 = 0;
        };
    } else {
        Pair_firstFree_207 = (Pair_firstFree_207 - 1);
        this_106 = Pair_nextFree_637[Pair_firstFree_207];
    };
    return this_106;
}


function error195(string msg417) { 
    $debugPrint628((msg_417 + ("
" + #getStackTrace())));
}