#include <perms.h>
int _imp_mainep(int _imp_argc, char **_imp_argv) {
  void Readps(void);
  void Readline(void);
  int Compare(void);
  void Ss(void);
  void Fault(int A, int B, int C, int D);
  int Chnext(void);
  int Newcell(void);
  int Returncell(int I);
  void Printname(int I);
  int Ap;
  int App;
  int Tp;
  int Psp;
  int Asl;
  int Btn;
  int Ctn;
  int Chp;
  int Faults;
  int Level;
  int Ca;
  int Comp;
  int Scf;
  int Ps[401 /*-1000:-600*/];
  int Tag[1024 /*0:1023*/];
  int Link[1024 /*0:1023*/];
  int A[200 /*1:200*/];
  int T[300 /*1:300*/];
  int Bat[1024 /*0:1023*/];
  int Cot[1024 /*0:1023*/];
  int Ch[512 /*1:512*/];
  int Jump[16 /*0:15*/];
  int Star[16 /*0:15*/];
  int Brt[16 /*0:15*/];
  int Name[16 /*0:15*/];
  int Rtp[16 /*0:15*/];
  int Br[16 /*0:15*/];
  int Chpp[16 /*0:15*/];
  int Start[16 /*0:15*/];
  int Rad[16 /*0:15*/];
  int True[6 /*1:6*/];
  int False[6 /*1:6*/];
  int Prec[12 /*1:12*/];
  int Ucn[12 /*1:12*/];
  int Opr[13 /*0:12*/];
  int Pt[15 /*1:15*/];
  int Pn[15 /*1:15*/];
  int Ptc[15 /*1:15*/];
  Readps();
  Asl = 0;
L__10:
  Tag(Asl) = 0;
  Link(Asl) = 0;
  if (Asl >= 256 && Asl < 1023) Link(Asl) = Asl + 1;
  Asl = Asl + 1;
  if (Asl <= 1023) goto L__10;
  Asl = 256;
  Br(0) = 'BR0';
  Br(1) = 'BR1';
  Br(2) = 'BR2';
  Br(3) = 'BR3';
  Br(4) = 'BR4';
  Br(5) = 'BR5';
  Br(6) = 'BR6';
  Br(7) = 'BR7';
  Br(8) = 'BR8';
  Br(9) = 'BR9';
  Br(10) = 'BR10';
  Br(11) = 'BR11';
  Br(12) = 'BR12';
  Br(13) = 'BR13';
  Br(14) = 'BR14';
  Br(15) = 'BR15';
  True(1) = 'BZ';
  False(1) = 'BNZ';
  True(2) = 'BNZ';
  False(2) = 'BZ';
  True(3) = 'BNG';
  False(3) = 'BG';
  True(4) = 'BL';
  False(4) = 'BNL';
  True(5) = 'BNL';
  False(5) = 'BL';
  True(6) = 'BG';
  False(6) = 'BNG';
  Prec(1) = 3;
  Prec(2) = 3;
  Prec(3) = 2;
  Prec(4) = 1;
  Prec(5) = 1;
  Prec(6) = 3;
  Prec(7) = 2;
  Prec(8) = 2;
  Prec(9) = 1;
  Prec(10) = 1;
  Prec(11) = 1;
  Prec(12) = 4;
  Opr(0) = 'LOAD';
  Opr(1) = 'SHL';
  Opr(2) = 'SHR';
  Opr(3) = 'AND';
  Opr(4) = 'XOR';
  Opr(5) = 'OR';
  Opr(6) = 'EXP';
  Opr(7) = 'DIV';
  Opr(8) = 'MLT';
  Opr(9) = 'ADD';
  Opr(10) = 'SUB';
  Opr(11) = 'NEG';
  Opr(12) = 'NOT';
  Ucn(1) = 3;
  Ucn(2) = 3;
  Ucn(3) = 2;
  Ucn(3) = 2;
  Ucn(4) = 2;
  Ucn(5) = 2;
  Ucn(6) = 3;
  Ucn(7) = 3;
  Ucn(8) = 2;
  Ucn(9) = 2;
  Ucn(10) = 3;
  Ucn(11) = 1;
  Ucn(12) = 1;
  Btn = 0;
  Ctn = 0;
  Chp = 1;
  Faults = 0;
  Level = 0;
  Scf = 0;
  Jump(0) = 0;
  Star(0) = 0;
  Name(0) = 0;
  Rtp(0) = -1;
  Chpp(0) = 0;
  Start(0) = 0;
  Rad(0) = 10;
  Ca = 0;
  Printsymbol('P');
  Printsymbol('R');
  Printsymbol('G');
  Printsymbol(':');
L__1:
  Readline();
  Tp = 1;
L__2:
  if (T(Tp) == '!') goto L__3;
  Psp = -1000;
  Ap = 1;
  if (Compare == 1) {
    Ap = 1;
    Ss();
    if (T(Tp - 1) == ';') goto L__2;
    goto L__1;
  }
  Fault('SYNT', 'AX ?', '    ', '    ');
L__5:
  if (T(Tp) == 10) goto L__1;
  if (T(Tp) == ';') {
    Tp = Tp + 1;
    goto L__2;
  }
L__3:
  Tp = Tp + 1;
  goto L__5;
  void Readps(void) {
    int Pnp;
    int Alt;
    int P;
    int I;
    int J;
    int K;
    int Pn[45 /*256:300*/];
    int Psp[45 /*256:300*/];
    void Insertlit(void);
    int Getpn(void);
    Pnp = 256;
    P = -1000;
  L__1:
    Readsymbol(I);
    if (I == 'B') {
    L__2:
      Readsymbol(I);
      if (I != '<') goto L__2;
      J = Getpn;
    L__3:
      Readsymbol(I);
      if (I != '=') goto L__3;
      Read(K);
      Psp(J) = K;
      goto L__1;
    }
    if (I == 'P') {
    L__4:
      Readsymbol(I);
      if (I != '<') goto L__4;
      Psp(Getpn) = P;
    L__7:
      Alt = P;
    L__6:
      P = P + 1;
    L__5:
      Readsymbol(I);
      if (I == '\'') {
        Insertlit();
        goto L__5;
      }
      if (I == '<') {
        Ps(P) = Getpn;
        goto L__6;
      }
      if (I == ',') {
        Ps(Alt) = P;
        goto L__7;
      }
      if (I == ';') {
        Ps(Alt) = P;
        Ps(P) = 0;
        P = P + 1;
        goto L__1;
      }
      goto L__5;
    }
    if (I == 'E') {
      I = -1000;
    L__8:
      if (Ps(I) >= 256) Ps(I) = Psp(Ps(I));
      I = I + 1;
      if (I != P) goto L__8;
      return;
    }
    goto L__1;
    void Insertlit(void) {
      int Sh;
      int I;
      Sh = 0;
    L__1:
      Readsymbol(I);
      if (I == '\'') {
        if (Nextsymbol != '\'') return;
        Readsymbol(I);
      }
      if (I == '%')
        Sh = 128;
      else {
        if (I < 'A' || I > 'Z') Sh = 0;
        Ps(P) = I + Sh;
        P = P + 1;
      }
      goto L__1;
    }
    int Getpn(void) {
      int Np;
      int S;
      int I;
      Np = 0;
      S = 24;
    L__1:
      Readsymbol(I);
      if (I != '>') {
        Np = Np | I << S;
        S = S - 8;
        goto L__1;
      }
      if (Pnp != 256) {
        I = 256;
      L__2:
        if (Np == Pn(I)) return (I);
        I = I + 1;
        if (I != Pnp) goto L__2;
      }
      Pn(Pnp) = Np;
      Psp(Pnp) = 99999;
      Pnp = Pnp + 1;
      return (Pnp - 1);
    }
  }
  void Readline(void) {
    void Store(int I);
    int Sh;
    int I;
    Newlines(2);
    Printsymbol(';');
    Sh = 0;
    Tp = 1;
  L__1:
    Readsymbol(I);
    if (I == 10 && Tp == 1) goto L__1;
    Printsymbol(I);
    if (I == '\'') {
      Sh = 128;
    L__2:
      Store(I);
      Readsymbol(I);
      Printsymbol(I);
      if (I == 10) Printsymbol(';');
      if (I != '\'') goto L__2;
      Readsymbol(I);
      Printsymbol(I);
      if (I == '\'') goto L__2;
      Sh = 0;
      Store('\'');
    }
    if (I == '%')
      Sh = 128;
    else {
      if (I < 'A' || I > 'Z') Sh = 0;
      if (I != ' ') {
        Store(I);
        if (I == 10)
          if (T(Tp - 2) == 'C' + 128) {
            Tp = Tp - 2;
            Printsymbol(';');
          } else
            return;
      }
    }
    goto L__1;
    void Store(int I) {
      if (Tp > 300) {
        Fault('STAT', 'MNT ', 'TOO ', 'LONG');
        Tp = 1;
      }
      T(Tp) = I + Sh;
      Tp = Tp + 1;
    }
  }
  int Compare(void) {
    int Name(void);
    int Cnst(void);
    int App;
    int Tpp;
    int Pspp;
    int Ae;
    int N;
    Tpp = Tp;
    App = Ap;
    A(Ap) = 1;
  L__11:
    Ae = Ps(Psp);
    Psp = Psp + 1;
  L__12:
    if (Psp == Ae) return (1);
    N = Ps(Psp);
    Psp = Psp + 1;
    if (N < 0) {
      Pspp = Psp;
      Psp = N;
      Ap = Ap + 1;
      N = Compare;
      Psp = Pspp;
      if (N == 1) goto L__12;
      goto L__13;
    }
    if (N == 1) {
      if (Name == 1) goto L__12;
      goto L__13;
    }
    if (N == 2) {
      if (Cnst == 1) goto L__12;
      goto L__13;
    }
    if (N == T(Tp)) {
      Tp = Tp + 1;
      goto L__12;
    }
  L__13:
    if (Ps(Ae) == 0) return (0);
    Psp = Ae;
    Tp = Tpp;
    Ap = App;
    A(Ap) = A(Ap) + 1;
    goto L__11;
    int Name(void) {
      int I;
      int J;
      int K;
      int L;
      int M;
      int N;
      I = T(Tp);
      if (I < 'A' || I > 'Z' || (I == 'M' && T(Tp + 1) == '\'' + 128))
        return (0);
      J = Chp;
      K = I << 16;
      L = 1;
      M = 8;
      N = I;
    L__1:
      Tp = Tp + 1;
      I = T(Tp);
      if (('0' <= I && I <= '9') || ('A' <= I && I <= 'Z')) {
        K = K | I << M;
        L = L + 1;
        M = M - 8;
        N = N + I;
        if (M < 0) {
          Ch(Chnext) = K;
          K = 0;
          M = 24;
        }
        goto L__1;
      }
      if (K != 0) Ch(Chnext) = K;
      Ch(J) = Ch(J) | L << 24;
      I = (N & 15) << 4 | N >> 4 & 15;
      K = I;
    L__2:
      if (Tag(K) != 0) {
        L = Tag(K);
        M = J;
      L__4:
        if (Ch(L) == Ch(M)) {
          M = M + 1;
          if (M == Chp) {
            Chp = J;
            goto L__3;
          }
          L = L + 1;
          goto L__4;
        }
        K = (K + 1) & 255;
        if (K == I) {
          Fault('DICT', 'IONA', 'RY F', 'ULL ');
          exit(0);
        }
        goto L__2;
      }
      Tag(K) = J;
    L__3:
      Ap = Ap + 1;
      A(Ap) = K;
      return (1);
    }
    int Cnst(void) {
      int I;
      int J;
      int K;
      I = T(Tp);
      if (I == 'M' && T(Tp + 1) == '\'' + 128) {
        Tp = Tp + 1;
        I = T(Tp);
      }
      if (I == '\'' + 128) {
        J = 0;
        K = 0;
      L__1:
        Tp = Tp + 1;
        I = T(Tp);
        if (I != '\'') {
          J = J << 8 | I & 127;
          K = K + 1;
          goto L__1;
        }
        Tp = Tp + 1;
        if (K > 4) Fault('STRI', 'NG T', 'OO L', 'ONG ');
        goto L__2;
      }
      if (I < '0' || I > '9') return (0);
      J = 0;
    L__3:
      J = 10 * J + I - '0';
      Tp = Tp + 1;
      I = T(Tp);
      if ('0' <= I && I <= '9') goto L__3;
    L__2:
      Ap = Ap + 1;
      A(Ap) = J;
      return (1);
    }
  }
  void Ss(void) {
    void Ui(void);
    void Sccond(int Label);
    void Sexpr(void);
    int Findlabel(void);
    void Check(void);
    void Unset(void);
    void Pushstart(int Flag, int Label);
    int Btnext(void);
    int Ctnext(void);
    int Wsnext(void);
    void Storetag(int Name, int Form, int Type, int Dim, int Lev, int Ad);
    void Dump(int Op, int Reg, int Base, int Disp);
    void Skipsexpr(void);
    void Skipapp(void);
    void Rt(void);
    void Arrad(void);
    void Enter(int Type, int Alloc);
    void Return(void);
    int I;
    int J;
    int K;
    int L;
    int M;
    int N;
    int P;
    int Q;
    int R;
    int Ws;
    int Label;
    I = A(Ap);
    Ap = Ap + 1;
    Ws = 2;
    if (I == 1) goto L__10;
    if (I == 2) goto L__20;
    if (I == 3) goto L__30;
    if (I == 4) goto L__40;
    if (I == 5) goto L__50;
    if (I == 6) goto L__60;
    if (I == 7) goto L__70;
    if (I == 8) goto L__80;
    if (I == 9) goto L__90;
    return;
  L__10:
    Ui();
    return;
  L__20:
    Sccond(I);
    if (A(Ap) == 2) {
      Ap = Ap + 2;
      J = -1;
    } else {
      if (A(Ap) == 3) {
        if (A(Ap + 1) == 1) Fault('%STA', 'RT %', 'ELSE', ' ?  ');
        Pushstart(0, I);
        return;
      }
      Ui();
      J = 0;
    }
    if (A(Ap) == 1) {
      if (J == 0) {
        J = Btnext;
        Dump('B', 0, 'BT', J);
      }
      if (I >= 0) Bat(I) = Ca;
      Ap = Ap + 1;
      if (A(Ap) == 3) {
        Pushstart(1, J);
        return;
      }
      Ui();
      I = J;
    }
    if (I >= 0) Bat(I) = Ca;
    return;
  L__30:
    I = Findlabel;
    if (I >= 0) {
      if (Bat(I) >= 0) {
        Write(Label, 1);
        Spaces(2);
        Fault('LABE', 'L SE', 'T TW', 'ICE ');
      }
      Bat(I) = Ca;
    }
    Ss();
    return;
  L__40:
    I = Start(Level);
    if (I == 0) {
      Fault('SPUR', 'IOUS', ' %FI', 'NISH');
      return;
    }
    J = Tag(I) & 65535;
    K = Tag(I) >> 16;
    Start(Level) = Returncell(I);
    if (A(Ap) == 1) {
      if (K == 1) Fault('TWO ', '%ELS', 'ES !', '    ');
      K = Btnext;
      Dump('B', 0, 'BT', K);
      if (J != 65535) Bat(J) = Ca;
      Ap = Ap + 1;
      if (A(Ap) == 3) {
        Pushstart(1, K);
        return;
      }
      Ui();
      J = K;
    }
    if (J != 65535) Bat(J) = Ca;
    return;
  L__50:
    if (A(Ap) == 1) {
      App = Ap;
    L__51:
      Ap = Ap + 2;
      if (A(Ap) == 1) goto L__51;
      Ap = Ap + 1;
      Sexpr();
      Dump('STR', 'ACC', Br(Level), Wsnext);
      Sexpr();
      Dump('LDA', 'ACC', 'ACC', 1);
      if (A(Ap) == 1) {
        Dump('SUB', 'ACC', Br(Level), Ws - 1);
        Dump('STR', 'ACC', Br(Level), Wsnext);
        Ap = Ap + 1;
        Sexpr();
        Dump('MLT', 'ACC', Br(Level), Ws - 1);
        Dump('STR', 'ACC', Br(Level), Wsnext);
        Sexpr();
        Dump('LDA', 'ACC', 'ACC', 1);
        Dump('MLT', 'ACC', Br(Level), Ws - 2);
        Dump('STR', 'ACC', Br(Level), Wsnext);
        Ws = Ws - 4;
        I = 2;
      } else {
        Dump('STR', 'ACC', Br(Level), Wsnext);
        Ws = Ws - 2;
        I = 1;
      }
      J = 2;
      Ap = App;
    } else {
      I = 0;
      J = 0;
    }
  L__52:
    Storetag(A(Ap + 1), J, 1, I, Level, Rad(Level));
    if (I == 0)
      Rad(Level) = Rad(Level) + 1;
    else {
      if (I == 1) {
        Dump('SUB', 'STP', Br(Level), Ws);
        Dump('STR', 'STP', Br(Level), Rad(Level));
        Dump('ADD', 'STP', Br(Level), Ws + 1);
      } else {
        Dump('LOAD', 'ACC', Br(Level), Ws + 1);
        Dump('STR', 'ACC', Br(Level), Rad(Level));
        Dump('SUB', 'STP', Br(Level), Ws + 2);
        Dump('LDA', 'ACC', 'STP', 0);
        Dump('SUB', 'ACC', Br(Level), Ws);
        Dump('STR', 'ACC', Br(Level), Rad(Level) + 1);
        Dump('ADD', 'STP', Br(Level), Ws + 3);
      }
      Rad(Level) = Rad(Level) + 2;
    }
    Ap = Ap + 2;
    if (A(Ap) == 1) goto L__52;
    return;
  L__60:
    I = A(Ap) - 1;
    J = A(Ap + 1);
    K = A(Ap + 2);
    Ap = Ap + 3;
    L = 0;
    M = 10;
  L__63:
    if (A(Ap) == 1) {
      Ap = Ap + 1;
      if (A(Ap) == 1)
        N = 3;
      else
        N = 3 - A(Ap);
      P = N << 28 | 1 << 24 | (Level + 1) << 16;
    L__62:
      L = L + 1;
      if (L > 15) {
        Fault('TOO ', 'MANY', ' PAR', 'AMS ');
        goto L__61;
      }
      Pt(L) = P | M;
      Pn(L) = A(Ap + 1);
      if (N == 3)
        M = M + 2;
      else
        M = M + 1;
      Ap = Ap + 2;
      if (A(Ap) == 1) goto L__62;
      Ap = Ap + 1;
      goto L__63;
    }
  L__61:
    N = Link(K);
    if (N == 0 || (Tag(N) >> 16 & 15) < Level) {
      if (L > 0) {
        P = 1;
        Q = K;
      L__64:
        R = Newcell;
        Tag(R) = Pt(P);
        Link(R) = Link(Q);
        Ptc(P) = R;
        Link(Q) = R;
        Q = R;
        P = P + 1;
        if (P <= L) goto L__64;
      }
      Storetag(K, 4, I, L, Level, Btnext);
      if (Level == 0) Bat(Btn - 1) = K + 65536;
    } else if (J == 2 && Tag(N) >> 28 == 4) {
      if ((Tag(N) >> 24 & 15) != I) {
        Printname(K);
        Fault('RT N', 'OT A', 'S SP', 'EC  ');
      }
      if (Bat(Tag(N) & 65535) >= 0) {
        Printname(K);
        Fault('RT A', 'PPEA', 'RS T', 'WICE');
      }
      P = Tag(N) >> 20 & 15;
      if (L != P) {
        Fault('PARS', ' NOT', ' AS ', 'SPEC');
        if (L > P) L = P;
      }
      if (L > 0) {
        P = 1;
        Q = Link(N);
      L__67:
        if ((Pt(P) | Tag(Q) & 15 << 20) != Tag(Q)) {
          Printname(Pn(P));
          Fault('PAR ', 'NOT ', 'AS S', 'PEC ');
        }
        Ptc(P) = Q;
        P = P + 1;
        Q = Link(Q);
        if (P <= L) goto L__67;
      }
    } else {
      Printname(K);
      Fault('NAME', ' SET', ' TWI', 'CE  ');
    }
  L__68:
    if (J == 2) {
      Brt(Level) = Btnext;
      Dump('B', 0, 'BT', Brt(Level));
      Bat(Tag(Link(K)) & 65535) = Ca;
      if (Level == 15)
        Fault('TOO ', 'MANY', ' LEV', 'ELS ');
      else
        Level = Level + 1;
      Enter(I, M);
      if (L > 0) {
        P = 1;
      L__69:
        I = Pt(P);
        if (I >> 28 == 3)
          Storetag(Pn(P), 3, 1, 0, Level, Ptc(P));
        else
          Storetag(Pn(P), I >> 28, 1, 0, Level, I & 65535);
        P = P + 1;
        if (P <= L) goto L__69;
      }
    }
    return;
  L__70:
    Check();
    Cot(Star(Level)) = Rad(Level);
    Unset();
    Chp = Chpp(Level);
    if (Rtp(Level) != 0) Dump('STOP', 0, 0, 0);
    Return();
    Level = Level - 1;
    if (Level < 1) {
      Fault('EXCE', 'SS %', 'END ', '    ');
      goto L__71;
    }
    Bat(Brt(Level)) = Ca;
    return;
  L__80:
    if (Level != 0) {
      Fault('%BEG', 'IN E', 'XTRA', '    ');
      return;
    }
    if (Ca != 0 || Rad(0) != 10) {
      Fault('%BEG', 'IN N', 'OT F', 'IRST');
      return;
    }
    Level = 1;
    Enter(-1, 10);
    return;
  L__90:
    Check();
    Cot(Star(Level)) = Rad(Level);
    Unset();
    if (Level != 1) Fault('TOO ', 'FEW ', '%END', 'S   ');
  L__71:
    Dump('STOP', 0, 0, 0);
    Printsymbol('B');
    Printsymbol('T');
    Printsymbol(':');
    Newline();
    Ca = 0;
  L__93:
    if (Ca != Btn) {
      Dump('B', 0, 'PRG', Bat(Ca));
      goto L__93;
    }
    Printsymbol('C');
    Printsymbol('T');
    Printsymbol(':');
    Newline();
    I = 0;
  L__91:
    if (I != Ctn) {
      Write(Cot(I), 10);
      Newline();
      I = I + 1;
      goto L__91;
    }
    Printsymbol(';');
    Write(Faults, 1);
    Fault(' FAU', 'LTS ', 'IN P', 'ROGM');
    exit(0);
    void Ui(void) {
      int I;
      int J;
      int K;
      int L;
      I = A(Ap);
      Ap = Ap + 1;
      if (I == 1) goto L__10;
      if (I == 2) goto L__20;
      if (I == 3) goto L__30;
      if (I == 4) goto L__40;
      if (I == 5) goto L__50;
      Dump('STOP', 0, 0, 0);
      return;
    L__10:
      I = Link(A(Ap));
      if (I == 0) {
        Printname(A(Ap));
        Fault('NAME', ' NOT', ' SET', 0);
      } else
        I = Tag(I);
      J = Ap;
      Ap = Ap + 1;
      Skipapp();
      if (A(Ap) == 2) {
        if (I >> 24 == 64) {
          Ap = J;
          Rt();
        } else if (I != 0) {
          Printname(A(J));
          Fault('NOT ', 'ROUT', 'INE ', 'NAME');
        }
        Ap = Ap + 1;
        return;
      }
      K = I >> 28;
      if (K == 4) {
        Printname(A(J));
        Fault('NAME', ' NOT', ' A D', 'ESTN');
        I = 0;
      }
      Ap = Ap + 1;
      Sexpr();
      if (I == 0) return;
      if (K >= 2) {
        Dump('STR', 'ACC', Br(Level), Wsnext);
        K = Ap;
        Ap = J;
        Arrad();
        Ws = Ws - 1;
        Dump('LOAD', 'WK', Br(Level), Ws);
        Dump('STR', 'WK', 'ACC', 0);
        Ap = K;
        return;
      }
      if (K == 1) {
        Dump('LOAD', 'WK', Br(I >> 16 & 15), I & 65535);
        Dump('STR', 'ACC', 'WK', 0);
      } else
        Dump('STR', 'ACC', Br(I >> 16 & 15), I & 65535);
      if (A(J + 1) == 1) {
        Printname(A(J));
        Fault('SCAL', 'AR H', 'AS P', 'ARAM');
      }
      return;
      Printsymbol('B');
      Printsymbol('T');
      Printsymbol(':');
      Newline();
      Ca = 0;
    L__93:
      if (Ca != Btn) {
        Dump('B', 0, 'PRG', Bat(Ca));
        goto L__93;
      }
      Printsymbol('C');
      Printsymbol('T');
      Printsymbol(':');
      Newline();
      I = 0;
    L__91:
      if (I != Ctn) {
        Write(Cot(I), 10);
        Newline();
        I = I + 1;
        goto L__91;
      }
      Printsymbol(';');
      Write(Faults, 1);
      Fault(' FAU', 'LTS ', 'IN P', 'ROGM');
      exit(0);
      void Ui(void) {
        int I;
        int J;
        int K;
        int L;
        I = A(Ap);
        Ap = Ap + 1;
        if (I == 1) goto L__10;
        if (I == 2) goto L__20;
        if (I == 3) goto L__30;
        if (I == 4) goto L__40;
        if (I == 5) goto L__50;
        Dump('STOP', 0, 0, 0);
        return;
      L__10:
        I = Link(A(Ap));
        if (I == 0) {
          Printname(A(Ap));
          Fault('NAME', ' NOT', ' SET', 0);
        } else
          I = Tag(I);
        J = Ap;
        Ap = Ap + 1;
        Skipapp();
        if (A(Ap) == 2) {
          if (I >> 24 == 64) {
            Ap = J;
            Rt();
          } else if (I != 0) {
            Printname(A(J));
            Fault('NOT ', 'ROUT', 'INE ', 'NAME');
          }
          Ap = Ap + 1;
          return;
        }
        K = I >> 28;
        if (K == 4) {
          Printname(A(J));
          Fault('NAME', ' NOT', ' A D', 'ESTN');
          I = 0;
        }
        Ap = Ap + 1;
        Sexpr();
        if (I == 0) return;
        if (K >= 2) {
          Dump('STR', 'ACC', Br(Level), Wsnext);
          K = Ap;
          Ap = J;
          Arrad();
          Ws = Ws - 1;
          Dump('LOAD', 'WK', Br(Level), Ws);
          Dump('STR', 'WK', 'ACC', 0);
          Ap = K;
          return;
        }
        if (K == 1) {
          Dump('LOAD', 'WK', Br(I >> 16 & 15), I & 65535);
          Dump('STR', 'ACC', 'WK', 0);
        } else
          Dump('STR', 'ACC', Br(I >> 16 & 15), I & 65535);
        if (A(J + 1) == 1) {
          Printname(A(J));
          Fault('SCAL', 'AR H', 'AS P', 'ARAM');
        }
        return;
      L__20:
        Dump('B', 0, 'BT', Findlabel);
        return;
      L__30:
        Fault('%STA', 'RT ?', '    ', '    ');
        return;
      L__40:
        if (Rtp(Level) != 0) Fault('%RET', 'URN ', 'CONT', 'EXT ');
        Return();
        return;
      L__50:
        I = Rtp(Level);
        if (I <= 0) Fault('%RES', 'ULT ', 'CONT', 'EXT ');
        Sexpr();
        Return();
      }
      void Sexpr(void) {
        void Torp(void);
        void Pseval(void);
        void Eval(int P);
        int Rpp;
        int App;
        int Rp[32 /*1:32*/];
        int Pt[32 /*1:32*/];
        Rpp = 1;
        Torp();
        if (Scf == 1) {
          Scf = 0;
          Comp = A(Ap);
          if (A(Ap + 3) == 0 && A(Ap + 4) == 2)
            Ap = Ap + 5;
          else {
            Ap = Ap + 1;
            Torp();
            Rp(Rpp) = 10;
            Pt(Rpp) = 1;
            Rpp = Rpp + 1;
          }
        }
        App = Ap;
        Pseval();
        Eval(Rpp - 1);
        Ap = App;
        void Torp(void) {
          void Store(int I, int J);
          int Op[4 /*1:4*/];
          int Opp;
          int I;
          Opp = 0;
          I = A(Ap);
          Ap = Ap + 1;
          if (I == 1 || I == 4) goto L__1;
          I = I + 9;
        L__3:
          Opp = Opp + 1;
          Op(Opp) = I;
        L__1:
          I = A(Ap);
          if (I == 3) {
            Ap = Ap + 1;
            Torp();
          } else {
            Store(Ap, 0);
            Ap = Ap + 2;
            if (I == 1) Skipapp();
          }
          if (A(Ap) == 2) {
            Ap = Ap + 1;
          L__2:
            if (Opp == 0) return;
            Store(Op(Opp), 1);
            Opp = Opp - 1;
            goto L__2;
          }
          I = A(Ap + 1);
          Ap = Ap + 2;
        L__4:
          if (Opp == 0 || Prec(I) > Prec(Op(Opp))) goto L__3;
          Store(Op(Opp), 1);
          Opp = Opp - 1;
          goto L__4;
          void Store(int I, int J) {
            if (Rpp > 32) {
              Fault('EXPR', ' TOO', ' LON', 'G   ');
              Rpp = 1;
            }
            Rp(Rpp) = I;
            Pt(Rpp) = J;
            Rpp = Rpp + 1;
          }
        }
        void Pseval(void) {
          int Pst[32 /*1:32*/];
          int Pstp;
          int I;
          int J;
          int K;
          Pstp = 0;
          I = 1;
        L__3:
          Ap = Rp(I);
          if (A(Ap) == 1) {
            J = Link(A(Ap + 1));
            if (J == 0) {
              Printname(A(Ap + 1));
              Fault('NAME', ' NOT', ' SET', 0);
              K = 0;
              goto L__1;
            }
            K = Tag(J);
            J = K >> 28;
            if (J > 1) {
              Rp(I) = Ap + 1;
              if (J == 4) {
                if ((K >> 24 & 15) == 0) {
                  Printname(A(Ap + 1));
                  Fault('RT N', 'AME ', 'IN E', 'XPR ');
                  K = 0;
                  goto L__1;
                }
                Pt(I) = -1;
              } else
                Pt(I) = -2;
              goto L__2;
            }
            if (A(Ap + 2) == 1) {
              Printname(A(Ap + 1));
              Fault('SCAL', 'AR H', 'AS P', 'ARAM');
            }
          L__1:
            Rp(I) = K;
            Pt(I) = -3;
          } else {
            Rp(I) = A(Ap + 1);
            Pt(I) = -4;
          }
        L__2:
          Pstp = Pstp + 1;
        L__4:
          Pst(Pstp) = I;
          I = I + 1;
          if (I < Rpp) {
            if (Pt(I) == 0) goto L__3;
            if (Rp(I) <= 10) {
              Pstp = Pstp - 1;
              Pt(I) = Pst(Pstp);
            }
            goto L__4;
          }
        }
        void Eval(int P) {
          void Opn(int Op, int L);
          int I;
          int J;
          int K;
          I = Pt(P);
          if (I < 0) {
            Opn(0, P);
            return;
          }
          J = Rp(P);
          K = P - 1;
          if (Ucn(J) == 1) {
            if (Pt(K) >= -2)
              Eval(K);
            else
              Opn(0, K);
            Dump(Opr(J), 'ACC', 0, 0);
            return;
          }
          if (Pt(I) >= -2)
            if (Pt(K) >= -2) {
              Eval(K);
              Dump('STR', 'ACC', Br(Level), Wsnext);
              Eval(I);
              Ws = Ws - 1;
              Dump(Opr(J), 'ACC', Br(Level), Ws);
            } else {
              Eval(I);
              Opn(J, K);
            }
          else if (Pt(K) >= -2) {
            Eval(K);
            if (Ucn(J) == 2) {
              Opn(J, I);
              return;
            }
            Dump('STR', 'ACC', Br(Level), Wsnext);
            Opn(0, I);
            Ws = Ws - 1;
            Dump(Opr(J), 'ACC', Br(Level), Ws);
          } else {
            Opn(0, I);
            Opn(J, K);
          }
          return;
          void Opn(int Op, int L) {
            int I;
            int J;
            I = Pt(L);
            Ap = Rp(L);
            if (I == -1) {
              Rt();
              return;
            }
            if (I == -2) {
              Arrad();
              Dump('LOAD', 'ACC', 'ACC', 0);
              return;
            }
            if (I == -3) {
              if (Ap >> 28 == 1) {
                Dump('LOAD', 'WK', Br(Ap >> 16 & 15), Ap & 65535);
                Dump(Opr(Op), 'ACC', 'WK', 0);
              } else
                Dump(Opr(Op), 'ACC', Br(Ap >> 16 & 15), Ap & 65535);
              return;
            }
            if (Op != 0 || Ap > 65535) {
              J = Ctnext;
              Cot(J) = Ap;
              Dump(Opr(Op), 'ACC', 'CT', J);
            } else
              Dump('LDA', 'ACC', 0, Ap);
          }
        }
      }
      void Skipsexpr(void) {
      L__1:
        Ap = Ap + 2;
        if (A(Ap - 1) == 3)
          Skipsexpr();
        else {
          Ap = Ap + 1;
          if (A(Ap - 2) == 1) Skipapp();
        }
        Ap = Ap + 1;
        if (A(Ap - 1) == 1) goto L__1;
      }
      void Skipapp(void) {
      L__1:
        Ap = Ap + 1;
        if (A(Ap - 1) == 1) {
          Skipsexpr();
          goto L__1;
        }
      }
      void Sccond(int Label) {
        void Sc(void);
        void Cond(void);
        void Store(int Ft);
        int I;
        int J;
        int K;
        int L;
        int App;
        int Cap[16 /*1:16*/];
        int Lvl[16 /*1:16*/];
        int Tf[16 /*1:16*/];
        int Jmp[16 /*1:16*/];
        int Lbl[16 /*1:16*/];
        I = 1;
        L = 0;
        Sc();
        Cond();
        App = Ap;
        L = -1;
        Store(1);
        L = -2;
        Store(2);
        K = I - 1;
        I = 1;
      L__2:
        J = I;
      L__1:
        J = J + 1;
        if (Lvl(J) >= Lvl(I) || Tf(J) == Tf(I)) goto L__1;
        Jmp(I) = J;
        I = I + 1;
        if (I < K) goto L__2;
        if (A(Ap) != 2) goto L__3;
        Ap = Ap + 1;
        J = K - 1;
        Tf(J) = 2;
        Jmp(J) = J;
        Lbl(J) = Findlabel;
      L__3:
        I = 1;
      L__4:
        if (Lbl(Jmp(I)) < 0) Lbl(Jmp(I)) = Btnext;
        I = I + 1;
        if (I < K) goto L__4;
        I = 1;
      L__7:
        Ap = Cap(I);
        Scf = 1;
        Sexpr();
        if (Tf(I) == 1)
          L = False(Comp);
        else
          L = True(Comp);
        Dump(L, 'ACC', 'BT', Lbl(Jmp(I)));
        if (Lbl(I) >= 0 && (I != K - 1 || Tf(I) == 1)) Bat(Lbl(I)) = Ca;
        I = I + 1;
        if (I < K) goto L__7;
        Label = Lbl(K);
        Ap = App;
        void Store(int Ft) {
          if (I > 16) {
            Fault('COND', 'N TO', 'O LO', 'NG  ');
            I = 1;
          }
          Lvl(I) = L;
          Tf(I) = Ft;
          Lbl(I) = -1;
          I = I + 1;
        }
        void Sc(void) {
          Ap = Ap + 1;
          if (A(Ap - 1) == 2) {
            L = L + 1;
            Sc();
            Cond();
            L = L - 1;
          } else {
            Cap(I) = Ap;
            Skipsexpr();
            Ap = Ap + 1;
            Skipsexpr();
          }
        }
        void Cond(void) {
          int I;
          I = A(Ap);
          Ap = Ap + 1;
          if (I != 3) {
          L__1:
            Store(I);
            Sc();
            Ap = Ap + 1;
            if (A(Ap - 1) == 1) goto L__1;
          }
        }
      }
      void Check(void) {
        int I;
        int J;
        I = Jump(Level);
      L__1:
        if (I != 0) {
          if (Bat(Tag(I) & 65535) < 0) {
            Write(Tag(I) >> 16, 1);
            Fault(' LAB', 'EL N', 'OT S', 'ET  ');
          }
          I = Returncell(I);
          goto L__1;
        }
        I = Start(Level);
      L__2:
        if (I != 0) {
          Fault('%FIN', 'ISH ', 'MISS', 'ING ');
          I = Returncell(I);
          goto L__2;
        }
      }
      void Unset(void) {
        int I;
        int J;
        int K;
        I = Name(Level);
      L__1:
        if (I != 0) {
          J = Tag(I);
          K = Tag(Link(J));
          Link(J) = Returncell(Link(J));
          if (K >> 28 == 4) {
            if (Bat(K & 65535) < 0) {
              Printname(J);
              Fault('ROUT', 'INE ', 'MISS', 'ING ');
            }
            K = K >> 20 & 15;
          L__2:
            if (K != 0) {
              Link(J) = Returncell(Link(J));
              K = K - 1;
              goto L__2;
            }
          }
          if (Link(J) == 0) Tag(J) = 0;
          I = Returncell(I);
          goto L__1;
        }
      }
      void Pushstart(int Flag, int Label) {
        int I;
        I = Newcell;
        Tag(I) = Flag << 16 | Label & 65535;
        Link(I) = Start(Level);
        Start(Level) = I;
      }
      void Enter(int Type, int Alloc) {
        int I;
        Dump('STR', Br(Level), 'STP', 0);
        Dump('LDA', Br(Level), 'STP', 0);
        Dump('STR', 'WK', 'STP', 1);
        I = Ctnext;
        Dump('ADD', 'STP', 'CT', I);
        Star(Level) = I;
        Jump(Level) = 0;
        Name(Level) = 0;
        Rtp(Level) = Type;
        Chpp(Level) = Chp;
        Start(Level) = 0;
        Rad(Level) = Alloc;
      }
      void Return(void) {
        Dump('LDA', 'STP', Br(Level), 0);
        Dump('LOAD', Br(Level), 'STP', 0);
        Dump('LOAD', 'WK', 'STP', 1);
        Dump('B', 0, 'WK', 0);
      }
      void Rt(void) {
        int I;
        int J;
        int K;
        int L;
        int M;
        int N;
        int P;
        I = Link(A(Ap));
        Ap = Ap + 1;
        J = Tag(I);
        K = (J >> 20 & 15) + 1;
      L__1:
        K = K - 1;
        Ap = Ap + 1;
        if (A(Ap - 1) == 2) {
          Dump('BAL', 'WK', 'BT', J & 65535);
          if (K > 0) Fault('TOO ', 'FEW ', 'PARA', 'MS  ');
          return;
        }
        if (K <= 0) {
          if (K == 0) Fault('TOO ', 'MANY', ' PAR', 'AMS ');
          goto L__2;
        }
        I = Link(I);
        L = Tag(I);
        if (L >> 28 == 0) {
          Sexpr();
          goto L__3;
        }
        if (A(Ap) == 4 && A(Ap + 1) == 1) goto L__4;
      L__5:
        Fault('NOT ', 'A NA', 'ME P', 'ARAM');
      L__2:
        Skipsexpr();
        goto L__1;
      L__4:
        M = Link(A(Ap + 2));
        if (M == 0) {
          Printname(A(Ap + 2));
          Fault('NAME', ' NOT', ' SET', '    ');
          goto L__2;
        }
        N = Tag(M);
        if (L >> 28 == 1) {
          if (N >> 28 == 4) {
            Printname(A(Ap + 2));
            goto L__5;
          }
          if (N >> 28 >= 2) {
            Ap = Ap + 2;
            Arrad();
            Ap = Ap + 1;
            if (A(Ap - 1) == 1) goto L__5;
            goto L__3;
          }
          if (A(Ap + 3) == 1) {
            Printname(A(Ap + 2));
            Fault('SCAL', 'AR H', 'AS P', 'ARAM');
            goto L__2;
          }
          if (A(Ap + 4) == 1) goto L__5;
          if (N >> 28 == 1)
            P = 'LOAD';
          else
            P = 'LDA';
          Dump(P, 'ACC', Br(N >> 16 & 15), N & 65535);
        } else {
          if (A(Ap + 3) != 2 || A(Ap + 4) != 2) goto L__5;
          if ((N >> 28 & 2) == 0) {
            Printname(A(Ap + 2));
            Fault('NOT ', 'AN A', 'RRAY', ' NME');
            goto L__2;
          }
          if (N >> 28 == 3) {
            M = N & 65535;
            N = Tag(M);
          }
          if ((N >> 20 & 15) != (L >> 20 & 15))
            if ((L >> 20 & 15) == 0) {
              L = Tag(I) | N & 15 << 20;
              Tag(I) = L;
            } else if ((N >> 20 & 15) == 0)
              Tag(M) = Tag(M) | L & 15 << 20;
            else {
              Printname(A(Ap + 2));
              Fault('ARRA', 'Y DI', 'MENS', 'ION?');
              goto L__2;
            }
          Dump('LOAD', 'ACC', Br(N >> 16 & 15), N & 65535);
          if ((L >> 20 & 15) != 1) {
            Dump('STR', 'ACC', 'STP', L & 65535);
            Dump('LOAD', 'ACC', Br(N >> 16 & 15), (N & 65535) + 1);
            L = L + 1;
          }
        }
        Ap = Ap + 5;
      L__3:
        Dump('STR', 'ACC', 'STP', L & 65535);
        goto L__1;
      }
      void Arrad(void) {
        int I;
        int J;
        int K;
        int L;
        L = A(Ap);
        I = Link(L);
        J = Tag(I);
        if (J >> 28 == 3) {
          I = J & 65535;
          J = Tag(I);
        }
        Ap = Ap + 2;
        if (A(Ap - 1) == 1) {
          Sexpr();
          Ap = Ap + 1;
          if (A(Ap - 1) == 1) {
            Dump('STR', 'ACC', Br(Level), Wsnext);
            Sexpr();
            if (A(Ap) == 1) {
              Printname(L);
              Fault('TOO ', 'MANY', ' IND', 'EXES');
              Skipapp();
            } else
              Ap = Ap + 1;
            Dump('MLT', 'ACC', Br(J >> 16 & 15), J & 65535);
            Ws = Ws - 1;
            Dump('ADD', 'ACC', Br(Level), Ws);
            Dump('ADD', 'ACC', Br(J >> 16 & 15), (J & 65535) + 1);
            K = 2;
          } else {
            Dump('ADD', 'ACC', Br(J >> 16 & 15), J & 65535);
            K = 1;
          }
          if (K != (J >> 20 & 15)) {
            if ((J >> 20 & 15) == 0)
              Tag(I) = Tag(I) | K << 20;
            else
              Printname(L);
            Fault('ARRA', 'Y DI', 'MENS', 'ION?');
          }
        } else {
          Printname(L);
          Fault('NO A', 'RRAY', ' IND', 'EXES');
        }
      }
      int Btnext(void) {
        if (Btn > 1023) {
          Fault('TOO ', 'MANY', 'LABE', 'LS  ');
          Btn = 0;
        }
        Bat(Btn) = -1;
        Btn = Btn + 1;
        return (Btn - 1);
      }
      int Ctnext(void) {
        if (Ctn > 1023) {
          Fault('TOO ', 'MANY', ' CON', 'STS ');
          Ctn = 0;
        }
        Ctn = Ctn + 1;
        return (Ctn - 1);
      }
      int Wsnext(void) {
        Ws = Ws + 1;
        if (Ws == 11) Fault('COMP', 'ILER', ' WKS', 'PACE');
        return (Ws - 1);
      }
      int Findlabel(void) {
        int I;
        int J;
        Label = A(Ap);
        Ap = Ap + 1;
        if (Label >> 16 != 0) {
          Write(Label, 1);
          Spaces(2);
          Fault('INVA', 'LID ', 'LABE', 'L   ');
          return (-1);
        }
        I = Jump(Level);
      L__1:
        if (I != 0) {
          if (Label == Tag(I) >> 16) return (Tag(I) & 65535);
          I = Link(I);
          goto L__1;
        }
        I = Newcell;
        J = Btnext;
        Tag(I) = Label << 16 | J;
        Link(I) = Jump(Level);
        Jump(Level) = I;
        return (J);
      }
      void Storetag(int Nam, int Form, int Type, int Dim, int Lev, int Ad) {
        int M;
        int N;
        M = Link(Nam);
        if (M != 0 && Lev == (Tag(M) >> 16 & 15) && Form != 4) {
          Printname(Nam);
          Fault('NAME', ' SET', ' TWI', 'CE  ');
          return;
        }
        N = Newcell;
        Tag(N) = Form << 28 | Type << 24 | Dim << 20 | Lev << 16 | Ad;
        Link(N) = Link(Nam);
        Link(Nam) = N;
        N = Newcell;
        Tag(N) = Nam;
        Link(N) = Name(Level);
        Name(Level) = N;
      }
      void Dump(int Op, int Reg, int Base, int Disp) {
        void Pmn(int I);
        int Com;
        Spaces(10);
        Com = ' ';
        Pmn(Op);
        Com = ',';
        Pmn(Reg);
        if (Disp >= 65536) {
          Printsymbol(',');
          Spaces(7);
          Printname(Disp - 65536);
        } else {
          if (Base == 'BT' || Base == 'CT' || Base == 'PRG') {
            Printsymbol(',');
            Spaces(7);
          }
          Pmn(Base);
          Write(Disp, 1);
        }
        Newline();
        Ca = Ca + 1;
        void Pmn(int I) {
          int J;
          int K;
          int L;
          J = 2;
          K = 24;
        L__1:
          L = I >> K & 255;
          if (L == 0)
            J = J + 1;
          else
            Printsymbol(L);
          K = K - 8;
          if (K >= 0) goto L__1;
          if (I == 'BT' || I == 'CT' || I == 'PRG')
            Printsymbol('+');
          else {
            Printsymbol(Com);
            Spaces(J);
          }
        }
      }
    }
    void Fault(int A, int B, int C, int D) {
      void Out(int I);
      Out(A);
      Out(B);
      Out(C);
      Out(D);
      Newline();
      Faults = Faults + 1;
      void Out(int I) {
        Printsymbol(I >> 24);
        Printsymbol(I >> 16 & 255);
        Printsymbol(I >> 8 & 255);
        Printsymbol(I & 255);
      }
    }
    int Chnext(void) {
      if (Chp > 512) {
        Fault('NAME', 'S TO', 'O LO', 'NG  ');
        exit(0);
      }
      Chp = Chp + 1;
      return (Chp - 1);
    }
    int Newcell(void) {
      int I;
      if (Asl == 0) {
        Fault('ASL ', 'EMPT', 'Y   ', '   ');
        exit(0);
      }
      I = Asl;
      Asl = Link(Asl);
      Tag(I) = 0;
      Link(I) = 0;
      return (I);
    }
    int Returncell(int I) {
      int J;
      J = Link(I);
      Link(I) = Asl;
      Asl = I;
      return (J);
    }
    void Printname(int I) {
      int J;
      int K;
      int L;
      int M;
      J = Tag(I);
      K = Ch(J);
      L = K >> 24;
      M = 16;
    L__1:
      Printsymbol(K >> M & 255);
      L = L - 1;
      if (L == 0) {
        Spaces(2);
        return;
      }
      M = M - 8;
      if (M < 0) {
        J = J + 1;
        K = Ch(J);
        M = 24;
      }
      goto L__1;
    }
  }
  exit(0);
  return (1);
}
