array C_nextFree688 integer C_firstFree210 integer C_maxIndex724 array C_typeId102 integer C_firstFree210 = 0 integer C_maxIndex724 = 0 function initGlobals155() { C_firstFree_210 = 0; C_maxIndex_724 = 0; } function main158() { initGlobals155(); init_test978(); } function config811() { } function init_test978() { local integer c103 c_103 = new_C117(); if (dispatch_C_test_C_A_getBar329(c_103) != 3) { testFail158("fail"); } else { }; testSuccess428(); } IS_NATIVE function testFail158(string msg118) { } IS_NATIVE function testSuccess428() { } function C_getFoo206(integer this802) returns integer { return 2; } function C_A_getBar105(integer this166) returns integer { return (dispatch_C_test_C_getFoo278(this_166) + 1); } function C_init182(integer this123) { construct_C_A646(this_123); } function construct_C_A646(integer this107) { } function new_C117() returns integer { local integer this180 this_180 = alloc_C118(); construct_C380(this_180); return this_180; } function construct_C380(integer this158) { C_init182(this_158); } function alloc_C118() returns integer { local integer this152 if (C_firstFree_210 == 0) { if (C_maxIndex_724 < 32768) { C_maxIndex_724 = (C_maxIndex_724 + 1); this_152 = C_maxIndex_724; C_typeId_102[this_152] = 1; } else { error864("Out of memory: Could not create C."); this_152 = 0; }; } else { C_firstFree_210 = (C_firstFree_210 - 1); this_152 = C_nextFree_688[C_firstFree_210]; C_typeId_102[this_152] = 1; }; return this_152; } function error864(string msg205) { $debugPrint169((msg_205 + (" " + #getStackTrace()))); } function dispatch_C_test_C_getFoo278(integer this203) returns integer { local integer test_C_getFoo_result860 if (C_typeId_102[this_203] == 0) { if (this_203 == 0) { error864("Nullpointer exception when calling C.getFoo"); } else { error864("Called C.getFoo on invalid object."); }; } else { }; test_C_getFoo_result_860 = C_getFoo206(this_203); return test_C_getFoo_result_860; } function dispatch_C_test_C_A_getBar329(integer this181) returns integer { local integer test_C_A_getBar_result794 if (C_typeId_102[this_181] == 0) { if (this_181 == 0) { error864("Nullpointer exception when calling C.getBar"); } else { error864("Called C.getBar on invalid object."); }; } else { }; test_C_A_getBar_result_794 = C_A_getBar105(this_181); return test_C_A_getBar_result_794; }