array SimpleFunc_nextFree195 integer SimpleFunc_firstFree305 integer SimpleFunc_maxIndex177 array SimpleFunc_typeId152 array main381 integer SimpleFunc_firstFree305 = 0 integer SimpleFunc_maxIndex177 = 0 function initGlobals680() { SimpleFunc_firstFree_305 = 0; SimpleFunc_maxIndex_177 = 0; } function main140() { initGlobals680(); init_test921(); } function config200() { } function init_test921() { local integer main120 local integer f925 local integer clVar177 main_120 = 4; clVar_177 = alloc_SimpleFunc_test159(); main_381[clVar_177] = main_120; f_925 = clVar_177; if (dispatch_SimpleFunc_test_SimpleFunc_apply120(f_925, 3) == 7) { testSuccess765(); } else { }; } IS_NATIVE function testSuccess765() { } function apply_test473(integer this494, integer x144) returns integer { return (x_144 + main_381[this_494]); } function alloc_SimpleFunc_test159() returns integer { local integer this108 if (SimpleFunc_firstFree_305 == 0) { if (SimpleFunc_maxIndex_177 < 32768) { SimpleFunc_maxIndex_177 = (SimpleFunc_maxIndex_177 + 1); this_108 = SimpleFunc_maxIndex_177; SimpleFunc_typeId_152[this_108] = 2; } else { error365("Out of memory: Could not create SimpleFunc_test."); this_108 = 0; }; } else { SimpleFunc_firstFree_305 = (SimpleFunc_firstFree_305 - 1); this_108 = SimpleFunc_nextFree_195[SimpleFunc_firstFree_305]; SimpleFunc_typeId_152[this_108] = 2; }; return this_108; } function error365(string msg146) { $debugPrint112((msg_146 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply120(integer this141, integer x210) returns integer { local integer test_SimpleFunc_apply_result113 if (SimpleFunc_typeId_152[this_141] == 0) { if (this_141 == 0) { error365("Nullpointer exception when calling SimpleFunc.apply"); } else { error365("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_113 = apply_test473(this_141, x_210); return test_SimpleFunc_apply_result_113; }