array F_nextFree163 integer F_firstFree199 integer F_maxIndex188 array F_typeId144 array Cell_nextFree258 integer Cell_firstFree877 integer Cell_maxIndex116 array Cell_typeId756 array Cell_elem162 integer F_firstFree199 = 0 integer F_maxIndex188 = 0 integer Cell_firstFree877 = 0 integer Cell_maxIndex116 = 0 function initGlobals198() { } function main129() { initGlobals198(); init_test145(); } function config159() { } function init_test145() { local integer a692 local integer b143 local integer clVar733 local integer temp100 local integer this135 local integer this476 local integer f224 local integer test_Cell_map_result127 local integer this140 local integer f140 local real this403 local real expected173 local integer i210 local integer this141 local any test_Cell_get_result108 local integer this125 a_692 = new_Cell893(5); temp_100 = a_692; if (F_firstFree_199 == 0) { if (F_maxIndex_188 < 32768) { F_maxIndex_188 = (F_maxIndex_188 + 1); this_135 = F_maxIndex_188; F_typeId_144[this_135] = 3; } else { error657("Out of memory: Could not create F_map_test."); this_135 = 0; }; } else { F_firstFree_199 = (F_firstFree_199 - 1); this_135 = F_nextFree_163[F_firstFree_199]; F_typeId_144[this_135] = 3; }; clVar_733 = this_135; this_476 = temp_100; f_224 = clVar_733; if (Cell_typeId_756[this_476] == 0) { if (this_476 == 0) { error657("Nullpointer exception when calling Cell.map"); } else { error657("Called Cell.map on invalid object."); }; } else { }; this_140 = this_476; f_140 = f_224; test_Cell_map_result_127 = new_Cell893(dispatch_F_test_F_apply474(f_140, Cell_elem_162[this_140])); b_143 = test_Cell_map_result_127; this_141 = b_143; if (Cell_typeId_756[this_141] == 0) { if (this_141 == 0) { error657("Nullpointer exception when calling Cell.get"); } else { error657("Called Cell.get on invalid object."); }; } else { }; this_125 = this_141; test_Cell_get_result_108 = Cell_elem_162[this_125]; i_210 = test_Cell_get_result_108; this_403 = (i_210 / 1000.); expected_173 = 50.; if (this_403 == expected_173) { testSuccess336(); } else { println205(R2S151(this_403)); }; } IS_NATIVE IS_EXTERN @extern function R2I475(real r170) returns integer { } IS_NATIVE function testSuccess336() { } IS_NATIVE IS_EXTERN @extern function R2S151(real r128) returns string { } IS_NATIVE function println205(string s179) { } function new_Cell893(any t103) returns integer { local integer this192 local integer this130 local integer this211 local any t110 if (Cell_firstFree_877 == 0) { if (Cell_maxIndex_116 < 32768) { Cell_maxIndex_116 = (Cell_maxIndex_116 + 1); this_130 = Cell_maxIndex_116; Cell_typeId_756[this_130] = 1; } else { error657("Out of memory: Could not create Cell."); this_130 = 0; }; } else { Cell_firstFree_877 = (Cell_firstFree_877 - 1); this_130 = Cell_nextFree_258[Cell_firstFree_877]; Cell_typeId_756[this_130] = 1; }; this_192 = this_130; this_211 = this_192; t_110 = t_103; Cell_elem_162[this_211] = t_110; return this_192; } function error657(string msg123) { $debugPrint172((msg_123 + (" " + #getStackTrace()))); } function dispatch_F_test_F_apply474(integer this988, any a554) returns any { local any test_F_apply_result139 local any a146 local real r762 local integer i854 if (F_typeId_144[this_988] == 0) { if (this_988 == 0) { error657("Nullpointer exception when calling F.apply"); } else { error657("Called F.apply on invalid object."); }; } else { }; a_146 = a_554; i_854 = a_146; r_762 = (i_854 * 10.); test_F_apply_result_139 = R2I475((r_762 * 1000.)); return test_F_apply_result_139; }