array C_nextFree184 integer C_firstFree121 integer C_maxIndex431 array C_typeId120 integer C_firstFree121 = 0 integer C_maxIndex431 = 0 function initGlobals611() { C_firstFree_121 = 0; C_maxIndex_431 = 0; } function main115() { initGlobals611(); init_test175(); } function config970() { } function init_test175() { local integer e915 e_915 = new_E152(); if (dispatch_C_test_C_foo998(e_915) == 4) { testSuccess546(); } else { }; } IS_NATIVE function testSuccess546() { } function C_foo181(integer this366) returns integer { return 3; } function C_init155(integer this101) { } function construct_C120(integer this380) { C_init155(this_380); } function D_init117(integer this140) { } function construct_D816(integer this256) { construct_C120(this_256); D_init117(this_256); } function E_foo855(integer this738) returns integer { return 4; } function E_init196(integer this181) { } function new_E152() returns integer { local integer this548 this_548 = alloc_E414(); construct_E776(this_548); return this_548; } function construct_E776(integer this409) { construct_D816(this_409); E_init196(this_409); } function error502(string msg133) { $debugPrint881((msg_133 + (" " + #getStackTrace()))); } function alloc_E414() returns integer { local integer this484 if (C_firstFree_121 == 0) { if (C_maxIndex_431 < 32768) { C_maxIndex_431 = (C_maxIndex_431 + 1); this_484 = C_maxIndex_431; C_typeId_120[this_484] = 3; } else { error502("Out of memory: Could not create E."); this_484 = 0; }; } else { C_firstFree_121 = (C_firstFree_121 - 1); this_484 = C_nextFree_184[C_firstFree_121]; C_typeId_120[this_484] = 3; }; return this_484; } function dispatch_C_test_C_foo998(integer this561) returns integer { local integer test_C_foo_result183 if (C_typeId_120[this_561] == 0) { if (this_561 == 0) { error502("Nullpointer exception when calling C.foo"); } else { error502("Called C.foo on invalid object."); }; } else { }; if (C_typeId_120[this_561] <= 2) { test_C_foo_result_183 = C_foo181(this_561); } else { test_C_foo_result_183 = E_foo855(this_561); }; return test_C_foo_result_183; }