array C_nextFree117 integer C_firstFree166 integer C_maxIndex193 array C_typeId127 integer C_firstFree166 = 0 integer C_maxIndex193 = 0 function initGlobals893() { } function main590() { initGlobals893(); init_test171(); } function config134() { } function init_test171() { if (dispatch_C_test_C_foo407(new_C491()) != 4) { testFail192("foo fail"); } else { }; testSuccess101(); } IS_NATIVE function testFail192(string msg765) { } IS_NATIVE function testSuccess101() { } function C_foo810(integer this209) returns integer { return 4; } function C_init648(integer this165) { construct_C_A200(this_165); construct_C_B175(this_165); } function construct_C_A200(integer this780) { } function construct_C_B175(integer this102) { } function new_C491() returns integer { local integer this513 this_513 = alloc_C121(); construct_C136(this_513); return this_513; } function construct_C136(integer this151) { C_init648(this_151); } function alloc_C121() returns integer { local integer this396 if (C_firstFree_166 == 0) { if (C_maxIndex_193 < 32768) { C_maxIndex_193 = (C_maxIndex_193 + 1); this_396 = C_maxIndex_193; C_typeId_127[this_396] = 1; } else { error785("Out of memory: Could not create C."); this_396 = 0; }; } else { C_firstFree_166 = (C_firstFree_166 - 1); this_396 = C_nextFree_117[C_firstFree_166]; C_typeId_127[this_396] = 1; }; return this_396; } function error785(string msg475) { $debugPrint153((msg_475 + (" " + #getStackTrace()))); } function dispatch_C_test_C_foo407(integer this118) returns integer { if (C_typeId_127[this_118] == 0) { if (this_118 == 0) { error785("Nullpointer exception when calling C.foo"); } else { error785("Called C.foo on invalid object."); }; } else { }; return C_foo810(this_118); }