array test_ar478 array I_nextFree923 integer I_firstFree781 integer I_maxIndex196 array I_typeId750 integer I_firstFree781 = 0 integer I_maxIndex196 = 0 function initGlobals196() { } function main817() { initGlobals196(); init_test152(); } function config189() { } function init_test152() { local integer temp655 test_ar_478[5] = new_B156(); test_ar_478[6] = new_C858(); temp_655 = test_ar_478[6]; test_ar_478[6] = test_ar_478[5]; test_ar_478[5] = temp_655; if ((dispatch_I_test_I_foo187(test_ar_478[5]) == 3) and (dispatch_I_test_I_foo187(test_ar_478[6]) == 2)) { testSuccess194(); } else { }; } IS_NATIVE function testSuccess194() { } function new_B156() returns integer { local integer this160 local integer this580 if (I_firstFree_781 == 0) { if (I_maxIndex_196 < 32768) { I_maxIndex_196 = (I_maxIndex_196 + 1); this_580 = I_maxIndex_196; I_typeId_750[this_580] = 2; } else { error100("Out of memory: Could not create B."); this_580 = 0; }; } else { I_firstFree_781 = (I_firstFree_781 - 1); this_580 = I_nextFree_923[I_firstFree_781]; I_typeId_750[this_580] = 2; }; this_160 = this_580; return this_160; } function new_C858() returns integer { local integer this968 local integer this479 if (I_firstFree_781 == 0) { if (I_maxIndex_196 < 32768) { I_maxIndex_196 = (I_maxIndex_196 + 1); this_479 = I_maxIndex_196; I_typeId_750[this_479] = 3; } else { error100("Out of memory: Could not create C."); this_479 = 0; }; } else { I_firstFree_781 = (I_firstFree_781 - 1); this_479 = I_nextFree_923[I_firstFree_781]; I_typeId_750[this_479] = 3; }; this_968 = this_479; return this_968; } function error100(string msg875) { $debugPrint145((msg_875 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo187(integer this211) returns integer { local integer test_I_foo_result206 if (I_typeId_750[this_211] == 0) { if (this_211 == 0) { error100("Nullpointer exception when calling I.foo"); } else { error100("Called I.foo on invalid object."); }; } else { }; if (I_typeId_750[this_211] <= 2) { test_I_foo_result_206 = 2; } else { test_I_foo_result_206 = 3; }; return test_I_foo_result_206; }