array I_nextFree680 integer I_firstFree887 integer I_maxIndex445 array I_typeId508 integer I_firstFree887 = 0 integer I_maxIndex445 = 0 function initGlobals180() { } function main131() { initGlobals180(); init_test165(); } function config172() { } function init_test165() { local integer i1170 local integer i2971 local integer i1189 local integer i2670 i1_170 = new_B212(); i2_971 = new_C155(); i1_189 = i1_170; i2_670 = i2_971; if ((dispatch_I_test_I_foo709(i1_189) == 2) and (dispatch_I_test_I_foo709(i2_670) == 3)) { testSuccess109(); } else { }; } IS_NATIVE function testSuccess109() { } function new_B212() returns integer { local integer this154 local integer this131 if (I_firstFree_887 == 0) { if (I_maxIndex_445 < 32768) { I_maxIndex_445 = (I_maxIndex_445 + 1); this_131 = I_maxIndex_445; I_typeId_508[this_131] = 2; } else { error145("Out of memory: Could not create B."); this_131 = 0; }; } else { I_firstFree_887 = (I_firstFree_887 - 1); this_131 = I_nextFree_680[I_firstFree_887]; I_typeId_508[this_131] = 2; }; this_154 = this_131; return this_154; } function new_C155() returns integer { local integer this200 local integer this970 if (I_firstFree_887 == 0) { if (I_maxIndex_445 < 32768) { I_maxIndex_445 = (I_maxIndex_445 + 1); this_970 = I_maxIndex_445; I_typeId_508[this_970] = 3; } else { error145("Out of memory: Could not create C."); this_970 = 0; }; } else { I_firstFree_887 = (I_firstFree_887 - 1); this_970 = I_nextFree_680[I_firstFree_887]; I_typeId_508[this_970] = 3; }; this_200 = this_970; return this_200; } function error145(string msg743) { $debugPrint203((msg_743 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo709(integer this262) returns integer { local integer test_I_foo_result974 if (I_typeId_508[this_262] == 0) { if (this_262 == 0) { error145("Nullpointer exception when calling I.foo"); } else { error145("Called I.foo on invalid object."); }; } else { }; if (I_typeId_508[this_262] <= 2) { test_I_foo_result_974 = 2; } else { test_I_foo_result_974 = 3; }; return test_I_foo_result_974; }