array I_nextFree123 integer I_firstFree348 integer I_maxIndex202 array I_typeId181 integer I_firstFree348 = 0 integer I_maxIndex202 = 0 function initGlobals159() { } function main124() { initGlobals159(); init_test118(); } function config123() { } function init_test118() { local integer i1267 local integer i2663 i1_267 = new_B724(); i2_663 = new_C674(); if ((dispatch_I_test_I_foo119(i1_267) == 2) and (dispatch_I_test_I_foo119(i2_663) == 3)) { testSuccess175(); } else { }; } IS_NATIVE function testSuccess175() { } function new_B724() returns integer { local integer this699 local integer this195 if (I_firstFree_348 == 0) { if (I_maxIndex_202 < 32768) { I_maxIndex_202 = (I_maxIndex_202 + 1); this_195 = I_maxIndex_202; I_typeId_181[this_195] = 2; } else { error119("Out of memory: Could not create B."); this_195 = 0; }; } else { I_firstFree_348 = (I_firstFree_348 - 1); this_195 = I_nextFree_123[I_firstFree_348]; I_typeId_181[this_195] = 2; }; this_699 = this_195; return this_699; } function new_C674() returns integer { local integer this442 local integer this102 if (I_firstFree_348 == 0) { if (I_maxIndex_202 < 32768) { I_maxIndex_202 = (I_maxIndex_202 + 1); this_102 = I_maxIndex_202; I_typeId_181[this_102] = 3; } else { error119("Out of memory: Could not create C."); this_102 = 0; }; } else { I_firstFree_348 = (I_firstFree_348 - 1); this_102 = I_nextFree_123[I_firstFree_348]; I_typeId_181[this_102] = 3; }; this_442 = this_102; return this_442; } function error119(string msg107) { $debugPrint102((msg_107 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo119(integer this190) returns integer { local integer test_I_foo_result763 if (I_typeId_181[this_190] == 0) { if (this_190 == 0) { error119("Nullpointer exception when calling I.foo"); } else { error119("Called I.foo on invalid object."); }; } else { }; if (I_typeId_181[this_190] <= 2) { test_I_foo_result_763 = 2; } else { test_I_foo_result_763 = 3; }; return test_I_foo_result_763; }