array C_nextFree138 integer C_firstFree199 integer C_maxIndex788 array C_typeId200 array C_i185 integer C_firstFree199 = 0 integer C_maxIndex788 = 0 function initGlobals630() { } function main948() { initGlobals630(); init_test208(); } function config106() { } function init_test208() { if (dispatch_D_test_D_foo801(new_D505()) == 6) { testSuccess148(); } else { }; } IS_NATIVE function testSuccess148() { } function C_init497(integer this168) { C_i_185[this_168] = 5; } function construct_C187(integer this157) { C_init497(this_157); } function D_foo546(integer this125) returns integer { return (C_i_185[this_125] + 1); } function D_init630(integer this148) { } function new_D505() returns integer { local integer this305 this_305 = alloc_D138(); construct_D906(this_305); return this_305; } function construct_D906(integer this209) { construct_C187(this_209); D_init630(this_209); } function error123(string msg543) { $debugPrint121((msg_543 + (" " + #getStackTrace()))); } function alloc_D138() returns integer { local integer this702 if (C_firstFree_199 == 0) { if (C_maxIndex_788 < 32768) { C_maxIndex_788 = (C_maxIndex_788 + 1); this_702 = C_maxIndex_788; C_typeId_200[this_702] = 2; } else { error123("Out of memory: Could not create D."); this_702 = 0; }; } else { C_firstFree_199 = (C_firstFree_199 - 1); this_702 = C_nextFree_138[C_firstFree_199]; C_typeId_200[this_702] = 2; }; return this_702; } function dispatch_D_test_D_foo801(integer this195) returns integer { if (C_typeId_200[this_195] == 0) { if (this_195 == 0) { error123("Nullpointer exception when calling D.foo"); } else { error123("Called D.foo on invalid object."); }; } else { }; return D_foo546(this_195); }