array I_nextFree138 integer I_firstFree955 integer I_maxIndex104 array I_typeId225 integer I_firstFree955 = 0 integer I_maxIndex104 = 0 function initGlobals156() { } function main542() { initGlobals156(); init_test769(); } function config124() { } function init_test769() { local integer i1226 i1_226 = new_B803(); if ((dispatch_I_test_I_foo190(new_C769()) == 3) and (dispatch_I_test_I_foo190(i1_226) == 2)) { testSuccess200(); } else { }; } IS_NATIVE function testSuccess200() { } function B_foo205(integer this128) returns integer { return 2; } function B_init124(integer this123) { } function new_B803() returns integer { local integer this167 this_167 = alloc_B261(); construct_B487(this_167); return this_167; } function construct_B487(integer this600) { B_init124(this_600); } function C_foo173(integer this183) returns integer { return 3; } function C_init918(integer this422) { } function new_C769() returns integer { local integer this137 this_137 = alloc_C742(); construct_C128(this_137); return this_137; } function construct_C128(integer this105) { C_init918(this_105); } function alloc_B261() returns integer { local integer this541 if (I_firstFree_955 == 0) { if (I_maxIndex_104 < 32768) { I_maxIndex_104 = (I_maxIndex_104 + 1); this_541 = I_maxIndex_104; I_typeId_225[this_541] = 2; } else { error158("Out of memory: Could not create B."); this_541 = 0; }; } else { I_firstFree_955 = (I_firstFree_955 - 1); this_541 = I_nextFree_138[I_firstFree_955]; I_typeId_225[this_541] = 2; }; return this_541; } function error158(string msg684) { $debugPrint332((msg_684 + (" " + #getStackTrace()))); } function alloc_C742() returns integer { local integer this346 if (I_firstFree_955 == 0) { if (I_maxIndex_104 < 32768) { I_maxIndex_104 = (I_maxIndex_104 + 1); this_346 = I_maxIndex_104; I_typeId_225[this_346] = 3; } else { error158("Out of memory: Could not create C."); this_346 = 0; }; } else { I_firstFree_955 = (I_firstFree_955 - 1); this_346 = I_nextFree_138[I_firstFree_955]; I_typeId_225[this_346] = 3; }; return this_346; } function dispatch_I_test_I_foo190(integer this122) returns integer { if (I_typeId_225[this_122] == 0) { if (this_122 == 0) { error158("Nullpointer exception when calling I.foo"); } else { error158("Called I.foo on invalid object."); }; } else { }; if (I_typeId_225[this_122] <= 2) { this_122 = B_foo205(this_122); } else { this_122 = C_foo173(this_122); }; return this_122; }