array C_nextFree129 integer C_firstFree138 integer C_maxIndex203 array C_typeId187 integer C_firstFree138 = 0 integer C_maxIndex203 = 0 function initGlobals202() { } function main115() { local integer this423 initGlobals202(); this_423 = new_C122(1); if (C_typeId_187[this_423] == 0) { if (this_423 == 0) { error397("Nullpointer exception when calling C.test"); } else { error397("Called C.test on invalid object."); }; } else { }; C_test127(this_423); } function config143() { } IS_NATIVE function testSuccess158() { } function new_C122(any x860) returns integer { local integer this121 if (C_firstFree_138 == 0) { if (C_maxIndex_203 < 32768) { C_maxIndex_203 = (C_maxIndex_203 + 1); this_121 = C_maxIndex_203; C_typeId_187[this_121] = 1; } else { error397("Out of memory: Could not create C."); this_121 = 0; }; } else { C_firstFree_138 = (C_firstFree_138 - 1); this_121 = C_nextFree_129[C_firstFree_138]; C_typeId_187[this_121] = 1; }; return this_121; } function C_test127(integer this126) { this_126 = new_C122(1); if (C_typeId_187[this_126] == 0) { if (this_126 == 0) { error397("Nullpointer exception when calling C.foo"); } else { error397("Called C.foo on invalid object."); }; } else { }; new_C122(1); if (C_typeId_187[this_126] == 0) { if (this_126 == 0) { error397("Nullpointer exception when calling C.foo"); } else { error397("Called C.foo on invalid object."); }; } else { }; testSuccess158(); } function error397(string msg116) { $debugPrint608((msg_116 + (" " + #getStackTrace()))); }