array A_nextFree191 integer A_firstFree246 integer A_maxIndex155 array A_foo_0582 array A_foo_1195 array A_foo_2114 array A_foo_3548 array A_foo_4593 integer A_firstFree246 = 0 integer A_maxIndex155 = 0 function initGlobals953() { A_firstFree_246 = 0; A_maxIndex_155 = 0; } function main179() { initGlobals953(); init_test153(); } function config204() { } function init_test153() { local integer a647 a_647 = new_A860(); A_foo_set112(a_647, 3, 6); if (A_foo_get130(a_647, 3) == 6) { testSuccess196(); } else { }; } IS_NATIVE function testSuccess196() { } function A_init202(integer this133) { } function new_A860() returns integer { local integer this128 this_128 = alloc_A120(); construct_A984(this_128); return this_128; } function construct_A984(integer this210) { A_init202(this_210); } function alloc_A120() returns integer { local integer this179 if (A_firstFree_246 == 0) { if (A_maxIndex_155 < 32768) { A_maxIndex_155 = (A_maxIndex_155 + 1); this_179 = A_maxIndex_155; } else { error133("Out of memory: Could not create A."); this_179 = 0; }; } else { A_firstFree_246 = (A_firstFree_246 - 1); this_179 = A_nextFree_191[A_firstFree_246]; }; return this_179; } function error133(string msg107) { $debugPrint174((msg_107 + (" " + #getStackTrace()))); } function A_foo_set112(integer instanceId125, integer arrayIndex112, integer value136) { if ((arrayIndex_112 < 0) or (arrayIndex_112 >= 5)) { error133("Index out of Bounds"); } else { if (arrayIndex_112 <= 2) { if (arrayIndex_112 <= 1) { if (arrayIndex_112 <= 0) { A_foo_0_582[instanceId_125] = value_136; } else { A_foo_1_195[instanceId_125] = value_136; }; } else { A_foo_2_114[instanceId_125] = value_136; }; } else { if (arrayIndex_112 <= 3) { A_foo_3_548[instanceId_125] = value_136; } else { A_foo_4_593[instanceId_125] = value_136; }; }; }; } function A_foo_get130(integer index1930, integer index2167) returns integer { local integer returnVal203 if ((index2_167 < 0) or (index2_167 >= 5)) { error133("Index out of Bounds"); } else { if (index2_167 <= 2) { if (index2_167 <= 1) { if (index2_167 <= 0) { returnVal_203 = A_foo_0_582[index1_930]; } else { returnVal_203 = A_foo_1_195[index1_930]; }; } else { returnVal_203 = A_foo_2_114[index1_930]; }; } else { if (index2_167 <= 3) { returnVal_203 = A_foo_3_548[index1_930]; } else { returnVal_203 = A_foo_4_593[index1_930]; }; }; }; return returnVal_203; }