array test_ar413 array I_nextFree109 integer I_firstFree114 integer I_maxIndex113 array I_typeId182 integer I_firstFree114 = 0 integer I_maxIndex113 = 0 function initGlobals137() { I_firstFree_114 = 0; I_maxIndex_113 = 0; } function main192() { initGlobals137(); init_test117(); } function config213() { } function init_test117() { local integer temp760 test_ar_413[5] = new_B199(); test_ar_413[6] = new_C920(); temp_760 = test_ar_413[6]; test_ar_413[6] = test_ar_413[5]; test_ar_413[5] = temp_760; if ((dispatch_I_test_I_foo261(test_ar_413[5]) == 3) and (dispatch_I_test_I_foo261(test_ar_413[6]) == 2)) { testSuccess619(); } else { }; } IS_NATIVE function testSuccess619() { } function B_foo101(integer this121) returns integer { return 2; } function B_init181(integer this857) { } function new_B199() returns integer { local integer this976 this_976 = alloc_B559(); construct_B322(this_976); return this_976; } function construct_B322(integer this133) { B_init181(this_133); } function C_foo163(integer this633) returns integer { return 3; } function C_init865(integer this763) { } function new_C920() returns integer { local integer this167 this_167 = alloc_C244(); construct_C197(this_167); return this_167; } function construct_C197(integer this145) { C_init865(this_145); } function alloc_B559() returns integer { local integer this530 if (I_firstFree_114 == 0) { if (I_maxIndex_113 < 32768) { I_maxIndex_113 = (I_maxIndex_113 + 1); this_530 = I_maxIndex_113; I_typeId_182[this_530] = 2; } else { error212("Out of memory: Could not create B."); this_530 = 0; }; } else { I_firstFree_114 = (I_firstFree_114 - 1); this_530 = I_nextFree_109[I_firstFree_114]; I_typeId_182[this_530] = 2; }; return this_530; } function error212(string msg299) { $debugPrint180((msg_299 + (" " + #getStackTrace()))); } function alloc_C244() returns integer { local integer this129 if (I_firstFree_114 == 0) { if (I_maxIndex_113 < 32768) { I_maxIndex_113 = (I_maxIndex_113 + 1); this_129 = I_maxIndex_113; I_typeId_182[this_129] = 3; } else { error212("Out of memory: Could not create C."); this_129 = 0; }; } else { I_firstFree_114 = (I_firstFree_114 - 1); this_129 = I_nextFree_109[I_firstFree_114]; I_typeId_182[this_129] = 3; }; return this_129; } function dispatch_I_test_I_foo261(integer this172) returns integer { local integer test_I_foo_result944 if (I_typeId_182[this_172] == 0) { if (this_172 == 0) { error212("Nullpointer exception when calling I.foo"); } else { error212("Called I.foo on invalid object."); }; } else { }; if (I_typeId_182[this_172] <= 2) { test_I_foo_result_944 = B_foo101(this_172); } else { test_I_foo_result_944 = C_foo163(this_172); }; return test_I_foo_result_944; }