array C_nextFree112 integer C_firstFree131 integer C_maxIndex149 array C_typeId490 integer C_firstFree131 = 0 integer C_maxIndex149 = 0 function initGlobals930() { } function main102() { initGlobals930(); init_test136(); } function config463() { } function init_test136() { if (dispatch_C_test_C_foo112(new_C584()) != 4) { testFail214("foo fail"); } else { }; testSuccess170(); } IS_NATIVE function testFail214(string msg173) { } IS_NATIVE function testSuccess170() { } function C_foo307(integer this134) returns integer { return 4; } function C_init174(integer this116) { construct_C_A117(this_116); construct_C_B226(this_116); } function construct_C_A117(integer this283) { } function construct_C_B226(integer this716) { } function new_C584() returns integer { local integer this873 this_873 = alloc_C495(); construct_C183(this_873); return this_873; } function construct_C183(integer this163) { C_init174(this_163); } function alloc_C495() returns integer { local integer this408 if (C_firstFree_131 == 0) { if (C_maxIndex_149 < 32768) { C_maxIndex_149 = (C_maxIndex_149 + 1); this_408 = C_maxIndex_149; C_typeId_490[this_408] = 1; } else { error805("Out of memory: Could not create C."); this_408 = 0; }; } else { C_firstFree_131 = (C_firstFree_131 - 1); this_408 = C_nextFree_112[C_firstFree_131]; C_typeId_490[this_408] = 1; }; return this_408; } function error805(string msg755) { $debugPrint106((msg_755 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo112(integer this330) returns integer { if (C_typeId_490[this_330] == 0) { if (this_330 == 0) { error805("Nullpointer exception when calling C.foo"); } else { error805("Called C.foo on invalid object."); }; } else { }; return C_foo307(this_330); }