array A_nextFree177 integer A_firstFree208 integer A_maxIndex260 array A_typeId163 array Cell_nextFree552 integer Cell_firstFree165 integer Cell_maxIndex126 array Cell_o184 integer A_firstFree208 = 0 integer A_maxIndex260 = 0 integer Cell_firstFree165 = 0 integer Cell_maxIndex126 = 0 function initGlobals868() { A_firstFree_208 = 0; A_maxIndex_260 = 0; Cell_firstFree_165 = 0; Cell_maxIndex_126 = 0; } function main751() { initGlobals868(); init_Test715(); } function config156() { } function init_Test715() { local integer c137 c_137 = new_Cell140(); Cell_o_184[c_137] = new_B160(); if (dispatch_A_Test_A_foo245(Cell_o_184[c_137]) == 6) { testSuccess118(); } else { }; } IS_NATIVE function testSuccess118() { } function A_foo183(integer this991) returns integer { return 5; } function A_init168(integer this143) { } function construct_A160(integer this128) { A_init168(this_128); } function B_foo963(integer this276) returns integer { return 6; } function B_init974(integer this177) { } function new_B160() returns integer { local integer this601 this_601 = alloc_B192(); construct_B457(this_601); return this_601; } function construct_B457(integer this559) { construct_A160(this_559); B_init974(this_559); } function Cell_init187(integer this141) { } function new_Cell140() returns integer { local integer this199 this_199 = alloc_Cell355(); construct_Cell403(this_199); return this_199; } function construct_Cell403(integer this203) { Cell_init187(this_203); } function error435(string msg115) { $debugPrint105((msg_115 + (" " + #getStackTrace()))); } function alloc_B192() returns integer { local integer this202 if (A_firstFree_208 == 0) { if (A_maxIndex_260 < 32768) { A_maxIndex_260 = (A_maxIndex_260 + 1); this_202 = A_maxIndex_260; A_typeId_163[this_202] = 2; } else { error435("Out of memory: Could not create B."); this_202 = 0; }; } else { A_firstFree_208 = (A_firstFree_208 - 1); this_202 = A_nextFree_177[A_firstFree_208]; A_typeId_163[this_202] = 2; }; return this_202; } function alloc_Cell355() returns integer { local integer this602 if (Cell_firstFree_165 == 0) { if (Cell_maxIndex_126 < 32768) { Cell_maxIndex_126 = (Cell_maxIndex_126 + 1); this_602 = Cell_maxIndex_126; } else { error435("Out of memory: Could not create Cell."); this_602 = 0; }; } else { Cell_firstFree_165 = (Cell_firstFree_165 - 1); this_602 = Cell_nextFree_552[Cell_firstFree_165]; }; return this_602; } function dispatch_A_Test_A_foo245(integer this666) returns integer { local integer Test_A_foo_result544 if (A_typeId_163[this_666] == 0) { if (this_666 == 0) { error435("Nullpointer exception when calling A.foo"); } else { error435("Called A.foo on invalid object."); }; } else { }; if (A_typeId_163[this_666] <= 1) { Test_A_foo_result_544 = A_foo183(this_666); } else { Test_A_foo_result_544 = B_foo963(this_666); }; return Test_A_foo_result_544; }