array Cell_nextFree152 integer Cell_firstFree157 integer Cell_maxIndex101 array Cell_typeId130 array Cell_elem115 integer blaFromIndex_return_z119 integer blaFromIndex_return_y703 integer Cell_firstFree157 = 0 integer Cell_maxIndex101 = 0 function initGlobals163() { Cell_firstFree_157 = 0; Cell_maxIndex_101 = 0; } function main131() { initGlobals163(); init_test535(); } function config152() { } function init_test535() { local integer c147 c_147 = new_Cell992(); dispatch_Cell_test_Cell_set151(c_147, blaToIndex171(5, 3)); if ((blaFromIndex110(dispatch_Cell_test_Cell_get453(c_147)) == 5) and (blaFromIndex_return_y_703 == 2)) { testSuccess209(); } else { }; } function blaToIndex171(integer b_z495, integer b_y140) returns integer { return b_z_495; } function blaFromIndex110(integer i604) returns integer { blaFromIndex_return_z_119 = i_604; blaFromIndex_return_y_703 = 2; return blaFromIndex_return_z_119; } IS_NATIVE function testSuccess209() { } function Cell_set976(integer this171, any t125) { Cell_elem_115[this_171] = t_125; } function Cell_get785(integer this137) returns any { return Cell_elem_115[this_137]; } function Cell_init168(integer this156) { } function new_Cell992() returns integer { local integer this266 this_266 = alloc_Cell116(); construct_Cell993(this_266); return this_266; } function construct_Cell993(integer this288) { Cell_init168(this_288); } function alloc_Cell116() returns integer { local integer this114 if (Cell_firstFree_157 == 0) { if (Cell_maxIndex_101 < 32768) { Cell_maxIndex_101 = (Cell_maxIndex_101 + 1); this_114 = Cell_maxIndex_101; Cell_typeId_130[this_114] = 1; } else { error871("Out of memory: Could not create Cell."); this_114 = 0; }; } else { Cell_firstFree_157 = (Cell_firstFree_157 - 1); this_114 = Cell_nextFree_152[Cell_firstFree_157]; Cell_typeId_130[this_114] = 1; }; return this_114; } function error871(string msg129) { $debugPrint595((msg_129 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set151(integer this182, any t448) { if (Cell_typeId_130[this_182] == 0) { if (this_182 == 0) { error871("Nullpointer exception when calling Cell.set"); } else { error871("Called Cell.set on invalid object."); }; } else { }; Cell_set976(this_182, t_448); } function dispatch_Cell_test_Cell_get453(integer this253) returns any { local any test_Cell_get_result618 if (Cell_typeId_130[this_253] == 0) { if (this_253 == 0) { error871("Nullpointer exception when calling Cell.get"); } else { error871("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_618 = Cell_get785(this_253); return test_Cell_get_result_618; }