array A_nextFree109 integer A_firstFree206 integer A_maxIndex160 array A_typeId203 array B_nextFree139 integer B_firstFree197 integer B_maxIndex187 array B_typeId623 integer A_firstFree206 = 0 integer A_maxIndex160 = 0 integer B_firstFree197 = 0 integer B_maxIndex187 = 0 function initGlobals963() { } function main833() { initGlobals963(); init_test202(); } function config917() { } function init_test202() { if (dispatch_B_test_A_B_foo510(dispatch_A_test_A_getB246(new_A933())) == 4) { testSuccess210(); } else { }; } IS_NATIVE function testSuccess210() { } function A_getB118(integer this749) returns integer { return new_B287(); } function A_init636(integer this715) { } function new_A933() returns integer { local integer this650 this_650 = alloc_A885(); construct_A171(this_650); return this_650; } function construct_A171(integer this173) { A_init636(this_173); } function new_B287() returns integer { local integer this276 this_276 = alloc_B187(); construct_B965(this_276); return this_276; } function B_foo207(integer this144) returns integer { return 4; } function B_init194(integer this115) { } function construct_B965(integer this814) { B_init194(this_814); } function alloc_A885() returns integer { local integer this115 if (A_firstFree_206 == 0) { if (A_maxIndex_160 < 32768) { A_maxIndex_160 = (A_maxIndex_160 + 1); this_115 = A_maxIndex_160; A_typeId_203[this_115] = 1; } else { error220("Out of memory: Could not create A."); this_115 = 0; }; } else { A_firstFree_206 = (A_firstFree_206 - 1); this_115 = A_nextFree_109[A_firstFree_206]; A_typeId_203[this_115] = 1; }; return this_115; } function error220(string msg155) { $debugPrint172((msg_155 + (" " + #getStackTrace()))); } function alloc_B187() returns integer { local integer this986 if (B_firstFree_197 == 0) { if (B_maxIndex_187 < 32768) { B_maxIndex_187 = (B_maxIndex_187 + 1); this_986 = B_maxIndex_187; B_typeId_623[this_986] = 2; } else { error220("Out of memory: Could not create B."); this_986 = 0; }; } else { B_firstFree_197 = (B_firstFree_197 - 1); this_986 = B_nextFree_139[B_firstFree_197]; B_typeId_623[this_986] = 2; }; return this_986; } function dispatch_A_test_A_getB246(integer this981) returns integer { if (A_typeId_203[this_981] == 0) { if (this_981 == 0) { error220("Nullpointer exception when calling A.getB"); } else { error220("Called A.getB on invalid object."); }; } else { }; return A_getB118(this_981); } function dispatch_B_test_A_B_foo510(integer this159) returns integer { if (B_typeId_623[this_159] == 0) { if (this_159 == 0) { error220("Nullpointer exception when calling B.foo"); } else { error220("Called B.foo on invalid object."); }; } else { }; return B_foo207(this_159); }