text:
#include <lpcRuntime.h>

// "chess05ISO.pas"

//================================================================================
// command line argument map
_Filename _FilenameMapEntries[] =
{
    { "input" },
    { "output" },
};

_Filename* _FilenameMap = _FilenameMapEntries;
const int _FilenameMapSize = _countof(_FilenameMapEntries);

// line 0
//================================================================================
// scope: global scope (level : 0)

// types
typedef char T_boolean;
typedef char T_char;
typedef int T_integer;
typedef double T_real;
typedef _T_Text T_text;

// constants
const T_boolean C_false = 0;
const T_integer C_maxint = 2147483647;
const T_boolean C_true = 1;

// line 1
//================================================================================
// scope: program scope (level : 1)

// types
typedef _T_Set<0, 31> T_SX;
typedef _T_Array< 0, 1, T_SX > T_array_1;
typedef _T_Array< 0, 1, T_integer > T_array_2;
struct T_RS
{
    // variable fields
    union
    {
        T_array_1 RSSS;
        T_array_2 RSTI;
    };
};
typedef _T_Array< 0, 2, T_RS > T_arraytmofrs;
typedef _T_Array< 0, 16, T_RS > T_arraytkofrs;
typedef _T_Array< 0, 7, T_RS > T_arraytfofrs;
typedef _T_Range<1, 500, signed __int16> T_TW;
typedef _T_Array< 0, 16, T_TW > T_arraytkoftw;
typedef int T_TE;
typedef _T_Array< 0, 12, T_TE > T_arraytpofte;
typedef _T_Array< 0, 3, T_RS > T_arraytqofrs;
typedef _T_Array< 0, 7, T_RS > T_arraytrofrs;
typedef _T_Array< 0, 63, T_RS > T_RX;
typedef int T_TM;
typedef _T_Range<-1, 63, signed __int8> T_TT;
typedef _T_Set<0, 3> T_SQ;
typedef int T_TP;
typedef _T_Array< 0, 63, T_TP > T_RC;
typedef _T_Array< 0, 7, T_TP > T_array_4;
typedef _T_Array< 0, 7, T_array_4 > T_array_3;
struct T_RB
{
    T_TM RBTM;
    T_TT RBTS;
    T_integer RBTI;
    T_SQ RBSQ;
    // variable fields
    union
    {
        T_RC RBIS;
        T_array_3 RBIRF;
    };
};
typedef _T_Range<-32767, 32767, signed __int16> T_TV;
typedef _T_Array< -2, 17, T_TV > T_array_5;
typedef int T_TQ;
typedef int T_TU;
typedef _T_Array< 0, 15, T_RS > T_array_6;
typedef int T_TF;
typedef _T_Array< 0, 7, T_integer > T_array_7;
typedef int T_TH;
typedef _T_Array< 0, 73, T_char > T_RJ;
typedef _T_Array< 0, 17, T_TW > T_array_8;
typedef _T_Range<0, 73, signed __int8> T_TJ;
typedef _T_Range<0, 16, signed __int8> T_TK;
typedef _T_Range<0, 63, signed __int8> T_TS;
typedef int T_TG;
struct T_RM
{
    T_TS RMFR;
    T_TS RMTO;
    T_TP RMCP;
    T_boolean RMCA;
    T_boolean RMAC;
    T_boolean RMCH;
    T_boolean RMMT;
    T_boolean RMIL;
    T_boolean RMSU;
    // variable fields selector
    T_boolean RMPR;
    // variable fields
    union
    {
        struct
        {
            // variable fields selector
            T_boolean RMOO;
            // variable fields
            union
            {
                T_boolean RMEP;
                T_boolean RMQS;
            };
        };
        T_TG RMPP;
    };
};
typedef _T_Array< 0, 16, T_RM > T_array_9;
typedef _T_Array< 0, 2, T_integer > T_array_10;
typedef _T_Array< 0, 16, T_TV > T_array_11;
typedef _T_Array< 1, 500, T_RM > T_RF;
typedef _T_Array< 1, 30, T_char > T_RN;
typedef _T_Array< 0, 16, T_integer > T_array_12;
typedef _T_Array< 0, 2, T_TM > T_array_13;
typedef int T_TR;
typedef _T_Array< 1, 10, T_char > T_RA;
struct T_RD
{
    T_boolean RDPC;
    T_boolean RDSL;
    T_boolean RDKQ;
    T_boolean RDNB;
    T_boolean RDRK;
};
typedef _T_Array< 1, 500, T_TV > T_RE;
struct T_RY
{
    T_RD RYLS;
    T_char RYCH;
    T_RD RYRS;
};
typedef _T_Set<0, 255> T_SC;
typedef _T_Set<0, 7> T_SF;
typedef _T_Set<0, 7> T_SR;
typedef _T_Array< 0, 16, T_TH > T_array_14;
typedef _T_Array< 1, 47, T_RY > T_array_15;
typedef _T_Range<1, 10, signed __int8> T_TA;
typedef _T_Range<-21, 21, signed __int8> T_TD;
typedef _T_Range<0, 119, signed __int8> T_TL;
typedef _T_Range<1, 30, signed __int8> T_TN;
typedef _T_Array< 0, 12, T_RS > T_array_16;
typedef _T_Range<0, 31, signed __int8> T_TX;
typedef _T_Range<0, 1, signed __int8> T_TY;
typedef _T_Array< -119, 119, T_TD > T_array_17;
typedef _T_Array< 0, 3, T_RM > T_array_18;
typedef _T_Array< 0, 12, T_boolean > T_array_19;
typedef _T_Array< 0, 63, T_SX > T_array_20;
typedef _T_Array< 0, 1, T_char > T_array_21;
typedef _T_Array< 0, 15, T_TD > T_array_22;
typedef _T_Array< 0, 3, T_char > T_array_23;
typedef _T_Array< 0, 2, T_TP > T_array_25;
typedef _T_Array< 0, 3, T_array_25 > T_array_24;
typedef _T_Array< 0, 119, T_TT > T_array_26;
typedef _T_Array< 0, 2, T_RA > T_array_27;
typedef _T_Array< 0, 2, T_TQ > T_array_28;
typedef _T_Array< 0, 2, T_TV > T_array_29;
typedef _T_Array< 0, 12, T_char > T_array_30;
typedef _T_Array< 0, 12, T_TM > T_array_31;
typedef _T_Array< 0, 12, T_TU > T_array_32;
typedef _T_Array< 0, 12, T_TV > T_array_33;
typedef _T_Array< 0, 3, T_RA > T_array_34;
typedef _T_Array< 0, 3, T_TS > T_array_35;
typedef _T_Array< 0, 7, T_TS > T_array_37;
typedef _T_Array< 0, 7, T_array_37 > T_array_36;
typedef _T_Array< 0, 63, T_TF > T_array_38;
typedef _T_Array< 0, 63, T_TL > T_array_39;
typedef _T_Array< 0, 63, T_TR > T_array_40;
typedef _T_Array< 0, 63, T_TX > T_array_41;
typedef _T_Array< 0, 63, T_TY > T_array_42;
typedef _T_Array< 0, 5, T_char > T_array_43;
typedef _T_Array< 0, 2, T_TP > T_array_45;
typedef _T_Array< 0, 5, T_array_45 > T_array_44;

// forward declarations
T_integer F_MAX(void* _slink, T_integer A, T_integer B);
T_integer F_MIN(void* _slink, T_integer A, T_integer B);
T_integer F_SIGN(void* _slink, T_integer A, T_integer B);
void P_SORTIT(void* _slink, T_RE& A, T_RF& B, T_TW C);
void P_ANDRS(void* _slink, T_RS& C, T_RS A, T_RS B);
void P_CLRRS(void* _slink, T_RS& C, T_TS A);
void P_CPYRS(void* _slink, T_RS& C, T_RS A);
void P_IORRS(void* _slink, T_RS& C, T_RS A, T_RS B);
void P_NEWRS(void* _slink, T_RS& A);
void P_NOTRS(void* _slink, T_RS& C, T_RS A);
T_boolean F_NXTTS(void* _slink, T_RS& A, T_TS& B);
T_TS F_CNTRS(void* _slink, T_RS A);
void P_SETRS(void* _slink, T_RS& C, T_TS A);
void P_SFTRS(void* _slink, T_RS& A, T_RS B, T_TE C);
T_boolean F_INRSTB(void* _slink, T_RS A, T_TS B);
T_boolean F_NULRS(void* _slink, T_RS A);
T_boolean F_NULMVB(void* _slink, T_RM A);
void P_INICON(void* _slink);
void P_INITAL(void* _slink, T_RB& A);
void P_PAUSER(void* _slink);
void P_PRIMOV(void* _slink, T_RM A);
void P_PRINTB(void* _slink, T_RC A);
void P_PRINAM(void* _slink, T_RX A);
void P_PRISWI(void* _slink, T_RA A, T_boolean B);
void P_MBEVAL(void* _slink);
void P_MBCAPT(void* _slink, T_TP A);
void P_MBTPAC(void* _slink, T_TP A);
void P_MBPROM(void* _slink, T_TP A);
void P_MBMORP(void* _slink, T_TP A);
void P_ADDATK(void* _slink, T_TS A);
void P_ADDLOC(void* _slink, T_TS A, T_TP B);
void P_CLSTAT(void* _slink);
void P_CUTATK(void* _slink, T_TS A);
void P_DELATK(void* _slink, T_TS A);
void P_PRPATK(void* _slink, T_TS A);
void P_GAINIT(void* _slink, T_RM A);
void P_LOSEIT(void* _slink, T_RM A);
void P_MOVEIT(void* _slink, T_RM A);
void P_RTRKIT(void* _slink, T_RM A);
void P_PAWNIT(void* _slink, T_RM A);
void P_PROACA(void* _slink, T_TS A);
void P_PROACS(void* _slink, T_RM A);
void P_PROMOT(void* _slink, T_RM A);
void P_CREATE(void* _slink);
void P_DNDATE(void* _slink, T_RM A);
T_boolean F_UPDATE(void* _slink, T_RM& A);
void P_GENONE(void* _slink, T_TT A, T_TS B);
void P_PWNPRO(void* _slink);
void P_GENPWN(void* _slink, T_RS A, T_RS B);
void P_GENFSL(void* _slink, T_RS A);
void P_GENTSL(void* _slink, T_RS A);
void P_GENCAP(void* _slink);
void P_GENCAS(void* _slink);
void P_GENALL(void* _slink);
void P_LSTMOV(void* _slink);
void P_THEMOV(void* _slink, T_RM A);
void P_EVALU8(void* _slink);
T_TW F_SEARCH(void* _slink);
void P_READER(void* _slink);
void P_MINENG(void* _slink, T_RM A, T_RA B);
void P_MYMOVE(void* _slink);
void P_YRMOVE(void* _slink);

// constants
const T_integer C_AA = 1;
const T_integer C_AD = -21;
const T_integer C_AJ = 0;
const T_integer C_AK = 0;
const T_integer C_AKM2 = -2;
const T_integer C_AL = 0;
const T_integer C_AN = 1;
const T_integer C_AS = 0;
const T_integer C_AT = -1;
const T_integer C_AV = -32767;
const T_integer C_AW = 1;
const T_integer C_AX = 0;
const T_integer C_AY = 0;
const T_integer C_AZL = -119;
const T_TE C_B1 = 0;
const T_TE C_B2 = 1;
const T_TE C_B3 = 2;
const T_TE C_B4 = 3;
const T_TM C_DARK = 1;
const T_TP C_DB = 9;
const T_TP C_DK = 11;
const T_TQ C_DL = 3;
const T_TP C_DN = 8;
const T_TP C_DP = 6;
const T_TP C_DQ = 10;
const T_TP C_DR = 7;
const T_TQ C_DS = 2;
const T_TU C_EB = 3;
const T_TU C_EK = 5;
const T_TU C_EN = 2;
const T_TU C_EP = 0;
const T_TU C_EQ = 4;
const T_TU C_ER = 1;
const T_TF C_F1 = 0;
const T_TF C_F2 = 1;
const T_TF C_F3 = 2;
const T_TF C_F4 = 3;
const T_TF C_F5 = 4;
const T_TF C_F6 = 5;
const T_TF C_F7 = 6;
const T_TF C_F8 = 7;
const T_TH C_H0 = 0;
const T_TH C_H1 = 1;
const T_TH C_H2 = 2;
const T_TH C_H3 = 3;
const T_TH C_H4 = 4;
const T_TH C_H5 = 5;
const T_TH C_H6 = 6;
const T_TH C_H7 = 7;
const T_TP C_LB = 3;
const T_TM C_LITE = 0;
const T_TP C_LK = 5;
const T_TQ C_LL = 1;
const T_TP C_LN = 2;
const T_TP C_LP = 0;
const T_integer C_LPP = 20;
const T_TP C_LQ = 4;
const T_TP C_LR = 1;
const T_TQ C_LS = 0;
const T_TP C_MT = 12;
const T_TE C_N1 = 8;
const T_TE C_N2 = 9;
const T_TE C_N3 = 10;
const T_TE C_N4 = 11;
const T_TE C_N5 = 12;
const T_TE C_N6 = 13;
const T_TE C_N7 = 14;
const T_TE C_N8 = 15;
const T_TM C_NONE = 2;
const T_TG C_PB = 3;
const T_TG C_PN = 2;
const T_TG C_PQ = 0;
const T_TG C_PR = 1;
const T_TR C_R1 = 0;
const T_TR C_R2 = 1;
const T_TR C_R3 = 2;
const T_TR C_R4 = 3;
const T_TR C_R5 = 4;
const T_TR C_R6 = 5;
const T_TR C_R7 = 6;
const T_TR C_R8 = 7;
const T_TE C_S1 = 4;
const T_TE C_S2 = 5;
const T_TE C_S3 = 6;
const T_TE C_S4 = 7;
const T_integer C_SYNCF = 1;
const T_integer C_SYNCL = 36;
const T_integer C_SYNMF = 37;
const T_integer C_SYNML = 47;
const T_integer C_ZA = 10;
const T_integer C_ZAL = 119;
const T_char C_ZC = ',';
const T_integer C_ZD = 21;
const T_integer C_ZJ = 73;
const T_integer C_ZK = 16;
const T_integer C_ZKP1 = 17;
const T_integer C_ZL = 119;
const T_integer C_ZN = 30;
const T_integer C_ZS = 63;
const T_integer C_ZT = 63;
const T_integer C_ZV = 32767;
const T_integer C_ZW = 500;
const T_integer C_ZX = 31;
const T_integer C_ZY = 1;

// non-local goto targets
const int NL_1 = 6;
const int NL_2 = 5;
const int NL_9 = 4;

// program variables
T_arraytmofrs ALATK;
T_arraytkofrs ALLOC;
T_RX ATKFR;
T_RX ATKTO;
T_RB BOARD;
T_arraytkoftw BSTMV;
T_array_5 BSTVL;
T_RS CORNR;
T_arraytkofrs CSTAT;
T_array_6 EDGE;
T_arraytkofrs ENPAS;
T_integer FKPSHD;
T_integer FKSANQ;
T_integer FMAXMT;
T_integer FNODEL;
T_array_7 FPADCR;
T_integer FPBLOK;
T_integer FPCONN;
T_integer FPFLNX;
T_integer FRDUBL;
T_integer FRK7TH;
T_integer FTRADE;
T_integer FTRDSL;
T_integer FTRPDK;
T_integer FTRPWN;
T_integer FWKING;
T_integer FWMAJM;
T_integer FWMINM;
T_integer FWPAWN;
T_integer FWROOK;
T_arraytkofrs GENFR;
T_arraytkofrs GENPN;
T_arraytkofrs GENTO;
T_integer GOING;
T_RJ ICARD;
T_RJ ILINE;
T_array_8 INDEX;
T_text Input;
T_TJ JMTJ;
T_TK JMTK;
T_TJ JNTJ;
T_TK JNTK;
T_TM JNTM;
T_TW JNTW;
T_boolean Jumpin;
T_array_9 KILLR;
T_arraytkoftw LINDX;
T_RM LSTMV;
T_TV MAXPS;
T_TV MBLTE;
T_RC MBORD;
T_array_10 MBPWN;
T_TV MBTOT;
T_array_11 MBVAL;
T_RF MOVES;
T_RN MOVMS;
T_array_12 MVSEL;
T_integer NODES;
T_RM NULMV;
T_array_13 OTHER;
T_text Output;
T_array_14 SRCHM;
T_boolean SWEC;
T_boolean SWPA;
T_boolean SWPS;
T_boolean SWRE;
T_boolean SWSU;
T_boolean SWTR;
T_array_15 SYNTX;
T_arraytmofrs TMLOC;
T_array_16 TPLOC;
T_RE VALUE;
T_integer WINDOW;
T_arraytpofte XFPE;
T_array_17 XLLD;
T_arraytpofte XLPE;
T_arraytfofrs XNFS;
T_arraytrofrs XNRS;
T_arraytfofrs XRFS;
T_array_18 XRQM;
T_arraytqofrs XRQSA;
T_arraytqofrs XRQSO;
T_arraytrofrs XRRS;
T_RX XRSS;
T_array_19 XSPB;
T_arraytqofrs XSQS;
T_array_20 XSSX;
T_array_21 XTBC;
T_array_22 XTED;
T_array_23 XTGC;
T_array_24 XTGMP;
T_array_26 XTLS;
T_array_27 XTMA;
T_array_28 XTMQ;
T_array_29 XTMV;
T_array_30 XTPC;
T_array_31 XTPM;
T_array_32 XTPU;
T_array_33 XTPV;
T_array_34 XTQA;
T_array_35 XTQS;
T_array_36 XTRFS;
T_array_38 XTSF;
T_array_39 XTSL;
T_array_40 XTSR;
T_array_41 XTSX;
T_array_42 XTSY;
T_array_43 XTUC;
T_array_44 XTUMP;

// function body
void P_()
{

    // initializers
    Input.init(0);
    Output.init(1);

    int _nonlocalTarget = 0;

    _nonlocalGoto:
    try
    {
        switch(_nonlocalTarget)
        {
        case 0: break;
        case NL_1: goto L_1;
        case NL_2: goto L_2;
        case NL_9: goto L_9;
        default: _RTError("unexpected non-local target");
        }

        // subroutine body
        // line 4041
        Jumpin = C_false;

        // line 4043
        Output << " HI.  THIS IS CHESS .5" << _WRITELN;

        // line 4044
        P_INICON(nullptr);

        // line 4046
        L_1:
        P_INITAL(nullptr, BOARD);

        // line 4048
        L_2:
        do
        {
            // line 4050
            if(Jumpin)
            {
                // line 4050
                goto L_3;
            }

            // line 4052
            do
            {
                // line 4053
                P_YRMOVE(nullptr);

                { /* NOP */ }
            }
            while(!SWRE);

            // line 4058
            L_3:
            Jumpin = C_false;

            // line 4060
            do
            {
                // line 4061
                P_MYMOVE(nullptr);

                // line 4062
                if((GOING > 0))
                {
                    // line 4063
                    GOING = (GOING - 1);
                }
            }
            while(!(GOING == 0));

            { /* NOP */ }
        }
        while(!C_false);

        L_9:
        { /* NOP */ }
    }
    catch(int _target)
    {
        switch(_target)
        {
        case NL_1:
        case NL_2:
        case NL_9:
            _nonlocalTarget = _target;
            goto _nonlocalGoto;
        default: throw;
        }
    }
}

// line 290
//================================================================================
// scope: MAX (level : 2)

// activation record
struct Frame_MAX
{
    // parameters
    T_integer A;
    T_integer B;

    // locals
    T_integer _fnvalue;
};

// function body
T_integer F_MAX(void* _slink, T_integer A, T_integer B)
{
    // prologue/frame definition
    Frame_MAX _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 293
    if((_F.A > _F.B))
    {
        // line 294
        _F._fnvalue = _F.A;
    }
    else
    {
        // line 296
        _F._fnvalue = _F.B;
    }

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 300
//================================================================================
// scope: MIN (level : 2)

// activation record
struct Frame_MIN
{
    // parameters
    T_integer A;
    T_integer B;

    // locals
    T_integer _fnvalue;
};

// function body
T_integer F_MIN(void* _slink, T_integer A, T_integer B)
{
    // prologue/frame definition
    Frame_MIN _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 303
    if((_F.A < _F.B))
    {
        // line 304
        _F._fnvalue = _F.A;
    }
    else
    {
        // line 306
        _F._fnvalue = _F.B;
    }

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 310
//================================================================================
// scope: SIGN (level : 2)

// activation record
struct Frame_SIGN
{
    // parameters
    T_integer A;
    T_integer B;

    // locals
    T_integer _fnvalue;
};

// function body
T_integer F_SIGN(void* _slink, T_integer A, T_integer B)
{
    // prologue/frame definition
    Frame_SIGN _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 315
    if((_F.B < 0))
    {
        // line 315
        _F._fnvalue = (_abs(_F.A) * (-1));
    }
    else
    {
        // line 315
        _F._fnvalue = (_abs(_F.A) * (+1));
    }

    // epilogue
    return _F._fnvalue;
}

// line 320
//================================================================================
// scope: SORTIT (level : 2)

// activation record
struct Frame_SORTIT
{
    // parameters
    T_RE& A;
    T_RF& B;
    T_TW C;

    // locals
    T_RM INRM;
    T_boolean INTB;
    T_integer INTI;
    T_TV INTV;
    T_TW INTW;
};

// function body
void P_SORTIT(void* _slink, T_RE& A, T_RF& B, T_TW C)
{
    // prologue/frame definition
    Frame_SORTIT _F = {A, B, C };

    assert(nullptr == _slink);

    // subroutine body
    // line 333
    _FOR_TO(_F.INTW, (C_AW + 2), _F.C)
    {
        // line 335
        _F.INTI = (_F.INTW - 1);

        // line 336
        _F.INTV = _F.A[_F.INTW];

        // line 337
        _F.INRM = _F.B[_F.INTW];

        // line 338
        _F.INTB = C_true;

        // line 339
        while(((_F.INTI > C_AW) && _F.INTB))
        {
            // line 340
            if((_F.INTV < _F.A[_F.INTI]))
            {
                // line 342
                _F.A[(_F.INTI + 1)] = _F.A[_F.INTI];

                // line 343
                _F.B[(_F.INTI + 1)] = _F.B[_F.INTI];

                // line 344
                _F.INTI = (_F.INTI - 1);

                { /* NOP */ }
            }
            else
            {
                // line 347
                _F.INTB = C_false;
            }
        }

        // line 348
        _F.A[(_F.INTI + 1)] = _F.INTV;

        // line 349
        _F.B[(_F.INTI + 1)] = _F.INRM;

        { /* NOP */ }
    }
    _FOR_END(_F.INTW)

    { /* NOP */ }
}

// line 354
//================================================================================
// scope: ANDRS (level : 2)

// activation record
struct Frame_ANDRS
{
    // parameters
    T_RS& C;
    T_RS A;
    T_RS B;

    // locals
    T_TY INTY;
};

// function body
void P_ANDRS(void* _slink, T_RS& C, T_RS A, T_RS B)
{
    // prologue/frame definition
    Frame_ANDRS _F = {C, A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 363
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 364
        _F.C.RSSS[_F.INTY] = (_F.A.RSSS[_F.INTY] * _F.B.RSSS[_F.INTY]);
    }
    _FOR_END(_F.INTY)

    { /* NOP */ }
}

// line 368
//================================================================================
// scope: CLRRS (level : 2)

// activation record
struct Frame_CLRRS
{
    // parameters
    T_RS& C;
    T_TS A;
};

// function body
void P_CLRRS(void* _slink, T_RS& C, T_TS A)
{
    // prologue/frame definition
    Frame_CLRRS _F = {C, A };

    assert(nullptr == _slink);

    // subroutine body
    // line 373
    _F.C.RSSS[XTSY[_F.A]] = (_F.C.RSSS[XTSY[_F.A]] - XSSX[_F.A]);

    { /* NOP */ }
}

// line 377
//================================================================================
// scope: CPYRS (level : 2)

// activation record
struct Frame_CPYRS
{
    // parameters
    T_RS& C;
    T_RS A;

    // locals
    T_TY INTY;
};

// function body
void P_CPYRS(void* _slink, T_RS& C, T_RS A)
{
    // prologue/frame definition
    Frame_CPYRS _F = {C, A };

    assert(nullptr == _slink);

    // subroutine body
    // line 385
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 386
        _F.C.RSSS[_F.INTY] = _F.A.RSSS[_F.INTY];
    }
    _FOR_END(_F.INTY)

    { /* NOP */ }
}

// line 390
//================================================================================
// scope: IORRS (level : 2)

// activation record
struct Frame_IORRS
{
    // parameters
    T_RS& C;
    T_RS A;
    T_RS B;

    // locals
    T_TY INTY;
};

// function body
void P_IORRS(void* _slink, T_RS& C, T_RS A, T_RS B)
{
    // prologue/frame definition
    Frame_IORRS _F = {C, A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 398
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 399
        _F.C.RSSS[_F.INTY] = (_F.A.RSSS[_F.INTY] + _F.B.RSSS[_F.INTY]);
    }
    _FOR_END(_F.INTY)

    { /* NOP */ }
}

// line 403
//================================================================================
// scope: NEWRS (level : 2)

// activation record
struct Frame_NEWRS
{
    // parameters
    T_RS& A;

    // locals
    T_TY INTY;
};

// function body
void P_NEWRS(void* _slink, T_RS& A)
{
    // prologue/frame definition
    Frame_NEWRS _F = {A };

    assert(nullptr == _slink);

    // hoisted definitions
    _T_GenericSet _setLiteral1;

    // subroutine body
    // line 410
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 411
        _F.A.RSSS[_F.INTY] = _setLiteral1;
    }
    _FOR_END(_F.INTY)

    { /* NOP */ }
}

// line 415
//================================================================================
// scope: NOTRS (level : 2)

// activation record
struct Frame_NOTRS
{
    // parameters
    T_RS& C;
    T_RS A;

    // locals
    T_TY INTY;
};

// function body
void P_NOTRS(void* _slink, T_RS& C, T_RS A)
{
    // prologue/frame definition
    Frame_NOTRS _F = {C, A };

    assert(nullptr == _slink);

    // hoisted definitions
    _T_GenericSet _setLiteral1;
    _setLiteral1.set(C_AX, C_ZX);

    // subroutine body
    // line 423
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 424
        _F.C.RSSS[_F.INTY] = (_setLiteral1 - _F.A.RSSS[_F.INTY]);
    }
    _FOR_END(_F.INTY)

    { /* NOP */ }
}

// line 427
//================================================================================
// scope: NXTTS (level : 2)

// activation record
struct Frame_NXTTS
{
    // parameters
    T_RS& A;
    T_TS& B;

    // locals
    T_boolean _fnvalue;
    T_TX INTX;
    T_TY INTY;
};

// function body
T_boolean F_NXTTS(void* _slink, T_RS& A, T_TS& B)
{
    // prologue/frame definition
    Frame_NXTTS _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 443
    _FOR_DOWNTO(_F.INTY, C_ZY, C_AY)
    {
        // line 444
        if((_F.A.RSTI[_F.INTY] != 0))
        {
            // line 461
            _FOR_DOWNTO(_F.INTX, C_ZX, C_AX)
            {
                // line 462
                if((_F.A.RSSS[_F.INTY] & _F.INTX))
                {
                    // line 464
                    _F.B = (_F.INTX + (_F.INTY * (C_ZX + 1)));

                    // line 465
                    {
                        _T_GenericSet _setLiteral1;
                        _setLiteral1.set(_F.INTX);

                        _F.A.RSSS[_F.INTY] = (_F.A.RSSS[_F.INTY] - _setLiteral1);
                    }

                    // line 467
                    _F._fnvalue = C_true;

                    // line 468
                    goto L_11;

                    { /* NOP */ }
                }
            }
            _FOR_END(_F.INTX)

            { /* NOP */ }
        }
    }
    _FOR_END(_F.INTY)

    // line 472
    _F._fnvalue = C_false;

    L_11:
    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 477
//================================================================================
// scope: CNTRS (level : 2)

// activation record
struct Frame_CNTRS
{
    // parameters
    T_RS A;

    // locals
    T_TS _fnvalue;
    T_TS IMTS;
    T_RS INRS;
    T_TS INTS;
};

// function body
T_TS F_CNTRS(void* _slink, T_RS A)
{
    // prologue/frame definition
    Frame_CNTRS _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 486
    _F.INTS = 0;

    // line 488
    P_CPYRS(nullptr, _F.INRS, _F.A);

    // line 489
    while(F_NXTTS(nullptr, _F.INRS, _F.IMTS))
    {
        // line 490
        _F.INTS = (_F.INTS + 1);
    }

    // line 498
    _F._fnvalue = _F.INTS;

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 502
//================================================================================
// scope: SETRS (level : 2)

// activation record
struct Frame_SETRS
{
    // parameters
    T_RS& C;
    T_TS A;
};

// function body
void P_SETRS(void* _slink, T_RS& C, T_TS A)
{
    // prologue/frame definition
    Frame_SETRS _F = {C, A };

    assert(nullptr == _slink);

    // subroutine body
    // line 507
    _F.C.RSSS[XTSY[_F.A]] = (_F.C.RSSS[XTSY[_F.A]] + XSSX[_F.A]);

    { /* NOP */ }
}

// line 511
//================================================================================
// scope: SFTRS (level : 2)

// activation record
struct Frame_SFTRS
{
    // parameters
    T_RS& A;
    T_RS B;
    T_TE C;

    // locals
    T_TS INTS;
};

// function body
void P_SFTRS(void* _slink, T_RS& A, T_RS B, T_TE C)
{
    // prologue/frame definition
    Frame_SFTRS _F = {A, B, C };

    assert(nullptr == _slink);

    // subroutine body
    // line 521
    P_NEWRS(nullptr, _F.A);

    // line 522
    while(F_NXTTS(nullptr, _F.B, _F.INTS))
    {
        // line 523
        if((XTLS[(XTSL[_F.INTS] + XTED[_F.C])] > 0))
        {
            // line 525
            P_SETRS(nullptr, _F.A, T_TS::C(XTLS[(XTSL[_F.INTS] + XTED[_F.C])]));
        }
    }

    { /* NOP */ }
}

// line 619
//================================================================================
// scope: INRSTB (level : 2)

// activation record
struct Frame_INRSTB
{
    // parameters
    T_RS A;
    T_TS B;

    // locals
    T_boolean _fnvalue;
};

// function body
T_boolean F_INRSTB(void* _slink, T_RS A, T_TS B)
{
    // prologue/frame definition
    Frame_INRSTB _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 624
    _F._fnvalue = (XSSX[_F.B] <= _F.A.RSSS[XTSY[_F.B]]);

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 627
//================================================================================
// scope: NULRS (level : 2)

// activation record
struct Frame_NULRS
{
    // parameters
    T_RS A;

    // locals
    T_boolean _fnvalue;
    T_boolean INTB;
    T_TY INTY;
};

// function body
T_boolean F_NULRS(void* _slink, T_RS A)
{
    // prologue/frame definition
    Frame_NULRS _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 636
    _F.INTB = C_true;

    // line 637
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 638
        _F.INTB = (_F.INTB && (_F.A.RSTI[_F.INTY] == 0));
    }
    _FOR_END(_F.INTY)

    // line 639
    _F._fnvalue = _F.INTB;

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 643
//================================================================================
// scope: NULMVB (level : 2)

// activation record
struct Frame_NULMVB
{
    // parameters
    T_RM A;

    // locals
    T_boolean _fnvalue;
};

// function body
T_boolean F_NULMVB(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_NULMVB _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 649
    _F._fnvalue = ((_F.A.RMAC && _F.A.RMPR) && (!_F.A.RMCA));

    { /* NOP */ }

    // epilogue
    return _F._fnvalue;
}

// line 653
//================================================================================
// scope: INICON (level : 2)

// forward declarations
void P_INICON_INISYN(void* _slink, T_RA A);
void P_INICON_INIXTP(void* _slink, T_TP A, T_char B, T_TM C, T_TU D, T_boolean E, T_TE F, T_TE G, T_TV H);

// activation record
struct Frame_INICON
{
    // locals
    T_integer IMTI;
    T_RS INRS;
    T_TD INTD;
    T_TE INTE;
    T_TF INTF;
    T_integer INTI;
    T_integer INTI1;
    T_TL INTL;
    T_TQ INTQ;
    T_TR INTR;
    T_TT INTT;
    T_TX INTX;
    T_TY INTY;
};

// function body
void P_INICON(void* _slink)
{
    // prologue/frame definition
    Frame_INICON _F = { };

    assert(nullptr == _slink);

    // subroutine body
    // line 726
    P_INICON_INIXTP(&_F, C_LP, 'A', C_LITE, C_EP, C_false, C_B1, C_B2, T_TV::C((1 * 64)));

    // line 727
    P_INICON_INIXTP(&_F, C_LR, 'B', C_LITE, C_ER, C_true, C_S1, C_S4, T_TV::C((5 * 64)));

    // line 728
    P_INICON_INIXTP(&_F, C_LN, 'C', C_LITE, C_EN, C_false, C_N1, C_N8, T_TV::C((3 * 64)));

    // line 729
    P_INICON_INIXTP(&_F, C_LB, 'D', C_LITE, C_EB, C_true, C_B1, C_B4, T_TV::C((3 * 64)));

    // line 730
    P_INICON_INIXTP(&_F, C_LQ, 'E', C_LITE, C_EQ, C_true, C_B1, C_S4, T_TV::C((9 * 64)));

    // line 731
    P_INICON_INIXTP(&_F, C_LK, 'F', C_LITE, C_EK, C_false, C_B1, C_S4, T_TV::C(0));

    // line 732
    P_INICON_INIXTP(&_F, C_DP, '1', C_DARK, C_EP, C_false, C_B3, C_B4, T_TV::C(((-1) * 64)));

    // line 733
    P_INICON_INIXTP(&_F, C_DR, '2', C_DARK, C_ER, C_true, C_S1, C_S4, T_TV::C(((-5) * 64)));

    // line 734
    P_INICON_INIXTP(&_F, C_DN, '3', C_DARK, C_EN, C_false, C_N1, C_N8, T_TV::C(((-3) * 64)));

    // line 735
    P_INICON_INIXTP(&_F, C_DB, '4', C_DARK, C_EB, C_true, C_B1, C_B4, T_TV::C(((-3) * 64)));

    // line 736
    P_INICON_INIXTP(&_F, C_DQ, '5', C_DARK, C_EQ, C_true, C_B1, C_S4, T_TV::C(((-9) * 64)));

    // line 737
    P_INICON_INIXTP(&_F, C_DK, '6', C_DARK, C_EK, C_false, C_B1, C_S4, T_TV::C(0));

    // line 738
    P_INICON_INIXTP(&_F, C_MT, '-', C_NONE, C_EP, C_false, C_B2, C_B1, T_TV::C(0));

    // line 740
    XTGMP[C_PQ][C_LITE] = C_LQ;

    // line 740
    XTGMP[C_PQ][C_DARK] = C_DQ;

    // line 740
    XTGC[C_PQ] = 'Q';

    // line 741
    XTGMP[C_PR][C_LITE] = C_LR;

    // line 741
    XTGMP[C_PR][C_DARK] = C_DR;

    // line 741
    XTGC[C_PR] = 'R';

    // line 742
    XTGMP[C_PN][C_LITE] = C_LN;

    // line 742
    XTGMP[C_PN][C_DARK] = C_DN;

    // line 742
    XTGC[C_PN] = 'N';

    // line 743
    XTGMP[C_PB][C_LITE] = C_LB;

    // line 743
    XTGMP[C_PB][C_DARK] = C_DB;

    // line 743
    XTGC[C_PB] = 'B';

    // line 745
    XTUC[C_EK] = 'K';

    // line 746
    XTUC[C_EQ] = 'Q';

    // line 747
    XTUC[C_ER] = 'R';

    // line 748
    XTUC[C_EN] = 'N';

    // line 749
    XTUC[C_EB] = 'B';

    // line 750
    XTUC[C_EP] = 'P';

    // line 754
    XTBC[C_false] = '-';

    // line 755
    XTBC[C_true] = '*';

    // line 757
    OTHER[C_LITE] = C_DARK;

    // line 757
    XTMV[C_LITE] = 1;

    // line 758
    OTHER[C_DARK] = C_LITE;

    // line 758
    XTMV[C_DARK] = (-1);

    // line 759
    OTHER[C_NONE] = C_NONE;

    // line 761
    XTMA[C_LITE] = "    WHITE ";

    // line 762
    XTMA[C_DARK] = "    BLACK ";

    // line 763
    XTMA[C_NONE] = "   NO ONE ";

    // line 765
    XTQA[C_LS] = "WHITE KING";

    // line 766
    XTQA[C_LL] = "WHITE LONG";

    // line 767
    XTQA[C_DS] = "BLACK KING";

    // line 768
    XTQA[C_DL] = "BLACK LONG";

    // line 772
    _FOR_TO(_F.INTL, C_AL, C_ZL)
    {
        // line 773
        XTLS[_F.INTL] = (-1);
    }
    _FOR_END(_F.INTL)

    // line 774
    _F.INTL = 21;

    // line 776
    _F.INTT = (-1);

    // line 778
    _FOR_TO(_F.INTR, C_R1, C_R8)
    {
        // line 780
        _FOR_TO(_F.INTF, C_F1, C_F8)
        {
            // line 782
            _F.INTT = (_F.INTT + 1);

            // line 783
            XTRFS[_F.INTR][_F.INTF] = _F.INTT;

            // line 785
            XTLS[_F.INTL] = _F.INTT;

            // line 787
            XTSL[_F.INTT] = _F.INTL;

            // line 789
            XTSR[_F.INTT] = _F.INTR;

            // line 790
            XTSF[_F.INTT] = _F.INTF;

            // line 791
            _F.INTL = (_F.INTL + 1);

            { /* NOP */ }
        }
        _FOR_END(_F.INTF)

        // line 793
        _F.INTL = (_F.INTL + 2);

        { /* NOP */ }
    }
    _FOR_END(_F.INTR)

    // line 799
    _F.INTT = (-1);

    // line 800
    _FOR_TO(_F.INTY, C_AY, C_ZY)
    {
        // line 802
        _FOR_TO(_F.INTX, C_AX, C_ZX)
        {
            // line 804
            _F.INTT = (_F.INTT + 1);

            // line 805
            XTSX[_F.INTT] = _F.INTX;

            // line 806
            XTSY[_F.INTT] = _F.INTY;

            // line 807
            {
                _T_GenericSet _setLiteral1;
                _setLiteral1.set(_F.INTX);

                XSSX[_F.INTT] = _setLiteral1;
            }

            // line 808
            P_NEWRS(nullptr, XRSS[_F.INTT]);

            // line 809
            {
                _T_GenericSet _setLiteral2;
                _setLiteral2.set(_F.INTX);

                XRSS[_F.INTT].RSSS[_F.INTY] = _setLiteral2;
            }

            { /* NOP */ }
        }
        _FOR_END(_F.INTX)

        { /* NOP */ }
    }
    _FOR_END(_F.INTY)

    // line 815
    _FOR_TO(_F.INTR, C_R1, C_R8)
    {
        // line 816
        P_NEWRS(nullptr, XRRS[_F.INTR]);
    }
    _FOR_END(_F.INTR)

    // line 817
    _FOR_TO(_F.INTF, C_F1, C_F8)
    {
        // line 818
        P_NEWRS(nullptr, XRFS[_F.INTF]);
    }
    _FOR_END(_F.INTF)

    // line 820
    _FOR_TO(_F.INTR, C_R1, C_R8)
    {
        // line 821
        _FOR_TO(_F.INTF, C_F1, C_F8)
        {
            // line 823
            P_SETRS(nullptr, XRRS[_F.INTR], XTRFS[_F.INTR][_F.INTF]);

            // line 824
            P_SETRS(nullptr, XRFS[_F.INTF], XTRFS[_F.INTR][_F.INTF]);

            { /* NOP */ }
        }
        _FOR_END(_F.INTF)
    }
    _FOR_END(_F.INTR)

    // line 827
    _FOR_TO(_F.INTF, C_F1, C_F8)
    {
        // line 828
        P_NOTRS(nullptr, XNFS[_F.INTF], XRFS[_F.INTF]);
    }
    _FOR_END(_F.INTF)

    // line 830
    _FOR_TO(_F.INTR, C_R1, C_R8)
    {
        // line 831
        P_NOTRS(nullptr, XNRS[_F.INTR], XRRS[_F.INTR]);
    }
    _FOR_END(_F.INTR)

    // line 835
    P_CPYRS(nullptr, EDGE[C_S1], XRFS[C_F1]);

    // line 836
    P_CPYRS(nullptr, EDGE[C_S2], XRRS[C_R8]);

    // line 837
    P_CPYRS(nullptr, EDGE[C_S3], XRFS[C_F8]);

    // line 838
    P_CPYRS(nullptr, EDGE[C_S4], XRRS[C_R1]);

    // line 839
    P_IORRS(nullptr, EDGE[C_B1], EDGE[C_S1], EDGE[C_S2]);

    // line 840
    P_IORRS(nullptr, EDGE[C_B2], EDGE[C_S2], EDGE[C_S3]);

    // line 841
    P_IORRS(nullptr, EDGE[C_B3], EDGE[C_S3], EDGE[C_S4]);

    // line 842
    P_IORRS(nullptr, EDGE[C_B4], EDGE[C_S4], EDGE[C_S1]);

    // line 843
    P_IORRS(nullptr, EDGE[C_N1], EDGE[C_B1], XRRS[C_R7]);

    // line 844
    P_IORRS(nullptr, EDGE[C_N2], EDGE[C_B2], XRRS[C_R7]);

    // line 845
    P_IORRS(nullptr, EDGE[C_N3], EDGE[C_B2], XRFS[C_F7]);

    // line 846
    P_IORRS(nullptr, EDGE[C_N4], EDGE[C_B3], XRFS[C_F7]);

    // line 847
    P_IORRS(nullptr, EDGE[C_N5], EDGE[C_B3], XRRS[C_R2]);

    // line 848
    P_IORRS(nullptr, EDGE[C_N6], EDGE[C_B4], XRRS[C_R2]);

    // line 849
    P_IORRS(nullptr, EDGE[C_N7], EDGE[C_B4], XRFS[C_F2]);

    // line 850
    P_IORRS(nullptr, EDGE[C_N8], EDGE[C_B1], XRFS[C_F2]);

    // line 854
    P_IORRS(nullptr, _F.INRS, XRRS[C_R1], XRRS[C_R2]);

    // line 855
    P_IORRS(nullptr, _F.INRS, _F.INRS, XRRS[C_R7]);

    // line 856
    P_IORRS(nullptr, _F.INRS, _F.INRS, XRRS[C_R8]);

    // line 857
    P_IORRS(nullptr, CORNR, XRFS[C_F1], XRFS[C_F2]);

    // line 858
    P_IORRS(nullptr, CORNR, CORNR, XRFS[C_F7]);

    // line 859
    P_IORRS(nullptr, CORNR, CORNR, XRFS[C_F8]);

    // line 860
    P_ANDRS(nullptr, CORNR, CORNR, _F.INRS);

    // line 864
    XTED[C_N1] = 19;

    // line 864
    XTED[C_N2] = 21;

    // line 865
    XTED[C_N8] = 8;

    // line 865
    XTED[C_B1] = 9;

    // line 865
    XTED[C_S2] = 10;

    // line 865
    XTED[C_B2] = 11;

    // line 865
    XTED[C_N3] = 12;

    // line 866
    XTED[C_S1] = (-1);

    // line 866
    XTED[C_S3] = 1;

    // line 867
    XTED[C_N7] = (-12);

    // line 867
    XTED[C_B4] = (-11);

    // line 867
    XTED[C_S4] = (-10);

    // line 867
    XTED[C_B3] = (-9);

    // line 867
    XTED[C_N4] = (-8);

    // line 868
    XTED[C_N6] = (-21);

    // line 868
    XTED[C_N5] = (-19);

    // line 872
    _FOR_TO(_F.INTI1, C_AZL, C_ZAL)
    {
        // line 873
        XLLD[_F.INTI1] = 0;
    }
    _FOR_END(_F.INTI1)

    // line 875
    _FOR_TO(_F.INTE, C_B1, C_S4)
    {
        // line 877
        _F.INTD = XTED[_F.INTE];

        // line 878
        _FOR_TO(_F.IMTI, 1, 7)
        {
            // line 879
            XLLD[(_F.IMTI * _F.INTD)] = _F.INTD;
        }
        _FOR_END(_F.IMTI)

        { /* NOP */ }
    }
    _FOR_END(_F.INTE)

    // line 882
    _FOR_TO(_F.INTE, C_N1, C_N8)
    {
        // line 883
        XLLD[XTED[_F.INTE]] = XTED[_F.INTE];
    }
    _FOR_END(_F.INTE)

    // line 887
    P_IORRS(nullptr, XSQS[C_LS], XRSS[XTRFS[C_R1][C_F8]], XRSS[XTRFS[C_R1][C_F5]]);

    // line 888
    P_IORRS(nullptr, XSQS[C_LL], XRSS[XTRFS[C_R1][C_F1]], XRSS[XTRFS[C_R1][C_F5]]);

    // line 889
    P_IORRS(nullptr, XSQS[C_DS], XRSS[XTRFS[C_R8][C_F8]], XRSS[XTRFS[C_R8][C_F5]]);

    // line 890
    P_IORRS(nullptr, XSQS[C_DL], XRSS[XTRFS[C_R8][C_F1]], XRSS[XTRFS[C_R8][C_F5]]);

    // line 892
    P_IORRS(nullptr, XRQSO[C_LS], XRSS[XTRFS[C_R1][C_F6]], XRSS[XTRFS[C_R1][C_F7]]);

    // line 893
    P_IORRS(nullptr, XRQSO[C_LL], XRSS[XTRFS[C_R1][C_F4]], XRSS[XTRFS[C_R1][C_F3]]);

    // line 894
    P_IORRS(nullptr, XRQSA[C_LS], XRSS[XTRFS[C_R1][C_F5]], XRQSO[C_LS]);

    // line 895
    P_IORRS(nullptr, XRQSA[C_LL], XRSS[XTRFS[C_R1][C_F5]], XRQSO[C_LL]);

    // line 896
    P_IORRS(nullptr, XRQSO[C_LL], XRSS[XTRFS[C_R1][C_F2]], XRQSO[C_LL]);

    // line 898
    P_IORRS(nullptr, XRQSO[C_DS], XRSS[XTRFS[C_R8][C_F6]], XRSS[XTRFS[C_R8][C_F7]]);

    // line 899
    P_IORRS(nullptr, XRQSO[C_DL], XRSS[XTRFS[C_R8][C_F4]], XRSS[XTRFS[C_R8][C_F3]]);

    // line 900
    P_IORRS(nullptr, XRQSO[C_DS], XRSS[XTRFS[C_R8][C_F5]], XRQSO[C_DS]);

    // line 901
    P_IORRS(nullptr, XRQSA[C_DL], XRSS[XTRFS[C_R8][C_F5]], XRQSO[C_DL]);

    // line 902
    P_IORRS(nullptr, XRQSO[C_DL], XRSS[XTRFS[C_R8][C_F2]], XRQSO[C_DL]);

    // line 904
    _FOR_TO(_F.INTQ, C_LS, C_DL)
    {
        // line 907
        XRQM[_F.INTQ].RMCP = C_MT;

        // line 908
        XRQM[_F.INTQ].RMCA = C_false;

        // line 909
        XRQM[_F.INTQ].RMAC = C_true;

        // line 910
        XRQM[_F.INTQ].RMCH = C_false;

        // line 911
        XRQM[_F.INTQ].RMMT = C_false;

        // line 912
        XRQM[_F.INTQ].RMIL = C_false;

        // line 913
        XRQM[_F.INTQ].RMSU = C_false;

        // line 914
        XRQM[_F.INTQ].RMPR = C_false;

        // line 915
        XRQM[_F.INTQ].RMOO = C_true;

        { /* NOP */ }
    }
    _FOR_END(_F.INTQ)

    // line 918
    XRQM[C_LS].RMFR = XTRFS[C_R1][C_F5];

    // line 918
    XRQM[C_LS].RMTO = XTRFS[C_R1][C_F7];

    // line 919
    XRQM[C_LL].RMFR = XTRFS[C_R1][C_F5];

    // line 919
    XRQM[C_LL].RMTO = XTRFS[C_R1][C_F3];

    // line 920
    XRQM[C_DS].RMFR = XTRFS[C_R8][C_F5];

    // line 920
    XRQM[C_DS].RMTO = XTRFS[C_R8][C_F7];

    // line 921
    XRQM[C_DL].RMFR = XTRFS[C_R8][C_F5];

    // line 921
    XRQM[C_DL].RMTO = XTRFS[C_R8][C_F3];

    // line 923
    XRQM[C_LS].RMQS = C_false;

    // line 924
    XRQM[C_LL].RMQS = C_true;

    // line 925
    XRQM[C_DS].RMQS = C_false;

    // line 926
    XRQM[C_DL].RMQS = C_true;

    // line 928
    XTMQ[C_LITE] = C_LS;

    // line 929
    XTMQ[C_DARK] = C_DS;

    // line 931
    XTQS[C_LS] = XTRFS[C_R1][C_F8];

    // line 932
    XTQS[C_LL] = XTRFS[C_R1][C_F1];

    // line 933
    XTQS[C_DS] = XTRFS[C_R8][C_F8];

    // line 934
    XTQS[C_DL] = XTRFS[C_R8][C_F1];

    // line 940
    NULMV.RMFR = C_AS;

    // line 941
    NULMV.RMTO = C_AS;

    // line 942
    NULMV.RMCP = C_MT;

    // line 943
    NULMV.RMCA = C_false;

    // line 944
    NULMV.RMAC = C_true;

    // line 945
    NULMV.RMCH = C_false;

    // line 946
    NULMV.RMMT = C_false;

    // line 947
    NULMV.RMIL = C_false;

    // line 948
    NULMV.RMSU = C_false;

    // line 949
    NULMV.RMPR = C_true;

    // line 950
    NULMV.RMPP = C_PB;

    { /* NOP */ }

    // line 955
    JMTJ = C_ZJ;

    // line 956
    ICARD[C_ZJ] = ';';

    // line 957
    ILINE[C_ZJ] = ';';

    // line 961
    _F.INTI = C_SYNCF;

    // line 962
    P_INICON_INISYN(&_F, T_RA::C("    *P    "));

    // line 963
    P_INICON_INISYN(&_F, T_RA::C("    *P/  1"));

    // line 964
    P_INICON_INISYN(&_F, T_RA::C("/  1*P    "));

    // line 965
    P_INICON_INISYN(&_F, T_RA::C("    *P/ R "));

    // line 966
    P_INICON_INISYN(&_F, T_RA::C("/ R *P    "));

    // line 967
    P_INICON_INISYN(&_F, T_RA::C("    *P/ R1"));

    // line 968
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P    "));

    // line 969
    P_INICON_INISYN(&_F, T_RA::C("    *P/KR "));

    // line 970
    P_INICON_INISYN(&_F, T_RA::C("/KR *P    "));

    // line 971
    P_INICON_INISYN(&_F, T_RA::C("    *P/KR1"));

    // line 972
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P    "));

    // line 973
    P_INICON_INISYN(&_F, T_RA::C("/  1*P/  1"));

    // line 974
    P_INICON_INISYN(&_F, T_RA::C("/ R *P/ R "));

    // line 975
    P_INICON_INISYN(&_F, T_RA::C("/  1*P/ R "));

    // line 976
    P_INICON_INISYN(&_F, T_RA::C("/ R *P/  1"));

    // line 977
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P/  1"));

    // line 978
    P_INICON_INISYN(&_F, T_RA::C("/  1*P/ R1"));

    // line 979
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P/ R "));

    // line 980
    P_INICON_INISYN(&_F, T_RA::C("/ R *P/ R1"));

    // line 981
    P_INICON_INISYN(&_F, T_RA::C("/KR *P/  1"));

    // line 982
    P_INICON_INISYN(&_F, T_RA::C("/  1*P/KR "));

    // line 983
    P_INICON_INISYN(&_F, T_RA::C("/KR *P/ R "));

    // line 984
    P_INICON_INISYN(&_F, T_RA::C("/ R *P/KR "));

    // line 985
    P_INICON_INISYN(&_F, T_RA::C("/  1*P/KR1"));

    // line 986
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P/  1"));

    // line 987
    P_INICON_INISYN(&_F, T_RA::C("  R *P/KR1"));

    // line 988
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P/ R "));

    // line 989
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P/ R1"));

    // line 990
    P_INICON_INISYN(&_F, T_RA::C("/KR *P/ R1"));

    // line 991
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P/KR "));

    // line 992
    P_INICON_INISYN(&_F, T_RA::C("/KR *P/KR "));

    // line 993
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P/ R1"));

    // line 994
    P_INICON_INISYN(&_F, T_RA::C("/ R1*P/KR1"));

    // line 995
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P/KR "));

    // line 996
    P_INICON_INISYN(&_F, T_RA::C("/KR *P/KR1"));

    // line 997
    P_INICON_INISYN(&_F, T_RA::C("/KR1*P/KR1"));

    // line 999
    P_INICON_INISYN(&_F, T_RA::C("    -   R1"));

    // line 1000
    P_INICON_INISYN(&_F, T_RA::C("    -  KR1"));

    // line 1001
    P_INICON_INISYN(&_F, T_RA::C("/  1-   R1"));

    // line 1002
    P_INICON_INISYN(&_F, T_RA::C("/ R -   R1"));

    // line 1003
    P_INICON_INISYN(&_F, T_RA::C("/  1-  KR1"));

    // line 1004
    P_INICON_INISYN(&_F, T_RA::C("/ R -  KR1"));

    // line 1005
    P_INICON_INISYN(&_F, T_RA::C("/ R1-   R1"));

    // line 1006
    P_INICON_INISYN(&_F, T_RA::C("/KR -   R1"));

    // line 1007
    P_INICON_INISYN(&_F, T_RA::C("/ R1-  KR1"));

    // line 1008
    P_INICON_INISYN(&_F, T_RA::C("/KR -  KR1"));

    // line 1009
    P_INICON_INISYN(&_F, T_RA::C("/KR1-  KR1"));

    // line 1013
    FKPSHD = 10;

    // line 1014
    FKSANQ = 150;

    // line 1015
    FMAXMT = 256;

    // line 1016
    FNODEL = 18;

    // line 1017
    FPADCR[C_F1] = 0;

    // line 1018
    FPADCR[C_F2] = 0;

    // line 1019
    FPADCR[C_F3] = 5;

    // line 1020
    FPADCR[C_F4] = 10;

    // line 1021
    FPADCR[C_F5] = 15;

    // line 1022
    FPADCR[C_F6] = 5;

    // line 1023
    FPADCR[C_F7] = 0;

    // line 1024
    FPADCR[C_F8] = 0;

    // line 1025
    FPBLOK = 20;

    // line 1026
    FPCONN = 5;

    // line 1027
    FPFLNX = 12;

    // line 1028
    FRDUBL = 60;

    // line 1029
    FRK7TH = 120;

    // line 1030
    FTRADE = 36;

    // line 1031
    FTRDSL = 5156;

    // line 1032
    FTRPDK = 2;

    // line 1033
    FTRPWN = 8;

    // line 1034
    FWKING = 50;

    // line 1035
    FWMAJM = 1;

    // line 1036
    FWMINM = 200;

    // line 1037
    FWPAWN = 100;

    // line 1038
    FWROOK = 2;

    // line 1039
    WINDOW = 30;

    // line 1043
    SWEC = C_true;

    // line 1044
    SWPA = C_true;

    // line 1045
    SWPS = C_false;

    // line 1046
    SWRE = C_true;

    // line 1047
    SWSU = C_false;

    // line 1048
    SWTR = C_false;

    // line 1052
    GOING = 0;

    { /* NOP */ }
}

// line 670
//================================================================================
// scope: INICON_INISYN (level : 3)

// activation record
struct Frame_INICON_INISYN
{
   Frame_INICON* _slink;

    // parameters
    T_RA A;
};

// function body
void P_INICON_INISYN(void* _slink, T_RA A)
{
    // prologue/frame definition
    Frame_INICON_INISYN _F = { (Frame_INICON*)_slink, A };

    // subroutine body
    // line 678
    SYNTX[_F._slink->INTI].RYLS.RDPC = C_true;

    // line 679
    SYNTX[_F._slink->INTI].RYLS.RDSL = (_F.A[(C_AA + 0)] != ' ');

    // line 680
    SYNTX[_F._slink->INTI].RYLS.RDKQ = (_F.A[(C_AA + 1)] != ' ');

    // line 681
    SYNTX[_F._slink->INTI].RYLS.RDNB = (_F.A[(C_AA + 2)] != ' ');

    // line 682
    SYNTX[_F._slink->INTI].RYLS.RDRK = (_F.A[(C_AA + 3)] != ' ');

    { /* NOP */ }

    // line 684
    SYNTX[_F._slink->INTI].RYCH = _F.A[(C_AA + 4)];

    // line 687
    SYNTX[_F._slink->INTI].RYRS.RDPC = (_F.A[(C_AA + 5)] != ' ');

    // line 688
    SYNTX[_F._slink->INTI].RYRS.RDSL = (_F.A[(C_AA + 6)] != ' ');

    // line 689
    SYNTX[_F._slink->INTI].RYRS.RDKQ = (_F.A[(C_AA + 7)] != ' ');

    // line 690
    SYNTX[_F._slink->INTI].RYRS.RDNB = (_F.A[(C_AA + 8)] != ' ');

    // line 691
    SYNTX[_F._slink->INTI].RYRS.RDRK = (_F.A[(C_AA + 9)] != ' ');

    { /* NOP */ }

    { /* NOP */ }

    // line 694
    _F._slink->INTI = (_F._slink->INTI + 1);

    { /* NOP */ }
}

// line 698
//================================================================================
// scope: INICON_INIXTP (level : 3)

// activation record
struct Frame_INICON_INIXTP
{
   Frame_INICON* _slink;

    // parameters
    T_TP A;
    T_char B;
    T_TM C;
    T_TU D;
    T_boolean E;
    T_TE F;
    T_TE G;
    T_TV H;
};

// function body
void P_INICON_INIXTP(void* _slink, T_TP A, T_char B, T_TM C, T_TU D, T_boolean E, T_TE F, T_TE G, T_TV H)
{
    // prologue/frame definition
    Frame_INICON_INIXTP _F = { (Frame_INICON*)_slink, A, B, C, D, E, F, G, H };

    // subroutine body
    // line 710
    XTPC[_F.A] = _F.B;

    // line 711
    XTPM[_F.A] = _F.C;

    // line 712
    XSPB[_F.A] = _F.E;

    // line 713
    XFPE[_F.A] = _F.F;

    // line 714
    XLPE[_F.A] = _F.G;

    // line 715
    XTPU[_F.A] = _F.D;

    // line 716
    XTPV[_F.A] = _F.H;

    // line 717
    if((_F.A != C_MT))
    {
        // line 718
        XTUMP[_F.D][_F.C] = _F.A;
    }

    { /* NOP */ }
}

// line 1057
//================================================================================
// scope: INITAL (level : 2)

// activation record
struct Frame_INITAL
{
    // parameters
    T_RB& A;

    // locals
    T_TF INTF;
    T_TR INTR;
};

// function body
void P_INITAL(void* _slink, T_RB& A)
{
    // prologue/frame definition
    Frame_INITAL _F = {A };

    assert(nullptr == _slink);

    // hoisted definitions
    _T_GenericSet _setLiteral1;
    _setLiteral1.set(C_LS);
    _setLiteral1.set(C_LL);
    _setLiteral1.set(C_DS);
    _setLiteral1.set(C_DL);

    // subroutine body
    // line 1066
    _F.A.RBTM = C_LITE;

    // line 1067
    _F.A.RBTS = (-1);

    // line 1068
    _F.A.RBTI = 0;

    // line 1069
    _F.A.RBSQ = _setLiteral1;

    // line 1070
    _FOR_TO(_F.INTF, C_F1, C_F8)
    {
        // line 1072
        _F.A.RBIRF[C_R2][_F.INTF] = C_LP;

        // line 1073
        _FOR_TO(_F.INTR, C_R3, C_R6)
        {
            // line 1074
            _F.A.RBIRF[_F.INTR][_F.INTF] = C_MT;
        }
        _FOR_END(_F.INTR)

        // line 1075
        _F.A.RBIRF[C_R7][_F.INTF] = C_DP;

        { /* NOP */ }
    }
    _FOR_END(_F.INTF)

    // line 1077
    _F.A.RBIRF[C_R1][C_F1] = C_LR;

    // line 1079
    _F.A.RBIRF[C_R1][C_F2] = C_LN;

    // line 1080
    _F.A.RBIRF[C_R1][C_F3] = C_LB;

    // line 1081
    _F.A.RBIRF[C_R1][C_F4] = C_LQ;

    // line 1082
    _F.A.RBIRF[C_R1][C_F5] = C_LK;

    // line 1083
    _F.A.RBIRF[C_R1][C_F6] = C_LB;

    // line 1084
    _F.A.RBIRF[C_R1][C_F7] = C_LN;

    // line 1085
    _F.A.RBIRF[C_R1][C_F8] = C_LR;

    // line 1086
    _F.A.RBIRF[C_R8][C_F1] = C_DR;

    // line 1087
    _F.A.RBIRF[C_R8][C_F2] = C_DN;

    // line 1088
    _F.A.RBIRF[C_R8][C_F3] = C_DB;

    // line 1089
    _F.A.RBIRF[C_R8][C_F4] = C_DQ;

    // line 1090
    _F.A.RBIRF[C_R8][C_F5] = C_DK;

    // line 1091
    _F.A.RBIRF[C_R8][C_F6] = C_DB;

    // line 1092
    _F.A.RBIRF[C_R8][C_F7] = C_DN;

    // line 1093
    _F.A.RBIRF[C_R8][C_F8] = C_DR;

    // line 1094
    MOVMS = " ENTER MOVE OR TYPE GO.       ";

    // line 1095
    Output << MOVMS << _WRITELN;

    // line 1096
    LSTMV = NULMV;

    { /* NOP */ }

    { /* NOP */ }
}

// line 1101
//================================================================================
// scope: PAUSER (level : 2)

// activation record
struct Frame_PAUSER
{};

// function body
void P_PAUSER(void* _slink)
{
    // prologue/frame definition
    Frame_PAUSER _F = { };

    assert(nullptr == _slink);

    // subroutine body
    // line 1104
    if(SWPA)
    {
        // line 1106
        Output << " PAUSING " << _WRITELN;

        // line 1107
        Input >> _READLN;

        { /* NOP */ }
    }

    { /* NOP */ }
}

// line 1112
//================================================================================
// scope: PRIMOV (level : 2)

// activation record
struct Frame_PRIMOV
{
    // parameters
    T_RM A;
};

// function body
void P_PRIMOV(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_PRIMOV _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1117
    Output << "   FROM   " << _format(_F.A.RMFR, 2, 0) << "   TO   " << _format(_F.A.RMTO, 2, 0);

    // line 1118
    if(F_NULMVB(nullptr, _F.A))
    {
        // line 1119
        Output << ",   NULL   MCVE";
    }
    else
    {
        // line 1122
        if(_F.A.RMCA)
        {
            // line 1123
            Output << ", CAPTURE " << XTPC[_F.A.RMCP] << ',';
        }
        else
        {
            // line 1125
            Output << ", SIMPLE,";
        }

        // line 1126
        if((!_F.A.RMAC))
        {
            // line 1127
            Output << " NO";
        }

        // line 1128
        Output << " ACS";

        // line 1129
        if(_F.A.RMCH)
        {
            // line 1130
            Output << ", CHECK";
        }

        // line 1131
        if(_F.A.RMMT)
        {
            // line 1132
            Output << ",  MATE";
        }

        // line 1133
        if(_F.A.RMIL)
        {
            // line 1134
            Output << ", ILLEGAL";
        }

        // line 1135
        if(_F.A.RMSU)
        {
            // line 1136
            Output << ", SEARCHED";
        }

        // line 1137
        switch(_F.A.RMPR)
        {
        case C_false:
            // line 1139
            switch(_F.A.RMOO)
            {
            case C_false:
                // line 1141
                if(_F.A.RMEP)
                {
                    // line 1142
                    Output << ", ENPASSANT";
                }
                break;

            case C_true:
                // line 1145
                Output << ", CASTLE ";

                // line 1146
                if(_F.A.RMQS)
                {
                    // line 1147
                    Output << "LONG";
                }
                else
                {
                    // line 1148
                    Output << "SHORT";
                }

                { /* NOP */ }
                break;
            }
            break;

        case C_true:
            // line 1153
            Output << ", PROMOTE TO ";

            // line 1154
            switch(_F.A.RMPP)
            {
            case C_PQ:
                // line 1155
                Output << "QUEEN";
                break;

            case C_PR:
                // line 1156
                Output << "ROOK";
                break;

            case C_PB:
                // line 1157
                Output << "BISHOP";
                break;

            case C_PN:
                // line 1158
                Output << "KNIGHT";
                break;
            }

            { /* NOP */ }
            break;
        }

        { /* NOP */ }
    }

    { /* NOP */ }

    // line 1164
    Output << '.' << _WRITELN;

    { /* NOP */ }
}

// line 1168
//================================================================================
// scope: PRINTB (level : 2)

// activation record
struct Frame_PRINTB
{
    // parameters
    T_RC A;

    // locals
    T_TF INTF;
    T_TR INTR;
};

// function body
void P_PRINTB(void* _slink, T_RC A)
{
    // prologue/frame definition
    Frame_PRINTB _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1175
    Output << _WRITELN;

    // line 1176
    _FOR_DOWNTO(_F.INTR, C_R8, C_R1)
    {
        // line 1178
        Output << ' ' << _format((_ord(_F.INTR) + 1), 1, 0) << ' ';

        // line 1179
        _FOR_TO(_F.INTF, C_F1, C_F8)
        {
            // line 1180
            Output << XTPC[_F.A[XTRFS[_F.INTR][_F.INTF]]];
        }
        _FOR_END(_F.INTF)

        // line 1182
        Output << _WRITELN;

        { /* NOP */ }
    }
    _FOR_END(_F.INTR)

    // line 1184
    Output << " W RNBQKBNR" << _WRITELN;

    { /* NOP */ }
}

// line 1208
//================================================================================
// scope: PRINAM (level : 2)

// activation record
struct Frame_PRINAM
{
    // parameters
    T_RX A;

    // locals
    T_TF INTF;
    T_TR INTR;
    T_TF JNTF;
    T_TR JNTR;
};

// function body
void P_PRINAM(void* _slink, T_RX A)
{
    // prologue/frame definition
    Frame_PRINAM _F = {A };

    assert(nullptr == _slink);

    // hoisted definitions
    _T_GenericSet _setLiteral1;
    _setLiteral1.set(C_R1);
    _setLiteral1.set(C_R3);
    _setLiteral1.set(C_R5);
    _setLiteral1.set(C_R7);

    // subroutine body
    // line 1215
    Output << _WRITELN;

    // line 1216
    _FOR_DOWNTO(_F.INTR, C_R8, C_R1)
    {
        // line 1218
        _FOR_DOWNTO(_F.JNTR, C_R8, C_R1)
        {
            // line 1220
            _FOR_TO(_F.INTF, C_F1, C_F8)
            {
                // line 1222
                Output << ' ';

                // line 1223
                _FOR_TO(_F.JNTF, C_F1, C_F8)
                {
                    // line 1225
                    Output << XTBC[F_INRSTB(nullptr, _F.A[XTRFS[_F.INTR][_F.INTF]], XTRFS[_F.JNTR][_F.JNTF])];

                    { /* NOP */ }
                }
                _FOR_END(_F.JNTF)

                // line 1227
                Output << ' ';

                { /* NOP */ }
            }
            _FOR_END(_F.INTF)

            // line 1229
            Output << _WRITELN;

            { /* NOP */ }
        }
        _FOR_END(_F.JNTR)

        // line 1231
        Output << _WRITELN;

        // line 1232
        if((_setLiteral1 & _F.INTR))
        {
            // line 1232
            P_PAUSER(nullptr);
        }

        { /* NOP */ }
    }
    _FOR_END(_F.INTR)

    { /* NOP */ }
}

// line 1237
//================================================================================
// scope: PRISWI (level : 2)

// activation record
struct Frame_PRISWI
{
    // parameters
    T_RA A;
    T_boolean B;
};

// function body
void P_PRISWI(void* _slink, T_RA A, T_boolean B)
{
    // prologue/frame definition
    Frame_PRISWI _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 1240
    Output << ' ' << _F.A[C_AA] << _F.A[(C_AA + 1)];

    // line 1241
    if(_F.B)
    {
        // line 1242
        Output << " ON" << _WRITELN;
    }
    else
    {
        // line 1244
        Output << " OFF" << _WRITELN;
    }

    { /* NOP */ }
}

// line 1248
//================================================================================
// scope: MBEVAL (level : 2)

// activation record
struct Frame_MBEVAL
{
    // locals
    T_integer INTI;
};

// function body
void P_MBEVAL(void* _slink)
{
    // prologue/frame definition
    Frame_MBEVAL _F = { };

    assert(nullptr == _slink);

    // subroutine body
    // line 1254
    if((MBLTE != 0))
    {
        // line 1255
        if((MBLTE > 0))
        {
            // line 1256
            _F.INTI = MBPWN[C_LITE];
        }
        else
        {
            // line 1258
            _F.INTI = MBPWN[C_DARK];
        }
    }
    else
    {
        // line 1260
        _F.INTI = 0;
    }

    // line 1261
    MBVAL[JNTK] = F_SIGN(nullptr, F_MIN(nullptr, (F_MIN(nullptr, FMAXMT, _abs(MBLTE)) + (((((FTRADE * _abs(MBLTE)) * (FTRDSL - MBTOT)) * ((4 * _F.INTI) + FTRPDK)) / ((4 * _F.INTI) + FTRPWN)) / 262144)), 16320), MBLTE);

    { /* NOP */ }
}

// line 1267
//================================================================================
// scope: MBCAPT (level : 2)

// activation record
struct Frame_MBCAPT
{
    // parameters
    T_TP A;
};

// function body
void P_MBCAPT(void* _slink, T_TP A)
{
    // prologue/frame definition
    Frame_MBCAPT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1272
    MBTOT = (MBTOT - _abs(XTPV[_F.A]));

    // line 1273
    if((XTPU[_F.A] == C_EP))
    {
        // line 1274
        MBPWN[XTPM[_F.A]] = (MBPWN[XTPM[_F.A]] - 1);
    }

    // line 1276
    MBLTE = (MBLTE - XTPV[_F.A]);

    // line 1277
    P_MBEVAL(nullptr);

    { /* NOP */ }
}

// line 1281
//================================================================================
// scope: MBTPAC (level : 2)

// activation record
struct Frame_MBTPAC
{
    // parameters
    T_TP A;
};

// function body
void P_MBTPAC(void* _slink, T_TP A)
{
    // prologue/frame definition
    Frame_MBTPAC _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1287
    MBTOT = (MBTOT + _abs(XTPV[_F.A]));

    // line 1288
    if((XTPU[_F.A] == C_EP))
    {
        // line 1289
        MBPWN[XTPM[_F.A]] = (MBPWN[XTPM[_F.A]] + 1);
    }

    // line 1290
    MBLTE = (MBLTE + XTPV[_F.A]);

    { /* NOP */ }
}

// line 1294
//================================================================================
// scope: MBPROM (level : 2)

// activation record
struct Frame_MBPROM
{
    // parameters
    T_TP A;
};

// function body
void P_MBPROM(void* _slink, T_TP A)
{
    // prologue/frame definition
    Frame_MBPROM _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1300
    MBTOT = (MBTOT + _abs((XTPV[_F.A] - XTPV[XTUMP[C_EP][XTPM[_F.A]]])));

    // line 1302
    MBPWN[XTPM[_F.A]] = (MBPWN[XTPM[_F.A]] - 1);

    // line 1303
    MBLTE = ((MBLTE + XTPV[_F.A]) - XTPV[XTUMP[C_EP][XTPM[_F.A]]]);

    // line 1304
    P_MBEVAL(nullptr);

    { /* NOP */ }
}

// line 1308
//================================================================================
// scope: MBMORP (level : 2)

// activation record
struct Frame_MBMORP
{
    // parameters
    T_TP A;
};

// function body
void P_MBMORP(void* _slink, T_TP A)
{
    // prologue/frame definition
    Frame_MBMORP _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1315
    MBTOT = (MBTOT - _abs((XTPV[_F.A] - XTPV[XTUMP[C_EP][XTPM[_F.A]]])));

    // line 1316
    MBPWN[XTPM[_F.A]] = (MBPWN[XTPM[_F.A]] + 1);

    // line 1317
    MBLTE = (MBLTE - (XTPV[_F.A] - XTPV[XTUMP[C_EP][XTPM[_F.A]]]));

    { /* NOP */ }
}

// line 1321
//================================================================================
// scope: ADDATK (level : 2)

// activation record
struct Frame_ADDATK
{
    // parameters
    T_TS A;

    // locals
    T_boolean INTB;
    T_TD INTD;
    T_TE INTE;
    T_TM INTM;
    T_TP INTP;
    T_TT INTT;
};

// function body
void P_ADDATK(void* _slink, T_TS A)
{
    // prologue/frame definition
    Frame_ADDATK _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1335
    _F.INTP = MBORD[_F.A];

    // line 1336
    _F.INTM = XTPM[_F.INTP];

    // line 1337
    _FOR_TO(_F.INTE, XFPE[_F.INTP], XLPE[_F.INTP])
    {
        // line 1339
        _F.INTT = _F.A;

        // line 1340
        _F.INTB = XSPB[_F.INTP];

        // line 1341
        _F.INTD = XTED[_F.INTE];

        // line 1342
        do
        {
            // line 1343
            _F.INTT = XTLS[(XTSL[_F.INTT] + _F.INTD)];

            // line 1344
            if((_F.INTT >= 0))
            {
                // line 1346
                P_SETRS(nullptr, ATKFR[_F.A], T_TS::C(_F.INTT));

                // line 1347
                P_SETRS(nullptr, ATKTO[_F.INTT], _F.A);

                // line 1348
                P_SETRS(nullptr, ALATK[_F.INTM], T_TS::C(_F.INTT));

                // line 1349
                if((MBORD[_F.INTT] != C_MT))
                {
                    // line 1350
                    _F.INTB = C_false;
                }

                { /* NOP */ }
            }
            else
            {
                // line 1353
                _F.INTB = C_false;
            }

            { /* NOP */ }
        }
        while(!(!_F.INTB));

        { /* NOP */ }
    }
    _FOR_END(_F.INTE)

    { /* NOP */ }
}

// line 1359
//================================================================================
// scope: ADDLOC (level : 2)

// activation record
struct Frame_ADDLOC
{
    // parameters
    T_TS A;
    T_TP B;
};

// function body
void P_ADDLOC(void* _slink, T_TS A, T_TP B)
{
    // prologue/frame definition
    Frame_ADDLOC _F = {A, B };

    assert(nullptr == _slink);

    // subroutine body
    // line 1364
    P_CLRRS(nullptr, TPLOC[C_MT], _F.A);

    // line 1365
    P_SETRS(nullptr, TPLOC[_F.B], _F.A);

    // line 1366
    P_SETRS(nullptr, TMLOC[XTPM[_F.B]], _F.A);

    // line 1367
    P_SETRS(nullptr, ALLOC[JNTK], _F.A);

    // line 1368
    MBORD[_F.A] = _F.B;

    { /* NOP */ }
}

// line 1372
//================================================================================
// scope: CLSTAT (level : 2)

// activation record
struct Frame_CLSTAT
{};

// function body
void P_CLSTAT(void* _slink)
{
    // prologue/frame definition
    Frame_CLSTAT _F = { };

    assert(nullptr == _slink);

    // hoisted definitions
    _T_GenericSet _setLiteral1;

    // subroutine body
    // line 1377
    BOARD.RBTM = C_LITE;

    // line 1378
    BOARD.RBTS = (-1);

    // line 1379
    BOARD.RBSQ = _setLiteral1;

    { /* NOP */ }

    { /* NOP */ }
}

// line 1384
//================================================================================
// scope: CUTATK (level : 2)

// activation record
struct Frame_CUTATK
{
    // parameters
    T_TS A;

    // locals
    T_RS IMRS;
    T_RS INRS;
    T_TD INTD;
    T_TL INTL;
    T_TM INTM;
    T_TS INTS;
    T_TT INTT;
};

// function body
void P_CUTATK(void* _slink, T_TS A)
{
    // prologue/frame definition
    Frame_CUTATK _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1397
    P_CPYRS(nullptr, _F.INRS, ATKTO[_F.A]);

    // line 1398
    while(F_NXTTS(nullptr, _F.INRS, _F.INTS))
    {
        // line 1399
        if(XSPB[MBORD[_F.INTS]])
        {
            // line 1401
            _F.INTD = XLLD[(XTSL[_F.A] - XTSL[_F.INTS])];

            // line 1403
            _F.INTM = XTPM[MBORD[_F.INTS]];

            // line 1404
            _F.INTL = (XTSL[_F.A] + _F.INTD);

            // line 1405
            _F.INTT = XTLS[_F.INTL];

            // line 1407
            while((_F.INTT > C_AT))
            {
                // line 1409
                P_CLRRS(nullptr, ATKFR[_F.INTS], T_TS::C(_F.INTT));

                // line 1410
                P_CLRRS(nullptr, ATKTO[_F.INTT], _F.INTS);

                // line 1411
                P_ANDRS(nullptr, _F.IMRS, ATKTO[_F.INTT], TMLOC[_F.INTM]);

                // line 1414
                if(F_NULRS(nullptr, _F.IMRS))
                {
                    // line 1415
                    P_CLRRS(nullptr, ALATK[_F.INTM], T_TS::C(_F.INTT));
                }

                // line 1416
                if((MBORD[_F.INTT] == C_MT))
                {
                    // line 1418
                    _F.INTL = (_F.INTL + _F.INTD);

                    // line 1419
                    _F.INTT = XTLS[_F.INTL];

                    { /* NOP */ }
                }
                else
                {
                    // line 1422
                    _F.INTT = C_AT;
                }

                { /* NOP */ }
            }

            { /* NOP */ }
        }
    }

    { /* NOP */ }
}

// line 1428
//================================================================================
// scope: DELATK (level : 2)

// activation record
struct Frame_DELATK
{
    // parameters
    T_TS A;

    // locals
    T_RS IMRS;
    T_RS INRS;
    T_TM INTM;
    T_TS INTS;
};

// function body
void P_DELATK(void* _slink, T_TS A)
{
    // prologue/frame definition
    Frame_DELATK _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1440
    P_CPYRS(nullptr, _F.INRS, ATKFR[_F.A]);

    // line 1442
    P_NEWRS(nullptr, ATKFR[_F.A]);

    // line 1443
    _F.INTM = XTPM[MBORD[_F.A]];

    // line 1444
    while(F_NXTTS(nullptr, _F.INRS, _F.INTS))
    {
        // line 1447
        P_CLRRS(nullptr, ATKTO[_F.INTS], _F.A);

        // line 1449
        P_ANDRS(nullptr, _F.IMRS, ATKTO[_F.INTS], TMLOC[_F.INTM]);

        // line 1451
        if(F_NULRS(nullptr, _F.IMRS))
        {
            // line 1452
            P_CLRRS(nullptr, ALATK[_F.INTM], _F.INTS);
        }

        // line 1453
        P_CLRRS(nullptr, TPLOC[MBORD[_F.A]], _F.A);

        // line 1454
        P_CLRRS(nullptr, TMLOC[_F.INTM], _F.A);

        // line 1455
        P_CLRRS(nullptr, ALLOC[JNTK], _F.A);

        // line 1456
        P_SETRS(nullptr, TPLOC[C_MT], _F.A);

        // line 1457
        MBORD[_F.A] = C_MT;

        { /* NOP */ }
    }

    { /* NOP */ }
}

// line 1462
//================================================================================
// scope: PRPATK (level : 2)

// activation record
struct Frame_PRPATK
{
    // parameters
    T_TS A;

    // locals
    T_RS INRS;
    T_TD INTD;
    T_TL INTL;
    T_TM INTM;
    T_TS INTS;
    T_TT INTT;
};

// function body
void P_PRPATK(void* _slink, T_TS A)
{
    // prologue/frame definition
    Frame_PRPATK _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1475
    P_CPYRS(nullptr, _F.INRS, ATKTO[_F.A]);

    // line 1476
    while(F_NXTTS(nullptr, _F.INRS, _F.INTS))
    {
        // line 1477
        if(XSPB[MBORD[_F.INTS]])
        {
            // line 1479
            _F.INTD = XLLD[(XTSL[_F.A] - XTSL[_F.INTS])];

            // line 1481
            _F.INTM = XTPM[MBORD[_F.INTS]];

            // line 1482
            _F.INTL = (XTSL[_F.A] + _F.INTD);

            // line 1483
            _F.INTT = XTLS[_F.INTL];

            // line 1485
            while((_F.INTT >= 0))
            {
                // line 1487
                P_SETRS(nullptr, ATKFR[_F.INTS], T_TS::C(_F.INTT));

                // line 1488
                P_SETRS(nullptr, ATKTO[_F.INTT], _F.INTS);

                // line 1489
                P_SETRS(nullptr, ALATK[_F.INTM], T_TS::C(_F.INTT));

                // line 1490
                if((MBORD[_F.INTT] == C_MT))
                {
                    // line 1492
                    _F.INTL = (_F.INTL + _F.INTD);

                    // line 1493
                    _F.INTT = XTLS[_F.INTL];

                    { /* NOP */ }
                }
                else
                {
                    // line 1496
                    _F.INTT = (-1);
                }

                { /* NOP */ }
            }

            { /* NOP */ }
        }
    }

    { /* NOP */ }
}

// line 1502
//================================================================================
// scope: GAINIT (level : 2)

// activation record
struct Frame_GAINIT
{
    // parameters
    T_RM A;
};

// function body
void P_GAINIT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_GAINIT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1508
    P_ADDLOC(nullptr, _F.A.RMFR, MBORD[_F.A.RMTO]);

    // line 1509
    P_ADDATK(nullptr, _F.A.RMFR);

    // line 1510
    P_CUTATK(nullptr, _F.A.RMFR);

    // line 1511
    P_DELATK(nullptr, _F.A.RMTO);

    // line 1513
    P_ADDLOC(nullptr, _F.A.RMTO, _F.A.RMCP);

    // line 1514
    P_ADDATK(nullptr, _F.A.RMTO);

    // line 1515
    P_MBTPAC(nullptr, MBORD[_F.A.RMTO]);

    { /* NOP */ }

    { /* NOP */ }
}

// line 1520
//================================================================================
// scope: LOSEIT (level : 2)

// activation record
struct Frame_LOSEIT
{
    // parameters
    T_RM A;
};

// function body
void P_LOSEIT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_LOSEIT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1526
    P_MBCAPT(nullptr, MBORD[_F.A.RMTO]);

    // line 1527
    P_DELATK(nullptr, _F.A.RMTO);

    // line 1529
    P_ADDLOC(nullptr, _F.A.RMTO, MBORD[_F.A.RMFR]);

    // line 1531
    P_DELATK(nullptr, _F.A.RMFR);

    // line 1533
    P_PRPATK(nullptr, _F.A.RMFR);

    // line 1535
    P_ADDATK(nullptr, _F.A.RMTO);

    { /* NOP */ }

    { /* NOP */ }
}

// line 1540
//================================================================================
// scope: MOVEIT (level : 2)

// activation record
struct Frame_MOVEIT
{
    // parameters
    T_RM A;
};

// function body
void P_MOVEIT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_MOVEIT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1546
    P_ADDLOC(nullptr, _F.A.RMTO, MBORD[_F.A.RMFR]);

    // line 1547
    P_CUTATK(nullptr, _F.A.RMTO);

    // line 1549
    P_DELATK(nullptr, _F.A.RMFR);

    // line 1551
    P_PRPATK(nullptr, _F.A.RMFR);

    // line 1553
    P_ADDATK(nullptr, _F.A.RMTO);

    { /* NOP */ }

    { /* NOP */ }
}

// line 1558
//================================================================================
// scope: RTRKIT (level : 2)

// activation record
struct Frame_RTRKIT
{
    // parameters
    T_RM A;
};

// function body
void P_RTRKIT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_RTRKIT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1564
    P_ADDLOC(nullptr, _F.A.RMFR, MBORD[_F.A.RMTO]);

    // line 1566
    P_CUTATK(nullptr, _F.A.RMFR);

    // line 1568
    P_DELATK(nullptr, _F.A.RMTO);

    // line 1570
    P_PRPATK(nullptr, _F.A.RMTO);

    // line 1572
    P_ADDATK(nullptr, _F.A.RMFR);

    { /* NOP */ }

    { /* NOP */ }
}

// line 1578
//================================================================================
// scope: PAWNIT (level : 2)

// activation record
struct Frame_PAWNIT
{
    // parameters
    T_RM A;
};

// function body
void P_PAWNIT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_PAWNIT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1584
    P_MBMORP(nullptr, MBORD[_F.A.RMTO]);

    // line 1585
    MBORD[_F.A.RMTO] = XTUMP[C_EP][XTPM[MBORD[_F.A.RMTO]]];

    { /* NOP */ }

    { /* NOP */ }
}

// line 1590
//================================================================================
// scope: PROACA (level : 2)

// activation record
struct Frame_PROACA
{
    // parameters
    T_TS A;

    // locals
    T_RS IMRS;
    T_RS INRS;
};

// function body
void P_PROACA(void* _slink, T_TS A)
{
    // prologue/frame definition
    Frame_PROACA _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1598
    P_CLRRS(nullptr, CSTAT[JNTK], _F.A);

    // line 1599
    P_ANDRS(nullptr, _F.INRS, CSTAT[JNTK], XRRS[XTSR[_F.A]]);

    // line 1601
    if((!F_INRSTB(nullptr, _F.INRS, XTRFS[XTSR[_F.A]][C_F5])))
    {
        // line 1603
        P_ANDRS(nullptr, CSTAT[JNTK], CSTAT[JNTK], XNRS[XTSR[_F.A]]);
    }

    // line 1606
    P_ANDRS(nullptr, _F.IMRS, _F.INRS, XRFS[C_F8]);

    // line 1607
    P_ANDRS(nullptr, _F.INRS, _F.INRS, XRFS[C_F1]);

    // line 1608
    P_IORRS(nullptr, _F.INRS, _F.INRS, _F.IMRS);

    // line 1609
    if(F_NULRS(nullptr, _F.INRS))
    {
        // line 1610
        P_ANDRS(nullptr, CSTAT[JNTK], CSTAT[JNTK], XNRS[XTSR[_F.A]]);
    }

    { /* NOP */ }
}

// line 1614
//================================================================================
// scope: PROACS (level : 2)

// activation record
struct Frame_PROACS
{
    // parameters
    T_RM A;
};

// function body
void P_PROACS(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_PROACS _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1621
    if(F_INRSTB(nullptr, CSTAT[JNTK], _F.A.RMFR))
    {
        // line 1622
        P_PROACA(nullptr, _F.A.RMFR);
    }

    // line 1623
    if(F_INRSTB(nullptr, CSTAT[JNTK], _F.A.RMTO))
    {
        // line 1624
        P_PROACA(nullptr, _F.A.RMTO);
    }

    { /* NOP */ }

    { /* NOP */ }
}

// line 1629
//================================================================================
// scope: PROMOT (level : 2)

// activation record
struct Frame_PROMOT
{
    // parameters
    T_RM A;
};

// function body
void P_PROMOT(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_PROMOT _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1635
    P_MBPROM(nullptr, XTGMP[_F.A.RMPP][JNTM]);

    // line 1636
    MBORD[_F.A.RMFR] = XTGMP[_F.A.RMPP][JNTM];

    { /* NOP */ }

    { /* NOP */ }
}

// line 1641
//================================================================================
// scope: CREATE (level : 2)

// activation record
struct Frame_CREATE
{
    // locals
    T_RS INRS;
    T_TM INTM;
    T_TP INTP;
    T_TQ INTQ;
    T_TS INTS;
};

// function body
void P_CREATE(void* _slink)
{
    // prologue/frame definition
    Frame_CREATE _F = { };

    assert(nullptr == _slink);

    // subroutine body
    // line 1653
    JNTW = (C_AW + 1);

    // line 1655
    JNTK = C_AK;

    // line 1656
    JNTM = BOARD.RBTM;

    // line 1658
    NODES = 0;

    // line 1660
    LINDX[JNTK] = JNTW;

    // line 1661
    SRCHM[JNTK] = C_H0;

    // line 1663
    _FOR_TO(_F.INTS, C_AS, C_ZS)
    {
        // line 1665
        P_NEWRS(nullptr, ATKFR[_F.INTS]);

        // line 1666
        P_NEWRS(nullptr, ATKTO[_F.INTS]);

        // line 1667
        MBORD[_F.INTS] = C_MT;

        { /* NOP */ }
    }
    _FOR_END(_F.INTS)

    // line 1670
    P_NEWRS(nullptr, ALLOC[JNTK]);

    // line 1672
    _FOR_TO(_F.INTP, C_LP, C_MT)
    {
        // line 1673
        P_NEWRS(nullptr, TPLOC[_F.INTP]);
    }
    _FOR_END(_F.INTP)

    // line 1675
    _FOR_TO(_F.INTM, C_LITE, C_NONE)
    {
        // line 1677
        P_NEWRS(nullptr, TMLOC[_F.INTM]);

        // line 1678
        P_NEWRS(nullptr, ALATK[_F.INTM]);

        { /* NOP */ }
    }
    _FOR_END(_F.INTM)

    // line 1681
    MBTOT = 0;

    // line 1682
    MBPWN[C_LITE] = 0;

    // line 1683
    MBPWN[C_DARK] = 0;

    // line 1684
    MBLTE = 0;

    // line 1685
    _FOR_TO(_F.INTS, C_AS, C_ZS)
    {
        // line 1686
        if((BOARD.RBIS[_F.INTS] != C_MT))
        {
            // line 1688
            P_ADDLOC(nullptr, _F.INTS, BOARD.RBIS[_F.INTS]);

            // line 1689
            P_MBTPAC(nullptr, BOARD.RBIS[_F.INTS]);

            { /* NOP */ }
        }
        else
        {
            // line 1692
            P_SETRS(nullptr, TPLOC[C_MT], _F.INTS);
        }
    }
    _FOR_END(_F.INTS)

    // line 1694
    P_MBEVAL(nullptr);

    // line 1696
    P_CPYRS(nullptr, _F.INRS, ALLOC[JNTK]);

    // line 1698
    while(F_NXTTS(nullptr, _F.INRS, _F.INTS))
    {
        // line 1699
        P_ADDATK(nullptr, _F.INTS);
    }

    // line 1701
    P_NEWRS(nullptr, CSTAT[JNTK]);

    // line 1702
    _FOR_TO(_F.INTQ, C_LS, C_DL)
    {
        // line 1703
        if((BOARD.RBSQ & _F.INTQ))
        {
            // line 1704
            P_IORRS(nullptr, CSTAT[JNTK], CSTAT[JNTK], XSQS[_F.INTQ]);
        }
    }
    _FOR_END(_F.INTQ)

    // line 1706
    P_NEWRS(nullptr, ENPAS[JNTK]);

    // line 1707
    if((BOARD.RBTS >= 0))
    {
        // line 1708
        P_SETRS(nullptr, ENPAS[JNTK], T_TS::C(BOARD.RBTS));
    }

    // line 1710
    P_CPYRS(nullptr, GENPN[JNTK], TPLOC[XTUMP[C_EP][JNTM]]);

    // line 1711
    P_NOTRS(nullptr, GENTO[JNTK], TMLOC[JNTM]);

    // line 1712
    P_NOTRS(nullptr, _F.INRS, GENPN[JNTK]);

    // line 1713
    P_ANDRS(nullptr, GENFR[JNTK], TMLOC[JNTM], _F.INRS);

    { /* NOP */ }

    { /* NOP */ }
}

// line 1718
//================================================================================
// scope: DNDATE (level : 2)

// activation record
struct Frame_DNDATE
{
    // parameters
    T_RM A;

    // locals
    T_TF INTF;
    T_TR INTR;
    T_TS INTS;
    T_TS RKFR;
    T_TS RKTO;
};

// function body
void P_DNDATE(void* _slink, T_RM A)
{
    // prologue/frame definition
    Frame_DNDATE _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1732
    switch((((_ord(_F.A.RMCA) * 4) + (_ord(_F.A.RMAC) * 2)) + _ord(_F.A.RMPR)))
    {
    case 0:
        // line 1734
        P_RTRKIT(nullptr, _F.A);
        break;

    case 1:
        // line 1737
        P_PAWNIT(nullptr, _F.A);

        // line 1738
        P_RTRKIT(nullptr, _F.A);

        { /* NOP */ }
        break;

    case 2:
        // line 1741
        if(_F.A.RMOO)
        {
            // line 1743
            if(_F.A.RMQS)
            {
                // line 1744
                _F.INTF = C_F1;
            }
            else
            {
                // line 1746
                _F.INTF = C_F8;
            }

            // line 1747
            _F.INTR = XTSR[_F.A.RMFR];

            // line 1748
            _F.RKFR = XTRFS[_F.INTR][_F.INTF];

            // line 1749
            _F.RKTO = ((_F.A.RMFR + _F.A.RMTO) / 2);

            // line 1750
            P_ADDLOC(nullptr, _F.RKFR, MBORD[_F.RKTO]);

            // line 1751
            P_DELATK(nullptr, _F.RKTO);

            // line 1752
            P_PRPATK(nullptr, _F.RKTO);

            // line 1753
            P_ADDATK(nullptr, _F.RKFR);

            // line 1754
            P_RTRKIT(nullptr, _F.A);

            { /* NOP */ }
        }
        else
        {
            // line 1757
            P_RTRKIT(nullptr, _F.A);
        }
        break;

    case 3:
        { /* NOP */ }
        break;

    case 4:
        // line 1760
        if(_F.A.RMEP)
        {
            // line 1762
            _F.INTS = XTRFS[XTSR[_F.A.RMFR]][XTSF[_F.A.RMTO]];

            // line 1763
            P_ADDLOC(nullptr, _F.INTS, _F.A.RMCP);

            // line 1764
            P_CUTATK(nullptr, _F.INTS);

            // line 1765
            P_ADDATK(nullptr, _F.INTS);

            // line 1766
            P_RTRKIT(nullptr, _F.A);

            // line 1767
            P_MBTPAC(nullptr, MBORD[_F.INTS]);

            { /* NOP */ }
        }
        else
        {
            // line 1770
            P_GAINIT(nullptr, _F.A);
        }
        break;

    case 5:
        // line 1773
        P_PAWNIT(nullptr, _F.A);

        // line 1774
        P_GAINIT(nullptr, _F.A);

        { /* NOP */ }
        break;

    case 6:
        // line 1777
        P_GAINIT(nullptr, _F.A);
        break;

    case 7:
        // line 1780
        P_PAWNIT(nullptr, _F.A);

        // line 1781
        P_GAINIT(nullptr, _F.A);

        { /* NOP */ }
        break;
    }

    // line 1784
    JNTW = LINDX[JNTK];

    // line 1786
    JNTK = (JNTK - 1);

    // line 1787
    JNTM = OTHER[JNTM];

    { /* NOP */ }

    { /* NOP */ }
}

// line 1792
//================================================================================
// scope: UPDATE (level : 2)

// activation record
struct Frame_UPDATE
{
    // parameters
    T_RM& A;

    // locals
    T_boolean _fnvalue;
    T_RS IMRS;
    T_RS INRS;
    T_TF INTF;
    T_TR INTR;
    T_TS INTS;
    T_TS RKFR;
    T_TS RKTO;
};

// function body
T_boolean F_UPDATE(void* _slink, T_RM& A)
{
    // prologue/frame definition
    Frame_UPDATE _F = {A };

    assert(nullptr == _slink);

    // subroutine body
    // line 1809
    JNTK = (JNTK + 1);

    // line 1810
    P_NEWRS(nullptr, ENPAS[JNTK]);

    // line 1811
    P_CPYRS(nullptr, CSTAT[JNTK], CSTAT[(JNTK - 1)]);

    // line 1812
    P_CPYRS(nullptr, ALLOC[JNTK], ALLOC[(JNTK - 1)]);

    // line 1813
    MBVAL[JNTK] = MBVAL[(JNTK - 1)];

    // line 1814
    LINDX[JNTK] = JNTW;

    // line 1815
    switch((((_ord(_F.A.RMCA) * 4) + (_ord(_F.A.RMAC) * 2)) + _ord(_F.A.RMPR)))
    {
    case 0:
        // line 1817
        if(_F.A.RMEP)
        {
            // line 1819
            P_SFTRS(nullptr, _F.INRS, XRSS[_F.A.RMTO], C_S1);

            // line 1820
            P_SFTRS(nullptr, _F.IMRS, XRSS[_F.A.RMTO], C_S3);

            // line 1821
            P_IORRS(nullptr, _F.INRS, _F.INRS, _F.IMRS);

            // line 1822
            P_ANDRS(nullptr, _F.INRS, _F.INRS, TPLOC[XTUMP[C_EP][OTHER[JNTM]]]);

            // line 1824
            if((!F_NULRS(nullptr, _F.INRS)))
            {
                // line 1825
                P_SETRS(nullptr, ENPAS[JNTK], T_TS::C(((_F.A.RMTO + _F.A.RMFR) / 2)));
            }

            // line 1827
            P_MOVEIT(nullptr, _F.A);

            { /* NOP */ }
        }
        else
        {
            // line 1830
            P_MOVEIT(nullptr, _F.A);
        }
        break;

    case 1:
        // line 1833
        P_PROMOT(nullptr, _F.A);

        // line 1834
        P_MOVEIT(nullptr, _F.A);

        { /* NOP */ }
        break;

    case 2:
        // line 1838
        if(_F.A.RMOO)
        {
            // line 1840
            if(_F.A.RMQS)
            {
                // line 1841
                _F.INTF = C_F1;
            }
            else
            {
                // line 1843
                _F.INTF = C_F8;
            }

            // line 1844
            _F.INTR = XTSR[_F.A.RMFR];

            // line 1845
            _F.RKFR = XTRFS[_F.INTR][_F.INTF];

            // line 1846
            _F.RKTO = ((_F.A.RMFR + _F.A.RMTO) / 2);

            // line 1