array C_nextFree662 integer C_firstFree782 integer C_maxIndex211 array C_typeId107 array SimpleFunc_nextFree172 integer SimpleFunc_firstFree144 integer SimpleFunc_maxIndex208 array SimpleFunc_typeId190 array C_y158 array this126 integer C_firstFree782 = 0 integer C_maxIndex211 = 0 integer SimpleFunc_firstFree144 = 0 integer SimpleFunc_maxIndex208 = 0 function initGlobals181() { } function main295() { local integer c116 local integer this129 initGlobals181(); new_C192(); c_116 = new_C192(); C_y_158[c_116] = 4; this_129 = c_116; if (C_typeId_107[this_129] == 0) { if (this_129 == 0) { error127("Nullpointer exception when calling C.foo"); } else { error127("Called C.foo on invalid object."); }; } else { }; C_foo874(this_129); } function config143() { } IS_NATIVE function testSuccess911() { } function C_foo874(integer this403) { local integer clVar364 local integer temp129 local integer this209 local integer this123 local integer f128 local integer f436 temp_129 = this_403; if (SimpleFunc_firstFree_144 == 0) { if (SimpleFunc_maxIndex_208 < 32768) { SimpleFunc_maxIndex_208 = (SimpleFunc_maxIndex_208 + 1); this_209 = SimpleFunc_maxIndex_208; SimpleFunc_typeId_190[this_209] = 3; } else { error127("Out of memory: Could not create SimpleFunc_bar_C_test."); this_209 = 0; }; } else { SimpleFunc_firstFree_144 = (SimpleFunc_firstFree_144 - 1); this_209 = SimpleFunc_nextFree_172[SimpleFunc_firstFree_144]; SimpleFunc_typeId_190[this_209] = 3; }; clVar_364 = this_209; this_126[clVar_364] = this_403; this_123 = temp_129; f_128 = clVar_364; if (C_typeId_107[this_123] == 0) { if (this_123 == 0) { error127("Nullpointer exception when calling C.bar"); } else { error127("Called C.bar on invalid object."); }; } else { }; f_436 = f_128; if (dispatch_SimpleFunc_test_SimpleFunc_apply134(f_436) == 7) { testSuccess911(); } else { }; } function new_C192() returns integer { local integer this166 local integer this116 if (C_firstFree_782 == 0) { if (C_maxIndex_211 < 32768) { C_maxIndex_211 = (C_maxIndex_211 + 1); this_116 = C_maxIndex_211; C_typeId_107[this_116] = 1; } else { error127("Out of memory: Could not create C."); this_116 = 0; }; } else { C_firstFree_782 = (C_firstFree_782 - 1); this_116 = C_nextFree_662[C_firstFree_782]; C_typeId_107[this_116] = 1; }; this_166 = this_116; return this_166; } function error127(string msg212) { $debugPrint717((msg_212 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply134(integer this175) returns integer { local integer test_SimpleFunc_apply_result399 local integer this193 local integer this172 local integer test_C_x_result122 if (SimpleFunc_typeId_190[this_175] == 0) { if (this_175 == 0) { error127("Nullpointer exception when calling SimpleFunc.apply"); } else { error127("Called SimpleFunc.apply on invalid object."); }; } else { }; this_193 = this_175; this_172 = this_126[this_193]; if (C_typeId_107[this_172] == 0) { if (this_172 == 0) { error127("Nullpointer exception when calling C.x"); } else { error127("Called C.x on invalid object."); }; } else { }; test_C_x_result_122 = 3; test_SimpleFunc_apply_result_399 = (test_C_x_result_122 + C_y_158[this_126[this_193]]); return test_SimpleFunc_apply_result_399; }