array<integer> Base_nextFree198
integer Base_firstFree100
integer Base_maxIndex209
array<integer> Base_typeId189
array<integer> Base_next140


integer Base_firstFree100 = 0
integer Base_maxIndex209 = 0


function initGlobals293() { 
}


function main211() { 
    local integer suba107
    local integer subb114
    initGlobals293();
    suba_107 = new_SubClassA392();
    subb_114 = new_SubClassB416();
    Base_next_140[suba_107] = subb_114;
    dispatch_SubClassA_test_SubClassA_clear691(suba_107);
}


function config449() { 
}


IS_NATIVE function testSuccess352() { 
}


function new_SubClassA392() returns integer { 
    local integer this152
    if (Base_firstFree_100 == 0) {
        if (Base_maxIndex_209 < 32768) {
            Base_maxIndex_209 = (Base_maxIndex_209 + 1);
            this_152 = Base_maxIndex_209;
            Base_typeId_189[this_152] = 2;
        } else {
            error131("Out of memory: Could not create SubClassA.");
            this_152 = 0;
        };
    } else {
        Base_firstFree_100 = (Base_firstFree_100 - 1);
        this_152 = Base_nextFree_198[Base_firstFree_100];
        Base_typeId_189[this_152] = 2;
    };
    return this_152;
}


function new_SubClassB416() returns integer { 
    local integer this526
    if (Base_firstFree_100 == 0) {
        if (Base_maxIndex_209 < 32768) {
            Base_maxIndex_209 = (Base_maxIndex_209 + 1);
            this_526 = Base_maxIndex_209;
            Base_typeId_189[this_526] = 3;
        } else {
            error131("Out of memory: Could not create SubClassB.");
            this_526 = 0;
        };
    } else {
        Base_firstFree_100 = (Base_firstFree_100 - 1);
        this_526 = Base_nextFree_198[Base_firstFree_100];
        Base_typeId_189[this_526] = 3;
    };
    return this_526;
}


function error131(string msg196) { 
    $debugPrint187((msg_196 + ("
" + #getStackTrace())));
}


function dispatch_Base_test_Base_clear108(integer this277) { 
    if (Base_typeId_189[this_277] == 0) {
        if (this_277 == 0) {
            error131("Nullpointer exception when calling Base.clear");
        } else {
            error131("Called Base.clear on invalid object.");
        };
    } else {
    };
    if (Base_typeId_189[this_277] <= 2) {
        if (Base_typeId_189[this_277] <= 1) {
            if (Base_next_140[this_277] != null<integer>) {
                dispatch_Base_test_Base_clear108(Base_next_140[this_277]);
            } else {
            };
        } else {
            if (Base_next_140[this_277] != null<integer>) {
                dispatch_Base_test_Base_clear108(Base_next_140[this_277]);
            } else {
            };
        };
    } else {
        if (Base_next_140[this_277] != null<integer>) {
            dispatch_Base_test_Base_clear108(Base_next_140[this_277]);
        } else {
        };
        testSuccess352();
    };
}


function dispatch_SubClassA_test_SubClassA_clear691(integer this468) { 
    if (Base_typeId_189[this_468] == 0) {
        if (this_468 == 0) {
            error131("Nullpointer exception when calling SubClassA.clear");
        } else {
            error131("Called SubClassA.clear on invalid object.");
        };
    } else {
    };
    if (Base_next_140[this_468] != null<integer>) {
        dispatch_Base_test_Base_clear108(Base_next_140[this_468]);
    } else {
    };
}