array C_nextFree217 integer C_firstFree194 integer C_maxIndex131 array C_typeId512 array SimpleFunc_nextFree188 integer SimpleFunc_firstFree114 integer SimpleFunc_maxIndex530 array SimpleFunc_typeId571 array C_y101 array this347 integer C_firstFree194 = 0 integer C_maxIndex131 = 0 integer SimpleFunc_firstFree114 = 0 integer SimpleFunc_maxIndex530 = 0 function initGlobals374() { C_firstFree_194 = 0; C_maxIndex_131 = 0; SimpleFunc_firstFree_114 = 0; SimpleFunc_maxIndex_530 = 0; } function main202() { initGlobals374(); init_test903(); } function config135() { } function init_test903() { local integer c705 new_C466(); c_705 = new_C466(); C_y_101[c_705] = 4; dispatch_C_test_C_foo114(c_705); } IS_NATIVE function testSuccess374() { } function C_foo842(integer this179) { local integer clVar124 local integer temp882 temp_882 = this_179; clVar_124 = alloc_SimpleFunc_bar_C_test603(); this_347[clVar_124] = this_179; dispatch_C_test_C_bar858(temp_882, clVar_124); } function C_x650(integer this172) returns integer { return 3; } function C_bar138(integer this215, integer f186) { if (dispatch_SimpleFunc_test_SimpleFunc_apply162(f_186) == 7) { testSuccess374(); } else { }; } function C_init117(integer this191) { } function new_C466() returns integer { local integer this309 this_309 = alloc_C136(); construct_C863(this_309); return this_309; } function construct_C863(integer this673) { C_init117(this_673); } function apply_bar_C_test884(integer this648) returns integer { return (dispatch_C_test_C_x864(this_347[this_648]) + C_y_101[this_347[this_648]]); } function alloc_C136() returns integer { local integer this748 if (C_firstFree_194 == 0) { if (C_maxIndex_131 < 32768) { C_maxIndex_131 = (C_maxIndex_131 + 1); this_748 = C_maxIndex_131; C_typeId_512[this_748] = 1; } else { error132("Out of memory: Could not create C."); this_748 = 0; }; } else { C_firstFree_194 = (C_firstFree_194 - 1); this_748 = C_nextFree_217[C_firstFree_194]; C_typeId_512[this_748] = 1; }; return this_748; } function error132(string msg788) { $debugPrint798((msg_788 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test603() returns integer { local integer this681 if (SimpleFunc_firstFree_114 == 0) { if (SimpleFunc_maxIndex_530 < 32768) { SimpleFunc_maxIndex_530 = (SimpleFunc_maxIndex_530 + 1); this_681 = SimpleFunc_maxIndex_530; SimpleFunc_typeId_571[this_681] = 3; } else { error132("Out of memory: Could not create SimpleFunc_bar_C_test."); this_681 = 0; }; } else { SimpleFunc_firstFree_114 = (SimpleFunc_firstFree_114 - 1); this_681 = SimpleFunc_nextFree_188[SimpleFunc_firstFree_114]; SimpleFunc_typeId_571[this_681] = 3; }; return this_681; } function dispatch_C_test_C_foo114(integer this715) { if (C_typeId_512[this_715] == 0) { if (this_715 == 0) { error132("Nullpointer exception when calling C.foo"); } else { error132("Called C.foo on invalid object."); }; } else { }; C_foo842(this_715); } function dispatch_C_test_C_bar858(integer this139, integer f531) { if (C_typeId_512[this_139] == 0) { if (this_139 == 0) { error132("Nullpointer exception when calling C.bar"); } else { error132("Called C.bar on invalid object."); }; } else { }; C_bar138(this_139, f_531); } function dispatch_C_test_C_x864(integer this161) returns integer { local integer test_C_x_result104 if (C_typeId_512[this_161] == 0) { if (this_161 == 0) { error132("Nullpointer exception when calling C.x"); } else { error132("Called C.x on invalid object."); }; } else { }; test_C_x_result_104 = C_x650(this_161); return test_C_x_result_104; } function dispatch_SimpleFunc_test_SimpleFunc_apply162(integer this670) returns integer { local integer test_SimpleFunc_apply_result473 if (SimpleFunc_typeId_571[this_670] == 0) { if (this_670 == 0) { error132("Nullpointer exception when calling SimpleFunc.apply"); } else { error132("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_473 = apply_bar_C_test884(this_670); return test_SimpleFunc_apply_result_473; }