array test_ar185 array I_nextFree152 integer I_firstFree284 integer I_maxIndex483 array I_typeId189 integer I_firstFree284 = 0 integer I_maxIndex483 = 0 function initGlobals436() { } function main980() { initGlobals436(); init_test643(); } function config519() { } function init_test643() { local integer temp131 test_ar_185[5] = new_B830(); test_ar_185[6] = new_C362(); temp_131 = test_ar_185[6]; test_ar_185[6] = test_ar_185[5]; test_ar_185[5] = temp_131; if ((dispatch_I_test_I_foo109(test_ar_185[5]) == 3) and (dispatch_I_test_I_foo109(test_ar_185[6]) == 2)) { testSuccess299(); } else { }; } IS_NATIVE function testSuccess299() { } function new_B830() returns integer { local integer this625 if (I_firstFree_284 == 0) { if (I_maxIndex_483 < 32768) { I_maxIndex_483 = (I_maxIndex_483 + 1); this_625 = I_maxIndex_483; I_typeId_189[this_625] = 2; } else { error891("Out of memory: Could not create B."); this_625 = 0; }; } else { I_firstFree_284 = (I_firstFree_284 - 1); this_625 = I_nextFree_152[I_firstFree_284]; I_typeId_189[this_625] = 2; }; return this_625; } function new_C362() returns integer { local integer this107 if (I_firstFree_284 == 0) { if (I_maxIndex_483 < 32768) { I_maxIndex_483 = (I_maxIndex_483 + 1); this_107 = I_maxIndex_483; I_typeId_189[this_107] = 3; } else { error891("Out of memory: Could not create C."); this_107 = 0; }; } else { I_firstFree_284 = (I_firstFree_284 - 1); this_107 = I_nextFree_152[I_firstFree_284]; I_typeId_189[this_107] = 3; }; return this_107; } function error891(string msg259) { $debugPrint165((msg_259 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo109(integer this191) returns integer { if (I_typeId_189[this_191] == 0) { if (this_191 == 0) { error891("Nullpointer exception when calling I.foo"); } else { error891("Called I.foo on invalid object."); }; } else { }; if (I_typeId_189[this_191] <= 2) { this_191 = 2; } else { this_191 = 3; }; return this_191; }