array I_nextFree108 integer I_firstFree145 integer I_maxIndex154 array I_typeId127 integer I_firstFree145 = 0 integer I_maxIndex154 = 0 function initGlobals747() { } function main125() { initGlobals747(); init_test102(); } function config974() { } function init_test102() { local integer i1555 local integer i2370 i1_555 = new_B357(); i2_370 = new_C200(); if ((dispatch_I_test_I_foo151(i1_555) == 2) and (dispatch_I_test_I_foo151(i2_370) == 3)) { testSuccess144(); } else { }; } IS_NATIVE function testSuccess144() { } function new_B357() returns integer { local integer this186 if (I_firstFree_145 == 0) { if (I_maxIndex_154 < 32768) { I_maxIndex_154 = (I_maxIndex_154 + 1); this_186 = I_maxIndex_154; I_typeId_127[this_186] = 2; } else { error173("Out of memory: Could not create B."); this_186 = 0; }; } else { I_firstFree_145 = (I_firstFree_145 - 1); this_186 = I_nextFree_108[I_firstFree_145]; I_typeId_127[this_186] = 2; }; return this_186; } function new_C200() returns integer { local integer this178 if (I_firstFree_145 == 0) { if (I_maxIndex_154 < 32768) { I_maxIndex_154 = (I_maxIndex_154 + 1); this_178 = I_maxIndex_154; I_typeId_127[this_178] = 3; } else { error173("Out of memory: Could not create C."); this_178 = 0; }; } else { I_firstFree_145 = (I_firstFree_145 - 1); this_178 = I_nextFree_108[I_firstFree_145]; I_typeId_127[this_178] = 3; }; return this_178; } function error173(string msg812) { $debugPrint107((msg_812 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo151(integer this186) returns integer { if (I_typeId_127[this_186] == 0) { if (this_186 == 0) { error173("Nullpointer exception when calling I.foo"); } else { error173("Called I.foo on invalid object."); }; } else { }; if (I_typeId_127[this_186] <= 2) { this_186 = 2; } else { this_186 = 3; }; return this_186; }