array C_nextFree142 integer C_firstFree493 integer C_maxIndex210 array C_typeId700 array C_x160 integer C_firstFree493 = 0 integer C_maxIndex210 = 0 function initGlobals128() { C_firstFree_493 = 0; C_maxIndex_210 = 0; } function main108() { initGlobals128(); init_test196(); } function config109() { } function init_test196() { local integer c171 local string s153 c_171 = new_C165(); dispatch_C_test_C_setX_1655(c_171, stringToIndex212("42")); s_153 = stringFromIndex812(dispatch_C_test_C_getX207(c_171)); if (s_153 == "42") { testSuccess169(); } else { }; } function stringToIndex212(string s167) returns integer { return 42; } function stringFromIndex812(integer i147) returns string { return "42"; } IS_NATIVE function testSuccess169() { } function C_getX482(integer this636) returns any { return C_x_160[this_636]; } function C_init656(integer this150) { } function new_C165() returns integer { local integer this123 this_123 = alloc_C169(); construct_C166(this_123); return this_123; } function construct_C166(integer this211) { C_init656(this_211); } function alloc_C169() returns integer { local integer this711 if (C_firstFree_493 == 0) { if (C_maxIndex_210 < 32768) { C_maxIndex_210 = (C_maxIndex_210 + 1); this_711 = C_maxIndex_210; C_typeId_700[this_711] = 1; } else { error129("Out of memory: Could not create C."); this_711 = 0; }; } else { C_firstFree_493 = (C_firstFree_493 - 1); this_711 = C_nextFree_142[C_firstFree_493]; C_typeId_700[this_711] = 1; }; return this_711; } function error129(string msg158) { $debugPrint516((msg_158 + (" " + #getStackTrace()))); } function dispatch_C_test_C_getX207(integer this804) returns any { local any test_C_getX_result189 if (C_typeId_700[this_804] == 0) { if (this_804 == 0) { error129("Nullpointer exception when calling C.getX"); } else { error129("Called C.getX on invalid object."); }; } else { }; test_C_getX_result_189 = C_getX482(this_804); return test_C_getX_result_189; } function C_setX_1212(integer this756, any xs_0642) { C_x_160[this_756] = xs_0_642; } function dispatch_C_test_C_setX_1655(integer this136, any xs_0268) { if (C_typeId_700[this_136] == 0) { if (this_136 == 0) { error129("Nullpointer exception when calling C.setX"); } else { error129("Called C.setX on invalid object."); }; } else { }; C_setX_1212(this_136, xs_0_268); }