array I_nextFree127 integer I_firstFree113 integer I_maxIndex180 array I_typeId130 integer I_firstFree113 = 0 integer I_maxIndex180 = 0 function initGlobals159() { } function main536() { initGlobals159(); init_test155(); } function config900() { } function init_test155() { local integer i1113 local integer i2943 i1_113 = new_B211(); i2_943 = new_C110(); if ((dispatch_I_test_I_foo638(i1_113) == 2) and (dispatch_I_test_I_foo638(i2_943) == 3)) { testSuccess580(); } else { }; } IS_NATIVE function testSuccess580() { } function new_B211() returns integer { local integer this114 local integer this951 if (I_firstFree_113 == 0) { if (I_maxIndex_180 < 32768) { I_maxIndex_180 = (I_maxIndex_180 + 1); this_951 = I_maxIndex_180; I_typeId_130[this_951] = 2; } else { error140("Out of memory: Could not create B."); this_951 = 0; }; } else { I_firstFree_113 = (I_firstFree_113 - 1); this_951 = I_nextFree_127[I_firstFree_113]; I_typeId_130[this_951] = 2; }; this_114 = this_951; return this_114; } function new_C110() returns integer { local integer this638 local integer this182 if (I_firstFree_113 == 0) { if (I_maxIndex_180 < 32768) { I_maxIndex_180 = (I_maxIndex_180 + 1); this_182 = I_maxIndex_180; I_typeId_130[this_182] = 3; } else { error140("Out of memory: Could not create C."); this_182 = 0; }; } else { I_firstFree_113 = (I_firstFree_113 - 1); this_182 = I_nextFree_127[I_firstFree_113]; I_typeId_130[this_182] = 3; }; this_638 = this_182; return this_638; } function error140(string msg274) { $debugPrint123((msg_274 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo638(integer this356) returns integer { local integer test_I_foo_result130 if (I_typeId_130[this_356] == 0) { if (this_356 == 0) { error140("Nullpointer exception when calling I.foo"); } else { error140("Called I.foo on invalid object."); }; } else { }; if (I_typeId_130[this_356] <= 2) { test_I_foo_result_130 = 2; } else { test_I_foo_result_130 = 3; }; return test_I_foo_result_130; }