array test_ar129 array I_nextFree198 integer I_firstFree128 integer I_maxIndex633 array I_typeId136 integer I_firstFree128 = 0 integer I_maxIndex633 = 0 function initGlobals637() { } function main563() { initGlobals637(); init_test135(); } function config167() { } function init_test135() { local integer temp112 test_ar_129[5] = new_B483(); test_ar_129[6] = new_C830(); temp_112 = test_ar_129[6]; test_ar_129[6] = test_ar_129[5]; test_ar_129[5] = temp_112; if ((dispatch_I_test_I_foo168(test_ar_129[5]) == 3) and (dispatch_I_test_I_foo168(test_ar_129[6]) == 2)) { testSuccess464(); } else { }; } IS_NATIVE function testSuccess464() { } function B_foo202(integer this145) returns integer { return 2; } function B_init157(integer this668) { } function new_B483() returns integer { local integer this986 this_986 = alloc_B205(); construct_B955(this_986); return this_986; } function construct_B955(integer this893) { B_init157(this_893); } function C_foo167(integer this122) returns integer { return 3; } function C_init111(integer this121) { } function new_C830() returns integer { local integer this124 this_124 = alloc_C193(); construct_C759(this_124); return this_124; } function construct_C759(integer this134) { C_init111(this_134); } function alloc_B205() returns integer { local integer this565 if (I_firstFree_128 == 0) { if (I_maxIndex_633 < 32768) { I_maxIndex_633 = (I_maxIndex_633 + 1); this_565 = I_maxIndex_633; I_typeId_136[this_565] = 2; } else { error399("Out of memory: Could not create B."); this_565 = 0; }; } else { I_firstFree_128 = (I_firstFree_128 - 1); this_565 = I_nextFree_198[I_firstFree_128]; I_typeId_136[this_565] = 2; }; return this_565; } function error399(string msg239) { $debugPrint888((msg_239 + (" " + #getStackTrace()))); } function alloc_C193() returns integer { local integer this825 if (I_firstFree_128 == 0) { if (I_maxIndex_633 < 32768) { I_maxIndex_633 = (I_maxIndex_633 + 1); this_825 = I_maxIndex_633; I_typeId_136[this_825] = 3; } else { error399("Out of memory: Could not create C."); this_825 = 0; }; } else { I_firstFree_128 = (I_firstFree_128 - 1); this_825 = I_nextFree_198[I_firstFree_128]; I_typeId_136[this_825] = 3; }; return this_825; } function dispatch_I_test_I_foo168(integer this151) returns integer { if (I_typeId_136[this_151] == 0) { if (this_151 == 0) { error399("Nullpointer exception when calling I.foo"); } else { error399("Called I.foo on invalid object."); }; } else { }; if (I_typeId_136[this_151] <= 2) { this_151 = B_foo202(this_151); } else { this_151 = C_foo167(this_151); }; return this_151; }