array C_nextFree141 integer C_firstFree190 integer C_maxIndex163 array C_typeId170 integer C_firstFree190 = 0 integer C_maxIndex163 = 0 function initGlobals104() { } function main920() { initGlobals104(); init_test209(); } function config153() { } function init_test209() { local integer c807 local integer d212 c_807 = new_C159(); d_212 = new_D182(); if (((dispatch_C_test_C_foo_2884(c_807, 1, 2) == 3) and (dispatch_C_test_C_foo_2884(d_212, 1, 2) == 2)) and (dispatch_C_test_C_foo_4336(d_212, 1, 2, 3, 4) == 24)) { testSuccess187(); } else { }; } IS_NATIVE function testSuccess187() { } function new_C159() returns integer { local integer this165 if (C_firstFree_190 == 0) { if (C_maxIndex_163 < 32768) { C_maxIndex_163 = (C_maxIndex_163 + 1); this_165 = C_maxIndex_163; C_typeId_170[this_165] = 1; } else { error155("Out of memory: Could not create C."); this_165 = 0; }; } else { C_firstFree_190 = (C_firstFree_190 - 1); this_165 = C_nextFree_141[C_firstFree_190]; C_typeId_170[this_165] = 1; }; return this_165; } function new_D182() returns integer { local integer this112 if (C_firstFree_190 == 0) { if (C_maxIndex_163 < 32768) { C_maxIndex_163 = (C_maxIndex_163 + 1); this_112 = C_maxIndex_163; C_typeId_170[this_112] = 2; } else { error155("Out of memory: Could not create D."); this_112 = 0; }; } else { C_firstFree_190 = (C_firstFree_190 - 1); this_112 = C_nextFree_141[C_firstFree_190]; C_typeId_170[this_112] = 2; }; return this_112; } function error155(string msg176) { $debugPrint116((msg_176 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo_2884(integer this106, integer xs_0140, integer xs_1919) returns integer { if (C_typeId_170[this_106] == 0) { if (this_106 == 0) { error155("Nullpointer exception when calling C.foo"); } else { error155("Called C.foo on invalid object."); }; } else { }; if (C_typeId_170[this_106] <= 1) { this_106 = ((0 + xs_0_140) + xs_1_919); } else { this_106 = ((1 * xs_0_140) * xs_1_919); }; return this_106; } function dispatch_C_test_C_foo_4336(integer this207, integer xs_0206, integer xs_1465, integer xs_2183, integer xs_3446) returns integer { if (C_typeId_170[this_207] == 0) { if (this_207 == 0) { error155("Nullpointer exception when calling C.foo"); } else { error155("Called C.foo on invalid object."); }; } else { }; if (C_typeId_170[this_207] <= 1) { this_207 = ((((0 + xs_0_206) + xs_1_465) + xs_2_183) + xs_3_446); } else { this_207 = ((((1 * xs_0_206) * xs_1_465) * xs_2_183) * xs_3_446); }; return this_207; }