array A_nextFree825 integer A_firstFree197 integer A_maxIndex177 array A_typeId179 array Cell_nextFree792 integer Cell_firstFree124 integer Cell_maxIndex236 array Cell_o159 integer A_firstFree197 = 0 integer A_maxIndex177 = 0 integer Cell_firstFree124 = 0 integer Cell_maxIndex236 = 0 function initGlobals157() { } function main100() { initGlobals157(); init_Test903(); } function config192() { } function init_Test903() { local integer c182 c_182 = new_Cell175(); Cell_o_159[c_182] = new_B124(); if (dispatch_A_Test_A_foo133(Cell_o_159[c_182]) == 6) { testSuccess887(); } else { }; } IS_NATIVE function testSuccess887() { } function new_B124() returns integer { local integer this125 if (A_firstFree_197 == 0) { if (A_maxIndex_177 < 32768) { A_maxIndex_177 = (A_maxIndex_177 + 1); this_125 = A_maxIndex_177; A_typeId_179[this_125] = 2; } else { error150("Out of memory: Could not create B."); this_125 = 0; }; } else { A_firstFree_197 = (A_firstFree_197 - 1); this_125 = A_nextFree_825[A_firstFree_197]; A_typeId_179[this_125] = 2; }; return this_125; } function new_Cell175() returns integer { local integer this114 if (Cell_firstFree_124 == 0) { if (Cell_maxIndex_236 < 32768) { Cell_maxIndex_236 = (Cell_maxIndex_236 + 1); this_114 = Cell_maxIndex_236; } else { error150("Out of memory: Could not create Cell."); this_114 = 0; }; } else { Cell_firstFree_124 = (Cell_firstFree_124 - 1); this_114 = Cell_nextFree_792[Cell_firstFree_124]; }; return this_114; } function error150(string msg109) { $debugPrint324((msg_109 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_foo133(integer this153) returns integer { if (A_typeId_179[this_153] == 0) { if (this_153 == 0) { error150("Nullpointer exception when calling A.foo"); } else { error150("Called A.foo on invalid object."); }; } else { }; if (A_typeId_179[this_153] <= 1) { this_153 = 5; } else { this_153 = 6; }; return this_153; }