array Cell_nextFree112 integer Cell_firstFree950 integer Cell_maxIndex182 array Cell_typeId102 array Cell_elem232 integer blaFromIndex_return_z650 integer blaFromIndex_return_y187 integer Cell_firstFree950 = 0 integer Cell_maxIndex182 = 0 function initGlobals748() { Cell_firstFree_950 = 0; Cell_maxIndex_182 = 0; } function main167() { initGlobals748(); init_test720(); } function config188() { } function init_test720() { local integer c214 c_214 = new_Cell169(); dispatch_Cell_test_Cell_set189(c_214, blaToIndex131(5, 3)); if ((blaFromIndex179(dispatch_Cell_test_Cell_get205(c_214)) == 5) and (blaFromIndex_return_y_187 == 2)) { testSuccess143(); } else { }; } function blaToIndex131(integer b_z740, integer b_y964) returns integer { return b_z_740; } function blaFromIndex179(integer i168) returns integer { blaFromIndex_return_z_650 = i_168; blaFromIndex_return_y_187 = 2; return blaFromIndex_return_z_650; } IS_NATIVE function testSuccess143() { } function Cell_set339(integer this150, any t138) { Cell_elem_232[this_150] = t_138; } function Cell_get619(integer this421) returns any { return Cell_elem_232[this_421]; } function Cell_init209(integer this423) { } function new_Cell169() returns integer { local integer this561 this_561 = alloc_Cell700(); construct_Cell291(this_561); return this_561; } function construct_Cell291(integer this432) { Cell_init209(this_432); } function alloc_Cell700() returns integer { local integer this943 if (Cell_firstFree_950 == 0) { if (Cell_maxIndex_182 < 32768) { Cell_maxIndex_182 = (Cell_maxIndex_182 + 1); this_943 = Cell_maxIndex_182; Cell_typeId_102[this_943] = 1; } else { error133("Out of memory: Could not create Cell."); this_943 = 0; }; } else { Cell_firstFree_950 = (Cell_firstFree_950 - 1); this_943 = Cell_nextFree_112[Cell_firstFree_950]; Cell_typeId_102[this_943] = 1; }; return this_943; } function error133(string msg102) { $debugPrint169((msg_102 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set189(integer this179, any t678) { if (Cell_typeId_102[this_179] == 0) { if (this_179 == 0) { error133("Nullpointer exception when calling Cell.set"); } else { error133("Called Cell.set on invalid object."); }; } else { }; Cell_set339(this_179, t_678); } function dispatch_Cell_test_Cell_get205(integer this116) returns any { local any test_Cell_get_result420 if (Cell_typeId_102[this_116] == 0) { if (this_116 == 0) { error133("Nullpointer exception when calling Cell.get"); } else { error133("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_420 = Cell_get619(this_116); return test_Cell_get_result_420; }