integer test_i806 array A_nextFree995 integer A_firstFree403 integer A_maxIndex103 array A_typeId532 integer A_firstFree403 = 0 integer A_maxIndex103 = 0 function initGlobals462() { A_firstFree_403 = 0; A_maxIndex_103 = 0; } function main207() { initGlobals462(); init_test121(); } function config105() { } function init_test121() { local integer b312 b_312 = new_B900(); if (dispatch_A_test_A_foo637(b_312) == 8) { testSuccess147(); } else { }; } IS_NATIVE function testSuccess147() { } function A_init110(integer this595) { } function construct_A199(integer this127) { A_init110(this_127); } function B_foo347(integer this117) returns integer { test_i_806 = 8; return test_i_806; } function B_init122(integer this209) { } function new_B900() returns integer { local integer this190 this_190 = alloc_B706(); construct_B120(this_190); return this_190; } function construct_B120(integer this397) { construct_A199(this_397); B_init122(this_397); } function error196(string msg127) { $debugPrint193((msg_127 + (" " + #getStackTrace()))); } function alloc_B706() returns integer { local integer this195 if (A_firstFree_403 == 0) { if (A_maxIndex_103 < 32768) { A_maxIndex_103 = (A_maxIndex_103 + 1); this_195 = A_maxIndex_103; A_typeId_532[this_195] = 2; } else { error196("Out of memory: Could not create B."); this_195 = 0; }; } else { A_firstFree_403 = (A_firstFree_403 - 1); this_195 = A_nextFree_995[A_firstFree_403]; A_typeId_532[this_195] = 2; }; return this_195; } function dispatch_A_test_A_foo637(integer this189) returns integer { local integer test_A_foo_result191 if (A_typeId_532[this_189] == 0) { if (this_189 == 0) { error196("Nullpointer exception when calling A.foo"); } else { error196("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_191 = B_foo347(this_189); return test_A_foo_result_191; }