array A_nextFree170 integer A_firstFree145 integer A_maxIndex666 array A_typeId898 integer A_firstFree145 = 0 integer A_maxIndex666 = 0 function initGlobals705() { } function main123() { local integer this872 initGlobals705(); this_872 = new_A243(); if (A_typeId_898[this_872] == 0) { if (this_872 == 0) { error206("Nullpointer exception when calling A.foo"); } else { error206("Called A.foo on invalid object."); }; } else { }; } function config562() { } function new_A243() returns integer { local integer this163 local integer this654 if (A_firstFree_145 == 0) { if (A_maxIndex_666 < 32768) { A_maxIndex_666 = (A_maxIndex_666 + 1); this_654 = A_maxIndex_666; A_typeId_898[this_654] = 1; } else { error206("Out of memory: Could not create A."); this_654 = 0; }; } else { A_firstFree_145 = (A_firstFree_145 - 1); this_654 = A_nextFree_170[A_firstFree_145]; A_typeId_898[this_654] = 1; }; this_163 = this_654; return this_163; } function error206(string msg323) { $debugPrint614((msg_323 + (" " + #getStackTrace()))); }