array C_nextFree202 integer C_firstFree484 integer C_maxIndex183 array C_typeId236 integer C_firstFree484 = 0 integer C_maxIndex183 = 0 function initGlobals548() { } function main849() { initGlobals548(); init_test120(); } function config312() { } function init_test120() { local integer c618 local integer d139 c_618 = new_C427(); d_139 = new_D978(); if (((dispatch_C_test_C_foo_2142(c_618, 1, 2) == 3) and (dispatch_C_test_C_foo_2142(d_139, 1, 2) == 2)) and (dispatch_C_test_C_foo_4277(d_139, 1, 2, 3, 4) == 24)) { testSuccess332(); } else { }; } IS_NATIVE function testSuccess332() { } function C_init688(integer this128) { } function new_C427() returns integer { local integer this241 this_241 = alloc_C199(); construct_C124(this_241); return this_241; } function construct_C124(integer this199) { C_init688(this_199); } function D_init130(integer this150) { } function new_D978() returns integer { local integer this934 this_934 = alloc_D293(); construct_D105(this_934); return this_934; } function construct_D105(integer this102) { construct_C124(this_102); D_init130(this_102); } function alloc_C199() returns integer { local integer this151 if (C_firstFree_484 == 0) { if (C_maxIndex_183 < 32768) { C_maxIndex_183 = (C_maxIndex_183 + 1); this_151 = C_maxIndex_183; C_typeId_236[this_151] = 1; } else { error180("Out of memory: Could not create C."); this_151 = 0; }; } else { C_firstFree_484 = (C_firstFree_484 - 1); this_151 = C_nextFree_202[C_firstFree_484]; C_typeId_236[this_151] = 1; }; return this_151; } function error180(string msg949) { $debugPrint115((msg_949 + (" " + #getStackTrace()))); } function alloc_D293() returns integer { local integer this673 if (C_firstFree_484 == 0) { if (C_maxIndex_183 < 32768) { C_maxIndex_183 = (C_maxIndex_183 + 1); this_673 = C_maxIndex_183; C_typeId_236[this_673] = 2; } else { error180("Out of memory: Could not create D."); this_673 = 0; }; } else { C_firstFree_484 = (C_firstFree_484 - 1); this_673 = C_nextFree_202[C_firstFree_484]; C_typeId_236[this_673] = 2; }; return this_673; } function C_foo_2866(integer this183, integer xs_0194, integer xs_1143) returns integer { return ((0 + xs_0_194) + xs_1_143); } function D_foo_2206(integer this555, integer xs_0147, integer xs_1346) returns integer { return ((1 * xs_0_147) * xs_1_346); } function dispatch_C_test_C_foo_2142(integer this111, integer xs_0143, integer xs_1181) returns integer { if (C_typeId_236[this_111] == 0) { if (this_111 == 0) { error180("Nullpointer exception when calling C.foo"); } else { error180("Called C.foo on invalid object."); }; } else { }; if (C_typeId_236[this_111] <= 1) { this_111 = C_foo_2866(this_111, xs_0_143, xs_1_181); } else { this_111 = D_foo_2206(this_111, xs_0_143, xs_1_181); }; return this_111; } function C_foo_4326(integer this171, integer xs_0533, integer xs_1109, integer xs_2171, integer xs_3865) returns integer { return ((((0 + xs_0_533) + xs_1_109) + xs_2_171) + xs_3_865); } function D_foo_4166(integer this183, integer xs_0163, integer xs_1325, integer xs_2559, integer xs_3950) returns integer { return ((((1 * xs_0_163) * xs_1_325) * xs_2_559) * xs_3_950); } function dispatch_C_test_C_foo_4277(integer this193, integer xs_0162, integer xs_1109, integer xs_2186, integer xs_3143) returns integer { if (C_typeId_236[this_193] == 0) { if (this_193 == 0) { error180("Nullpointer exception when calling C.foo"); } else { error180("Called C.foo on invalid object."); }; } else { }; if (C_typeId_236[this_193] <= 1) { this_193 = C_foo_4326(this_193, xs_0_162, xs_1_109, xs_2_186, xs_3_143); } else { this_193 = D_foo_4166(this_193, xs_0_162, xs_1_109, xs_2_186, xs_3_143); }; return this_193; }