array C_nextFree996 integer C_firstFree186 integer C_maxIndex143 array C_typeId127 integer C_firstFree186 = 0 integer C_maxIndex143 = 0 function initGlobals107() { } function main194() { initGlobals107(); init_test925(); } function config119() { } function init_test925() { local integer c192 local integer d206 c_192 = new_C579(); d_206 = new_D132(); if (((dispatch_C_test_C_foo_2154(c_192, 1, 2) == 3) and (dispatch_C_test_C_foo_2154(d_206, 1, 2) == 2)) and (dispatch_C_test_C_foo_4830(d_206, 1, 2, 3, 4) == 24)) { testSuccess170(); } else { }; } IS_NATIVE function testSuccess170() { } function C_init912(integer this171) { } function new_C579() returns integer { local integer this533 this_533 = alloc_C515(); construct_C186(this_533); return this_533; } function construct_C186(integer this109) { C_init912(this_109); } function D_init183(integer this165) { } function new_D132() returns integer { local integer this193 this_193 = alloc_D143(); construct_D866(this_193); return this_193; } function construct_D866(integer this162) { construct_C186(this_162); D_init183(this_162); } function alloc_C515() returns integer { local integer this178 if (C_firstFree_186 == 0) { if (C_maxIndex_143 < 32768) { C_maxIndex_143 = (C_maxIndex_143 + 1); this_178 = C_maxIndex_143; C_typeId_127[this_178] = 1; } else { error260("Out of memory: Could not create C."); this_178 = 0; }; } else { C_firstFree_186 = (C_firstFree_186 - 1); this_178 = C_nextFree_996[C_firstFree_186]; C_typeId_127[this_178] = 1; }; return this_178; } function error260(string msg194) { $debugPrint122((msg_194 + (" " + #getStackTrace()))); } function alloc_D143() returns integer { local integer this173 if (C_firstFree_186 == 0) { if (C_maxIndex_143 < 32768) { C_maxIndex_143 = (C_maxIndex_143 + 1); this_173 = C_maxIndex_143; C_typeId_127[this_173] = 2; } else { error260("Out of memory: Could not create D."); this_173 = 0; }; } else { C_firstFree_186 = (C_firstFree_186 - 1); this_173 = C_nextFree_996[C_firstFree_186]; C_typeId_127[this_173] = 2; }; return this_173; } function C_foo_2178(integer this138, integer xs_0856, integer xs_1202) returns integer { return ((0 + xs_0_856) + xs_1_202); } function D_foo_2187(integer this162, integer xs_0917, integer xs_1109) returns integer { return ((1 * xs_0_917) * xs_1_109); } function dispatch_C_test_C_foo_2154(integer this155, integer xs_0102, integer xs_1207) returns integer { if (C_typeId_127[this_155] == 0) { if (this_155 == 0) { error260("Nullpointer exception when calling C.foo"); } else { error260("Called C.foo on invalid object."); }; } else { }; if (C_typeId_127[this_155] <= 1) { this_155 = C_foo_2178(this_155, xs_0_102, xs_1_207); } else { this_155 = D_foo_2187(this_155, xs_0_102, xs_1_207); }; return this_155; } function C_foo_4402(integer this116, integer xs_0503, integer xs_1172, integer xs_2258, integer xs_3145) returns integer { return ((((0 + xs_0_503) + xs_1_172) + xs_2_258) + xs_3_145); } function D_foo_4178(integer this186, integer xs_0171, integer xs_1186, integer xs_2201, integer xs_3931) returns integer { return ((((1 * xs_0_171) * xs_1_186) * xs_2_201) * xs_3_931); } function dispatch_C_test_C_foo_4830(integer this101, integer xs_0125, integer xs_1514, integer xs_2184, integer xs_3189) returns integer { if (C_typeId_127[this_101] == 0) { if (this_101 == 0) { error260("Nullpointer exception when calling C.foo"); } else { error260("Called C.foo on invalid object."); }; } else { }; if (C_typeId_127[this_101] <= 1) { this_101 = C_foo_4402(this_101, xs_0_125, xs_1_514, xs_2_184, xs_3_189); } else { this_101 = D_foo_4178(this_101, xs_0_125, xs_1_514, xs_2_184, xs_3_189); }; return this_101; }