array A_nextFree136 integer A_firstFree452 integer A_maxIndex706 array A_typeId266 array Cell_nextFree141 integer Cell_firstFree148 integer Cell_maxIndex117 array Cell_o102 integer A_firstFree452 = 0 integer A_maxIndex706 = 0 integer Cell_firstFree148 = 0 integer Cell_maxIndex117 = 0 function initGlobals191() { } function main124() { initGlobals191(); init_Test141(); } function config187() { } function init_Test141() { local integer c862 c_862 = new_Cell108(); Cell_o_102[c_862] = new_B652(); if (dispatch_A_Test_A_foo188(Cell_o_102[c_862]) == 6) { testSuccess710(); } else { }; } IS_NATIVE function testSuccess710() { } function new_B652() returns integer { local integer this132 local integer this210 if (A_firstFree_452 == 0) { if (A_maxIndex_706 < 32768) { A_maxIndex_706 = (A_maxIndex_706 + 1); this_210 = A_maxIndex_706; A_typeId_266[this_210] = 2; } else { error998("Out of memory: Could not create B."); this_210 = 0; }; } else { A_firstFree_452 = (A_firstFree_452 - 1); this_210 = A_nextFree_136[A_firstFree_452]; A_typeId_266[this_210] = 2; }; this_132 = this_210; return this_132; } function new_Cell108() returns integer { local integer this122 local integer this487 if (Cell_firstFree_148 == 0) { if (Cell_maxIndex_117 < 32768) { Cell_maxIndex_117 = (Cell_maxIndex_117 + 1); this_487 = Cell_maxIndex_117; } else { error998("Out of memory: Could not create Cell."); this_487 = 0; }; } else { Cell_firstFree_148 = (Cell_firstFree_148 - 1); this_487 = Cell_nextFree_141[Cell_firstFree_148]; }; this_122 = this_487; return this_122; } function error998(string msg350) { $debugPrint695((msg_350 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_foo188(integer this467) returns integer { local integer Test_A_foo_result898 if (A_typeId_266[this_467] == 0) { if (this_467 == 0) { error998("Nullpointer exception when calling A.foo"); } else { error998("Called A.foo on invalid object."); }; } else { }; if (A_typeId_266[this_467] <= 1) { Test_A_foo_result_898 = 5; } else { Test_A_foo_result_898 = 6; }; return Test_A_foo_result_898; }