array C_nextFree146 integer C_firstFree196 integer C_maxIndex132 array C_typeId200 integer C_firstFree196 = 0 integer C_maxIndex132 = 0 function initGlobals115() { C_firstFree_196 = 0; C_maxIndex_132 = 0; } function main107() { initGlobals115(); init_test209(); } function config145() { } function init_test209() { if (dispatch_C_test_C_foo133(new_D534()) == 3) { testSuccess153(); } else { }; } IS_NATIVE function testSuccess153() { } function C_foo470(integer this161) returns integer { return 3; } function C_init142(integer this138) { } function construct_C337(integer this834) { C_init142(this_834); } function D_init195(integer this633) { } function new_D534() returns integer { local integer this322 this_322 = alloc_D108(); construct_D122(this_322); return this_322; } function construct_D122(integer this482) { construct_C337(this_482); D_init195(this_482); } function error838(string msg476) { $debugPrint183((msg_476 + (" " + #getStackTrace()))); } function alloc_D108() returns integer { local integer this207 if (C_firstFree_196 == 0) { if (C_maxIndex_132 < 32768) { C_maxIndex_132 = (C_maxIndex_132 + 1); this_207 = C_maxIndex_132; C_typeId_200[this_207] = 2; } else { error838("Out of memory: Could not create D."); this_207 = 0; }; } else { C_firstFree_196 = (C_firstFree_196 - 1); this_207 = C_nextFree_146[C_firstFree_196]; C_typeId_200[this_207] = 2; }; return this_207; } function dispatch_C_test_C_foo133(integer this170) returns integer { local integer test_C_foo_result177 if (C_typeId_200[this_170] == 0) { if (this_170 == 0) { error838("Nullpointer exception when calling C.foo"); } else { error838("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_177 = C_foo470(this_170); return test_C_foo_result_177; }