array SimpleFunc_nextFree502 integer SimpleFunc_firstFree872 integer SimpleFunc_maxIndex410 array SimpleFunc_typeId763 array y132 integer SimpleFunc_firstFree872 = 0 integer SimpleFunc_maxIndex410 = 0 function initGlobals767() { SimpleFunc_firstFree_872 = 0; SimpleFunc_maxIndex_410 = 0; } function main108() { initGlobals767(); init_test135(); } function config122() { } function init_test135() { local integer y204 local integer f186 local integer clVar690 y_204 = 4; clVar_690 = alloc_SimpleFunc_test192(); y_132[clVar_690] = y_204; f_186 = clVar_690; if (dispatch_SimpleFunc_test_SimpleFunc_apply995(f_186, 3) == 7) { testSuccess736(); } else { }; } IS_NATIVE function testSuccess736() { } function apply_test140(integer this123, integer x119) returns integer { local integer a191 local integer b932 a_191 = y_132[this_123]; b_932 = (a_191 + x_119); return b_932; } function alloc_SimpleFunc_test192() returns integer { local integer this116 if (SimpleFunc_firstFree_872 == 0) { if (SimpleFunc_maxIndex_410 < 32768) { SimpleFunc_maxIndex_410 = (SimpleFunc_maxIndex_410 + 1); this_116 = SimpleFunc_maxIndex_410; SimpleFunc_typeId_763[this_116] = 2; } else { error147("Out of memory: Could not create SimpleFunc_test."); this_116 = 0; }; } else { SimpleFunc_firstFree_872 = (SimpleFunc_firstFree_872 - 1); this_116 = SimpleFunc_nextFree_502[SimpleFunc_firstFree_872]; SimpleFunc_typeId_763[this_116] = 2; }; return this_116; } function error147(string msg394) { $debugPrint209((msg_394 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply995(integer this114, integer x201) returns integer { local integer test_SimpleFunc_apply_result559 if (SimpleFunc_typeId_763[this_114] == 0) { if (this_114 == 0) { error147("Nullpointer exception when calling SimpleFunc.apply"); } else { error147("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_559 = apply_test140(this_114, x_201); return test_SimpleFunc_apply_result_559; }