array I_nextFree140 integer I_firstFree860 integer I_maxIndex957 array I_typeId148 integer I_firstFree860 = 0 integer I_maxIndex957 = 0 function initGlobals185() { } function main101() { initGlobals185(); init_test168(); } function config162() { } function init_test168() { local integer i1166 local integer i2443 i1_166 = new_B198(); i2_443 = new_C799(); if ((dispatch_I_test_I_foo549(i1_166) == 2) and (dispatch_I_test_I_foo549(i2_443) == 3)) { testSuccess835(); } else { }; } IS_NATIVE function testSuccess835() { } function new_B198() returns integer { local integer this188 if (I_firstFree_860 == 0) { if (I_maxIndex_957 < 32768) { I_maxIndex_957 = (I_maxIndex_957 + 1); this_188 = I_maxIndex_957; I_typeId_148[this_188] = 2; } else { error108("Out of memory: Could not create B."); this_188 = 0; }; } else { I_firstFree_860 = (I_firstFree_860 - 1); this_188 = I_nextFree_140[I_firstFree_860]; I_typeId_148[this_188] = 2; }; return this_188; } function new_C799() returns integer { local integer this317 if (I_firstFree_860 == 0) { if (I_maxIndex_957 < 32768) { I_maxIndex_957 = (I_maxIndex_957 + 1); this_317 = I_maxIndex_957; I_typeId_148[this_317] = 3; } else { error108("Out of memory: Could not create C."); this_317 = 0; }; } else { I_firstFree_860 = (I_firstFree_860 - 1); this_317 = I_nextFree_140[I_firstFree_860]; I_typeId_148[this_317] = 3; }; return this_317; } function error108(string msg937) { $debugPrint596((msg_937 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo549(integer this814) returns integer { if (I_typeId_148[this_814] == 0) { if (this_814 == 0) { error108("Nullpointer exception when calling I.foo"); } else { error108("Called I.foo on invalid object."); }; } else { }; if (I_typeId_148[this_814] <= 2) { this_814 = 2; } else { this_814 = 3; }; return this_814; }