array I_nextFree120 integer I_firstFree136 integer I_maxIndex715 array I_typeId606 integer I_firstFree136 = 0 integer I_maxIndex715 = 0 function initGlobals800() { } function main420() { initGlobals800(); init_test248(); } function config154() { } function init_test248() { local integer i1746 local integer i2157 local integer i1847 local integer i2668 i1_746 = new_B167(); i2_157 = new_C146(); i1_847 = i1_746; i2_668 = i2_157; if ((dispatch_I_test_I_foo194(i1_847) == 2) and (dispatch_I_test_I_foo194(i2_668) == 3)) { testSuccess201(); } else { }; } IS_NATIVE function testSuccess201() { } function new_B167() returns integer { local integer this881 local integer this686 if (I_firstFree_136 == 0) { if (I_maxIndex_715 < 32768) { I_maxIndex_715 = (I_maxIndex_715 + 1); this_686 = I_maxIndex_715; I_typeId_606[this_686] = 2; } else { error128("Out of memory: Could not create B."); this_686 = 0; }; } else { I_firstFree_136 = (I_firstFree_136 - 1); this_686 = I_nextFree_120[I_firstFree_136]; I_typeId_606[this_686] = 2; }; this_881 = this_686; return this_881; } function new_C146() returns integer { local integer this178 local integer this175 if (I_firstFree_136 == 0) { if (I_maxIndex_715 < 32768) { I_maxIndex_715 = (I_maxIndex_715 + 1); this_175 = I_maxIndex_715; I_typeId_606[this_175] = 3; } else { error128("Out of memory: Could not create C."); this_175 = 0; }; } else { I_firstFree_136 = (I_firstFree_136 - 1); this_175 = I_nextFree_120[I_firstFree_136]; I_typeId_606[this_175] = 3; }; this_178 = this_175; return this_178; } function error128(string msg177) { $debugPrint186((msg_177 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo194(integer this203) returns integer { local integer test_I_foo_result138 if (I_typeId_606[this_203] == 0) { if (this_203 == 0) { error128("Nullpointer exception when calling I.foo"); } else { error128("Called I.foo on invalid object."); }; } else { }; if (I_typeId_606[this_203] <= 2) { test_I_foo_result_138 = 2; } else { test_I_foo_result_138 = 3; }; return test_I_foo_result_138; }