#include <perms.h>
int _imp_mainep(int _imp_argc, char **_imp_argv) {
  extern _imp_string255 Ifile;
  extern _imp_string255 Ofile;
  extern int Stream;
  extern void Setmargins(int A, int B, int C);
  extern void Multmatrix(double A, double B, double C, int N, int P, int M);
  extern int Testint(int C, _imp_string255 S);
  extern void Invert(double A, double B, int N, double Det);
  extern double Random(int I, int K);
  extern void Prompt(_imp_string255 S);
  unsigned char Nsym;
  unsigned char Flt;
  unsigned char Dumpfl;
  unsigned char Runflag;
  int I;
  int J;
  int D1;
  int D2;
  int Llpt;
  int Faults;
  int Asl;
  int Nlines;
  int Tdig;
  int Linept;
  int Lnum;
  int Analrecpt;
  int Llnum;
  int Datpt2;
  int Arrpt;
  int Linel;
  unsigned char Line[80 /*1:80*/];
  int Analrec[2101 /*0:2100*/];
  float Arrspace[2002 /*-1:2000*/];
  float Datarr[1280 /*1:1280*/];
  short Fnlist[26 /*65:90*/];
  short Onlist[50 /*1:50*/];
  typedef struct Rf1 {
    float Step;
    float Final;
    int Label;
    int Var;
  } Rf1;
  typedef struct Rf2 {
    int Ptr;
    int Data;
    int Link;
  } Rf2;
  Rf2 Lc[256 /*0:255*/];
  ;
  Rf2 *Cell;
  typedef struct Rf3 {
    int Desc;
    int Addr;
    int D1;
    int D2;
  } Rf3;
  Rf3 Vt[286 /*0:285*/];
  ;
  const unsigned char Cr = 10;
  const unsigned char Opr[5 /*1:5*/] = {'+', '-', '*', '/', '^'};
  const unsigned char Prec[10 /*0:9*/] = {0, [1 ... 3] = 4, 1, 1, 2, 2, 3, 1};
  const _imp_string255 Matf[5 /*4:8*/] = {'INV', 'IDN', 'ZER', 'CON', 'TRN'};
  const _imp_string255 Fnn[11 /*1:11*/] = {'INT', 'RND', 'SIN', 'COS',
                                           'TAN', 'ATN', 'EXP', 'LOG',
                                           'ABS', 'SQR', 'SGN'};
  const _imp_string255 Iname[19 /*1:19*/] = {
      'LET',  'READ', 'DATA', 'PRINT',   'GOTO',  'IF',     'MAT',
      'FOR',  'NEXT', 'DIM',  'END',     'GOSUB', 'RETURN', 'INPUT',
      'STOP', 'REM',  'ON',   'RESTORE', 'DEF FN'};
  const _imp_string255 Rel[6 /*1:6*/] = {'<', '<=', '>', '>=', '=', '#'};
  void Printsyntax(void);
  void Pvarn(int Var);
  void Print(float X);
  void Rite(int I);
  int Lenth(int I);
  void Pholt(int I);
  void Write(int I);
  void Runfolt(int I);
  void Getsim(void);
  if (_imp_on_event(9, 1, 2, 21, 22, 23, 27, 24)) {
    if (_imp_caught_on_event(EVENT.EVENT, 9)) goto F9;
    if (_imp_caught_on_event(EVENT.EVENT, 1)) goto F1;
    if (_imp_caught_on_event(EVENT.EVENT, 2, 21, 22, 23, 27)) goto F2;
    if (_imp_caught_on_event(EVENT.EVENT, 24)) goto F24;
  }
  void Getsym(void) {
    do
      Getsim();
    while (Nsym == ' ');
  }
  void Getsim(void) {
    if (Nsym == Cr) return;
    Linept = Linept + 1;
    Nsym = Line(Linept);
  }
  void Readline(void) {
    int I;
    int J;
    do {
      J = 0;
      do {
        Readsymbol(I);
        J = J + 1;
        if (J < 80) Line(J) = I;
      } while (I != Cr);
      Nsym = 0;
      Linept = 0;
      Getsym();
    } while (Nsym == Cr);
  }
  int Analinst(int Type) {
    static short Char[169 /*100:268*/] = {
        0,   'A', 106, 'T', 'A', 3,   'I', 110, 'M', 10,  'E', 'F', 'F',
        'N', 19,  'O', 'R', 8,   'O', 'T', 123, 'O', 5,   'S', 'U', 'B',
        12,  'F', 130, 6,   'N', 'P', 'U', 'T', 14,  'E', 'T', 1,   'E',
        'X', 'T', 9,   'N', 'D', 11,  'R', 151, 'I', 'N', 'T', 4,   'V',
        'A', 'L', 0,   'E', 185, 'A', 161, 'D', 2,   'M', 164, 16,  'T',
        170, 'U', 'R', 'N', 13,  'S', 'T', 'O', 'R', 'E', 18,  'T', 'O',
        'P', 15,  'N', 17,  'A', 'T', 7,   'V', 'A', 'L', 0,   'R', 'E',
        'A', 'K', 3,   'I', 'S', 'T', 2,   'U', 255, 'N', 1,   'O', 'N',
        'T', 'I', 'N', 'U', 'E', 4,   'U', 'M', 'P', 4,   'O', 'D', 'U',
        'M', 'P', 5,   'R', 'A', 'C', 'E', 6,   'H', 230, 'E', 'N', 1,
        'O', 2,   'T', 'E', 'P', 3,   'T', 265, 'O', 'P', 8,   'N', 'B',
        249, 'R', 'E', 'A', 'K', 7,   'T', 'R', 'A', 'C', 'E', 9,   'E',
        'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', 10,  'A', 'V', 'E', 11};
    static unsigned char Key1[26 /*65:90*/] = {[0 ... 2] = 100,
                                               101,
                                               142,
                                               115,
                                               118,
                                               100,
                                               127,
                                               [9 ... 10] = 100,
                                               135,
                                               182,
                                               138,
                                               180,
                                               145,
                                               100,
                                               155,
                                               176,
                                               [19 ... 25] = 100};
    static unsigned char Key2[26 /*65:90*/] = {
        100, 189, 100, 210, [4 ... 10] = 100, 194, 100, 214, [14 ... 16] = 100,
        198, 236, 219, 241, [21 ... 25] = 100};
    static unsigned char Key3[26 /*65:90*/] = {
        [0 ... 1] = 100, 202, [3 ... 17] = 100, 232, 225, [20 ... 25] = 100};
    int I;
    if ('A' > Nsym || Nsym > 'Z') return (0);
    if (Type == 1) {
      I = Key1(Nsym);
      Llpt = Linept;
    } else if (Type == 2)
      I = Key2(Nsym);
    else
      I = Key3(Nsym);
    Getsym();
    for (;;)
      if (Nsym != Char(I)) {
        I = Char(I + 1);
        if (I < 100) return (-1);
      } else {
        I = I + 1;
        Getsym();
        if (Char(I) > 100) I = I + 1;
        if (Char(I) < 'A') return (Char(I));
      }
  }
  int Read(int I) {
    int S;
    if (Nsym == '-') {
      S = -1;
      Getsym();
    } else
      S = 1;
    if ('0' > Nsym || Nsym > '9') return (1);
    I = Nsym - '0';
    Getsym();
    Tdig = 1;
    while ('0' <= Nsym && Nsym <= '9') {
      if (Tdig == 9) {
        Printstring('INVALID CONSTANT');
        Newline();
        return (1);
      }
      Tdig = Tdig + 1;
      I = I * 10 + Nsym - '0';
      Getsym();
    }
    if (S < 0) I = -I;
    return (0);
  }
  int Readr(float R) {
    int J;
    int K;
    int Ndig;
    int S;
    if (Nsym == '-') {
      S = -1;
      Getsym();
    } else
      S = 1;
    R = 0.0;
    K = 0;
    Ndig = 0;
    if (Nsym == '.') goto Frac;
    if (Read(J) > 0) return (1);
    Ndig = Tdig;
    R = J;
    if (Nsym == '.') {
    Frac:
      Getsym();
      while (Nsym == '0') {
        K = K + 1;
        Getsym();
      }
      Ndig = Ndig + K;
      if (Ndig > 9) {
      Invalid:
        Printstring('INVALID CONSTANT  ');
        Newline();
        return (1);
      }
      if (Read(J) == 0 && J != 0) {
        if (Ndig + Tdig > 9) goto Invalid;
        R = R + (J / REXP(10, (Lenth(J) - 1 + K)));
      }
    }
    if (Nsym == 'E') {
      Getsym();
      if (Read(J) > 0) return (1);
      R = R * REXP(10, J);
    }
    if (S < 0) R = -R;
    return (0);
  }
  int Isint(float X) {
    if (abs(X - Int(X)) < 0.000001) return (1);
    return (0);
  }
  void Pholt(int I) {
    static _imp_string255 F[12 /*1:12*/] = {
        'BOTH LIST AND TABLE', 'TOO MUCH DATA',
        'NO END INSTR',        'UNDEFINED LINE NO',
        'VAR ALREADY USED',    'NO MATCH WITH FOR',
        'FN DEFINED TWICE','',
        'NOT ENOUGH SPACE',    'PROGRAM TOO LONG',
        'TOO MANY LABELS',     'FOR\'S TOO DEEP'};
    Printstring(_imp_join(_imp_str_literal("\n***  "),
                          _imp_join(F(I), _imp_str_literal(" LINE"))));
    Write(Lnum);
    Newlines(2);
    Faults = Faults + 1;
  }
  void Runfolt(int I) {
    static _imp_string255 F[20 /*-2:17*/] = {
        '\'FN\'S TOO DEEP',   'FOR\'S TOO DEEP',     'DIMENSION ERROR',
        'SUBSCRIPT ERROR',    'FAULTY INPUT NO.',    'OUT OF DATA',
        'VAR ALREADY IN USE', 'INVALID FOR',         'INVALID NEXT',
        'GOSUBS TOO DEEP',    'RETURN BEFORE GOSUB', 'ARITHMETIC OVERFLOW',
        'EXP TOO LARGE',      'DIVISION BY ZERO',    'SQR NEGATIVE',
        'LOG NEGATIVE',       'LOG OF ZERO',         'ZERO TO NEG POWER',
        'ABS VALUE TO POWER', 'CONSOLE INTERRUPT'};
    Printstring(_imp_join(_imp_str_literal("\n\n***  "),
                          _imp_join(F(I), _imp_str_literal(" LINE"))));
    Write(Lnum);
    Newlines(3);
    if (I <= 10) Flt = 1;
    if (Dumpfl == 0) return;
    Printstring('** DUMP **\n');
    for (I = 0; I <= 285; I++)
      if (Arrspace(I) != 0) {
        Pvarn(I);
        if (I / 11 * 11 == I) Space();
        Printstring('   =');
        Print(Arrspace(I));
        Newline();
      }
    Printstring('** END OF DUMP **\n');
  }
  int Lenth(int I) {
    int J;
    int K;
    if (I < 0) I = -I;
    J = 2;
    K = 10;
    while (I >= K) {
      J = J + 1;
      K = K * 10;
    }
    return (J);
  }
  void Write(int I) {
    Space();
    Rite(I);
    Linel = Linel + 1;
  }
  void Rite(int I) {
    int Lz;
    int J;
    int Divisor;
    int F;
    Divisor = 100000000;
    Lz = 0;
    for (F = 1; F <= 8; F++) {
      J = I / Divisor;
      I = I - J * Divisor;
      if ((J | Lz) != 0) {
        Printsymbol(J + '0');
        Lz = 1;
        Linel = Linel + 1;
      }
      Divisor = Divisor / 10;
    }
    Printsymbol(I + '0');
    Linel = Linel + 1;
  }
  void Print(float X) {
    void Prynt(float X);
    if (Mod(X) < 0.000001) {
      Printstring(' 0');
      Linel = Linel + 2;
      return;
    }
    if (X < 0) {
      Printsymbol('-');
      X = -X;
    } else
      Space();
    Linel = Linel + 1;
    Prynt(X);
    void Prynt(float X) {
      int I;
      int J;
      int Ndp;
      if (X >= 100000.0 || Isint(X) > 0) {
        if (X >= 1000000000.0) {
          I = 9;
          X = X / REXP(10, 9);
          while (X >= 10.0) {
            I = I + 1;
            X = X / 10;
          }
          Prynt(X);
          Printstring(' E ');
          Linel = Linel + 3;
          Rite(I);
        } else
          Rite(Int(X));
      } else if (X >= 1.0) {
        Ndp = 7 - Lenth(Intpt(X));
        Rite(Intpt(X));
        Printsymbol('.');
        Linel = Linel + 1;
        J = Int(Fracpt(X) * REXP(10, Ndp));
        goto Frac;
      } else if (X >= 0.1 || Isint(Fracpt(X) * 1000000) > 0) {
        Printstring('0.');
        Linel = Linel + 2;
        J = Int(X * 1000000);
        Ndp = 6;
      Frac:
        I = REXP(10, (Ndp - 1));
        while (J < I) {
          Printsymbol('0');
          J = J * 10;
          Linel = Linel + 1;
        }
        while (J == J / 10 * 10) J = J / 10;
        Rite(J);
        return;
      } else {
        I = 0;
        do {
          I = I + 1;
          X = X * 10;
        } while (X < 1.0);
        Prynt(X);
        Printstring(' E -');
        Linel = Linel + 4;
        Rite(I);
      }
    }
  }
  void Pvarn(int Var) {
    int I;
    Space();
    Printsymbol(Var / 11 + 'A');
    I = Var - 11 * (Var / 11);
    if (I != 0) Printsymbol(I + '0' - 1);
  }
  void Prstring(int Pt, int Lenth) {
    _imp_string255 *S;
    S = String(Addr(Analrec(Pt)));
    Printstring(*S);
    Lenth = *Length(*S);
  }
  void Analyse(int Inst) {
    void Inc1(void);
    void Inc(int I);
    int Compexp(void);
    int Params(void);
    void Readvar(int V);
    _imp_string255 *Sn;
    int Matop(void);
    int Readstring(void);
    static int Instruction_sw;
    static void *Instruction[21 /*-1:19*/] = {
        &&Instruction_M1, &&Instruction_0,  &&Instruction_1,  &&Instruction_2,
        &&Instruction_3,  &&Instruction_4,  &&Instruction_5,  &&Instruction_6,
        &&Instruction_7,  &&Instruction_8,  &&Instruction_9,  &&Instruction_10,
        &&Instruction_11, &&Instruction_12, &&Instruction_13, &&Instruction_14,
        &&Instruction_15, &&Instruction_16, &&Instruction_17, &&Instruction_18,
        &&Instruction_19,
    };
    static int Mats_sw;
    static void *Mats[9 /*0:8*/] = {
        &&Mats_0, &&Mats_1, &&Mats_2, &&Mats_3, &&Mats_4,
        &&Mats_5, &&Mats_6, &&Mats_7, &&Mats_8,
    };
    int I;
    int J;
    int K;
    int Var;
    int Varpt;
    int Dim;
    int Datpt;
    int Count;
    Cell->Ptr = Analrecpt;
    Cell->Data = 0;
    Analrec(Analrecpt) = Lnum;
    Analrec(Analrecpt + 1) = Inst;
    Inc(2);
    goto *Instruction[Instruction_sw = (Inst) - -1];
  Instruction_0:
  Syntax:
    Cell->Data = -1;
    Printsyntax();
    return;
  Instruction_M1:;
    Linept = Llpt;
    Nsym = Line(Llpt);
    Analrec(Analrecpt - 1) = 1;
  Instruction_1:;
    Readvar(Var);
    Varpt = Analrecpt;
    Inc1();
    Dim = Params;
    if (Var < 0 || Dim < 0 || Nsym != '=') goto Syntax;
    Getsym();
    Analrec(Varpt) = Var | Dim << 13;
    if (Compexp != 0 || Nsym != Cr) goto Syntax;
    return;
  Instruction_2:
  Instruction_14:;
    Varpt = Analrecpt;
    Inc1();
    Count = 0;
    do {
      Datpt = Analrecpt;
      Inc1();
      Readvar(Var);
      Dim = Params;
      if (Dim < 0 || Var < 0) goto Syntax;
      Analrec(Datpt) = Var | Dim << 13;
      Count = Count + 1;
      if (Nsym == ',') Getsym();
    } while (Nsym != Cr);
    Analrec(Varpt) = Count;
    return;
  Instruction_3:;
    Datpt = Analrecpt;
    Inc1();
    do {
      if (Readr(*Real(Addr(Analrec(Analrecpt)))) != 0) goto Syntax;
      Inc1();
      if (Nsym == ',') Getsym();
    } while (Nsym != Cr);
    Analrec(Datpt) = Analrecpt - Datpt - 1;
    return;
  Instruction_4:;
    Varpt = Analrecpt;
    Inc1();
    Count = 0;
    while (Nsym != Cr) {
      Datpt = Analrecpt;
      Inc1();
      if (Nsym == '\'') {
        K = 1;
        I = Readstring;
      } else {
        K = 0;
        I = Compexp;
      }
      if (I != 0) goto Syntax;
      if (Nsym != Cr) {
        if (Nsym == ',')
          J = 1;
        else if (Nsym == ';')
          J = 2;
        else
          goto Syntax;
        Getsym();
      } else
        J = 0;
      Count = Count + 1;
      Analrec(Datpt) = K | J << 1;
    }
    Analrec(Varpt) = Count;
    return;
  Instruction_5:
  Instruction_12:;
    if (Read(Analrec(Analrecpt)) != 0) goto Syntax;
    Inc1();
    return;
  Instruction_6:;
    if (Compexp != 0) goto Syntax;
    if (Nsym == '=') {
      I = 5;
      goto R2;
    }
    if (Nsym == '#') {
      I = 6;
      goto R2;
    }
    if (Nsym == '>') {
      I = 3;
      Getsym();
    R1:
      if (Nsym == '=') {
        I = I + 1;
        goto R2;
      }
      goto R3;
    }
    if (Nsym != '<') goto Syntax;
    I = 1;
    Getsym();
    if (Nsym != '>') goto R1;
    I = 6;
  R2:
    Getsym();
  R3:
    if (Compexp != 0) goto Syntax;
    if (Analinst(3) != 1) goto Syntax;
    Analrec(Analrecpt) = I;
    Inc1();
    goto *Instruction[Instruction_sw = (5) - -1];
  Instruction_7:;
    Llpt = Linept;
    I = Analinst(1);
    if (I == 2) {
      J = 2;
    Readvars:
      Analrec(Analrecpt) = J;
      Inc1();
      Varpt = Analrecpt;
      Inc1();
      Count = 0;
      do {
        Readvar(Var);
        if (Var < 0) goto Syntax;
        Count = Count + 1;
        if (Nsym == ';' && J == 3) {
          Var = Var | 512;
          Getsym();
        } else {
          if (Nsym == ',') Getsym();
        }
        Analrec(Analrecpt) = Var;
        Inc1();
      } while (Nsym != Cr);
      Analrec(Varpt) = Count;
      return;
    }
    if (I == 4) {
      J = 3;
      goto Readvars;
    }
    if (I == 14) {
      J = 4;
      goto Readvars;
    }
    Analrec(Analrecpt) = 1;
    Inc1();
    Linept = Llpt;
    Nsym = Line(Llpt);
    Readvar(Var);
    if (Var < 0 || Nsym != '=') goto Syntax;
    Getsym();
    Analrec(Analrecpt) = Var;
    Inc1();
    I = Matop;
    if (I < 0) goto Syntax;
    Analrec(Analrecpt) = I;
    Inc1();
    goto *Mats[Mats_sw = I];
  Mats_0:
    Getsym();
    if (Compexp != 0 || Nsym != ')') goto Syntax;
    Getsym();
    if (Nsym != '*') goto Syntax;
  Matsl:
    Getsym();
    Readvar(Var);
    if (Var < 0) goto Syntax;
    Analrec(Analrecpt) = Var;
    Inc1();
    return;
  Mats_1:
  Mats_2:
  Mats_3:
    Analrec(Analrecpt) = Var;
    Inc1();
    goto Matsl;
  Mats_4:
  Mats_8:
    if (Nsym != '(') goto Syntax;
    Getsym();
    Readvar(Var);
    if (Var < 0 || Nsym != ')') goto Syntax;
    Analrec(Analrecpt) = Var;
    Inc1();
    Getsym();
  Mats_5:
  Mats_6:
  Mats_7:
    return;
  Instruction_8:;
    Readvar(Var);
    if (Var < 0 || Nsym != '=') goto Syntax;
    Analrec(Analrecpt) = Var;
    Inc1();
    Getsym();
    if (Compexp != 0 || Analinst(3) != 2 || Compexp != 0) goto Syntax;
    if (Analinst(3) == 3) {
      Analrec(Analrecpt) = 1;
      Inc1();
      if (Compexp != 0) goto Syntax;
    } else {
      Analrec(Analrecpt) = 0;
      Inc1();
    }
    return;
  Instruction_9:;
    Readvar(Var);
    if (Var < 0) goto Syntax;
    Analrec(Analrecpt) = Var;
    Inc1();
    return;
  Instruction_10:;
    Varpt = Analrecpt;
    Inc1();
    Count = 0;
    do {
      Readvar(Var);
      if (Nsym == '(' && Var >= 0) {
        Getsym();
        if (Read(D1) != 0 || D1 < 0) goto Syntax;
        D2 = 0;
        if (Nsym == ',') {
          Getsym();
          if (Read(D2) != 0 || D2 < 0) goto Syntax;
        }
        if (Nsym != ')') goto Syntax;
        Getsym();
      } else
        goto Syntax;
      Analrec(Analrecpt) = Var;
      Analrec(Analrecpt + 1) = D1;
      Analrec(Analrecpt + 2) = D2;
      Inc(3);
      Count = Count + 1;
      if (Nsym == ',') Getsym();
    } while (Nsym != Cr);
    Analrec(Varpt) = Count;
    return;
  Instruction_11:
  Instruction_13:
  Instruction_15:
  Instruction_18:;
    return;
  Instruction_16:;
    Sn = String(Addr(Analrec(Analrecpt)));
    if (Line(Linept - 1) == ' ')
      Sn = ' ';
    else
      Sn = '';
    while (Nsym != Cr) {
      Sn = _imp_join(Sn, Tostring(Nsym));
      Getsim();
    }
    Inc((*Length(*Sn) >> 2) + 1);
    return;
  Instruction_17:;
    if (Compexp != 0 || Analinst(1) != 5) goto Syntax;
    Count = 0;
    Varpt = Analrecpt;
    Inc1();
    do {
      if (Read(Analrec(Analrecpt)) != 0) goto Syntax;
      Inc1();
      Count = Count + 1;
      if (Nsym == ',') Getsym();
    } while (Nsym != Cr);
    Analrec(Varpt) = Count;
    return;
  Instruction_19:;
    if ('A' > Nsym || Nsym > 'Z') goto Syntax;
    Analrec(Analrecpt) = Nsym;
    Inc1();
    Getsym();
    if (Nsym != '(') goto Syntax;
    Getsym();
    Readvar(Var);
    if (Var < 0 || Nsym != ')') goto Syntax;
    Getsym();
    if (Nsym != '=') goto Syntax;
    Getsym();
    Analrec(Analrecpt) = Var;
    Inc1();
    if (Compexp != 0) goto Syntax;
    return;
    void Inc1(void) { Analrecpt = Analrecpt + 1; }
    void Inc(int I) { Analrecpt = Analrecpt + I; }
    void Readvar(int V) {
      if ('A' > Nsym || Nsym > 'Z') {
        V = -1;
        return;
      }
      V = (Nsym - 'A') * 11;
      Getsym();
      if ('0' <= Nsym && Nsym <= '9') {
        V = V + Nsym - '0' + 1;
        Getsym();
      }
    }
    int Matop(void) {
      int I;
      int Save;
      _imp_string255 S;
      if (Nsym == '(') return (0);
      Save = Linept;
      S = '';
      for (I = 1; I <= 3; I++) {
        S = _imp_join(S, Tostring(Nsym));
        Getsym();
      }
      for (I = 4; I <= 8; I++) {
        if (S == Matf(I)) return (I);
      }
      Linept = Save;
      Nsym = Line(Save);
      Readvar(Var);
      if (Var < 0) return (-1);
      if (Nsym == '+') return (1);
      if (Nsym == '-') return (2);
      if (Nsym == '*') return (3);
      return (-1);
    }
    int Readstring(void) {
      _imp_string255 *S;
      S = String(Addr(Analrec(Analrecpt)));
      S = '';
      Getsim();
      for (;;) {
        if (Nsym == Cr) return (1);
        if (Nsym == '\'') {
          Getsim();
          if (Nsym != '\'') break;
        }
        S = _imp_join(S, Tostring(Nsym));
        Getsim();
      }
      if (Nsym == ' ') Getsym();
      Inc((*Length(*S) >> 2) + 1);
      return (0);
    }
    int Compexp(void) {
      float Sign;
      float X;
      int Analpt;
      int Level;
      int Opt;
      int Vpt;
      int I;
      int Var;
      int Opstack[50 /*1:50*/];
      int Findfn(void) {
        _imp_string255 S;
        int Save;
        int I;
        Save = Linept;
        S = '';
        for (I = 1; I <= 3; I++) {
          if ('A' > Nsym || Nsym > 'Z') goto Out;
          S = _imp_join(S, Tostring(Nsym));
          Getsym();
        }
        if ('FNA' <= S && S <= 'FNZ') return (*Charno(S, 3));
        for (I = 1; I <= 11; I++) {
          if (S == Fnn(I)) return (I);
        }
      Out:
        Linept = Save;
        Nsym = Line(Linept);
        return (0);
      }
      void Unstack(void) {
        Opt = Opt - 1;
        Analrec(Analrecpt) = Opstack(Opt);
        Inc1();
      }
      Analpt = Analrecpt;
      Inc1();
      Opstack(1) = 0;
      Level = 1;
      Opt = 2;
    Operand:
      if (Nsym == '-') {
        Getsym();
        if ('0' <= Nsym && Nsym <= '9' || Nsym == '.') {
          Sign = -1.0;
          goto Const;
        }
        Opstack(Opt) = 9;
        Opt = Opt + 1;
        goto Operand;
      }
      if (Nsym == '(') {
        Getsym();
        Opstack(Opt) = 0;
        Opt = Opt + 1;
        Level = Level + 1;
        goto Operand;
      }
      if ('0' <= Nsym && Nsym <= '9' || Nsym == '.') {
        Sign = 1.0;
      Const:
        if (Readr(X) != 0) return (1);
        Analrec(Analrecpt) = 2;
        Real(Addr(Analrec(Analrecpt + 1))) = X * Sign;
        Inc(2);
        goto Operator;
      }
      I = Findfn;
      if (I > 0) {
        Analrec(Analrecpt) = 3;
        Analrec(Analrecpt + 1) = I;
        Inc(2);
        if (Params != 1) return (1);
        goto Operator;
      }
      Readvar(Var);
      if (Var < 0) return (1);
      Vpt = Analrecpt;
      Inc(2);
      Dim = Params;
      if (Dim < 0) return (1);
      Analrec(Vpt) = 1;
      Analrec(Vpt + 1) = Var | Dim << 13;
    Operator:
      for (I = 1; I <= 5; I++)
        if (Opr(I) == Nsym) {
          Getsym();
          while (Prec(I + 3) <= Prec(Opstack(Opt - 1))) Unstack();
          Opstack(Opt) = I + 3;
          Opt = Opt + 1;
          goto Operand;
        }
      if (Nsym == ')' && Level > 1) {
        Getsym();
        while (Opstack(Opt - 1) != 0) Unstack();
        Opt = Opt - 1;
        Level = Level - 1;
        goto Operator;
      }
      if (Level != 1) return (1);
      while (Opt > 2) Unstack();
      Analrec(Analpt) = Analrecpt;
      return (0);
    }
    int Params(void) {
      int D;
      if (Nsym != '(') return (0);
      Getsym();
      D = 1;
      if (Compexp != 0) return (-1);
      if (Nsym == ',') {
        Getsym();
        D = 2;
        if (Compexp != 0) return (-1);
      }
      if (Nsym != ')') return (-1);
      Getsym();
      return (D);
    }
  }
  void Printfaults(int Faults, _imp_string255 Type) {
    Newlines(2);
    Printstring('*** PROGRAM CONTAINS ');
    Rite(Faults);
    Printstring(_imp_join(_imp_str_literal(" "),
                          _imp_join(Type, _imp_str_literal(" FAULT"))));
    if (Faults > 1) Printsymbol('S');
    Newlines(3);
  }
  void Obey(int Cmnd) {
    void List(void Pstring(void));
    void Resequence(void);
    void Outstring(int Pt, int Lenth);
    static int Command_sw;
    static void *Command[13 /*-1:11*/] = {
        &&Command_M1, &&Command_0,  &&Command_1,  &&Command_2, &&Command_3,
        &&Command_4,  &&Command_5,  &&Command_6,  &&Command_7, &&Command_8,
        &&Command_9,  &&Command_10, &&Command_11,
    };
    goto *Command[Command_sw = (Cmnd) - -1];
  Command_1:
    if (Faults > 0)
      Printfaults(Faults, 'SYNTAX');
    else
      Runflag = 1;
    return;
  Command_2:
    List(Prstring);
    return;
  Command_3:
    return;
  Command_4:
    Dumpfl = 1;
    return;
  Command_5:
    Dumpfl = 0;
    return;
  Command_6:
    return;
  Command_7:
    return;
  Command_8:
    Printch(7);
    exit(0);
  Command_9:
    return;
  Command_10:
    Resequence();
    return;
  Command_11:
    if (Ifile != '.TT') {
      Selectoutput(3);
      Setmargins(3, 1, 120);
      List(Outstring);
      Selectoutput(2);
      Closestream(3);
      if (Fromstring(Ofile, 1, 3) == '.LP') Setmargins(2, 1, 120);
    }
    return;
  Command_M1:
  Command_0:
    Printsyntax();
    void List(void Pstring(void)) {
      void Printout(int Pt, int Base, int Expr, unsigned char Ptrs1,
                    unsigned char Ptrs2);
      void Pstring(int A, int B);
      Rf2 *Lcl;
      const _imp_string255 Mationame[3 /*2:4*/] = {' READ', ' PRINT', ' INPUT'};
      int Minl;
      int I;
      int J;
      int K;
      int L;
      int M;
      int Temp;
      int Dim;
      int Indent;
      int Maxl;
      int Maxs;
      int Lnum;
      static int List_sw;
      static void *List[19 /*1:19*/] = {
          &&List_1,  &&List_2,  &&List_3,  &&List_4,  &&List_5,
          &&List_6,  &&List_7,  &&List_8,  &&List_9,  &&List_10,
          &&List_11, &&List_12, &&List_13, &&List_14, &&List_15,
          &&List_16, &&List_17, &&List_18, &&List_19,
      };
      static int Matl1_sw;
      static void *Matl1[4 /*1:4*/] = {
          &&Matl1_1,
          &&Matl1_2,
          &&Matl1_3,
          &&Matl1_4,
      };
      static int Matl2_sw;
      static void *Matl2[9 /*0:8*/] = {
          &&Matl2_0, &&Matl2_1, &&Matl2_2, &&Matl2_3, &&Matl2_4,
          &&Matl2_5, &&Matl2_6, &&Matl2_7, &&Matl2_8,
      };
      void Printexpr(int Pt) {
        int Expr[Analrec(Pt) - Pt];
        unsigned char Ptrs1[Analrec(Pt) - Pt];
        unsigned char Ptrs2[Analrec(Pt) - Pt];
        int I;
        int Stackpt;
        int Exprpt;
        int Dim;
        int J;
        static int Bld_sw;
        static void *Bld[10 /*1:10*/] = {
            &&Bld_1, &&Bld_2, &&Bld_3, &&Bld_4, &&Bld_5,
            &&Bld_6, &&Bld_7, &&Bld_8, &&Bld_9, &&Bld_10,
        };
        I = 1;
        for (J = Pt + 1; J <= Analrec(Pt) - 1; J++) {
          Expr(I) = Analrec(J);
          I = I + 1;
        }
        Expr(I) = 10;
        Stackpt = 0;
        Exprpt = 1;
      Loop:
        Stackpt = Stackpt + 1;
        goto *Bld[Bld_sw = (Expr(Exprpt)) - 1];
      Bld_1:
        Stack(Stackpt) = Exprpt;
        Dim = Expr(Exprpt + 1) >> 13;
        Exprpt = Exprpt + 2;
        if (Dim > 0)
          for (I = 1; I <= Dim; I++) Exprpt = Expr(Exprpt) - Pt;
        goto Loop;
      Bld_2:
        Stack(Stackpt) = Exprpt;
        Exprpt = Exprpt + 2;
        goto Loop;
      Bld_3:
        Stack(Stackpt) = Exprpt;
        Exprpt = Expr(Exprpt + 2) - Pt;
        goto Loop;
      Bld_4:
      Bld_5:
      Bld_6:
      Bld_7:
      Bld_8:
        Stackpt = Stackpt - 2;
        Ptrs1(Exprpt) = Stack(Stackpt);
        Ptrs2(Exprpt) = Stack(Stackpt + 1);
        Stack(Stackpt) = Exprpt;
        Exprpt = Exprpt + 1;
        goto Loop;
      Bld_9:
        Stackpt = Stackpt - 1;
        Ptrs1(Exprpt) = Stack(Stackpt);
        Stack(Stackpt) = Exprpt;
        Exprpt = Exprpt + 1;
        goto Loop;
      Bld_10:
        Printout(Stack(1), Pt, Expr, Ptrs1, Ptrs2);
      }
      void Printout(int Pt, int Base, int Expr, unsigned char Ptrs1,
                    unsigned char Ptrs2) {
        static int Prt_sw;
        static void *Prt[9 /*1:9*/] = {
            &&Prt_1, &&Prt_2, &&Prt_3, &&Prt_4, &&Prt_5,
            &&Prt_6, &&Prt_7, &&Prt_8, &&Prt_9,
        };
        int Paren;
        int Dim;
        int Pr;
        int I;
        Paren = 0;
        goto *Prt[Prt_sw = (Expr(Pt)) - 1];
      Prt_1:
        Pt = Pt + 1;
        Pvarn(Expr(Pt) & 511);
        Dim = Expr(Pt) >> 13;
        Pt = Pt + 1;
        if (Dim == 0) return;
        Printsymbol('(');
        Printexpr(Pt + Base);
        if (Dim == 2) {
          Printsymbol(',');
          Printexpr(Expr(Pt));
        }
        Printstring(' )');
        return;
      Prt_2:
        Print(*Real(Addr(Expr(Pt + 1))));
        return;
      Prt_3:
        I = Expr(Pt + 1);
        if (I > 20) {
          Printstring(' FN');
          Printsymbol(I);
        } else
          Printstring(_imp_join(_imp_str_literal(" "), Fnn(I)));
        Printsymbol('(');
        Printexpr(Pt + 2 + Base);
        Printstring(' )');
        return;
      Prt_5:
      Prt_7:
      Prt_8:;
        if (Prec(Expr(Pt)) >= Prec(Expr(Ptrs2(Pt)))) Paren = 1;
      Prt_4:
      Prt_6:;
        Pr = Prec(Expr(Pt));
        if (Pr > Prec(Expr(Ptrs1(Pt)))) {
          Paren = Paren | 2;
          Printstring(' (');
        }
        Printout(Ptrs1(Pt), Base, Expr, Ptrs1, Ptrs2);
        if (Paren > 1) {
          Printstring(' )');
          Paren = Paren & 1;
        }
        Space();
        Printsymbol(Opr(Expr(Pt) - 3));
        if (Pr > Prec(Expr(Ptrs2(Pt)))) Paren = Paren | 2;
        if (Paren > 0) Printstring(' (');
        Printout(Ptrs2(Pt), Base, Expr, Ptrs1, Ptrs2);
        if (Paren > 0) Printstring(' )');
        return;
      Prt_9:;
        Printstring(' -');
        if (Expr(Ptrs1(Pt)) > 3) {
          Paren = 1;
          Printstring(' (');
        }
        Printout(Ptrs1(Pt), Base, Expr, Ptrs1, Ptrs2);
        if (Paren > 0) Printstring(' )');
      }
      Indent = 0;
      Maxs = Lenth(Llnum);
      Lcl = &Lc(0);
      if (Nsym == Cr) {
        Minl = 0;
        Maxl = 9999;
      } else {
        if (Read(Minl) != 0) {
          Printsyntax();
          return;
        }
        Getsym();
        if (Read(Maxl) != 0) Maxl = Minl;
      }
      if (Nlines == 0 || Minl > Llnum) return;
      do {
        Lcl = &Lc(Lcl->Link);
        Lnum = Analrec(Lcl->Ptr);
      } while (Lnum < Minl);
      while (Addr(*Lcl) != Addr(Lc(0)) && Lnum <= Maxl) {
        Spaces(Maxs - Lenth(Lnum));
        Write(Lnum);
        if (Lcl->Data < 0) {
          Printstring('  ** ERROR **');
          goto Listloop;
        }
        I = Lcl->Ptr;
        J = Analrec(I + 1);
        if (J == 9) Indent = Indent - 2;
        Spaces(Indent);
        Printstring(_imp_join(_imp_str_literal(" "), Iname(J)));
        M = Analrec(I + 2);
        goto *List[List_sw = (J)-1];
      List_1:;
        Temp = I + 3;
        Dim = M >> 13;
        if (Dim > 0) {
          Temp = Analrec(Temp);
          if (Dim == 2) Temp = Analrec(Temp);
        }
        J = Analrec(I);
        Analrec(I) = Temp;
        Printexpr(I);
        Analrec(I) = J;
        Printstring(' =');
        Printexpr(Temp);
        goto Listloop;
      List_2:
      List_14:;
        I = I + 1;
        for (L = 1; L <= M; L++) {
          J = Analrec(I);
          K = Analrec(I + 1);
          Temp = I + 3;
          Dim = Analrec(I + 2) >> 13;
          if (Dim > 0) Temp = Analrec(Temp);
          if (Dim == 2) Temp = Analrec(Temp);
          Analrec(I) = Temp;
          Analrec(I + 1) = 1;
          Printexpr(I);
          if (L != M) Printstring(' , ');
          Analrec(I) = J;
          Analrec(I + 1) = K;
          I = Temp - 2;
        }
        goto Listloop;
      List_3:;
        M = M + I + 2;
        for (J = I + 3; J <= M; J++) {
          Print(*Real(Addr(Analrec(J))));
          if (J != M) Printsymbol(',');
        }
        goto Listloop;
      List_4:;
        I = I + 3;
        while (M > 0) {
          K = Analrec(I);
          if ((K & 1) == 0) {
            Printexpr(I + 1);
            I = Analrec(I + 1);
          } else {
            Printstring(' \'');
            Pstring(I + 1, J);
            Printsymbol('\'');
            I = I + (J >> 2) + 2;
          }
          K = K >> 1;
          if (K > 0) {
            Space();
            if (K == 2)
              Printsymbol(';');
            else
              Printsymbol(',');
          }
          M = M - 1;
        }
        goto Listloop;
      List_5:
      List_12:;
        Write(M);
        goto Listloop;
      List_6:;
        Printexpr(I + 2);
        Printstring(_imp_join(_imp_str_literal(" "), Rel(Analrec(Analrec(M)))));
        Printexpr(M);
        Printstring(' THEN');
        Write(Analrec(Analrec(M) + 1));
        goto Listloop;
      List_7:;
        goto *Matl1[Matl1_sw = (M)-1];
      Matl1_1:
        Pvarn(Analrec(I + 3));
        Printstring(' =');
        M = Analrec(I + 4);
        goto *Matl2[Matl2_sw = M];
      Matl2_0:
        Printstring(' (');
        Printexpr(I + 5);
        Printstring(') *');
        Pvarn(Analrec(Analrec(I + 5)));
        goto Listloop;
      Matl2_1:
      Matl2_2:
      Matl2_3:;
        Pvarn(Analrec(I + 5));
        Space();
        Printsymbol(Opr(M));
        Pvarn(Analrec(I + 6));
        goto Listloop;
      Matl2_4:
      Matl2_8:
        Printstring(
            _imp_join(_imp_str_literal(" "),
                      _imp_join(Matf(Analrec(I + 4)), _imp_str_literal("("))));
        Pvarn(Analrec(I + 5));
        Printstring(' )');
        goto Listloop;
      Matl2_5:
      Matl2_6:
      Matl2_7:
        Printstring(_imp_join(_imp_str_literal(" "), Matf(Analrec(I + 4))));
        goto Listloop;
      Matl1_2:
      Matl1_3:
      Matl1_4:
        Printstring(Mationame(M));
        M = I + 3 + Analrec(I + 3);
        for (I = I + 4; I <= M; I++) {
          Pvarn(Analrec(I) & 511);
          Space();
          if (Analrec(I) >> 9 != 0)
            Printsymbol(';');
          else if (I != M)
            Printsymbol(',');
        }
        goto Listloop;
      List_8:;
        Pvarn(M);
        I = I + 3;
        Printstring(' =');
        Printexpr(I);
        I = Analrec(I);
        Printstring(' TO');
        Printexpr(I);
        I = Analrec(I);
        if (Analrec(I) == 1) {
          Printstring(' STEP');
          Printexpr(I + 1);
        }
        Indent = Indent + 2;
        goto Listloop;
      List_9:;
        Pvarn(M);
        goto Listloop;
      List_10:;
        for (L = 1; L <= M; L++) {
          I = I + 3;
          Pvarn(Analrec(I));
          Printsymbol('(');
          Write(Analrec(I + 1));
          J = Analrec(I + 2);
          if (J > 0) {
            Printstring(' ,');
            Write(J);
          }
          Printstring(' )');
          if (L != M) Printstring(' ,');
        }
        goto Listloop;
      List_11:
      List_13:
      List_15:
      List_18:;
        goto Listloop;
      List_16:;
        Printstring(*String(Addr(Analrec(I + 2))));
        goto Listloop;
      List_17:;
        Printexpr(I + 2);
        Printstring(' GOTO');
        I = M;
        M = Analrec(I) + I;
        for (L = I + 1; L <= M; L++) {
          Write(Analrec(L));
          if (L != M) Printstring(' ,');
        }
        goto Listloop;
      List_19:;
        Printsymbol(M);
        Printsymbol('(');
        Pvarn(Analrec(I + 3));
        Printstring(')=');
        Printexpr(I + 4);
        goto Listloop;
      Listloop:
        Newline();
        Lcl = &Lc(Lcl->Link);
        Lnum = Analrec(Lcl->Ptr);
      }
      Newlines(2);
    }
    void Outstring(int Pt, int Lenth) {
      int I;
      int J;
      int Address;
      Address = Addr(Analrec(Pt));
      for (I = 1; I <= *Byteinteger(Address); I++) {
        J = *Byteinteger(Address + I);
        Printsymbol(J);
        if (J == '\'') Printsymbol('\'');
      }
      Lenth = *Byteinteger(Address);
    }
    void Resequence(void) {
      typedef struct Rseqf {
        short Old;
        short New;
      } Rseqf;
      Rseqf Rseq[Nlines];
      ;
      int Ptr;
      int Rspt;
      int Lnum;
      int Step;
      int Maxl;
      int K;
      static int Rs_sw;
      static void *Rs[19 /*1:19*/] = {
          &&Rs_1,  &&Rs_2,  &&Rs_3,  &&Rs_4,  &&Rs_5,  &&Rs_6,  &&Rs_7,
          &&Rs_8,  &&Rs_9,  &&Rs_10, &&Rs_11, &&Rs_12, &&Rs_13, &&Rs_14,
          &&Rs_15, &&Rs_16, &&Rs_17, &&Rs_18, &&Rs_19,
      };
      void Replace(int Lnum) {
        int I;
        for (I = 1; I <= Nlines; I++)
          if (Rseq(I).Old == Lnum) {
            Lnum = Rseq(I).New;
            return;
          }
        Lnum = 0;
      }
      if (Nlines == 0) return;
      Maxl = 9999 / Nlines;
      if (Nsym == Cr)
        Step = 10;
      else {
        if (Read(Step) != 0 || Step < 1) {
          Printsyntax();
          return;
        }
      }
      Ptr = Lc(0).Link;
      Lnum = Step;
      Rspt = 1;
      while (Ptr > 0) {
        Cell = &Lc(Ptr);
        Rseq(Rspt).Old = Analrec(Cell->Ptr);
        Rseq(Rspt).New = Lnum;
        Analrec(Cell->Ptr) = Lnum;
        Lnum = Lnum + Step;
        Ptr = Cell->Link;
        Rspt = Rspt + 1;
      }
      Cell = &Lc(0);
      while (Cell->Link != 0) {
        Cell = &Lc(Cell->Link);
        goto *Rs[Rs_sw = (Analrec(Cell->Ptr + 1)) - 1];
      Rs_5:
      Rs_12:
        Replace(Analrec(Cell->Ptr + 2));
        goto Rsout;
      Rs_6:
        Replace(Analrec(Analrec(Analrec(Cell->Ptr + 2)) + 1));
        goto Rsout;
      Rs_17:
        K = Analrec(Cell->Ptr + 2);
        for (K = K + 1; K <= K + Analrec(K); K++) Replace(Analrec(K));
      Rs_1:
      Rs_2:
      Rs_3:
      Rs_4:
      Rs_7:;
      Rs_8:
      Rs_9:
      Rs_10:
      Rs_11:
      Rs_13:;
      Rs_14:
      Rs_15:
      Rs_16:
      Rs_18:
      Rs_19:;
      Rsout:;
      }
      Replace(Llnum);
    }
  }
  void Compile(void) {
    void Decmat(void);
    void Declare(int Dim);
    void Decvar(void);
    void Decexpr(void);
    int Findlab(void);
    int I;
    int Var;
    int Dim;
    int Ftop;
    int Onpt;
    int Pt;
    Rf2 *Cell;
    Rf3 *Vart;
    static int Compile_sw;
    static void *Compile[20 /*0:19*/] = {
        &&Compile_0,  &&Compile_1,  &&Compile_2,  &&Compile_3,  &&Compile_4,
        &&Compile_5,  &&Compile_6,  &&Compile_7,  &&Compile_8,  &&Compile_9,
        &&Compile_10, &&Compile_11, &&Compile_12, &&Compile_13, &&Compile_14,
        &&Compile_15, &&Compile_16, &&Compile_17, &&Compile_18, &&Compile_19,
    };
    static int Matc_sw;
    static void *Matc[9 /*0:8*/] = {
        &&Matc_0, &&Matc_1, &&Matc_2, &&Matc_3, &&Matc_4,
        &&Matc_5, &&Matc_6, &&Matc_7, &&Matc_8,
    };
    int Fs[26 /*1:26*/];
    for (I = 'A'; I <= 'Z'; I++) {
      Fnlist(I) = 0;
    }
    for (I = 0; I <= 285; I++) {
      Vt(I).Desc = 0;
    }
    Ftop = 0;
    Onpt = 1;
    Datpt2 = 1;
    Cell = &Lc(0);
    Analrec(Analrecpt) = 0;
    Cell->Ptr = Analrecpt - 1;
  Comloop:
  Compile_13:
  Compile_15:
  Compile_16:
  Compile_18:;
    Cell = &Lc(Cell->Link);
    Pt = Cell->Ptr + 2;
    Lnum = Analrec(Cell->Ptr);
    goto *Compile[Compile_sw = Analrec(Pt - 1)];
  Compile_0:;
    Lnum = 9999;
    Pholt(3);
    goto *Compile[Compile_sw = 11];
  Compile_1:;
    Decvar();
    Decexpr();
    goto Comloop;
  Compile_2:
  Compile_14:;
    Pt = Pt + 1;
    for (I = 1; I <= Analrec(Pt - 1); I++) Decvar();
    goto Comloop;
  Compile_3:;
    Pt = Pt + 1;
    for (I = 1; I <= Analrec(Pt - 1); I++) {
      if (Datpt2 > 1280) {
        Pholt(2);
        break;
      }
      Datarr(Datpt2) = *Real(Addr(Analrec(Pt)));
      Pt = Pt + 1;
      Datpt2 = Datpt2 + 1;
    }
    goto Comloop;
  Compile_4:;
    I = Analrec(Pt);
    Pt = Pt + 1;
    while (I > 0) {
      if ((Analrec(Pt) & 1) == 0) {
        Pt = Pt + 1;
        Decexpr();
      } else
        Pt = Pt + 2 + (Analrec(Pt + 1) >> 26);
      I = I - 1;
    }
    goto Comloop;
  Compile_5:
  Compile_12:;
    Cell->Data = Findlab;
    if (Cell->Data == 0) Pholt(4);
    goto Comloop;
  Compile_6:;
    Decexpr();
    Decexpr();
    Pt = Pt + 1;
    goto *Compile[Compile_sw = 5];
  Compile_7:;
    if (Analrec(Pt) > 1) {
      for (Pt = Pt + 2; Pt <= Pt + 1 + Analrec(Pt + 1); Pt++) Decmat();
      goto Comloop;
    }
    Pt = Pt + 1;
    Decmat();
    Pt = Pt + 2;
    goto *Matc[Matc_sw = Analrec(Pt - 1)];
  Matc_0:
    Decexpr();
  Matc_4:
  Matc_8:
    Decmat();
  Matc_5:
  Matc_6:
  Matc_7:
    goto Comloop;
  Matc_1:
  Matc_2:
  Matc_3:
    Decmat();
    Pt = Pt + 1;
    goto *Matc[Matc_sw = 4];
  Compile_8:;
    Var = Analrec(Pt);
    Pt = Pt + 1;
    Vart = &Vt(Var);
    if ((Vart->Desc & 4) != 0) {
      Pholt(5);
      goto Comloop;
    }
    Vart->Desc = Vart->Desc | 4;
    if (Ftop == 26)
      Pholt(12);
    else {
      Ftop = Ftop + 1;
      Fs(Ftop) = Var;
    }
    Decexpr();
    Decexpr();
    if (Analrec(Pt) == 1) {
      Pt = Pt + 1;
      Decexpr();
    }
    goto Comloop;
  Compile_9:;
    Var = Analrec(Pt);
    if (Ftop == 0 || Fs(Ftop) != Var)
      Pholt(6);
    else
      Ftop = Ftop - 1;
    Vt(Var).Desc = Vt(Var).Desc & 3;
    goto Comloop;
  Compile_10:;
    Pt = Pt + 1;
    for (I = 1; I <= Analrec(Pt - 1); I++) {
      if (Analrec(Pt + 2) == 0)
        Dim = 1;
      else
        Dim = 2;
      Declare(Dim);
      Vart = &Vt(Analrec(Pt));
      Vart->D1 = Analrec(Pt + 1) + 1;
      Vart->D2 = Analrec(Pt + 2) + 1;
      Pt = Pt + 3;
    }
    goto Comloop;
  Compile_17:;
    Decexpr();
    Cell->Data = Onpt - 1;
    for (I = 1; I <= Analrec(Pt); I++) {
      Pt = Pt + 1;
      J = Findlab;
      if (J == 0) Pholt(4);
      Onlist(Onpt) = J;
      Onpt = Onpt + 1;
      if (Onpt == 51) {
        Onpt = 50;
        Pholt(11);
      }
    }
    goto Comloop;
  Compile_19:;
    I = Analrec(Pt);
    if (Fnlist(I) > 0) Pholt(7);
    Fnlist(I) = Pt + 1;
    Pt = Pt + 2;
    Decexpr();
    goto Comloop;
  Compile_11:;
    while (Ftop > 0) {
      Printstring('*** \'NEXT\' MISSING ');
      Pvarn(Fs(Ftop));
      Ftop = Ftop - 1;
      Faults = Faults + 1;
      Newline();
    }
    for (I = 'A'; I <= 'Z'; I++)
      if (Fnlist(I) < 0) {
        Printstring('*** FN NOT DEFINED ');
        Printsymbol(I);
        Newline();
        Faults = Faults + 1;
      }
    Arrpt = 286;
    for (I = 0; I <= 285; I++) {
      Vart = &Vt(I);
      Vart->Desc = Vart->Desc & 3;
      if (Vart->Desc > 0) {
        J = Vart->D1 * Vart->D2;
        if (Arrpt + J < 2000) {
          Vart->Addr = Arrpt;
          Arrpt = Arrpt + J;
        } else {
          Pholt(9);
          break;
        }
      }
    }
    int Findlab(void) {
      int I;
      int L;
      int J;
      I = Lc(0).Link;
      L = Analrec(Pt);
      for (;;) {
        J = Analrec(Lc(I).Ptr);
        if (L == J) return (I);
        I = Lc(I).Link;
        if (L < J || I == 0) return (0);
      }
    }
    void Decmat(void) {
      Rf3 *Mat;
      int *Desc;
      Mat = &Vt(Analrec(Pt) & 511);
      Desc = &Mat->Desc;
      if ((*Desc & 3) != 0) return;
      Desc = *Desc & 4 | 2;
      Mat->D1 = 11;
      Mat->D2 = 11;
    }
    void Declare(int Dim) {
      int *Vt1v;
      Rf3 Namevart;
      Vart = &Vt(Analrec(Pt) & 511);
      Vt1v = &Vart->Desc;
      if (Dim == 0 || *Vt1v == (*Vt1v | Dim)) return;
      if ((*Vt1v & 3) == 3 - Dim) {
        Pholt(1);
        return;
      }
      Vt1v = *Vt1v | Dim;
      if (Dim == 2) Dim = 11;
      Vart->D1 = 11;
      Vart->D2 = Dim;
    }
    void Decvar(void) {
      int Dim;
      Dim = Analrec(Pt) >> 13;
      Declare(Dim);
      Pt = Pt + 1;
      while (Dim > 0) {
        Decexpr();
        Dim = Dim - 1;
      }
    }
    void Decexpr(void) {
      int Finish;
      int I;
      static int Sw_sw;
      static void *Sw[9 /*1:9*/] = {
          &&Sw_1, &&Sw_2, &&Sw_3, &&Sw_4, &&Sw_5,
          &&Sw_6, &&Sw_7, &&Sw_8, &&Sw_9,
      };
      Finish = Analrec(Pt);
      Pt = Pt + 1;
    Loop:
    Sw_4:
    Sw_5:
    Sw_6:
    Sw_7:
    Sw_8:
    Sw_9:
      if (Pt >= Finish) return;
      Pt = Pt + 1;
      goto *Sw[Sw_sw = (Analrec(Pt - 1)) - 1];
    Sw_1:
      Decvar();
      goto Loop;
    Sw_2:
      Pt = Pt + 1;
      goto Loop;
    Sw_3:
      I = Analrec(Pt);
      if (I > 20) {
        if (Fnlist(I) == 0) Fnlist(I) = -1;
      }
      Pt = Pt + 1;
      Decexpr();
      goto Loop;
    }
  }
  void Execute(void) {
    int Rread(float R);
    int Address(void);
    float Evalexpr(void);
    int Subpt;
    int Datpt1;
    int Ftop;
    int Lpt;
    int Pt;
    int Inst;
    int Rand;
    int I;
    int J;
    int K;
    int L;
    int M;
    int Var;
    static int Execute_sw;
    static void *Execute[19 /*1:19*/] = {
        &&Execute_1,  &&Execute_2,  &&Execute_3,  &&Execute_4,  &&Execute_5,
        &&Execute_6,  &&Execute_7,  &&Execute_8,  &&Execute_9,  &&Execute_10,
        &&Execute_11, &&Execute_12, &&Execute_13, &&Execute_14, &&Execute_15,
        &&Execute_16, &&Execute_17, &&Execute_18, &&Execute_19,
    };
    static int Cond_sw;
    static void *Cond[18 /*2:19*/] = {
        &&Cond_2,  &&Cond_3,  &&Cond_4,  &&Cond_5,  &&Cond_6,  &&Cond_7,
        &&Cond_8,  &&Cond_9,  &&Cond_10, &&Cond_11, &&Cond_12, &&Cond_13,
        &&Cond_14, &&Cond_15, &&Cond_16, &&Cond_17, &&Cond_18, &&Cond_19,
    };
    static int Matin_sw;
    static void *Matin[2 /*0:1*/] = {
        &&Matin_0,
        &&Matin_1,
    };
    static int Mate1_sw;
    static void *Mate1[4 /*1:4*/] = {
        &&Mate1_1,
        &&Mate1_2,
        &&Mate1_3,
        &&Mate1_4,
    };
    static int Mate2_sw;
    static void *Mate2[9 /*0:8*/] = {
        &&Mate2_0, &&Mate2_1, &&Mate2_2, &&Mate2_3, &&Mate2_4,
        &&Mate2_5, &&Mate2_6, &&Mate2_7, &&Mate2_8,
    };
    Rf2 *Cell;
    Rf1 *Currentfs;
    Rf3 *Vart;
    Rf3 *Vart1;
    Rf3 *Vart2;
    float *Xn;
    float X;
    float Y;
    float Z;
    float W;
    Rf1 Fs[26 /*1:26*/];
    ;
    short Substack[26 /*1:26*/];
    Ftop = 0;
    Flt = 0;
    Subpt = 0;
    Datpt1 = 1;
    Linel = 0;
    for (I = 0; I <= Arrpt; I++) {
      Arrspace(I) = 0;
    }
    Cell = &Lc(0);
    Lpt = Cell->Link;
    Rand = 1234567;
    Newlines(4);
    goto Intloop;
  Nextexec:
    if (Flt != 0) return;
  Intloop:
  Execute_3:
  Execute_10:
  Execute_16:
  Execute_19:;
    if (Testint(0, 'EXIT') != 0) {
      Runfolt(17);
      return;
    }
    Cell = &Lc(Lpt);
    Pt = Cell->Ptr + 2;
    Lnum = Analrec(Cell->Ptr);
    Lpt = Cell->Link;
    Inst = Analrec(Cell->Ptr + 1);
    goto *Execute[Execute_sw = (Inst)-1];
  Execute_1:;
    I = Address;
    Arrspace(I) = Evalexpr;
    goto Nextexec;
  Execute_2:
  Execute_14:;
    Pt = Pt + 1;
    J = Inst / 10;
    for (I = 1; I <= Analrec(Pt - 1); I++) {
      Xn = &Arrspace(Address);
      if (J == 0) {
        if (Datpt1 == Datpt2) {
          Runfolt(3);
          break;
        }
        Xn = Datarr(Datpt1);
        Datpt1 = Datpt1 + 1;
      } else {
        if (Rread(*Xn) != 0) break;
      }
    }
    goto Nextexec;
  Execute_4:;
    K = Analrec(Pt);
    J = 0;
    Pt = Pt + 1;
    while (K > 0) {
      J = Analrec(Pt);
      Pt = Pt + 1;
      if (Linel >= 70) {
        Newline();
        Linel = 0;
      }
      if ((J & 1) == 0)
        Print(Evalexpr);
      else {
        Prstring(Pt, I);
        Pt = Pt + (I >> 2) + 1;
        Linel = Linel + I;
      }
      J = J >> 1;
      if (J == 2)
        M = 8;
      else
        M = 14;
      I = Linel - Linel / M * M;
      if (I > 0) {
        Spaces(M - I);
        Linel = Linel + M - I;
      }
      K = K - 1;
    }
    if (J == 0) {
      Newline();
      Linel = 0;
    }
    goto Nextexec;
  Execute_5:;
    Lpt = Cell->Data;
    goto Intloop;
  Execute_6:;
    X = Evalexpr;
    X = X - Evalexpr;
    if (Mod(X) < 0.000001)
      I = 0;
    else if (X < 0)
      I = -1;
    else
      I = 1;
    goto *Cond[Cond_sw = (3 * Analrec(Pt) + I) - 2];
  Cond_2:
  Cond_5:
  Cond_6:
  Cond_10:
  Cond_12:
  Cond_13:
  Cond_15:;
  Cond_17:
  Cond_19:
    Lpt = Cell->Data;
  Cond_3:
  Cond_4:
  Cond_7:
  Cond_8:
  Cond_9:
  Cond_11:
  Cond_14:;
  Cond_16:
  Cond_18:
    goto Nextexec;
  Execute_7:;
    Pt = Pt + 1;
    goto *Mate1[Mate1_sw = (Analrec(Pt - 1)) - 1];
  Mate1_1:
    Vart = &Vt(Analrec(Pt));
    Pt = Pt + 2;
    goto *Mate2[Mate2_sw = Analrec(Pt - 1)];
  Mate2_0:
    X = Evalexpr;
    Vart1 = &Vt(Analrec(Pt));
    if (Vart->D1 != Vart1->D1 || Vart->D2 != Vart1->D2) Runfolt(0);
    J = Addr(Arrspace(Vart1->Addr));
    for (I = Vart->Addr; I <= Vart->Addr + Vart->D1 * Vart->D2 - 1; I++) {
      Arrspace(I) = X * *Real(J);
      J = J + 4;
    }
    goto Nextexec;
  Mate2_1:
  Mate2_2:
    L = Analrec(Pt - 1) - 1;
    Vart1 = &Vt(Analrec(Pt));
    Vart2 = &Vt(Analrec(Pt + 1));
    if (Vart->D1 != Vart1->D1 || Vart->D1 != Vart2->D1 ||
        Vart->D2 != Vart1->D2 || Vart->D2 != Vart2->D2)
      Runfolt(0);
    J = Addr(Arrspace(Vart1->Addr));
    K = Addr(Arrspace(Vart2->Addr));
    if (L == 0)
      for (I = Vart->Addr; I <= Vart->Addr + Vart->D1 * Vart->D2 - 1; I++) {
        Arrspace(I) = *Real(J) + *Real(K);
        J = J + 4;
        K = K + 4;
      }
    else
      for (I = Vart->Addr; I <= Vart->Addr + Vart->D1 * Vart->D2 - 1; I++) {
        Arrspace(I) = Arrspace(J) - Arrspace(K);
        J = J + 1;
        K = K + 1;
      }
    goto Nextexec;
  Mate2_3:
    Vart1 = &Vt(Analrec(Pt));
    Vart2 = &Vt(Analrec(Pt + 1));
    if (Vart->D1 != Vart1->D1 || Vart->D2 != Vart2->D2 ||
        Vart1->D2 != Vart2->D1)
      Runfolt(0);
    {
      float Rf[Vart->D1][Vart->D2];
      float Rf1[Vart1->D1][Vart1->D2];
      float Rf2[Vart2->D1][Vart2->D2];
      float A;
      float A1;
      float A2;
      double Aa[Vart->D1][Vart->D2];
      double B[Vart1->D1][Vart1->D2];
      double C[Vart2->D1][Vart2->D2];
      A = &Array(Addr(Arrspace(Vart->Addr)), Rf);
      A1 = &Array(Addr(Arrspace(Vart1->Addr)), Rf1);
      A2 = &Array(Addr(Arrspace(Vart2->Addr)), Rf2);
      for (I = 1; I <= Vart1->D1; I++)
        for (J = 1; J <= Vart1->D2; J++) {
          B(I, J) = A1(I, J);
        }
      for (I = 1; I <= Vart2->D1; I++)
        for (J = 1; J <= Vart2->D2; J++) {
          C(I, J) = A2(I, J);
        }
      Multmatrix(Aa, B, C, Vart1->D1, Vart1->D2, Vart2->D2);
      for (I = 1; I <= Vart->D1; I++)
        for (J = 1; J <= Vart->D2; J++) {
          A(I, J) = Aa(I, J);
        }
    }
    goto Nextexec;
  Mate2_4:
    Vart1 = &Vt(Analrec(Pt));
    if (Vart1->D1 != Vart1->D2 || Vart1->D2 != Vart->D1 || Vart->D1 != Vart->D2)
      Runfolt(0);
    {
      float Af[Vart->D1][Vart->D2];
      float A;
      double Det;
      double X[Vart->D1][Vart->D2];
      double Y[Vart->D1][Vart->D2];
      A = &Array(Addr(Arrspace(Vart1->Addr)), Af);
      for (I = 1; I <= Vart->D1; I++)
        for (J = 1; J <= Vart->D2; J++) {
          X(I, J) = A(I, J);
        }
      Invert(Y, X, Vart->D1, Det);
      A = &Array(Addr(Arrspace(Vart->Addr)), Af);
      for (I = 1; I <= Vart->D1; I++)
        for (J = 1; J <= Vart->D2; J++) {
          A(I, J) = Y(I, J);
        }
    }
    goto Nextexec;
  Mate2_5:
    if (Vart->D1 != Vart->D2) Runfolt(0);
  Mate2_6:
    L = 6 - Analrec(Pt - 1);
    X = 0;
  Mate2ll:
    for (I = Vart->Addr; I <= Vart->Addr + Vart->D1 * Vart->D2 - 1; I++) {
      Arrspace(I) = X;
    }
    if (L == 0) goto Nextexec;
    for (I = Vart->Addr;
         I != Vart->Addr + Vart->D1 * Vart->D1 - 1 + Vart->D1 + 1;
         I += Vart->D1 + 1) {
      Arrspace(I) = 1;
    }
    goto Nextexec;
  Mate2_7:
    L = 0;
    X = 1.0;
    goto Mate2ll;
  Mate2_8:
    Vart1 = &Vt(Analrec(Pt));
    if (Vart->D1 != Vart1->D2 || Vart->D2 != Vart1->D1) Runfolt(0);
    {
      float A2[(Vart->D1 - 1) + 1][(Vart->D2 - 1) + 1];
      float An;
      float A[(Vart1->D1 - 1) + 1][(Vart1->D2 - 1) + 1];
      An = &Array(Addr(Arrspace(Vart1->Addr)), A);
      for (I = 0; I <= Vart1->D1 - 1; I++)
        for (J = 0; J <= Vart1->D2 - 1; J++) {
          A(I, J) = An(I, J);
        }
      An = &Array(Addr(Arrspace(Vart->Addr)), A2);
      for (I = 0; I <= Vart1->D1 - 1; I++)
        for (J = 0; J <= Vart1->D2 - 1; J++) {
          An(J, I) = A(I, J);
        }
    }
    goto Nextexec;
  Mate1_2:
  Mate1_4:
    L = Analrec(Pt - 1) >> 2;
    for (I = 1; I <= Analrec(Pt); I++) {
      Pt = Pt + 1;
      Vart = &Vt(Analrec(Pt));
      for (J = Vart->Addr; J <= Vart->D1 - 1 + Vart->Addr; J++)
        for (K = 0; K <= Vart->D2 - 1; K++) {
          Xn = &Arrspace(J + K * Vart->D1);
          goto *Matin[Matin_sw = L];
        Matin_0:
          if (Datpt1 == Datpt2) {
            Runfolt(3);
            return;
          }
          Xn = Datarr(Datpt1);
          Datpt1 = Datpt1 + 1;
          goto Matinl;
        Matin_1:
          if (Rread(*Xn) != 0) {
            Runfolt(2);
            return;
          }
        Matinl:;
        }
    }
    goto Nextexec;
  Mate1_3:
    for (I = 1; I <= Analrec(Pt); I++) {
      Pt = Pt + 1;
      if (Analrec(Pt) >> 9 != 0)
        M = 8;
      else
        M = 14;
      if (Linel > 0) {
        Linel = 0;
        Newline();
      }
      Vart = &Vt(Analrec(Pt) & 511);
      for (J = Vart->Addr; J <= Vart->D1 - 1 + Vart->Addr; J++) {
        for (K = 0; K <= Vart->D2 - 1; K++) {
          if (Linel >= 70) {
            Linel = 0;
            Newline();
          }
          Print(Arrspace(J + K * Vart->D1));
          L = Linel - Linel / M * M;
          if (L > 0) {
            Spaces(M - L);
            Linel = Linel + M - L;
          }
        }
        Newline();
        Linel = 0;
      }
      Newline();
    }
    goto Nextexec;
  Execute_8:;
    if (Ftop == 26) {
      Runfolt(-1);
      return;
    }
    Var = Analrec(Pt);
    Pt = Pt + 1;
    X = Evalexpr;
    Z = Evalexpr;
    if (Analrec(Pt) == 1) {
      Pt = Pt + 1;
      Y = Evalexpr;
    } else
      Y = 1.0;
    if (Y == 0) Runfolt(5);
    if (Y >= 0)
      W = 1.0;
    else
      W = -1.0;
    if (X * W > Z * W) do {
        Cell = &Lc(Lpt);
        Pt = Cell->Ptr + 2;
        Lnum = Analrec(Cell->Ptr);
        Lpt = Cell->Link;
      } while (Analrec(Pt - 1) != 9 || Analrec(Pt) != Var);
    else {
      Arrspace(Var) = X;
      Ftop = Ftop + 1;
      Currentfs = &Fs(Ftop);
      Currentfs->Step = Y;
      Currentfs->Final = Z;
      Currentfs->Label = Lpt;
      Currentfs->Var = Var;
    }
    goto Nextexec;
  Execute_9:;
    Var = Analrec(Pt);
    Xn = &Arrspace(Var);
  Exec9:
    if (Ftop == 0) {
      Runfolt(6);
      return;
    }
    if (Var != Currentfs->Var) {
      Ftop = Ftop - 1;
      if (Ftop > 0) Currentfs = &Fs(Ftop);
      goto Exec9;
    }
    if (Currentfs->Step > 0)
      X = 1.0;
    else
      X = -1.0;
    Xn = *Xn + Currentfs->Step;
    if (*Xn * X <= Currentfs->Final * X) {
      Lpt = Currentfs->Label;
    } else {
      Ftop = Ftop - 1;
      if (Ftop > 0) Currentfs = &Fs(Ftop);
    }
    goto Intloop;
  Execute_12:;
    Subpt = Subpt + 1;
    if (Subpt == 27) Runfolt(7);
    Substack(Subpt) = Lpt;
    Lpt = Cell->Data;
    goto Nextexec;
  Execute_13:;
    if (Subpt == 0) Runfolt(8);
    Lpt = Substack(Subpt);
    Subpt = Subpt - 1;
    goto Nextexec;
  Execute_17:;
    I = Int(Evalexpr);
    if (1 <= I && I <= Analrec(Pt)) Lpt = Onlist(Cell->Data + I);
    goto Nextexec;
  Execute_18:;
    Datpt1 = 1;
    goto Intloop;
  Execute_11:
  Execute_15:
    return;
    int Rread(float R) {
      Prompt('?');
      if (Nsym == ',') Getsym();
      if (Nsym == Cr) Readline();
      if (Readr(R) != 0) {
        Runfolt(2);
        return (1);
      }
      return (0);
    }
    int Address(void) {
      int Var;
      int Dim;
      int D1;
      int D2;
      Rf3 *Vart;
      Var = Analrec(Pt) & 511;
      Dim = Analrec(Pt) >> 13;
      Pt = Pt + 1;
      Vart = &Vt(Var);
      if (Dim == 0) return (Var);
      D1 = Int(Evalexpr);
      if (0 > D1 || D1 >= Vart->D1) {
        Runfolt(1);
        return (-1);
      }
      if (Dim == 1) return (Vart->Addr + D1);
      D2 = Int(Evalexpr);
      if (0 > D2 || D2 >= Vart->D2) {
        Runfolt(1);
        return (-1);
      }
      return (Vart->Addr + D2 * Vart->D1 + D1);
    }
    float Evalexpr(void) {
      int Finish;
      int Evpt;
      int I;
      float Evalstack[30 /*1:30*/];
      static int Sw_sw;
      static void *Sw[9 /*1:9*/] = {
          &&Sw_1, &&Sw_2, &&Sw_3, &&Sw_4, &&Sw_5,
          &&Sw_6, &&Sw_7, &&Sw_8, &&Sw_9,
      };
      static int Fn_sw;
      static void *Fn[11 /*1:11*/] = {
          &&Fn_1, &&Fn_2, &&Fn_3, &&Fn_4,  &&Fn_5,  &&Fn_6,
          &&Fn_7, &&Fn_8, &&Fn_9, &&Fn_10, &&Fn_11,
      };
      float X;
      float *Xn;
      float *Yn;
      float Applyfn(int Fn, float P) {
        int Fpt;
        int Var;
        static int Depth;
        float Val;
        float Oldval;
        Fpt = Pt;
        Pt = Fnlist(Fn);
        Var = Analrec(Pt);
        Pt = Pt + 1;
        if (Depth == 10) {
          Runfolt(-2);
          Pt = Fpt;
          return (0);
        }
        Oldval = Arrspace(Var);
        Depth = Depth + 1;
        Arrspace(Var) = P;
        Val = Evalexpr;
        Pt = Fpt;
        Depth = Depth - 1;
        Arrspace(Var) = Oldval;
        return (Val);
      }
      Finish = Analrec(Pt);
      Pt = Pt + 1;
      Evpt = Addr(Evalstack(1));
    Loop:
      if (Pt >= Finish) return (Evalstack(1));
      Pt = Pt + 1;
      goto *Sw[Sw_sw = (Analrec(Pt - 1)) - 1];
    Sw_1:
      Real(Evpt) = Arrspace(Address);
    Inc:
      Evpt = Evpt + 4;
      goto Loop;
    Sw_2:
      Real(Evpt) = *Real(Addr(Analrec(Pt)));
      Pt = Pt + 1;
      goto Inc;
    Sw_3:
      Pt = Pt + 1;
      Xn = Real(Evpt);
      I = Analrec(Pt - 1);
      if (I > 20) {
        Xn = Applyfn(I, Evalexpr);
        goto Inc;
      } else
        goto *Fn[Fn_sw = (I)-1];
    Fn_1:
      Xn = Intpt(Evalexpr);
      goto Inc;
    Fn_2:
      Xn = Random(Rand, 1);
      Pt = Analrec(Pt);
      goto Inc;
    Fn_3:
      Xn = Sin(Evalexpr);
      goto Inc;
    Fn_4:
      Xn = Cos(Evalexpr);
      goto Inc;
    Fn_5:
      Xn = Tan(Evalexpr);
      goto Inc;
    Fn_6:
      Xn = Arctan(1, Evalexpr);
      goto Inc;
    Fn_7:
      Xn = Exp(Evalexpr);
      goto Inc;
    Fn_8:
      X = Evalexpr;
      if (X == 0) {
        Runfolt(14);
        Integer(Evpt) = 0xFFFFFFFF;
        goto Inc;
      }
      if (X < 0) {
        Runfolt(13);
        X = -X;
      }
      Xn = Log(X);
      goto Inc;
    Fn_9:
      Xn = Mod(Evalexpr);
      goto Inc;
    Fn_10:
      X = Evalexpr;
      if (X < 0) {
        Runfolt(12);
        X = -X;
      }
      Xn = Sqrt(X);
      goto Inc;
    Fn_11:
      Xn = Evalexpr;
      if (*Xn > 0)
        Xn = 1.0;
      else if (*Xn < 0)
        Xn = -1.0;
      goto Inc;
    Sw_4:
      Evpt = Evpt - 4;
      Real(Evpt - 4) = *Real(Evpt - 4) + *Real(Evpt);
      goto Loop;
    Sw_5:
      Evpt = Evpt - 4;
      Real(Evpt - 4) = *Real(Evpt - 4) - *Real(Evpt);
      goto Loop;
    Sw_6:
      Evpt = Evpt - 4;
      Real(Evpt - 4) = *Real(Evpt - 4) * *Real(Evpt);
      goto Loop;
    Sw_7:
      Evpt = Evpt - 4;
      Xn = Real(Evpt);
      Yn = Real(Evpt - 4);
      if (*Xn == 0) {
        Runfolt(11);
        Integer(Evpt - 4) = 0x7FFFFFFF;
      } else
        Yn = *Yn / *Xn;
      goto Loop;
    Sw_8:
      Evpt = Evpt - 4;
      Xn = Real(Evpt - 4);
      Yn = Real(Evpt);
      if (*Xn == 0) {
        if (*Yn < 0) {
          Runfolt(15);
          Integer(Evpt - 4) = 0x7FFFFFFF;
          goto Loop;
        }
        if (*Yn == 0)
          Xn = 1.0;
        else
          Xn = 0;
      } else if (Isint(*Yn) != 0)
        Xn = REXP(*Xn, Int(*Yn));
      else {
        if (*Xn < 0) {
          Runfolt(16);
          Xn = -*Xn;
        }
        Xn = Exp(*Yn * Log(*Xn));
      }
      goto Loop;
    Sw_9:
      Real(Evpt - 4) = -*Real(Evpt - 4);
      goto Loop;
    }
  }
  int Getlinecell(void) {
    static int Lastcpt;
    int Previouscell;
    int J;
    int Thiscell;
    Rf2 *Lcl;
    Thiscell = Asl;
    Asl = Lc(Asl).Link;
    Cell = &Lc(Thiscell);
    if (Lnum > Llnum) {
      Cell->Link = 0;
      Lc(Lastcpt).Link = Thiscell;
      Previouscell = Lastcpt;
      Lastcpt = Thiscell;
      Llnum = Lnum;
    } else {
      J = 0;
      Lcl = &Lc(0);
      for (;;) {
        Previouscell = J;
        J = Lcl->Link;
        Lcl = &Lc(J);
        if (Analrec(Lcl->Ptr) == Lnum) {
          Cell->Link = Asl;
          Asl = Thiscell;
          Nlines = Nlines - 1;
          if (Lcl->Data < 0) Faults = Faults - 1;
          Cell = Lcl;
          break;
        }
        if (Analrec(Lcl->Ptr) > Lnum) {
          Cell->Link = J;
          Lc(Previouscell).Link = Thiscell;
          break;
        }
      }
    }
    if (Nsym != Cr) return (1);
    Lc(Previouscell).Link = Cell->Link;
    if (Llnum == Lnum) {
      Llnum = Analrec(Lc(Previouscell).Ptr);
      Lastcpt = Previouscell;
    }
    Cell->Link = Asl;
    Asl = Thiscell;
    return (0);
  }
  void Printsyntax(void) {
    int I;
    int J;
    Printstring('**  SYNTAX  ');
    J = 1;
    do {
      I = Line(J);
      Printsymbol(I);
      J = J + 1;
    } while (I != Cr);
    Spaces(11 + Linept);
    Printsymbol('^');
    Newline();
  }
  Selectinput(1);
  Printstring('      E.C.S.D. BASIC Interpreter    Version 1E.');
  Newlines(4);
  Line(80) = Cr;
  Linel = 0;
  for (I = 1; I <= 254; I++) {
    Lc(I).Link = I + 1;
  }
  Lc(255).Link = 0;
  Asl = 1;
  Runflag = 0;
  Dumpfl = 0;
  Analrecpt = 1;
  Nlines = 0;
  Lc(0) = 0;
  Analrec(0) = 0;
  Faults = 0;
  Llnum = 0;
Inputloop:
  Prompt(':');
  do {
    Readline();
    if (Read(Lnum) != 0) {
      if (Stream == 0) {
        Linept = 0;
        Getsym();
        Obey(Analinst(2));
      } else
        Printsyntax();
    } else if (0 < Lnum && Lnum <= 9999) {
      if (Asl != 0 && Analrecpt < 2048)
        if (Getlinecell != 0) {
          Nlines = Nlines + 1;
          Analyse(Analinst(1));
          if (Cell->Data < 0) {
            Analrecpt = Cell->Ptr + 1;
            Faults = Faults + 1;
          }
        } else
          Pholt(10);
    } else
      Printstring('**  ILLEGAL LINE NUMBER\n');
  } while (Runflag == 0);
  Runflag = 0;
  Compile();
  if (Faults > 0) {
    Printfaults(Faults, 'SEMANTIC');
    Faults = 0;
    goto Inputloop;
  }
  Execute();
Stop:
  Printstring('\n     STOPPED AT LINE');
  Write(Lnum);
  Newlines(8);
  goto Inputloop;
F9:
  Selectinput(0);
  Closestream(1);
  Stream = 0;
  goto Inputloop;
F1:
  Printstring('INTERPRETER FAILURE 1');
  Newline();
  exit(0);
F24:
  Runfolt(10);
  goto Stop;
F2:
  Runfolt(9);
  goto Stop;
  exit(0);
  return (1);
}
