array test_ar128 array I_nextFree168 integer I_firstFree896 integer I_maxIndex402 array I_typeId883 integer I_firstFree896 = 0 integer I_maxIndex402 = 0 function initGlobals200() { } function main633() { initGlobals200(); init_test121(); } function config136() { } function init_test121() { local integer temp168 test_ar_128[5] = new_B124(); test_ar_128[6] = new_C134(); temp_168 = test_ar_128[6]; test_ar_128[6] = test_ar_128[5]; test_ar_128[5] = temp_168; if ((dispatch_I_test_I_foo842(test_ar_128[5]) == 3) and (dispatch_I_test_I_foo842(test_ar_128[6]) == 2)) { testSuccess166(); } else { }; } IS_NATIVE function testSuccess166() { } function new_B124() returns integer { local integer this835 if (I_firstFree_896 == 0) { if (I_maxIndex_402 < 32768) { I_maxIndex_402 = (I_maxIndex_402 + 1); this_835 = I_maxIndex_402; I_typeId_883[this_835] = 2; } else { error581("Out of memory: Could not create B."); this_835 = 0; }; } else { I_firstFree_896 = (I_firstFree_896 - 1); this_835 = I_nextFree_168[I_firstFree_896]; I_typeId_883[this_835] = 2; }; return this_835; } function new_C134() returns integer { local integer this104 if (I_firstFree_896 == 0) { if (I_maxIndex_402 < 32768) { I_maxIndex_402 = (I_maxIndex_402 + 1); this_104 = I_maxIndex_402; I_typeId_883[this_104] = 3; } else { error581("Out of memory: Could not create C."); this_104 = 0; }; } else { I_firstFree_896 = (I_firstFree_896 - 1); this_104 = I_nextFree_168[I_firstFree_896]; I_typeId_883[this_104] = 3; }; return this_104; } function error581(string msg413) { $debugPrint133((msg_413 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo842(integer this123) returns integer { if (I_typeId_883[this_123] == 0) { if (this_123 == 0) { error581("Nullpointer exception when calling I.foo"); } else { error581("Called I.foo on invalid object."); }; } else { }; if (I_typeId_883[this_123] <= 2) { this_123 = 2; } else { this_123 = 3; }; return this_123; }