array C_nextFree445 integer C_firstFree315 integer C_maxIndex740 array C_typeId548 integer C_firstFree315 = 0 integer C_maxIndex740 = 0 function initGlobals160() { C_firstFree_315 = 0; C_maxIndex_740 = 0; } function main797() { initGlobals160(); init_test196(); } function config253() { } function init_test196() { local integer c202 c_202 = new_C960(); if (dispatch_C_test_C_B_foo722(c_202) != 3) { testFail155("foo fail"); } else { }; if (dispatch_C_test_C_B_A_bar109(c_202) != 2) { testFail155("bar fail"); } else { }; testSuccess152(); } IS_NATIVE function testFail155(string msg138) { } IS_NATIVE function testSuccess152() { } function C_B_foo692(integer this189) returns integer { return 3; } function C_B_A_bar291(integer this162) returns integer { return 2; } function C_init163(integer this494) { construct_C_B175(this_494); } function construct_C_B175(integer this990) { construct_C_B_A211(this_990); } function construct_C_B_A211(integer this106) { } function new_C960() returns integer { local integer this983 this_983 = alloc_C902(); construct_C117(this_983); return this_983; } function construct_C117(integer this144) { C_init163(this_144); } function alloc_C902() returns integer { local integer this121 if (C_firstFree_315 == 0) { if (C_maxIndex_740 < 32768) { C_maxIndex_740 = (C_maxIndex_740 + 1); this_121 = C_maxIndex_740; C_typeId_548[this_121] = 1; } else { error939("Out of memory: Could not create C."); this_121 = 0; }; } else { C_firstFree_315 = (C_firstFree_315 - 1); this_121 = C_nextFree_445[C_firstFree_315]; C_typeId_548[this_121] = 1; }; return this_121; } function error939(string msg891) { $debugPrint141((msg_891 + (" " + #getStackTrace()))); } function dispatch_C_test_C_B_foo722(integer this138) returns integer { local integer test_C_B_foo_result150 if (C_typeId_548[this_138] == 0) { if (this_138 == 0) { error939("Nullpointer exception when calling C.foo"); } else { error939("Called C.foo on invalid object."); }; } else { }; test_C_B_foo_result_150 = C_B_foo692(this_138); return test_C_B_foo_result_150; } function dispatch_C_test_C_B_A_bar109(integer this455) returns integer { local integer test_C_B_A_bar_result100 if (C_typeId_548[this_455] == 0) { if (this_455 == 0) { error939("Nullpointer exception when calling C.bar"); } else { error939("Called C.bar on invalid object."); }; } else { }; test_C_B_A_bar_result_100 = C_B_A_bar291(this_455); return test_C_B_A_bar_result_100; }