array A_nextFree137 integer A_firstFree209 integer A_maxIndex501 array A_typeId100 integer A_firstFree209 = 0 integer A_maxIndex501 = 0 function initGlobals145() { A_firstFree_209 = 0; A_maxIndex_501 = 0; } function main142() { initGlobals145(); init_test499(); } function config207() { } function init_test499() { local integer b141 b_141 = new_B246(); if (dispatch_A_test_A_foo832(b_141) == 42) { testSuccess675(); } else { }; } IS_NATIVE function testSuccess675() { } function A_foo208(integer this707) returns integer { return 42; } function A_init203(integer this100) { } function construct_A880(integer this521) { A_init203(this_521); } function B_init877(integer this126) { } function new_B246() returns integer { local integer this160 this_160 = alloc_B191(); construct_B144(this_160); return this_160; } function construct_B144(integer this766) { construct_A880(this_766); B_init877(this_766); } function error201(string msg109) { $debugPrint575((msg_109 + (" " + #getStackTrace()))); } function alloc_B191() returns integer { local integer this100 if (A_firstFree_209 == 0) { if (A_maxIndex_501 < 32768) { A_maxIndex_501 = (A_maxIndex_501 + 1); this_100 = A_maxIndex_501; A_typeId_100[this_100] = 2; } else { error201("Out of memory: Could not create B."); this_100 = 0; }; } else { A_firstFree_209 = (A_firstFree_209 - 1); this_100 = A_nextFree_137[A_firstFree_209]; A_typeId_100[this_100] = 2; }; return this_100; } function dispatch_A_test_A_foo832(integer this846) returns integer { local integer test_A_foo_result140 if (A_typeId_100[this_846] == 0) { if (this_846 == 0) { error201("Nullpointer exception when calling A.foo"); } else { error201("Called A.foo on invalid object."); }; } else { }; test_A_foo_result_140 = A_foo208(this_846); return test_A_foo_result_140; }