array D_nextFree521 integer D_firstFree101 integer D_maxIndex212 array D_typeId135 array D_B_A_x110 integer D_firstFree101 = 0 integer D_maxIndex212 = 0 function initGlobals204() { D_firstFree_101 = 0; D_maxIndex_212 = 0; } function main883() { initGlobals204(); init_test130(); } function config689() { } function init_test130() { local integer d175 d_175 = new_D815(); dispatch_D_test_D_setX148(d_175, 4); if (dispatch_D_test_D_getX134(d_175) != 4) { testFail826("foo fail"); } else { }; testSuccess173(); } IS_NATIVE function testFail826(string msg281) { } IS_NATIVE function testSuccess173() { } function D_setX177(integer this137, integer x700) { D_B_A_setX166(this_137, x_700); } function D_B_A_setX166(integer this371, integer x160) { D_B_A_x_110[this_371] = x_160; } function D_getX884(integer this970) returns integer { return D_B_A_getX721(this_970); } function D_B_A_getX721(integer this605) returns integer { return D_B_A_x_110[this_605]; } function D_init190(integer this131) { construct_D_B167(this_131); construct_D_C635(this_131); } function construct_D_B167(integer this448) { construct_D_B_A410(this_448); } function construct_D_C635(integer this182) { construct_D_C_A174(this_182); } function construct_D_B_A410(integer this146) { } function construct_D_C_A174(integer this562) { } function new_D815() returns integer { local integer this106 this_106 = alloc_D148(); construct_D186(this_106); return this_106; } function construct_D186(integer this955) { D_init190(this_955); } function alloc_D148() returns integer { local integer this183 if (D_firstFree_101 == 0) { if (D_maxIndex_212 < 32768) { D_maxIndex_212 = (D_maxIndex_212 + 1); this_183 = D_maxIndex_212; D_typeId_135[this_183] = 1; } else { error125("Out of memory: Could not create D."); this_183 = 0; }; } else { D_firstFree_101 = (D_firstFree_101 - 1); this_183 = D_nextFree_521[D_firstFree_101]; D_typeId_135[this_183] = 1; }; return this_183; } function error125(string msg134) { $debugPrint115((msg_134 + (" " + #getStackTrace()))); } function dispatch_D_test_D_setX148(integer this131, integer x186) { if (D_typeId_135[this_131] == 0) { if (this_131 == 0) { error125("Nullpointer exception when calling D.setX"); } else { error125("Called D.setX on invalid object."); }; } else { }; D_setX177(this_131, x_186); } function dispatch_D_test_D_getX134(integer this215) returns integer { local integer test_D_getX_result163 if (D_typeId_135[this_215] == 0) { if (this_215 == 0) { error125("Nullpointer exception when calling D.getX"); } else { error125("Called D.getX on invalid object."); }; } else { }; test_D_getX_result_163 = D_getX884(this_215); return test_D_getX_result_163; }