array I_nextFree172 integer I_firstFree156 integer I_maxIndex107 array I_typeId118 integer I_firstFree156 = 0 integer I_maxIndex107 = 0 function initGlobals128() { } function main158() { initGlobals128(); init_test106(); } function config184() { } function init_test106() { local integer i1142 local integer i2908 local integer temp208 i1_142 = new_B190(); i2_908 = new_C909(); temp_208 = i2_908; i2_908 = i1_142; i1_142 = temp_208; if ((dispatch_I_test_I_foo422(i1_142) == 3) and (dispatch_I_test_I_foo422(i2_908) == 2)) { testSuccess186(); } else { }; } IS_NATIVE function testSuccess186() { } function new_B190() returns integer { local integer this184 local integer this246 if (I_firstFree_156 == 0) { if (I_maxIndex_107 < 32768) { I_maxIndex_107 = (I_maxIndex_107 + 1); this_246 = I_maxIndex_107; I_typeId_118[this_246] = 2; } else { error835("Out of memory: Could not create B."); this_246 = 0; }; } else { I_firstFree_156 = (I_firstFree_156 - 1); this_246 = I_nextFree_172[I_firstFree_156]; I_typeId_118[this_246] = 2; }; this_184 = this_246; return this_184; } function new_C909() returns integer { local integer this729 local integer this117 if (I_firstFree_156 == 0) { if (I_maxIndex_107 < 32768) { I_maxIndex_107 = (I_maxIndex_107 + 1); this_117 = I_maxIndex_107; I_typeId_118[this_117] = 3; } else { error835("Out of memory: Could not create C."); this_117 = 0; }; } else { I_firstFree_156 = (I_firstFree_156 - 1); this_117 = I_nextFree_172[I_firstFree_156]; I_typeId_118[this_117] = 3; }; this_729 = this_117; return this_729; } function error835(string msg210) { $debugPrint938((msg_210 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo422(integer this110) returns integer { local integer test_I_foo_result550 if (I_typeId_118[this_110] == 0) { if (this_110 == 0) { error835("Nullpointer exception when calling I.foo"); } else { error835("Called I.foo on invalid object."); }; } else { }; if (I_typeId_118[this_110] <= 2) { test_I_foo_result_550 = 2; } else { test_I_foo_result_550 = 3; }; return test_I_foo_result_550; }