array Cell_nextFree141 integer Cell_firstFree649 integer Cell_maxIndex139 array Cell_typeId181 array Cell_elem696 integer blaFromIndex_return_z583 integer blaFromIndex_return_y251 integer Cell_firstFree649 = 0 integer Cell_maxIndex139 = 0 function initGlobals140() { Cell_firstFree_649 = 0; Cell_maxIndex_139 = 0; } function main149() { initGlobals140(); init_test774(); } function config707() { } function init_test774() { local integer c167 c_167 = new_Cell949(); dispatch_Cell_test_Cell_set461(c_167, blaToIndex722(5, 3)); dispatch_Cell_test_Cell_set461(c_167, dispatch_Cell_test_Cell_get194(c_167)); if ((blaFromIndex165(dispatch_Cell_test_Cell_get194(c_167)) == 5) and (blaFromIndex_return_y_251 == 2)) { testSuccess162(); } else { }; } function blaToIndex722(integer b_z364, integer b_y184) returns integer { return b_z_364; } function blaFromIndex165(integer i566) returns integer { blaFromIndex_return_z_583 = i_566; blaFromIndex_return_y_251 = 2; return blaFromIndex_return_z_583; } IS_NATIVE function testSuccess162() { } function Cell_set120(integer this131, any t604) { Cell_elem_696[this_131] = t_604; } function Cell_get428(integer this153) returns any { return Cell_elem_696[this_153]; } function Cell_init197(integer this690) { } function new_Cell949() returns integer { local integer this117 this_117 = alloc_Cell672(); construct_Cell570(this_117); return this_117; } function construct_Cell570(integer this823) { Cell_init197(this_823); } function alloc_Cell672() returns integer { local integer this139 if (Cell_firstFree_649 == 0) { if (Cell_maxIndex_139 < 32768) { Cell_maxIndex_139 = (Cell_maxIndex_139 + 1); this_139 = Cell_maxIndex_139; Cell_typeId_181[this_139] = 1; } else { error193("Out of memory: Could not create Cell."); this_139 = 0; }; } else { Cell_firstFree_649 = (Cell_firstFree_649 - 1); this_139 = Cell_nextFree_141[Cell_firstFree_649]; Cell_typeId_181[this_139] = 1; }; return this_139; } function error193(string msg759) { $debugPrint188((msg_759 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set461(integer this107, any t614) { if (Cell_typeId_181[this_107] == 0) { if (this_107 == 0) { error193("Nullpointer exception when calling Cell.set"); } else { error193("Called Cell.set on invalid object."); }; } else { }; Cell_set120(this_107, t_614); } function dispatch_Cell_test_Cell_get194(integer this417) returns any { local any test_Cell_get_result960 if (Cell_typeId_181[this_417] == 0) { if (this_417 == 0) { error193("Nullpointer exception when calling Cell.get"); } else { error193("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_960 = Cell_get428(this_417); return test_Cell_get_result_960; }