array I_nextFree193 integer I_firstFree319 integer I_maxIndex841 array I_typeId103 integer I_firstFree319 = 0 integer I_maxIndex841 = 0 function initGlobals100() { } function main394() { initGlobals100(); init_test175(); } function config484() { } function init_test175() { local integer i1639 local integer i2235 i1_639 = new_B644(); i2_235 = new_C189(); if ((dispatch_I_test_I_foo741(i1_639) == 2) and (dispatch_I_test_I_foo741(i2_235) == 3)) { testSuccess133(); } else { }; } IS_NATIVE function testSuccess133() { } function new_B644() returns integer { local integer this125 local integer this477 if (I_firstFree_319 == 0) { if (I_maxIndex_841 < 32768) { I_maxIndex_841 = (I_maxIndex_841 + 1); this_477 = I_maxIndex_841; I_typeId_103[this_477] = 2; } else { error117("Out of memory: Could not create B."); this_477 = 0; }; } else { I_firstFree_319 = (I_firstFree_319 - 1); this_477 = I_nextFree_193[I_firstFree_319]; I_typeId_103[this_477] = 2; }; this_125 = this_477; return this_125; } function new_C189() returns integer { local integer this689 local integer this417 if (I_firstFree_319 == 0) { if (I_maxIndex_841 < 32768) { I_maxIndex_841 = (I_maxIndex_841 + 1); this_417 = I_maxIndex_841; I_typeId_103[this_417] = 3; } else { error117("Out of memory: Could not create C."); this_417 = 0; }; } else { I_firstFree_319 = (I_firstFree_319 - 1); this_417 = I_nextFree_193[I_firstFree_319]; I_typeId_103[this_417] = 3; }; this_689 = this_417; return this_689; } function error117(string msg132) { $debugPrint141((msg_132 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo741(integer this125) returns integer { local integer test_I_foo_result213 if (I_typeId_103[this_125] == 0) { if (this_125 == 0) { error117("Nullpointer exception when calling I.foo"); } else { error117("Called I.foo on invalid object."); }; } else { }; if (I_typeId_103[this_125] <= 2) { test_I_foo_result_213 = 2; } else { test_I_foo_result_213 = 3; }; return test_I_foo_result_213; }