array C_nextFree106 integer C_firstFree116 integer C_maxIndex389 array C_typeId138 integer C_firstFree116 = 0 integer C_maxIndex389 = 0 function initGlobals520() { } function main212() { initGlobals520(); init_test106(); } function config562() { } function init_test106() { local integer c142 c_142 = new_C960(); if (dispatch_C_test_C_A_getBar125(c_142) != 3) { testFail136("fail"); } else { }; testSuccess318(); } IS_NATIVE function testFail136(string msg184) { } IS_NATIVE function testSuccess318() { } function new_C960() returns integer { local integer this115 local integer this413 if (C_firstFree_116 == 0) { if (C_maxIndex_389 < 32768) { C_maxIndex_389 = (C_maxIndex_389 + 1); this_413 = C_maxIndex_389; C_typeId_138[this_413] = 1; } else { error706("Out of memory: Could not create C."); this_413 = 0; }; } else { C_firstFree_116 = (C_firstFree_116 - 1); this_413 = C_nextFree_106[C_firstFree_116]; C_typeId_138[this_413] = 1; }; this_115 = this_413; return this_115; } function error706(string msg187) { $debugPrint145((msg_187 + (" " + #getStackTrace()))); } function dispatch_C_test_C_A_getBar125(integer this925) returns integer { local integer test_C_A_getBar_result132 local integer this194 local integer this160 local integer test_C_getFoo_result564 if (C_typeId_138[this_925] == 0) { if (this_925 == 0) { error706("Nullpointer exception when calling C.getBar"); } else { error706("Called C.getBar on invalid object."); }; } else { }; this_194 = this_925; this_160 = this_194; if (C_typeId_138[this_160] == 0) { if (this_160 == 0) { error706("Nullpointer exception when calling C.getFoo"); } else { error706("Called C.getFoo on invalid object."); }; } else { }; test_C_getFoo_result_564 = 2; test_C_A_getBar_result_132 = (test_C_getFoo_result_564 + 1); return test_C_A_getBar_result_132; }