array Cell_nextFree426 integer Cell_firstFree357 integer Cell_maxIndex167 array Cell_typeId188 array Cell_elem214 integer blaFromIndex_return_z205 integer blaFromIndex_return_y700 integer Cell_firstFree357 = 0 integer Cell_maxIndex167 = 0 function initGlobals143() { } function main102() { initGlobals143(); init_test194(); } function config490() { } function init_test194() { local integer c118 c_118 = new_Cell154(); dispatch_Cell_test_Cell_set179(c_118, blaToIndex141(5, 3)); if ((blaFromIndex206(dispatch_Cell_test_Cell_get405(c_118)) == 5) and (blaFromIndex_return_y_700 == 2)) { testSuccess167(); } else { }; } function blaToIndex141(integer b_z232, integer b_y189) returns integer { return b_z_232; } function blaFromIndex206(integer i978) returns integer { blaFromIndex_return_z_205 = i_978; blaFromIndex_return_y_700 = 2; return blaFromIndex_return_z_205; } IS_NATIVE function testSuccess167() { } function Cell_set103(integer this748, any t720) { Cell_elem_214[this_748] = t_720; } function Cell_get183(integer this169) returns any { return Cell_elem_214[this_169]; } function Cell_init116(integer this131) { } function new_Cell154() returns integer { local integer this179 this_179 = alloc_Cell344(); construct_Cell167(this_179); return this_179; } function construct_Cell167(integer this143) { Cell_init116(this_143); } function alloc_Cell344() returns integer { local integer this138 if (Cell_firstFree_357 == 0) { if (Cell_maxIndex_167 < 32768) { Cell_maxIndex_167 = (Cell_maxIndex_167 + 1); this_138 = Cell_maxIndex_167; Cell_typeId_188[this_138] = 1; } else { error421("Out of memory: Could not create Cell."); this_138 = 0; }; } else { Cell_firstFree_357 = (Cell_firstFree_357 - 1); this_138 = Cell_nextFree_426[Cell_firstFree_357]; Cell_typeId_188[this_138] = 1; }; return this_138; } function error421(string msg423) { $debugPrint561((msg_423 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set179(integer this950, any t182) { if (Cell_typeId_188[this_950] == 0) { if (this_950 == 0) { error421("Nullpointer exception when calling Cell.set"); } else { error421("Called Cell.set on invalid object."); }; } else { }; Cell_set103(this_950, t_182); } function dispatch_Cell_test_Cell_get405(integer this112) returns any { if (Cell_typeId_188[this_112] == 0) { if (this_112 == 0) { error421("Nullpointer exception when calling Cell.get"); } else { error421("Called Cell.get on invalid object."); }; } else { }; return Cell_get183(this_112); }