array C_nextFree210 integer C_firstFree190 integer C_maxIndex200 array C_typeId140 integer C_firstFree190 = 0 integer C_maxIndex200 = 0 function initGlobals163() { C_firstFree_190 = 0; C_maxIndex_200 = 0; } function main164() { initGlobals163(); init_test882(); } function config198() { } function init_test882() { local integer c957 c_957 = new_C185(); if (dispatch_C_test_C_foo785(c_957) == 3) { testSuccess130(); } else { }; } IS_NATIVE function testSuccess130() { } function C_foo873(integer this178) returns integer { return 3; } function C_init647(integer this299) { construct_C_A148(this_299); } function construct_C_A148(integer this135) { } function new_C185() returns integer { local integer this865 this_865 = alloc_C498(); construct_C126(this_865); return this_865; } function construct_C126(integer this216) { C_init647(this_216); } function alloc_C498() returns integer { local integer this289 if (C_firstFree_190 == 0) { if (C_maxIndex_200 < 32768) { C_maxIndex_200 = (C_maxIndex_200 + 1); this_289 = C_maxIndex_200; C_typeId_140[this_289] = 1; } else { error475("Out of memory: Could not create C."); this_289 = 0; }; } else { C_firstFree_190 = (C_firstFree_190 - 1); this_289 = C_nextFree_210[C_firstFree_190]; C_typeId_140[this_289] = 1; }; return this_289; } function error475(string msg176) { $debugPrint776((msg_176 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo785(integer this150) returns integer { local integer test_C_foo_result134 if (C_typeId_140[this_150] == 0) { if (this_150 == 0) { error475("Nullpointer exception when calling C.foo"); } else { error475("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_134 = C_foo873(this_150); return test_C_foo_result_134; }