array F_nextFree846 integer F_firstFree713 integer F_maxIndex187 array F_typeId116 array Cell_nextFree937 integer Cell_firstFree184 integer Cell_maxIndex241 array Cell_typeId631 array Cell_elem902 integer F_firstFree713 = 0 integer F_maxIndex187 = 0 integer Cell_firstFree184 = 0 integer Cell_maxIndex241 = 0 function initGlobals868() { } function main768() { initGlobals868(); init_test382(); } function config890() { } function init_test382() { local integer a928 local integer b110 local integer clVar136 local integer temp117 local integer this692 local integer this983 local integer f170 local integer test_Cell_map_result143 local integer this170 local integer f151 local real this181 local real expected178 local integer i733 local integer this128 local any test_Cell_get_result116 local integer this179 a_928 = new_Cell769(5); temp_117 = a_928; if (F_firstFree_713 == 0) { if (F_maxIndex_187 < 32768) { F_maxIndex_187 = (F_maxIndex_187 + 1); this_692 = F_maxIndex_187; F_typeId_116[this_692] = 3; } else { error114("Out of memory: Could not create F_map_test."); this_692 = 0; }; } else { F_firstFree_713 = (F_firstFree_713 - 1); this_692 = F_nextFree_846[F_firstFree_713]; F_typeId_116[this_692] = 3; }; clVar_136 = this_692; this_983 = temp_117; f_170 = clVar_136; if (Cell_typeId_631[this_983] == 0) { if (this_983 == 0) { error114("Nullpointer exception when calling Cell.map"); } else { error114("Called Cell.map on invalid object."); }; } else { }; this_170 = this_983; f_151 = f_170; test_Cell_map_result_143 = new_Cell769(dispatch_F_test_F_apply673(f_151, Cell_elem_902[this_170])); b_110 = test_Cell_map_result_143; this_128 = b_110; if (Cell_typeId_631[this_128] == 0) { if (this_128 == 0) { error114("Nullpointer exception when calling Cell.get"); } else { error114("Called Cell.get on invalid object."); }; } else { }; this_179 = this_128; test_Cell_get_result_116 = Cell_elem_902[this_179]; i_733 = test_Cell_get_result_116; this_181 = (i_733 / 1000.); expected_178 = 50.; if (this_181 == expected_178) { testSuccess109(); } else { println188(R2S253(this_181)); }; } IS_NATIVE IS_EXTERN @extern function R2I251(real r145) returns integer { } IS_NATIVE function testSuccess109() { } IS_NATIVE IS_EXTERN @extern function R2S253(real r204) returns string { } IS_NATIVE function println188(string s649) { } function new_Cell769(any t174) returns integer { local integer this288 local integer this117 local integer this481 local any t182 if (Cell_firstFree_184 == 0) { if (Cell_maxIndex_241 < 32768) { Cell_maxIndex_241 = (Cell_maxIndex_241 + 1); this_117 = Cell_maxIndex_241; Cell_typeId_631[this_117] = 1; } else { error114("Out of memory: Could not create Cell."); this_117 = 0; }; } else { Cell_firstFree_184 = (Cell_firstFree_184 - 1); this_117 = Cell_nextFree_937[Cell_firstFree_184]; Cell_typeId_631[this_117] = 1; }; this_288 = this_117; this_481 = this_288; t_182 = t_174; Cell_elem_902[this_481] = t_182; return this_288; } function error114(string msg373) { $debugPrint617((msg_373 + (" " + #getStackTrace()))); } function dispatch_F_test_F_apply673(integer this336, any a151) returns any { local any test_F_apply_result205 local any a506 local real r531 local integer i205 if (F_typeId_116[this_336] == 0) { if (this_336 == 0) { error114("Nullpointer exception when calling F.apply"); } else { error114("Called F.apply on invalid object."); }; } else { }; a_506 = a_151; i_205 = a_506; r_531 = (i_205 * 10.); test_F_apply_result_205 = R2I251((r_531 * 1000.)); return test_F_apply_result_205; }