array I_nextFree447 integer I_firstFree127 integer I_maxIndex162 array I_typeId591 integer I_firstFree127 = 0 integer I_maxIndex162 = 0 function initGlobals391() { I_firstFree_127 = 0; I_maxIndex_162 = 0; } function main120() { initGlobals391(); init_test164(); } function config110() { } function init_test164() { local integer i1209 local integer i2897 i1_209 = new_B294(); i2_897 = new_C206(); test834(i1_209, i2_897); } function test834(integer i1111, integer i2103) { if ((dispatch_I_test_I_foo133(i1_111) == 2) and (dispatch_I_test_I_foo133(i2_103) == 3)) { testSuccess743(); } else { }; } IS_NATIVE function testSuccess743() { } function B_foo201(integer this261) returns integer { return 2; } function B_init193(integer this157) { } function new_B294() returns integer { local integer this888 this_888 = alloc_B812(); construct_B136(this_888); return this_888; } function construct_B136(integer this813) { B_init193(this_813); } function C_foo269(integer this185) returns integer { return 3; } function C_init179(integer this119) { } function new_C206() returns integer { local integer this131 this_131 = alloc_C207(); construct_C261(this_131); return this_131; } function construct_C261(integer this161) { C_init179(this_161); } function alloc_B812() returns integer { local integer this162 if (I_firstFree_127 == 0) { if (I_maxIndex_162 < 32768) { I_maxIndex_162 = (I_maxIndex_162 + 1); this_162 = I_maxIndex_162; I_typeId_591[this_162] = 2; } else { error146("Out of memory: Could not create B."); this_162 = 0; }; } else { I_firstFree_127 = (I_firstFree_127 - 1); this_162 = I_nextFree_447[I_firstFree_127]; I_typeId_591[this_162] = 2; }; return this_162; } function error146(string msg122) { $debugPrint260((msg_122 + (" " + #getStackTrace()))); } function alloc_C207() returns integer { local integer this229 if (I_firstFree_127 == 0) { if (I_maxIndex_162 < 32768) { I_maxIndex_162 = (I_maxIndex_162 + 1); this_229 = I_maxIndex_162; I_typeId_591[this_229] = 3; } else { error146("Out of memory: Could not create C."); this_229 = 0; }; } else { I_firstFree_127 = (I_firstFree_127 - 1); this_229 = I_nextFree_447[I_firstFree_127]; I_typeId_591[this_229] = 3; }; return this_229; } function dispatch_I_test_I_foo133(integer this328) returns integer { local integer test_I_foo_result122 if (I_typeId_591[this_328] == 0) { if (this_328 == 0) { error146("Nullpointer exception when calling I.foo"); } else { error146("Called I.foo on invalid object."); }; } else { }; if (I_typeId_591[this_328] <= 2) { test_I_foo_result_122 = B_foo201(this_328); } else { test_I_foo_result_122 = C_foo269(this_328); }; return test_I_foo_result_122; }