array A_nextFree199 integer A_firstFree545 integer A_maxIndex741 array A_typeId171 integer A_firstFree545 = 0 integer A_maxIndex741 = 0 function initGlobals205() { } function main209() { local integer this136 initGlobals205(); this_136 = new_A793(); if (A_typeId_171[this_136] == 0) { if (this_136 == 0) { error125("Nullpointer exception when calling A.foo"); } else { error125("Called A.foo on invalid object."); }; } else { }; } function config803() { } function new_A793() returns integer { local integer this193 if (A_firstFree_545 == 0) { if (A_maxIndex_741 < 32768) { A_maxIndex_741 = (A_maxIndex_741 + 1); this_193 = A_maxIndex_741; A_typeId_171[this_193] = 1; } else { error125("Out of memory: Could not create A."); this_193 = 0; }; } else { A_firstFree_545 = (A_firstFree_545 - 1); this_193 = A_nextFree_199[A_firstFree_545]; A_typeId_171[this_193] = 1; }; return this_193; } function error125(string msg742) { $debugPrint322((msg_742 + (" " + #getStackTrace()))); }