array I_nextFree169 integer I_firstFree183 integer I_maxIndex988 array I_typeId274 integer I_firstFree183 = 0 integer I_maxIndex988 = 0 function initGlobals209() { } function main170() { initGlobals209(); init_test769(); } function config164() { } function init_test769() { local integer i1124 local integer i2208 i1_124 = new_B824(); i2_208 = new_C243(); if ((dispatch_I_test_I_foo460(i1_124) == 2) and (dispatch_I_test_I_foo460(i2_208) == 3)) { testSuccess109(); } else { }; } IS_NATIVE function testSuccess109() { } function new_B824() returns integer { local integer this121 local integer this470 if (I_firstFree_183 == 0) { if (I_maxIndex_988 < 32768) { I_maxIndex_988 = (I_maxIndex_988 + 1); this_470 = I_maxIndex_988; I_typeId_274[this_470] = 2; } else { error183("Out of memory: Could not create B."); this_470 = 0; }; } else { I_firstFree_183 = (I_firstFree_183 - 1); this_470 = I_nextFree_169[I_firstFree_183]; I_typeId_274[this_470] = 2; }; this_121 = this_470; return this_121; } function new_C243() returns integer { local integer this127 local integer this163 if (I_firstFree_183 == 0) { if (I_maxIndex_988 < 32768) { I_maxIndex_988 = (I_maxIndex_988 + 1); this_163 = I_maxIndex_988; I_typeId_274[this_163] = 3; } else { error183("Out of memory: Could not create C."); this_163 = 0; }; } else { I_firstFree_183 = (I_firstFree_183 - 1); this_163 = I_nextFree_169[I_firstFree_183]; I_typeId_274[this_163] = 3; }; this_127 = this_163; return this_127; } function error183(string msg160) { $debugPrint456((msg_160 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo460(integer this194) returns integer { local integer test_I_foo_result939 if (I_typeId_274[this_194] == 0) { if (this_194 == 0) { error183("Nullpointer exception when calling I.foo"); } else { error183("Called I.foo on invalid object."); }; } else { }; if (I_typeId_274[this_194] <= 2) { test_I_foo_result_939 = 2; } else { test_I_foo_result_939 = 3; }; return test_I_foo_result_939; }