array C_nextFree211 integer C_firstFree178 integer C_maxIndex128 array C_typeId208 integer C_firstFree178 = 0 integer C_maxIndex128 = 0 function initGlobals162() { } function main180() { initGlobals162(); init_test559(); } function config140() { } function init_test559() { local integer c587 c_587 = new_C322(); if (C_typeId_208[c_587] == 0) { if (c_587 == 0) { error475("Nullpointer exception when calling C.foo"); } else { error475("Called C.foo on invalid object."); }; } else { }; testSuccess148(); } IS_NATIVE function testSuccess148() { } function new_C322() returns integer { local integer this425 if (C_firstFree_178 == 0) { if (C_maxIndex_128 < 32768) { C_maxIndex_128 = (C_maxIndex_128 + 1); this_425 = C_maxIndex_128; C_typeId_208[this_425] = 1; } else { error475("Out of memory: Could not create C."); this_425 = 0; }; } else { C_firstFree_178 = (C_firstFree_178 - 1); this_425 = C_nextFree_211[C_firstFree_178]; C_typeId_208[this_425] = 1; }; return this_425; } function error475(string msg778) { $debugPrint136((msg_778 + (" " + #getStackTrace()))); }