array SimpleFunc_nextFree210 integer SimpleFunc_firstFree343 integer SimpleFunc_maxIndex922 array SimpleFunc_typeId788 array y163 integer SimpleFunc_firstFree343 = 0 integer SimpleFunc_maxIndex922 = 0 function initGlobals173() { SimpleFunc_firstFree_343 = 0; SimpleFunc_maxIndex_922 = 0; } function main643() { initGlobals173(); init_test964(); } function config119() { } function init_test964() { local integer y105 local integer f100 local integer clVar315 y_105 = 4; clVar_315 = alloc_SimpleFunc_test112(); y_163[clVar_315] = y_105; f_100 = clVar_315; if (dispatch_SimpleFunc_test_SimpleFunc_apply636(f_100, 3) == 7) { testSuccess135(); } else { }; } IS_NATIVE function testSuccess135() { } function apply_test872(integer this648, integer x529) returns integer { local integer a137 local integer b196 a_137 = y_163[this_648]; b_196 = (a_137 + x_529); return b_196; } function alloc_SimpleFunc_test112() returns integer { local integer this600 if (SimpleFunc_firstFree_343 == 0) { if (SimpleFunc_maxIndex_922 < 32768) { SimpleFunc_maxIndex_922 = (SimpleFunc_maxIndex_922 + 1); this_600 = SimpleFunc_maxIndex_922; SimpleFunc_typeId_788[this_600] = 2; } else { error477("Out of memory: Could not create SimpleFunc_test."); this_600 = 0; }; } else { SimpleFunc_firstFree_343 = (SimpleFunc_firstFree_343 - 1); this_600 = SimpleFunc_nextFree_210[SimpleFunc_firstFree_343]; SimpleFunc_typeId_788[this_600] = 2; }; return this_600; } function error477(string msg253) { $debugPrint207((msg_253 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply636(integer this103, integer x202) returns integer { local integer test_SimpleFunc_apply_result940 if (SimpleFunc_typeId_788[this_103] == 0) { if (this_103 == 0) { error477("Nullpointer exception when calling SimpleFunc.apply"); } else { error477("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_940 = apply_test872(this_103, x_202); return test_SimpleFunc_apply_result_940; }