array C_nextFree847 integer C_firstFree194 integer C_maxIndex193 array C_typeId262 array C_i196 integer C_firstFree194 = 0 integer C_maxIndex193 = 0 function initGlobals147() { C_firstFree_194 = 0; C_maxIndex_193 = 0; } function main115() { initGlobals147(); init_test883(); } function config379() { } function init_test883() { if (dispatch_D_test_D_foo506(new_D159()) == 6) { testSuccess539(); } else { }; } IS_NATIVE function testSuccess539() { } function C_init169(integer this153) { C_i_196[this_153] = 5; } function construct_C831(integer this676) { C_init169(this_676); } function D_foo290(integer this150) returns integer { return (C_i_196[this_150] + 1); } function D_init116(integer this158) { } function new_D159() returns integer { local integer this203 this_203 = alloc_D776(); construct_D143(this_203); return this_203; } function construct_D143(integer this203) { construct_C831(this_203); D_init116(this_203); } function error123(string msg152) { $debugPrint430((msg_152 + (" " + #getStackTrace()))); } function alloc_D776() returns integer { local integer this167 if (C_firstFree_194 == 0) { if (C_maxIndex_193 < 32768) { C_maxIndex_193 = (C_maxIndex_193 + 1); this_167 = C_maxIndex_193; C_typeId_262[this_167] = 2; } else { error123("Out of memory: Could not create D."); this_167 = 0; }; } else { C_firstFree_194 = (C_firstFree_194 - 1); this_167 = C_nextFree_847[C_firstFree_194]; C_typeId_262[this_167] = 2; }; return this_167; } function dispatch_D_test_D_foo506(integer this266) returns integer { local integer test_D_foo_result210 if (C_typeId_262[this_266] == 0) { if (this_266 == 0) { error123("Nullpointer exception when calling D.foo"); } else { error123("Called D.foo on invalid object."); }; } else { }; test_D_foo_result_210 = D_foo290(this_266); return test_D_foo_result_210; }