array A_nextFree847 integer A_firstFree360 integer A_maxIndex626 array A_typeId252 integer A_firstFree360 = 0 integer A_maxIndex626 = 0 function initGlobals109() { } function main129() { local integer this330 initGlobals109(); this_330 = new_A669(); if (A_typeId_252[this_330] == 0) { if (this_330 == 0) { error744("Nullpointer exception when calling A.foo"); } else { error744("Called A.foo on invalid object."); }; } else { }; } function config268() { } function new_A669() returns integer { local integer this179 local integer this206 if (A_firstFree_360 == 0) { if (A_maxIndex_626 < 32768) { A_maxIndex_626 = (A_maxIndex_626 + 1); this_206 = A_maxIndex_626; A_typeId_252[this_206] = 1; } else { error744("Out of memory: Could not create A."); this_206 = 0; }; } else { A_firstFree_360 = (A_firstFree_360 - 1); this_206 = A_nextFree_847[A_firstFree_360]; A_typeId_252[this_206] = 1; }; this_179 = this_206; return this_179; } function error744(string msg192) { $debugPrint172((msg_192 + (" " + #getStackTrace()))); }