array SimpleFunc_nextFree892 integer SimpleFunc_firstFree442 integer SimpleFunc_maxIndex914 array SimpleFunc_typeId156 array y589 integer SimpleFunc_firstFree442 = 0 integer SimpleFunc_maxIndex914 = 0 function initGlobals198() { SimpleFunc_firstFree_442 = 0; SimpleFunc_maxIndex_914 = 0; } function main200() { initGlobals198(); init_test338(); } function config689() { } function init_test338() { local integer y741 local integer f865 local integer clVar146 y_741 = 4; clVar_146 = alloc_SimpleFunc_test121(); y_589[clVar_146] = y_741; f_865 = clVar_146; if (dispatch_SimpleFunc_test_SimpleFunc_apply870(f_865, 3) == 7) { testSuccess131(); } else { }; } IS_NATIVE function testSuccess131() { } function apply_test128(integer this173, integer x168) returns integer { local integer a151 local integer b143 a_151 = y_589[this_173]; b_143 = (a_151 + x_168); return b_143; } function alloc_SimpleFunc_test121() returns integer { local integer this277 if (SimpleFunc_firstFree_442 == 0) { if (SimpleFunc_maxIndex_914 < 32768) { SimpleFunc_maxIndex_914 = (SimpleFunc_maxIndex_914 + 1); this_277 = SimpleFunc_maxIndex_914; SimpleFunc_typeId_156[this_277] = 2; } else { error709("Out of memory: Could not create SimpleFunc_test."); this_277 = 0; }; } else { SimpleFunc_firstFree_442 = (SimpleFunc_firstFree_442 - 1); this_277 = SimpleFunc_nextFree_892[SimpleFunc_firstFree_442]; SimpleFunc_typeId_156[this_277] = 2; }; return this_277; } function error709(string msg120) { $debugPrint181((msg_120 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply870(integer this294, integer x351) returns integer { local integer test_SimpleFunc_apply_result207 if (SimpleFunc_typeId_156[this_294] == 0) { if (this_294 == 0) { error709("Nullpointer exception when calling SimpleFunc.apply"); } else { error709("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_207 = apply_test128(this_294, x_351); return test_SimpleFunc_apply_result_207; }