array C_nextFree736 integer C_firstFree151 integer C_maxIndex205 array C_typeId601 integer C_firstFree151 = 0 integer C_maxIndex205 = 0 function initGlobals141() { C_firstFree_151 = 0; C_maxIndex_205 = 0; } function main173() { initGlobals141(); init_test249(); } function config201() { } function init_test249() { local integer c138 c_138 = new_C129(); if (dispatch_C_test_C_foo144(c_138) != 4) { testFail193("foo fail"); } else { }; testSuccess181(); } IS_NATIVE function testFail193(string msg206) { } IS_NATIVE function testSuccess181() { } function C_foo123(integer this580) returns integer { return 4; } function C_init131(integer this417) { construct_C_A110(this_417); construct_C_B198(this_417); } function construct_C_A110(integer this155) { } function construct_C_B198(integer this146) { } function new_C129() returns integer { local integer this177 this_177 = alloc_C570(); construct_C986(this_177); return this_177; } function construct_C986(integer this145) { C_init131(this_145); } function alloc_C570() returns integer { local integer this140 if (C_firstFree_151 == 0) { if (C_maxIndex_205 < 32768) { C_maxIndex_205 = (C_maxIndex_205 + 1); this_140 = C_maxIndex_205; C_typeId_601[this_140] = 1; } else { error554("Out of memory: Could not create C."); this_140 = 0; }; } else { C_firstFree_151 = (C_firstFree_151 - 1); this_140 = C_nextFree_736[C_firstFree_151]; C_typeId_601[this_140] = 1; }; return this_140; } function error554(string msg127) { $debugPrint122((msg_127 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo144(integer this131) returns integer { local integer test_C_foo_result138 if (C_typeId_601[this_131] == 0) { if (this_131 == 0) { error554("Nullpointer exception when calling C.foo"); } else { error554("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_138 = C_foo123(this_131); return test_C_foo_result_138; }