array A_nextFree167 integer A_firstFree147 integer A_maxIndex131 array A_foo_0489 array A_foo_1837 array A_foo_2144 array A_foo_3146 array A_foo_4617 integer A_firstFree147 = 0 integer A_maxIndex131 = 0 function initGlobals951() { A_firstFree_147 = 0; A_maxIndex_131 = 0; } function main142() { initGlobals951(); init_test467(); } function config208() { } function init_test467() { local integer a594 a_594 = new_A172(); A_foo_set168(a_594, 3, 6); if (A_foo_get718(a_594, 3) == 6) { testSuccess160(); } else { }; } IS_NATIVE function testSuccess160() { } function A_init723(integer this126) { } function new_A172() returns integer { local integer this132 this_132 = alloc_A161(); construct_A166(this_132); return this_132; } function construct_A166(integer this131) { A_init723(this_131); } function alloc_A161() returns integer { local integer this175 if (A_firstFree_147 == 0) { if (A_maxIndex_131 < 32768) { A_maxIndex_131 = (A_maxIndex_131 + 1); this_175 = A_maxIndex_131; } else { error182("Out of memory: Could not create A."); this_175 = 0; }; } else { A_firstFree_147 = (A_firstFree_147 - 1); this_175 = A_nextFree_167[A_firstFree_147]; }; return this_175; } function error182(string msg155) { $debugPrint498((msg_155 + (" " + #getStackTrace()))); } function A_foo_set168(integer instanceId398, integer arrayIndex276, integer value147) { if ((arrayIndex_276 < 0) or (arrayIndex_276 >= 5)) { error182("Index out of Bounds"); } else { if (arrayIndex_276 <= 2) { if (arrayIndex_276 <= 1) { if (arrayIndex_276 <= 0) { A_foo_0_489[instanceId_398] = value_147; } else { A_foo_1_837[instanceId_398] = value_147; }; } else { A_foo_2_144[instanceId_398] = value_147; }; } else { if (arrayIndex_276 <= 3) { A_foo_3_146[instanceId_398] = value_147; } else { A_foo_4_617[instanceId_398] = value_147; }; }; }; } function A_foo_get718(integer index1192, integer index2347) returns integer { local integer returnVal112 if ((index2_347 < 0) or (index2_347 >= 5)) { error182("Index out of Bounds"); } else { if (index2_347 <= 2) { if (index2_347 <= 1) { if (index2_347 <= 0) { returnVal_112 = A_foo_0_489[index1_192]; } else { returnVal_112 = A_foo_1_837[index1_192]; }; } else { returnVal_112 = A_foo_2_144[index1_192]; }; } else { if (index2_347 <= 3) { returnVal_112 = A_foo_3_146[index1_192]; } else { returnVal_112 = A_foo_4_617[index1_192]; }; }; }; return returnVal_112; }