array A_nextFree756 integer A_firstFree188 integer A_maxIndex179 array A_typeId122 integer A_firstFree188 = 0 integer A_maxIndex179 = 0 function initGlobals203() { } function main747() { initGlobals203(); init_test688(); } function config618() { } function init_test688() { local integer a480 a_480 = new_C11918(); if (dispatch_A_test_A_foo105(a_480) != 9) { testFail935("c11"); } else { }; a_480 = new_B11170(); if (dispatch_A_test_A_foo105(a_480) != 8) { testFail935("b11"); } else { }; a_480 = new_C118(); if (dispatch_A_test_A_foo105(a_480) != 9) { testFail935("C"); } else { }; a_480 = new_A880(); if (dispatch_A_test_A_foo105(a_480) != 7) { testFail935("A"); } else { }; testSuccess353(); } IS_NATIVE function testFail935(string msg262) { } IS_NATIVE function testSuccess353() { } function new_A880() returns integer { local integer this694 if (A_firstFree_188 == 0) { if (A_maxIndex_179 < 32768) { A_maxIndex_179 = (A_maxIndex_179 + 1); this_694 = A_maxIndex_179; A_typeId_122[this_694] = 1; } else { error206("Out of memory: Could not create A."); this_694 = 0; }; } else { A_firstFree_188 = (A_firstFree_188 - 1); this_694 = A_nextFree_756[A_firstFree_188]; A_typeId_122[this_694] = 1; }; return this_694; } function new_B11170() returns integer { local integer this159 if (A_firstFree_188 == 0) { if (A_maxIndex_179 < 32768) { A_maxIndex_179 = (A_maxIndex_179 + 1); this_159 = A_maxIndex_179; A_typeId_122[this_159] = 4; } else { error206("Out of memory: Could not create B11."); this_159 = 0; }; } else { A_firstFree_188 = (A_firstFree_188 - 1); this_159 = A_nextFree_756[A_firstFree_188]; A_typeId_122[this_159] = 4; }; return this_159; } function new_C118() returns integer { local integer this214 if (A_firstFree_188 == 0) { if (A_maxIndex_179 < 32768) { A_maxIndex_179 = (A_maxIndex_179 + 1); this_214 = A_maxIndex_179; A_typeId_122[this_214] = 7; } else { error206("Out of memory: Could not create C."); this_214 = 0; }; } else { A_firstFree_188 = (A_firstFree_188 - 1); this_214 = A_nextFree_756[A_firstFree_188]; A_typeId_122[this_214] = 7; }; return this_214; } function new_C11918() returns integer { local integer this125 if (A_firstFree_188 == 0) { if (A_maxIndex_179 < 32768) { A_maxIndex_179 = (A_maxIndex_179 + 1); this_125 = A_maxIndex_179; A_typeId_122[this_125] = 9; } else { error206("Out of memory: Could not create C11."); this_125 = 0; }; } else { A_firstFree_188 = (A_firstFree_188 - 1); this_125 = A_nextFree_756[A_firstFree_188]; A_typeId_122[this_125] = 9; }; return this_125; } function error206(string msg528) { $debugPrint202((msg_528 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo105(integer this110) returns integer { if (A_typeId_122[this_110] == 0) { if (this_110 == 0) { error206("Nullpointer exception when calling A.foo"); } else { error206("Called A.foo on invalid object."); }; } else { }; if (A_typeId_122[this_110] <= 6) { if (A_typeId_122[this_110] <= 1) { this_110 = 7; } else { this_110 = 8; }; } else { this_110 = 9; }; return this_110; }