array A_nextFree168 integer A_firstFree208 integer A_maxIndex182 array A_typeId120 integer A_firstFree208 = 0 integer A_maxIndex182 = 0 function initGlobals154() { } function main851() { initGlobals154(); init_test189(); } function config208() { } function init_test189() { local integer a212 a_212 = new_C11194(); if (dispatch_A_test_A_foo137(a_212) != 9) { testFail262("c11"); } else { }; a_212 = new_B11831(); if (dispatch_A_test_A_foo137(a_212) != 8) { testFail262("b11"); } else { }; a_212 = new_C727(); if (dispatch_A_test_A_foo137(a_212) != 9) { testFail262("C"); } else { }; a_212 = new_A148(); if (dispatch_A_test_A_foo137(a_212) != 7) { testFail262("A"); } else { }; testSuccess124(); } IS_NATIVE function testFail262(string msg155) { } IS_NATIVE function testSuccess124() { } function new_A148() returns integer { local integer this541 local integer this964 if (A_firstFree_208 == 0) { if (A_maxIndex_182 < 32768) { A_maxIndex_182 = (A_maxIndex_182 + 1); this_964 = A_maxIndex_182; A_typeId_120[this_964] = 1; } else { error178("Out of memory: Could not create A."); this_964 = 0; }; } else { A_firstFree_208 = (A_firstFree_208 - 1); this_964 = A_nextFree_168[A_firstFree_208]; A_typeId_120[this_964] = 1; }; this_541 = this_964; return this_541; } function new_B11831() returns integer { local integer this186 local integer this377 local integer this939 local integer this269 if (A_firstFree_208 == 0) { if (A_maxIndex_182 < 32768) { A_maxIndex_182 = (A_maxIndex_182 + 1); this_377 = A_maxIndex_182; A_typeId_120[this_377] = 4; } else { error178("Out of memory: Could not create B11."); this_377 = 0; }; } else { A_firstFree_208 = (A_firstFree_208 - 1); this_377 = A_nextFree_168[A_firstFree_208]; A_typeId_120[this_377] = 4; }; this_186 = this_377; this_939 = this_186; this_269 = this_939; return this_186; } function new_C727() returns integer { local integer this155 local integer this952 if (A_firstFree_208 == 0) { if (A_maxIndex_182 < 32768) { A_maxIndex_182 = (A_maxIndex_182 + 1); this_952 = A_maxIndex_182; A_typeId_120[this_952] = 7; } else { error178("Out of memory: Could not create C."); this_952 = 0; }; } else { A_firstFree_208 = (A_firstFree_208 - 1); this_952 = A_nextFree_168[A_firstFree_208]; A_typeId_120[this_952] = 7; }; this_155 = this_952; return this_155; } function new_C11194() returns integer { local integer this152 local integer this555 local integer this305 local integer this129 if (A_firstFree_208 == 0) { if (A_maxIndex_182 < 32768) { A_maxIndex_182 = (A_maxIndex_182 + 1); this_555 = A_maxIndex_182; A_typeId_120[this_555] = 9; } else { error178("Out of memory: Could not create C11."); this_555 = 0; }; } else { A_firstFree_208 = (A_firstFree_208 - 1); this_555 = A_nextFree_168[A_firstFree_208]; A_typeId_120[this_555] = 9; }; this_152 = this_555; this_305 = this_152; this_129 = this_305; return this_152; } function error178(string msg848) { $debugPrint206((msg_848 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo137(integer this185) returns integer { local integer test_A_foo_result149 if (A_typeId_120[this_185] == 0) { if (this_185 == 0) { error178("Nullpointer exception when calling A.foo"); } else { error178("Called A.foo on invalid object."); }; } else { }; if (A_typeId_120[this_185] <= 6) { if (A_typeId_120[this_185] <= 1) { test_A_foo_result_149 = 7; } else { test_A_foo_result_149 = 8; }; } else { test_A_foo_result_149 = 9; }; return test_A_foo_result_149; }