array C_nextFree136 integer C_firstFree409 integer C_maxIndex158 array C_typeId682 integer C_firstFree409 = 0 integer C_maxIndex158 = 0 function initGlobals316() { } function main558() { local integer this788 initGlobals316(); this_788 = new_C774(1); if (C_typeId_682[this_788] == 0) { if (this_788 == 0) { error296("Nullpointer exception when calling C.test"); } else { error296("Called C.test on invalid object."); }; } else { }; C_test140(this_788); } function config140() { } IS_NATIVE function testSuccess840() { } function new_C774(any x108) returns integer { local integer this185 if (C_firstFree_409 == 0) { if (C_maxIndex_158 < 32768) { C_maxIndex_158 = (C_maxIndex_158 + 1); this_185 = C_maxIndex_158; C_typeId_682[this_185] = 1; } else { error296("Out of memory: Could not create C."); this_185 = 0; }; } else { C_firstFree_409 = (C_firstFree_409 - 1); this_185 = C_nextFree_136[C_firstFree_409]; C_typeId_682[this_185] = 1; }; return this_185; } function C_test140(integer this108) { this_108 = new_C774(1); if (C_typeId_682[this_108] == 0) { if (this_108 == 0) { error296("Nullpointer exception when calling C.foo"); } else { error296("Called C.foo on invalid object."); }; } else { }; new_C774(1); if (C_typeId_682[this_108] == 0) { if (this_108 == 0) { error296("Nullpointer exception when calling C.foo"); } else { error296("Called C.foo on invalid object."); }; } else { }; testSuccess840(); } function error296(string msg170) { $debugPrint847((msg_170 + (" " + #getStackTrace()))); }