array C_nextFree494 integer C_firstFree104 integer C_maxIndex799 array C_typeId135 integer C_firstFree104 = 0 integer C_maxIndex799 = 0 function initGlobals171() { C_firstFree_104 = 0; C_maxIndex_799 = 0; } function main865() { initGlobals171(); init_test205(); } function config436() { } function init_test205() { local integer e173 e_173 = new_E190(); if (dispatch_D_test_D_bla497(e_173) == 4) { testSuccess213(); } else { }; } IS_NATIVE function testSuccess213() { } function C_foo460(integer this169) returns integer { return 3; } function C_init110(integer this509) { } function construct_C145(integer this146) { C_init110(this_146); } function D_bla442(integer this163) returns integer { return dispatch_C_test_C_foo581(this_163); } function D_init174(integer this937) { } function construct_D408(integer this651) { construct_C145(this_651); D_init174(this_651); } function E_foo169(integer this153) returns integer { return 4; } function E_init752(integer this197) { } function new_E190() returns integer { local integer this129 this_129 = alloc_E233(); construct_E134(this_129); return this_129; } function construct_E134(integer this181) { construct_D408(this_181); E_init752(this_181); } function error640(string msg262) { $debugPrint706((msg_262 + (" " + #getStackTrace()))); } function alloc_E233() returns integer { local integer this115 if (C_firstFree_104 == 0) { if (C_maxIndex_799 < 32768) { C_maxIndex_799 = (C_maxIndex_799 + 1); this_115 = C_maxIndex_799; C_typeId_135[this_115] = 3; } else { error640("Out of memory: Could not create E."); this_115 = 0; }; } else { C_firstFree_104 = (C_firstFree_104 - 1); this_115 = C_nextFree_494[C_firstFree_104]; C_typeId_135[this_115] = 3; }; return this_115; } function dispatch_C_test_C_foo581(integer this185) returns integer { local integer test_C_foo_result181 if (C_typeId_135[this_185] == 0) { if (this_185 == 0) { error640("Nullpointer exception when calling C.foo"); } else { error640("Called C.foo on invalid object."); }; } else { }; if (C_typeId_135[this_185] <= 2) { test_C_foo_result_181 = C_foo460(this_185); } else { test_C_foo_result_181 = E_foo169(this_185); }; return test_C_foo_result_181; } function dispatch_D_test_D_bla497(integer this123) returns integer { local integer test_D_bla_result197 if (C_typeId_135[this_123] == 0) { if (this_123 == 0) { error640("Nullpointer exception when calling D.bla"); } else { error640("Called D.bla on invalid object."); }; } else { }; test_D_bla_result_197 = D_bla442(this_123); return test_D_bla_result_197; }