array A_nextFree208 integer A_firstFree768 integer A_maxIndex771 array A_typeId172 array Cell_nextFree144 integer Cell_firstFree124 integer Cell_maxIndex149 array Cell_o199 integer A_firstFree768 = 0 integer A_maxIndex771 = 0 integer Cell_firstFree124 = 0 integer Cell_maxIndex149 = 0 function initGlobals118() { } function main416() { initGlobals118(); init_Test150(); } function config845() { } function init_Test150() { local integer c105 c_105 = new_Cell898(); Cell_o_199[c_105] = new_B168(); if (dispatch_A_Test_A_foo107(Cell_o_199[c_105]) == 6) { testSuccess810(); } else { }; } IS_NATIVE function testSuccess810() { } function new_B168() returns integer { local integer this196 local integer this656 if (A_firstFree_768 == 0) { if (A_maxIndex_771 < 32768) { A_maxIndex_771 = (A_maxIndex_771 + 1); this_656 = A_maxIndex_771; A_typeId_172[this_656] = 2; } else { error796("Out of memory: Could not create B."); this_656 = 0; }; } else { A_firstFree_768 = (A_firstFree_768 - 1); this_656 = A_nextFree_208[A_firstFree_768]; A_typeId_172[this_656] = 2; }; this_196 = this_656; return this_196; } function new_Cell898() returns integer { local integer this950 local integer this509 if (Cell_firstFree_124 == 0) { if (Cell_maxIndex_149 < 32768) { Cell_maxIndex_149 = (Cell_maxIndex_149 + 1); this_509 = Cell_maxIndex_149; } else { error796("Out of memory: Could not create Cell."); this_509 = 0; }; } else { Cell_firstFree_124 = (Cell_firstFree_124 - 1); this_509 = Cell_nextFree_144[Cell_firstFree_124]; }; this_950 = this_509; return this_950; } function error796(string msg924) { $debugPrint206((msg_924 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_foo107(integer this114) returns integer { local integer Test_A_foo_result162 if (A_typeId_172[this_114] == 0) { if (this_114 == 0) { error796("Nullpointer exception when calling A.foo"); } else { error796("Called A.foo on invalid object."); }; } else { }; if (A_typeId_172[this_114] <= 1) { Test_A_foo_result_162 = 5; } else { Test_A_foo_result_162 = 6; }; return Test_A_foo_result_162; }