array C_nextFree125 integer C_firstFree341 integer C_maxIndex939 array C_typeId137 integer C_firstFree341 = 0 integer C_maxIndex939 = 0 function initGlobals177() { C_firstFree_341 = 0; C_maxIndex_939 = 0; } function main972() { initGlobals177(); init_test383(); } function config135() { } function init_test383() { if (dispatch_C_test_C_bar442(new_D116()) == 4) { testSuccess211(); } else { }; } IS_NATIVE function testSuccess211() { } function C_bar149(integer this113) returns integer { return dispatch_C_test_C_foo139(this_113); } function C_foo527(integer this148) returns integer { return 3; } function C_init122(integer this134) { } function construct_C296(integer this206) { C_init122(this_206); } function D_foo941(integer this707) returns integer { return 4; } function D_init173(integer this115) { } function new_D116() returns integer { local integer this150 this_150 = alloc_D185(); construct_D106(this_150); return this_150; } function construct_D106(integer this168) { construct_C296(this_168); D_init173(this_168); } function error205(string msg154) { $debugPrint149((msg_154 + (" " + #getStackTrace()))); } function alloc_D185() returns integer { local integer this119 if (C_firstFree_341 == 0) { if (C_maxIndex_939 < 32768) { C_maxIndex_939 = (C_maxIndex_939 + 1); this_119 = C_maxIndex_939; C_typeId_137[this_119] = 2; } else { error205("Out of memory: Could not create D."); this_119 = 0; }; } else { C_firstFree_341 = (C_firstFree_341 - 1); this_119 = C_nextFree_125[C_firstFree_341]; C_typeId_137[this_119] = 2; }; return this_119; } function dispatch_C_test_C_bar442(integer this594) returns integer { local integer test_C_bar_result167 if (C_typeId_137[this_594] == 0) { if (this_594 == 0) { error205("Nullpointer exception when calling C.bar"); } else { error205("Called C.bar on invalid object."); }; } else { }; test_C_bar_result_167 = C_bar149(this_594); return test_C_bar_result_167; } function dispatch_C_test_C_foo139(integer this237) returns integer { local integer test_C_foo_result781 if (C_typeId_137[this_237] == 0) { if (this_237 == 0) { error205("Nullpointer exception when calling C.foo"); } else { error205("Called C.foo on invalid object."); }; } else { }; if (C_typeId_137[this_237] <= 1) { test_C_foo_result_781 = C_foo527(this_237); } else { test_C_foo_result_781 = D_foo941(this_237); }; return test_C_foo_result_781; }