array A_nextFree179 integer A_firstFree114 integer A_maxIndex186 array A_typeId185 integer A_firstFree114 = 0 integer A_maxIndex186 = 0 function initGlobals333() { } function main209() { initGlobals333(); init_test111(); } function config129() { } function init_test111() { local integer a199 a_199 = new_C11110(); if (dispatch_A_test_A_foo813(a_199) != 9) { testFail148("c11"); } else { }; a_199 = new_B11867(); if (dispatch_A_test_A_foo813(a_199) != 8) { testFail148("b11"); } else { }; a_199 = new_C919(); if (dispatch_A_test_A_foo813(a_199) != 9) { testFail148("C"); } else { }; a_199 = new_A192(); if (dispatch_A_test_A_foo813(a_199) != 7) { testFail148("A"); } else { }; testSuccess560(); } IS_NATIVE function testFail148(string msg111) { } IS_NATIVE function testSuccess560() { } function new_A192() returns integer { local integer this174 if (A_firstFree_114 == 0) { if (A_maxIndex_186 < 32768) { A_maxIndex_186 = (A_maxIndex_186 + 1); this_174 = A_maxIndex_186; A_typeId_185[this_174] = 1; } else { error481("Out of memory: Could not create A."); this_174 = 0; }; } else { A_firstFree_114 = (A_firstFree_114 - 1); this_174 = A_nextFree_179[A_firstFree_114]; A_typeId_185[this_174] = 1; }; return this_174; } function new_B11867() returns integer { local integer this165 if (A_firstFree_114 == 0) { if (A_maxIndex_186 < 32768) { A_maxIndex_186 = (A_maxIndex_186 + 1); this_165 = A_maxIndex_186; A_typeId_185[this_165] = 4; } else { error481("Out of memory: Could not create B11."); this_165 = 0; }; } else { A_firstFree_114 = (A_firstFree_114 - 1); this_165 = A_nextFree_179[A_firstFree_114]; A_typeId_185[this_165] = 4; }; return this_165; } function new_C919() returns integer { local integer this802 if (A_firstFree_114 == 0) { if (A_maxIndex_186 < 32768) { A_maxIndex_186 = (A_maxIndex_186 + 1); this_802 = A_maxIndex_186; A_typeId_185[this_802] = 7; } else { error481("Out of memory: Could not create C."); this_802 = 0; }; } else { A_firstFree_114 = (A_firstFree_114 - 1); this_802 = A_nextFree_179[A_firstFree_114]; A_typeId_185[this_802] = 7; }; return this_802; } function new_C11110() returns integer { local integer this110 if (A_firstFree_114 == 0) { if (A_maxIndex_186 < 32768) { A_maxIndex_186 = (A_maxIndex_186 + 1); this_110 = A_maxIndex_186; A_typeId_185[this_110] = 9; } else { error481("Out of memory: Could not create C11."); this_110 = 0; }; } else { A_firstFree_114 = (A_firstFree_114 - 1); this_110 = A_nextFree_179[A_firstFree_114]; A_typeId_185[this_110] = 9; }; return this_110; } function error481(string msg171) { $debugPrint368((msg_171 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo813(integer this277) returns integer { if (A_typeId_185[this_277] == 0) { if (this_277 == 0) { error481("Nullpointer exception when calling A.foo"); } else { error481("Called A.foo on invalid object."); }; } else { }; if (A_typeId_185[this_277] <= 6) { if (A_typeId_185[this_277] <= 1) { this_277 = 7; } else { this_277 = 8; }; } else { this_277 = 9; }; return this_277; }