array A_nextFree108 integer A_firstFree199 integer A_maxIndex544 array A_typeId726 array A_pos_x125 integer A_firstFree199 = 0 integer A_maxIndex544 = 0 function initGlobals847() { } function main651() { initGlobals847(); init_test139(); } function config911() { } function init_test139() { local integer a491 a_491 = new_A191(); if (A_typeId_726[a_491] == 0) { if (a_491 == 0) { error470("Nullpointer exception when calling A.foo"); } else { error470("Called A.foo on invalid object."); }; } else { }; A_pos_x_125[a_491] = 3.; if (A_pos_x_125[a_491] == 3.) { testSuccess136(); } else { }; } IS_NATIVE function testSuccess136() { } function new_A191() returns integer { local integer this176 if (A_firstFree_199 == 0) { if (A_maxIndex_544 < 32768) { A_maxIndex_544 = (A_maxIndex_544 + 1); this_176 = A_maxIndex_544; A_typeId_726[this_176] = 1; } else { error470("Out of memory: Could not create A."); this_176 = 0; }; } else { A_firstFree_199 = (A_firstFree_199 - 1); this_176 = A_nextFree_108[A_firstFree_199]; A_typeId_726[this_176] = 1; }; A_pos_x_125[this_176] = 1.; return this_176; } function error470(string msg921) { $debugPrint160((msg_921 + (" " + #getStackTrace()))); }