array A_nextFree546 integer A_firstFree125 integer A_maxIndex116 array A_typeId186 integer A_firstFree125 = 0 integer A_maxIndex116 = 0 function initGlobals204() { A_firstFree_125 = 0; A_maxIndex_116 = 0; } function main765() { initGlobals204(); init_test889(); } function config149() { } function init_test889() { local integer b113 local integer clVar196 clVar_196 = alloc_B_test331(); construct_B100(clVar_196); b_113 = clVar_196; dispatch_B_test_B_foo131(b_113, 5); } IS_NATIVE function testSuccess185() { } function foo_test590(integer this786, integer i189) { testSuccess185(); } function A_init131(integer this171) { } function construct_A123(integer this145) { A_init131(this_145); } function B_init106(integer this761) { } function construct_B100(integer this178) { construct_A123(this_178); B_init106(this_178); } function alloc_B_test331() returns integer { local integer this554 if (A_firstFree_125 == 0) { if (A_maxIndex_116 < 32768) { A_maxIndex_116 = (A_maxIndex_116 + 1); this_554 = A_maxIndex_116; A_typeId_186[this_554] = 3; } else { error196("Out of memory: Could not create B_test."); this_554 = 0; }; } else { A_firstFree_125 = (A_firstFree_125 - 1); this_554 = A_nextFree_546[A_firstFree_125]; A_typeId_186[this_554] = 3; }; return this_554; } function error196(string msg809) { $debugPrint134((msg_809 + (" " + #getStackTrace()))); } function dispatch_B_test_B_foo131(integer this204, integer x236) { if (A_typeId_186[this_204] == 0) { if (this_204 == 0) { error196("Nullpointer exception when calling B.foo"); } else { error196("Called B.foo on invalid object."); }; } else { }; foo_test590(this_204, x_236); }