array I_nextFree116 integer I_firstFree176 integer I_maxIndex195 array I_typeId788 integer I_firstFree176 = 0 integer I_maxIndex195 = 0 function initGlobals168() { I_firstFree_176 = 0; I_maxIndex_195 = 0; } function main801() { initGlobals168(); init_test161(); } function config205() { } function init_test161() { local integer i106 i_106 = new_C142(); if (dispatch_I_test_I_foo125(i_106, 1) == 43) { testSuccess164(); } else { }; } IS_NATIVE function testSuccess164() { } function C_init587(integer this507) { } function new_C142() returns integer { local integer this713 this_713 = alloc_C149(); construct_C205(this_713); return this_713; } function construct_C205(integer this870) { C_init587(this_870); } function I_foo130(integer this700, integer x585) returns integer { return (x_585 + 42); } function alloc_C149() returns integer { local integer this149 if (I_firstFree_176 == 0) { if (I_maxIndex_195 < 32768) { I_maxIndex_195 = (I_maxIndex_195 + 1); this_149 = I_maxIndex_195; I_typeId_788[this_149] = 2; } else { error126("Out of memory: Could not create C."); this_149 = 0; }; } else { I_firstFree_176 = (I_firstFree_176 - 1); this_149 = I_nextFree_116[I_firstFree_176]; I_typeId_788[this_149] = 2; }; return this_149; } function error126(string msg727) { $debugPrint229((msg_727 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo125(integer this132, integer x149) returns integer { local integer test_I_foo_result152 if (I_typeId_788[this_132] == 0) { if (this_132 == 0) { error126("Nullpointer exception when calling I.foo"); } else { error126("Called I.foo on invalid object."); }; } else { }; test_I_foo_result_152 = I_foo130(this_132, x_149); return test_I_foo_result_152; }