array C_nextFree124 integer C_firstFree143 integer C_maxIndex199 array C_typeId124 integer C_firstFree143 = 0 integer C_maxIndex199 = 0 function initGlobals149() { C_firstFree_143 = 0; C_maxIndex_199 = 0; } function main178() { initGlobals149(); init_test178(); } function config302() { } function init_test178() { if (dispatch_C_test_C_foo149(new_D147()) == 3) { testSuccess199(); } else { }; } IS_NATIVE function testSuccess199() { } function C_foo738(integer this349) returns integer { return 3; } function C_init999(integer this841) { } function construct_C940(integer this369) { C_init999(this_369); } function D_init420(integer this785) { } function new_D147() returns integer { local integer this118 this_118 = alloc_D173(); construct_D142(this_118); return this_118; } function construct_D142(integer this142) { construct_C940(this_142); D_init420(this_142); } function error929(string msg121) { $debugPrint163((msg_121 + (" " + #getStackTrace()))); } function alloc_D173() returns integer { local integer this164 if (C_firstFree_143 == 0) { if (C_maxIndex_199 < 32768) { C_maxIndex_199 = (C_maxIndex_199 + 1); this_164 = C_maxIndex_199; C_typeId_124[this_164] = 2; } else { error929("Out of memory: Could not create D."); this_164 = 0; }; } else { C_firstFree_143 = (C_firstFree_143 - 1); this_164 = C_nextFree_124[C_firstFree_143]; C_typeId_124[this_164] = 2; }; return this_164; } function dispatch_C_test_C_foo149(integer this182) returns integer { local integer test_C_foo_result954 if (C_typeId_124[this_182] == 0) { if (this_182 == 0) { error929("Nullpointer exception when calling C.foo"); } else { error929("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_954 = C_foo738(this_182); return test_C_foo_result_954; }