array C_nextFree204 integer C_firstFree862 integer C_maxIndex589 array C_typeId198 integer C_firstFree862 = 0 integer C_maxIndex589 = 0 function initGlobals623() { } function main183() { initGlobals623(); init_test191(); } function config234() { } function init_test191() { local integer c185 c_185 = new_C145(); if (dispatch_C_test_C_B_foo165(c_185) != 3) { testFail174("foo fail"); } else { }; if (dispatch_C_test_C_B_A_bar208(c_185) != 2) { testFail174("bar fail"); } else { }; testSuccess142(); } IS_NATIVE function testFail174(string msg113) { } IS_NATIVE function testSuccess142() { } function C_B_foo139(integer this151) returns integer { return 3; } function C_B_A_bar127(integer this214) returns integer { return 2; } function C_init627(integer this186) { construct_C_B875(this_186); } function construct_C_B875(integer this979) { construct_C_B_A201(this_979); } function construct_C_B_A201(integer this335) { } function new_C145() returns integer { local integer this667 this_667 = alloc_C135(); construct_C693(this_667); return this_667; } function construct_C693(integer this154) { C_init627(this_154); } function alloc_C135() returns integer { local integer this782 if (C_firstFree_862 == 0) { if (C_maxIndex_589 < 32768) { C_maxIndex_589 = (C_maxIndex_589 + 1); this_782 = C_maxIndex_589; C_typeId_198[this_782] = 1; } else { error161("Out of memory: Could not create C."); this_782 = 0; }; } else { C_firstFree_862 = (C_firstFree_862 - 1); this_782 = C_nextFree_204[C_firstFree_862]; C_typeId_198[this_782] = 1; }; return this_782; } function error161(string msg879) { $debugPrint358((msg_879 + (" " + #getStackTrace()))); } function dispatch_C_test_C_B_foo165(integer this562) returns integer { if (C_typeId_198[this_562] == 0) { if (this_562 == 0) { error161("Nullpointer exception when calling C.foo"); } else { error161("Called C.foo on invalid object."); }; } else { }; return C_B_foo139(this_562); } function dispatch_C_test_C_B_A_bar208(integer this945) returns integer { if (C_typeId_198[this_945] == 0) { if (this_945 == 0) { error161("Nullpointer exception when calling C.bar"); } else { error161("Called C.bar on invalid object."); }; } else { }; return C_B_A_bar127(this_945); }