array I_nextFree145 integer I_firstFree762 integer I_maxIndex429 array I_typeId142 integer I_firstFree762 = 0 integer I_maxIndex429 = 0 function initGlobals169() { } function main505() { initGlobals169(); init_test186(); } function config240() { } function init_test186() { local integer i1954 local integer i2857 i1_954 = new_B111(); i2_857 = new_C120(); if ((dispatch_I_test_I_foo250(i1_954) == 2) and (dispatch_I_test_I_foo250(i2_857) == 3)) { testSuccess188(); } else { }; } IS_NATIVE function testSuccess188() { } function new_B111() returns integer { local integer this103 if (I_firstFree_762 == 0) { if (I_maxIndex_429 < 32768) { I_maxIndex_429 = (I_maxIndex_429 + 1); this_103 = I_maxIndex_429; I_typeId_142[this_103] = 2; } else { error139("Out of memory: Could not create B."); this_103 = 0; }; } else { I_firstFree_762 = (I_firstFree_762 - 1); this_103 = I_nextFree_145[I_firstFree_762]; I_typeId_142[this_103] = 2; }; return this_103; } function new_C120() returns integer { local integer this836 if (I_firstFree_762 == 0) { if (I_maxIndex_429 < 32768) { I_maxIndex_429 = (I_maxIndex_429 + 1); this_836 = I_maxIndex_429; I_typeId_142[this_836] = 3; } else { error139("Out of memory: Could not create C."); this_836 = 0; }; } else { I_firstFree_762 = (I_firstFree_762 - 1); this_836 = I_nextFree_145[I_firstFree_762]; I_typeId_142[this_836] = 3; }; return this_836; } function error139(string msg553) { $debugPrint170((msg_553 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo250(integer this116) returns integer { if (I_typeId_142[this_116] == 0) { if (this_116 == 0) { error139("Nullpointer exception when calling I.foo"); } else { error139("Called I.foo on invalid object."); }; } else { }; if (I_typeId_142[this_116] <= 2) { this_116 = 2; } else { this_116 = 3; }; return this_116; }