array I_nextFree210 integer I_firstFree155 integer I_maxIndex596 array I_typeId607 integer I_firstFree155 = 0 integer I_maxIndex596 = 0 function initGlobals859() { I_firstFree_155 = 0; I_maxIndex_596 = 0; } function main126() { initGlobals859(); init_test179(); } function config592() { } function init_test179() { local integer b111 local integer c575 local integer d188 b_111 = new_B132(); c_575 = new_C123(); d_188 = new_D194(); if (((dispatch_B_test_B_foo342(b_111) == 2) and (dispatch_I_test_I_foo222(c_575) == 5)) and (dispatch_D_test_D_foo112(d_188) == 3)) { testSuccess210(); } else { }; } IS_NATIVE function testSuccess210() { } function B_foo191(integer this175) returns integer { return 2; } function B_init161(integer this482) { } function new_B132() returns integer { local integer this187 this_187 = alloc_B666(); construct_B109(this_187); return this_187; } function construct_B109(integer this202) { B_init161(this_202); } function C_init493(integer this822) { } function new_C123() returns integer { local integer this747 this_747 = alloc_C200(); construct_C124(this_747); return this_747; } function construct_C124(integer this439) { C_init493(this_439); } function D_foo198(integer this576) returns integer { return 3; } function D_init815(integer this160) { } function new_D194() returns integer { local integer this161 this_161 = alloc_D970(); construct_D170(this_161); return this_161; } function construct_D170(integer this186) { D_init815(this_186); } function I_foo153(integer this804) returns integer { return 5; } function alloc_B666() returns integer { local integer this105 if (I_firstFree_155 == 0) { if (I_maxIndex_596 < 32768) { I_maxIndex_596 = (I_maxIndex_596 + 1); this_105 = I_maxIndex_596; I_typeId_607[this_105] = 2; } else { error243("Out of memory: Could not create B."); this_105 = 0; }; } else { I_firstFree_155 = (I_firstFree_155 - 1); this_105 = I_nextFree_210[I_firstFree_155]; I_typeId_607[this_105] = 2; }; return this_105; } function error243(string msg709) { $debugPrint141((msg_709 + (" " + #getStackTrace()))); } function alloc_C200() returns integer { local integer this830 if (I_firstFree_155 == 0) { if (I_maxIndex_596 < 32768) { I_maxIndex_596 = (I_maxIndex_596 + 1); this_830 = I_maxIndex_596; I_typeId_607[this_830] = 3; } else { error243("Out of memory: Could not create C."); this_830 = 0; }; } else { I_firstFree_155 = (I_firstFree_155 - 1); this_830 = I_nextFree_210[I_firstFree_155]; I_typeId_607[this_830] = 3; }; return this_830; } function alloc_D970() returns integer { local integer this179 if (I_firstFree_155 == 0) { if (I_maxIndex_596 < 32768) { I_maxIndex_596 = (I_maxIndex_596 + 1); this_179 = I_maxIndex_596; I_typeId_607[this_179] = 4; } else { error243("Out of memory: Could not create D."); this_179 = 0; }; } else { I_firstFree_155 = (I_firstFree_155 - 1); this_179 = I_nextFree_210[I_firstFree_155]; I_typeId_607[this_179] = 4; }; return this_179; } function dispatch_B_test_B_foo342(integer this776) returns integer { local integer test_B_foo_result914 if (I_typeId_607[this_776] == 0) { if (this_776 == 0) { error243("Nullpointer exception when calling B.foo"); } else { error243("Called B.foo on invalid object."); }; } else { }; test_B_foo_result_914 = B_foo191(this_776); return test_B_foo_result_914; } function dispatch_D_test_D_foo112(integer this142) returns integer { local integer test_D_foo_result887 if (I_typeId_607[this_142] == 0) { if (this_142 == 0) { error243("Nullpointer exception when calling D.foo"); } else { error243("Called D.foo on invalid object."); }; } else { }; test_D_foo_result_887 = D_foo198(this_142); return test_D_foo_result_887; } function dispatch_I_test_I_foo222(integer this213) returns integer { local integer test_I_foo_result994 if (I_typeId_607[this_213] == 0) { if (this_213 == 0) { error243("Nullpointer exception when calling I.foo"); } else { error243("Called I.foo on invalid object."); }; } else { }; if (I_typeId_607[this_213] <= 2) { if (I_typeId_607[this_213] <= 1) { test_I_foo_result_994 = I_foo153(this_213); } else { test_I_foo_result_994 = B_foo191(this_213); }; } else { if (I_typeId_607[this_213] <= 3) { test_I_foo_result_994 = I_foo153(this_213); } else { test_I_foo_result_994 = D_foo198(this_213); }; }; return test_I_foo_result_994; }