array C_nextFree181 integer C_firstFree245 integer C_maxIndex197 array C_typeId945 integer C_firstFree245 = 0 integer C_maxIndex197 = 0 function initGlobals268() { } function main214() { initGlobals268(); if (dispatch_C_test_C_bar192(new_D175()) == 4) { testSuccess185(); } else { }; } function config183() { } IS_NATIVE function testSuccess185() { } function new_D175() returns integer { local integer this217 if (C_firstFree_245 == 0) { if (C_maxIndex_197 < 32768) { C_maxIndex_197 = (C_maxIndex_197 + 1); this_217 = C_maxIndex_197; C_typeId_945[this_217] = 2; } else { error575("Out of memory: Could not create D."); this_217 = 0; }; } else { C_firstFree_245 = (C_firstFree_245 - 1); this_217 = C_nextFree_181[C_firstFree_245]; C_typeId_945[this_217] = 2; }; return this_217; } function error575(string msg904) { $debugPrint443((msg_904 + (" " + #getStackTrace()))); } function dispatch_C_test_C_bar192(integer this604) returns integer { if (C_typeId_945[this_604] == 0) { if (this_604 == 0) { error575("Nullpointer exception when calling C.bar"); } else { error575("Called C.bar on invalid object."); }; } else { }; if (C_typeId_945[this_604] == 0) { if (this_604 == 0) { error575("Nullpointer exception when calling C.foo"); } else { error575("Called C.foo on invalid object."); }; } else { }; return 4; }