array SimpleFunc_nextFree977 integer SimpleFunc_firstFree751 integer SimpleFunc_maxIndex128 array SimpleFunc_typeId201 integer SimpleFunc_firstFree751 = 0 integer SimpleFunc_maxIndex128 = 0 function initGlobals417() { } function main146() { initGlobals417(); init_test105(); } function config101() { } function init_test105() { local integer f906 local integer clVar300 local integer g552 local integer this200 if (SimpleFunc_firstFree_751 == 0) { if (SimpleFunc_maxIndex_128 < 32768) { SimpleFunc_maxIndex_128 = (SimpleFunc_maxIndex_128 + 1); this_200 = SimpleFunc_maxIndex_128; SimpleFunc_typeId_201[this_200] = 2; } else { error322("Out of memory: Could not create SimpleFunc_test."); this_200 = 0; }; } else { SimpleFunc_firstFree_751 = (SimpleFunc_firstFree_751 - 1); this_200 = SimpleFunc_nextFree_977[SimpleFunc_firstFree_751]; SimpleFunc_typeId_201[this_200] = 2; }; clVar_300 = this_200; f_906 = clVar_300; g_552 = new_Test458(); if ((dispatch_SimpleFunc_test_SimpleFunc_apply170(f_906, 3, 4) == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply170(g_552, 3, 4) == 12)) { testSuccess780(); } else { }; } IS_NATIVE function testSuccess780() { } function new_Test458() returns integer { local integer this939 local integer this922 if (SimpleFunc_firstFree_751 == 0) { if (SimpleFunc_maxIndex_128 < 32768) { SimpleFunc_maxIndex_128 = (SimpleFunc_maxIndex_128 + 1); this_922 = SimpleFunc_maxIndex_128; SimpleFunc_typeId_201[this_922] = 3; } else { error322("Out of memory: Could not create Test."); this_922 = 0; }; } else { SimpleFunc_firstFree_751 = (SimpleFunc_firstFree_751 - 1); this_922 = SimpleFunc_nextFree_977[SimpleFunc_firstFree_751]; SimpleFunc_typeId_201[this_922] = 3; }; this_939 = this_922; return this_939; } function error322(string msg117) { $debugPrint166((msg_117 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply170(integer this124, integer x530, integer y267) returns integer { local integer test_SimpleFunc_apply_result142 local integer x171 local integer y167 local integer x172 local integer y116 if (SimpleFunc_typeId_201[this_124] == 0) { if (this_124 == 0) { error322("Nullpointer exception when calling SimpleFunc.apply"); } else { error322("Called SimpleFunc.apply on invalid object."); }; } else { }; if (SimpleFunc_typeId_201[this_124] <= 2) { x_171 = x_530; y_167 = y_267; test_SimpleFunc_apply_result_142 = (x_171 + y_167); } else { x_172 = x_530; y_116 = y_267; test_SimpleFunc_apply_result_142 = (x_172 * y_116); }; return test_SimpleFunc_apply_result_142; }