#include <perms.h>
void Compile(_imp_string S, _imp_string Entry, int *Flag) {}
int *Comreg(int N) {
  static int I;
  return (&I);
}
_imp_string Failuremessage(int Mess) { return (_imp_join(_imp_str_literal("FAILURE: "), Itos(Mess, 0))); }
int Returncode(void) { return (0); }
void Setfname(_imp_string File) {}
int Icl9cezbcplx(_imp_string Parms) { return (0); }
static void Shuffle(_imp_string *S, _imp_string *Cparms) {
  int I;
  _imp_string Work1;
  _imp_string Work2;
  _imp_string P[4 /*1:4*/];
  if (_imp_strcmp(*S, _imp_str_literal("?")) == 0) {
    *Cparms = _imp_str_literal(".IN,.NULL,.NULL,.NULL");
  } else {
    for (I = 1; I <= 4; I++) {
      P[I] = _imp_str_literal("");
    }
    *S = _imp_join(*S, _imp_str_literal(","));
    for (I = 1; I <= 4; I++)
      if (!_imp_resolve(*S, P[I], _imp_str_literal(","), *S)) break;
    for (I = 1; I <= 4; I++)
      if (_imp_resolve(P[I], Work1, _imp_str_literal("="), Work2)) {
        *S = _imp_join(P[I], _imp_join(_imp_str_literal(","), *S));
        P[I] = _imp_str_literal("");
      }
    *Cparms =
        _imp_join(P[1], _imp_join(_imp_str_literal(","),
                                  _imp_join(P[2], _imp_join(_imp_str_literal(","),
                                                            _imp_join(P[3], _imp_join(_imp_str_literal(","), P[4]))))));
  }
}
void Bcpl(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPL1"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPL fails -"), Failuremessage(Flag)));
  }
}
void Bcplcgen(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPL2"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLCGEN fails -"), Failuremessage(Flag)));
  }
}
void Bcplv(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPLV"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLV fails -"), Failuremessage(Flag)));
  }
}
void Bcplw(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPLW"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLW fails -"), Failuremessage(Flag)));
  }
}
void Bcplz(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPLZ"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLZ fails -"), Failuremessage(Flag)));
  }
}
void Bcplr(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPLR"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLR fails -"), Failuremessage(Flag)));
  }
}
void Bcplq(_imp_string Parms) {
  int Flag;
  _imp_string Cparms;
  _imp_string Auxparms;
  Setfname(_imp_str_literal(""));
  Shuffle(Parms, Cparms);
  Auxparms = Parms;
  *Comreg(9) = Addr(Auxparms);
  Compile(Cparms, _imp_str_literal("ICL9CEZBCPLQ"), Flag);
  Flag = Returncode();
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLQ fails -"), Failuremessage(Flag)));
  }
}
void Bcplxref(_imp_string Parms) {
  int Flag;
  Setfname(_imp_str_literal(""));
  Flag = Icl9cezbcplx(Parms);
  if (Flag == -1) Flag = 0;
  if (0 != Flag && Flag < 1000) {
    Newline();
    Printstring(_imp_join(_imp_str_literal("BCPLXREF fails -"), Failuremessage(Flag)));
  }
}
int _imp_mainep(int _imp_argc, char **_imp_argv) {
  Bcpl(_imp_str_literal(""));
  exit(0);
  return (1);
}
