integer test_x757 array B_nextFree717 integer B_firstFree182 integer B_maxIndex111 array B_typeId101 array B_y823 integer test_x757 = 2 integer B_firstFree182 = 0 integer B_maxIndex111 = 0 function initGlobals213() { B_firstFree_182 = 0; B_maxIndex_111 = 0; } function main885() { initGlobals213(); init_test295(); } function config335() { } function init_test295() { local integer a115 test_x_757 = 2; a_115 = new_A251(); dispatch_A_test_A_foo302(a_115); if (test_x_757 == 8) { testSuccess173(); } else { }; } IS_NATIVE function testSuccess173() { } function A_foo200(integer this104) { test_x_757 = (test_x_757 + B_y_823[this_104]); B_foo666(this_104); } function A_init925(integer this165) { } function new_A251() returns integer { local integer this195 this_195 = alloc_A109(); construct_A143(this_195); return this_195; } function construct_A143(integer this107) { construct_B302(this_107); A_init925(this_107); } function B_foo666(integer this110) { test_x_757 = (test_x_757 * B_y_823[this_110]); } function B_init101(integer this126) { B_y_823[this_126] = 2; } function construct_B302(integer this115) { B_init101(this_115); } function alloc_A109() returns integer { local integer this648 if (B_firstFree_182 == 0) { if (B_maxIndex_111 < 32768) { B_maxIndex_111 = (B_maxIndex_111 + 1); this_648 = B_maxIndex_111; B_typeId_101[this_648] = 2; } else { error197("Out of memory: Could not create A."); this_648 = 0; }; } else { B_firstFree_182 = (B_firstFree_182 - 1); this_648 = B_nextFree_717[B_firstFree_182]; B_typeId_101[this_648] = 2; }; return this_648; } function error197(string msg580) { $debugPrint486((msg_580 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo302(integer this161) { if (B_typeId_101[this_161] == 0) { if (this_161 == 0) { error197("Nullpointer exception when calling A.foo"); } else { error197("Called A.foo on invalid object."); }; } else { }; A_foo200(this_161); }