array C_nextFree617 integer C_firstFree640 integer C_maxIndex734 array C_typeId116 integer C_firstFree640 = 0 integer C_maxIndex734 = 0 function initGlobals155() { C_firstFree_640 = 0; C_maxIndex_734 = 0; } function main335() { initGlobals155(); init_test217(); } function config774() { } function init_test217() { local integer c602 c_602 = new_C172(); if (dispatch_C_test_C_foo102(c_602) == 3) { testSuccess168(); } else { }; } IS_NATIVE function testSuccess168() { } function C_foo182(integer this141) returns integer { return 3; } function C_init674(integer this984) { construct_C_A133(this_984); } function construct_C_A133(integer this159) { } function new_C172() returns integer { local integer this180 this_180 = alloc_C120(); construct_C467(this_180); return this_180; } function construct_C467(integer this586) { C_init674(this_586); } function alloc_C120() returns integer { local integer this239 if (C_firstFree_640 == 0) { if (C_maxIndex_734 < 32768) { C_maxIndex_734 = (C_maxIndex_734 + 1); this_239 = C_maxIndex_734; C_typeId_116[this_239] = 1; } else { error133("Out of memory: Could not create C."); this_239 = 0; }; } else { C_firstFree_640 = (C_firstFree_640 - 1); this_239 = C_nextFree_617[C_firstFree_640]; C_typeId_116[this_239] = 1; }; return this_239; } function error133(string msg193) { $debugPrint139((msg_193 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo102(integer this112) returns integer { local integer test_C_foo_result125 if (C_typeId_116[this_112] == 0) { if (this_112 == 0) { error133("Nullpointer exception when calling C.foo"); } else { error133("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_125 = C_foo182(this_112); return test_C_foo_result_125; }