array C_nextFree170 integer C_firstFree113 integer C_maxIndex970 array C_typeId136 integer C_firstFree113 = 0 integer C_maxIndex970 = 0 function initGlobals173() { } function main189() { initGlobals173(); if (dispatch_C_test_C_bar189(new_D189()) == 4) { testSuccess249(); } else { }; } function config113() { } IS_NATIVE function testSuccess249() { } function new_D189() returns integer { local integer this223 local integer this171 if (C_firstFree_113 == 0) { if (C_maxIndex_970 < 32768) { C_maxIndex_970 = (C_maxIndex_970 + 1); this_171 = C_maxIndex_970; C_typeId_136[this_171] = 2; } else { error543("Out of memory: Could not create D."); this_171 = 0; }; } else { C_firstFree_113 = (C_firstFree_113 - 1); this_171 = C_nextFree_170[C_firstFree_113]; C_typeId_136[this_171] = 2; }; this_223 = this_171; return this_223; } function error543(string msg777) { $debugPrint182((msg_777 + (" " + #getStackTrace()))); } function dispatch_C_test_C_bar189(integer this130) returns integer { local integer test_C_bar_result204 local integer this123 local integer this106 local integer test_C_foo_result183 if (C_typeId_136[this_130] == 0) { if (this_130 == 0) { error543("Nullpointer exception when calling C.bar"); } else { error543("Called C.bar on invalid object."); }; } else { }; this_123 = this_130; this_106 = this_123; if (C_typeId_136[this_106] == 0) { if (this_106 == 0) { error543("Nullpointer exception when calling C.foo"); } else { error543("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_183 = 3; test_C_bar_result_204 = (test_C_foo_result_183 + 1); return test_C_bar_result_204; }