array I_nextFree171 integer I_firstFree658 integer I_maxIndex501 array I_typeId753 integer I_firstFree658 = 0 integer I_maxIndex501 = 0 function initGlobals925() { } function main104() { initGlobals925(); init_test177(); } function config807() { } function init_test177() { local integer i1104 local integer i2174 local integer i1171 local integer i2312 i1_104 = new_B151(); i2_174 = new_C393(); i1_171 = i1_104; i2_312 = i2_174; if ((dispatch_I_test_I_foo154(i1_171) == 2) and (dispatch_I_test_I_foo154(i2_312) == 3)) { testSuccess293(); } else { }; } IS_NATIVE function testSuccess293() { } function new_B151() returns integer { local integer this248 local integer this119 if (I_firstFree_658 == 0) { if (I_maxIndex_501 < 32768) { I_maxIndex_501 = (I_maxIndex_501 + 1); this_119 = I_maxIndex_501; I_typeId_753[this_119] = 2; } else { error147("Out of memory: Could not create B."); this_119 = 0; }; } else { I_firstFree_658 = (I_firstFree_658 - 1); this_119 = I_nextFree_171[I_firstFree_658]; I_typeId_753[this_119] = 2; }; this_248 = this_119; return this_248; } function new_C393() returns integer { local integer this193 local integer this502 if (I_firstFree_658 == 0) { if (I_maxIndex_501 < 32768) { I_maxIndex_501 = (I_maxIndex_501 + 1); this_502 = I_maxIndex_501; I_typeId_753[this_502] = 3; } else { error147("Out of memory: Could not create C."); this_502 = 0; }; } else { I_firstFree_658 = (I_firstFree_658 - 1); this_502 = I_nextFree_171[I_firstFree_658]; I_typeId_753[this_502] = 3; }; this_193 = this_502; return this_193; } function error147(string msg212) { $debugPrint203((msg_212 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo154(integer this157) returns integer { local integer test_I_foo_result149 if (I_typeId_753[this_157] == 0) { if (this_157 == 0) { error147("Nullpointer exception when calling I.foo"); } else { error147("Called I.foo on invalid object."); }; } else { }; if (I_typeId_753[this_157] <= 2) { test_I_foo_result_149 = 2; } else { test_I_foo_result_149 = 3; }; return test_I_foo_result_149; }