array C_nextFree128 integer C_firstFree558 integer C_maxIndex365 array C_typeId603 array SimpleFunc_nextFree952 integer SimpleFunc_firstFree118 integer SimpleFunc_maxIndex475 array SimpleFunc_typeId191 array C_y193 array this504 integer C_firstFree558 = 0 integer C_maxIndex365 = 0 integer SimpleFunc_firstFree118 = 0 integer SimpleFunc_maxIndex475 = 0 function initGlobals202() { C_firstFree_558 = 0; C_maxIndex_365 = 0; SimpleFunc_firstFree_118 = 0; SimpleFunc_maxIndex_475 = 0; } function main120() { initGlobals202(); init_test127(); } function config923() { } function init_test127() { local integer c323 new_C198(); c_323 = new_C198(); C_y_193[c_323] = 4; dispatch_C_test_C_foo164(c_323); } IS_NATIVE function testSuccess100() { } function C_foo733(integer this956) { local integer clVar127 local integer temp133 temp_133 = this_956; clVar_127 = alloc_SimpleFunc_bar_C_test106(); this_504[clVar_127] = this_956; dispatch_C_test_C_bar904(temp_133, clVar_127); } function C_x475(integer this212) returns integer { return 3; } function C_bar145(integer this156, integer f189) { if (dispatch_SimpleFunc_test_SimpleFunc_apply165(f_189) == 7) { testSuccess100(); } else { }; } function C_init174(integer this857) { } function new_C198() returns integer { local integer this157 this_157 = alloc_C188(); construct_C122(this_157); return this_157; } function construct_C122(integer this139) { C_init174(this_139); } function apply_bar_C_test146(integer this958) returns integer { return (dispatch_C_test_C_x171(this_504[this_958]) + C_y_193[this_504[this_958]]); } function alloc_C188() returns integer { local integer this641 if (C_firstFree_558 == 0) { if (C_maxIndex_365 < 32768) { C_maxIndex_365 = (C_maxIndex_365 + 1); this_641 = C_maxIndex_365; C_typeId_603[this_641] = 1; } else { error952("Out of memory: Could not create C."); this_641 = 0; }; } else { C_firstFree_558 = (C_firstFree_558 - 1); this_641 = C_nextFree_128[C_firstFree_558]; C_typeId_603[this_641] = 1; }; return this_641; } function error952(string msg144) { $debugPrint893((msg_144 + (" " + #getStackTrace()))); } function alloc_SimpleFunc_bar_C_test106() returns integer { local integer this142 if (SimpleFunc_firstFree_118 == 0) { if (SimpleFunc_maxIndex_475 < 32768) { SimpleFunc_maxIndex_475 = (SimpleFunc_maxIndex_475 + 1); this_142 = SimpleFunc_maxIndex_475; SimpleFunc_typeId_191[this_142] = 3; } else { error952("Out of memory: Could not create SimpleFunc_bar_C_test."); this_142 = 0; }; } else { SimpleFunc_firstFree_118 = (SimpleFunc_firstFree_118 - 1); this_142 = SimpleFunc_nextFree_952[SimpleFunc_firstFree_118]; SimpleFunc_typeId_191[this_142] = 3; }; return this_142; } function dispatch_C_test_C_foo164(integer this489) { if (C_typeId_603[this_489] == 0) { if (this_489 == 0) { error952("Nullpointer exception when calling C.foo"); } else { error952("Called C.foo on invalid object."); }; } else { }; C_foo733(this_489); } function dispatch_C_test_C_bar904(integer this365, integer f967) { if (C_typeId_603[this_365] == 0) { if (this_365 == 0) { error952("Nullpointer exception when calling C.bar"); } else { error952("Called C.bar on invalid object."); }; } else { }; C_bar145(this_365, f_967); } function dispatch_C_test_C_x171(integer this126) returns integer { local integer test_C_x_result196 if (C_typeId_603[this_126] == 0) { if (this_126 == 0) { error952("Nullpointer exception when calling C.x"); } else { error952("Called C.x on invalid object."); }; } else { }; test_C_x_result_196 = C_x475(this_126); return test_C_x_result_196; } function dispatch_SimpleFunc_test_SimpleFunc_apply165(integer this879) returns integer { local integer test_SimpleFunc_apply_result688 if (SimpleFunc_typeId_191[this_879] == 0) { if (this_879 == 0) { error952("Nullpointer exception when calling SimpleFunc.apply"); } else { error952("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_688 = apply_bar_C_test146(this_879); return test_SimpleFunc_apply_result_688; }