array A_nextFree165 integer A_firstFree979 integer A_maxIndex170 array A_typeId611 integer A_firstFree979 = 0 integer A_maxIndex170 = 0 function initGlobals631() { } function main894() { initGlobals631(); init_test890(); } function config251() { } function init_test890() { local integer clVar198 clVar_198 = alloc_B_test213(); construct_B449(clVar_198); dispatch_B_test_B_foo165(clVar_198, 5); } IS_NATIVE function testSuccess121() { } function foo_test182(integer this176, integer i220) { testSuccess121(); } function A_init107(integer this102) { } function construct_A185(integer this305) { A_init107(this_305); } function B_init190(integer this214) { } function construct_B449(integer this161) { construct_A185(this_161); B_init190(this_161); } function alloc_B_test213() returns integer { local integer this918 if (A_firstFree_979 == 0) { if (A_maxIndex_170 < 32768) { A_maxIndex_170 = (A_maxIndex_170 + 1); this_918 = A_maxIndex_170; A_typeId_611[this_918] = 3; } else { error946("Out of memory: Could not create B_test."); this_918 = 0; }; } else { A_firstFree_979 = (A_firstFree_979 - 1); this_918 = A_nextFree_165[A_firstFree_979]; A_typeId_611[this_918] = 3; }; return this_918; } function error946(string msg141) { $debugPrint135((msg_141 + (" " + #getStackTrace()))); } function dispatch_B_test_B_foo165(integer this121, integer x108) { if (A_typeId_611[this_121] == 0) { if (this_121 == 0) { error946("Nullpointer exception when calling B.foo"); } else { error946("Called B.foo on invalid object."); }; } else { }; foo_test182(this_121, x_108); }