array A_nextFree626 integer A_firstFree502 integer A_maxIndex100 array A_typeId751 array B_nextFree206 integer B_firstFree377 integer B_maxIndex120 array B_typeId807 integer A_firstFree502 = 0 integer A_maxIndex100 = 0 integer B_firstFree377 = 0 integer B_maxIndex120 = 0 function initGlobals104() { A_firstFree_502 = 0; A_maxIndex_100 = 0; B_firstFree_377 = 0; B_maxIndex_120 = 0; } function main106() { initGlobals104(); init_test141(); } function config201() { } function init_test141() { local integer b851 b_851 = dispatch_A_test_A_getB210(new_A732()); if (dispatch_B_test_A_B_foo738(b_851) == 4) { testSuccess942(); } else { }; } IS_NATIVE function testSuccess942() { } function A_getB194(integer this427) returns integer { return new_B115(); } function A_init988(integer this117) { } function new_A732() returns integer { local integer this202 this_202 = alloc_A181(); construct_A148(this_202); return this_202; } function construct_A148(integer this980) { A_init988(this_980); } function new_B115() returns integer { local integer this379 this_379 = alloc_B448(); construct_B189(this_379); return this_379; } function B_foo179(integer this102) returns integer { return 4; } function B_init861(integer this139) { } function construct_B189(integer this184) { B_init861(this_184); } function alloc_A181() returns integer { local integer this463 if (A_firstFree_502 == 0) { if (A_maxIndex_100 < 32768) { A_maxIndex_100 = (A_maxIndex_100 + 1); this_463 = A_maxIndex_100; A_typeId_751[this_463] = 1; } else { error139("Out of memory: Could not create A."); this_463 = 0; }; } else { A_firstFree_502 = (A_firstFree_502 - 1); this_463 = A_nextFree_626[A_firstFree_502]; A_typeId_751[this_463] = 1; }; return this_463; } function error139(string msg919) { $debugPrint153((msg_919 + (" " + #getStackTrace()))); } function alloc_B448() returns integer { local integer this196 if (B_firstFree_377 == 0) { if (B_maxIndex_120 < 32768) { B_maxIndex_120 = (B_maxIndex_120 + 1); this_196 = B_maxIndex_120; B_typeId_807[this_196] = 2; } else { error139("Out of memory: Could not create B."); this_196 = 0; }; } else { B_firstFree_377 = (B_firstFree_377 - 1); this_196 = B_nextFree_206[B_firstFree_377]; B_typeId_807[this_196] = 2; }; return this_196; } function dispatch_A_test_A_getB210(integer this173) returns integer { local integer test_A_getB_result117 if (A_typeId_751[this_173] == 0) { if (this_173 == 0) { error139("Nullpointer exception when calling A.getB"); } else { error139("Called A.getB on invalid object."); }; } else { }; test_A_getB_result_117 = A_getB194(this_173); return test_A_getB_result_117; } function dispatch_B_test_A_B_foo738(integer this960) returns integer { local integer test_A_B_foo_result600 if (B_typeId_807[this_960] == 0) { if (this_960 == 0) { error139("Nullpointer exception when calling B.foo"); } else { error139("Called B.foo on invalid object."); }; } else { }; test_A_B_foo_result_600 = B_foo179(this_960); return test_A_B_foo_result_600; }