array A_nextFree549 integer A_firstFree228 integer A_maxIndex103 array A_typeId850 integer A_firstFree228 = 0 integer A_maxIndex103 = 0 function initGlobals924() { A_firstFree_228 = 0; A_maxIndex_103 = 0; } function main730() { initGlobals924(); init_test767(); } function config365() { } function init_test767() { local integer b200 b_200 = new_B193(); if (dispatch_A_test_A_foo162(b_200) == 42) { testSuccess336(); } else { }; } IS_NATIVE function testSuccess336() { } function A_foo133(integer this194) returns integer { return 42; } function A_init100(integer this775) { } function construct_A102(integer this397) { A_init100(this_397); } function B_init321(integer this109) { } function new_B193() returns integer { local integer this186 this_186 = alloc_B197(); construct_B799(this_186); return this_186; } function construct_B799(integer this181) { construct_A102(this_181); B_init321(this_181); } function error212(string msg504) { $debugPrint545((msg_504 + (" " + #getStackTrace()))); } function alloc_B197() returns integer { local integer this339 if (A_firstFree_228 == 0) { if (A_maxIndex_103 < 32768) { A_maxIndex_103 = (A_maxIndex_103 + 1); this_339 = A_maxIndex_103; A_typeId_850[this_339] = 2; } else { error212("Out of memory: Could not create B."); this_339 = 0; }; } else { A_firstFree_228 = (A_firstFree_228 - 1); this_339 = A_nextFree_549[A_firstFree_228]; A_typeId_850[this_339] = 2; }; return this_339; } function dispatch_A_test_A_foo162(integer this133) returns integer { local integer test_A_foo_result588 if (A_typeId_850[this_133] == 0) { if (this_133 == 0) { error212("Nullpointer exception when calling A.foo"); } else { error212("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_588 = A_foo133(this_133); return test_A_foo_result_588; }