array F_nextFree849 integer F_firstFree171 integer F_maxIndex335 array F_typeId304 array Cell_nextFree152 integer Cell_firstFree289 integer Cell_maxIndex810 array Cell_typeId602 array Cell_elem201 integer F_firstFree171 = 0 integer F_maxIndex335 = 0 integer Cell_firstFree289 = 0 integer Cell_maxIndex810 = 0 function initGlobals110() { } function main134() { initGlobals110(); init_test992(); } function config710() { } function init_test992() { local integer a202 local integer b178 local integer clVar215 local integer temp443 local integer this111 local integer this162 local integer f410 local integer test_Cell_map_result151 local integer this198 local integer f110 local real this143 local real expected159 local integer i201 local integer this206 local any test_Cell_get_result406 local integer this975 a_202 = new_Cell145(5); temp_443 = a_202; if (F_firstFree_171 == 0) { if (F_maxIndex_335 < 32768) { F_maxIndex_335 = (F_maxIndex_335 + 1); this_111 = F_maxIndex_335; F_typeId_304[this_111] = 3; } else { error578("Out of memory: Could not create F_map_test."); this_111 = 0; }; } else { F_firstFree_171 = (F_firstFree_171 - 1); this_111 = F_nextFree_849[F_firstFree_171]; F_typeId_304[this_111] = 3; }; clVar_215 = this_111; this_162 = temp_443; f_410 = clVar_215; if (Cell_typeId_602[this_162] == 0) { if (this_162 == 0) { error578("Nullpointer exception when calling Cell.map"); } else { error578("Called Cell.map on invalid object."); }; } else { }; this_198 = this_162; f_110 = f_410; test_Cell_map_result_151 = new_Cell145(dispatch_F_test_F_apply167(f_110, Cell_elem_201[this_198])); b_178 = test_Cell_map_result_151; this_206 = b_178; if (Cell_typeId_602[this_206] == 0) { if (this_206 == 0) { error578("Nullpointer exception when calling Cell.get"); } else { error578("Called Cell.get on invalid object."); }; } else { }; this_975 = this_206; test_Cell_get_result_406 = Cell_elem_201[this_975]; i_201 = test_Cell_get_result_406; this_143 = (i_201 / 1000.); expected_159 = 50.; if (this_143 == expected_159) { testSuccess122(); } else { println177(R2S996(this_143)); }; } IS_NATIVE IS_EXTERN @extern function R2I749(real r189) returns integer { } IS_NATIVE function testSuccess122() { } IS_NATIVE IS_EXTERN @extern function R2S996(real r662) returns string { } IS_NATIVE function println177(string s353) { } function new_Cell145(any t156) returns integer { local integer this171 local integer this174 local integer this167 local any t868 if (Cell_firstFree_289 == 0) { if (Cell_maxIndex_810 < 32768) { Cell_maxIndex_810 = (Cell_maxIndex_810 + 1); this_174 = Cell_maxIndex_810; Cell_typeId_602[this_174] = 1; } else { error578("Out of memory: Could not create Cell."); this_174 = 0; }; } else { Cell_firstFree_289 = (Cell_firstFree_289 - 1); this_174 = Cell_nextFree_152[Cell_firstFree_289]; Cell_typeId_602[this_174] = 1; }; this_171 = this_174; this_167 = this_171; t_868 = t_156; Cell_elem_201[this_167] = t_868; return this_171; } function error578(string msg222) { $debugPrint123((msg_222 + (" " + #getStackTrace()))); } function dispatch_F_test_F_apply167(integer this538, any a111) returns any { local any test_F_apply_result143 local any a204 local real r458 local integer i357 if (F_typeId_304[this_538] == 0) { if (this_538 == 0) { error578("Nullpointer exception when calling F.apply"); } else { error578("Called F.apply on invalid object."); }; } else { }; a_204 = a_111; i_357 = a_204; r_458 = (i_357 * 10.); test_F_apply_result_143 = R2I749((r_458 * 1000.)); return test_F_apply_result_143; }