array I_nextFree804 integer I_firstFree712 integer I_maxIndex615 array I_typeId194 integer I_firstFree712 = 0 integer I_maxIndex615 = 0 function initGlobals205() { } function main182() { initGlobals205(); init_test906(); } function config856() { } function init_test906() { local integer i1140 local integer i2198 i1_140 = new_B205(); i2_198 = new_C848(); if ((dispatch_I_test_I_foo142(i1_140) == 2) and (dispatch_I_test_I_foo142(i2_198) == 3)) { testSuccess677(); } else { }; } IS_NATIVE function testSuccess677() { } function new_B205() returns integer { local integer this314 if (I_firstFree_712 == 0) { if (I_maxIndex_615 < 32768) { I_maxIndex_615 = (I_maxIndex_615 + 1); this_314 = I_maxIndex_615; I_typeId_194[this_314] = 2; } else { error192("Out of memory: Could not create B."); this_314 = 0; }; } else { I_firstFree_712 = (I_firstFree_712 - 1); this_314 = I_nextFree_804[I_firstFree_712]; I_typeId_194[this_314] = 2; }; return this_314; } function new_C848() returns integer { local integer this981 if (I_firstFree_712 == 0) { if (I_maxIndex_615 < 32768) { I_maxIndex_615 = (I_maxIndex_615 + 1); this_981 = I_maxIndex_615; I_typeId_194[this_981] = 3; } else { error192("Out of memory: Could not create C."); this_981 = 0; }; } else { I_firstFree_712 = (I_firstFree_712 - 1); this_981 = I_nextFree_804[I_firstFree_712]; I_typeId_194[this_981] = 3; }; return this_981; } function error192(string msg113) { $debugPrint764((msg_113 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo142(integer this210) returns integer { if (I_typeId_194[this_210] == 0) { if (this_210 == 0) { error192("Nullpointer exception when calling I.foo"); } else { error192("Called I.foo on invalid object."); }; } else { }; if (I_typeId_194[this_210] <= 2) { this_210 = 2; } else { this_210 = 3; }; return this_210; }