array A_nextFree166 integer A_firstFree342 integer A_maxIndex148 array A_ints_0173 array A_ints_1207 array A_ints_2531 array A_ints_3188 integer A_firstFree342 = 0 integer A_maxIndex148 = 0 function initGlobals121() { } function main617() { initGlobals121(); init_test180(); } function config157() { } function init_test180() { local integer a145 a_145 = new_A128(); A_ints_set143(a_145, 0, 1234); if (A_ints_get167(a_145, 0) == 1234) { testSuccess177(); } else { testFail929("wrong value"); }; } IS_NATIVE function testSuccess177() { } IS_NATIVE function testFail929(string msg789) { } function new_A128() returns integer { local integer this618 if (A_firstFree_342 == 0) { if (A_maxIndex_148 < 32768) { A_maxIndex_148 = (A_maxIndex_148 + 1); this_618 = A_maxIndex_148; } else { error315("Out of memory: Could not create A."); this_618 = 0; }; } else { A_firstFree_342 = (A_firstFree_342 - 1); this_618 = A_nextFree_166[A_firstFree_342]; }; return this_618; } function error315(string msg188) { $debugPrint156((msg_188 + (" " + #getStackTrace()))); } function A_ints_set143(integer instanceId147, integer arrayIndex827, integer value157) { if ((arrayIndex_827 < 0) or (arrayIndex_827 >= 4)) { error315("Index out of Bounds"); } else { if (arrayIndex_827 <= 1) { if (arrayIndex_827 <= 0) { A_ints_0_173[instanceId_147] = value_157; } else { A_ints_1_207[instanceId_147] = value_157; }; } else { if (arrayIndex_827 <= 2) { A_ints_2_531[instanceId_147] = value_157; } else { A_ints_3_188[instanceId_147] = value_157; }; }; }; } function A_ints_get167(integer index1552, integer index2816) returns integer { local integer returnVal132 if ((index2_816 < 0) or (index2_816 >= 4)) { error315("Index out of Bounds"); } else { if (index2_816 <= 1) { if (index2_816 <= 0) { returnVal_132 = A_ints_0_173[index1_552]; } else { returnVal_132 = A_ints_1_207[index1_552]; }; } else { if (index2_816 <= 2) { returnVal_132 = A_ints_2_531[index1_552]; } else { returnVal_132 = A_ints_3_188[index1_552]; }; }; }; return returnVal_132; }