array Cell_nextFree171 integer Cell_firstFree845 integer Cell_maxIndex159 array Cell_typeId950 array Cell_elem615 integer blaFromIndex_return_z129 integer blaFromIndex_return_y156 integer Cell_firstFree845 = 0 integer Cell_maxIndex159 = 0 function initGlobals206() { Cell_firstFree_845 = 0; Cell_maxIndex_159 = 0; } function main279() { initGlobals206(); init_test150(); } function config634() { } function init_test150() { local integer c549 c_549 = new_Cell145(); dispatch_Cell_test_Cell_set112(c_549, blaToIndex765(5, 3)); dispatch_Cell_test_Cell_set112(c_549, dispatch_Cell_test_Cell_get179(c_549)); if ((blaFromIndex159(dispatch_Cell_test_Cell_get179(c_549)) == 5) and (blaFromIndex_return_y_156 == 2)) { testSuccess126(); } else { }; } function blaToIndex765(integer b_z947, integer b_y635) returns integer { return b_z_947; } function blaFromIndex159(integer i162) returns integer { blaFromIndex_return_z_129 = i_162; blaFromIndex_return_y_156 = 2; return blaFromIndex_return_z_129; } IS_NATIVE function testSuccess126() { } function Cell_set182(integer this637, any t780) { Cell_elem_615[this_637] = t_780; } function Cell_get537(integer this413) returns any { return Cell_elem_615[this_413]; } function Cell_init454(integer this747) { } function new_Cell145() returns integer { local integer this116 this_116 = alloc_Cell467(); construct_Cell611(this_116); return this_116; } function construct_Cell611(integer this117) { Cell_init454(this_117); } function alloc_Cell467() returns integer { local integer this807 if (Cell_firstFree_845 == 0) { if (Cell_maxIndex_159 < 32768) { Cell_maxIndex_159 = (Cell_maxIndex_159 + 1); this_807 = Cell_maxIndex_159; Cell_typeId_950[this_807] = 1; } else { error986("Out of memory: Could not create Cell."); this_807 = 0; }; } else { Cell_firstFree_845 = (Cell_firstFree_845 - 1); this_807 = Cell_nextFree_171[Cell_firstFree_845]; Cell_typeId_950[this_807] = 1; }; return this_807; } function error986(string msg136) { $debugPrint845((msg_136 + (" " + #getStackTrace()))); } function dispatch_Cell_test_Cell_set112(integer this754, any t152) { if (Cell_typeId_950[this_754] == 0) { if (this_754 == 0) { error986("Nullpointer exception when calling Cell.set"); } else { error986("Called Cell.set on invalid object."); }; } else { }; Cell_set182(this_754, t_152); } function dispatch_Cell_test_Cell_get179(integer this414) returns any { local any test_Cell_get_result189 if (Cell_typeId_950[this_414] == 0) { if (this_414 == 0) { error986("Nullpointer exception when calling Cell.get"); } else { error986("Called Cell.get on invalid object."); }; } else { }; test_Cell_get_result_189 = Cell_get537(this_414); return test_Cell_get_result_189; }