array C_nextFree198 integer C_firstFree155 integer C_maxIndex608 array C_typeId163 integer C_firstFree155 = 0 integer C_maxIndex608 = 0 function initGlobals245() { C_firstFree_155 = 0; C_maxIndex_608 = 0; } function main560() { initGlobals245(); init_test152(); } function config592() { } function init_test152() { local integer c125 c_125 = new_C155(); if (dispatch_C_test_C_foo338(c_125) != 4) { testFail846("foo fail"); } else { }; testSuccess117(); } IS_NATIVE function testFail846(string msg113) { } IS_NATIVE function testSuccess117() { } function C_foo410(integer this172) returns integer { return 4; } function C_init178(integer this848) { construct_C_A122(this_848); construct_C_B844(this_848); } function construct_C_A122(integer this120) { } function construct_C_B844(integer this209) { } function new_C155() returns integer { local integer this187 this_187 = alloc_C195(); construct_C118(this_187); return this_187; } function construct_C118(integer this104) { C_init178(this_104); } function alloc_C195() returns integer { local integer this191 if (C_firstFree_155 == 0) { if (C_maxIndex_608 < 32768) { C_maxIndex_608 = (C_maxIndex_608 + 1); this_191 = C_maxIndex_608; C_typeId_163[this_191] = 1; } else { error154("Out of memory: Could not create C."); this_191 = 0; }; } else { C_firstFree_155 = (C_firstFree_155 - 1); this_191 = C_nextFree_198[C_firstFree_155]; C_typeId_163[this_191] = 1; }; return this_191; } function error154(string msg212) { $debugPrint185((msg_212 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo338(integer this104) returns integer { local integer test_C_foo_result113 if (C_typeId_163[this_104] == 0) { if (this_104 == 0) { error154("Nullpointer exception when calling C.foo"); } else { error154("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_113 = C_foo410(this_104); return test_C_foo_result_113; }