array I_nextFree102 integer I_firstFree139 integer I_maxIndex161 array I_typeId155 integer I_firstFree139 = 0 integer I_maxIndex161 = 0 function initGlobals141() { } function main192() { initGlobals141(); init_test802(); } function config101() { } function init_test802() { local integer i1181 local integer i2341 local integer temp195 i1_181 = new_B351(); i2_341 = new_C124(); temp_195 = i2_341; i2_341 = i1_181; i1_181 = temp_195; if ((dispatch_I_test_I_foo168(i1_181) == 3) and (dispatch_I_test_I_foo168(i2_341) == 2)) { testSuccess548(); } else { }; } IS_NATIVE function testSuccess548() { } function new_B351() returns integer { local integer this159 local integer this186 if (I_firstFree_139 == 0) { if (I_maxIndex_161 < 32768) { I_maxIndex_161 = (I_maxIndex_161 + 1); this_186 = I_maxIndex_161; I_typeId_155[this_186] = 2; } else { error681("Out of memory: Could not create B."); this_186 = 0; }; } else { I_firstFree_139 = (I_firstFree_139 - 1); this_186 = I_nextFree_102[I_firstFree_139]; I_typeId_155[this_186] = 2; }; this_159 = this_186; return this_159; } function new_C124() returns integer { local integer this767 local integer this554 if (I_firstFree_139 == 0) { if (I_maxIndex_161 < 32768) { I_maxIndex_161 = (I_maxIndex_161 + 1); this_554 = I_maxIndex_161; I_typeId_155[this_554] = 3; } else { error681("Out of memory: Could not create C."); this_554 = 0; }; } else { I_firstFree_139 = (I_firstFree_139 - 1); this_554 = I_nextFree_102[I_firstFree_139]; I_typeId_155[this_554] = 3; }; this_767 = this_554; return this_767; } function error681(string msg351) { $debugPrint213((msg_351 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo168(integer this162) returns integer { local integer test_I_foo_result114 if (I_typeId_155[this_162] == 0) { if (this_162 == 0) { error681("Nullpointer exception when calling I.foo"); } else { error681("Called I.foo on invalid object."); }; } else { }; if (I_typeId_155[this_162] <= 2) { test_I_foo_result_114 = 2; } else { test_I_foo_result_114 = 3; }; return test_I_foo_result_114; }