#include <perms.h>
_imp_string7 P2VERSION = _imp_str_literal("004");
static int DIAG = 0;
static int DEBUG = 0;
static int CURRENTLINE = 0;
const unsigned char INTERNALTYPE[14] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 13};
const _imp_string7 TYPEID[14] = {_imp_str_literal("Unknown"), _imp_str_literal("Integer"), _imp_str_literal("Short "),
_imp_str_literal("Half "), _imp_str_literal("Byte "), _imp_str_literal("Addr "),
_imp_str_literal("Real "), _imp_str_literal("Lreal "), _imp_str_literal("String "),
_imp_str_literal("Record "), _imp_str_literal("General"), _imp_str_literal("Label "),
_imp_str_literal("Boolean"), _imp_str_literal("Set ")};
const unsigned char TYPEFMT[14] = {0, 4, 2, 2, 1, 4, 4, 8, 0, 0, 0, 0, 1, 32};
const unsigned char TYPECODE[14] = {0, 1, 6, 6, 5, 1, 2, 8, 3, 4, 0, 10, 0, 0};
const unsigned char TYPESIZE[14] = {0, 4, 2, 2, 1, 4, 4, 8, 0, 0, 12, 0, 2, 32};
const unsigned char UCHECK[14] = {0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0};
struct COMMFM {
union {
struct {
int LANGUAGE;
int OPTIONS;
int SPECIALS;
int PRIM;
int STATEMENTS;
int FAULTS;
int REFCOUNT;
int PRIMREFCOUNT;
int DEFCOUNT;
int PRIMDEFCOUNT;
int BLOCKCOUNT;
int PRIMBLOCKCOUNT;
int EXTERNALCOUNT;
int PRIMEXTERNALCOUNT;
int GLOBALSIZE;
int PRIMGLOBALSIZE;
int FORMATS;
int PRIMFORMATS;
int CONSTANTSIZE;
int PRIMCONSTANTSIZE;
int GLOBALARRAYSIZE;
int TOTALITEMS;
int TOTALBLOCKS;
int TOTALFORMATS;
int TOTALEXTERNALS;
_imp_string255 SOURCEFILE;
_imp_string255 MODULE;
};
};
};
void PASS2(struct COMMFM *INTERFACE) {
extern void D68000(int OP, int CA);
extern void DUMPENCODED(int N);
extern void PRINTHEX(int N, int P) __asm__("3L_IMP_PRINT_HEX");
const unsigned char ACTUAL[27] = {0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0};
const _imp_string3 REGID[27] = {
_imp_str_literal(""), _imp_str_literal("R0 "), _imp_str_literal("R1 "), _imp_str_literal("R2 "),
_imp_str_literal("R3 "), _imp_str_literal("R4 "), _imp_str_literal("R5 "), _imp_str_literal("R6 "),
_imp_str_literal("R7 "), _imp_str_literal("R8 "), _imp_str_literal("R9 "), _imp_str_literal("R10"),
_imp_str_literal("R11"), _imp_str_literal("R12"), _imp_str_literal("R13"), _imp_str_literal("R14"),
_imp_str_literal("R15"), _imp_str_literal("R? "), _imp_str_literal("F0 "), _imp_str_literal("F1 "),
_imp_str_literal("F2 "), _imp_str_literal("F3 "), _imp_str_literal("F4 "), _imp_str_literal("F5 "),
_imp_str_literal("F6 "), _imp_str_literal("F7 "), _imp_str_literal("F? ")};
const unsigned char RTYPE[27] = {0, [1 ... 17] = 1, [18 ... 26] = 7};
struct BOUNDFM {
union {
struct {
int LOWER;
int UPPER;
int MULT;
};
};
};
struct AFM {
union {
struct {
int DIMENSION;
int TOTALSIZE;
int ZERODISPLACEMENT;
int DV;
int LOCALFRAME;
int BASE;
struct BOUNDFM BOUND[7];
};
};
};
const struct AFM *ATYPE = 0;
struct VARFM {
union {
struct {
int FLAGS;
unsigned char BASE;
unsigned char PRIM;
unsigned char TYPE;
unsigned char FORM;
union {
struct {
double RVAR;
};
struct {
int DISP;
union {
struct {
int EXTRA;
};
struct {
struct AFM *ADATA;
};
};
};
};
union {
struct {
int FORMAT;
};
struct {
int SCALE;
};
};
int AREA;
};
};
};
struct OLFM {
union {
struct {
int OPER;
struct STACKFM *LINK;
};
};
};
struct XFM {
union {
struct {
int XSIZE;
struct STACKFM *INDEX;
};
};
};
struct DATAFM {
union {
struct {
struct VARFM V;
int VARNO;
struct VARFM *FV;
union {
struct {
int BIAS;
};
struct {
unsigned char REG;
unsigned char LABEL;
};
};
struct STACKFM *PARAMS;
struct STACKFM *RECORD;
union {
struct {
int OPER;
struct STACKFM *LINK;
};
struct {
struct OLFM OPLINK;
};
};
union {
struct {
int XSIZE;
struct STACKFM *INDEX;
};
struct {
struct XFM X;
};
};
};
};
};
struct MEMBERFM {
union {
struct {
int CONST;
int ITEMS;
struct STACKFM *A;
struct STACKFM *B;
struct MEMBERFM *LINK;
};
};
};
const struct MEMBERFM *MEMBERFMTYPE = 0;
struct STACKFM {
union {
struct {
struct VARFM V;
};
struct {
struct DATAFM DATA;
};
struct {
int FLAGS;
unsigned char BASE;
unsigned char PRIM;
unsigned char TYPE;
unsigned char FORM;
union {
struct {
double RVAL;
};
struct {
int RHIGH;
int RLOW;
};
struct {
union {
struct {
int DISP;
union {
struct {
int EXTRA;
};
struct {
struct AFM *ADATA;
};
};
};
};
union {
struct {
int FORMAT;
};
struct {
int SCALE;
};
};
int AREA;
int VARNO;
union {
struct {
struct VARFM *FV;
};
struct {
struct MEMBERFM *MEMBERS;
};
};
union {
struct {
int BIAS;
};
struct {
unsigned char REG;
unsigned char LABEL;
};
};
struct STACKFM *PARAMS;
struct STACKFM *RECORD;
union {
struct {
int OPER;
struct STACKFM *LINK;
};
struct {
struct OLFM OPLINK;
};
};
union {
struct {
int XSIZE;
struct STACKFM *INDEX;
};
struct {
struct XFM X;
};
};
};
};
struct STACKFM *USING;
struct STACKFM *STACK;
};
};
};
const struct STACKFM *STACKFMTYPE = 0;
struct WITHFM {
union {
struct {
int KEY;
struct DATAFM DATA;
struct WITHFM *LINK;
};
};
};
const struct WITHFM *WITHFMTYPE = 0;
struct WORKFM {
union {
struct {
int SIZE;
int DISPLACEMENT;
int VALIDITY;
};
};
};
struct WORKVFM {
union {
struct {
struct WORKVFM *LINK;
struct WORKFM W[31];
};
};
};
const struct WORKVFM *WORKVFMTYPE = 0;
struct WORKVFM WORKLIST;
WORKLIST = 0;
int WORKVALIDITY;
WORKVALIDITY = 1;
int LASTWORK;
LASTWORK = -1;
struct FORFM {
union {
struct {
unsigned char LABEL;
unsigned char ENTRY;
unsigned char REG;
unsigned char CC;
int TYPE;
int AS;
struct DATAFM CONTROL;
struct DATAFM FINAL;
struct FORFM *LINK;
};
};
};
const struct FORFM *FORFMTYPE = 0;
static struct FORFM *FORS = 0;
static struct STACKFM *STACK = 0;
static struct STACKFM *USING = 0;
static struct STACKFM *DASL = 0;
struct VALUEFM {
union {
struct {
double REAL;
};
struct {
int INTEGER;
};
struct {
_imp_string255 STRING;
};
struct {
unsigned char FILL[256];
};
};
};
static struct VALUEFM VALUE = 0;
static struct VALUEFM DEFAULTVALUE = 0;
const _imp_string4 OPERID[29] = {
_imp_str_literal("not "), _imp_str_literal("neg "), _imp_str_literal("abs "), _imp_str_literal("add "),
_imp_str_literal("sub "), _imp_str_literal("mul "), _imp_str_literal("div "), _imp_str_literal("exp "),
_imp_str_literal("and "), _imp_str_literal("or "), _imp_str_literal("xor "), _imp_str_literal("bic "),
_imp_str_literal("rot "), _imp_str_literal("lsh "), _imp_str_literal("rsh "), _imp_str_literal("rem "),
_imp_str_literal("mod "), _imp_str_literal("ext "), _imp_str_literal("mulh"), _imp_str_literal("udiv"),
_imp_str_literal("urem"), _imp_str_literal("conc"), _imp_str_literal("negr"), _imp_str_literal("absr"),
_imp_str_literal("addr"), _imp_str_literal("subr"), _imp_str_literal("mulr"), _imp_str_literal("divr"),
_imp_str_literal("expr")};
const short int OPERFLAGS[29] = {40, 40, 32, 589, 588, 769, 640, 642, 781, 781, 781, 780, 640, 648, 648,
128, 128, 128, 128, 128, 128, 128, 168, 160, 129, 128, 129, 128, 130};
const int EASYOP[9] = {8388608, 4194304, 0, 0, 0, 0, 25165824, 2097152, 29360128};
const int NULLVALUE[12] = {0, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0};
const unsigned char REVERSE[10] = {0, 1, 4, 5, 2, 3, 6, 7, 8, 9};
const unsigned char NEGATED[10] = {7, 6, 5, 4, 3, 2, 1, 0, 9, 8};
int J;
int NN;
static int CODE = 0;
static int PENDING = 0;
static int PENDINGTAG = 0;
static int PENDINGLIT = 0;
static int PENDINGAUTON = 0;
static int PENDINGAUTO = 0;
static int PENDINGAUTOCA = 0;
static int LANGUAGEFLAGS = 0;
static int STACKCHECK = 0;
static int FALIGN = 0;
static int INVERT = 0;
static int UNSIGNED = 0;
static int FREELABEL;
struct KNOWFM {
union {
struct {
unsigned char FTYPE;
unsigned char REG;
unsigned char BASE;
unsigned char OPER;
int DISP;
int AREA;
int OPND;
int EXTRA;
struct KNOWFM *LINK;
};
};
};
const struct KNOWFM *KNOWFMTYPE = 0;
struct LABELFM {
union {
struct {
int LAB;
struct KNOWFM *ENV;
};
};
};
struct ILABELFM {
union {
struct {
struct ILABELFM *LINK;
struct LABELFM LAB[256];
};
};
};
const struct ILABELFM *ILABELFMTYPE = 0;
struct ILABELFM *ILABELLIST;
ILABELLIST = NIL;
struct ILABELPFM {
union {
struct {
struct ILABELFM *LABEL;
};
};
};
struct ILABELPFM ILABELS[((unsigned int)8191 >> 8) + 1];
static struct KNOWFM *KNOWING = 0;
static struct KNOWFM *KASL = 0;
static int KTIMES[27] = {[0 ... 26] = 0};
static int USEDTIME = 0;
static int USED[27] = {[0 ... 26] = 0};
static int ACTIVITY[27] = {[0 ... 26] = 0};
static int ACTIVEREGISTERS = 0;
int PENDINGKNOWNREGISTER;
PENDINGKNOWNREGISTER = 0;
struct STACKFM PENDINGKNOWN;
static _imp_string127 ALIAS = _imp_str_literal("");
static _imp_string127 INTERNALID = _imp_str_literal("");
static _imp_string127 EXTERNALID = _imp_str_literal("");
static _imp_string127 SECTIONID = _imp_str_literal("");
static int DECLSIZE;
static int VLB;
static int VUB;
static int OSTATE;
static int OWNTYPE;
static int OWNFORM;
static int OWNEXTRA;
static int CONSTANTTYPE;
static int INITFLAG = 0;
struct VARFM *DEFV;
struct VARFM ALTV;
static int PARMS;
static int SECTION = 0;
static int CONTROL = 0;
static int UNASSIGNED = 0;
static int COMPILINGPRIM = 0;
const _imp_string6 FORMID[6] = {_imp_str_literal("addr"), _imp_str_literal("value"), _imp_str_literal("()+"),
_imp_str_literal("-()"), _imp_str_literal("proc"), _imp_str_literal("label")};
static int ENTERPROC = 0;
const int CORRUPTS[56] = {0, 1, 4607, 0, 47, 393217, 4095, 60, 126, 15, 9, 0, 7, 15,
0, 0, 2287, 135, 0, 25, 0, 0, 4095, 77, 25, 0, 0, 58,
2559, 2559, 2559, 2559, 0, 0, 58, 0, 3, 63, 0, 31, 262145, 62,
511, 255, 8189, 56, 1023, 1023, 15, 510, 2559, 393217, 131073, 0, 0, 6160};
const int PRIMPARAMETER[56] = {0, 6, 7966, 2, 6, 131073, 0, 12, 6, 7, 6, 0, 7, 7,
0, 14, 2054, 4230, 0, 258, 0, 0, 0, 4172, 258, 0, 2, 259,
2304, 2304, 2304, 2304, 10, 0, 259, 10, 3, 6, 0, 7, 3, 6,
56, 472, 2, 7, 0, 0, 6, 1, 3, 131073, 131072, 0, 0, 16};
static int LASTDIR = 0;
static int REFS = 0;
static int BLOCKS = 0;
static int OWNBASE = 0;
static int MINSB = 0;
static int OWNARRAYBASE = 0;
static int CONSTANTBASE = 0;
static int CURRENTAREA = 0;
static int LASTAREA = 0;
static int EXTERNALNO = 0;
static int FRAMEUSE[18] = {[0 ... 17] = 0};
static int FMARK = 0;
struct STACKFM UAPAT;
struct STACKFM ZERO;
struct STACKFM ONE;
struct STACKFM SPV;
struct STACKFM REGV[27];
struct VARFM *FORRANGE;
FORRANGE = NIL;
struct STACKFM C255;
C255 = 0;
C255.DISP = 255;
C255.TYPE = 1;
static int JAMIT = 0;
static int ENTRYPOINT = -1;
static int DANGERLEVEL = 32767;
_imp_string127 INCLUDEFILE;
INCLUDEFILE = _imp_str_literal("");
int DTYPE;
struct QFM {
union {
struct {
int TYPE;
int SIZE;
int ROUND;
int BIAS;
int DIM;
int FORMAT;
int DIAGS;
int DTYPE;
int DFORM;
int IND;
struct QFM *POINTED;
};
};
};
struct DIAGFM {
union {
struct {
struct DIAGFM *LINK;
struct VARFM *VAR;
int X;
int XTYPE;
int FORMAT;
int EXT;
_imp_string127 ID;
};
};
};
const struct DIAGFM *DIAGFMTYPE = 0;
struct DIAGFM *DIAGLIST;
DIAGLIST = NIL;
static short int DISPLAYVECTOR[18] = {[0 ... 17] = 0};
static int CP = 0;
unsigned char CODEBUFFER[256];
struct VVFM {
union {
struct {
struct VVFM *LINK;
struct VARFM V[64];
};
};
};
const struct VVFM *VVFMTYPE = 0;
struct VVFM *VARLIST;
VARLIST = NIL;
struct PVFM {
union {
struct {
struct VVFM *P;
};
};
};
struct PVFM PVAR[32];
struct VARFM *VAR(int A) {
struct VVFM *V;
struct PVFM *X;
X = &PVAR[(unsigned int)A >> 6];
if (X->P != NIL) goto L_0001;
V = _imp_NEW(VVFMTYPE);
V->LINK = VARLIST;
VARLIST = V;
X->P = V;
L_0001:;
return &X->PX->P;
} /* VAR */
void FLUSHCODE(void) {
int J;
if (CP != 0) goto L_0002;
return;
L_0002:;
_imp_PRINTSYMBOL(31);
DUMPENCODED(CP);
J = 0; /*%for J = 1, 1, CP %cycle*/
L_0003:
if (J == CP) goto L_0004;
J += 1;
_imp_PRINTSYMBOL(CODEBUFFER[J]);
goto L_0003;
L_0004:;
CP = 0;
} /* FLUSHCODE */
void ASSEMBLE(struct VARFM * AVAR, int AMODE, int VARS, int LOCAL, int PARAMETERLIST, int *GLOBALATTRIBUTES) {
auto void NOTINYET(void);
auto void FAIL(_imp_string63 WHY);
auto void WARN(int FAULT, _imp_string63 WHAT);
auto void DISPLAY(struct STACKFM * V, int BIAS);
auto void MONITOR(struct STACKFM * V, _imp_string127 TEXT);
auto int ICONST(struct STACKFM * V);
auto int ICONSTITEM(struct STACKFM * V);
auto int CONST(struct STACKFM * V);
auto int SAME(struct STACKFM * A, struct STACKFM * B);
auto int INREG(struct STACKFM * V);
auto int FLOATING(struct STACKFM * V);
auto int POWER(int N);
auto int ITEMSIZE(int F);
auto struct STACKFM *REGISTER(int REG);
auto void CLAIM(int REGISTER);
auto void RELEASE(int REGISTER);
auto void RELEASEANDDROP(struct STACKFM * V);
auto void ZAPINDEXANDRECORD(struct STACKFM * V);
auto void RELEASEANDDROPPAIR(struct STACKFM * A, struct STACKFM * B);
auto void HAZARD(int REG);
auto void PESSIMISE(struct STACKFM * V);
auto void FORGET(int REGISTER);
auto void FORGETDESTINATION(struct STACKFM * V);
auto void FORGETEVERYTHING(void);
auto void REMEMBER(int REGISTER, struct STACKFM *V);
auto void REMEMBERZERO(int REGISTER);
auto void OPTIMISE(struct STACKFM * V, int SWANTED);
auto void SIMPLIFY(struct STACKFM * V);
auto void AMAP(struct STACKFM * V);
auto void VMAP(struct STACKFM * V, int NEWTYPE);
auto void MAKEAUTOI(struct STACKFM * V, int TYPE);
auto void ADVANCE(struct STACKFM * V, int TYPE, int BY);
auto void LOAD(struct STACKFM * V, int R);
auto void LOADUP(struct STACKFM * FROM);
auto void LOADADDRESS(struct STACKFM * V, int R);
auto void LOADUPADDRESS(struct STACKFM * V);
auto void LOADPAIR(struct STACKFM * A, int AR, struct STACKFM *B, int BR);
auto void LOADTRIO(struct STACKFM * A, int AR, struct STACKFM *B, int BR, struct STACKFM *C, int CR);
auto void POPSTACK(int BYTES);
auto void LOADPROTECTED(struct STACKFM * V);
auto void MOVE(struct STACKFM * FROM, struct STACKFM * TO);
auto void MOVELITERAL(int VALUE, struct STACKFM *TO);
auto void STORE(struct STACKFM * R, struct STACKFM * L);
auto void STOREADDRESS(struct STACKFM * R, struct STACKFM * L, int *EXTRA);
auto void OPERATE(int NEWOPER, struct STACKFM *LHS, struct STACKFM *RHS);
auto void COMPARE(struct STACKFM * LEFT, struct STACKFM * RIGHT);
auto int NEWLABEL(void);
auto void JUMPTO(int INTERNALLABEL, int CONDCODE);
auto void DEFINELABEL(int INTERNALLABEL);
auto void TESTZERO(struct STACKFM * V);
auto void TESTRANGE(struct STACKFM * S, struct VARFM * V);
auto void CLEARVARS(int LIMIT);
auto void DIRSTRING(int OP, _imp_string *S);
auto void FLOAT(struct STACKFM * V, int R);
auto void DUMPEXTERNAL(int CODE, struct VARFM *V);
auto void DO(_imp_string31 IDENT, int *EP, int RESULT);
auto int GPR(void);
auto int FPR(void);
auto int SELECTBEST(struct STACKFM * FROM, struct STACKFM * TO, int DEFAULT);
auto struct STACKFM *DESCRIPTOR(void);
auto struct STACKFM *TEMPORARY(void);
auto void DROP(struct STACKFM * V);
auto struct STACKFM *LOCALINTEGER(int DISP);
auto struct STACKFM *LITERAL(int N);
auto struct STACKFM *COPY(struct STACKFM * V);
auto int TAG(void);
auto int FOURBYTES(void);
auto void PRIM(int N);
auto void DUMPTEXT(int MAX);
auto void PASSPARAMETERS(struct STACKFM * V, int *EXTRA, int BASEREG);
auto void ASSIGN(int HOW);
auto void STRINGASSIGN(struct STACKFM * R, struct STACKFM * L);
auto void SETASSIGN(struct STACKFM * FROM, struct STACKFM * DEST);
auto void EVALUATESTRINGEXPRESSION(struct STACKFM * V);
auto void RECORDASSIGN(struct STACKFM * FROM, struct STACKFM * TO);
auto struct STACKFM *CLAIMWORKAREA(int BYTES, int TYPE);
auto void FLUSHDIAGS(void);
auto void CONVERTFORMAT(struct STACKFM * V, int TYPE);
auto void TOSHORTREAL(struct STACKFM * V);
auto void STOREREALCONSTANT(struct STACKFM * W);
auto void BUILDSET(struct STACKFM * S);
auto void DROPMEMBERS(struct STACKFM * S);
static int FRAME = 0;
static int ROUND = 0;
int AFRAME;
AFRAME = 0;
int PARAMETERFRAME;
PARAMETERFRAME = 0;
int PARAMETERREGS;
PARAMETERREGS = 0;
int STRINGRESULT;
STRINGRESULT = 0;
int BLOCKTYPE;
BLOCKTYPE = 0;
int CODEBASE;
CODEBASE = 0;
int UNCONDJUMP;
UNCONDJUMP = -1;
int D;
int N;
int PARAMETERMODE;
int VARBASE;
VARBASE = *VARS;
int FIRSTALT;
FIRSTALT = PARMS - 1;
int FRAMEBASE;
int OLDFRAME;
int ALTALIGN;
int FRAMEEXTRA;
int MAXFRAME;
int ASSIGNLOCK;
ASSIGNLOCK = 1;
int ATTRIBUTES;
ATTRIBUTES = 0;
int AT;
AT = 0;
int ENTRYMASK;
ENTRYMASK = 0;
int MYMARK;
int OPEN;
OPEN = 2048;
int EVENTLABEL;
EVENTLABEL = 0;
int EVENTBODY;
EVENTBODY = 0;
int EVENTBITS;
EVENTBITS = 0;
int WSPSAVE;
WSPSAVE = 0;
int DANGERMARKER;
DANGERMARKER = 0;
int LOCALDISPLAY;
LOCALDISPLAY = 0;
int JLAB;
int ARRAYBASE;
ARRAYBASE = 0;
int WORKBASE;
WORKBASE = LASTWORK;
int *CA;
CA = &CODEBASE;
_imp_string127 PROCID;
PROCID = INTERNALID;
struct WITHFM *WITHS;
WITHS = NIL;
const _imp_string255 MONITORID = _imp_str_literal("3L___monitor");
static int MONITOREP = 0;
void DECODE(int WORD, int AT) {
extern void D(int W, int A) __asm__("DECODE_ARM");
_imp_SELECTOUTPUT(0);
D(*WORD, AT);
_imp_SELECTOUTPUT(2);
} /* DECODE */
struct STACKFM *DISPLAYINFO(int BASE) {
int N;
struct STACKFM *T;
if (BASE >= DANGERLEVEL) goto L_0006;
FRAMEUSE[BASE - 128] = 0;
N = DISPLAYVECTOR[BASE - 128];
if (N != 0) goto L_0007;
MINSB = MINSB - 4;
N = MINSB;
DISPLAYVECTOR[BASE - 128] = N;
L_0007:;
T = LITERAL(N);
T->FORM = 1;
T->BASE = 10;
goto L_0008;
L_0006:;
T = LOCALINTEGER(LOCALDISPLAY + 4 * (BASE - DANGERLEVEL));
L_0008:;
ATTRIBUTES = ATTRIBUTES | 1 | 4;
T->FLAGS = T->FLAGS | 128;
return T;
} /* DISPLAYINFO */
void BD(int BASE, int DISP) {
_imp_WRITE(*DISP, 1);
_imp_PRINTSYMBOL(40);
if (0 > BASE) goto L_0009;
if (BASE > 26) goto L_0009;
_imp_PRINTSTRING(REGID[BASE]);
goto L_000A;
L_0009:;
if (BASE < 128) goto L_000B;
if (BASE != *LOCAL) goto L_000C;
_imp_PRINTSTRING(_imp_str_literal("Fp"));
goto L_000D;
L_000C:;
_imp_PRINTSYMBOL(76);
BASE = BASE - 128 - 1;
_imp_WRITE(BASE, 0);
L_000D:;
goto L_000E;
L_000B:;
_imp_WRITE(BASE, 0);
L_000E:;
L_000A:;
_imp_PRINTSYMBOL(41);
} /* BD */
void SHOW(int N, _imp_string15 TEXT) {
if (*N == 0) goto L_000F;
_imp_SPACE();
_imp_PRINTSTRING(TEXT);
_imp_WRITE(*N, 1);
L_000F:;
} /* SHOW */
void SHOWDATA(struct STACKFM * V, int LEFT) {
_imp_SPACES(LEFT);
_imp_PRINTSTRING(TYPEID[V]);
_imp_SPACE();
_imp_PRINTSTRING(FORMID[V]);
BD(V, V);
SHOW(V, _imp_str_literal("Fm:"));
SHOW(V, _imp_str_literal("A:"));
SHOW(V, _imp_str_literal("Fl:"));
if (V & 1 == 0) goto L_0010;
_imp_PRINTSYMBOL(82);
L_0010:;
if (V & 2 == 0) goto L_0011;
_imp_PRINTSYMBOL(65);
L_0011:;
if (V & 64 == 0) goto L_0012;
_imp_PRINTSYMBOL(78);
L_0012:;
if (V & 4 == 0) goto L_0013;
_imp_PRINTSYMBOL(80);
L_0013:;
if (V & 8 == 0) goto L_0014;
_imp_PRINTSYMBOL(68);
L_0014:;
if (V & 131072 == 0) goto L_0015;
_imp_PRINTSYMBOL(87);
L_0015:;
if (V & 32 == 0) goto L_0016;
_imp_PRINTSYMBOL(83);
L_0016:;
if (V & 128 == 0) goto L_0017;
_imp_PRINTSYMBOL(61);
L_0017:;
if (V & 16 == 0) goto L_0018;
_imp_PRINTSYMBOL(72);
L_0018:;
if (V & 1024 == 0) goto L_0019;
_imp_PRINTSYMBOL(88);
L_0019:;
if (V & 65536 == 0) goto L_001A;
_imp_PRINTSYMBOL(110);
L_001A:;
if (V & 1048576 == 0) goto L_001B;
_imp_PRINTSYMBOL(67);
L_001B:;
if (V == 0) goto L_001C;
_imp_PRINTSYMBOL(35);
_imp_WRITE(V, 0);
L_001C:;
if (&V == NIL) goto L_001D;
_imp_NEWLINE();
_imp_SPACES(LEFT);
_imp_PRINTSTRING(_imp_str_literal(" _:"));
DISPLAY(&V, LEFT + 4);
L_001D:;
if (&V == NIL) goto L_001E;
_imp_NEWLINE();
_imp_WRITE(V, LEFT + 2);
_imp_PRINTSTRING(_imp_str_literal("i:"));
DISPLAY(&V, LEFT + 4);
L_001E:;
} /* SHOWDATA */
void DISPLAY(struct STACKFM * V, int BIAS) {
if (&V != NIL) goto L_001F;
_imp_PRINTSTRING(_imp_str_literal(" Nil"));
_imp_NEWLINE();
return;
L_001F:;
SHOWDATA(&V, BIAS);
_imp_NEWLINE();
if (V == 0) goto L_0020;
_imp_SPACES(BIAS - 4);
_imp_PRINTSTRING(OPERID[V - 1]);
DISPLAY(&V, BIAS + 4);
L_0020:;
} /* DISPLAY */
void SHOWREG(int R) {
int A;
A = ACTIVITY[R];
_imp_PRINTSTRING(REGID[R]);
if (A != 0) goto L_0021;
_imp_PRINTSTRING(_imp_str_literal(" unused"));
goto L_0022;
L_0021:;
if (A >= 0) goto L_0023;
if (A != -1) goto L_0024;
_imp_PRINTSTRING(_imp_str_literal(" locked"));
goto L_0025;
L_0024:;
_imp_PRINTSTRING(_imp_str_literal(" ="));
_imp_PRINTSTRING(REGID[-A]);
_imp_SPACES(2);
L_0025:;
goto L_0022;
L_0023:;
_imp_PRINTSTRING(_imp_str_literal(" used*"));
_imp_WRITE(A, -1);
L_0022:;
_imp_PRINTSTRING(_imp_str_literal(" u:"));
PRINTHEX(USED[R], 5);
_imp_PRINTSTRING(_imp_str_literal(" k:"));
_imp_WRITE(KTIMES[R], 0);
_imp_NEWLINE();
} /* SHOWREG */
void MONITORN(int N, _imp_string255 TEXT) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(TEXT);
_imp_WRITE(N, 8);
_imp_NEWLINE();
_imp_SELECTOUTPUT(2);
} /* MONITORN */
void MONITORREGISTER(int R, _imp_string127 TEXT) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(TEXT);
_imp_SPACES(9 - *_imp_LENGTH(&TEXT));
_imp_SPACE();
SHOWREG(R);
_imp_SELECTOUTPUT(2);
} /* MONITORREGISTER */
void MONITOR(struct STACKFM * V, _imp_string127 TEXT) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(TEXT);
_imp_SPACES(9 - *_imp_LENGTH(&TEXT));
_imp_SPACE();
DISPLAY(&V, 6);
_imp_SELECTOUTPUT(2);
} /* MONITOR */
void MONREGID(int R, _imp_string127 TEXT) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(REGID[R]);
_imp_SPACE();
_imp_PRINTSTRING(TEXT);
_imp_NEWLINE();
_imp_SELECTOUTPUT(2);
} /* MONREGID */
void DISPLAYKNOWLEDGE(void) {
struct KNOWFM *K;
_imp_SELECTOUTPUT(0);
K = KNOWING;
L_0026:;
if (K == NIL) goto L_0027;
_imp_PRINTSTRING(REGID[K->REG]);
_imp_PRINTSTRING(_imp_str_literal(" = "));
_imp_PRINTSTRING(TYPEID[(unsigned int)K->FTYPE >> 4]);
_imp_SPACE();
_imp_PRINTSTRING(FORMID[K->FTYPE & 15]);
_imp_SPACE();
BD(K->BASE, K->DISP);
if (K->EXTRA == 0) goto L_0028;
_imp_PRINTSTRING(_imp_str_literal(" X:"));
_imp_WRITE(K->EXTRA, 1);
L_0028:;
if (K->AREA == 0) goto L_0029;
_imp_PRINTSTRING(_imp_str_literal(" A:"));
_imp_WRITE(K->AREA, 1);
L_0029:;
if (K->OPER == 0) goto L_002A;
_imp_SPACE();
_imp_PRINTSTRING(OPERID[K->OPER - 1]);
_imp_WRITE(K->OPND, 1);
L_002A:;
_imp_NEWLINE();
K = K->LINK;
goto L_0026;
L_0027:;
_imp_SELECTOUTPUT(2);
} /* DISPLAYKNOWLEDGE */
void SHOWWHERE(void) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(_imp_str_literal(" at line "));
_imp_WRITE(CURRENTLINE, 0);
if (_imp_strcmp(INCLUDEFILE, _imp_str_literal("")) == 0) goto L_002B;
_imp_PRINTSTRING(_imp_join((_imp_string)(_imp_str_literal(" in file ")), (_imp_string)(INCLUDEFILE)));
L_002B:;
_imp_NEWLINE();
} /* SHOWWHERE */
void FAIL(_imp_string63 WHY) {
void PCODE(int S) {
if (S < 128) goto L_002C;
_imp_PRINTSTRING(_imp_str_literal("128+"));
S = S - 128;
L_002C:;
if (32 > S) goto L_002D;
if (S > 126) goto L_002D;
_imp_PRINTSYMBOL(39);
_imp_PRINTSYMBOL(S);
_imp_PRINTSYMBOL(39);
L_002D:;
_imp_WRITE(S, 3);
} /* PCODE */
void ERR(int STREAM) {
int R;
struct STACKFM *U;
struct STACKFM *S;
_imp_SELECTOUTPUT(STREAM);
_imp_NEWLINE();
_imp_PRINTSTRING(_imp_str_literal("====> Pass 2 fails -- "));
_imp_PRINTSTRING(WHY);
SHOWWHERE();
_imp_PRINTSTRING(_imp_str_literal("Code "));
PCODE(CODE);
_imp_PRINTSTRING(_imp_str_literal(" Pending "));
PCODE(PENDING);
_imp_NEWLINE();
R = 0; /*%for R = 1, 1, 16 %cycle*/
L_002E:
if (R == 16) goto L_002F;
R += 1;
if (ACTIVITY[R] <= 0) goto L_0030;
SHOWREG(R);
L_0030:;
goto L_002E;
L_002F:;
S = STACK;
L_0031:;
if (S == NIL) goto L_0032;
_imp_PRINTSTRING(_imp_str_literal("S:"));
DISPLAY(S, 5);
S = S->STACK;
goto L_0031;
L_0032:;
U = USING;
L_0033:;
if (U == NIL) goto L_0034;
_imp_PRINTSTRING(_imp_str_literal("U:"));
DISPLAY(U, 5);
U = U->USING;
goto L_0033;
L_0034:;
_imp_NEWLINE();
/*_imp_monitor(__LINE__, __FILE__, PRETTY_FUNCTION);*/
} /* ERR */
ERR(0);
ERR(7);
_imp_stop(0);
} /* FAIL */
void WARN(int FAULT, _imp_string63 WHAT) {
_imp_SELECTOUTPUT(0);
INTERFACE->FAULTS = INTERFACE->FAULTS + FAULT;
if (FAULT != 0) goto L_0035;
_imp_PRINTSTRING(_imp_str_literal("Warning: "));
goto L_0036;
L_0035:;
_imp_PRINTSTRING(_imp_str_literal("*Error: "));
L_0036:;
_imp_PRINTSTRING(WHAT);
SHOWWHERE();
_imp_SELECTOUTPUT(2);
} /* WARN */
void NOTINYET(void) { FAIL(_imp_str_literal("***Not implemented yet***")); } /* NOTINYET */
void DIR1(int CODE) {
FLUSHCODE();
_imp_PRINTSYMBOL(CODE);
PENDINGAUTO = 0;
} /* DIR1 */
void DIR2(int CODE, int ARG1) {
FLUSHCODE();
_imp_PRINTSYMBOL(CODE);
DUMPENCODED(ARG1);
if (CODE == 3) goto L_0037;
PENDINGAUTO = 0;
L_0037:;
} /* DIR2 */
void DIR3(int CODE, int ARG1, int ARG2) {
FLUSHCODE();
_imp_PRINTSYMBOL(CODE);
DUMPENCODED(ARG1);
DUMPENCODED(*ARG2);
PENDINGAUTO = 0;
} /* DIR3 */
void DIR4(int CODE, int ARG1, int ARG2, int ARG3) {
FLUSHCODE();
_imp_PRINTSYMBOL(CODE);
DUMPENCODED(*ARG1);
DUMPENCODED(*ARG2);
DUMPENCODED(ARG3);
PENDINGAUTO = 0;
} /* DIR4 */
struct WORKFM *WORKAREA(int N) {
struct WORKVFM *W;
int E;
int S;
int X;
if (!_imp_on_event(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) goto L_0038;
E = _imp_EVENT().EVENT;
S = _imp_EVENT().SUB;
X = 0;
FAIL(_imp_join((_imp_string)(_imp_str_literal("too many work areas:")), (_imp_string)(_imp_ITOS(E, 0))));
L_0038:;
if (DIAG & 8 == 0) goto L_0039;
MONITORN(*N, _imp_str_literal("work area"));
L_0039:;
W = &WORKLIST;
L_003A:;
if (*N <= 30) goto L_003B;
*N = *N - 30;
if (W->LINK != NIL) goto L_003C;
W->LINK = _imp_NEW(WORKVFMTYPE);
*W->LINK = 0;
L_003C:;
W = W->LINK;
goto L_003A;
L_003B:;
return &W->WW->W;
} /* WORKAREA */
struct LABELFM *ILABEL(int N) {
int X;
int J;
struct ILABELFM *I;
struct LABELFM *L;
if (*N <= 8191) goto L_003D;
FAIL(_imp_str_literal("internal label/1"));
L_003D:;
X = (unsigned int)*N >> 8;
I = ILABELS[X].LABEL;
if (I != NIL) goto L_003E;
I = _imp_NEW(ILABELFMTYPE);
ILABELS[X].LABEL = I;
I->LINK = ILABELLIST;
ILABELLIST = I;
J = -1; /*%for J = 0, 1, 255 %cycle*/
L_003F:
if (J == 255) goto L_0040;
J += 1;
L = &I->LABI->LAB;
L->LAB = -2147483648;
L->ENV = NIL;
goto L_003F;
L_0040:;
L_003E:;
return &I->LABI->LAB;
} /* ILABEL */
void SELECTAREA(int AREAID, int *BASE) {
DIR3(27, (unsigned int)AREAID >> 8, BASE);
CURRENTAREA = AREAID;
CA = &BASE;
} /* SELECTAREA */
void SELECTCODEAREA(void) { SELECTAREA(0, &CODEBASE); } /* SELECTCODEAREA */
void SELECTCONSTANTAREA(void) { SELECTAREA(512, &CONSTANTBASE); } /* SELECTCONSTANTAREA */
void SELECTOWNAREA(void) { SELECTAREA(256, &OWNBASE); } /* SELECTOWNAREA */
void SELECTOWNARRAYAREA(void) { SELECTAREA(768, &OWNARRAYBASE); } /* SELECTOWNARRAYAREA */
void DUMPBYTE(int B) {
_imp_PRINTSYMBOL(31);
_imp_PRINTSYMBOL(1);
_imp_PRINTSYMBOL(B & 255);
*CA = *CA + 1;
} /* DUMPBYTE */
void DUMPHALF(int H) {
_imp_PRINTSYMBOL(31);
_imp_PRINTSYMBOL(2);
_imp_PRINTSYMBOL(H & 255);
_imp_PRINTSYMBOL((unsigned int)H >> 8 & 255);
*CA = *CA + 2;
} /* DUMPHALF */
void DUMPWORD(int N) {
_imp_PRINTSYMBOL(31);
_imp_PRINTSYMBOL(4);
_imp_PRINTSYMBOL(N & 255);
_imp_PRINTSYMBOL((unsigned int)N >> 8 & 255);
_imp_PRINTSYMBOL((unsigned int)N >> 16 & 255);
_imp_PRINTSYMBOL((unsigned int)N >> 24);
if (DIAG & 1 == 0) goto L_0042;
if (CURRENTAREA != 0) goto L_0042;
DECODE(*CA, N);
L_0042:;
*CA = *CA + 4;
} /* DUMPWORD */
int ACTUALREGISTER(int BASE) {
struct STACKFM *T;
if (BASE < 128) goto L_0043;
if (BASE != *LOCAL) goto L_0044;
BASE = 11;
goto L_0045;
L_0044:;
if (BASE <= 128) goto L_0046;
T = DISPLAYINFO(BASE);
LOADUP(T);
BASE = T->BASE;
RELEASEANDDROP(T);
L_0046:;
L_0045:;
L_0043:;
return ACTUAL[BASE];
} /* ACTUALREGISTER */
int JUST(int R) { return ACTUALREGISTER(*R); } /* JUST */
int NOTHING(void) { return 33554432; } /* NOTHING */
int IMMEDIATE(int N) {
int ROT;
ROT = 16;
if (N == 0) goto L_0047;
L_0048:;
if (N & 3 != 0) goto L_0049;
ROT = ROT - 1;
N = (unsigned int)N >> 2;
goto L_0048;
L_0049:;
if ((unsigned int)N >> 8 == 0) goto L_004A;
return -1;
L_004A:;
L_0047:;
return (ROT & 15) << 8 | N | 33554432;
} /* IMMEDIATE */
int ISHIFT(int RM, int BY, int HOW) {
if (HOW & 128 == 0) goto L_004B;
FAIL(_imp_str_literal("Bad immediate shift"));
L_004B:;
return ACTUALREGISTER(RM) | (BY & 31) << 3 + 4 | HOW;
} /* ISHIFT */
int RSHIFT(int RM, int RS, int HOW) {
if (HOW & 128 != 0) goto L_004C;
FAIL(_imp_str_literal("Bad register shift"));
L_004C:;
return ACTUALREGISTER(RM) | ACTUALREGISTER(RS) << 4 + 4 | HOW & 112;
} /* RSHIFT */
int ROT(int N, int BY) { return N & 255 | BY << 8 | 33554432; } /* ROT */
static int PENDINGPOP = 0;
void PLANT1(int FN, int RN, int RD, int X) {
DUMPWORD(FN ^ -536870912 | ACTUALREGISTER(RN) << 16 | ACTUALREGISTER(RD) << 12 | X);
if ((unsigned int)FN >> 23 & 3 == 2) goto L_004D;
FORGET(RD);
L_004D:;
} /* PLANT1 */
void PLANT2(int FN, int RD, struct STACKFM *V) {
int N;
int SHIFT;
int SIGN;
int D;
int P;
int BASE;
int VBASE;
int EXTRA;
EXTRA = 0;
struct STACKFM *W;
if (V != 4) goto L_004E;
FN = FN | 4194304;
L_004E:;
SIMPLIFY(&V);
D = V;
if (V != 2) goto L_004F;
D = TYPESIZE[V];
FN = FN | 16777216;
goto L_0050;
L_004F:;
if (V != 3) goto L_0051;
D = -TYPESIZE[V];
FN = FN | 2097152;
goto L_0050;
L_0051:;
if (V == 1) goto L_0052;
FAIL(_imp_str_literal("illegal load/store"));
L_0052:;
L_0050:;
if (&V != NIL) goto L_0053;
if (-4095 > D) goto L_0041;
if (D <= 4095) goto L_0054;
L_0041:;
FAIL(_imp_str_literal("Bad displacement"));
L_0054:;
if (D < 0) goto L_0055;
FN = FN | 8388608;
goto L_0056;
L_0055:;
D = -D;
L_0056:;
FN = FN | D;
if (D != 0) goto L_0057;
PENDINGAUTON = 0;
PENDINGAUTO = V;
PENDINGAUTOCA = *CA;
L_0057:;
goto L_0058;
L_0053:;
if (D == 0) goto L_0059;
FAIL(_imp_str_literal("Bad index displacement"));
L_0059:;
N = V;
if (N != 0) goto L_005A;
FAIL(_imp_str_literal("Zero Xsize"));
L_005A:;
P = POWER(N);
if (P < 0) goto L_005B;
LOADUP(&V);
goto L_005C;
L_005B:;
P = 0;
SIGN = N & -2147483648;
L_005D:;
if (N & 1 != 0) goto L_005E;
P = P + 1;
N = (unsigned int)N >> 1 | SIGN;
goto L_005D;
L_005E:;
OPERATE(6, &V, LITERAL(N));
V = 1;
LOADUP(&V);
L_005C:;
FN = FN | 8388608 | 33554432 | ISHIFT(V, P, 0);
L_0058:;
if (V != 0) goto L_005F;
if (&V != NIL) goto L_0060;
if (V >= 0) goto L_0061;
LOADUP(&V);
FN = FN | ACTUALREGISTER(V) << 16;
goto L_0062;
L_0061:;
FAIL(_imp_str_literal("No absolute yet"));
L_0062:;
goto L_0063;
L_0060:;
LOADUP(&V);
V = V;
DROP(&V);
V = NIL;
FN = FN | ACTUALREGISTER(V) << 16;
L_0063:;
goto L_0064;
L_005F:;
FN = FN | ACTUALREGISTER(V) << 16;
L_0064:;
if (FN & (16777216 | 2097152) == 0) goto L_0065;
FORGET(V);
L_0065:;
FN = FN ^ 16777216 | ACTUALREGISTER(RD) << 12;
DUMPWORD(FN ^ -536870912);
if (EXTRA == 0) goto L_0066;
RELEASE(EXTRA);
L_0066:;
if (FN & 1048576 == 0) goto L_0067;
FORGET(RD);
goto L_0068;
L_0067:;
FORGETDESTINATION(&V);
REMEMBER(RD, &V);
L_0068:;
} /* PLANT2 */
void PLANT3(int FN, int N) { DUMPWORD(FN ^ -536870912 | N & 16777215); } /* PLANT3 */
void PLANT4(int FN, int RN, int OPERAND) {
DUMPWORD(FN ^ -536870912 | ACTUALREGISTER(RN) << 16 | OPERAND & 65535);
if (FN & 2097152 == 0) goto L_0069;
FORGET(RN);
L_0069:;
} /* PLANT4 */
void PLANT5(int FN, int OFFSET) { DUMPWORD(FN ^ -536870912 | OFFSET & 16777215); } /* PLANT5 */
void PLANT6(int OP, int FD, struct STACKFM *V) {
int N;
int SHIFT;
int SIGN;
int D;
int P;
int BASE;
int VBASE;
struct STACKFM *W;
SIMPLIFY(&V);
D = V;
if (D & 3 == 0) goto L_006A;
FAIL(_imp_str_literal("Floating-point alignment"));
L_006A:;
D = ((long)D / (long)4);
if (V != 2) goto L_006B;
D = (unsigned int)TYPESIZE[V] >> 2;
OP = OP | 16777216;
goto L_006C;
L_006B:;
if (V != 3) goto L_006D;
D = -((unsigned int)TYPESIZE[V] >> 2);
OP = OP | 2097152;
goto L_006C;
L_006D:;
if (V == 1) goto L_006E;
FAIL(_imp_str_literal("illegal load/store"));
L_006E:;
L_006C:;
if (&V == NIL) goto L_006F;
if (-255 > D) goto L_0070;
if (D <= 255) goto L_0071;
L_0070:;
FAIL(_imp_str_literal("Fp Disp?"));
L_0071:;
W = COPY(&V);
LOADUPADDRESS(W);
W->TYPE = V;
W->FORM = 1;
PLANT6(OP, FD, W);
RELEASEANDDROP(W);
return;
L_006F:;
if (D < 0) goto L_0072;
OP = OP | 8388608;
goto L_0073;
L_0072:;
D = -D;
L_0073:;
OP = OP | D;
if (V != 0) goto L_0074;
if (&V != NIL) goto L_0075;
if (V >= 0) goto L_0076;
if (V == 1) goto L_0077;
FAIL(_imp_str_literal("Bad external"));
L_0077:;
LOADUP(&V);
OP = OP | ACTUALREGISTER(V) << 16;
goto L_0078;
L_0076:;
FAIL(_imp_str_literal("No absolute yet"));
L_0078:;
goto L_0079;
L_0075:;
LOADUP(&V);
V = V;
DROP(&V);
V = NIL;
OP = OP | ACTUALREGISTER(V) << 16;
L_0079:;
goto L_007A;
L_0074:;
OP = OP | ACTUALREGISTER(V) << 16;
L_007A:;
if (OP & (16777216 | 2097152) == 0) goto L_007B;
FORGET(V);
L_007B:;
OP = OP ^ 16777216 | ACTUALREGISTER(FD) << 12;
DUMPWORD(OP ^ -536870912);
if (OP & 1048576 == 0) goto L_007C;
FORGET(FD);
goto L_007D;
L_007C:;
FORGETDESTINATION(&V);
REMEMBER(FD, &V);
L_007D:;
} /* PLANT6 */
void PLANT7(int OP, int FN, int RD, int FM) {
if (OP & 8 != 0) goto L_007E;
FM = ACTUAL[FM];
L_007E:;
DUMPWORD(OP ^ -536870912 | ACTUAL[FN] << 16 | ACTUAL[RD] << 12 | FM);
if (OP & 1048576 != 0) goto L_007F;
FORGET(FN);
goto L_0080;
L_007F:;
FORGET(RD);
L_0080:;
} /* PLANT7 */
void PLANT8(int OP, int FN, int FM) {
if (OP & 8 != 0) goto L_0081;
FM = ACTUAL[FM];
L_0081:;
DUMPWORD(OP ^ -536870912 | ACTUAL[FN] << 16 | FM);
} /* PLANT8 */
void PLANT9(int OP, int FN, int FD, int FM) {
if (OP & 8 != 0) goto L_0082;
FM = ACTUAL[FM];
L_0082:;
DUMPWORD(OP ^ -536870912 | ACTUAL[FN] << 16 | ACTUAL[FD] << 12 | FM);
FORGET(FD);
} /* PLANT9 */
struct CONSTFM {
union {
struct {
int N;
int STORE;
int TYPE;
int V1;
int R1;
int V2;
int R2;
};
};
};
void TESTASSIGNED(void) {
DIR1(24);
*CA = *CA + 4;
REFS = REFS + 1;
} /* TESTASSIGNED */
void FLOAT(struct STACKFM * V, int R) {
int N;
double LONG;
if (R != 26) goto L_0083;
R = FPR();
L_0083:;
if (!(ICONST(&V))) goto L_0084;
if (0 > V) goto L_0085;
if (V <= 5) goto L_0086;
L_0085:;
if (V != 10) goto L_0087;
L_0086:;
N = V;
if (V != 10) goto L_0088;
N = 7;
L_0088:;
PLANT9(234914176 | 8, 0, R, N);
goto L_0089;
L_0087:;
if (-5 > V) goto L_008A;
if (V <= 0) goto L_008B;
L_008A:;
if (V != -10) goto L_008C;
L_008B:;
N = -V;
if (N != 10) goto L_008D;
N = 7;
L_008D:;
PLANT9(235962752 | 8, 0, R, N);
goto L_0089;
L_008C:;
LONG = V;
V = LONG;
CONVERTFORMAT(&V, 7);
STOREREALCONSTANT(&V);
DIR4(12, ACTUAL[R], V, 1);
FORGET(R);
REFS = REFS + 1;
*CA = *CA + 4;
L_0089:;
goto L_008E;
L_0084:;
LOADUP(&V);
PLANT7(235405584, R, V, 0);
RELEASE(V);
L_008E:;
V = 7;
V = 0;
V = R;
V = 0;
V = 0;
CLAIM(R);
} /* FLOAT */
void LOADSAFELY(struct STACKFM * V, int R) {
if (R != 17) goto L_008F;
LOADPROTECTED(&V);
goto L_0090;
L_008F:;
if (R != 26) goto L_0091;
if (FLOATING(&V)) goto L_0092;
FLOAT(&V, 26);
L_0092:;
LOADPROTECTED(&V);
goto L_0090;
L_0091:;
if (ACTIVITY[R] != 1) goto L_0093;
if (V == R) goto L_0094;
L_0093:;
HAZARD(R);
L_0094:;
LOAD(&V, R);
L_0090:;
} /* LOADSAFELY */
void CHARACTERISECONSTANT(int N, struct CONSTFM *C) {
int SH;
int V;
int S;
int X;
const unsigned char BITS[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
C = N;
V = N;
if (V != 0) goto L_0095;
C = 1;
return;
L_0095:;
if (V != -1) goto L_0096;
C = 2;
return;
L_0096:;
X = V;
S = 0;
L_0097:;
S = S + BITS[X & 15];
X = (unsigned int)X >> 4;
if (X == 0) goto L_0098;
goto L_0097;
L_0098:;
C = 3;
if (S <= 16) goto L_0099;
C = 4;
V = (~V);
L_0099:;
if (V == 0) goto L_009A;
SH = 16;
L_009B:;
if (V & 3 != 0) goto L_009C;
SH = SH - 1;
V = (unsigned int)V >> 2;
goto L_009B;
L_009C:;
C = SH & 15;
C = V & 255;
V = (unsigned int)V >> 8;
C = 0;
C = 0;
if (V == 0) goto L_009D;
SH = SH - 4;
L_009E:;
if (V & 3 != 0) goto L_009F;
SH = SH - 1;
V = (unsigned int)V >> 2;
goto L_009E;
L_009F:;
C = SH & 15;
C = V & 255;
V = (unsigned int)V >> 8;
L_009D:;
L_009A:;
if (V == 0) goto L_00A0;
C = 5;
L_00A0:;
} /* CHARACTERISECONSTANT */
void NOWINREGISTER(struct STACKFM * V, int R, int INHERIT) {
if (INHERIT == 0) goto L_00A1;
REMEMBER(R, &V);
L_00A1:;
if (&V == NIL) goto L_00A2;
RELEASEANDDROP(&V);
V = NIL;
L_00A2:;
if (&V == NIL) goto L_00A3;
RELEASEANDDROP(&V);
V = NIL;
L_00A3:;
RELEASE(V);
V = 0;
V = R;
V = 0;
V = RTYPE[R];
CLAIM(R);
} /* NOWINREGISTER */
void SIMPLELOAD(struct STACKFM * V, int R) {
struct STACKFM *W;
struct STACKFM *B1;
struct STACKFM *B2;
struct CONSTFM C;
int P;
int N;
int X;
int T;
int CHECK;
OPTIMISE(&V, 1);
if (!(INREG(&V))) goto L_00A4;
if (V == R) goto L_00A5;
if (R != 17) goto L_00A6;
if (V <= 17) goto L_00A5;
L_00A6:;
if (R != 26) goto L_00A7;
if (V < 18) goto L_00A7;
L_00A5:;
return;
L_00A7:;
L_00A4:;
if (R != 17) goto L_00A8;
R = GPR();
goto L_00A9;
L_00A8:;
if (R != 26) goto L_00AA;
R = FPR();
L_00AA:;
L_00A9:;
if (V != R) goto L_0005;
if (ACTIVITY[R] == 1) goto L_00AB;
L_0005:;
HAZARD(R);
L_00AB:;
SIMPLIFY(&V);
if (R < 18) goto L_00AC;
if (FLOATING(&V)) goto L_00AC;
FLOAT(&V, R);
return;
L_00AC:;
if (!(ICONST(&V))) goto L_00AD;
CHARACTERISECONSTANT(V, &C);
if (C.TYPE != 1) goto L_00AE;
PLANT1(27262976, 0, R, ROT(0, 0));
goto L_00AF;
L_00AE:;
if (C.TYPE != 2) goto L_00B0;
PLANT1(31457280, 0, R, ROT(0, 0));
goto L_00AF;
L_00B0:;
if (C.TYPE != 3) goto L_00B1;
PLANT1(27262976, 0, R, ROT(C.V1, C.R1));
if (C.V2 == 0) goto L_00B2;
PLANT1(25165824, R, R, ROT(C.V2, C.R2));
L_00B2:;
goto L_00AF;
L_00B1:;
if (C.TYPE != 4) goto L_00B3;
PLANT1(31457280, 0, R, ROT(C.V1, C.R1));
if (C.V2 == 0) goto L_00B4;
PLANT1(2097152, R, R, ROT(C.V2, C.R2));
L_00B4:;
goto L_00AF;
L_00B3:;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
W = LITERAL(CONSTANTBASE);
W->FORM = 1;
W->AREA = 512;
SELECTCONSTANTAREA();
DUMPWORD(C.N);
SELECTCODEAREA();
DIR3(11, ACTUAL[R], CONSTANTBASE - 4);
FORGET(R);
REFS = REFS + 1;
*CA = *CA + 4;
RELEASEANDDROP(W);
L_00AF:;
NOWINREGISTER(&V, R, 1);
goto L_00B5;
L_00AD:;
if (V != 0) goto L_00B6;
if (!(INREG(&V))) goto L_00B7;
if (V < 6) goto L_00B8;
PLANT9(234914176, 0, R, V);
goto L_00B9;
L_00B8:;
PLANT1(27262976, 0, R, JUST(V));
L_00B9:;
NOWINREGISTER(&V, R, 1);
return;
L_00B7:;
if (V < 6) goto L_00BA;
STOREREALCONSTANT(&V);
DIR4(12, ACTUAL[R], V, 1);
FORGET(R);
REFS = REFS + 1;
*CA = *CA + 4;
REMEMBER(R, &V);
NOWINREGISTER(&V, R, 1);
return;
L_00BA:;
if (V != 512) goto L_00BB;
DIR3(10, ACTUAL[R], V);
FORGET(R);
REFS = REFS + 1;
*CA = *CA + 4;
NOWINREGISTER(&V, R, 1);
return;
L_00BB:;
if (&V == NIL) goto L_00BC;
if (&V == NIL) goto L_00BD;
if (V != 0) goto L_00BD;
LOADUP(&V);
V = V;
DROP(&V);
V = NIL;
L_00BD:;
if (V != 0) goto L_00BE;
NOTINYET();
L_00BE:;
P = POWER(V);
if (P < 0) goto L_00BF;
LOADUP(&V);
PLANT1(8388608, V, R, ISHIFT(V, P, 0));
goto L_00C0;
L_00BF:;
OPERATE(6, &V, LITERAL(V));
LOADUP(&V);
V = 1;
PLANT1(8388608, V, R, JUST(V));
L_00C0:;
if (V <= 0) goto L_00C1;
CHARACTERISECONSTANT(V, &C);
if (C.TYPE != 3) goto L_00C2;
PLANT1(8388608, R, R, ROT(C.V1, C.R1));
if (C.V2 == 0) goto L_00C3;
PLANT1(8388608, R, R, ROT(C.V2, C.R2));
L_00C3:;
goto L_00C4;
L_00C2:;
if (C.TYPE != 5) goto L_00C5;
U_1000:;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
SELECTCONSTANTAREA();
DUMPWORD(V);
SELECTCODEAREA();
X = GPR();
DIR3(11, ACTUAL[X], CONSTANTBASE - 4);
FORGET(X);
REFS = REFS + 1;
*CA = *CA + 4;
PLANT1(8388608, V, R, JUST(X));
goto L_00C4;
L_00C5:;
FAIL(_imp_str_literal("Bad displacement"));
L_00C4:;
goto L_00C6;
L_00C1:;
if (V >= 0) goto L_00C7;
CHARACTERISECONSTANT(-V, &C);
if (C.TYPE != 3) goto L_00C8;
PLANT1(4194304, R, R, ROT(C.V1, C.R1));
if (C.V2 == 0) goto L_00C9;
PLANT1(4194304, R, R, ROT(C.V2, C.R2));
L_00C9:;
goto L_00CA;
L_00C8:;
if (C.TYPE != 5) goto L_00CB;
W = LITERAL(V);
W->FORM = 1;
W->BASE = 16;
LOADUP(W);
PLANT1(4194304, R, R, JUST(W->BASE));
RELEASEANDDROP(W);
goto L_00CA;
L_00CB:;
goto U_1000;
L_00CA:;
L_00C7:;
L_00C6:;
goto L_00CC;
L_00BC:;
N = V;
P = 8388608;
if (N >= 0) goto L_00CD;
N = -N;
P = 4194304;
L_00CD:;
CHARACTERISECONSTANT(N, &C);
if (C.TYPE != 1) goto L_00CE;
PLANT1(27262976, 0, R, JUST(V));
goto L_00CF;
L_00CE:;
if (C.TYPE != 3) goto L_00D0;
PLANT1(P, V, R, ROT(C.V1, C.R1));
if (C.V2 == 0) goto L_00D1;
PLANT1(P, R, R, ROT(C.V2, C.R2));
L_00D1:;
goto L_00CF;
L_00D0:;
if (C.TYPE != 5) goto L_00D2;
W = LITERAL(C.N);
LOADUP(W);
PLANT1(P, V, R, JUST(W->BASE));
RELEASEANDDROP(W);
goto L_00CF;
L_00D2:;
FAIL(_imp_str_literal("negate error"));
L_00CF:;
L_00CC:;
NOWINREGISTER(&V, R, 1);
goto L_00B5;
L_00B6:;
if (V != 1) goto L_00D3;
CHECK = V & 1048576;
if (UNASSIGNED == 0) goto L_00D4;
if (V & 128 == 0) goto L_00D5;
L_00D4:;
CHECK = 0;
L_00D5:;
if (V == 0) goto L_00D6;
if (V != 512) goto L_00D7;
if (V != 1) goto L_00D8;
DIR3(11, ACTUAL[R], V);
goto L_00D9;
L_00D8:;
if (V != 7) goto L_00DA;
DIR4(12, ACTUAL[R], V, 1);
goto L_00D9;
L_00DA:;
if (V != 6) goto L_00DB;
DIR4(12, ACTUAL[R], V, 0);
goto L_00D9;
L_00DB:;
if (V == 4) goto L_00DC;
if (V != 2) goto L_00DD;
L_00DC:;
T = V;
AMAP(&V);
LOAD(&V, R);
V = T;
V = 1;
LOAD(&V, R);
return;
L_00DD:;
FAIL(_imp_str_literal("Bad constant type"));
L_00D9:;
REFS = REFS + 1;
*CA = *CA + 4;
FORGET(R);
NOWINREGISTER(&V, R, 1);
return;
L_00D7:;
if (V >= 0) goto L_00DE;
if (V == 1) goto L_00DF;
FAIL(_imp_str_literal("Bad external spec type"));
L_00DF:;
DIR3(13, ACTUAL[R], -V);
FORGET(R);
REFS = REFS + 1;
*CA = *CA + 4;
NOWINREGISTER(&V, R, 1);
return;
L_00DE:;
L_00D6:;
if (V != 4) goto L_00E0;
PLANT2(68157440, R, &V);
NOWINREGISTER(&V, R, 1);
if (CHECK == 0) goto L_00E1;
PLANT1(22020096 | 1048576, R, 0, IMMEDIATE(128));
TESTASSIGNED();
L_00E1:;
goto L_00E2;
L_00E0:;
if (V != 2) goto L_00E3;
SIMPLIFY(&V);
if (&V != NIL) goto L_00E4;
if (&V == NIL) goto L_00E5;
L_00E4:;
LOADUPADDRESS(&V);
V = 2;
V = 1;
L_00E5:;
B1 = COPY(&V);
ADVANCE(B1, 4, 0);
B2 = COPY(&V);
ADVANCE(B2, 4, 1);
B1->FLAGS = B1->FLAGS | 128;
B2->FLAGS = B2->FLAGS | 128;
LOAD(B2, 15);
LOAD(B1, R);
LOADUP(B2);
if (CHECK == 0) goto L_00E6;
PLANT1(22020096 | 1048576, B1->BASE, 0, IMMEDIATE(128));
PLANT1(22020096 | 1048576 | -536870912, B2->BASE, 0, IMMEDIATE(128));
TESTASSIGNED();
L_00E6:;
PLANT1(27262976, 0, B2->BASE, ISHIFT(B2->BASE, 24, 0));
PLANT1(25165824, B1->BASE, R, ISHIFT(B2->BASE, 16, 64));
RELEASEANDDROPPAIR(B1, B2);
NOWINREGISTER(&V, R, 1);
goto L_00E2;
L_00E3:;
if (V != 6) goto L_00E7;
PLANT6(202375424, R, &V);
NOWINREGISTER(&V, R, 1);
if (CHECK == 0) goto L_00E8;
B1 = LITERAL(0);
B1->TYPE = 7;
B1->FORM = 1;
B1->BASE = 10;
LOADUP(B1);
RELEASEANDDROP(B1);
PLANT8(244379920, B1->BASE, R);
TESTASSIGNED();
L_00E8:;
goto L_00E2;
L_00E7:;
if (V != 7) goto L_00E9;
PLANT6(202408192, R, &V);
NOWINREGISTER(&V, R, 1);
if (CHECK == 0) goto L_00EA;
B1 = LITERAL(0);
B1->TYPE = 7;
B1->FORM = 1;
B1->BASE = 10;
LOADUP(B1);
RELEASEANDDROP(B1);
PLANT8(244379920, B1->BASE, R);
TESTASSIGNED();
L_00EA:;
goto L_00E2;
L_00E9:;
PLANT2(68157440, R, &V);
NOWINREGISTER(&V, R, 1);
if (CHECK == 0) goto L_00EB;
B1 = LITERAL(0);
B1->FORM = 1;
B1->BASE = 10;
LOADUP(B1);
RELEASEANDDROP(B1);
PLANT1(22020096 | 1048576, B1->BASE, 0, JUST(R));
TESTASSIGNED();
L_00EB:;
L_00E2:;
goto L_00B5;
L_00D3:;
if (V != 3) goto L_00EC;
PLANT2(68157440, R, &V);
FORGET(V);
NOWINREGISTER(&V, R, 1);
goto L_00B5;
L_00EC:;
if (V != 2) goto L_00ED;
PLANT2(68157440, R, &V);
FORGET(V);
NOWINREGISTER(&V, R, 1);
goto L_00B5;
L_00ED:;
FAIL(_imp_str_literal("Unknown type for LOAD"));
L_00B5:;
} /* SIMPLELOAD */
void MULTIPLY(struct STACKFM * V, struct STACKFM * W, int R) {
void CMUL(int FROM, int TO, int BY) {
int X;
int OP;
int WITH;
int T;
if (BY & 1 != 0) goto L_00EE;
OP = 27262976;
WITH = 0;
goto L_00EF;
L_00EE:;
if (BY & 3 != 1) goto L_00F0;
OP = 8388608;
WITH = FROM;
goto L_00EF;
L_00F0:;
BY = BY + 1;
OP = 6291456;
WITH = FROM;
L_00EF:;
X = 0;
L_00F1:;
X = X + 1;
BY = (unsigned int)BY >> 1;
if (BY & 1 != 0) goto L_00F2;
goto L_00F1;
L_00F2:;
if (BY != 1) goto L_00F3;
T = FROM;
goto L_00F4;
L_00F3:;
T = GPR();
CMUL(FROM, T, BY);
L_00F4:;
PLANT1(OP, WITH, TO, ISHIFT(T, X, 0));
} /* CMUL */
int L;
int INV;
struct STACKFM *Z;
if (!(ICONST(W))) goto L_00F5;
LOADSAFELY(&V, *R);
if (W->DISP != 0) goto L_00F6;
FAIL(_imp_str_literal("Zero multiply"));
L_00F6:;
CMUL(V, V, W->DISP);
goto L_00F7;
L_00F5:;
OPTIMISE(&V, 1);
OPTIMISE(W, 1);
Z = LITERAL(0);
if (*R == 17) goto L_00F8;
if (*R == 26) goto L_00F8;
if (ACTIVITY[*R] == 0) goto L_00F9;
L_00F8:;
LOADPROTECTED(Z);
goto L_00FA;
L_00F9:;
LOAD(Z, *R);
L_00FA:;
LOADPROTECTED(&V);
LOADPROTECTED(W);
INV = INVERT;
INVERT = 0;
L = NEWLABEL();
DEFINELABEL(L);
PLANT1(27262976 | 1048576, 0, W->BASE, ISHIFT(W->BASE, 1, 32));
PLANT1(8388608 | -1073741824, Z->BASE, Z->BASE, JUST(V));
PLANT1(27262976, 0, V, ISHIFT(V, 1, 0));
JUMPTO(L, 6);
RELEASE(V);
V = Z->BASE;
DROP(Z);
LOAD(&V, *R);
INVERT = INV;
L_00F7:;
RELEASEANDDROP(W);
} /* MULTIPLY */
void DIVIDE(struct STACKFM * V, struct STACKFM * W, int R, int Q, int U) {
int P;
int L;
int OP;
if (Q == 0) goto L_00FB;
if (U != 0) goto L_00FC;
L_00FB:;
if (!(ICONST(W))) goto L_00FC;
P = POWER(W->DISP);
if (P <= 0) goto L_00FD;
if (U != 0) goto L_00FE;
if (Q != 0) goto L_00FF;
W->DISP = P;
OP = 15;
goto L_0100;
L_00FF:;
W->DISP = ~(-1 << P);
OP = 9;
L_0100:;
OPERATE(OP, V, W);
LOAD(V, R);
return;
L_00FE:;
if (P > 8) goto L_0101;
LOADSAFELY(V, R);
PLANT1(22020096 | 1048576, V->BASE, 0, NOTHING());
L = NEWLABEL();
JUMPTO(L, 5);
PLANT1(8388608, V->BASE, V->BASE, ROT(W->DISP - 1, 0));
DEFINELABEL(L);
PLANT1(27262976, 0, V->BASE, ISHIFT(V->BASE, P, 64));
DROP(W);
return;
L_0101:;
L_00FD:;
L_00FC:;
if (U != 0) goto L_0102;
OP = 49;
goto L_0103;
L_0102:;
OP = 38;
L_0103:;
LOADSAFELY(V, 2);
LOADPAIR(V, 2, W, 3);
PRIM(OP);
if (Q != 0) goto L_0104;
RELEASE(2);
CLAIM(1);
V->BASE = 1;
L_0104:;
LOAD(V, R);
RELEASEANDDROP(W);
} /* DIVIDE */
void COMPLEXLOAD(struct STACKFM * V, int R) {
static const void *C[29] = {
&&case_C_1, &&case_C_2, &&case_C_3, &&case_C_4, &&case_C_5, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_9, &&case_C_10, &&case_C_11, &&case_C_12,
&&case_C_default, &&case_C_14, &&case_C_15, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default};
static const void *C2[29] = {
&&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_4, &&case_C2_5,
&&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_9, &&case_C2_10,
&&case_C2_11, &&case_C2_12, &&case_C2_default, &&case_C2_14, &&case_C2_15,
&&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_default,
&&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_default,
&&case_C2_default, &&case_C2_default, &&case_C2_default, &&case_C2_default};
const int REALOP[7] = {235962752, 237011328, 234881408, 236978560, 235929984, 239075712, 241172864};
struct STACKFM *W;
struct STACKFM *B;
struct CONSTFM CX;
int OPER;
int OP;
int REG2;
int N;
int PA;
W = V->LINK;
V->LINK = NIL;
OPER = V->OPER;
V->OPER = 0;
if (OPER >= 23) goto L_0105;
if (R < 18) goto L_0106;
L_0105:;
if (R > 17) goto L_0107;
FAIL(_imp_str_literal("real load?"));
L_0107:;
if (OPER != 29) goto L_0108;
LOADSAFELY(V, 18);
LOADPAIR(V, 18, W, 1);
PRIM(6);
RELEASEANDDROP(W);
LOAD(V, R);
return;
L_0108:;
if (OPER >= 23) goto L_0109;
V->LINK = W;
V->OPER = OPER;
LOAD(V, 17);
LOAD(V, R);
return;
L_0109:;
LOADSAFELY(V, R);
OP = REALOP[OPER - 23];
if (W != NIL) goto L_010A;
PLANT9(OP, 0, V->BASE, V->BASE);
goto L_010B;
L_010A:;
if (!(ICONST(W))) goto L_010C;
if (0 > W->DISP) goto L_010D;
if (W->DISP <= 5) goto L_010E;
L_010D:;
if (W->DISP != 10) goto L_010C;
L_010E:;
REG2 = W->DISP;
if (REG2 != 10) goto L_010F;
REG2 = 7;
L_010F:;
OP = OP | 8;
goto L_0110;
L_010C:;
LOAD(W, 26);
REG2 = W->BASE;
L_0110:;
PLANT9(OP, V->BASE, V->BASE, REG2);
L_010B:;
goto U_1001;
L_0106:;
if (OPER != 8) goto L_0111;
LOADSAFELY(V, 2);
LOADPAIR(V, 2, W, 3);
PRIM(5);
RELEASEANDDROP(W);
LOAD(V, R);
return;
L_0111:;
if (OPER != 17) goto L_0112;
LOADSAFELY(V, 2);
LOADPAIR(V, 2, W, 3);
PRIM(42);
RELEASEANDDROP(W);
return;
L_0112:;
if (OPER != 6) goto L_0113;
MULTIPLY(V, W, R);
return;
L_0113:;
if (OPER != 7) goto L_0114;
DIVIDE(V, W, R, 0, 1);
return;
L_0114:;
if (OPER != 16) goto L_0115;
DIVIDE(V, W, R, 1, 1);
return;
L_0115:;
if (OPER != 19) goto L_0116;
DIVIDE(V, W, R, 0, 0);
return;
L_0116:;
if (OPER != 20) goto L_0117;
DIVIDE(V, W, R, 1, 0);
return;
L_0117:;
if (OPER != 5) goto L_0118;
if (!(ICONST(V))) goto L_0118;
CHARACTERISECONSTANT(V->DISP, &CX);
if (CX.TYPE != 3) goto L_0119;
LOAD(W, R);
R = W->BASE;
PLANT1(6291456, W->BASE, R, ROT(CX.V1, CX.R1));
if (CX.V2 == 0) goto L_011A;
PLANT1(8388608, R, R, ROT(CX.V2, CX.R2));
L_011A:;
goto U_1002;
L_0119:;
if (CX.TYPE != 2) goto L_011B;
LOADSAFELY(W, R);
R = W->BASE;
PLANT1(31457280, 0, R, JUST(W->BASE));
U_1002:;
V->BASE = R;
V->DISP = 0;
W->BASE = 0;
goto U_1001;
L_011B:;
L_0118:;
if (PENDINGAUTO == 0) goto L_011C;
if (OPER != 4) goto L_011C;
if (!(ICONST(W))) goto L_011C;
if (-4095 > W->DISP) goto L_011C;
if (W->DISP > 4095) goto L_011C;
PA = PENDINGAUTO;
OPTIMISE(V, 1);
if (!(INREG(V))) goto L_011D;
if (V->BASE != PA) goto L_011D;
if (PENDINGAUTON == 0) goto L_011E;
if (_imp_IMOD((unsigned int)W->DISP >> 2) > 255) goto L_011D;
L_011E:;
DIR3(16, *CA - PENDINGAUTOCA, (unsigned int)W->DISP >> PENDINGAUTON);
FORGET(PA);
DROP(W);
LOADSAFELY(V, R);
return;
L_011D:;
L_011C:;
if (V->TYPE != 2) goto L_011F;
if (OPER == 9) goto L_0120;
if (OPER != 12) goto L_011F;
L_0120:;
if (!(ICONST(W))) goto L_011F;
N = W->DISP;
if (OPER != 12) goto L_0121;
N = (~N);
L_0121:;
if ((unsigned int)N >> 16 != 0) goto L_0122;
RELEASEANDDROP(W);
if (N > 255) goto L_0123;
ADVANCE(V, 4, 0);
if (N == 255) goto L_0124;
OPERATE(9, V, LITERAL(N));
L_0124:;
LOAD(V, R);
goto L_0125;
L_0123:;
if (N & 255 != 0) goto L_0126;
V->OPER = 0;
*V->LINK = 0;
ADVANCE(V, 4, 1);
if ((unsigned int)N >> 8 == 255) goto L_0127;
OPERATE(9, V, LITERAL((unsigned int)N >> 8));
L_0127:;
OPERATE(14, V, LITERAL(8));
LOAD(V, R);
goto L_0125;
L_0126:;
B = COPY(V);
ADVANCE(B, 4, 1);
if ((unsigned int)N >> 8 == 255) goto L_0128;
OPERATE(9, B, LITERAL((unsigned int)N >> 8));
L_0128:;
ADVANCE(V, 4, 0);
if (N & 255 == 255) goto L_0129;
OPERATE(9, V, LITERAL(N & 255));
L_0129:;
LOADUP(B);
LOADSAFELY(V, R);
LOADUP(B);
LOADSAFELY(V, R);
PLANT1(25165824, V->BASE, V->BASE, ISHIFT(B->BASE, 8, 0));
RELEASEANDDROP(B);
L_0125:;
return;
L_0122:;
L_011F:;
LOADSAFELY(V, R);
R = V->BASE;
if (W == NIL) goto L_012A;
if (!(ICONST(W))) goto L_012B;
if (OPER != 21) goto L_012C;
PLANT1(27262976, 0, R, ISHIFT(V->BASE, W->DISP & 65535, 32));
N = -1 << ((unsigned int)W->DISP >> 16);
PLANT1(0, R, R, IMMEDIATE((~N)));
goto U_1001;
L_012C:;
if (OPER != 9) goto L_012D;
if (IMMEDIATE(W->DISP) >= 0) goto L_012D;
OPER = 12;
W->DISP = (~W->DISP);
L_012D:;
CHARACTERISECONSTANT(W->DISP, &CX);
if (CX.TYPE != 2) goto L_012E;
if (OPER != 4) goto L_012F;
PLANT1(4194304, V->BASE, R, ROT(1, 0));
goto U_1001;
L_012F:;
if (OPER != 5) goto L_0130;
PLANT1(8388608, V->BASE, R, ROT(1, 0));
goto U_1001;
L_0130:;
if (OPER != 11) goto L_0131;
PLANT1(31457280, 0, R, JUST(V->BASE));
goto U_1001;
L_0131:;
goto L_0132;
L_012E:;
if (CX.TYPE != 3) goto L_0133;
goto *C2[OPER - 1]; /*TO DO*/
case_C2_4:;
OP = 8388608;
goto U_1003;
case_C2_5:;
OP = 4194304;
goto U_1003;
case_C2_12:;
OP = 29360128;
goto U_1003;
case_C2_10:;
OP = 25165824;
goto U_1003;
case_C2_11:;
OP = 2097152;
goto U_1003;
case_C2_9:;
if (CX.V2 != 0) goto L_0135;
OP = 0;
goto U_1003;
L_0135:;
goto U_1004;
U_1003:;
PLANT1(OP, V->BASE, R, ROT(CX.V1, CX.R1));
if (CX.V2 == 0) goto L_0136;
PLANT1(OP, R, R, ROT(CX.V2, CX.R2));
L_0136:;
goto U_1001;
case_C2_14:;
if ((unsigned int)W->DISP >> 5 == 0) goto L_0137;
WARN(1, _imp_str_literal("Dubious shift"));
L_0137:;
PLANT1(27262976, 0, R, ISHIFT(V->BASE, W->DISP & 31, 0));
goto U_1001;
case_C2_15:;
if ((unsigned int)W->DISP >> 5 == 0) goto L_0138;
WARN(1, _imp_str_literal("Dubious shift"));
L_0138:;
PLANT1(27262976, 0, R, ISHIFT(V->BASE, W->DISP & 31, 32));
goto U_1001;
L_0133:;
if (CX.TYPE != 4) goto L_0139;
CHARACTERISECONSTANT(-W->DISP, &CX);
if (CX.TYPE == 3) goto L_013A;
goto U_1004;
L_013A:;
if (OPER != 4) goto L_013B;
OP = 4194304;
goto U_1003;
L_013B:;
if (OPER != 5) goto L_013C;
OP = 8388608;
goto U_1003;
L_013C:;
if (OPER == 15) goto L_013D;
if (OPER != 14) goto L_013E;
L_013D:;
WARN(1, _imp_str_literal("Dubious shift"));
L_013E:;
L_0139:;
L_0132:;
L_012B:;
L_012A:;
U_1004:;
case_C2_default:;
if (W == NIL) goto L_013F;
LOADUP(W);
L_013F:;
goto *C[OPER - 1]; /*TO DO*/
case_C_1:;
PLANT1(31457280, 0, R, JUST(V->BASE));
goto U_1005;
case_C_2:;
PLANT1(6291456, V->BASE, R, NOTHING());
goto U_1005;
case_C_3:;
PLANT1(8388608 | 1048576, R, R, NOTHING());
{ /*%begin*/
int LABEL;
LABEL = NEWLABEL();
JUMPTO(LABEL, 5);
PLANT1(6291456, R, R, NOTHING());
DEFINELABEL(LABEL);
}
goto U_1005;
case_C_4:;
PLANT1(8388608, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_5:;
PLANT1(4194304, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_12:;
PLANT1(29360128, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_9:;
PLANT1(0, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_10:;
PLANT1(25165824, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_11:;
PLANT1(2097152, V->BASE, R, JUST(W->BASE));
goto U_1001;
case_C_14:;
PLANT1(27262976, 0, R, RSHIFT(V->BASE, W->BASE, 144));
goto U_1001;
case_C_15:;
PLANT1(27262976, 0, R, RSHIFT(V->BASE, W->BASE, 176));
goto U_1001;
case_C_default:;
NOTINYET();
U_1001:;
if (W == NIL) goto L_0141;
RELEASEANDDROP(W);
L_0141:;
U_1005:;
} /* COMPLEXLOAD */
void LOAD(struct STACKFM * V, int R) {
if (V->OPER != 0) goto L_0142;
SIMPLELOAD(V, R);
goto L_0143;
L_0142:;
COMPLEXLOAD(V, R);
L_0143:;
if (DIAG & 32 == 0) goto L_0144;
MONITOR(V, _imp_str_literal("<-Load"));
L_0144:;
} /* LOAD */
void LOADPAIR(struct STACKFM * A, int AR, struct STACKFM *B, int BR) {
if (B != 0) goto L_0145;
if (&B != NIL) goto L_0145;
if (&B == NIL) goto L_0146;
L_0145:;
LOAD(&B, BR);
LOAD(A, AR);
LOAD(&B, BR);
goto L_0147;
L_0146:;
LOAD(A, AR);
LOAD(&B, BR);
LOAD(A, AR);
L_0147:;
} /* LOADPAIR */
void LOADTRIO(struct STACKFM * A, int AR, struct STACKFM *B, int BR, struct STACKFM *C, int CR) {
if (B != 0) goto L_0148;
if (&B != NIL) goto L_0148;
if (&B == NIL) goto L_0149;
L_0148:;
LOAD(&B, BR);
LOADPAIR(A, AR, &C, *CR);
goto L_014A;
L_0149:;
if (C != 0) goto L_014B;
if (&C != NIL) goto L_014B;
if (&C == NIL) goto L_014C;
L_014B:;
LOAD(&C, BR);
LOADPAIR(A, AR, &B, BR);
goto L_014A;
L_014C:;
LOAD(A, AR);
LOADPAIR(&B, BR, &C, *CR);
L_014A:;
LOAD(A, AR);
LOAD(&B, BR);
LOAD(&C, *CR);
} /* LOADTRIO */
void REPEAT(void (*BODY)(void), struct STACKFM *TIMES, int INC, int HOW) {
int LABEL;
if (!(ICONST(&TIMES))) goto L_014D;
if (TIMES > 0) goto L_014D;
return;
L_014D:;
LOADUP(&TIMES);
LABEL = NEWLABEL();
DEFINELABEL(LABEL);
BODY();
PLANT1(4194304 | 1048576, TIMES, TIMES, IMMEDIATE(INC));
JUMPTO(LABEL, HOW);
if (HOW != 6) goto L_014E;
REMEMBERZERO(TIMES);
L_014E:;
RELEASEANDDROP(&TIMES);
} /* REPEAT */
int CHEAPEST(int LOW, int HIGH) {
int R;
int A;
int U;
int MINACTIVITY;
int MINKNOWN;
int MINREG;
int OLDEST;
MINACTIVITY = 1000;
MINKNOWN = 1000;
MINREG = 0;
USEDTIME = USEDTIME + 1;
OLDEST = USEDTIME;
R = LOW - 1; /*%for R = LOW, 1, HIGH %cycle*/
L_014F:
if (R == HIGH) goto L_0150;
R += 1;
A = ACTIVITY[R];
if (A >= 0) goto L_0152;
goto L_0151;
L_0152:;
U = USED[R];
if (A != MINACTIVITY) goto L_0153;
if (MINKNOWN <= KTIMES[R]) goto L_0154;
MINREG = R;
MINKNOWN = KTIMES[R];
OLDEST = U;
goto L_0155;
L_0154:;
if (MINKNOWN != KTIMES[R]) goto L_0156;
if (OLDEST <= U) goto L_0157;
MINREG = R;
OLDEST = U;
L_0157:;
L_0156:;
L_0155:;
goto L_0158;
L_0153:;
if (A >= MINACTIVITY) goto L_0159;
MINACTIVITY = A;
MINREG = R;
MINKNOWN = KTIMES[R];
OLDEST = U;
L_0159:;
L_0158:;
L_0151:;
goto L_014F;
L_0150:;
if (MINREG != 0) goto L_015A;
FAIL(_imp_str_literal("all registers lost"));
L_015A:;
USED[MINREG] = USEDTIME;
if (MINACTIVITY == 0) goto L_015B;
HAZARD(MINREG);
L_015B:;
return MINREG;
} /* CHEAPEST */
int GPR(void) { return CHEAPEST(1, 9); } /* GPR */
int FPR(void) { return CHEAPEST(18, 25); } /* FPR */
struct STACKFM *REGISTER(int REG) {
struct STACKFM *R;
R = DESCRIPTOR();
if (REG != 17) goto L_015C;
R->TYPE = 1;
REG = CHEAPEST(1, 9);
goto L_015D;
L_015C:;
if (REG != 26) goto L_015E;
R->TYPE = 7;
REG = CHEAPEST(18, 25);
goto L_015D;
L_015E:;
R->TYPE = 1;
if (REG < 18) goto L_015F;
R->TYPE = 7;
L_015F:;
L_015D:;
R->BASE = REG;
CLAIM(REG);
return R;
} /* REGISTER */
int LOCKED(int R) {
if (*R >= 128) goto L_0160;
if (*R == 0) goto L_0160;
if (ACTIVITY[*R] >= 0) goto L_0161;
L_0160:;
return 1 /*TRUE*/;
L_0161:;
return 0 /*FALSE*/;
} /* LOCKED */
int PROPERLYALIGNED(struct STACKFM * V, int MASK) {
if (V != 13) goto L_0162;
return 1 /*TRUE*/;
L_0162:;
if (V != 9) goto L_0163;
if (V < 0) goto L_0164;
return 0 /*FALSE*/;
L_0164:;
if (VAR(-V)->DISP != 3) goto L_0165;
return 1 /*TRUE*/;
L_0165:;
L_0163:;
if (LOCKED(V)) goto L_0166;
return 0 /*FALSE*/;
L_0166:;
if (V != 1) goto L_0167;
if (&V != NIL) goto L_0167;
if (&V != NIL) goto L_0167;
if (V & MASK != 0) goto L_0167;
return 1 /*TRUE*/;
L_0167:;
return 0 /*FALSE*/;
} /* PROPERLYALIGNED */
void SIMPLIFY(struct STACKFM * V) {
int N;
int D;
struct STACKFM *R;
struct STACKFM *X;
if (DIAG & 16 == 0) goto L_0168;
MONITOR(&V, _imp_str_literal("->Simplify"));
L_0168:;
if (V == 0) goto L_0169;
LOADUP(&V);
goto U_1006;
L_0169:;
if (&V == NIL) goto L_016A;
if (V != 0) goto L_016B;
if (V != 0) goto L_016B;
if (V != 0) goto L_016B;
if (&V != NIL) goto L_016B;
R = &V;
V = R->DATA;
R->INDEX = NIL;
R->RECORD = NIL;
DROP(R);
SIMPLIFY(&V);
goto U_1006;
L_016B:;
SIMPLIFY(&V);
if (&V != NIL) goto L_016C;
if (V != 0) goto L_016C;
if (V == 0) goto L_016D;
L_016C:;
LOADUP(&V);
L_016D:;
V = V + V;
V = 0;
if (V != 0) goto L_016E;
DROP(&V);
V = NIL;
goto L_016F;
L_016E:;
if (V != 0) goto L_0170;
V = V;
DROP(&V);
V = NIL;
goto L_016F;
L_0170:;
if (&V != NIL) goto L_0171;
V = &V;
V = 1;
V = NIL;
goto L_016F;
L_0171:;
OPERATE(4, &V, &V);
V = NIL;
L_016F:;
L_016A:;
if (&V == NIL) goto L_0172;
SIMPLIFY(&V);
if (V != 512) goto L_0173;
X = LITERAL(V);
V = 0;
X->AREA = 512;
V = 0;
LOADUP(X);
if (V != 0) goto L_0174;
V = X->BASE;
DROP(X);
goto L_0175;
L_0174:;
OPERATE(6, &V, LITERAL(V));
V = 1;
OPERATE(4, &V, X);
L_0175:;
goto L_0176;
L_0173:;
N = POWER(V);
if (N >= 0) goto L_0177;
OPERATE(6, &V, LITERAL(V));
V = 1;
LOADUP(&V);
L_0177:;
L_0176:;
if (V == 0) goto L_0178;
if (V == 1) goto L_0179;
OPERATE(6, &V, LITERAL(V));
V = 1;
L_0179:;
OPERATE(4, &V, LITERAL(V));
V = 0;
LOADUP(&V);
L_0178:;
L_0172:;
void ENSUREDISPLACEMENT(int D, int TYPE) {
struct STACKFM *W;
if (TYPE != 1) goto L_017A;
if (-4095 > D) goto L_017B;
if (D > 4095) goto L_017B;
return;
L_017B:;
goto L_017C;
L_017A:;
if (D & 3 == 0) goto L_017D;
FAIL(_imp_str_literal("real address error"));
L_017D:;
if (-255 > ((long)D / (long)4)) goto L_017E;
if (((long)D / (long)4) > 255) goto L_017E;
return;
L_017E:;
L_017C:;
V = 0;
W = LITERAL(D);
LOADUP(W);
if (&V != NIL) goto L_017F;
V = W;
V = 1;
goto L_0180;
L_017F:;
if (V == 1) goto L_0181;
OPERATE(6, &V, LITERAL(V));
V = 1;
L_0181:;
OPERATE(4, &V, W);
L_0180:;
SIMPLIFY(&V);
} /* ENSUREDISPLACEMENT */
D = V;
if (!(ICONST(&V))) goto L_0182;
if (0 > D) goto L_0183;
if (D > 255) goto L_0183;
V = 4;
goto L_0184;
L_0183:;
if (-32768 > D) goto L_0185;
if (D > 32767) goto L_0185;
V = 2;
L_0185:;
L_0184:;
goto L_0186;
L_0182:;
if (V == 0) goto L_0187;
if (V == 7) goto L_0188;
if (V != 6) goto L_0189;
L_0188:;
ENSUREDISPLACEMENT(D, 6);
goto L_018A;
L_0189:;
if (V > 5) goto L_018B;
ENSUREDISPLACEMENT(D, 1);
L_018B:;
L_018A:;
L_0187:;
L_0186:;
U_1006:;
if (DIAG & 16 == 0) goto L_018C;
MONITOR(&V, _imp_str_literal("<-Simplify"));
L_018C:;
} /* SIMPLIFY */
void APPLYINDEX(struct STACKFM * V, struct STACKFM * X, int XSIZE) {
int N;
int MULOP;
if (!(ICONST(&X))) goto L_018D;
if (V != 1) goto L_018D;
N = V + X * *XSIZE;
V = N;
DROP(&X);
return;
L_018D:;
if (&V != NIL) goto L_018E;
V = &X;
V = *XSIZE;
goto L_018F;
L_018E:;
if (V != *XSIZE) goto L_0190;
OPERATE(4, &V, &X);
goto L_018F;
L_0190:;
MULOP = 6;
if (V == 1) goto L_0191;
OPERATE(MULOP, &V, LITERAL(V));
L_0191:;
if (*XSIZE == 1) goto L_0192;
OPERATE(MULOP, &X, LITERAL(*XSIZE));
L_0192:;
OPERATE(4, &V, &X);
V = 1;
L_018F:;
} /* APPLYINDEX */
void FIXUNITARYSTRING(struct STACKFM * V) {
int LEN;
int VAL;
int AT;
static int NULLADDRESS = -1;
int LOCATE(int LEN, int CHAR) {
int HERE;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
HERE = CONSTANTBASE;
SELECTCONSTANTAREA();
DUMPBYTE(LEN);
if (LEN == 0) goto L_0193;
DUMPBYTE(*CHAR);
L_0193:;
SELECTCODEAREA();
return HERE;
} /* LOCATE */
if (V != 8) goto L_0194;
if (V != 1) goto L_0194;
if (NULLADDRESS >= 0) goto L_0195;
NULLADDRESS = LOCATE(0, 0);
L_0195:;
AT = NULLADDRESS;
LEN = 1;
goto L_0196;
L_0194:;
if (V != 13) goto L_0197;
BUILDSET(&V);
return;
L_0197:;
if (V > 5) goto L_0198;
VAL = V & 255;
if (VAL == V) goto L_0199;
WARN(1, _imp_str_literal("string character out of range"));
L_0199:;
AT = LOCATE(1, VAL);
LEN = 2;
goto L_0196;
L_0198:;
FAIL(_imp_str_literal("bad tostring type"));
L_0196:;
V = AT;
V = 8;
V = 1;
V = 512;
V = LEN;
V = LEN;
} /* FIXUNITARYSTRING */
void AMAP(struct STACKFM * V) {
struct STACKFM *W;
if (V != 0) goto L_019A;
FIXUNITARYSTRING(&V);
goto L_019B;
L_019A:;
if (V == 0) goto L_019C;
FAIL(_imp_str_literal("Amap:oper"));
L_019C:;
L_019B:;
V = 1;
if (V != 3) goto L_019D;
return;
L_019D:;
if (V != 4) goto L_019E;
if (V & 1024 == 0) goto L_019F;
HAZARD(14);
FORGET(14);
DIR2(19, V);
REFS = REFS + 1;
*CA = *CA + 4;
V = 1;
V = 0;
V = 14;
V = 0;
V = 0;
CLAIM(14);
goto L_01A0;
L_019F:;
if (V & 4 == 0) goto L_01A1;
V = 1;
V = 1;
V = 0;
goto L_01A0;
L_01A1:;
if (V & 16777216 == 0) goto L_01A2;
HAZARD(14);
FORGET(14);
DIR2(18, V);
REFS = REFS + 1;
*CA = *CA + 4;
V = 1;
V = 0;
V = 14;
V = 0;
V = 0;
CLAIM(14);
goto L_01A0;
L_01A2:;
FAIL(_imp_str_literal("cannot address local procedures"));
L_01A0:;
goto L_01A3;
L_019E:;
if (V == 1) goto L_01A4;
FAIL(_imp_str_literal("Amap:form"));
L_01A4:;
V = 0;
if (&V == NIL) goto L_01A5;
if (!(ICONST(&V))) goto L_01A5;
V = V + V * V;
DROP(&V);
V = NIL;
L_01A5:;
if (V != 0) goto L_01A6;
if (&V != NIL) goto L_01A6;
if (&V == NIL) goto L_01A6;
W = &V;
V = W->DATA;
W->INDEX = NIL;
W->RECORD = NIL;
DROP(W);
L_01A6:;
L_01A3:;
if (DIAG & 16 == 0) goto L_01A7;
MONITOR(&V, _imp_str_literal("Amap<-"));
L_01A7:;
} /* AMAP */
void MAKEAUTOI(struct STACKFM * V, int TYPE) {
AMAP(&V);
LOADPROTECTED(&V);
V = *TYPE;
V = 2;
} /* MAKEAUTOI */
void VMAP(struct STACKFM * V, int NEWTYPE) {
struct STACKFM *W;
struct STACKFM *C;
int D;
D = 0;
if (1 > V) goto L_01A8;
if (V <= 5) goto L_01A9;
L_01A8:;
FAIL(_imp_str_literal("Vmap:type"));
L_01A9:;
if (V != 4) goto L_01AA;
C = &V;
if (!(ICONST(C))) goto L_01AB;
D = C->DISP;
DROP(C);
V = NIL;
V = 0;
L_01AB:;
L_01AA:;
if (V == 0) goto L_01AC;
LOADUP(&V);
L_01AC:;
if (V == 0) goto L_01AD;
W = DESCRIPTOR();
W->DATA = V;
V = 0;
V = W;
V = D;
L_01AD:;
V = INTERNALTYPE[*NEWTYPE];
V = 1;
V = TYPEFMT[*NEWTYPE];
if (DIAG & 16 == 0) goto L_01AE;
MONITOR(&V, _imp_str_literal("Vmap<-"));
L_01AE:;
} /* VMAP */
void FMAP(int NEWTYPE) {
if (!(INREG(STACK))) goto L_01AF;
HAZARD(STACK->BASE);
L_01AF:;
if (STACK->TYPE != 1) goto L_01B0;
if (STACK->FORM != 0) goto L_01B1;
L_01B0:;
FAIL(_imp_str_literal("Bad type for Fmap"));
L_01B1:;
STACK->FORM = 4;
STACK->TYPE = *NEWTYPE;
STACK->FLAGS = STACK->FLAGS | 524288 | 4;
} /* FMAP */
void ADVANCE(struct STACKFM * V, int TYPE, int BY) {
int CHECKFLAG;
if (V->FORM == 3) goto L_01B2;
CHECKFLAG = V->FLAGS & 1048576;
AMAP(V);
OPERATE(4, V, LITERAL(*BY));
VMAP(V, *TYPE);
V->FLAGS = V->FLAGS | CHECKFLAG;
goto L_01B3;
L_01B2:;
V->TYPE = *TYPE;
L_01B3:;
} /* ADVANCE */
void MACHINECODE(void) {
const _imp_string4 OPCODE[95] = {
_imp_str_literal("ABS"), _imp_str_literal("ACS"), _imp_str_literal("ADC"), _imp_str_literal("ADD"),
_imp_str_literal("ADF"), _imp_str_literal("AND"), _imp_str_literal("ASN"), _imp_str_literal("ATN"),
_imp_str_literal("B"), _imp_str_literal("BAL"), _imp_str_literal("BCC"), _imp_str_literal("BCS"),
_imp_str_literal("BEQ"), _imp_str_literal("BGE"), _imp_str_literal("BGT"), _imp_str_literal("BHI"),
_imp_str_literal("BIC"), _imp_str_literal("BL"), _imp_str_literal("BLAL"), _imp_str_literal("BLCC"),
_imp_str_literal("BLCS"), _imp_str_literal("BLE"), _imp_str_literal("BLEQ"), _imp_str_literal("BLGE"),
_imp_str_literal("BLGT"), _imp_str_literal("BLHI"), _imp_str_literal("BLLE"), _imp_str_literal("BLLS"),
_imp_str_literal("BLLT"), _imp_str_literal("BLMI"), _imp_str_literal("BLNE"), _imp_str_literal("BLNV"),
_imp_str_literal("BLPL"), _imp_str_literal("BLS"), _imp_str_literal("BLT"), _imp_str_literal("BLVC"),
_imp_str_literal("BLVS"), _imp_str_literal("BMI"), _imp_str_literal("BNE"), _imp_str_literal("BNV"),
_imp_str_literal("BPL"), _imp_str_literal("BR"), _imp_str_literal("BVC"), _imp_str_literal("BVS"),
_imp_str_literal("CMF"), _imp_str_literal("CMFE"), _imp_str_literal("CMN"), _imp_str_literal("CMP"),
_imp_str_literal("CNF"), _imp_str_literal("CNFE"), _imp_str_literal("COS"), _imp_str_literal("DVF"),
_imp_str_literal("EOR"), _imp_str_literal("EXP"), _imp_str_literal("FDV"), _imp_str_literal("FIX"),
_imp_str_literal("FLT"), _imp_str_literal("FML"), _imp_str_literal("FRD"), _imp_str_literal("LDF"),
_imp_str_literal("LDM"), _imp_str_literal("LDR"), _imp_str_literal("LGN"), _imp_str_literal("LOG"),
_imp_str_literal("MNF"), _imp_str_literal("MOV"), _imp_str_literal("MUF"), _imp_str_literal("MVF"),
_imp_str_literal("MVN"), _imp_str_literal("ORR"), _imp_str_literal("POL"), _imp_str_literal("POW"),
_imp_str_literal("RDF"), _imp_str_literal("RFC"), _imp_str_literal("RFS"), _imp_str_literal("RMF"),
_imp_str_literal("RND"), _imp_str_literal("RPW"), _imp_str_literal("RSB"), _imp_str_literal("RSC"),
_imp_str_literal("RSF"), _imp_str_literal("SBC"), _imp_str_literal("SIN"), _imp_str_literal("SQT"),
_imp_str_literal("STF"), _imp_str_literal("STM"), _imp_str_literal("STR"), _imp_str_literal("SUB"),
_imp_str_literal("SUF"), _imp_str_literal("SWI"), _imp_str_literal("TAN"), _imp_str_literal("TEQ"),
_imp_str_literal("TST"), _imp_str_literal("WFC"), _imp_str_literal("WFS")};
const unsigned char TYPE[95] = {10, 10, 1, 1, 10, 1, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 1, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 9, 9, 1, 1, 9, 9, 10, 10, 1, 10, 10, 7, 7,
10, 10, 6, 4, 2, 10, 10, 10, 1, 10, 10, 1, 1, 10, 10, 10, 7, 7, 10,
10, 10, 1, 1, 10, 1, 10, 10, 6, 4, 2, 1, 10, 3, 10, 1, 1, 7, 7};
const int VALUE[95] = {
237011200, 247496960, 10485760, 8388608, 234881280, 0, 246448384, 248545536,
-369098752, -369098752, 973078528, 704643072, 167772160, -1442840576, -905969664, -1979711488,
29360128, -352321536, -352321536, 989855744, 721420288, -637534208, 184549376, -1426063360,
-889192448, -1962934272, -620756992, -1694498816, -1157627904, 1258291200, 452984832, -83886080,
1526726656, -1711276032, -1174405120, 2063597568, 1795162112, 1241513984, 436207616, -100663296,
1509949440, -369098752, 2046820352, 1778384896, 244379920, 248574224, 23068672, 20971520,
246477072, 250671376, 244351232, 239075584, 2097152, 242254080, 245367040, 235929872,
234881296, 244318464, 246415616, 202375424, 135266304, 68157440, 241205504, 240156928,
235962624, 27262976, 235929856, 234914048, 31457280, 25165824, 247464192, 241172736,
240124160, 240124176, 238027024, 243269888, 238059776, 242221312, 6291456, 14680064,
238027008, 12582912, 243302656, 239108352, 201326848, 134217728, 67108864, 4194304,
236978432, 251658240, 245399808, 18874368, 16777216, 239075600, 236978448};
int OPNUM;
int OPTYPE;
int OPVALUE;
OPVALUE = 0;
int OPLENGTH;
int OPERANDS;
int N;
int J;
int KEY;
int P;
int X;
X = 0;
int SYMP;
int DISP;
int RN;
int RD;
int RS;
int RM;
int SH;
int ROT;
int UD;
int REG1;
int REG2;
int FDST;
int FS1;
int FS2;
_imp_string7 OPSTRING;
struct VARFM *W;
static const void *OT[12] = {&&case_OT_M1, &&case_OT_missing, &&case_OT_1, &&case_OT_2,
&&case_OT_3, &&case_OT_4, &&case_OT_5, &&case_OT_6,
&&case_OT_7, &&case_OT_missing, &&case_OT_9, &&case_OT_10};
void MCERROR(_imp_string127 TEXT) {
void ERR(int STREAM) {
_imp_SELECTOUTPUT(STREAM);
_imp_PRINTSTRING(_imp_str_literal("*"));
_imp_WRITE(CURRENTLINE, 4);
_imp_PRINTSTRING(
_imp_join((_imp_string)(_imp_join(
(_imp_string)(_imp_join((_imp_string)(_imp_str_literal(" ")), (_imp_string)(OPSTRING))),
(_imp_string)(_imp_str_literal(": ")))),
(_imp_string)(TEXT)));
_imp_NEWLINE();
} /* ERR */
ERR(7);
ERR(0);
if (DIAG & 512 == 0) goto L_01B4;
FAIL(_imp_str_literal("Bang"));
L_01B4:;
INTERFACE->FAULTS = INTERFACE->FAULTS + 1;
_imp_SELECTOUTPUT(2);
_imp_SIGNAL(14, 0, 0);
} /* MCERROR */
void FINDOPCODE(void) {
int MIN;
int MAX;
int P;
_imp_string4 KEY;
KEY = _imp_str_literal("0");
OPLENGTH = *_imp_LENGTH(&OPSTRING);
if (OPLENGTH > 3) goto L_01B5;
SYMP = OPLENGTH;
KEY = OPSTRING;
goto L_01B6;
L_01B5:;
SYMP = 3;
KEY = _imp_join((_imp_string)(_imp_join((_imp_string)(_imp_TOSTRING(*_imp_CHARNO(&OPSTRING, 1))),
(_imp_string)(_imp_TOSTRING(*_imp_CHARNO(&OPSTRING, 2))))),
(_imp_string)(_imp_TOSTRING(*_imp_CHARNO(&OPSTRING, 3))));
if (*_imp_CHARNO(&OPSTRING, 1) != 66) goto L_01B7;
if (*_imp_CHARNO(&OPSTRING, 2) != 76) goto L_01B7;
if (OPLENGTH < 4) goto L_01B7;
KEY = _imp_join((_imp_string)(KEY), (_imp_string)(_imp_TOSTRING(*_imp_CHARNO(&OPSTRING, 4))));
SYMP = 4;
L_01B7:;
L_01B6:;
MIN = 1;
MAX = 95;
L_01B8:;
if (MIN > MAX) goto L_01B9;
P = (unsigned int)MIN + MAX >> 1;
if (_imp_strcmp(OPCODE[P - 1], KEY) != 0) goto L_01BA;
OPNUM = P;
OPTYPE = TYPE[OPNUM - 1];
OPVALUE = VALUE[OPNUM - 1];
return;
L_01BA:;
if (_imp_strcmp(KEY, OPCODE[P - 1]) <= 0) goto L_01BB;
MIN = P + 1;
goto L_01BC;
L_01BB:;
MAX = P - 1;
L_01BC:;
goto L_01B8;
L_01B9:;
if (_imp_strcmp(OPSTRING, _imp_str_literal("BYTE")) == 0) goto L_01BD;
if (_imp_strcmp(OPSTRING, _imp_str_literal("BYTE1")) != 0) goto L_01BE;
L_01BD:;
OPNUM = -1;
OPTYPE = -1;
SYMP = OPLENGTH;
goto L_01BF;
L_01BE:;
if (_imp_strcmp(OPSTRING, _imp_str_literal("BYTE2")) != 0) goto L_01C0;
OPNUM = -2;
OPTYPE = -1;
SYMP = OPLENGTH;
goto L_01BF;
L_01C0:;
if (_imp_strcmp(OPSTRING, _imp_str_literal("BYTE4")) != 0) goto L_01C1;
OPNUM = -3;
OPTYPE = -1;
SYMP = OPLENGTH;
goto L_01BF;
L_01C1:;
MCERROR(_imp_str_literal("unknown opcode"));
L_01BF:;
} /* FINDOPCODE */
int MATCH(int WANTED) {
if (PENDING == WANTED) goto L_01C2;
return 0 /*FALSE*/;
L_01C2:;
_imp_READSYMBOL(&PENDING);
return 1 /*TRUE*/;
} /* MATCH */
int PMATCH(int WANTED) {
if (PENDING == WANTED | 128) goto L_01C3;
return 0 /*FALSE*/;
L_01C3:;
_imp_READSYMBOL(&PENDING);
return 1 /*TRUE*/;
} /* PMATCH */
int LITERAL(int *N) {
if (!(MATCH(78))) goto L_01C4;
N = FOURBYTES();
return 1 /*TRUE*/;
L_01C4:;
if (!(MATCH(128 + 98))) goto L_01C5;
N = PENDING;
_imp_READSYMBOL(&PENDING);
return 1 /*TRUE*/;
L_01C5:;
if (MATCH(45)) goto L_01C6;
return 0 /*FALSE*/;
L_01C6:;
if (LITERAL(&N)) goto L_01C7;
MCERROR(_imp_str_literal("constant expected"));
L_01C7:;
N = -N;
return 1 /*TRUE*/;
} /* LITERAL */
void WANT(int SYM) {
if (MATCH(SYM)) goto L_01C8;
MCERROR(_imp_join((_imp_string)(_imp_TOSTRING(SYM)), (_imp_string)(_imp_str_literal(" expected"))));
L_01C8:;
} /* WANT */
void WANTLITERAL(int *N) {
if (LITERAL(&N)) goto L_01C9;
MCERROR(_imp_str_literal("constant expected"));
L_01C9:;
} /* WANTLITERAL */
void REGISTER(int *R) {
if (!(LITERAL(&R))) goto L_01CA;
if (0 > R) goto L_01CA;
if (R <= 15) goto L_01CB;
L_01CA:;
MCERROR(_imp_str_literal("Register expected"));
L_01CB:;
} /* REGISTER */
void FREGISTER(int *R) {
if (!(LITERAL(&R))) goto L_01CC;
if (16 + 0 > R) goto L_01CC;
if (R <= 16 + 7) goto L_01CD;
L_01CC:;
MCERROR(_imp_str_literal("Floating register expected"));
L_01CD:;
} /* FREGISTER */
void SETCC(void) {
const int CC[16] = {17745, 20037, 17235, 17219, 19785, 20556, 22099, 22083,
18505, 19539, 18245, 19540, 18260, 19525, 16716, 20054};
int SYM;
int C;
if (SYMP + 1 >= OPLENGTH) goto L_01CE;
SYM = *_imp_CHARNO(&OPSTRING, SYMP + 1) << 8 | *_imp_CHARNO(&OPSTRING, SYMP + 2);
C = -1; /*%for C = 0, 1, 15 %cycle*/
L_01CF:
if (C == 15) goto L_01D0;
C += 1;
if (CC[C] != SYM) goto L_01D2;
OPVALUE = OPVALUE | C << 28;
SYMP = SYMP + 2;
return;
L_01D2:;
goto L_01CF;
L_01D0:;
L_01CE:;
OPVALUE = OPVALUE | -536870912;
} /* SETCC */
void COMMA(void) {
if (MATCH(44)) goto L_01D3;
MCERROR(_imp_str_literal("comma missing"));
L_01D3:;
} /* COMMA */
int OMATCH(int SYM) {
if (SYMP >= OPLENGTH) goto L_01D4;
if (*_imp_CHARNO(&OPSTRING, SYMP + 1) == SYM) goto L_01D5;
L_01D4:;
return 0 /*FALSE*/;
L_01D5:;
SYMP = SYMP + 1;
return 1 /*TRUE*/;
} /* OMATCH */
if (!_imp_on_event(14)) goto L_01D6;
L_01D7:;
if (PENDING == 59) goto L_01D8;
_imp_READSYMBOL(&PENDING);
goto L_01D7;
L_01D8:;
goto L_01D9;
L_01D6:;
OPSTRING = _imp_str_literal("");
L_01DA:;
if (PENDING == 95) goto L_01DB;
if (*_imp_LENGTH(&OPSTRING) == 7) goto L_01DC;
OPSTRING = _imp_join((_imp_string)(OPSTRING), (_imp_string)(_imp_TOSTRING(PENDING)));
L_01DC:;
_imp_READSYMBOL(&PENDING);
goto L_01DA;
L_01DB:;
_imp_READSYMBOL(&PENDING);
FINDOPCODE();
if (OPTYPE <= 0) goto L_01DD;
if (OPTYPE == 5) goto L_01DD;
SETCC();
L_01DD:;
goto *OT[OPTYPE + 1]; /*TO DO*/
const unsigned char LITSH[4] = {64, 0, 32, 96};
const unsigned char REGSH[4] = {80, 16, 48, 112};
void BADSHIFT(void) { MCERROR(_imp_str_literal("unknown type of shift")); } /* BADSHIFT */
void GETSHIFT(void) {
int SH;
if (!(PMATCH(65))) goto L_01DF;
if (!(PMATCH(83))) goto L_01E0;
if (!(PMATCH(82))) goto L_01E0;
SH = 1;
goto L_01E1;
L_01E0:;
BADSHIFT();
L_01E1:;
goto L_01D9;
L_01DF:;
if (!(PMATCH(76))) goto L_01E2;
if (!(PMATCH(83))) goto L_01E3;
if (!(PMATCH(76))) goto L_01E4;
SH = 2;
goto L_01E5;
L_01E4:;
if (!(PMATCH(82))) goto L_01E6;
SH = 3;
goto L_01E5;
L_01E6:;
BADSHIFT();
L_01E5:;
goto L_01E7;
L_01E3:;
BADSHIFT();
L_01E7:;
goto L_01D9;
L_01E2:;
if (!(PMATCH(82))) goto L_01E8;
if (!(PMATCH(82))) goto L_01E9;
if (PMATCH(88)) goto L_01EA;
BADSHIFT();
L_01EA:;
SH = 0;
goto L_01EB;
L_01E9:;
if (!(PMATCH(79))) goto L_01EC;
if (!(PMATCH(82))) goto L_01EC;
SH = 4;
goto L_01EB;
L_01EC:;
BADSHIFT();
L_01EB:;
goto L_01D9;
L_01E8:;
BADSHIFT();
L_01D9:;
if (SH != 0) goto L_01ED;
OPVALUE = OPVALUE | 6 << 4;
goto L_01EE;
L_01ED:;
if (!(MATCH(35))) goto L_01EF;
WANTLITERAL(&N);
if (0 > N) goto L_01D1;
if (N <= 32) goto L_01F0;
L_01D1:;
MCERROR(_imp_str_literal("shift out of range"));
L_01F0:;
OPVALUE = OPVALUE | (N & 31) << 7 | LITSH[SH - 1];
goto L_01EE;
L_01EF:;
REGISTER(&RS);
OPVALUE = OPVALUE | RS << 8 | REGSH[SH - 1];
L_01EE:;
} /* GETSHIFT */
case_OT_1:;
KEY = (unsigned int)OPVALUE >> 23 & 3;
N = (unsigned int)OPVALUE >> 21 & 15;
RN = 0;
RD = 0;
RM = 0;
RS = 0;
if (!(OMATCH(83))) goto L_01F1;
OPVALUE = OPVALUE | 1 << 20;
L_01F1:;
if (!(OMATCH(80))) goto L_01F2;
if (KEY == 2) goto L_01F3;
WARN(1, _imp_str_literal("spurious P qualifier"));
L_01F3:;
RD = 15;
L_01F2:;
REGISTER(&RN);
if (KEY == 2) goto L_01F4;
RD = RN;
RN = 0;
if (N == 13) goto L_01F5;
if (N == 15) goto L_01F5;
COMMA();
REGISTER(&RN);
L_01F5:;
L_01F4:;
OPVALUE = OPVALUE | RD << 12 | RN << 16;
COMMA();
if (!(MATCH(35))) goto L_01F6;
WANTLITERAL(&N);
ROT = 16;
if (N == 0) goto L_01F7;
L_01F8:;
if (N & 3 != 0) goto L_01F9;
ROT = ROT - 1;
N = (unsigned int)N >> 2;
goto L_01F8;
L_01F9:;
L_01F7:;
if ((unsigned int)N >> 8 == 0) goto L_01FA;
MCERROR(_imp_str_literal("cannot generate constant"));
L_01FA:;
OPVALUE = OPVALUE | (ROT & 15) << 8 | N | 33554432;
goto L_01FB;
L_01F6:;
REGISTER(&RM);
if (!(MATCH(44))) goto L_01FC;
GETSHIFT();
L_01FC:;
OPVALUE = OPVALUE | RM;
L_01FB:;
goto U_1007;
void GETDISPLACEMENT(int MODE) {
int RM;
UD = 1;
if (!(MATCH(35))) goto L_01FD;
WANTLITERAL(&DISP);
if (DISP >= 0) goto L_01FE;
UD = 0;
DISP = -DISP;
L_01FE:;
goto L_01FF;
L_01FD:;
DISP = 0;
if (!(MATCH(45))) goto L_0200;
UD = 0;
goto L_0201;
L_0200:;
if (!(MATCH(43))) goto L_0202;
L_0202:;
L_0201:;
REGISTER(&RM);
OPVALUE = OPVALUE | RM | 33554432;
if (!(MATCH(44))) goto L_0203;
GETSHIFT();
L_0203:;
L_01FF:;
OPVALUE = OPVALUE | MODE;
} /* GETDISPLACEMENT */
void MODIFYDISP(void) {
int SIGN;
int MOD;
SIGN = PENDING;
if (MATCH(43)) goto L_0204;
if (MATCH(45)) goto L_0204;
return;
L_0204:;
if (LITERAL(&MOD)) goto L_0205;
MCERROR(_imp_str_literal("constant expected"));
L_0205:;
if (SIGN != 45) goto L_0206;
MOD = -MOD;
L_0206:;
N = N + MOD;
} /* MODIFYDISP */
case_OT_2:;
if (!(OMATCH(66))) goto L_0207;
OPVALUE = OPVALUE | 1 << 22;
L_0207:;
if (!(OMATCH(84))) goto L_0208;
OPVALUE = OPVALUE | 1 << 21;
L_0208:;
REGISTER(&RD);
OPVALUE = OPVALUE | RD << 12;
COMMA();
UD = 1;
if (!(MATCH(32))) goto L_0209;
W = VAR(TAG());
DISP = W->DISP;
MODIFYDISP();
if (W->BASE != *LOCAL) goto L_020A;
RN = ACTUAL[11];
goto L_020B;
L_020A:;
if (W->BASE != 10) goto L_020C;
RN = ACTUAL[10];
goto L_020B;
L_020C:;
if (W->BASE != 0) goto L_020D;
if (W->AREA >= 0) goto L_020D;
DIR3(13, RD, -W->AREA);
REFS = REFS + 1;
*CA = *CA + 4;
RN = RD;
DISP = 0;
goto L_020B;
L_020D:;
MCERROR(_imp_str_literal("cannot address non-locals"));
L_020B:;
if (DISP >= 0) goto L_020E;
DISP = -DISP;
UD = 0;
L_020E:;
OPVALUE = OPVALUE | 83886080 | RN << 16;
goto L_020F;
L_0209:;
WANT(91);
REGISTER(&RN);
OPVALUE = OPVALUE | RN << 16;
if (!(MATCH(44))) goto L_0210;
if (OPVALUE & 1 << 21 == 0) goto L_0211;
WARN(1, _imp_str_literal("spurious translate option"));
L_0211:;
GETDISPLACEMENT(83886080);
WANT(93);
if (!(MATCH(33))) goto L_0212;
OPVALUE = OPVALUE | 1 << 21;
L_0212:;
goto L_0213;
L_0210:;
WANT(93);
if (!(MATCH(44))) goto L_0214;
GETDISPLACEMENT(67108864);
goto L_0215;
L_0214:;
DISP = 0;
OPVALUE = OPVALUE | 67108864;
L_0215:;
L_0213:;
L_020F:;
if (DISP <= 4095) goto L_0216;
MCERROR(_imp_str_literal("displacement too large"));
L_0216:;
OPVALUE = OPVALUE | UD << 23 | DISP;
goto U_1007;
case_OT_3:;
WANTLITERAL(&N);
OPVALUE = OPVALUE | N & 16777215;
goto U_1007;
void RLIST(void) {
WANT(60);
if (PENDING == 62) goto L_0217;
L_0218:;
REGISTER(&N);
OPVALUE = OPVALUE | 1 << N;
if (!(MATCH(44))) goto L_0219;
goto L_0218;
L_0219:;
L_0217:;
WANT(62);
} /* RLIST */
case_OT_4:;
if (!(OMATCH(73))) goto L_021A;
if (!(OMATCH(65))) goto L_021B;
OPVALUE = OPVALUE | 1 << 23;
goto L_021C;
L_021B:;
if (!(OMATCH(66))) goto L_021D;
OPVALUE = OPVALUE | 3 << 23;
goto L_021C;
L_021D:;
MCERROR(_imp_str_literal("IA or IB expected"));
L_021C:;
goto L_021E;
L_021A:;
if (!(OMATCH(68))) goto L_021F;
if (!(OMATCH(65))) goto L_0220;
OPVALUE = OPVALUE | 0 << 23;
goto L_0221;
L_0220:;
if (!(OMATCH(66))) goto L_0222;
OPVALUE = OPVALUE | 2 << 23;
goto L_0221;
L_0222:;
MCERROR(_imp_str_literal("DA or DB expected"));
L_0221:;
goto L_021E;
L_021F:;
if (!(OMATCH(70))) goto L_0223;
OPVALUE = OPVALUE | 2 << 23;
goto L_0224;
L_0223:;
if (!(OMATCH(69))) goto L_0225;
OPVALUE = OPVALUE | 0 << 23;
L_0225:;
L_0224:;
if (!(OMATCH(65))) goto L_0226;
OPVALUE = OPVALUE | 1 << 23;
goto L_0227;
L_0226:;
if (!(OMATCH(68))) goto L_0228;
OPVALUE = OPVALUE | 0 << 23;
L_0228:;
L_0227:;
L_021E:;
REGISTER(&RN);
OPVALUE = OPVALUE | RN << 16;
if (!(MATCH(33))) goto L_0229;
OPVALUE = OPVALUE | 1 << 21;
L_0229:;
COMMA();
RLIST();
if (!(MATCH(94))) goto L_022A;
OPVALUE = OPVALUE | 1 << 22;
L_022A:;
goto U_1007;
case_OT_5:;
if (!(MATCH(32))) goto L_022B;
W = VAR(TAG());
if (W->TYPE != 11) goto L_022C;
DIR3(15, W->DISP, OPVALUE);
*CA = *CA + 4;
goto U_1008;
L_022C:;
L_022B:;
MCERROR(_imp_str_literal("Unimplemented form of branch"));
void SETDS(int LETP) {
if (!(OMATCH(68))) goto L_022D;
OPVALUE = OPVALUE | 128;
goto L_022E;
L_022D:;
if (!(OMATCH(69))) goto L_022F;
OPVALUE = OPVALUE | 524288;
goto L_022E;
L_022F:;
if (LETP == 0) goto L_0230;
if (!(OMATCH(80))) goto L_0230;
OPVALUE = OPVALUE | 524416;
goto L_022E;
L_0230:;
if (OMATCH(83)) goto L_0231;
MCERROR(_imp_str_literal("D, S, E or P wanted"));
L_0231:;
L_022E:;
} /* SETDS */
void LITREG(int *R) {
if (!(MATCH(35))) goto L_0232;
WANTLITERAL(&R);
if (R != 1) goto L_0233;
if (!(MATCH(47))) goto L_0233;
WANTLITERAL(&R);
if (R == 2) goto L_0234;
MCERROR(_imp_str_literal("only 1/2 permitted"));
L_0234:;
R = 6;
goto L_0235;
L_0233:;
if (0 > R) goto L_0236;
if (R <= 5) goto L_0237;
L_0236:;
if (R == 10) goto L_0237;
MCERROR(_imp_str_literal("bad range"));
L_0237:;
if (R != 10) goto L_0238;
R = 7;
L_0238:;
L_0235:;
R = R | 8;
goto L_0239;
L_0232:;
FREGISTER(&R);
R = R & 7;
L_0239:;
} /* LITREG */
case_OT_6:;
if (!(OMATCH(83))) goto L_023A;
goto L_023B;
L_023A:;
if (!(OMATCH(68))) goto L_023C;
OPVALUE = OPVALUE | 32768;
goto L_023B;
L_023C:;
if (!(OMATCH(69))) goto L_023D;
OPVALUE = OPVALUE | 4194304;
goto L_023B;
L_023D:;
if (!(OMATCH(80))) goto L_023E;
OPVALUE = OPVALUE | 4227072;
L_023E:;
L_023B:;
FREGISTER(&FDST);
COMMA();
UD = 1;
if (!(MATCH(32))) goto L_023F;
W = VAR(TAG());
DISP = W->DISP;
MODIFYDISP();
if (W->BASE != *LOCAL) goto L_0240;
RN = ACTUAL[11];
goto L_0241;
L_0240:;
if (W->BASE != 10) goto L_0242;
RN = ACTUAL[10];
goto L_0241;
L_0242:;
if (W->BASE != 0) goto L_0243;
if (W->AREA >= 0) goto L_0243;
DIR3(13, RD, -W->AREA);
REFS = REFS + 1;
*CA = *CA + 4;
RN = RD;
DISP = 0;
goto L_0241;
L_0243:;
MCERROR(_imp_str_literal("cannot address non-locals"));
L_0241:;
goto L_0244;
L_023F:;
WANT(91);
REGISTER(&RN);
if (!(MATCH(44))) goto L_0245;
if (OPVALUE & 1 << 21 == 0) goto L_0246;
WARN(1, _imp_str_literal("spurious translate option"));
L_0246:;
GETDISPLACEMENT(83886080);
WANT(93);
if (!(MATCH(33))) goto L_0247;
OPVALUE = OPVALUE | 1 << 21;
L_0247:;
goto L_0248;
L_0245:;
WANT(93);
if (!(MATCH(44))) goto L_0249;
GETDISPLACEMENT(67108864);
goto L_024A;
L_0249:;
OPVALUE = OPVALUE | 67108864;
L_024A:;
L_0248:;
L_0244:;
if (DISP >= 0) goto L_024B;
DISP = -DISP;
UD = 0;
L_024B:;
if (DISP & 3 == 0) goto L_024C;
MCERROR(_imp_str_literal("Alignment error"));
L_024C:;
DISP = (unsigned int)DISP >> 2;
if (DISP <= 255) goto L_024D;
MCERROR(_imp_str_literal("displacement too large"));
L_024D:;
OPVALUE = OPVALUE | DISP | 83886080 | RN << 16 | (FDST & 7) << 12 | UD << 23;
goto U_1007;
void SETROUND(void) {
if (!(OMATCH(80))) goto L_024E;
OPVALUE = OPVALUE | 32;
goto L_024F;
L_024E:;
if (!(OMATCH(77))) goto L_0250;
OPVALUE = OPVALUE | 64;
goto L_024F;
L_0250:;
if (!(OMATCH(90))) goto L_0251;
OPVALUE = OPVALUE | 96;
L_0251:;
L_024F:;
} /* SETROUND */
case_OT_7:;
SETDS(0);
SETROUND();
N = (unsigned int)OPVALUE >> 20 & 15;
if (N != 0) goto L_0252;
FREGISTER(®1);
COMMA();
REGISTER(®2);
OPVALUE = OPVALUE | (REG1 & 7) << 16 | REG2 << 12;
goto L_0253;
L_0252:;
if (N != 1) goto L_0254;
REGISTER(®1);
COMMA();
FREGISTER(®2);
OPVALUE = OPVALUE | REG1 << 12 | REG2 & 7;
goto L_0253;
L_0254:;
REGISTER(®1);
OPVALUE = OPVALUE | REG1 << 12;
L_0253:;
goto U_1007;
case_OT_9:;
FREGISTER(&FS1);
COMMA();
LITREG(&FS2);
OPVALUE = OPVALUE | (FS1 & 7) << 16 | FS2;
goto U_1007;
case_OT_10:;
SETDS(1);
SETROUND();
FREGISTER(&FDST);
COMMA();
if (OPVALUE & 32768 != 0) goto L_0255;
FREGISTER(&FS1);
COMMA();
goto L_0256;
L_0255:;
FS1 = 0;
L_0256:;
LITREG(&FS2);
OPVALUE = OPVALUE | (FDST & 7) << 12 | (FS1 & 7) << 16 | FS2;
goto U_1007;
case_OT_M1:;
L_0257:;
if (LITERAL(&N)) goto L_0258;
MCERROR(_imp_str_literal("constant expected"));
L_0258:;
if (OPNUM != -1) goto L_0259;
DUMPBYTE(N & 255);
goto L_025A;
L_0259:;
if (OPNUM != -2) goto L_025B;
DUMPBYTE(N & 255);
DUMPBYTE((unsigned int)N >> 8 & 255);
goto L_025A;
L_025B:;
DUMPWORD(N);
L_025A:;
if (!(MATCH(44))) goto L_025C;
goto L_0257;
L_025C:;
if (*CA & 3 == 0) goto L_025D;
L_025E:;
DUMPBYTE(0);
if (*CA & 3 == 0) goto L_025F;
goto L_025E;
L_025F:;
WARN(0, _imp_str_literal("zero padding bytes added to ensure word alignment"));
L_025D:;
goto U_1008;
U_1007:;
DUMPWORD(OPVALUE);
U_1008:;
if (MATCH(59)) goto L_0260;
MCERROR(_imp_str_literal("Too many operands"));
L_0260:;
if (SYMP == OPLENGTH) goto L_0261;
MCERROR(_imp_str_literal("spurious operation qualifiers"));
L_0261:;
L_0262:;
} /* MACHINECODE */
int USES(int R, struct STACKFM *V) {
int N;
N = 0;
L_0262:;
if (&V == NIL) goto L_0263;
if (V != R) goto L_0264;
N = N + 1;
L_0264:;
if (&V == NIL) goto L_0265;
N = N + USES(R, &V);
L_0265:;
if (&V == NIL) goto L_0266;
N = N + USES(R, &V);
L_0266:;
V = &V;
goto L_0000;
L_0263:;
return N;
} /* USES */
void STOREREALCONSTANT(struct STACKFM * W) {
int N;
if (W != 0) goto L_0267;
if (W != 0) goto L_0267;
if (&W != NIL) goto L_0267;
if (&W != NIL) goto L_0267;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
SELECTCONSTANTAREA();
N = *CA;
DUMPWORD(W);
DUMPWORD(W);
SELECTCODEAREA();
W = N;
W = 512;
W = 1;
L_0267:;
} /* STOREREALCONSTANT */
int POTENTIALLYUNASSIGNED(struct STACKFM * V) {
if (UNASSIGNED != 0) goto L_0268;
return 0 /*FALSE*/;
L_0268:;
if (V & 128 == 0) goto L_0269;
return 0 /*FALSE*/;
L_0269:;
if (V != 1) goto L_026A;
if (V & 1048576 != 0) goto L_026B;
L_026A:;
return 0 /*FALSE*/;
L_026B:;
return 1 /*TRUE*/;
} /* POTENTIALLYUNASSIGNED */
void SIMPLE(struct STACKFM * FROM, struct STACKFM * TO) {
struct STACKFM *W;
W = COPY(&FROM);
MOVE(W, &TO);
RELEASEANDDROP(W);
} /* SIMPLE */
void LOADADDRESS(struct STACKFM * V, int R) {
AMAP(&V);
LOAD(&V, R);
} /* LOADADDRESS */
void PUSH(struct STACKFM * V) {
struct STACKFM S;
S = 0;
S.TYPE = 1;
S.FORM = 3;
S.BASE = 13;
STORE(&V, &S);
} /* PUSH */
void PUSHLITERAL(int LIT) {
struct STACKFM *L;
L = LITERAL(LIT);
PUSH(L);
RELEASEANDDROP(L);
} /* PUSHLITERAL */
void PUSHADDRESS(struct STACKFM * V) {
AMAP(V);
PUSH(V);
} /* PUSHADDRESS */
void POPSTACK(int BYTES) {
if (*BYTES != 0) goto L_026C;
return;
L_026C:;
if (*BYTES & 3 == 0) goto L_026D;
FAIL(_imp_str_literal("stack alignment"));
L_026D:;
PLANT1(8388608, 13, 13, ROT((unsigned int)*BYTES >> 2, 16 - 1));
} /* POPSTACK */
void LOADUPADDRESS(struct STACKFM * V) {
AMAP(V);
LOAD(V, 17);
} /* LOADUPADDRESS */
void LOADUP(struct STACKFM * FROM) {
int OPER;
struct STACKFM *W;
struct STACKFM *LHS;
if (FROM->TYPE != 13) goto L_026E;
if (FROM->OPER != 0) goto L_026F;
FAIL(_imp_str_literal("Bad set"));
L_026F:;
OPER = FROM->OPER;
W = FROM->LINK;
FROM->OPER = 0;
FROM->LINK = NIL;
if (FROM->FLAGS & 262144 != 0) goto L_0270;
LHS = CLAIMWORKAREA(32, 13);
LHS->FLAGS = LHS->FLAGS | 262144;
SETASSIGN(FROM, LHS);
RELEASE(FROM->BASE);
ZAPINDEXANDRECORD(FROM);
FROM->DATA = LHS->DATA;
DROP(LHS);
L_0270:;
LHS = COPY(FROM);
FROM->OPER = OPER;
FROM->LINK = W;
SETASSIGN(FROM, LHS);
RELEASEANDDROP(LHS);
goto L_0271;
L_026E:;
if (!(FLOATING(FROM))) goto L_0272;
LOAD(FROM, 26);
goto L_0271;
L_0272:;
LOAD(FROM, 17);
L_0271:;
} /* LOADUP */
void LOADPROTECTED(struct STACKFM * V) {
if (DIAG & 8 == 0) goto L_0273;
MONITOR(V, _imp_str_literal("->Load protected"));
L_0273:;
LOADUP(V);
if (ACTIVITY[V->BASE] == 1) goto L_0274;
if (V->TYPE < 6) goto L_0275;
LOAD(V, FPR());
goto L_0276;
L_0275:;
LOAD(V, GPR());
L_0276:;
L_0274:;
if (DIAG & 8 == 0) goto L_0277;
MONITOR(V, _imp_str_literal("<-Load protected"));
L_0277:;
} /* LOADPROTECTED */
void CONSTANTOPERATION(int OP, int *L, struct STACKFM *R) {
static const void *COP[29] = {
&&case_COP_default, &&case_COP_default, &&case_COP_default, &&case_COP_4, &&case_COP_5,
&&case_COP_6, &&case_COP_7, &&case_COP_8, &&case_COP_9, &&case_COP_10,
&&case_COP_11, &&case_COP_12, &&case_COP_default, &&case_COP_14, &&case_COP_15,
&&case_COP_16, &&case_COP_17, &&case_COP_18, &&case_COP_default, &&case_COP_default,
&&case_COP_default, &&case_COP_default, &&case_COP_default, &&case_COP_default, &&case_COP_default,
&&case_COP_default, &&case_COP_default, &&case_COP_default, &&case_COP_default};
int N;
N = R->DISP;
DROP(R);
goto *COP[OP - 1]; /*TO DO*/
case_COP_4:;
*L = *L + N;
goto U_1009;
case_COP_5:;
*L = *L - N;
goto U_1009;
case_COP_18:;
case_COP_6:;
*L = *L * N;
goto U_1009;
case_COP_9:;
*L = *L & N;
goto U_1009;
case_COP_12:;
*L = *L & (~N);
goto U_1009;
case_COP_10:;
*L = *L | N;
goto U_1009;
case_COP_11:;
*L = *L ^ N;
goto U_1009;
case_COP_14:;
*L = *L << N;
goto U_1009;
case_COP_15:;
*L = (unsigned int)*L >> N;
goto U_1009;
case_COP_8:;
if (N >= 0) goto L_0279;
FAIL(_imp_str_literal("Exp"));
L_0279:;
*L = _imp_IEXP(*L, N);
goto U_1009;
case_COP_17:;
if (N > 0) goto L_027A;
FAIL(_imp_str_literal("Illegal MOD"));
L_027A:;
if (*L >= 0) goto L_027B;
*L = N - _imp_REM(-*L, N);
if (*L != N) goto L_027C;
*L = 0;
L_027C:;
goto U_1009;
L_027B:;
case_COP_16:;
if (N != 0) goto L_027D;
FAIL(_imp_str_literal("Zero divide"));
L_027D:;
*L = _imp_REM(*L, N);
goto U_1009;
case_COP_7:;
if (N != 0) goto L_027E;
FAIL(_imp_str_literal("Zero divide"));
L_027E:;
*L = ((long)*L / (long)N);
goto U_1009;
case_COP_default:;
FAIL(_imp_str_literal("C-op"));
U_1009:;
} /* CONSTANTOPERATION */
void OPERATE(int NEWOPER, struct STACKFM *LHS, struct STACKFM *RHS) {
int OP;
int RCONST;
int KEY;
int LFLAGS;
int RFLAGS;
int N;
int FN;
struct STACKFM *W;
void SWOP(void) {
struct STACKFM TEMP;
TEMP.DATA = LHS->DATA;
LHS->DATA = RHS->DATA;
RHS->DATA = TEMP.DATA;
} /* SWOP */
void ZAP(void) {
DROP(W);
DROP(RHS);
LHS->LINK = NIL;
LHS->OPER = 0;
RHS = LITERAL(0);
SWOP();
RELEASEANDDROP(RHS);
} /* ZAP */
void REDUCECONSTANT(void) {
int OP;
int N;
int F;
void FIX(int OP) {
LHS->OPER = OP;
DROP(LHS->LINK);
LHS->LINK = NIL;
} /* FIX */
OP = LHS->OPER;
F = OPERFLAGS[OP - 1];
N = LHS->LINK->DISP;
if (F & 512 == 0) goto L_027F;
if (NULLVALUE[OP - 4] != N) goto L_027F;
FIX(0);
goto L_0280;
L_027F:;
if (OP != 6) goto L_0281;
if (N != 0) goto L_0282;
FIX(0);
RELEASE(LHS->BASE);
LHS->FORM = 0;
LHS->BASE = 0;
LHS->DISP = 0;
LHS->AREA = 0;
if (LHS->INDEX == NIL) goto L_0283;
RELEASEANDDROP(LHS->INDEX);
L_0283:;
if (LHS->RECORD == NIL) goto L_0284;
RELEASEANDDROP(LHS->RECORD);
L_0284:;
LHS->RECORD = NIL;
LHS->INDEX = NIL;
goto L_0285;
L_0282:;
if (N != -1) goto L_0286;
FIX(2);
L_0286:;
L_0285:;
goto L_0280;
L_0281:;
if (OP != 4) goto L_0287;
if (LHS->FORM != 0) goto L_0288;
FIX(0);
LHS->DISP = LHS->DISP + N;
L_0288:;
goto L_0280;
L_0287:;
if (OP != 9) goto L_0289;
if (LHS->FORM != 1) goto L_0289;
if (LHS->AREA != 0) goto L_0289;
if (LHS->TYPE != 4) goto L_028A;
N = N & 255;
L_028A:;
if (UNASSIGNED == 0) goto L_028B;
if (LHS->FLAGS & 1048576 == 0) goto L_028B;
if (LHS->FLAGS & 128 == 0) goto L_028C;
L_028B:;
if (N & -256 != 0) goto L_028D;
LHS->TYPE = 4;
if (N != 255) goto L_028E;
FIX(0);
L_028E:;
goto L_028F;
L_028D:;
if (N & -65281 != 0) goto L_0290;
if (LHS->TYPE != 2) goto L_0290;
LHS->TYPE = 4;
LHS->DISP = LHS->DISP + 1;
N = (unsigned int)N >> 8;
LHS->LINK->DISP = N;
if (N != 255) goto L_0291;
FIX(0);
L_0291:;
OPERATE(14, LHS, LITERAL(8));
L_0290:;
L_028F:;
L_028C:;
goto L_0280;
L_0289:;
if (OP != 11) goto L_0292;
if (N != -1) goto L_0292;
FIX(1);
L_0292:;
L_0280:;
} /* REDUCECONSTANT */
int FIELD(int AND, int SHIFT, int ANDFIRST) {
int R;
R = 0;
if (ANDFIRST == 0) goto L_0293;
AND = (unsigned int)AND >> SHIFT << SHIFT;
if (AND != 0) goto L_0294;
return -1;
L_0294:;
L_0295:;
if (AND & 1 != 0) goto L_0296;
AND = (unsigned int)AND >> 1;
R = R + 1;
goto L_0295;
L_0296:;
if (SHIFT >= R) goto L_0297;
return 0;
L_0297:;
goto L_0298;
L_0293:;
AND = (unsigned int)AND << SHIFT >> SHIFT;
if (AND != 0) goto L_0299;
return -1;
L_0299:;
L_0298:;
N = POWER(AND + 1);
if (N < 0) goto L_029A;
if (N <= 8) goto L_029B;
L_029A:;
return 0;
L_029B:;
return (N << 16) + SHIFT;
} /* FIELD */
if (DIAG & 16 == 0) goto L_029C;
MONITOR(LHS, _imp_str_literal("O-Lhs"));
MONITOR(RHS, _imp_str_literal("O-Rhs"));
L_029C:;
RFLAGS = OPERFLAGS[NEWOPER - 1];
if (RFLAGS & 32 == 0) goto L_029D;
if (!(ICONST(LHS))) goto L_029E;
if (NEWOPER != 2) goto L_029F;
LHS->DISP = -LHS->DISP;
goto L_02A0;
L_029F:;
if (NEWOPER != 1) goto L_02A1;
LHS->DISP = (~LHS->DISP);
goto L_02A0;
L_02A1:;
if (NEWOPER != 3) goto L_02A2;
LHS->DISP = _imp_IMOD(LHS->DISP);
goto L_02A0;
L_02A2:;
FAIL(_imp_str_literal("Operator"));
L_02A0:;
goto L_02A3;
L_029E:;
if (!(FLOATING(LHS))) goto L_02A4;
NEWOPER = NEWOPER + 21;
L_02A4:;
if (LHS->OPER == 0) goto L_02A5;
if (LHS->OPER != NEWOPER) goto L_02A6;
if (NEWOPER == 3) goto L_02A7;
if (NEWOPER == 24) goto L_02A7;
LHS->OPER = 0;
L_02A7:;
goto U_100A;
L_02A6:;
if (NEWOPER == 2) goto L_02A8;
if (NEWOPER != 1) goto L_02A9;
L_02A8:;
if (LHS->OPER == 2) goto L_02AA;
if (LHS->OPER != 1) goto L_02AB;
L_02AA:;
LHS->OPER = 0;
if (NEWOPER != 2) goto L_02AC;
NEWOPER = 4;
goto L_02AD;
L_02AC:;
NEWOPER = 5;
L_02AD:;
OPERATE(NEWOPER, LHS, LITERAL(1));
goto U_100A;
L_02AB:;
L_02A9:;
if (NEWOPER != 2) goto L_02AE;
if (LHS->OPER != 6) goto L_02AE;
if (!(ICONST(LHS->LINK))) goto L_02AE;
if (LHS->LINK->DISP == -2147483648) goto L_02AF;
LHS->LINK->DISP = -LHS->LINK->DISP;
goto U_100A;
L_02AF:;
L_02AE:;
LOADUP(LHS);
L_02A5:;
LHS->OPER = NEWOPER;
LHS->LINK = NIL;
L_02A3:;
goto U_100A;
L_029D:;
if (NEWOPER != 22) goto L_02B0;
if (RHS->BIAS != 1) goto L_02B1;
DROP(RHS);
return;
L_02B1:;
if (LHS->BIAS != 1) goto L_02B2;
if (LHS->LINK == NIL) goto L_02B3;
FAIL(_imp_str_literal("inconsistent concatenation"));
L_02B3:;
LHS->DATA = RHS->DATA;
DROP(RHS);
return;
L_02B2:;
if (LHS->OPER == 0) goto L_02B4;
if (LHS->OPER == 22) goto L_02B4;
LOADUP(LHS);
L_02B4:;
if (RHS->OPER == 0) goto L_02B5;
LOADUP(RHS);
L_02B5:;
L_02B6:;
if (LHS->OPER == 0) goto L_02B7;
LHS = LHS->LINK;
goto L_02B6;
L_02B7:;
LHS->OPER = 22;
LHS->LINK = RHS;
goto U_100A;
L_02B0:;
if (RFLAGS & 1 == 0) goto L_02B8;
if (!(ICONST(LHS))) goto L_02B8;
SWOP();
L_02B8:;
if (RHS->OPER == 0) goto L_02B9;
OP = RHS->OPER;
if (OP != 2) goto L_02BA;
if (NEWOPER == 4) goto L_02BB;
if (NEWOPER != 5) goto L_02BA;
L_02BB:;
NEWOPER = 4 + 5 - NEWOPER;
RFLAGS = OPERFLAGS[NEWOPER - 1];
RHS->OPER = 0;
goto L_02BC;
L_02BA:;
if (OP != 1) goto L_02BD;
if (NEWOPER != 9) goto L_02BD;
RHS->OPER = 0;
NEWOPER = 12;
goto L_02BC;
L_02BD:;
if (OP == 14) goto L_02BE;
if (OP != 15) goto L_02BF;
L_02BE:;
if (OPERFLAGS[NEWOPER - 1] & 4 == 0) goto L_02BF;
if (LHS->TYPE >= 6) goto L_02BF;
if (LHS->OPER >= 23) goto L_02BF;
W = RHS->LINK;
RHS->LINK = NIL;
RHS->OPER = 0;
LOADUP(LHS);
LOADUP(RHS);
if (!(ICONST(W))) goto L_02C0;
if (OP != 14) goto L_02C1;
N = ISHIFT(RHS->BASE, W->DISP, 0);
goto L_02C2;
L_02C1:;
N = ISHIFT(RHS->BASE, W->DISP, 32);
L_02C2:;
goto L_02C3;
L_02C0:;
LOADUP(W);
if (OP != 14) goto L_02C4;
N = RSHIFT(RHS->BASE, W->BASE, 144);
goto L_02C5;
L_02C4:;
N = RSHIFT(RHS->BASE, W->BASE, 176);
L_02C5:;
L_02C3:;
PLANT1(EASYOP[NEWOPER - 4], LHS->BASE, LHS->BASE, N);
RELEASEANDDROPPAIR(RHS, W);
return;
L_02BF:;
LOADUP(RHS);
L_02BC:;
L_02B9:;
if (!(ICONST(RHS))) goto L_02C6;
RCONST = 1;
if (NEWOPER != 5) goto L_02C7;
if (RHS->DISP == -2147483648) goto L_02C8;
RHS->DISP = -RHS->DISP;
NEWOPER = 4;
RFLAGS = OPERFLAGS[3];
L_02C8:;
L_02C7:;
if (OPERFLAGS[NEWOPER - 1] & 512 == 0) goto L_02C9;
if (NULLVALUE[NEWOPER - 4] != RHS->DISP) goto L_02C9;
DROP(RHS);
return;
L_02C9:;
goto L_02CA;
L_02C6:;
RCONST = 0;
L_02CA:;
if (LHS->OPER == 0) goto L_02CB;
OP = LHS->OPER;
LFLAGS = OPERFLAGS[OP - 1];
W = LHS->LINK;
if (OP != 2) goto L_02CC;
if (NEWOPER != 6) goto L_02CC;
LHS->OPER = 0;
OPERATE(6, LHS, RHS);
OPERATE(2, LHS, NIL);
return;
L_02CC:;
if (LFLAGS & 32 != 0) goto L_02CD;
if (!(ICONST(W))) goto L_02CD;
if (RCONST == 0) goto L_02CE;
if (NEWOPER >= 23) goto L_02CE;
KEY = (LFLAGS | RFLAGS) & 384;
if (KEY == 0) goto L_02CF;
if (KEY != 256) goto L_02D0;
if (NEWOPER != OP) goto L_02D0;
L_02CF:;
if (RHS->BASE == 0) goto L_02D1;
if (NEWOPER != 4) goto L_02D2;
L_02D1:;
CONSTANTOPERATION(NEWOPER, &W->DISP, RHS);
if (RHS->BASE != 0) goto L_02D3;
REDUCECONSTANT();
L_02D3:;
goto U_100A;
L_02D2:;
L_02D0:;
if (OP != 14) goto L_02D4;
if (NEWOPER != 9) goto L_02D4;
if (-31 > W->DISP) goto L_02D4;
if (W->DISP > 0) goto L_02D4;
N = FIELD(RHS->DISP, -W->DISP, 0);
if (N == 0) goto L_02D5;
if (N != -1) goto L_02D6;
ZAP();
goto U_100A;
L_02D6:;
W->DISP = N;
LHS->OPER = 21;
DROP(RHS);
goto U_100A;
L_02D5:;
L_02D4:;
if (OP != 9) goto L_02D7;
if (NEWOPER != 15) goto L_02D7;
if (0 > RHS->DISP) goto L_02D7;
if (RHS->DISP > 31) goto L_02D7;
N = FIELD(W->DISP, RHS->DISP, 1);
if (N == 0) goto L_02D8;
if (N != -1) goto L_02D9;
ZAP();
goto U_100A;
L_02D9:;
W->DISP = N;
LHS->OPER = 21;
DROP(RHS);
goto U_100A;
L_02D8:;
L_02D7:;
L_02CE:;
L_02CD:;
if (OP == 14) goto L_02DA;
if (OP != 15) goto L_02DB;
L_02DA:;
if (OPERFLAGS[NEWOPER - 1] & 4 == 0) goto L_02DB;
if (NEWOPER == 12) goto L_02DB;
if (RHS->TYPE >= 6) goto L_02DB;
LHS->LINK = NIL;
LHS->OPER = 0;
LOADUP(LHS);
LOADUP(RHS);
if (!(ICONST(W))) goto L_02DC;
if (OP != 14) goto L_02DD;
N = ISHIFT(LHS->BASE, W->DISP, 0);
goto L_02DE;
L_02DD:;
N = ISHIFT(LHS->BASE, W->DISP, 32);
L_02DE:;
goto L_02DF;
L_02DC:;
LOADUP(W);
if (OP != 14) goto L_02E0;
N = RSHIFT(LHS->BASE, W->BASE, 144);
goto L_02E1;
L_02E0:;
N = RSHIFT(LHS->BASE, W->BASE, 176);
L_02E1:;
L_02DF:;
FN = EASYOP[NEWOPER - 4];
if (NEWOPER != 5) goto L_02E2;
FN = 6291456;
L_02E2:;
PLANT1(FN, RHS->BASE, LHS->BASE, N);
RELEASEANDDROPPAIR(RHS, W);
return;
L_02DB:;
LOADUP(LHS);
L_02CB:;
if (!(ICONST(LHS))) goto L_02E3;
if (RCONST == 0) goto L_02E3;
if (NEWOPER >= 23) goto L_02E3;
CONSTANTOPERATION(NEWOPER, &LHS->DISP, RHS);
goto U_100A;
L_02E3:;
if (LHS->TYPE >= 6) goto L_02E4;
if (RHS->TYPE < 6) goto L_02E5;
L_02E4:;
if (NEWOPER >= 23) goto L_02E6;
NEWOPER = NEWOPER + 21;
L_02E6:;
if (LHS->TYPE != 13) goto L_02E7;
if (LHS->FLAGS != 16384) goto L_02E8;
if (NEWOPER != 25) goto L_02E9;
SWOP();
L_02E9:;
RHS->TYPE = 0;
goto L_02EA;
L_02E8:;
if (RHS->FLAGS != 16384) goto L_02EB;
if (NEWOPER != 27) goto L_02EC;
SWOP();
L_02EC:;
RHS->TYPE = 0;
L_02EB:;
L_02EA:;
LHS->OPER = NEWOPER;
LHS->LINK = RHS;
if (RHS->TYPE != 0) goto L_02ED;
LHS->OPER = 0;
LHS->LINK = NIL;
DROPMEMBERS(RHS);
RELEASEANDDROP(RHS);
L_02ED:;
goto U_100A;
L_02E7:;
L_02E5:;
if (RFLAGS & 1 == 0) goto L_02EE;
if (!(INREG(RHS))) goto L_02EE;
SWOP();
RCONST = 0;
if (!(ICONST(RHS))) goto L_02EF;
RCONST = 1;
L_02EF:;
L_02EE:;
if (NEWOPER != 5) goto L_02F0;
if (LHS->FORM != 0) goto L_02F0;
if (0 != RHS->FORM) goto L_02F0;
if (LHS->BASE != RHS->BASE) goto L_02F1;
if (LHS->AREA != RHS->AREA) goto L_02F1;
if (!(SAME(LHS->INDEX, RHS->INDEX))) goto L_02F2;
if (!(SAME(LHS->RECORD, RHS->RECORD))) goto L_02F2;
if (LHS->XSIZE != RHS->XSIZE) goto L_02F2;
LHS->DISP = LHS->DISP - RHS->DISP;
RELEASEANDDROP(RHS);
if (LHS->INDEX == NIL) goto L_02F3;
RELEASEANDDROP(LHS->INDEX);
L_02F3:;
if (LHS->RECORD == NIL) goto L_02F4;
RELEASEANDDROP(LHS->RECORD);
L_02F4:;
LHS->BASE = 0;
LHS->XSIZE = 0;
goto U_100A;
L_02F2:;
L_02F1:;
L_02F0:;
LHS->OPER = NEWOPER;
LHS->LINK = RHS;
if (RCONST == 0) goto L_02F5;
REDUCECONSTANT();
L_02F5:;
U_100A:;
if (DIAG & 16 == 0) goto L_02F6;
MONITOR(LHS, _imp_str_literal("<-Operate"));
L_02F6:;
} /* OPERATE */
void AOP(void) {
int TYPE;
int FORMAT;
int SIZE;
struct STACKFM *X;
X = STACK;
STACK = X->STACK;
SIZE = ITEMSIZE(STACK->FORMAT);
if (STACK->INDEX != NIL) goto L_02F7;
STACK->INDEX = X;
STACK->XSIZE = SIZE;
goto L_02F8;
L_02F7:;
if (STACK->XSIZE != SIZE) goto L_02F9;
OPERATE(4, STACK->INDEX, X);
goto L_02F8;
L_02F9:;
TYPE = STACK->TYPE;
FORMAT = STACK->FORMAT;
AMAP(STACK);
OPERATE(6, X, LITERAL(SIZE));
OPERATE(4, STACK, X);
VMAP(STACK, TYPE);
STACK->FORMAT = FORMAT;
L_02F8:;
} /* AOP */
void OPERATION(int OPER) {
struct STACKFM *V;
V = STACK;
STACK = STACK->STACK;
OPERATE(OPER, STACK, V);
} /* OPERATION */
void REPLACE(struct STACKFM * OLD, struct STACKFM * NEW) {
ZAPINDEXANDRECORD(OLD);
RELEASE(OLD->BASE);
OLD->BASE = NEW->BASE;
OLD->DISP = NEW->DISP;
OLD->EXTRA = NEW->EXTRA;
OLD->TYPE = NEW->TYPE;
OLD->FORM = NEW->FORM;
OLD->FORMAT = NEW->FORMAT;
OLD->AREA = NEW->AREA;
OLD->OPER = 0;
OLD->LINK = NIL;
DROP(NEW);
} /* REPLACE */
int MEMORABLE(struct STACKFM * V, struct KNOWFM * K) {
int OP;
OP = 0;
int SCALE;
SCALE = 0;
if (V->OPER == 0) goto L_02FA;
if (V->LINK == NIL) goto L_02FB;
if (ICONST(V->LINK)) goto L_02FC;
L_02FB:;
return 0 /*FALSE*/;
L_02FC:;
OP = V->OPER;
SCALE = V->LINK->DISP;
L_02FA:;
if (V->INDEX != NIL) goto L_02FD;
if (V->RECORD != NIL) goto L_02FD;
if (V->FORM < 2) goto L_02FE;
L_02FD:;
return 0 /*FALSE*/;
L_02FE:;
K = (V->TYPE << 4) + V->FORM;
K = V->BASE;
K = V->DISP;
K = V->EXTRA;
K = V->AREA;
K = SCALE;
K = OP;
if (!(ICONST(V))) goto L_02FF;
K = (1 << 4) + 0;
L_02FF:;
return 1 /*TRUE*/;
} /* MEMORABLE */
void OPTIMISE(struct STACKFM * V, int SWANTED) {
struct KNOWFM *P;
struct KNOWFM M;
struct STACKFM *W;
int OP;
P = KNOWING;
if (P != NIL) goto L_0300;
return;
L_0300:;
if (V->OPER == 0) goto L_0301;
OP = V->OPER;
V->OPER = 0;
W = V->LINK;
V->LINK = NIL;
OPTIMISE(V, 1);
if (W == NIL) goto L_0302;
OPTIMISE(W, 1);
L_0302:;
V->OPER = OP;
V->LINK = W;
L_0301:;
if (V->RECORD == NIL) goto L_0303;
OPTIMISE(V->RECORD, 1);
if (V->RECORD->FORM != 0) goto L_0304;
SIMPLIFY(V);
P = KNOWING;
if (P != NIL) goto L_0305;
return;
L_0305:;
L_0304:;
L_0303:;
if (MEMORABLE(V, &M)) goto L_0306;
return;
L_0306:;
if (DIAG & 128 == 0) goto L_0307;
MONITOR(V, _imp_str_literal("Opt"));
L_0307:;
void SET(int FORM) {
if (V->OPER == 0) goto L_0308;
RELEASEANDDROP(V->LINK);
V->OPER = 0;
V->LINK = NIL;
L_0308:;
if (FORM != 0) goto L_0309;
if (V->TYPE > 5) goto L_0309;
V->TYPE = 1;
L_0309:;
V->FORM = FORM;
RELEASE(V->BASE);
V->AREA = 0;
V->DISP = 0;
V->BASE = P->REG;
if (P->REG != PENDINGAUTO) goto L_030A;
PENDINGAUTO = 0;
L_030A:;
CLAIM(V->BASE);
if (DIAG & 128 == 0) goto L_030B;
MONITOR(V, _imp_str_literal("Opt->"));
L_030B:;
} /* SET */
L_030C:;
if (P->DISP != M.DISP) goto L_030D;
if (P->AREA != M.AREA) goto L_030D;
if (P->EXTRA != M.EXTRA) goto L_030D;
if (P->OPER != M.OPER) goto L_030D;
if (P->BASE != M.BASE) goto L_030D;
if (P->OPND != M.OPND) goto L_030D;
if (P->FTYPE != M.FTYPE) goto L_030E;
if (SWANTED == 0) goto L_030E;
SET(0);
return;
L_030E:;
if (M.OPER != 0) goto L_030F;
if (M.FTYPE & 15 == 0) goto L_030F;
if (P->FTYPE != (1 << 4) + 0) goto L_0310;
SET(V->FORM);
if (SWANTED == 0) goto L_0311;
OPTIMISE(V, 1);
L_0311:;
return;
L_0310:;
L_030F:;
L_030D:;
P = P->LINK;
if (P == NIL) goto L_0312;
goto L_030C;
L_0312:;
} /* OPTIMISE */
struct KNOWFM *NEWK(void) {
struct KNOWFM *P;
P = KASL;
if (P != NIL) goto L_0313;
P = _imp_NEW(KNOWFMTYPE);
*P = 0;
goto L_0314;
L_0313:;
KASL = P->LINK;
L_0314:;
return P;
} /* NEWK */
void KINC(struct KNOWFM * K) {
KTIMES[K->REG] = KTIMES[K->REG] + 1;
if (K->BASE & 128 != 0) goto L_0315;
KTIMES[K->BASE] = KTIMES[K->BASE] + 1;
L_0315:;
} /* KINC */
void KDEC(struct KNOWFM * K) {
KTIMES[K.REG] = KTIMES[K.REG] - 1;
if (K.BASE & 128 != 0) goto L_0316;
KTIMES[K.BASE] = KTIMES[K.BASE] - 1;
L_0316:;
} /* KDEC */
void FORGET(int REGISTER) {
int *N;
struct KNOWFM *K;
struct KNOWFM *R;
if (1 > REGISTER) goto L_0317;
if (REGISTER <= 25) goto L_0318;
L_0317:;
return;
L_0318:;
if (PENDINGAUTO != REGISTER) goto L_0319;
PENDINGAUTO = 0;
L_0319:;
N = &KTIMES[REGISTER];
USED[REGISTER] = 0;
if (*N != 0) goto L_031A;
return;
L_031A:;
K = KNOWING;
KNOWING = NIL;
L_031B:;
if (K == NIL) goto L_031C;
R = K;
K = K->LINK;
if (R->REG == REGISTER) goto L_031D;
if (R->BASE != REGISTER) goto L_031E;
L_031D:;
R->LINK = KASL;
KASL = R;
KDEC(R);
if (DIAG & 128 == 0) goto L_031F;
MONREGID(R->REG, _imp_str_literal("Forgotten"));
L_031F:;
goto L_0320;
L_031E:;
R->LINK = KNOWING;
KNOWING = R;
L_0320:;
goto L_031B;
L_031C:;
if (*N == 0) goto L_0321;
FAIL(_imp_str_literal("Register still known"));
L_0321:;
} /* FORGET */
void FORGETEVERYTHING(void) {
struct KNOWFM *K;
PENDINGAUTO = 0;
K = KNOWING;
if (K == NIL) goto L_0322;
L_0323:;
USED[K->REG] = 0;
if (K->BASE & 128 != 0) goto L_0324;
USED[K->BASE] = 0;
L_0324:;
KDEC(K);
if (K->LINK != NIL) goto L_0325;
goto L_0326;
L_0325:;
K = K->LINK;
goto L_0323;
L_0326:;
K->LINK = KASL;
KASL = KNOWING;
KNOWING = NIL;
L_0322:;
} /* FORGETEVERYTHING */
void INHERIT(int NEW, int OLD) {
struct KNOWFM *P;
struct KNOWFM *K;
struct KNOWFM *X;
if (*NEW != *OLD) goto L_0327;
return;
L_0327:;
USED[*NEW] = USEDTIME;
P = KNOWING;
L_0328:;
if (P == NIL) goto L_0329;
K = P;
P = K->LINK;
if (K->REG != *OLD) goto L_032A;
if (DIAG & 128 == 0) goto L_032B;
MONREGID(*OLD, _imp_str_literal("inherited"));
L_032B:;
X = NEWK();
if (X != NIL) goto L_032C;
return;
L_032C:;
*X = *K;
X->REG = *NEW;
X->LINK = KNOWING;
KNOWING = X;
KINC(X);
L_032A:;
goto L_0328;
L_0329:;
} /* INHERIT */
void REMEMBER(int REGISTER, struct STACKFM *V) {
struct KNOWFM *K;
struct KNOWFM M;
if (1 > *REGISTER) goto L_032D;
if (*REGISTER > 25) goto L_032D;
if (*REGISTER != 17) goto L_032E;
L_032D:;
return;
L_032E:;
USED[*REGISTER] = USEDTIME;
if (!(INREG(V))) goto L_032F;
INHERIT(*REGISTER, V->OPER);
return;
L_032F:;
if (*REGISTER != V->OPER) goto L_0330;
return;
L_0330:;
if (!(MEMORABLE(V, &M))) goto L_0331;
K = NEWK();
if (K != NIL) goto L_0332;
return;
L_0332:;
*K = M;
K->REG = *REGISTER;
K->LINK = KNOWING;
KNOWING = K;
KINC(K);
if (DIAG & 128 == 0) goto L_0333;
MONITOR(V, _imp_join((_imp_string)(_imp_str_literal("Remember ")), (_imp_string)(REGID[*REGISTER])));
L_0333:;
L_0331:;
} /* REMEMBER */
void REMEMBERZERO(int REGISTER) {
struct STACKFM *ZERO;
ZERO = LITERAL(0);
FORGET(*REGISTER);
REMEMBER(*REGISTER, ZERO);
DROP(ZERO);
} /* REMEMBERZERO */
void FORGETDESTINATION(struct STACKFM * V) {
int LOW;
int HIGH;
int BASE;
BASE = V;
int UNSAFE;
UNSAFE = 0;
int ALTER;
struct KNOWFM *P;
struct KNOWFM *K;
if (DIAG & 128 == 0) goto L_0334;
MONITOR(V, _imp_str_literal("Forget Dest"));
L_0334:;
if (!(INREG(V))) goto L_0335;
FORGET(V);
return;
L_0335:;
LOW = V;
HIGH = LOW + ITEMSIZE(V) - 1;
if (HIGH >= LOW) goto L_0336;
HIGH = LOW + 3;
L_0336:;
P = KNOWING;
KNOWING = NIL;
if (INTERFACE->OPTIONS & 1 != 0) goto L_0337;
if (V >= 128) goto L_0338;
if (ACTIVITY[V] < 0) goto L_0338;
UNSAFE = 1;
goto L_0339;
L_0338:;
if (&V == NIL) goto L_033A;
UNSAFE = 1;
L_033A:;
L_0339:;
if (DIAG & 128 == 0) goto L_033B;
MONITORN(UNSAFE, _imp_str_literal("Unsafe"));
L_033B:;
L_0337:;
L_033C:;
if (P == NIL) goto L_033D;
K = P;
P = P->LINK;
ALTER = 0;
if (K->BASE >= 128) goto L_033E;
if (ACTIVITY[K->BASE] < 0) goto L_033E;
ALTER = UNSAFE;
L_033E:;
if (K->FTYPE & 15 == 0) goto L_033F;
if (K->BASE != BASE) goto L_0340;
if (LOW > K->DISP) goto L_0340;
if (K->DISP > HIGH) goto L_0340;
ALTER = 1;
L_0340:;
L_033F:;
if (ALTER == 0) goto L_0341;
KDEC(K);
K->LINK = KASL;
KASL = K;
if (DIAG & 128 == 0) goto L_0342;
MONREGID(K->REG, _imp_str_literal("Altered"));
L_0342:;
goto L_0343;
L_0341:;
K->LINK = KNOWING;
KNOWING = K;
L_0343:;
goto L_033C;
L_033D:;
} /* FORGETDESTINATION */
void FORGETENVIRONMENT(int LABEL) {
struct LABELFM *L;
struct KNOWFM *P;
struct KNOWFM *E;
L = ILABEL(LABEL);
P = L->ENV;
L->ENV = NIL;
if (P == NIL) goto L_0344;
E = P;
L_0345:;
if (P->LINK == NIL) goto L_0346;
P = P->LINK;
goto L_0345;
L_0346:;
P->LINK = KASL;
KASL = E;
L_0344:;
} /* FORGETENVIRONMENT */
void REMEMBERENVIRONMENT(int LABEL) {
struct KNOWFM *K;
struct KNOWFM *TOP;
TOP = NIL;
struct KNOWFM *P;
FORGETENVIRONMENT(*LABEL);
K = KNOWING;
L_0347:;
if (K == NIL) goto L_0348;
P = NEWK();
*P = *K;
P->LINK = TOP;
TOP = P;
if (DIAG & 128 == 0) goto L_0349;
MONREGID(P->REG, _imp_str_literal("in env"));
L_0349:;
K = K->LINK;
goto L_0347;
L_0348:;
ILABEL(*LABEL)->ENV = TOP;
} /* REMEMBERENVIRONMENT */
void MERGEENVIRONMENT(int LABEL) {
struct LABELFM *L;
struct KNOWFM *P;
struct KNOWFM *K;
struct KNOWFM *NEXT;
struct KNOWFM *TOP;
if (DIAG & 128 == 0) goto L_034A;
MONITOR(NIL, _imp_str_literal("merge"));
L_034A:;
if (KNOWING != NIL) goto L_034B;
FORGETENVIRONMENT(*LABEL);
goto L_034C;
L_034B:;
L = ILABEL(*LABEL);
TOP = NIL;
NEXT = L->ENV;
L_034D:;
P = NEXT;
if (P != NIL) goto L_034E;
goto L_034F;
L_034E:;
NEXT = P->LINK;
K = KNOWING;
L_0350:;
if (K->REG != P->REG) goto L_0351;
if (K->DISP != P->DISP) goto L_0351;
if (K->BASE != P->BASE) goto L_0351;
if (K->FTYPE != P->FTYPE) goto L_0351;
if (K->AREA != P->AREA) goto L_0351;
if (K->OPND != P->OPND) goto L_0351;
if (K->OPER != P->OPER) goto L_0351;
P->LINK = TOP;
TOP = P;
if (DIAG & 128 == 0) goto L_0352;
MONREGID(P->REG, _imp_str_literal("Merged"));
L_0352:;
goto U_100B;
L_0351:;
K = K->LINK;
if (K == NIL) goto L_0353;
goto L_0350;
L_0353:;
P->LINK = KASL;
KASL = P;
U_100B:;
goto L_034D;
L_034F:;
L->ENV = TOP;
L_034C:;
} /* MERGEENVIRONMENT */
void RESTOREENVIRONMENT(int LABEL) {
struct KNOWFM *P;
struct KNOWFM *K;
struct KNOWFM *NEXT;
FORGETEVERYTHING();
NEXT = ILABEL(*LABEL)->ENV;
L_0354:;
P = NEXT;
if (P != NIL) goto L_0355;
return;
L_0355:;
NEXT = P->LINK;
K = NEWK();
*K = *P;
K->LINK = KNOWING;
KNOWING = K;
KINC(K);
if (DIAG & 128 == 0) goto L_0356;
MONREGID(P->REG, _imp_str_literal("back"));
L_0356:;
goto L_0354;
} /* RESTOREENVIRONMENT */
void CLAIM(int REGISTER) {
if (1 > *REGISTER) goto L_0357;
if (*REGISTER > 26) goto L_0357;
if (ACTIVITY[*REGISTER] >= 0) goto L_0358;
L_0357:;
return;
L_0358:;
ACTIVITY[*REGISTER] = ACTIVITY[*REGISTER] + 1;
ACTIVEREGISTERS = ACTIVEREGISTERS + 1;
USEDTIME = USEDTIME + 1;
USED[*REGISTER] = USEDTIME;
if (DIAG & 4 == 0) goto L_0359;
MONITORREGISTER(*REGISTER, _imp_str_literal("Claimed"));
L_0359:;
} /* CLAIM */
void RELEASE(int REGISTER) {
if (1 > *REGISTER) goto L_035A;
if (*REGISTER > 26) goto L_035A;
if (ACTIVITY[*REGISTER] >= 0) goto L_035B;
L_035A:;
return;
L_035B:;
ACTIVITY[*REGISTER] = ACTIVITY[*REGISTER] - 1;
if (ACTIVITY[*REGISTER] >= 0) goto L_035C;
FAIL(_imp_str_literal("Register not claimed"));
L_035C:;
if (DIAG & 4 == 0) goto L_035D;
MONITORREGISTER(*REGISTER, _imp_str_literal("Released"));
L_035D:;
ACTIVEREGISTERS = ACTIVEREGISTERS - 1;
if (ACTIVEREGISTERS >= 0) goto L_035E;
FAIL(_imp_str_literal("Register unclaimed"));
L_035E:;
} /* RELEASE */
void TOSTORE(int CODE) {
if (*CODE == 0) goto L_035F;
if (*CODE != 3) goto L_0360;
if (STACK->TYPE != 4) goto L_0361;
LOADUP(STACK);
L_0361:;
goto L_0362;
L_0360:;
if (*CODE != 1) goto L_0363;
if (STACK->TYPE == 4) goto L_0364;
if (STACK->TYPE != 2) goto L_0365;
L_0364:;
LOADUP(STACK);
L_0365:;
L_0363:;
L_0362:;
L_035F:;
if (STACK->FORM == 0) goto L_0366;
if (STACK->OPER != 0) goto L_0366;
if (STACK->INDEX == NIL) goto L_0367;
L_0366:;
if (STACK->TYPE == 8) goto L_0368;
if (STACK->TYPE != 9) goto L_0369;
L_0368:;
EVALUATESTRINGEXPRESSION(STACK);
goto L_036A;
L_0369:;
LOADUP(STACK);
HAZARD(STACK->BASE);
L_036A:;
L_0367:;
} /* TOSTORE */
void PESSIMISE(struct STACKFM * V) {
int REG;
int N;
int DISP;
struct KNOWFM *K;
struct STACKFM *T;
if (DIAG & 8 == 0) goto L_036B;
MONITOR(V, _imp_str_literal("Pessimise->"));
L_036B:;
if (INREG(V)) goto L_036C;
FAIL(_imp_str_literal("Not loaded"));
L_036C:;
REG = V->OPER;
N = KTIMES[REG];
K = KNOWING;
if (N != 0) goto L_036D;
K = NIL;
L_036D:;
L_036E:;
if (K != NIL) goto L_036F;
if (N == 0) goto L_0370;
FAIL(_imp_str_literal("corrupt knowing"));
L_0370:;
REG = V->OPER;
if (1 > REG) goto L_0371;
if (REG > 16) goto L_0371;
T = CLAIMWORKAREA(4, 1);
goto L_0372;
L_0371:;
T = CLAIMWORKAREA(2 * 4, 7);
L_0372:;
DISP = T->DISP;
SIMPLE(V, T);
RELEASE(REG);
V->OPER = *LOCAL;
V = DISP;
V->OPND = 1;
DROP(T);
goto L_0373;
L_036F:;
if (K->REG != REG) goto L_0374;
N = N - 1;
if (K->OPER != 0) goto L_0375;
if (0 != K->OPND) goto L_0375;
if (K->FTYPE != (V->AREA << 4) + 1) goto L_0376;
if (K->AREA != V) goto L_0376;
if (!(LOCKED(K->BASE))) goto L_0376;
RELEASE(REG);
V->OPER = K->BASE;
V = K->DISP;
V = K->EXTRA;
V->OPND = 1;
V->BASE = 128;
CLAIM(V->OPER);
goto L_0373;
L_0376:;
if (K->FTYPE != (1 << 4) + 0) goto L_0377;
if (K->BASE != 0) goto L_0377;
if (K->AREA != 0) goto L_0377;
RELEASE(REG);
V->OPER = 0;
V = K->DISP;
V->OPND = 0;
V = 0;
V->BASE = 128;
goto L_0373;
L_0377:;
L_0375:;
goto L_0378;
L_0374:;
if (K->BASE != REG) goto L_0379;
N = N - 1;
L_0379:;
L_0378:;
K = K->LINK;
goto L_036E;
L_0373:;
if (DIAG & 8 == 0) goto L_037A;
MONITOR(V, _imp_str_literal("Pessimise<-"));
L_037A:;
} /* PESSIMISE */
void HAZARD(int REG) {
int REGISTER;
REGISTER = _imp_MOD(*REG);
struct STACKFM *U;
struct STACKFM *R;
int *N;
int DISP;
int STORED;
STORED = 0;
void STORE(void) {
struct STACKFM *T;
if (STORED == 0) goto L_037B;
return;
L_037B:;
STORED = 1;
if (1 > REGISTER) goto L_037C;
if (REGISTER > 16) goto L_037C;
T = CLAIMWORKAREA(4, 1);
goto L_037D;
L_037C:;
T = CLAIMWORKAREA(2 * 4, 7);
L_037D:;
DISP = T->DISP;
SIMPLE(®V[REGISTER], T);
RELEASEANDDROP(T);
} /* STORE */
if (DIAG & 4 == 0) goto L_037E;
MONITORREGISTER(REGISTER, _imp_str_literal("Hazard"));
L_037E:;
N = &ACTIVITY[REGISTER];
if (*N > 0) goto L_037F;
return;
L_037F:;
U = USING;
L_0380:;
if (U == NIL) goto L_0381;
if (U->BASE != REGISTER) goto L_0382;
if (DIAG & 4 == 0) goto L_0383;
MONITOR(U, _imp_str_literal("Hazarding"));
L_0383:;
if (*N != 1) goto L_0384;
if (STORED != 0) goto L_0384;
if (!(INREG(U))) goto L_0384;
PESSIMISE(U);
return;
L_0384:;
STORE();
if (U->FORM != 0) goto L_0385;
if (U->DISP != 0) goto L_0385;
if (U->INDEX != NIL) goto L_0385;
U->FORM = 1;
U->BASE = *LOCAL;
U->DISP = DISP;
goto L_0386;
L_0385:;
if (U->RECORD == NIL) goto L_0387;
FAIL(_imp_str_literal("Corrupt record"));
L_0387:;
R = LOCALINTEGER(DISP);
R->FLAGS = 16;
U->BASE = 0;
U->RECORD = R;
L_0386:;
RELEASE(REGISTER);
L_0382:;
U = U->USING;
goto L_0380;
L_0381:;
if (*N == 0) goto L_0388;
if (*N == 0) goto L_0389;
FAIL(_imp_str_literal("Use lost"));
L_0389:;
L_0388:;
} /* HAZARD */
void HAZARDALL(void) {
HAZARD(1);
HAZARD(2);
HAZARD(3);
HAZARD(4);
if (ACTIVEREGISTERS != 0) goto L_038A;
return;
L_038A:;
HAZARD(5);
HAZARD(6);
HAZARD(7);
HAZARD(8);
if (ACTIVEREGISTERS != 0) goto L_038B;
return;
L_038B:;
HAZARD(9);
HAZARD(12);
HAZARD(15);
if (ACTIVEREGISTERS != 0) goto L_038C;
return;
L_038C:;
HAZARD(18);
HAZARD(19);
HAZARD(20);
HAZARD(21);
if (ACTIVEREGISTERS != 0) goto L_038D;
return;
L_038D:;
HAZARD(22);
HAZARD(23);
HAZARD(24);
HAZARD(25);
} /* HAZARDALL */
struct STACKFM *DESCRIPTOR(void) {
struct STACKFM *V;
if (DASL != NIL) goto L_038E;
DASL = _imp_NEW(STACKFMTYPE);
DASL->USING = NIL;
L_038E:;
V = DASL;
DASL = V->USING;
*V = 0;
V->USING = USING;
USING = V;
return V;
} /* DESCRIPTOR */
void DROPALL(struct STACKFM * V) {
if (V->INDEX == NIL) goto L_038F;
DROPALL(V->INDEX);
V->INDEX = NIL;
L_038F:;
if (V->RECORD == NIL) goto L_0390;
DROPALL(V->RECORD);
V->RECORD = NIL;
L_0390:;
DROP(V);
} /* DROPALL */
void DROP(struct STACKFM * V) {
struct STACKFM *P;
struct STACKFM *E;
if (DIAG & 2 == 0) goto L_0391;
MONITOR(V, _imp_str_literal("Drop"));
L_0391:;
ZAPINDEXANDRECORD(V);
if (USING != V) goto L_0392;
USING = V->USING;
goto L_0393;
L_0392:;
P = USING;
L_0394:;
if (P != NIL) goto L_0395;
FAIL(_imp_str_literal("Not in use"));
L_0395:;
E = P;
P = P->USING;
if (P == V) goto L_0396;
goto L_0394;
L_0396:;
E->USING = P->USING;
L_0393:;
V->USING = DASL;
DASL = V;
} /* DROP */
void RELEASEANDDROP(struct STACKFM * V) {
if (V->LINK == NIL) goto L_0397;
RELEASEANDDROP(V->LINK);
L_0397:;
RELEASE(V->BASE);
DROP(V);
} /* RELEASEANDDROP */
void ZAPINDEXANDRECORD(struct STACKFM * V) {
if (V->INDEX == NIL) goto L_0398;
RELEASEANDDROP(V->INDEX);
V->INDEX = NIL;
L_0398:;
if (V->RECORD == NIL) goto L_0399;
RELEASEANDDROP(V->RECORD);
V->RECORD = NIL;
L_0399:;
} /* ZAPINDEXANDRECORD */
void RELEASEANDDROPPAIR(struct STACKFM * A, struct STACKFM * B) {
RELEASEANDDROP(A);
RELEASEANDDROP(B);
} /* RELEASEANDDROPPAIR */
void POPRELEASEANDDROP(void) {
struct STACKFM *S;
S = STACK;
STACK = S->STACK;
RELEASEANDDROP(S);
} /* POPRELEASEANDDROP */
void DROPMEMBERS(struct STACKFM * S) {
struct MEMBERFM *M;
struct MEMBERFM *X;
M = S->MEMBERS;
S->MEMBERS = NIL;
L_039A:;
if (M == NIL) goto L_039B;
X = M;
M = M->LINK;
if (X->CONST == 0) goto L_039C;
DROP(X->A);
if (X->B == NIL) goto L_039D;
DROP(X->B);
L_039D:;
goto L_039E;
L_039C:;
RELEASEANDDROP(X->A);
if (X->B == NIL) goto L_039F;
RELEASEANDDROP(X->B);
L_039F:;
L_039E:;
_imp_DISPOSE(X);
goto L_039A;
L_039B:;
} /* DROPMEMBERS */
void APPLYINDIRECTION(void) {
struct STACKFM *W;
W = STACK;
STACK = DESCRIPTOR();
STACK->STACK = W->STACK;
STACK->TYPE = W->TYPE;
STACK->FORM = 1;
STACK->RECORD = W;
STACK->FORMAT = W->FORMAT;
W->TYPE = 1;
W->FORM = 1;
W->FORMAT = 0;
} /* APPLYINDIRECTION */
void STACKTRUEORFALSE(int CC) {
int OTHER;
int R;
int LAB;
struct STACKFM *V;
V = LITERAL(0);
OPTIMISE(V, 1);
if (!(INREG(V))) goto L_03A0;
*CC = NEGATED[*CC];
OTHER = 1;
goto L_03A1;
L_03A0:;
V->DISP = 1;
OTHER = 0;
L_03A1:;
LOADPROTECTED(V);
R = V->BASE;
RELEASEANDDROP(V);
if (ACTIVITY[R] == 0) goto L_03A2;
FAIL(_imp_str_literal("register active"));
L_03A2:;
LAB = NEWLABEL();
JUMPTO(LAB, *CC);
V = LITERAL(OTHER);
LOAD(V, R);
DEFINELABEL(LAB);
FORGET(R);
V->STACK = STACK;
STACK = V;
} /* STACKTRUEORFALSE */
void STACKVAR(int VARNO) {
int FORM;
int FLAGS;
struct STACKFM *V;
V = DESCRIPTOR();
V->V = *VAR(VARNO);
V->VARNO = VARNO;
V->STACK = STACK;
STACK = V;
if (STACK->BASE != 10) goto L_03A3;
ATTRIBUTES = ATTRIBUTES | 4;
L_03A3:;
FORM = V->FORM;
if (V->FLAGS & 8388608 == 0) goto L_03A4;
FLAGS = V->FLAGS;
V->FLAGS = 0;
APPLYINDIRECTION();
STACK->FLAGS = FLAGS & (~8388608);
L_03A4:;
if (FORM != 15) goto L_03A5;
APPLYINDIRECTION();
L_03A5:;
if (DIAG & 2 == 0) goto L_03A6;
MONITOR(STACK, _imp_str_literal("Stack Var"));
L_03A6:;
} /* STACKVAR */
struct STACKFM *LOCALINTEGER(int DISP) {
struct STACKFM *V;
V = DESCRIPTOR();
V->TYPE = 1;
V->FORM = 1;
V->BASE = *LOCAL;
V->DISP = DISP;
V->FLAGS = 128;
return V;
} /* LOCALINTEGER */
struct STACKFM *LITERAL(int N) {
struct STACKFM *V;
V = DESCRIPTOR();
V->DISP = N;
V->TYPE = 1;
V->FLAGS = 128;
return V;
} /* LITERAL */
void STACKINTEGER(int N) {
struct STACKFM *V;
V = LITERAL(*N);
V->STACK = STACK;
STACK = V;
} /* STACKINTEGER */
int POPPEDVALUE(void) {
struct STACKFM *V;
V = STACK;
STACK = V->STACK;
DROP(V);
return V->DISP;
} /* POPPEDVALUE */
struct STACKFM *TEMPORARY(void) {
struct STACKFM *V;
FRAME = (FRAME & -4) - 4;
V = LOCALINTEGER(FRAME);
return V;
} /* TEMPORARY */
struct STACKFM *COPY(struct STACKFM * V) {
struct STACKFM *C;
if (V != NIL) goto L_03A7;
return NIL;
L_03A7:;
C = DESCRIPTOR();
C->DATA = V->DATA;
CLAIM(C->BASE);
C->OPER = V->OPER;
if (V->INDEX == NIL) goto L_03A8;
C->INDEX = COPY(V->INDEX);
L_03A8:;
if (V->RECORD == NIL) goto L_03A9;
C->RECORD = COPY(V->RECORD);
L_03A9:;
if (V->LINK == NIL) goto L_03AA;
C->LINK = COPY(V->LINK);
L_03AA:;
return C;
} /* COPY */
void SELECT(int ITEM) {
struct STACKFM *V;
struct STACKFM *X;
struct VARFM *FIELD;
V = STACK;
FIELD = VAR(VAR(-V->FORMAT)->EXTRA - *ITEM);
if (V->FORM != 0) goto L_03AB;
FAIL(_imp_str_literal("Select"));
L_03AB:;
STACK->VARNO = 0;
if (V->FORM != 1) goto L_03AC;
if (V->INDEX != NIL) goto L_03AC;
V->DISP = V->DISP + FIELD->DISP;
V->TYPE = FIELD->TYPE;
V->FORM = FIELD->FORM;
V->FORMAT = FIELD->FORMAT;
V->FLAGS = FIELD->FLAGS;
V->ADATA = FIELD->ADATA;
goto L_03AD;
L_03AC:;
AMAP(V);
X = DESCRIPTOR();
X->V = *FIELD;
X->BASE = 0;
X->RECORD = V;
STACK = X;
X->STACK = V->STACK;
L_03AD:;
if (STACK->FORM != 15) goto L_03AE;
APPLYINDIRECTION();
L_03AE:;
if (DIAG & 2 == 0) goto L_03AF;
MONITOR(STACK, _imp_str_literal("Select"));
L_03AF:;
} /* SELECT */
void XCALL(int EP, int STACKIT, int HAZARD) {
struct STACKFM *V;
if (*HAZARD <= 0) goto L_03B0;
if (ACTIVEREGISTERS == 0) goto L_03B0;
HAZARDALL();
L_03B0:;
DIR2(23, *EP);
REFS = REFS + 1;
*CA = *CA + 4;
if (*HAZARD < 0) goto L_03B1;
FORGETEVERYTHING();
L_03B1:;
ATTRIBUTES = ATTRIBUTES | 4;
if (*STACKIT == 0) goto L_03B2;
ATTRIBUTES = ATTRIBUTES | 64;
V = REGISTER(*STACKIT);
V->STACK = STACK;
STACK = V;
L_03B2:;
} /* XCALL */
void CHECKCOMPILERLABEL(int LABEL) {
if (*LABEL <= 8191) goto L_03B3;
FAIL(_imp_str_literal("compiler labels/1"));
L_03B3:;
} /* CHECKCOMPILERLABEL */
int NEWLABEL(void) {
FREELABEL = FREELABEL + 1;
if (FREELABEL & 32768 == 0) goto L_03B4;
FAIL(_imp_str_literal("too many internal labels"));
L_03B4:;
return FREELABEL;
} /* NEWLABEL */
void JUMPTO(int INTERNALLABEL, int CONDCODE) {
JLAB = *INTERNALLABEL;
if (INVERT == 0) goto L_03B5;
*CONDCODE = REVERSE[*CONDCODE];
INVERT = 0;
L_03B5:;
DIR3(14, *INTERNALLABEL, *CONDCODE + UNSIGNED);
UNSIGNED = 0;
REFS = REFS + 1;
*CA = *CA + 4;
if (*CONDCODE != 7) goto L_03B6;
UNCONDJUMP = *CA;
L_03B6:;
ASSIGNLOCK = 0;
} /* JUMPTO */
void DEFINELABEL(int INTERNALLABEL) {
DIR2(8, *INTERNALLABEL);
UNCONDJUMP = -1;
ASSIGNLOCK = 0;
} /* DEFINELABEL */
void DEFINECOMPILERLABEL(int LABEL) {
struct LABELFM *L;
CHECKCOMPILERLABEL(*LABEL);
L = ILABEL(*LABEL);
if (L->LAB & -2147483648 == 0) goto L_03B7;
FORGETENVIRONMENT(*LABEL);
L->LAB = NEWLABEL();
L_03B7:;
L->LAB = L->LAB | -2147483648;
if (UNCONDJUMP == *CA) goto L_03B8;
MERGEENVIRONMENT(*LABEL);
L_03B8:;
DEFINELABEL(L->LAB & 2147483647);
RESTOREENVIRONMENT(*LABEL);
} /* DEFINECOMPILERLABEL */
int FORWARDLABEL(int LABEL) {
struct LABELFM *L;
L = ILABEL(*LABEL);
if (L->LAB & -2147483648 == 0) goto L_03B9;
L->LAB = NEWLABEL();
REMEMBERENVIRONMENT(*LABEL);
goto L_03BA;
L_03B9:;
MERGEENVIRONMENT(*LABEL);
L_03BA:;
return L->LAB;
} /* FORWARDLABEL */
void JUMPFORWARD(int LABEL, int CONDCODE) {
CHECKCOMPILERLABEL(*LABEL);
JUMPTO(FORWARDLABEL(*LABEL), CONDCODE);
if (CONDCODE != 6) goto L_03BB;
if (PENDINGKNOWNREGISTER == 0) goto L_03BB;
REMEMBER(PENDINGKNOWNREGISTER, &PENDINGKNOWN);
L_03BB:;
PENDINGKNOWNREGISTER = 0;
} /* JUMPFORWARD */
void JUMPBACKWARD(int LABEL) {
struct STACKFM C;
struct STACKFM F;
struct STACKFM *U;
struct STACKFM *CC;
struct FORFM *FOR;
FOR = NIL;
struct VARFM *VR;
struct LABELFM *L;
int HOW;
CHECKCOMPILERLABEL(LABEL);
L = ILABEL(LABEL);
HOW = 7;
if (L->LAB & -2147483648 != 0) goto L_03BC;
FAIL(_imp_str_literal("Label missing"));
L_03BC:;
if (FORS == NIL) goto L_03BD;
if (LABEL != FORS->LABEL) goto L_03BD;
FOR = FORS;
FORS = FORS->LINK;
C.DATA = FOR->CONTROL;
VMAP(&C, FOR->TYPE);
LOAD(&C, FOR->REG);
if (FOR->ENTRY == 0) goto L_03BE;
DEFINECOMPILERLABEL(FOR->ENTRY);
L_03BE:;
F.DATA = FOR->FINAL;
COMPARE(&C, &F);
RELEASE(C.BASE);
RELEASE(F.BASE);
HOW = FOR->CC;
L_03BD:;
JUMPTO(L->LAB & 2147483647, HOW);
if (FOR == NIL) goto L_03BF;
if (HOW == 7) goto L_03C0;
if (LANGUAGEFLAGS & 4 == 0) goto L_03C0;
if (UNASSIGNED == 0) goto L_03C0;
CC = LITERAL(0);
CC->DATA = FOR->CONTROL;
VMAP(CC, FOR->TYPE);
U = COPY(&UAPAT);
U->TYPE = FOR->TYPE;
SIMPLE(U, CC);
FORGETDESTINATION(CC);
FORGET(U->BASE);
RELEASEANDDROP(U);
RELEASEANDDROP(CC);
if (FOR->CONTROL.ENTRY == 0) goto L_03C1;
VR = VAR(FOR->CONTROL.ENTRY);
VR->FLAGS = VR->FLAGS & (~128);
L_03C1:;
L_03C0:;
_imp_DISPOSE(FOR);
L_03BF:;
} /* JUMPBACKWARD */
void SETUSERLABEL(int LABEL) {
struct VARFM *V;
V = VAR(LABEL);
CLEARVARS(LABEL);
V->TYPE = 11;
V->BASE = *LOCAL;
V->DISP = NEWLABEL();
} /* SETUSERLABEL */
void USERJUMP(int LABEL) {
static int JOUT = 0;
int B;
struct STACKFM *BASE;
struct VARFM *V;
struct VARFM C;
V = VAR(*LABEL);
if (*LABEL > *VARS) goto L_03C2;
if (V->DISP != 0) goto L_03C3;
L_03C2:;
SETUSERLABEL(*LABEL);
L_03C3:;
B = V->BASE;
if (B == *LOCAL) goto L_03C4;
BASE = DISPLAYINFO(B);
RELEASEANDDROP(BASE);
BASE = LITERAL(0);
BASE->BASE = B;
BASE->FLAGS = 128;
LOAD(BASE, 11);
BASE->DISP = V->EXTRA;
BASE->FORM = 1;
BASE->FLAGS = 128;
LOAD(BASE, 4);
RELEASEANDDROP(BASE);
DO(_imp_str_literal("3L_pascal___jump_out"), &JOUT, 0);
L_03C4:;
JUMPTO(V->DISP, 7);
} /* USERJUMP */
void MARKUSERLABEL(void) { DIR1(9); } /* MARKUSERLABEL */
void DEFINEUSERLABEL(int LABEL) {
struct VARFM *V;
V = VAR(LABEL);
if (LABEL > *VARS) goto L_03C5;
if (V->DISP != 0) goto L_03C6;
L_03C5:;
SETUSERLABEL(LABEL);
L_03C6:;
DEFINELABEL(V->DISP);
MARKUSERLABEL();
FORGETEVERYTHING();
} /* DEFINEUSERLABEL */
void RETURN(int HOW) {
int RESULTREG;
int TYPE;
struct STACKFM *V;
struct STACKFM *W;
if (UNCONDJUMP != *CA) goto L_03C7;
if (*HOW >= 0) goto L_03C8;
POPRELEASEANDDROP();
L_03C8:;
return;
L_03C7:;
V = NIL;
RESULTREG = 1;
TYPE = AVAR;
if (*HOW != 1) goto L_03C9;
V = LITERAL(1);
goto L_03CA;
L_03C9:;
if (*HOW != 2) goto L_03CB;
V = LITERAL(0);
goto L_03CA;
L_03CB:;
if (*HOW == 0) goto L_03CC;
V = STACK;
STACK = STACK->STACK;
if (*HOW != -2) goto L_03CD;
AMAP(V);
TYPE = 5;
goto L_03CE;
L_03CD:;
if (TYPE == 8) goto L_03CF;
if (TYPE != 9) goto L_03D0;
L_03CF:;
W = LITERAL(0);
W->TYPE = TYPE;
W->FORM = 1;
W->RECORD = LOCALINTEGER(STRINGRESULT);
W->RECORD->FORMAT = AVAR;
if (W->TYPE != 8) goto L_03D1;
STRINGASSIGN(V, W);
goto L_03D2;
L_03D1:;
RECORDASSIGN(V, W);
L_03D2:;
RELEASEANDDROPPAIR(W, V);
V = NIL;
L_03D0:;
L_03CE:;
L_03CC:;
L_03CA:;
if (V == NIL) goto L_03D3;
if (TYPE == 6) goto L_03D4;
if (TYPE != 7) goto L_03D5;
L_03D4:;
LOAD(V, 18);
goto L_03D6;
L_03D5:;
LOAD(V, RESULTREG);
L_03D6:;
RELEASEANDDROP(V);
L_03D3:;
DIR2(26, PARAMETERFRAME);
REFS = REFS + 1;
*CA = *CA + 4;
UNCONDJUMP = *CA;
OPEN = 0;
} /* RETURN */
void STAB(struct STACKFM * V) {
struct STACKFM *T;
struct STACKFM *TT;
if (!(ICONST(&V))) goto L_03D7;
return;
L_03D7:;
T = TEMPORARY();
TT = COPY(T);
STORE(&V, T);
RELEASEANDDROP(T);
REPLACE(&V, TT);
V = V | 128;
} /* STAB */
void COMPILEFOR(int REPEATLABEL) {
int TYPE;
int N;
struct STACKFM *INITIAL;
struct STACKFM *FINAL;
struct STACKFM *INC;
struct STACKFM *CONTROL;
struct STACKFM *INCREMENT;
struct STACKFM *C;
struct FORFM *FOR;
struct VARFM *V;
int LOOPTYPE(void) {
int I;
int N;
if (!(ICONST(INITIAL))) goto L_03D8;
if (!(ICONST(INC))) goto L_03D8;
if (ICONST(FINAL)) goto L_03D9;
L_03D8:;
return 1;
L_03D9:;
I = INC->DISP;
N = FINAL->DISP - INITIAL->DISP + I;
if (I == 0) goto L_03DA;
if (N != 0) goto L_03DB;
return 1;
L_03DB:;
if (N ^ I < 0) goto L_03DC;
if (_imp_REM(N, I) != 0) goto L_03DC;
if (FORRANGE == NIL) goto L_03DD;
if (FORRANGE->DISP > INITIAL->DISP) goto L_03DE;
if (INITIAL->DISP > FORRANGE->EXTRA) goto L_03DE;
if (FORRANGE->DISP > FINAL->DISP) goto L_03DE;
if (FINAL->DISP <= FORRANGE->EXTRA) goto L_03DF;
L_03DE:;
return 1;
L_03DF:;
FORRANGE = NIL;
L_03DD:;
return 0;
L_03DC:;
goto L_03E0;
L_03DA:;
I = 1;
L_03E0:;
if (LANGUAGEFLAGS & 2 != 0) goto L_03E1;
WARN(1, _imp_str_literal("Non-integral %for loop"));
FINAL->DISP = INITIAL->DISP + ((long)N / (long)I) * I;
L_03E1:;
return 1;
} /* LOOPTYPE */
FINAL = STACK;
INC = FINAL->STACK;
INITIAL = INC->STACK;
CONTROL = INITIAL->STACK;
STACK = CONTROL->STACK;
STAB(INC);
TYPE = CONTROL->TYPE;
if (CONTROL->FORM != 1) goto L_03E2;
if (CONTROL->INDEX != NIL) goto L_03E2;
if (CONTROL->RECORD != NIL) goto L_03E2;
if (CONTROL->BASE == 0) goto L_03E3;
if (CONTROL->BASE == *LOCAL) goto L_03E3;
if (CONTROL->BASE == 10) goto L_03E3;
L_03E2:;
AMAP(CONTROL);
STAB(CONTROL);
goto L_03E4;
L_03E3:;
AMAP(CONTROL);
L_03E4:;
SIMPLIFY(CONTROL);
FOR = _imp_NEW(FORFMTYPE);
FOR->LINK = FORS;
FORS = FOR;
FOR->LABEL = *REPEATLABEL;
FOR->CONTROL = CONTROL->DATA;
VMAP(CONTROL, TYPE);
FOR->TYPE = TYPE;
FOR->ENTRY = LOOPTYPE();
FOR->AS = 0;
N = INC->DISP;
FOR->CC = 6;
if (LANGUAGEFLAGS & 2 == 0) goto L_03E5;
if (FOR->ENTRY == 0) goto L_03E5;
if (N != 1) goto L_03E6;
FOR->CC = 2;
goto L_03E7;
L_03E6:;
if (N != -1) goto L_03E8;
FOR->CC = 4;
goto L_03E7;
L_03E8:;
FAIL(_imp_str_literal("corrupt increment"));
L_03E7:;
L_03E5:;
INCREMENT = COPY(INC);
OPERATE(5, INITIAL, INC);
LOADUP(INITIAL);
FOR->REG = INITIAL->BASE;
STAB(FINAL);
FOR->FINAL = FINAL->DATA;
LOAD(INITIAL, FOR->REG);
if (FOR->ENTRY == 0) goto L_03E9;
if (LANGUAGEFLAGS & 4 != 0) goto L_03EA;
C = COPY(CONTROL);
STORE(INITIAL, C);
RELEASEANDDROP(C);
L_03EA:;
FOR->ENTRY = *REPEATLABEL + 2;
JUMPFORWARD(FOR->ENTRY, 7);
L_03E9:;
DEFINECOMPILERLABEL(*REPEATLABEL);
if (FOR->AS != 0) goto L_03EB;
OPERATE(4, INITIAL, INCREMENT);
LOAD(INITIAL, FOR->REG);
L_03EB:;
if (FORRANGE == NIL) goto L_03EC;
TESTRANGE(INITIAL, FORRANGE);
FORRANGE = NIL;
L_03EC:;
STORE(INITIAL, CONTROL);
FOR->CONTROL.LABEL.LABEL = FOR->CONTROL.LABEL.LABEL | 128;
if (CONTROL->VARNO == 0) goto L_03ED;
V = VAR(CONTROL->VARNO);
V->FLAGS = V->FLAGS | 128;
L_03ED:;
RELEASEANDDROPPAIR(CONTROL, INITIAL);
RELEASEANDDROP(FINAL);
} /* COMPILEFOR */
struct STACKFM *CONSTSTRING(void) {
struct STACKFM *W;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
SELECTCONSTANTAREA();
W = LITERAL(*CA);
W->TYPE = 8;
W->FORM = 1;
W->AREA = 512;
W->FORMAT = *_imp_LENGTH(&VALUE.STRING) + 1;
W->BIAS = W->FORMAT;
if (_imp_strcmp(VALUE.STRING, _imp_str_literal("")) == 0) goto L_03EE;
DUMPTEXT(0);
L_03EE:;
SELECTCODEAREA();
return W;
} /* CONSTSTRING */
void FIXTOSTRING(struct STACKFM * C) {
struct STACKFM *W;
VALUE.STRING = _imp_TOSTRING(C);
W = CONSTSTRING();
C = W->DATA;
DROP(W);
} /* FIXTOSTRING */
void SETSIZEORTYPE(int ST, struct STACKFM *V) {
int N;
if (V->TYPE != 10) goto L_03EF;
AMAP(V);
V->DISP = V->DISP + *ST * 4;
goto L_03F0;
L_03EF:;
if (*ST != 1) goto L_03F1;
N = ITEMSIZE(V->FORMAT);
if (N != 1) goto L_03F2;
if (V->TYPE != 8) goto L_03F2;
AMAP(V);
ADVANCE(V, 1, 4);
return;
L_03F2:;
goto L_03F3;
L_03F1:;
N = TYPECODE[V->TYPE];
L_03F3:;
RELEASE(V->BASE);
ZAPINDEXANDRECORD(V);
V->DATA = 0;
V->DISP = N;
V->TYPE = 1;
V->FORM = 0;
L_03F0:;
} /* SETSIZEORTYPE */
void APPLYTRUNC(struct STACKFM * V) {
int R;
if (FLOATING(V)) goto L_03F4;
return;
L_03F4:;
LOAD(V, 26);
RELEASE(V->BASE);
R = GPR();
PLANT7(236454160 | 3 << 5, 0, R, V->BASE);
V->TYPE = 1;
V->BASE = R;
CLAIM(R);
} /* APPLYTRUNC */
void CONVERTFUNCTION(int OP, struct STACKFM *V) {
if (FLOATING(V)) goto L_03F5;
return;
L_03F5:;
LOAD(V, 18);
RELEASE(18);
PRIM(OP);
V->TYPE = 1;
V->BASE = 1;
CLAIM(1);
} /* CONVERTFUNCTION */
void APPLYROUND(struct STACKFM * V) { CONVERTFUNCTION(53, V); } /* APPLYROUND */
void APPLYINTPT(struct STACKFM * V) {
int R;
if (FLOATING(V)) goto L_03F6;
return;
L_03F6:;
LOAD(V, 26);
RELEASE(V->BASE);
R = GPR();
PLANT7(236454160 | 2 << 5, 0, R, V->BASE);
V->TYPE = 1;
V->BASE = R;
CLAIM(R);
} /* APPLYINTPT */
void APPLYINT(struct STACKFM * V) {
int R;
if (FLOATING(&V)) goto L_03F7;
return;
L_03F7:;
LOAD(&V, 26);
RELEASE(V);
PLANT9(234881408 | 8, V, V, 6);
R = GPR();
PLANT7(236454160 | 2 << 5, 0, R, V);
V = 1;
V = R;
CLAIM(R);
} /* APPLYINT */
void XDEFINE(int *EP, _imp_string63 TEXT, int P) {
struct VARFM C;
C = 0;
if (EP != 0) goto L_03F8;
EXTERNALID = *TEXT;
if (P != 0) goto L_03F9;
DUMPEXTERNAL(0, &C);
EP = C.AREA;
goto L_03FA;
L_03F9:;
C.FORM = 4;
DUMPEXTERNAL(2, &C);
EP = C.DISP;
L_03FA:;
L_03F8:;
} /* XDEFINE */
void STACKREGISTER(int R) {
struct STACKFM *X;
X = LITERAL(0);
X->BASE = *R;
CLAIM(*R);
X->STACK = STACK;
STACK = X;
} /* STACKREGISTER */
void DO(_imp_string31 IDENT, int *EP, int RESULT) {
XDEFINE(EP, *IDENT, 1);
XCALL(*EP, RESULT, 1);
} /* DO */
void DOCONDITIONALEXTERNAL(int CC, _imp_string31 IDENT, int *EP) {
int LABEL;
XDEFINE(&EP, IDENT, 1);
if (ACTIVEREGISTERS == 0) goto L_03FB;
HAZARDALL();
L_03FB:;
if (*CC == 7) goto L_03FC;
LABEL = NEWLABEL();
JUMPTO(LABEL, NEGATED[*CC]);
L_03FC:;
XCALL(EP, 0, 0);
if (*CC == 7) goto L_03FD;
DEFINELABEL(LABEL);
L_03FD:;
} /* DOCONDITIONALEXTERNAL */
void SPECIALCALL(int N) {
struct STACKFM *V;
V = STACK;
struct STACKFM *X;
struct STACKFM *Y;
struct STACKFM *Z;
static int READCHEP = 0;
static int IREAD = 0;
static int RREAD = 0;
static int SREAD = 0;
static int NEXTCHEP = 0;
int TYPE;
static const void *SP[59] = {
&&case_SP_1, &&case_SP_2, &&case_SP_3, &&case_SP_4, &&case_SP_5,
&&case_SP_6, &&case_SP_7, &&case_SP_8, &&case_SP_9, &&case_SP_10,
&&case_SP_11, &&case_SP_12, &&case_SP_13, &&case_SP_14, &&case_SP_15,
&&case_SP_16, &&case_SP_17, &&case_SP_18, &&case_SP_19, &&case_SP_20,
&&case_SP_21, &&case_SP_22, &&case_SP_23, &&case_SP_24, &&case_SP_25,
&&case_SP_26, &&case_SP_27, &&case_SP_28, &&case_SP_default, &&case_SP_default,
&&case_SP_default, &&case_SP_default, &&case_SP_default, &&case_SP_default, &&case_SP_default,
&&case_SP_default, &&case_SP_default, &&case_SP_default, &&case_SP_default, &&case_SP_default,
&&case_SP_41, &&case_SP_42, &&case_SP_43, &&case_SP_44, &&case_SP_45,
&&case_SP_46, &&case_SP_47, &&case_SP_48, &&case_SP_49, &&case_SP_50,
&&case_SP_51, &&case_SP_52, &&case_SP_53, &&case_SP_54, &&case_SP_55,
&&case_SP_56, &&case_SP_57, &&case_SP_58, &&case_SP_59};
const unsigned char TYPEMAP[7] = {8, 1, 2, 4, 6, 7, 9};
const unsigned char LENMAP[7] = {0, 4, 2, 1, 4, 8, 0};
if (0 >= N) goto L_03FE;
if (N > 59) goto L_03FE;
goto *SP[N - 1]; /*TO DO*/
L_03FE:;
case_SP_default:;
FAIL(_imp_str_literal("Bad primitive"));
void PSYM(struct STACKFM * CHAR) {
static int PRINTSYMBOLEP = 0;
LOAD(&CHAR, 1);
RELEASEANDDROP(&CHAR);
PRIM(45);
FORGETEVERYTHING();
} /* PSYM */
void DOPRINTSTRING(void) {
static int PRINTSTRINGEP = 0;
struct STACKFM *S;
struct STACKFM *V;
V = STACK;
STACK = STACK->STACK;
L_0400:;
S = V;
V = S->LINK;
S->OPER = 0;
S->LINK = NIL;
if (S->TYPE > 5) goto L_0401;
PSYM(S);
goto L_0402;
L_0401:;
if (S->BIAS != 1) goto L_0403;
RELEASEANDDROP(S);
goto L_0402;
L_0403:;
AMAP(S);
LOAD(S, 1);
RELEASEANDDROP(S);
DO(_imp_str_literal("3L_IMP_PRINT_STRING"), &PRINTSTRINGEP, 0);
L_0402:;
if (V == NIL) goto L_0404;
goto L_0400;
L_0404:;
} /* DOPRINTSTRING */
void LOADEXTERNALVARIABLE(_imp_string63 ID, int *EP) {
struct STACKFM *V;
struct VARFM X;
if (*EP != 0) goto L_0405;
X.FORM = 0;
EXTERNALID = *ID;
DUMPEXTERNAL(0, &X);
*EP = -X.AREA;
L_0405:;
HAZARD(2);
DIR3(13, ACTUAL[2], *EP);
REFS = REFS + 1;
*CA = *CA + 4;
ATTRIBUTES = ATTRIBUTES | 4;
} /* LOADEXTERNALVARIABLE */
void DOINPUT(int FN) {
struct STACKFM *R;
static int INSCB = 0;
HAZARDALL();
LOADEXTERNALVARIABLE(_imp_str_literal("3L___cur_in"), &INSCB);
FORGETEVERYTHING();
DUMPWORD(-460255232);
DUMPWORD(-393150436);
DUMPWORD(-514719741);
PRIM(55);
if (*FN != 0) goto L_0406;
DUMPWORD(-455983104);
goto L_0407;
L_0406:;
DUMPWORD(-455983103);
DUMPWORD(-469688320);
L_0407:;
if (*FN < 0) goto L_0408;
R = REGISTER(5);
R->STACK = STACK;
STACK = R;
if (*FN != 1) goto L_0409;
ASSIGN(0);
L_0409:;
L_0408:;
} /* DOINPUT */
case_SP_1:;
DOINPUT(1);
return;
case_SP_2:;
DOINPUT(0);
return;
case_SP_26:;
DOINPUT(-1);
return;
case_SP_25:;
STACK = V->STACK;
PSYM(V);
return;
case_SP_27:;
X = LITERAL(10);
PSYM(X);
return;
case_SP_28:;
X = LITERAL(32);
PSYM(X);
return;
case_SP_24:;
DOPRINTSTRING();
return;
case_SP_23:;
if (V->TYPE != 8) goto L_040A;
TYPE = 8;
X = LITERAL(ITEMSIZE(STACK->FORMAT) - 1);
AMAP(STACK);
LOAD(STACK, 1);
LOAD(X, 2);
RELEASEANDDROP(X);
POPRELEASEANDDROP();
DO(_imp_str_literal("3L_IMP___read_s"), &SREAD, 0);
goto L_040B;
L_040A:;
if (1 > V->TYPE) goto L_040C;
if (V->TYPE > 5) goto L_040C;
TYPE = 1;
DO(_imp_str_literal("3L_IMP___read_i"), &IREAD, 1);
goto L_040D;
L_040C:;
if (V->TYPE == 6) goto L_040E;
if (V->TYPE != 7) goto L_040F;
L_040E:;
TYPE = 7;
DO(_imp_str_literal("3L_IMP___read_r"), &RREAD, 18);
goto L_040D;
L_040F:;
WARN(1, _imp_str_literal("Bad type of parameter for READ"));
TYPE = 1;
L_040D:;
STACK->TYPE = TYPE;
if (TYPE != 8) goto L_0410;
STACK->FORM = 1;
L_0410:;
ASSIGN(0);
L_040B:;
return;
case_SP_20:;
AMAP(V);
return;
case_SP_3:;
case_SP_4:;
case_SP_5:;
case_SP_6:;
case_SP_7:;
case_SP_8:;
case_SP_9:;
VMAP(V, TYPEMAP[N - 3]);
V->FORMAT = LENMAP[N - 3];
return;
case_SP_10:;
FLOAT(STACK, FPR());
return;
case_SP_11:;
X = V->STACK;
STACK = X->STACK;
OPERATE(16, V, X);
V->STACK = STACK;
STACK = V;
return;
case_SP_12:;
ADVANCE(V, 4, 0);
return;
case_SP_13:;
X = V->STACK;
STACK = X->STACK;
if (V->INDEX == NIL) goto L_0411;
SIMPLIFY(V);
L_0411:;
V->TYPE = 4;
APPLYINDEX(V, X, 1);
V->STACK = STACK;
STACK = V;
return;
case_SP_14:;
STACKINTEGER(10);
case_SP_15:;
SIMPLIFY(STACK);
return;
case_SP_16:;
SETSIZEORTYPE(1, V);
return;
case_SP_17:;
SETSIZEORTYPE(2, V);
return;
case_SP_19:;
APPLYINT(V);
return;
case_SP_18:;
APPLYINTPT(V);
return;
case_SP_22:;
APPLYROUND(V);
return;
case_SP_21:;
APPLYTRUNC(V);
return;
const _imp_string255 FILLID = _imp_str_literal("3L_pascal___fill");
static int FILLEP = 0;
const _imp_string255 FTXTID = _imp_str_literal("3L_pascal___fill_text");
static int FTXTEP = 0;
const _imp_string255 SAFEID = _imp_str_literal("3L_pascal___safe");
static int SAFEEP = 0;
const _imp_string255 EMPTYID = _imp_str_literal("3L_pascal___empty");
static int EMPTYEP = 0;
const _imp_string255 EOLNID = _imp_str_literal("3L_pascal___eoln_error");
static int EOLNEP = 0;
const _imp_string255 READLNID = _imp_str_literal("3L_pascal___read_ln");
static int READLNEP = 0;
const _imp_string255 WRITELNID = _imp_str_literal("3L_pascal___write_ln");
static int WRITELNEP = 0;
const _imp_string255 WRITECID = _imp_str_literal("3L_pascal___write_char");
static int WRITECEP = 0;
void MAKESAFE(struct STACKFM * F, int EOF) {
struct STACKFM *P;
struct STACKFM *B;
struct STACKFM *V2;
struct STACKFM *V3;
SIMPLIFY(&F);
ADVANCE(&F, 1, 0);
P = COPY(&F);
B = COPY(&F);
ADVANCE(B, 1, 4);
if (B->BASE >= 128) goto L_0412;
if (ACTIVITY[B->BASE] >= 0) goto L_0413;
L_0412:;
V2 = COPY(B);
V3 = COPY(P);
goto L_0414;
L_0413:;
V2 = NIL;
V3 = NIL;
L_0414:;
LOAD(B, 3);
P->FLAGS = P->FLAGS | 128;
LOAD(P, 4);
VMAP(B, 1);
ADVANCE(B, 1, 0);
B->FLAGS = B->FLAGS | 128;
LOAD(B, 5);
COMPARE(P, B);
RELEASEANDDROPPAIR(P, B);
if (EOF != 0) goto L_0415;
DOCONDITIONALEXTERNAL(4, FTXTID, &FTXTEP);
goto L_0416;
L_0415:;
DOCONDITIONALEXTERNAL(4, SAFEID, &SAFEEP);
L_0416:;
F = F | 128;
if (V2 == NIL) goto L_0417;
REMEMBER(3, V2);
REMEMBER(4, V3);
RELEASEANDDROPPAIR(V2, V3);
V2 = REGISTER(3);
V2->FORM = 1;
REMEMBER(5, V2);
RELEASEANDDROP(V2);
L_0417:;
} /* MAKESAFE */
void ONTOBOOLEAN(struct STACKFM * F, int DISP, int KNOWN) {
ADVANCE(&F, 1, 4);
F = F | *KNOWN;
LOAD(&F, 3);
VMAP(&F, 4);
ADVANCE(&F, 4, *DISP);
F = F | 128;
} /* ONTOBOOLEAN */
void EOF(struct STACKFM * F, int TEXT) {
if (*TEXT == 0) goto L_0418;
MAKESAFE(F, 0);
L_0418:;
ONTOBOOLEAN(F, 12, 0);
} /* EOF */
void EOLN(struct STACKFM * F) {
MAKESAFE(F, 1);
ONTOBOOLEAN(F, 13, 128);
} /* EOLN */
case_SP_41:;
STACK = STACK->STACK;
SIMPLIFY(V);
ADVANCE(V, 1, 0);
X = COPY(V);
Y = COPY(V);
LOAD(Y, 4);
ADVANCE(V, 1, 4);
V->FLAGS = V->FLAGS | 128;
LOAD(V, 3);
V->FORM = 1;
Z = COPY(V);
ADVANCE(V, 1, 8);
V->FLAGS = V->FLAGS | 128;
OPERATE(4, Y, V);
ADVANCE(Z, 1, 0);
Z->FLAGS = Z->FLAGS | 128;
COMPARE(Y, Z);
RELEASEANDDROPPAIR(Z, Y);
DOCONDITIONALEXTERNAL(4, FILLID, &FILLEP);
Y = REGISTER(4);
SIMPLE(Y, X);
RELEASEANDDROPPAIR(X, Y);
return;
case_SP_42:;
STACK = STACK->STACK;
MAKESAFE(V, 1);
ADVANCE(V, 1, 0);
Y = REGISTER(4);
OPERATE(4, Y, LITERAL(1));
SIMPLE(Y, V);
RELEASEANDDROPPAIR(V, Y);
return;
case_SP_43:;
STACK = STACK->STACK;
MAKESAFE(V, 1);
RELEASEANDDROP(V);
V = REGISTER(4);
V->STACK = STACK;
STACK = V;
return;
case_SP_44:;
STACK = STACK->STACK;
MAKESAFE(V, 1);
Y = REGISTER(4);
X = REGISTER(2);
PLANT1(68157440 | 4194304 | 8388608, 4, 2, 1);
SIMPLE(Y, V);
RELEASEANDDROPPAIR(V, Y);
X->STACK = STACK;
STACK = X;
return;
case_SP_45:;
STACK = STACK->STACK;
ADVANCE(V, 1, 4);
LOAD(V, 3);
RELEASEANDDROP(V);
DO(READLNID, &READLNEP, 0);
return;
case_SP_46:;
EOLN(V);
return;
case_SP_47:;
EOF(V, 0);
return;
case_SP_48:;
EOF(V, 1);
return;
case_SP_49:;
STACK = STACK->STACK;
SIMPLIFY(V);
ADVANCE(V, 1, 0);
X = COPY(V);
Y = COPY(V);
ADVANCE(Y, 1, 4);
Y->FLAGS = Y->FLAGS | 128;
LOAD(X, 4);
LOAD(Y, 3);
Y->FORM = 1;
Y->DISP = 4;
Y->FLAGS = Y->FLAGS | 128;
Z = COPY(Y);
Z->DISP = 8;
OPERATE(4, X, Z);
LOAD(X, 4);
COMPARE(X, Y);
RELEASEANDDROPPAIR(Y, X);
DOCONDITIONALEXTERNAL(5, EMPTYID, &EMPTYEP);
X = REGISTER(4);
SIMPLE(X, V);
RELEASEANDDROPPAIR(X, V);
return;
case_SP_50:;
STACK = STACK->STACK;
SIMPLIFY(V);
ADVANCE(V, 1, 0);
X = COPY(V);
Y = COPY(V);
ADVANCE(Y, 1, 4);
Y->FLAGS = Y->FLAGS | 128;
LOAD(X, 4);
LOAD(Y, 3);
OPERATE(4, X, LITERAL(1));
LOAD(X, 4);
Y->FORM = 1;
Y->DISP = 4;
Y->FLAGS = Y->FLAGS | 128;
COMPARE(X, Y);
RELEASEANDDROPPAIR(Y, X);
DOCONDITIONALEXTERNAL(5, EMPTYID, &EMPTYEP);
X = REGISTER(4);
SIMPLE(X, V);
RELEASEANDDROPPAIR(X, V);
return;
case_SP_51:;
STACK = STACK->STACK;
ADVANCE(V, 1, 4);
LOAD(V, 3);
RELEASEANDDROP(V);
DOCONDITIONALEXTERNAL(7, WRITELNID, &WRITELNEP);
return;
case_SP_52:;
{ /*%begin*/
struct STACKFM *C;
struct STACKFM *W;
struct STACKFM *BP;
struct STACKFM *FCB;
struct STACKFM *Z;
SIMPLIFY(V);
C = V->STACK;
W = C->STACK;
STACK = W->STACK;
if (!(ICONST(W))) goto L_0419;
if (W->DISP != 1) goto L_0419;
RELEASEANDDROP(W);
ADVANCE(V, 1, 0);
BP = COPY(V);
FCB = COPY(V);
ADVANCE(FCB, 1, 4);
LOAD(BP, 4);
FCB->FLAGS = FCB->FLAGS | 128;
LOAD(FCB, 3);
LOADUP(C);
PLANT1(67108864 | 4194304 | 8388608, 4, C->BASE, 1);
RELEASEANDDROP(C);
FCB->FORM = 1;
FCB->DISP = 4;
FCB->FLAGS = FCB->FLAGS | 128;
COMPARE(BP, FCB);
RELEASEANDDROPPAIR(FCB, BP);
DOCONDITIONALEXTERNAL(4, EMPTYID, &EMPTYEP);
BP = REGISTER(4);
SIMPLE(BP, V);
RELEASEANDDROPPAIR(BP, V);
goto L_041A;
L_0419:;
LOAD(W, 2);
LOAD(C, 3);
AMAP(V);
LOAD(V, 4);
RELEASEANDDROPPAIR(W, C);
RELEASEANDDROP(V);
DO(WRITECID, &WRITECEP, 0);
L_041A:;
}
return;
case_SP_53:;
return;
void DOREALFN(int FN) {
int REG;
LOAD(V, 26);
REG = FPR();
CLAIM(REG);
PLANT9(*FN, 0, REG, V->BASE);
RELEASE(V->BASE);
V->BASE = REG;
} /* DOREALFN */
case_SP_54:;
DOREALFN(239108480);
return;
case_SP_55:;
DOREALFN(243302784);
return;
case_SP_56:;
DOREALFN(244351360);
return;
case_SP_57:;
DOREALFN(241205632);
return;
case_SP_58:;
DOREALFN(242254208);
return;
case_SP_59:;
DOREALFN(248545664);
return;
} /* SPECIALCALL */
void CALL(int TIDY) {
struct STACKFM *V;
struct STACKFM *TEMP;
struct STACKFM *X;
struct STACKFM *W;
struct STACKFM WORK;
int EP;
int FLAGS;
int EXTRA;
int OP;
int BASEREG;
V = STACK;
STACK = STACK->STACK;
FLAGS = V->FLAGS;
if (FLAGS & 512 == 0) goto L_041B;
L_041C:;
if (V->PARAMS == NIL) goto L_041D;
V->PARAMS->STACK = STACK;
STACK = V->PARAMS;
V->PARAMS = V->PARAMS->PARAMS;
goto L_041C;
L_041D:;
SPECIALCALL(V->PRIM);
DROP(V);
return;
L_041B:;
BASEREG = 1;
if (FLAGS & 524288 == 0) goto L_041E;
if (V->FLAGS & 8 != 0) goto L_041E;
if (V->TYPE == 8) goto L_041F;
if (V->TYPE != 9) goto L_041E;
L_041F:;
BASEREG = 2;
L_041E:;
PASSPARAMETERS(V, &EXTRA, BASEREG);
if (ACTIVEREGISTERS == 0) goto L_0420;
HAZARDALL();
L_0420:;
ASSIGNLOCK = 0;
ATTRIBUTES = ATTRIBUTES | 64;
TEMP = NIL;
if (BASEREG != 2) goto L_0421;
TEMP = CLAIMWORKAREA(ITEMSIZE(V->FORMAT), V->TYPE);
TEMP->FORMAT = V->FORMAT;
W = COPY(TEMP);
AMAP(W);
LOAD(W, 1);
RELEASEANDDROP(W);
L_0421:;
EP = V->DISP;
if (FLAGS & 1024 == 0) goto L_0422;
if (FLAGS & 256 == 0) goto L_0423;
FAIL(_imp_str_literal("XP-call"));
L_0423:;
XCALL(EP, 0, 1);
goto L_0424;
L_0422:;
if (FLAGS & 4 != 0) goto L_0425;
if (V->BASE != 0) goto L_0425;
if (V->RECORD == NIL) goto L_0426;
L_0425:;
W = COPY(V);
W->TYPE = 1;
W->FORM = 1;
W->AREA = 0;
AMAP(W);
LOAD(W, 5);
RELEASEANDDROP(W);
PRIM(54);
goto L_0424;
L_0426:;
if (FLAGS & 256 == 0) goto L_0427;
FAIL(_imp_str_literal("P-call"));
L_0427:;
if (FLAGS & 65536 == 0) goto L_0428;
if (LOCALDISPLAY != 0) goto L_0429;
FAIL(_imp_str_literal("No local display"));
L_0429:;
X = LOCALINTEGER(LOCALDISPLAY);
LOADADDRESS(X, 9);
RELEASEANDDROP(X);
L_0428:;
DIR2(20, EP);
*CA = *CA + 4;
REFS = REFS + 1;
L_0424:;
if (EXTRA == 0) goto L_042A;
POPSTACK(EXTRA);
L_042A:;
FORGETEVERYTHING();
if (FLAGS & 524288 == 0) goto L_042B;
if (TEMP != NIL) goto L_042C;
TEMP = LITERAL(0);
TEMP->TYPE = V->TYPE;
TEMP->FORMAT = V->FORMAT;
TEMP->BASE = 1;
if (FLAGS & 8 == 0) goto L_042D;
TEMP->FORM = 1;
TEMP->BASE = 1;
goto L_042E;
L_042D:;
if (6 > TEMP->TYPE) goto L_042F;
if (TEMP->TYPE > 7) goto L_042F;
TEMP->BASE = 18;
TEMP->TYPE = 7;
L_042F:;
L_042E:;
CLAIM(TEMP->BASE);
L_042C:;
TEMP->STACK = STACK;
STACK = TEMP;
goto L_0430;
L_042B:;
if (FLAGS & 2097152 == 0) goto L_0431;
PLANT1(19922944, 1, 0, NOTHING());
L_0431:;
L_0430:;
if (FLAGS & 2048 == 0) goto L_0432;
UNCONDJUMP = *CA;
L_0432:;
DROP(V);
} /* CALL */
void PRIM(int N) {
int FOR;
int REG;
int PAR;
if (1 > *N) goto L_0433;
if (*N <= 56) goto L_0434;
L_0433:;
FAIL(_imp_str_literal("Prim "));
L_0434:;
if (DIAG & 16 == 0) goto L_0435;
MONITOR(NIL, _imp_join((_imp_string)(_imp_str_literal("Prim ")), (_imp_string)(_imp_ITOS(*N, 0))));
L_0435:;
FOR = CORRUPTS[*N - 1];
PAR = PRIMPARAMETER[*N - 1];
REG = 1;
L_0436:;
if (FOR == 0) goto L_0437;
if (FOR & 1 == 0) goto L_0438;
if (PAR & 1 != 0) goto L_0439;
HAZARD(REG);
goto L_043A;
L_0439:;
if (ACTIVITY[REG] <= 1) goto L_043B;
HAZARD(REG);
L_043B:;
L_043A:;
FORGET(REG);
L_0438:;
REG = REG + 1;
FOR = (unsigned int)FOR >> 1;
PAR = (unsigned int)PAR >> 1;
goto L_0436;
L_0437:;
DIR2(25, *N);
*CA = *CA + 4;
REFS = REFS + 1;
} /* PRIM */
void SWITCHLABEL(int TAG) {
DIR2(7, VAR(TAG)->AREA + POPPEDVALUE());
UNCONDJUMP = -1;
ASSIGNLOCK = 0;
MARKUSERLABEL();
FORGETEVERYTHING();
} /* SWITCHLABEL */
void SWITCHJUMP(int TAG) {
struct STACKFM *X;
X = STACK;
STACK = STACK->STACK;
LOAD(X, 2);
RELEASEANDDROP(X);
PRIM(4);
DUMPWORD(-409800443);
DIR2(29, VAR(TAG)->FORMAT);
*CA = *CA + 4;
UNCONDJUMP = *CA;
} /* SWITCHJUMP */
void SAVEWSP(void) {
struct STACKFM *D;
if (WSPSAVE != 0) goto L_043C;
FRAME = (FRAME & (~3)) - 4;
WSPSAVE = FRAME;
L_043C:;
D = LOCALINTEGER(WSPSAVE);
PLANT2(67108864, 13, D);
RELEASEANDDROP(D);
} /* SAVEWSP */
void EVENTTRAP(int BITS) {
int LAB;
struct STACKFM *D;
LAB = TAG();
SAVEWSP();
JUMPFORWARD(LAB, 7);
EVENTBITS = *BITS;
EVENTBODY = JLAB;
EVENTLABEL = NEWLABEL();
DEFINELABEL(EVENTLABEL);
MARKUSERLABEL();
FORGETEVERYTHING();
D = LOCALINTEGER(WSPSAVE);
PLANT2(68157440, 13, D);
RELEASEANDDROP(D);
ATTRIBUTES = ATTRIBUTES | 64;
} /* EVENTTRAP */
void SIGNALEVENT(int EVENT) {
struct STACKFM *E;
struct STACKFM *SUBEVENT;
struct STACKFM *EXTRA;
EXTRA = STACK;
SUBEVENT = EXTRA->STACK;
STACK = SUBEVENT->STACK;
E = LITERAL(EVENT);
LOADTRIO(E, 2, SUBEVENT, 3, EXTRA, 4);
RELEASEANDDROPPAIR(E, SUBEVENT);
RELEASEANDDROP(EXTRA);
PRIM(1);
UNCONDJUMP = *CA;
ATTRIBUTES = ATTRIBUTES | 64;
} /* SIGNALEVENT */
void SETPENDINGFOR(int V) {
int MASK;
MASK = 0;
if (PENDING != 61) goto L_043D;
MASK = 2;
goto L_043E;
L_043D:;
if (PENDING != 35) goto L_043F;
MASK = 5;
goto L_043E;
L_043F:;
if (PENDING != 60) goto L_0440;
MASK = 4;
goto L_043E;
L_0440:;
if (PENDING != 62) goto L_0441;
MASK = 1;
goto L_043E;
L_0441:;
if (PENDING != 40) goto L_0442;
MASK = 6;
goto L_043E;
L_0442:;
if (PENDING != 41) goto L_0443;
MASK = 3;
goto L_043E;
L_0443:;
if (PENDING != 116) goto L_0444;
MASK = 5;
goto L_043E;
L_0444:;
if (PENDING != 107) goto L_0445;
MASK = 2;
goto L_043E;
L_0445:;
FAIL(_imp_str_literal("Bad cc"));
L_043E:;
if (INVERT == 0) goto L_0446;
*V = -*V;
INVERT = 0;
L_0446:;
PENDING = 35;
if (*V != 0) goto L_0447;
if (MASK & 2 != 0) goto L_0448;
L_0447:;
if (*V <= 0) goto L_0449;
if (MASK & 1 != 0) goto L_0448;
L_0449:;
if (*V >= 0) goto L_044A;
if (MASK & 4 == 0) goto L_044A;
L_0448:;
PENDING = 61;
L_044A:;
PLANT1(22020096 | 1048576, 0, 1, JUST(1));
} /* SETPENDINGFOR */
void TESTZERO(struct STACKFM * V) {
struct STACKFM *W;
int OP;
int X;
void TESTSHORTBITS(struct STACKFM * V, int MASK) {
int OP;
OP = 17825792;
struct STACKFM *W;
MASK = MASK & 65535;
V = COPY(&V);
if (MASK & 255 != 0) goto L_044B;
ADVANCE(&V, 4, 1);
LOADUP(&V);
PLANT1(17825792, V, 0, IMMEDIATE((unsigned int)MASK >> 8));
goto L_044C;
L_044B:;
if (MASK > 255) goto L_044D;
ADVANCE(&V, 4, 0);
LOADUP(&V);
PLANT1(17825792, V, 0, IMMEDIATE(MASK));
goto L_044C;
L_044D:;
W = COPY(&V);
ADVANCE(&V, 4, 0);
ADVANCE(W, 4, 1);
LOADUP(&V);
LOADUP(W);
PLANT1(17825792, V, 0, IMMEDIATE(MASK & 255));
PLANT1(17825792 | -536870912, W->BASE, 0, IMMEDIATE((unsigned int)MASK >> 8));
RELEASEANDDROP(W);
L_044C:;
RELEASEANDDROP(&V);
} /* TESTSHORTBITS */
void TESTINTEGERBITS(struct STACKFM * V, int MASK) {
int X;
int OP;
LOADUP(&V);
OP = 17825792;
X = 16;
L_044E:;
if (MASK == 0) goto L_044F;
L_0450:;
if (MASK & 3 != 0) goto L_0451;
MASK = (unsigned int)MASK >> 2;
X = X - 1;
goto L_0450;
L_0451:;
PLANT1(OP, V, 0, ROT(MASK & 255, X & 15));
MASK = (unsigned int)MASK >> 8;
X = X - 4;
OP = OP | -536870912;
goto L_044E;
L_044F:;
if (X != 16) goto L_0452;
PLANT1(OP, V, 0, IMMEDIATE(0));
L_0452:;
} /* TESTINTEGERBITS */
if (DIAG & 256 == 0) goto L_0453;
MONITOR(V, _imp_str_literal("Tzero"));
L_0453:;
OPTIMISE(V, 1);
if (V->OPER == 0) goto L_0454;
W = V->LINK;
if (PENDING == 61) goto L_0455;
if (PENDING == 35) goto L_0455;
if (PENDING == 116) goto L_0455;
if (PENDING != 107) goto L_0456;
L_0455:;
if (V->OPER != 9) goto L_0456;
if (!(ICONST(W))) goto L_0456;
V->OPER = 0;
V->LINK = NIL;
if (V->TYPE != 2) goto L_0457;
TESTSHORTBITS(V, W->DISP);
goto L_0458;
L_0457:;
if (V->TYPE != 4) goto L_0459;
LOADUP(V);
PLANT1(17825792, V->BASE, 0, IMMEDIATE(W->DISP & 255));
goto L_0458;
L_0459:;
TESTINTEGERBITS(V, W->DISP);
L_0458:;
RELEASEANDDROP(W);
return;
L_0456:;
LOADUP(V);
L_0454:;
if (V->TYPE < 6) goto L_045A;
LOADUP(V);
PLANT8(244379920 | 8, V->BASE, 0);
goto L_045B;
L_045A:;
if (!(ICONST(V))) goto L_045C;
SETPENDINGFOR(V->DISP);
goto L_045B;
L_045C:;
LOADUP(V);
PLANT1(22020096, V->BASE, 0, NOTHING());
if (PENDING != 35) goto L_045D;
PENDINGKNOWNREGISTER = V->BASE;
PENDINGKNOWN = 0;
L_045D:;
L_045B:;
} /* TESTZERO */
void COMPTOSTRING(struct STACKFM * S, struct STACKFM * X) {
AMAP(S);
LOADPAIR(S, 3, &X, 2);
PRIM(2);
} /* COMPTOSTRING */
void COMPARESTRINGS(struct STACKFM * LEFT, struct STACKFM * RIGHT) {
struct STACKFM *W;
if (LEFT == 0) goto L_045E;
EVALUATESTRINGEXPRESSION(&LEFT);
L_045E:;
if (RIGHT == 0) goto L_045F;
EVALUATESTRINGEXPRESSION(&RIGHT);
L_045F:;
SIMPLIFY(&LEFT);
SIMPLIFY(&RIGHT);
RIGHT = COPY(&RIGHT);
LEFT = COPY(&LEFT);
if (RIGHT != 1) goto L_0460;
if (LEFT == 8) goto L_0461;
LOADUP(&LEFT);
PLANT1(24117248, 0, LEFT, IMMEDIATE(1));
goto L_0462;
L_0461:;
if (LEFT != 1) goto L_0463;
PLANT1(22020096 | 1048576, 0, 1, JUST(1));
goto L_0462;
L_0463:;
LEFT = 4;
TESTZERO(&LEFT);
L_0462:;
goto L_0464;
L_0460:;
if (LEFT != 1) goto L_0465;
if (RIGHT == 8) goto L_0466;
LOADUP(&RIGHT);
PLANT1(24117248, 0, RIGHT, IMMEDIATE(1));
goto L_0467;
L_0466:;
RIGHT = 4;
TESTZERO(&RIGHT);
L_0467:;
INVERT = INVERT ^ 1;
goto L_0464;
L_0465:;
if (RIGHT == 8) goto L_0468;
COMPTOSTRING(&LEFT, &RIGHT);
goto L_0464;
L_0468:;
if (LEFT == 8) goto L_0469;
COMPTOSTRING(&RIGHT, &LEFT);
INVERT = INVERT ^ 1;
goto L_0464;
L_0469:;
AMAP(&LEFT);
AMAP(&RIGHT);
LOADPAIR(&LEFT, 2, &RIGHT, 3);
PRIM(9);
L_0464:;
RELEASEANDDROPPAIR(&LEFT, &RIGHT);
} /* COMPARESTRINGS */
void COMPARERECORDS(struct STACKFM * L, struct STACKFM * R) {
struct STACKFM *SIZE;
int N;
int OP;
void FIXSET(struct STACKFM * L) {
SIMPLIFY(&L);
if (&L == NIL) goto L_046A;
BUILDSET(&L);
goto L_046B;
L_046A:;
if (L & 16384 == 0) goto L_046C;
L = 1;
L_046C:;
L_046B:;
L = ((long)256 / (long)8);
} /* FIXSET */
void COMPARESET(struct STACKFM * L, struct STACKFM * R, int CC) {
PENDING = CC;
AMAP(&L);
AMAP(&R);
LOADPAIR(&L, 9, &R, 12);
PRIM(32);
} /* COMPARESET */
if (L != 13) goto L_046D;
FIXSET(&L);
L_046D:;
if (R->TYPE != 13) goto L_046E;
FIXSET(R);
L_046E:;
if (L != 1) goto L_046F;
if (R->TYPE != 1) goto L_0470;
PLANT1(22020096 | 1048576, 0, 1, JUST(1));
goto L_0471;
L_0470:;
INVERT = INVERT ^ 1;
COMPARERECORDS(R, &L);
L_0471:;
return;
L_046F:;
N = ITEMSIZE(L);
if (N > 0) goto L_0472;
FAIL(_imp_str_literal("Null area?"));
L_0472:;
if (R->TYPE != 1) goto L_0473;
if (N == 32) goto L_0474;
FAIL(_imp_str_literal("Bad set size"));
L_0474:;
void DOSET(int CODE) {
PENDING = CODE;
LOADADDRESS(&L, 1);
PRIM(50);
} /* DOSET */
if (PENDING == 61) goto L_0475;
if (PENDING != 35) goto L_0476;
L_0475:;
DOSET(PENDING);
goto L_0477;
L_0476:;
if (INVERT != 0) goto L_0478;
if (PENDING != 62) goto L_0479;
DOSET(35);
goto L_047A;
L_0479:;
if (PENDING != 60) goto L_047B;
PENDING = 128 + 48;
goto L_047A;
L_047B:;
if (PENDING != 41) goto L_047C;
PENDING = 70;
goto L_047A;
L_047C:;
if (PENDING != 40) goto L_047D;
DOSET(61);
goto L_047A;
L_047D:;
FAIL(_imp_str_literal("Null/1"));
L_047A:;
goto L_0477;
L_0478:;
if (PENDING != 62) goto L_047E;
PENDING = 128 + 48;
goto L_047F;
L_047E:;
if (PENDING != 60) goto L_0480;
DOSET(35);
goto L_047F;
L_0480:;
if (PENDING != 41) goto L_0481;
DOSET(61);
goto L_047F;
L_0481:;
if (PENDING != 40) goto L_0482;
PENDING = 70;
goto L_047F;
L_0482:;
FAIL(_imp_str_literal("Null/2"));
L_047F:;
L_0477:;
INVERT = 0;
goto L_0483;
L_0473:;
if (L != 13) goto L_0484;
if (13 != R->TYPE) goto L_0484;
if (N == 32) goto L_0485;
FAIL(_imp_str_literal("Bad set size"));
L_0485:;
if (PENDING == 61) goto L_0486;
if (PENDING != 35) goto L_0487;
L_0486:;
AMAP(&L);
AMAP(R);
LOADPAIR(&L, 1, R, 2);
PRIM(51);
goto L_0488;
L_0487:;
if (PENDING != 60) goto L_0489;
COMPARESET(&L, R, 35);
goto L_048A;
L_0489:;
if (PENDING != 62) goto L_048B;
COMPARESET(R, &L, 35);
goto L_048A;
L_048B:;
if (PENDING != 40) goto L_048C;
COMPARESET(R, &L, 61);
goto L_048A;
L_048C:;
if (PENDING != 41) goto L_048D;
COMPARESET(&L, R, 61);
goto L_048A;
L_048D:;
FAIL(_imp_str_literal("bad set comparison"));
L_048A:;
L_0488:;
goto L_0483;
L_0484:;
AMAP(&L);
AMAP(R);
SIZE = LITERAL(N);
LOADTRIO(&L, 2, R, 3, SIZE, 1);
RELEASEANDDROP(SIZE);
PRIM(40);
L_0483:;
} /* COMPARERECORDS */
void TRYFORZERO(struct STACKFM * V, int MOD) {
int OLD;
OLD = PENDING;
if (V->DISP != *MOD) goto L_048E;
if (PENDING != 60) goto L_048F;
PENDING = 40;
goto L_0490;
L_048F:;
if (PENDING != 41) goto L_0491;
PENDING = 62;
L_0491:;
L_0490:;
goto L_0492;
L_048E:;
if (V->DISP != -*MOD) goto L_0493;
if (PENDING != 62) goto L_0494;
PENDING = 41;
goto L_0495;
L_0494:;
if (PENDING != 40) goto L_0496;
PENDING = 60;
L_0496:;
L_0495:;
L_0493:;
L_0492:;
if (PENDING == OLD) goto L_0497;
V->DISP = 0;
L_0497:;
} /* TRYFORZERO */
void COMPAREFLOATING(struct STACKFM * LEFT, struct STACKFM * RIGHT) {
int SUITABLECONST(struct STACKFM * L, struct STACKFM * R) {
int OP;
int N;
if (ICONST(&R)) goto L_0498;
return 0 /*FALSE*/;
L_0498:;
if (0 > R) goto L_0499;
if (R > 5) goto L_0499;
OP = 244379920;
N = R;
goto L_049A;
L_0499:;
if (-5 > R) goto L_049B;
if (R > 0) goto L_049B;
OP = 246477072;
N = -R;
goto L_049A;
L_049B:;
if (R != 10) goto L_049C;
OP = 244379920;
N = 7;
goto L_049A;
L_049C:;
if (R != -10) goto L_049D;
OP = 246477072;
N = 7;
goto L_049A;
L_049D:;
return 0 /*FALSE*/;
L_049A:;
LOAD(&L, 26);
PLANT8(OP | 8, L, N);
return 1 /*TRUE*/;
} /* SUITABLECONST */
if (!(SUITABLECONST(LEFT, &RIGHT))) goto L_049E;
return;
L_049E:;
if (!(SUITABLECONST(&RIGHT, LEFT))) goto L_049F;
INVERT = INVERT ^ 1;
return;
L_049F:;
LOAD(LEFT, 26);
LOAD(&RIGHT, 26);
PLANT8(244379920, LEFT->BASE, RIGHT);
} /* COMPAREFLOATING */
void COMPARE(struct STACKFM * LEFT, struct STACKFM * RIGHT) {
int LAB;
struct STACKFM *W;
void DOCONST(struct STACKFM * A, struct STACKFM * B) {
int N;
int OP;
int V;
LOADUP(&A);
V = B;
if (V < 0) goto L_04A0;
N = IMMEDIATE(V);
OP = 22020096;
goto L_04A1;
L_04A0:;
N = IMMEDIATE(-V);
OP = 24117248;
L_04A1:;
if (N >= 0) goto L_04A2;
LOADUP(&B);
N = JUST(B);
OP = 22020096;
L_04A2:;
PLANT1(OP, A, 0, N);
if (PENDING != 35) goto L_04A3;
PENDINGKNOWNREGISTER = A;
PENDINGKNOWN = 0;
PENDINGKNOWN.DISP = V;
PENDINGKNOWN.TYPE = 1;
L_04A3:;
} /* DOCONST */
PENDINGKNOWNREGISTER = 0;
if (CODE == 128 + 63) goto L_04A4;
if (CODE == 128 + 34) goto L_04A4;
UNSIGNED = 0;
L_04A4:;
if (PENDINGTAG == 0) goto L_04A5;
LAB = PENDINGTAG;
PENDINGTAG = 0;
W = LITERAL(PENDINGLIT);
if (PENDING == 62) goto L_04A6;
if (PENDING != 41) goto L_04A7;
L_04A6:;
if (RIGHT < PENDINGLIT) goto L_04A7;
if (ICONST(&RIGHT)) goto L_04A8;
L_04A7:;
LOADUP(LEFT);
COMPARE(LEFT, W);
RELEASEANDDROP(W);
JUMPFORWARD(LAB, 2);
goto L_04A9;
L_04A8:;
UNSIGNED = 10;
OPERATE(5, LEFT, W);
RIGHT = RIGHT - PENDINGLIT;
L_04A9:;
L_04A5:;
if (LEFT->TYPE == 8) goto L_04AA;
if (RIGHT == 8) goto L_04AA;
if (LEFT->OPER == 22) goto L_04AA;
if (RIGHT != 22) goto L_04AB;
L_04AA:;
COMPARESTRINGS(LEFT, &RIGHT);
return;
L_04AB:;
if (LEFT->TYPE == 9) goto L_04AC;
if (LEFT->TYPE == 13) goto L_04AC;
if (RIGHT == 9) goto L_04AC;
if (RIGHT != 13) goto L_04AD;
L_04AC:;
COMPARERECORDS(LEFT, &RIGHT);
return;
L_04AD:;
if (!(ICONST(&RIGHT))) goto L_04AE;
if (FLOATING(LEFT)) goto L_04AF;
TRYFORZERO(&RIGHT, 1);
L_04AF:;
if (!(ICONST(LEFT))) goto L_04B0;
SETPENDINGFOR(LEFT->DISP - RIGHT);
return;
L_04B0:;
if (RIGHT != 0) goto L_04B1;
TESTZERO(LEFT);
return;
L_04B1:;
goto L_04B2;
L_04AE:;
if (!(ICONST(LEFT))) goto L_04B3;
if (FLOATING(&RIGHT)) goto L_04B4;
TRYFORZERO(LEFT, -1);
L_04B4:;
if (LEFT->DISP != 0) goto L_04B5;
TESTZERO(&RIGHT);
INVERT = INVERT ^ 1;
return;
L_04B5:;
L_04B3:;
L_04B2:;
if (FLOATING(LEFT)) goto L_04B6;
if (!(FLOATING(&RIGHT))) goto L_04B7;
L_04B6:;
COMPAREFLOATING(LEFT, &RIGHT);
goto L_04B8;
L_04B7:;
if (!(ICONST(&RIGHT))) goto L_04B9;
DOCONST(LEFT, &RIGHT);
goto L_04BA;
L_04B9:;
if (!(ICONST(LEFT))) goto L_04BB;
DOCONST(&RIGHT, LEFT);
INVERT = INVERT ^ 1;
goto L_04BA;
L_04BB:;
LOADUP(LEFT);
LOADUP(&RIGHT);
LOADUP(LEFT);
PLANT1(22020096, LEFT->BASE, 0, JUST(RIGHT));
L_04BA:;
L_04B8:;
} /* COMPARE */
void COMPAREVALUES(void) {
struct STACKFM *L;
struct STACKFM *R;
R = STACK;
L = R->STACK;
STACK = L->STACK;
COMPARE(L, R);
RELEASEANDDROPPAIR(L, R);
} /* COMPAREVALUES */
void COMPAREDOUBLE(void) {
struct STACKFM *L;
struct STACKFM *R;
R = STACK;
L = R->STACK;
R->STACK = L->STACK;
if (R->OPER == 0) goto L_04BC;
if (R->OPER != 22) goto L_04BD;
EVALUATESTRINGEXPRESSION(R);
goto L_04BE;
L_04BD:;
LOADUP(R);
L_04BE:;
L_04BC:;
if (PENDING != 62) goto L_04BF;
if (L->DISP < 0) goto L_04BF;
if (!(ICONST(L))) goto L_04BF;
if (R->TYPE > 5) goto L_04BF;
_imp_READSYMBOL(&PENDING);
PENDINGLIT = L->DISP;
PENDINGTAG = TAG();
goto L_04C0;
L_04BF:;
COMPARE(L, R);
L_04C0:;
RELEASEANDDROP(L);
} /* COMPAREDOUBLE */
void COMPAREADDRESSES(void) {
struct STACKFM *L;
struct STACKFM *R;
R = STACK;
L = R->STACK;
STACK = L->STACK;
AMAP(L);
AMAP(R);
COMPARE(L, R);
RELEASEANDDROPPAIR(L, R);
} /* COMPAREADDRESSES */
void STACKCONDITION(void) {
int CC;
struct STACKFM *L;
struct STACKFM *R;
R = STACK;
L = R->STACK;
STACK = L->STACK;
COMPARE(L, R);
RELEASEANDDROPPAIR(L, R);
if (PENDING != 61) goto L_04C1;
CC = 1;
goto L_04C2;
L_04C1:;
if (PENDING != 60) goto L_04C3;
CC = 2;
goto L_04C2;
L_04C3:;
if (PENDING != 40) goto L_04C4;
CC = 3;
goto L_04C2;
L_04C4:;
if (PENDING != 62) goto L_04C5;
CC = 4;
goto L_04C2;
L_04C5:;
if (PENDING != 41) goto L_04C6;
CC = 5;
goto L_04C2;
L_04C6:;
if (PENDING != 35) goto L_04C7;
CC = 6;
goto L_04C2;
L_04C7:;
if (PENDING != 116) goto L_04C8;
CC = 8;
goto L_04C2;
L_04C8:;
if (PENDING != 102) goto L_04C9;
CC = 9;
goto L_04C2;
L_04C9:;
if (PENDING != 70) goto L_04CA;
CC = 7;
goto L_04C2;
L_04CA:;
if (PENDING != 128 + 48) goto L_04CB;
CC = 0;
goto L_04C2;
L_04CB:;
FAIL(_imp_str_literal("Bad CC"));
L_04C2:;
_imp_READSYMBOL(&PENDING);
if (INVERT == 0) goto L_04CC;
CC = REVERSE[CC];
INVERT = 0;
L_04CC:;
STACKTRUEORFALSE(CC);
} /* STACKCONDITION */
void GENERALCOMPARE(void) {
int OP;
struct STACKFM *RIGHT;
struct STACKFM *LEFT;
struct STACKFM *RLEN;
struct STACKFM *LLEN;
RLEN = STACK;
LLEN = RLEN->STACK;
RIGHT = LLEN->STACK;
LEFT = RIGHT->STACK;
STACK = LEFT->STACK;
if (!(ICONST(RLEN))) goto L_04CD;
if (ICONST(LLEN)) goto L_04CE;
L_04CD:;
FAIL(_imp_str_literal("variable compare"));
L_04CE:;
if (RLEN->DISP != LLEN->DISP) goto L_04CF;
AMAP(LEFT);
AMAP(RIGHT);
LOADTRIO(LEFT, 2, RIGHT, 3, RLEN, 1);
PRIM(40);
goto L_04D0;
L_04CF:;
NOTINYET();
L_04D0:;
RELEASEANDDROPPAIR(RLEN, LLEN);
RELEASEANDDROPPAIR(RIGHT, LEFT);
} /* GENERALCOMPARE */
void GENERALMOVE(void) {
struct STACKFM *F;
struct STACKFM *T;
struct STACKFM *FLEN;
struct STACKFM *TLEN;
FLEN = STACK;
TLEN = FLEN->STACK;
F = TLEN->STACK;
T = F->STACK;
STACK = T->STACK;
LOADPAIR(TLEN, 4, FLEN, 5);
LOADPAIR(T, 2, F, 3);
LOADPAIR(TLEN, 4, FLEN, 5);
LOADPAIR(T, 2, F, 3);
RELEASEANDDROPPAIR(FLEN, TLEN);
RELEASEANDDROPPAIR(F, T);
PRIM(7);
FORGETEVERYTHING();
} /* GENERALMOVE */
void RECORDASSIGN(struct STACKFM * FROM, struct STACKFM * TO) {
int LENL;
int LENR;
int INC;
int MOD;
int LOAD;
int R;
int ALIGNED;
ALIGNED = 1;
int ZERO;
void RECORDOP(void) {
if (R >= 0) goto L_04D1;
R = GPR();
L_04D1:;
if (LOAD == 0) goto L_04D2;
PLANT2(68157440 | MOD, R, FROM);
L_04D2:;
PLANT2(67108864 | MOD, R, TO);
} /* RECORDOP */
LENL = ITEMSIZE(TO->FORMAT);
LENR = ITEMSIZE(FROM->FORMAT);
if (LENL == 0) goto L_04D3;
if (LENR == 0) goto L_04D4;
if (LENR >= LENL) goto L_04D4;
L_04D3:;
LENL = LENR;
L_04D4:;
if (LENL > 0) goto L_04D5;
return;
L_04D5:;
if (LENL & 3 != 0) goto L_04D6;
if (PROPERLYALIGNED(TO, 3)) goto L_04D7;
L_04D6:;
ALIGNED = 0;
L_04D7:;
ZERO = 0;
if (!(ICONST(FROM))) goto L_04D8;
ZERO = 1;
goto L_04D9;
L_04D8:;
if (PROPERLYALIGNED(FROM, 3)) goto L_04DA;
ALIGNED = 0;
L_04DA:;
L_04D9:;
FORGETDESTINATION(TO);
MAKEAUTOI(TO, 1);
LOAD = 1;
INC = 4;
MOD = 0;
if (ALIGNED != 0) goto L_04DB;
INC = 1;
MOD = 4194304;
TO->TYPE = 4;
L_04DB:;
if (ZERO == 0) goto L_04DC;
LOAD = 0;
LOADUP(FROM);
R = FROM->BASE;
goto L_04DD;
L_04DC:;
MAKEAUTOI(FROM, TO->TYPE);
R = -1;
L_04DD:;
REPEAT(RECORDOP, LITERAL(LENL), INC, 6);
} /* RECORDASSIGN */
void SETASSIGN(struct STACKFM * FROM, struct STACKFM * DEST) {
struct MEMBERFM *M;
struct MEMBERFM *X;
int OP;
OP = FROM->OPER;
int FN;
struct STACKFM *W;
struct STACKFM *INDEX;
struct STACKFM *TO;
TO = COPY(DEST);
if (FROM->MEMBERS == NIL) goto L_04DE;
BUILDSET(FROM);
L_04DE:;
W = FROM->LINK;
if (W == NIL) goto L_04DF;
FROM->LINK = NIL;
FROM->OPER = 0;
if (FROM->FLAGS & 16384 == 0) goto L_04E0;
FROM = W;
goto L_04E1;
L_04E0:;
if (OP == 25) goto L_04E2;
if (OP == 26) goto L_04E2;
if (OP == 27) goto L_04E2;
FAIL(_imp_str_literal("Bad set operator"));
L_04E2:;
if (W->FLAGS & 16384 != 0) goto L_04E3;
if (SAME(FROM, TO)) goto L_04E4;
FROM->OPER = OP;
FROM->LINK = W;
LOADUP(FROM);
SETASSIGN(FROM, TO);
RELEASEANDDROP(TO);
return;
L_04E4:;
if (W->MEMBERS == NIL) goto L_04E5;
if (W->MEMBERS->DATA > 2) goto L_04E6;
if (OP != 27) goto L_04E5;
L_04E6:;
BUILDSET(W);
L_04E5:;
LOADADDRESS(TO, 9);
if (OP == 27) goto L_04E7;
if (W->MEMBERS == NIL) goto L_04E7;
M = W->MEMBERS;
W->MEMBERS = NIL;
L_04E8:;
if (M == NIL) goto L_04E9;
X = M;
M = M->LINK;
LOADPAIR(TO, 9, X->A, 2);
if (X->B == NIL) goto L_04EA;
LOAD(X->B, 1);
LOADPAIR(TO, 9, X->A, 2);
RELEASEANDDROP(X->B);
if (OP != 25) goto L_04EB;
FN = 28;
goto L_04EC;
L_04EB:;
FN = 35;
L_04EC:;
goto L_04ED;
L_04EA:;
if (OP != 25) goto L_04EE;
FN = 20;
goto L_04ED;
L_04EE:;
FN = 25;
L_04ED:;
RELEASEANDDROP(X->A);
_imp_DISPOSE(X);
PRIM(FN);
goto L_04E8;
L_04E9:;
RELEASEANDDROPPAIR(W, TO);
goto L_04EF;
L_04E7:;
AMAP(W);
LOADPAIR(TO, 9, W, 12);
RELEASEANDDROP(W);
if (OP != 25) goto L_04F0;
FN = 29;
goto L_04F1;
L_04F0:;
if (OP != 26) goto L_04F2;
FN = 30;
goto L_04F1;
L_04F2:;
FN = 31;
L_04F1:;
PRIM(FN);
RELEASEANDDROP(TO);
L_04EF:;
return;
L_04E3:;
L_04E1:;
L_04DF:;
if (W == NIL) goto L_04F3;
RELEASEANDDROP(W);
L_04F3:;
FORGETDESTINATION(TO);
if (FROM->FLAGS & 16384 == 0) goto L_04F4;
void ZERO(int R) {
struct STACKFM *W;
W = LITERAL(0);
LOAD(W, R);
RELEASEANDDROP(W);
} /* ZERO */
LOADADDRESS(TO, 9);
ZERO(1);
ZERO(2);
ZERO(3);
ZERO(4);
PLANT4(134217728 | 8388608 | 2097152, TO->BASE, 15);
PLANT4(134217728 | 8388608, TO->BASE, 15);
goto L_04F5;
L_04F4:;
LOADADDRESS(FROM, 12);
LOADADDRESS(TO, 9);
HAZARD(1);
HAZARD(2);
HAZARD(3);
HAZARD(4);
HAZARD(5);
HAZARD(6);
HAZARD(7);
HAZARD(8);
PLANT4(135266304 | 8388608, FROM->BASE, 255);
PLANT4(134217728 | 8388608, TO->BASE, 255);
FORGET(1);
FORGET(2);
FORGET(3);
FORGET(4);
FORGET(5);
FORGET(6);
FORGET(7);
FORGET(8);
L_04F5:;
RELEASEANDDROP(TO);
} /* SETASSIGN */
void RESOLVE(int FLAG) {
int LAB;
int INLAB;
INLAB = 0;
int PEND;
int N;
struct STACKFM *S;
struct STACKFM *A;
struct STACKFM *B;
struct STACKFM *C;
N = 0;
if (*FLAG & 1 == 0) goto L_04F6;
C = STACK;
STACK = STACK->STACK;
goto L_04F7;
L_04F6:;
N = N | 1;
C = NIL;
L_04F7:;
B = STACK;
STACK = STACK->STACK;
if (*FLAG & 2 == 0) goto L_04F8;
A = STACK;
STACK = STACK->STACK;
goto L_04F9;
L_04F8:;
N = N | 2;
A = NIL;
L_04F9:;
S = STACK;
STACK = STACK->STACK;
if (B->OPER == 0) goto L_04FA;
EVALUATESTRINGEXPRESSION(B);
L_04FA:;
if (B->TYPE > 5) goto L_04FB;
FIXTOSTRING(B);
L_04FB:;
AMAP(S);
AMAP(B);
LOADPAIR(S, 2, B, 3);
RELEASEANDDROPPAIR(S, B);
PRIM(3);
if (*FLAG & 4 != 0) goto L_04FC;
PRIM(12);
goto L_04FD;
L_04FC:;
if (PENDING == 116) goto L_04FE;
if (PENDING == 107) goto L_04FE;
FAIL(_imp_str_literal("corrupt resolution"));
L_04FE:;
PEND = PENDING;
_imp_READSYMBOL(&PENDING);
INLAB = TAG();
if (PEND != 116) goto L_04FF;
LAB = NEWLABEL();
JUMPTO(LAB, 6);
goto L_0500;
L_04FF:;
JUMPFORWARD(INLAB, 6);
INLAB = 0;
L_0500:;
L_04FD:;
CLAIM(2);
CLAIM(8);
CLAIM(4);
CLAIM(7);
if (A == NIL) goto L_0501;
LOADADDRESS(A, 3);
PRIM(18);
RELEASEANDDROP(A);
L_0501:;
if (C == NIL) goto L_0502;
LOADADDRESS(C, 3);
PRIM(24);
RELEASEANDDROP(C);
L_0502:;
RELEASE(2);
RELEASE(8);
RELEASE(4);
RELEASE(7);
if (INLAB == 0) goto L_0503;
JUMPFORWARD(INLAB, 7);
DEFINELABEL(LAB);
L_0503:;
} /* RESOLVE */
void EVALUATESTRINGEXPRESSION(struct STACKFM * V) {
struct STACKFM *W;
W = CLAIMWORKAREA(256, 8);
STRINGASSIGN(V, W);
REPLACE(V, W);
} /* EVALUATESTRINGEXPRESSION */
void STRINGASSIGN(struct STACKFM * R, struct STACKFM * L) {
struct STACKFM *W;
struct STACKFM *LL;
struct STACKFM *DELAYV;
struct STACKFM *Z;
int CONCLENGTH;
CONCLENGTH = 1;
int ALLCONST;
ALLCONST = 1;
int REG;
int DELAY;
DELAY = 0;
int LEN;
LEN = 0;
int HERE;
int LAB;
int N;
_imp_string255 VAL;
VAL = _imp_str_literal("");
int SAFE(struct STACKFM * TARGET, struct STACKFM * CHAIN) {
L_0504:;
CONCLENGTH = CONCLENGTH + 1;
if (CHAIN <= 5) goto L_0505;
CONCLENGTH = -1000;
L_0505:;
if (ICONSTITEM(&CHAIN)) goto L_0506;
ALLCONST = 0;
L_0506:;
if (ALLCONST == 0) goto L_0507;
VAL = _imp_join((_imp_string)(VAL), (_imp_string)(_imp_TOSTRING(CHAIN & 255)));
L_0507:;
if (SAME(&TARGET, &CHAIN)) goto L_0508;
if (&TARGET == NIL) goto L_0509;
if (&CHAIN == NIL) goto L_0509;
L_0508:;
return 0 /*FALSE*/;
L_0509:;
CHAIN = &CHAIN;
if (&CHAIN == NIL) goto L_050A;
goto L_0504;
L_050A:;
return 1 /*TRUE*/;
} /* SAFE */
void MOVE1(void) {
FORGET(L->BASE);
FORGET(R->BASE);
SIMPLE(R, L);
} /* MOVE1 */
FORGETDESTINATION(L);
if (R->OPER != 0) goto L_050B;
N = R->BIAS;
if (N == 0) goto L_050C;
if (N != 1) goto L_050D;
L = COPY(L);
L->TYPE = 4;
R = LITERAL(0);
SIMPLE(R, L);
goto L_050E;
L_050D:;
if (N >= 0) goto L_050F;
U_100C:;
L = COPY(L);
ADVANCE(L, 4, 1);
SIMPLE(R, L);
R = LITERAL(1);
ADVANCE(L, 4, -1);
SIMPLE(R, L);
goto L_050E;
L_050F:;
L = COPY(L);
MAKEAUTOI(L, 4);
R = COPY(R);
MAKEAUTOI(R, 4);
REPEAT(MOVE1, LITERAL(N), 1, 6);
L_050E:;
RELEASEANDDROPPAIR(L, R);
goto L_0510;
L_050C:;
if (R->TYPE > 5) goto L_0511;
if (!(ICONSTITEM(R))) goto L_0512;
goto U_100C;
L_0512:;
W = COPY(L);
ADVANCE(W, 4, 1);
SIMPLE(R, W);
RELEASEANDDROP(W);
L = COPY(L);
L->TYPE = 4;
MOVELITERAL(1, L);
RELEASEANDDROP(L);
goto L_0510;
L_0511:;
L = COPY(L);
MAKEAUTOI(L, 4);
R = COPY(R);
MAKEAUTOI(R, 4);
W = COPY(R);
W->FORM = 1;
REPEAT(MOVE1, W, 1, 5);
RELEASEANDDROPPAIR(L, R);
L_0510:;
return;
L_050B:;
void ASSIGNVIAWORK(void) {
struct STACKFM *W;
W = CLAIMWORKAREA(255, 8);
STRINGASSIGN(R, W);
STRINGASSIGN(W, L);
RELEASEANDDROP(W);
} /* ASSIGNVIAWORK */
W = R->LINK;
if (SAFE(L, W)) goto L_0513;
ASSIGNVIAWORK();
return;
L_0513:;
R->OPLINK = 0;
if (CONCLENGTH <= 0) goto L_0514;
if (R->TYPE > 5) goto L_0514;
L = COPY(L);
if (ICONSTITEM(R)) goto L_0515;
ALLCONST = 0;
L_0515:;
if (ALLCONST == 0) goto L_0516;
VALUE.STRING = _imp_join((_imp_string)(_imp_TOSTRING(R->DISP & 255)), (_imp_string)(VAL));
Z = CONSTSTRING();
STRINGASSIGN(Z, L);
RELEASEANDDROP(Z);
goto L_0517;
L_0516:;
MAKEAUTOI(L, 4);
MOVELITERAL(CONCLENGTH, L);
L_0517:;
void ASSIGNPART(void) {
R->OPLINK = 0;
if (ALLCONST != 0) goto L_0514;
SIMPLE(R, L);
L_0514:;
} /* ASSIGNPART */
ASSIGNPART();
L_0518:;
R = W;
W = R->LINK;
ASSIGNPART();
RELEASEANDDROP(R);
if (W == NIL) goto L_0519;
goto L_0518;
L_0519:;
RELEASEANDDROP(L);
return;
L_051A:;
void CONCAT(struct STACKFM * SOURCE) {
struct STACKFM *DEST;
SOURCE = 0;
if (SOURCE > 5) goto L_051A;
DEST = REGISTER(3);
DEST->TYPE = 4;
DEST->FORM = 2;
SIMPLE(&SOURCE, DEST);
RELEASEANDDROP(DEST);
return;
L_051A:;
LOADADDRESS(&SOURCE, 4);
PRIM(8);
} /* CONCAT */
LL = COPY(L);
AMAP(LL);
if (!(SAME(L, R))) goto L_051B;
if (W->LINK != NIL) goto L_051C;
if (W->TYPE > 5) goto L_051C;
LOADUP(LL);
LL->TYPE = 4;
LL->FORM = 1;
R = COPY(LL);
Z = COPY(LL);
OPERATE(4, Z, LITERAL(1));
LOADUP(Z);
LL->INDEX = COPY(Z);
LL->XSIZE = 1;
SIMPLE(W, LL);
SIMPLE(Z, R);
RELEASEANDDROPPAIR(W, Z);
RELEASEANDDROPPAIR(LL, R);
return;
L_051C:;
LOAD(LL, 3);
Z = COPY(LL);
Z->TYPE = 4;
Z->FORM = 2;
LOAD(Z, 2);
R = COPY(LL);
LOAD(R, 1);
DROP(R);
LL->INDEX = Z;
LL->XSIZE = 1;
LOAD(LL, 3);
RELEASE(3);
FORGET(3);
ACTIVITY[3] = -1;
LL->BASE = 1;
goto L_051D;
L_051B:;
DELAYV = NIL;
L_051E:;
if (R->TYPE > 5) goto L_051F;
DELAY = DELAY + 1;
R->OPER = 0;
R->LINK = DELAYV;
DELAYV = R;
R = W;
W = W->LINK;
goto L_051E;
L_051F:;
OPERATE(4, LL, LITERAL(DELAY + 1));
LOAD(LL, 3);
LOAD(LL, 1);
FORGET(3);
ACTIVITY[3] = -1;
if (R == NIL) goto L_0520;
CONCAT(R);
RELEASE(R->BASE);
R->BASE = 0;
if (DELAY == 0) goto L_0521;
DROP(R);
L_0521:;
goto L_0522;
L_0520:;
LEN = DELAY;
L_0522:;
L_051D:;
L_0523:;
if (W == NIL) goto L_0524;
R = W;
W = R->LINK;
CONCAT(R);
RELEASEANDDROP(R);
goto L_0523;
L_0524:;
LL->TYPE = 4;
LL->FORM = 3;
L_0525:;
if (DELAY == 0) goto L_0526;
DELAY = DELAY - 1;
R = DELAYV;
DELAYV = R->LINK;
R->LINK = NIL;
SIMPLE(R, LL);
if (DELAY == 0) goto L_0527;
RELEASEANDDROP(R);
L_0527:;
goto L_0525;
L_0526:;
if (LEN != 0) goto L_0528;
PLANT1(4194304, 3, 3, JUST(1));
PLANT2(67108864, 3, LL);
RELEASEANDDROP(LL);
LL = COPY(L);
LL->TYPE = 4;
REMEMBER(3, LL);
goto L_0529;
L_0528:;
MOVELITERAL(LEN, LL);
L_0529:;
RELEASEANDDROP(LL);
ACTIVITY[3] = 0;
} /* STRINGASSIGN */
void STORE(struct STACKFM * R, struct STACKFM * L) {
if (R->OPER != 0) goto L_052A;
if (SAME(L, R)) goto L_052B;
L_052A:;
if (L->TYPE != 9) goto L_052C;
RECORDASSIGN(R, L);
goto L_052D;
L_052C:;
if (L->TYPE != 8) goto L_052E;
STRINGASSIGN(R, L);
goto L_052D;
L_052E:;
if (L->TYPE != 13) goto L_052F;
SETASSIGN(R, L);
goto L_052D;
L_052F:;
MOVE(R, L);
L_052D:;
L_052B:;
} /* STORE */
void ASSIGNPROCEDURE(struct STACKFM * R, struct STACKFM * L) {
int MASK;
struct STACKFM *W;
struct STACKFM *V;
if (R->FLAGS & 1024 == 0) goto L_0530;
HAZARD(3);
DIR2(19, R->DISP);
REFS = REFS + 1;
*CA = *CA + 4;
R = REGISTER(14);
goto L_0531;
L_0530:;
if (R->FLAGS & 4 == 0) goto L_0532;
R->TYPE = 1;
R->FORM = 1;
R->AREA = 0;
R = COPY(R);
goto L_0531;
L_0532:;
if (R->FLAGS & 16777216 == 0) goto L_0533;
HAZARD(14);
DIR2(18, R->DISP);
REFS = REFS + 1;
*CA = *CA + 4;
R = REGISTER(14);
goto L_0531;
L_0533:;
HAZARD(14);
DIR2(18, R->DISP);
*CA = *CA + 4;
REFS = REFS + 1;
CLAIM(14);
MASK = 9216;
W = NIL;
if (R->FLAGS & 65536 == 0) goto L_0534;
FRAME = FRAME - 4;
W = LITERAL(LOCALDISPLAY);
W->BASE = *LOCAL;
LOAD(W, 15);
MASK = 25600;
L_0534:;
FRAME = (FRAME & (~3)) - 8;
R = LOCALINTEGER(FRAME);
LOADUPADDRESS(R);
PLANT4(134217728 | 8388608, R->BASE, MASK);
RELEASE(14);
if (W == NIL) goto L_0535;
RELEASEANDDROP(W);
L_0535:;
L_0531:;
L->TYPE = 1;
SIMPLE(R, L);
RELEASEANDDROP(R);
} /* ASSIGNPROCEDURE */
void ASSIGNARRAYNAME(struct STACKFM * ARRAY, struct STACKFM * TO) {
struct STACKFM *DOPEVECTOR;
ARRAY->TYPE = 1;
TO = 1;
if (ARRAY->FLAGS & (64 | 32) != 0) goto L_0536;
if (ARRAY->ADATA != NIL) goto L_0537;
DOPEVECTOR = LITERAL(0);
goto L_0538;
L_0537:;
DOPEVECTOR = LITERAL(ARRAY->ADATA->BASE);
DOPEVECTOR->AREA = 512;
L_0538:;
AMAP(ARRAY);
goto L_0539;
L_0536:;
DOPEVECTOR = COPY(ARRAY);
ADVANCE(DOPEVECTOR, 1, 4);
L_0539:;
SIMPLIFY(&TO);
ADVANCE(&TO, 1, 4);
SIMPLE(DOPEVECTOR, &TO);
RELEASEANDDROP(DOPEVECTOR);
ADVANCE(&TO, 1, -4);
SIMPLE(ARRAY, &TO);
} /* ASSIGNARRAYNAME */
int SELECTBEST(struct STACKFM * FROM, struct STACKFM * TO, int DEFAULT) {
struct STACKFM *W;
int REG;
if (!(INREG(FROM))) goto L_053A;
return *DEFAULT;
L_053A:;
W = COPY(&TO);
OPTIMISE(W, 1);
if (!(INREG(W))) goto L_053B;
if (ACTIVITY[W->BASE] != 1) goto L_053B;
REG = W->BASE;
goto L_053C;
L_053B:;
REG = *DEFAULT;
L_053C:;
RELEASEANDDROP(W);
return REG;
} /* SELECTBEST */
void MOVE(struct STACKFM * FROM, struct STACKFM * TO) {
struct STACKFM *BF1;
struct STACKFM *BF2;
struct STACKFM *BT1;
struct STACKFM *BT2;
struct STACKFM *W;
int R;
int PA;
int N;
int BEST;
int OP;
if (FROM->OPER != 4) goto L_053D;
if (PENDINGAUTO == 0) goto L_053D;
W = FROM->LINK;
if (!(ICONST(W))) goto L_053E;
if (-4095 > W->DISP) goto L_053E;
if (W->DISP > 4095) goto L_053E;
FROM->OPER = 0;
FROM->LINK = NIL;
PA = PENDINGAUTO;
OPTIMISE(FROM, 1);
if (!(INREG(FROM))) goto L_053F;
if (FROM->BASE != PA) goto L_053F;
if (PENDINGAUTON == 0) goto L_0540;
if (_imp_IMOD((unsigned int)W->DISP >> 2) > 255) goto L_053F;
L_0540:;
DIR3(16, *CA - PENDINGAUTOCA, (unsigned int)W->DISP >> PENDINGAUTON);
FORGET(PA);
DROP(W);
goto L_0541;
L_053F:;
FROM->OPER = 4;
FROM->LINK = W;
L_0541:;
L_053E:;
L_053D:;
if (FROM->TYPE != 2) goto L_0542;
if (FROM->OPER == 9) goto L_0543;
if (FROM->OPER != 12) goto L_0542;
L_0543:;
if (TO != 1) goto L_0542;
if (!(ICONST(FROM->LINK))) goto L_0542;
N = FROM->LINK->DISP;
if (FROM->OPER != 12) goto L_0544;
N = (~N);
L_0544:;
if (N & -65536 != 0) goto L_0545;
RELEASEANDDROP(FROM->LINK);
FROM->OPER = 0;
FROM->LINK = NIL;
if (N > 255) goto L_0546;
ADVANCE(FROM, 4, 0);
if (N == 255) goto L_0547;
OPERATE(9, FROM, LITERAL(N));
L_0547:;
goto L_0548;
L_0546:;
if (N & 255 != 0) goto L_0549;
RELEASEANDDROP(FROM->LINK);
FROM->OPER = 0;
*FROM->LINK = 0;
ADVANCE(FROM, 4, 1);
if ((unsigned int)N >> 8 == 255) goto L_054A;
OPERATE(9, FROM, LITERAL((unsigned int)N >> 8));
L_054A:;
OPERATE(14, FROM, LITERAL(8));
goto L_0548;
L_0549:;
BEST = SELECTBEST(FROM, &TO, 17);
BF2 = COPY(FROM);
ADVANCE(BF2, 4, 1);
if ((unsigned int)N >> 8 == 255) goto L_054B;
OPERATE(9, BF2, LITERAL((unsigned int)N >> 8));
L_054B:;
ADVANCE(FROM, 4, 0);
if (N & 255 == 255) goto L_054C;
OPERATE(9, FROM, LITERAL(N & 255));
L_054C:;
LOADUP(BF2);
LOADSAFELY(FROM, BEST);
LOADUP(BF2);
LOADSAFELY(FROM, BEST);
PLANT1(25165824, FROM->BASE, FROM->BASE, ISHIFT(BF2->BASE, 8, 0));
RELEASEANDDROP(BF2);
L_0548:;
L_0545:;
L_0542:;
if (TO != 2) goto L_054D;
if (!(ICONST(FROM))) goto L_054E;
BF1 = LITERAL(FROM->DISP & 255);
BF2 = LITERAL((unsigned int)FROM->DISP >> 8 & 255);
goto L_054F;
L_054E:;
if (FROM->TYPE != 2) goto L_0550;
if (FROM->OPER != 0) goto L_0550;
if (FROM->INDEX != NIL) goto L_0551;
if (FROM->RECORD == NIL) goto L_0552;
L_0551:;
LOADUPADDRESS(FROM);
FROM->TYPE = 2;
FROM->FORM = 1;
L_0552:;
BF1 = COPY(FROM);
ADVANCE(BF1, 4, 0);
BF2 = COPY(FROM);
ADVANCE(BF2, 4, 1);
goto L_054F;
L_0550:;
if (FROM->TYPE != 4) goto L_0553;
if (FROM->OPER != 0) goto L_0553;
BF1 = COPY(FROM);
ADVANCE(BF1, 4, 0);
BF2 = LITERAL(0);
goto L_054F;
L_0553:;
LOADUP(FROM);
BF1 = COPY(FROM);
BF2 = COPY(FROM);
OPERATE(15, BF2, LITERAL(8));
L_054F:;
BT1 = COPY(&TO);
ADVANCE(BT1, 4, 0);
BT2 = COPY(&TO);
ADVANCE(BT2, 4, 1);
MOVE(BF2, BT2);
MOVE(BF1, BT1);
RELEASEANDDROPPAIR(BF1, BT1);
RELEASEANDDROPPAIR(BF2, BT2);
goto L_0554;
L_054D:;
if (TO != 4) goto L_0555;
if (FROM->OPER != 0) goto L_0556;
if (FROM->TYPE != 2) goto L_0556;
FROM->TYPE = 4;
L_0556:;
SIMPLIFY(&TO);
LOADUP(FROM);
PLANT2(67108864 | 4194304, FROM->BASE, &TO);
goto L_0554;
L_0555:;
if (TO != 7) goto L_0557;
BEST = SELECTBEST(FROM, &TO, 26);
SIMPLIFY(&TO);
LOAD(FROM, BEST);
PLANT6(201359616, FROM->BASE, &TO);
goto L_0554;
L_0557:;
if (TO != 6) goto L_0558;
if (!(ICONST(FROM))) goto L_0559;
if (-5 > FROM->DISP) goto L_055A;
if (FROM->DISP <= 5) goto L_055B;
L_055A:;
if (FROM->DISP == 10) goto L_055B;
if (FROM->DISP != -10) goto L_0559;
L_055B:;
OP = 234914176;
N = FROM->DISP;
if (N >= 0) goto L_055C;
OP = 235962752;
N = -N;
L_055C:;
if (N != 10) goto L_055D;
N = 7;
L_055D:;
R = FPR();
PLANT9(OP | 8, 0, R, N);
PLANT6(201326848, R, &TO);
goto L_055E;
L_0559:;
if (FROM->FORM != 1) goto L_055F;
if (FROM->OPER != 0) goto L_055F;
if (FROM->TYPE != 6) goto L_055F;
TO = COPY(&TO);
TO = 1;
FROM = COPY(FROM);
FROM->TYPE = 1;
MOVE(FROM, &TO);
FORGET(FROM->BASE);
RELEASEANDDROPPAIR(FROM, &TO);
goto L_055E;
L_055F:;
SIMPLIFY(&TO);
LOAD(FROM, 26);
PLANT6(201326848, FROM->BASE, &TO);
L_055E:;
goto L_0554;
L_0558:;
BEST = SELECTBEST(FROM, &TO, 17);
SIMPLIFY(&TO);
LOAD(FROM, BEST);
PLANT2(67108864, FROM->BASE, &TO);
L_0554:;
} /* MOVE */
void MOVELITERAL(int VALUE, struct STACKFM *TO) {
struct STACKFM *W;
W = LITERAL(*VALUE);
SIMPLE(W, &TO);
RELEASEANDDROP(W);
} /* MOVELITERAL */
void MOVEBIASED(struct STACKFM * FROM, struct STACKFM * TO, int BIAS) {
FROM = COPY(&FROM);
TO = COPY(TO);
if (FROM != 1) goto L_0560;
ADVANCE(&FROM, 1, *BIAS);
L_0560:;
ADVANCE(TO, 1, *BIAS);
MOVE(&FROM, TO);
RELEASEANDDROPPAIR(&FROM, TO);
} /* MOVEBIASED */
void STOREADDRESS(struct STACKFM * R, struct STACKFM * L, int *EXTRA) {
struct STACKFM *W;
int RT;
int FORMAT;
if (L->TYPE != 10) goto L_0561;
L->TYPE = 1;
if (L->FORM == 3) goto L_0562;
AMAP(L);
L_0562:;
FORMAT = R;
RT = R;
AMAP(&R);
if (RT != 10) goto L_0563;
MOVEBIASED(&R, L, 4 * 2);
MOVEBIASED(&R, L, 4 * 1);
MOVE(&R, L);
goto L_0564;
L_0563:;
W = LITERAL(TYPECODE[RT]);
MOVEBIASED(W, L, 4 * 2);
RELEASEANDDROP(W);
if (RT != 8) goto L_0565;
if (R != 1) goto L_0565;
if (FORMAT != 1) goto L_0565;
MOVEBIASED(&R, L, 4);
MOVE(&R, L);
goto L_0566;
L_0565:;
W = LITERAL(ITEMSIZE(FORMAT));
MOVEBIASED(W, L, 4);
RELEASEANDDROP(W);
MOVE(&R, L);
L_0566:;
L_0564:;
*EXTRA = *EXTRA + 12;
goto L_0567;
L_0561:;
if (L->FORM != 4) goto L_0568;
ASSIGNPROCEDURE(&R, L);
*EXTRA = *EXTRA + 4;
goto L_0567;
L_0568:;
if (L->FLAGS & 64 == 0) goto L_0569;
ASSIGNARRAYNAME(&R, L);
*EXTRA = *EXTRA + 8;
goto L_0567;
L_0569:;
if (L->TYPE != 8) goto L_056A;
if (L->FORMAT != 1) goto L_056A;
N = R;
AMAP(L);
AMAP(&R);
if (N != 1) goto L_056B;
if (R == 0) goto L_056B;
MOVEBIASED(&R, L, 4);
MOVE(&R, L);
goto L_056C;
L_056B:;
W = LITERAL(N);
MOVEBIASED(W, L, 4);
RELEASEANDDROP(W);
MOVE(&R, L);
L_056C:;
*EXTRA = *EXTRA + 8;
goto L_0567;
L_056A:;
if (L->FORM != 3) goto L_056D;
L->TYPE = 1;
goto L_056E;
L_056D:;
AMAP(L);
L_056E:;
AMAP(&R);
STORE(&R, L);
*EXTRA = *EXTRA + 4;
L_0567:;
} /* STOREADDRESS */
void JAMTRANSFER(struct STACKFM * L, struct STACKFM * R) {
int N;
int TYPE;
struct STACKFM *M;
TYPE = L->TYPE;
if (TYPE == 8) goto L_056F;
JAMIT = 1;
STORE(R, L);
JAMIT = 0;
FORGETDESTINATION(L);
goto L_0570;
L_056F:;
N = L->FORMAT - 1;
if (R->OPER == 0) goto L_0571;
EVALUATESTRINGEXPRESSION(R);
L_0571:;
AMAP(L);
AMAP(R);
if (N > 0) goto L_0572;
M = COPY(L);
M->DISP = M->DISP + 4;
M->TYPE = 1;
goto L_0573;
L_0572:;
M = LITERAL(N + 1);
L_0573:;
LOADTRIO(L, 3, R, 2, M, 1);
PRIM(10);
RELEASEANDDROP(M);
L_0570:;
} /* JAMTRANSFER */
void ASSIGN(int HOW) {
int X;
X = 0;
struct VARFM *V;
struct STACKFM *L;
struct STACKFM *R;
R = STACK;
L = R->STACK;
STACK = L->STACK;
if (DIAG & 32 == 0) goto L_0574;
MONITOR(L, _imp_str_literal("A-L"));
MONITOR(R, _imp_str_literal("A-R"));
L_0574:;
if (*HOW != 0) goto L_0575;
STORE(R, L);
goto L_0576;
L_0575:;
if (*HOW != 1) goto L_0577;
STOREADDRESS(R, L, &X);
goto L_0576;
L_0577:;
JAMTRANSFER(L, R);
L_0576:;
if (ASSIGNLOCK == 0) goto L_0578;
if (L->VARNO == 0) goto L_0578;
V = VAR(L->VARNO);
V->FLAGS = V->FLAGS | 128;
L_0578:;
RELEASEANDDROPPAIR(R, L);
} /* ASSIGN */
void ASSIGNPARAMETER(void) {
struct STACKFM *PAR;
PAR = STACK;
STACK = PAR->STACK;
PAR->PARAMS = STACK->PARAMS;
STACK->PARAMS = PAR;
if (STACK->EXTRA == 0) goto L_0579;
STACK->EXTRA = STACK->EXTRA - 1;
L_0579:;
PAR->VARNO = STACK->EXTRA;
} /* ASSIGNPARAMETER */
struct STACKFM *TOTEMP(struct STACKFM * V, int SIZE) {
struct STACKFM *W;
W = CLAIMWORKAREA(*SIZE, 8);
STRINGASSIGN(V, W);
RELEASEANDDROP(V);
return W;
} /* TOTEMP */
struct STACKFM *PROCEDUREITEMS(struct STACKFM * R) {
int MASK;
struct STACKFM *EP;
struct STACKFM *ENV;
ENV = NIL;
if (R->FLAGS & 1024 == 0) goto L_057A;
MINSB = MINSB - 4;
EP = LOCALINTEGER(MINSB);
EP->BASE = 10;
DIR3(19, R->DISP, EP->DISP);
goto L_057B;
L_057A:;
if (R->FLAGS & 4 == 0) goto L_057C;
R->TYPE = 1;
R->FORM = 1;
R->AREA = 0;
ENV = COPY(R);
EP = COPY(ENV);
ADVANCE(EP, 1, 4);
goto L_057B;
L_057C:;
if (R->FLAGS & 16777216 != 0) goto L_057D;
if (R->FLAGS & 65536 == 0) goto L_057D;
ENV = LOCALINTEGER(LOCALDISPLAY);
AMAP(ENV);
L_057D:;
MINSB = MINSB - 4;
EP = LOCALINTEGER(MINSB);
EP->BASE = 10;
DIR3(18, R->DISP, EP->DISP);
REFS = REFS + 1;
L_057B:;
if (ENV != NIL) goto L_057E;
ENV = LITERAL(0);
L_057E:;
ENV->PRIM = 1;
EP->PRIM = 1;
ENV->PARAMS = EP;
EP->PARAMS = NIL;
return ENV;
} /* PROCEDUREITEMS */
struct STACKFM *ARRAYNAMEITEMS(struct STACKFM * ARRAY) {
struct STACKFM *DOPEVECTOR;
ARRAY = COPY(&ARRAY);
ARRAY = 1;
if (ARRAY & (64 | 32) != 0) goto L_057F;
if (&ARRAY != NIL) goto L_0580;
DOPEVECTOR = LITERAL(0);
goto L_0581;
L_0580:;
DOPEVECTOR = LITERAL(ARRAY);
DOPEVECTOR->AREA = 512;
L_0581:;
AMAP(&ARRAY);
goto L_0582;
L_057F:;
DOPEVECTOR = COPY(&ARRAY);
ADVANCE(DOPEVECTOR, 1, 4);
L_0582:;
ARRAY = 1;
DOPEVECTOR->PRIM = 1;
ARRAY = DOPEVECTOR;
DOPEVECTOR->PARAMS = NIL;
return &ARRAY;
} /* ARRAYNAMEITEMS */
struct STACKFM *ADDRESSITEMS(struct STACKFM * PAR, struct STACKFM * FORMAL) {
struct STACKFM *W;
struct STACKFM *X;
struct STACKFM *Y;
struct STACKFM *Z;
int RT;
int FORMAT;
if (FORMAL->FORM != 4) goto L_0583;
return PROCEDUREITEMS(PAR);
L_0583:;
if (FORMAL->FLAGS & 64 == 0) goto L_0584;
return ARRAYNAMEITEMS(PAR);
L_0584:;
X = COPY(PAR);
AMAP(X);
X->PRIM = 1;
X->PARAMS = NIL;
FORMAT = PAR->FORMAT;
if (FORMAL->TYPE != 10) goto L_0585;
RT = PAR->TYPE;
if (RT != 10) goto L_0586;
ADVANCE(X, 1, 0);
Y = COPY(X);
ADVANCE(Y, 1, 4);
Z = COPY(X);
ADVANCE(Z, 1, 4 * 2);
goto L_0587;
L_0586:;
Z = LITERAL(TYPECODE[RT]);
if (RT != 8) goto L_0588;
if (X->FORM != 1) goto L_0588;
if (FORMAT != 1) goto L_0588;
Y = COPY(X);
ADVANCE(Y, 1, 4);
goto L_0589;
L_0588:;
Y = LITERAL(ITEMSIZE(FORMAT));
L_0589:;
L_0587:;
Y->PRIM = 1;
Z->PRIM = 1;
X->PARAMS = Y;
Y->PARAMS = Z;
Z->PARAMS = NIL;
goto L_058A;
L_0585:;
if (FORMAL->TYPE != 8) goto L_058B;
if (FORMAL->FORMAT != 1) goto L_058B;
if (FORMAT != 1) goto L_058C;
if (X->FORM == 0) goto L_058C;
Y = COPY(X);
ADVANCE(Y, 1, 4);
goto L_058D;
L_058C:;
Y = LITERAL(FORMAT);
L_058D:;
Y->PRIM = 1;
X->PARAMS = Y;
Y->PARAMS = NIL;
L_058B:;
L_058A:;
return X;
} /* ADDRESSITEMS */
void PASSPARAMETERS(struct STACKFM * V, int *EXTRA, int BASEREG) {
int COMPLETED;
struct STACKFM *PAR;
struct STACKFM *FORMAL;
struct STACKFM *HEAD;
struct STACKFM *L;
struct STACKFM *ITEMS;
struct STACKFM *REST;
struct STACKFM *X;
struct STACKFM *Y;
struct RPFM {
union {
struct {
struct STACKFM *P;
};
};
};
struct RPFM REGINFO[4];
static struct STACKFM SPMARK;
*EXTRA = 0;
HEAD = V->PARAMS;
if (HEAD != NIL) goto L_058E;
return;
L_058E:;
ITEMS = NIL;
L_058F:;
if (HEAD == NIL) goto L_0590;
PAR = HEAD;
HEAD = HEAD->PARAMS;
STACKVAR(PAR->VARNO);
FORMAL = STACK;
STACK = FORMAL->STACK;
if (FORMAL->FLAGS & 4 == 0) goto L_0591;
X = PROCEDUREITEMS(PAR);
goto L_0592;
L_0591:;
if (FORMAL->FLAGS & 64 == 0) goto L_0593;
X = ARRAYNAMEITEMS(PAR);
goto L_0592;
L_0593:;
if (FORMAL->FLAGS & 131072 == 0) goto L_0594;
if (PAR->OPER != 22) goto L_0595;
PAR = TOTEMP(PAR, 256);
goto L_0596;
L_0595:;
if (FORMAL->TYPE != 8) goto L_0597;
if (PAR->TYPE == 8) goto L_0597;
if (!(ICONST(PAR))) goto L_0598;
FIXUNITARYSTRING(PAR);
goto L_0599;
L_0598:;
PAR = TOTEMP(PAR, 2);
L_0599:;
goto L_0596;
L_0597:;
if (PAR->TYPE != 8) goto L_059A;
if (PAR->BIAS != 1) goto L_059A;
FIXUNITARYSTRING(PAR);
goto L_0596;
L_059A:;
if (PAR->TYPE != 13) goto L_059B;
if (PAR->OPER == 0) goto L_059C;
LOADUP(PAR);
goto L_059D;
L_059C:;
if (PAR->MEMBERS == NIL) goto L_059E;
BUILDSET(PAR);
L_059E:;
L_059D:;
L_059B:;
L_0596:;
X = ADDRESSITEMS(PAR, FORMAL);
goto L_0592;
L_0594:;
X = COPY(PAR);
X->PRIM = FORMAL->TYPE;
X->PARAMS = NIL;
L_0592:;
RELEASEANDDROPPAIR(PAR, FORMAL);
Y = X;
L_059F:;
if (Y->PARAMS == NIL) goto L_05A0;
Y = Y->PARAMS;
goto L_059F;
L_05A0:;
Y->PARAMS = ITEMS;
ITEMS = X;
goto L_058F;
L_0590:;
void COMPLETEREGISTERPROCESSING(void) {
int R;
int N;
int MASK;
struct STACKFM *V;
if (COMPLETED == 0) goto L_05A1;
return;
L_05A1:;
COMPLETED = 1;
if (DIAG & 8 == 0) goto L_05A2;
MONITORN(0, _imp_str_literal("+complete"));
L_05A2:;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05A3:
if (R == 4) goto L_05A4;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05A6;
if (V != &SPMARK) goto L_05A7;
L_05A6:;
goto L_05A5;
L_05A7:;
if (V->OPER == 0) goto L_05A8;
LOAD(V, R);
goto L_05A9;
L_05A8:;
SIMPLIFY(V);
L_05A9:;
L_05A5:;
goto L_05A3;
L_05A4:;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05AA:
if (R == 4) goto L_05AB;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05AD;
if (V != &SPMARK) goto L_05AE;
L_05AD:;
goto L_05AC;
L_05AE:;
if (ACTIVITY[R] != 0) goto L_05AF;
if (KTIMES[R] != 0) goto L_05AF;
LOAD(V, R);
L_05AF:;
L_05AC:;
goto L_05AA;
L_05AB:;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05B0:
if (R == 4) goto L_05B1;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05B3;
if (V != &SPMARK) goto L_05B4;
L_05B3:;
goto L_05B2;
L_05B4:;
if (ACTIVITY[R] != 0) goto L_05B5;
LOAD(V, R);
L_05B5:;
L_05B2:;
goto L_05B0;
L_05B1:;
N = 0;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05B6:
if (R == 4) goto L_05B7;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05B9;
if (V != &SPMARK) goto L_05BA;
L_05B9:;
goto L_05B8;
L_05BA:;
LOAD(V, R);
N = N + 1;
L_05B8:;
goto L_05B6;
L_05B7:;
if (ACTIVEREGISTERS == N) goto L_05BB;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05BC:
if (R == 4) goto L_05BD;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05BF;
if (V != &SPMARK) goto L_05C0;
L_05BF:;
HAZARD(R);
L_05C0:;
goto L_05BC;
L_05BD:;
HAZARD(5);
HAZARD(6);
HAZARD(7);
HAZARD(8);
if (ACTIVEREGISTERS == N) goto L_05C1;
HAZARD(9);
HAZARD(12);
HAZARD(15);
if (ACTIVEREGISTERS == N) goto L_05C2;
HAZARD(18);
HAZARD(19);
HAZARD(20);
HAZARD(21);
if (ACTIVEREGISTERS == N) goto L_05C3;
HAZARD(22);
HAZARD(23);
HAZARD(24);
HAZARD(25);
L_05C3:;
L_05C2:;
L_05C1:;
L_05BB:;
MASK = 0;
N = 1;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05C4:
if (R == 4) goto L_05C5;
R += 1;
if (REGINFO[R - 1].P != &SPMARK) goto L_05C7;
*EXTRA = *EXTRA - 4;
MASK = MASK | N;
L_05C7:;
N = N << 1;
goto L_05C4;
L_05C5:;
if (MASK == 0) goto L_05C8;
PLANT4(135266304 | 8388608 | 2097152, 13, MASK);
L_05C8:;
R = 0; /*%for R = 1, 1, 4 %cycle*/
L_05C9:
if (R == 4) goto L_05CA;
R += 1;
V = REGINFO[R - 1].P;
if (V == NIL) goto L_05BE;
if (V != &SPMARK) goto L_05CB;
L_05BE:;
goto L_05C6;
L_05CB:;
RELEASEANDDROP(V);
L_05C6:;
goto L_05C9;
L_05CA:;
if (DIAG & 8 == 0) goto L_05CC;
MONITORN(0, _imp_str_literal("+complete"));
L_05CC:;
} /* COMPLETEREGISTERPROCESSING */
void PUSH(struct STACKFM * V, int TYPE) {
struct STACKFM SPV;
SPV = 0;
SPV.TYPE = TYPE;
SPV.FORM = 3;
SPV.BASE = 13;
if (TYPE != 1) goto L_05CD;
LOAD(&V, 17);
PLANT2(67108864, V, &SPV);
goto L_05CE;
L_05CD:;
if (TYPE != 7) goto L_05CF;
LOAD(&V, 26);
PLANT6(201359616, V, &SPV);
*EXTRA = *EXTRA + 4;
goto L_05CE;
L_05CF:;
if (TYPE != 6) goto L_05D0;
LOAD(&V, 26);
PLANT6(201326848, V, &SPV);
goto L_05CE;
L_05D0:;
FAIL(_imp_str_literal("Bad push type"));
L_05CE:;
*EXTRA = *EXTRA + 4;
RELEASEANDDROP(&V);
} /* PUSH */
void PROCESS(struct STACKFM * V, int RN) {
struct STACKFM *NEXT;
if (&V != NIL) goto L_05D1;
return;
L_05D1:;
NEXT = &V;
if (RN <= 4) goto L_05D2;
PROCESS(NEXT, 5);
PUSH(&V, V);
goto L_05D3;
L_05D2:;
if (V != 1) goto L_05D4;
REGINFO[RN - 1].P = &V;
PROCESS(NEXT, RN + 1);
goto L_05D3;
L_05D4:;
if (V != 6) goto L_05D5;
SIMPLIFY(&V);
if (V == 6) goto L_05D6;
if (V == 7) goto L_05D6;
LOAD(&V, 26);
L_05D6:;
if (V != 1) goto L_05D7;
V = 1;
REGINFO[RN - 1].P = &V;
PROCESS(NEXT, RN + 1);
goto L_05D8;
L_05D7:;
PROCESS(NEXT, RN + 1);
PUSH(&V, 6);
REGINFO[RN - 1].P = &SPMARK;
L_05D8:;
goto L_05D3;
L_05D5:;
if (V != 7) goto L_05D9;
SIMPLIFY(&V);
if (V == 7) goto L_05DA;
LOAD(&V, 26);
L_05DA:;
if (V != 1) goto L_05DB;
if (RN != 4) goto L_05DC;
PROCESS(NEXT, RN + 2);
PUSH(&V, 7);
REGINFO[RN - 1].P = &SPMARK;
goto L_05DD;
L_05DC:;
V = 1;
X = COPY(&V);
ADVANCE(X, 1, 4);
REGINFO[RN + 0 - 1].P = &V;
REGINFO[RN + 1 - 1].P = X;
PROCESS(NEXT, RN + 2);
L_05DD:;
goto L_05DE;
L_05DB:;
PROCESS(NEXT, RN + 2);
PUSH(&V, 7);
if (RN != 4) goto L_05DF;
REGINFO[RN + 0 - 1].P = &SPMARK;
goto L_05E0;
L_05DF:;
REGINFO[RN + 0 - 1].P = &SPMARK;
REGINFO[RN + 1 - 1].P = &SPMARK;
L_05E0:;
L_05DE:;
goto L_05D3;
L_05D9:;
FAIL(_imp_str_literal("Bad process type"));
L_05D3:;
} /* PROCESS */
REGINFO[0].P = NIL;
REGINFO[1].P = NIL;
REGINFO[2].P = NIL;
REGINFO[3].P = NIL;
COMPLETED = 0;
PROCESS(ITEMS, *BASEREG);
COMPLETEREGISTERPROCESSING();
} /* PASSPARAMETERS */
void ARRAYINDEX(void) {
struct STACKFM *X;
struct STACKFM *END;
X = STACK;
STACK = STACK->STACK;
END = STACK;
L_05E1:;
if (END->PARAMS == NIL) goto L_05E2;
END = END->PARAMS;
goto L_05E1;
L_05E2:;
END->PARAMS = X;
X->PARAMS = NIL;
STACK->OPER = STACK->OPER + 1;
} /* ARRAYINDEX */
void ARRAYACCESS(void) {
int N;
int LIM;
int FLAG;
int TYPE;
int FORMAT;
int XSIZE;
int SCALENEEDED;
SCALENEEDED = 0;
int MULOP;
struct STACKFM *X;
struct STACKFM *ALL;
struct STACKFM *NEXT;
struct STACKFM *MULT;
struct STACKFM *SCALE;
void SETUPMULT(void) {
MULT = COPY(X->STACK);
ADVANCE(MULT, 1, 4);
LOADUP(MULT);
MULT->DISP = 20;
MULT->FORM = 1;
} /* SETUPMULT */
SCALE = NIL;
X = STACK;
FLAG = X->STACK->FLAGS;
MULOP = 6;
if (FLAG & 8 != 0) goto L_05E3;
if (X->STACK->TYPE != 8) goto L_05E4;
if (X->STACK->FORMAT == 1) goto L_05E5;
L_05E4:;
if (X->STACK->TYPE != 9) goto L_05E6;
if (X->STACK->FORMAT != 0) goto L_05E6;
L_05E5:;
SCALENEEDED = 1;
L_05E6:;
L_05E3:;
LIM = 1;
if (X->STACK->OPER == 0) goto L_05E7;
ARRAYINDEX();
NEXT = STACK->PARAMS;
ALL = LITERAL(0);
LIM = STACK->OPER;
STACK->OPER = 0;
if (FLAG & 64 == 0) goto L_05E8;
SETUPMULT();
L_05E8:;
N = 0; /*%for N = 1, 1, LIM %cycle*/
L_05E9:
if (N == LIM) goto L_05EA;
N += 1;
X = NEXT;
NEXT = X->PARAMS;
X->PARAMS = NIL;
if (N == 1) goto L_05EC;
if (FLAG & 64 == 0) goto L_05ED;
OPERATE(MULOP, ALL, COPY(MULT));
MULT->DISP = MULT->DISP + 12;
goto L_05EE;
L_05ED:;
OPERATE(MULOP, ALL, LITERAL(STACK->ADATA->FORMSTACK->ADATA->FORM.FLAGS));
L_05EE:;
L_05EC:;
OPERATE(4, ALL, X);
goto L_05E9;
L_05EA:;
if (NEXT == NIL) goto L_05EF;
FAIL(_imp_str_literal("Corrupt array index"));
L_05EF:;
X = ALL;
if (FLAG & 2 != 0) goto L_05F0;
if (SCALENEEDED == 0) goto L_05F1;
SCALE = MULT;
goto L_05F2;
L_05F1:;
RELEASEANDDROP(MULT);
L_05F2:;
L_05F0:;
goto L_05F3;
L_05E7:;
if (SCALENEEDED == 0) goto L_05F4;
SETUPMULT();
SCALE = MULT;
L_05F4:;
STACK = X->STACK;
L_05F3:;
TYPE = STACK->TYPE;
STACK->TYPE = 1;
FORMAT = STACK->FORMAT;
if (FLAG & 64 == 0) goto L_05F5;
VMAP(STACK, 1);
L_05F5:;
if (FLAG & 8 == 0) goto L_05F6;
XSIZE = 4;
if (TYPE != 8) goto L_05F7;
if (FORMAT != 1) goto L_05F7;
XSIZE = 2 * 4;
L_05F7:;
goto L_05F8;
L_05F6:;
if (SCALE == NIL) goto L_05F9;
OPERATE(MULOP, X, SCALE);
XSIZE = 1;
goto L_05F8;
L_05F9:;
XSIZE = ITEMSIZE(FORMAT);
L_05F8:;
STACK->FLAGS = STACK->FLAGS | FLAG;
APPLYINDEX(STACK, X, XSIZE);
if (FLAG & 8 == 0) goto L_05FA;
VMAP(STACK, TYPE);
goto L_05FB;
L_05FA:;
STACK->TYPE = TYPE;
L_05FB:;
STACK->FORMAT = FORMAT;
STACK->FLAGS = STACK->FLAGS & ~(32 | 2 | 64);
if (DIAG & 8 == 0) goto L_05FC;
MONITOR(STACK, _imp_str_literal("Array"));
L_05FC:;
} /* ARRAYACCESS */
void UPDATELINE(int THISLINE) {
if (STACK == NIL) goto L_05FD;
FAIL(_imp_str_literal("Stack"));
L_05FD:;
if (ACTIVEREGISTERS == 0) goto L_05FE;
FAIL(_imp_str_literal("Registers"));
L_05FE:;
if (USING == NIL) goto L_05FF;
FAIL(_imp_str_literal("Descriptors"));
L_05FF:;
if (REGV[17].BASE != 17) goto L_0600;
if (REGV[26].BASE == 26) goto L_0601;
L_0600:;
FAIL(_imp_str_literal("Corrupt"));
L_0601:;
if (THISLINE == CURRENTLINE) goto L_0602;
CURRENTLINE = THISLINE;
if (COMPILINGPRIM != 0) goto L_0603;
DIR2(3, CURRENTLINE);
L_0603:;
L_0602:;
if (DIAG & 64 == 0) goto L_0604;
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(_imp_str_literal("Line:"));
_imp_WRITE(THISLINE, 1);
_imp_NEWLINE();
_imp_SELECTOUTPUT(2);
L_0604:;
if (DIAG & 128 == 0) goto L_0605;
DISPLAYKNOWLEDGE();
L_0605:;
WORKVALIDITY = WORKVALIDITY + 1;
VALUE = DEFAULTVALUE;
} /* UPDATELINE */
void TERMINATEBLOCK(void) {
int J;
int N;
int M;
struct VARFM *V;
if (AMODE >= 0) goto L_0606;
if (AMODE == -16) goto L_0606;
FALIGN = ALTALIGN;
N = 0;
if (FALIGN != (~0)) goto L_0607;
N = FRAMEEXTRA;
goto L_0608;
L_0607:;
if (FALIGN != (~1)) goto L_0609;
N = FRAMEEXTRA & 2;
L_0609:;
L_0608:;
M = N;
if (N == 0) goto L_060A;
J = PARMS - 1; /*%for J = PARMS, 1, FIRSTALT %cycle*/
L_060B:
if (J == FIRSTALT) goto L_060C;
J += 1;
V = VAR(J);
V->DISP = V->DISP - N;
goto L_060B;
L_060C:;
MAXFRAME = MAXFRAME - N;
FRAME = FRAME - N;
L_060A:;
if (MAXFRAME <= FRAME) goto L_060E;
FRAME = MAXFRAME;
L_060E:;
if (AMODE != -2) goto L_060F;
OLDFRAME = FRAME;
goto L_0610;
L_060F:;
AVAR = (~FALIGN);
FRAME = FRAME + (~FALIGN) & FALIGN;
AVAR = FRAME;
DIR1(6);
L_0610:;
L_0606:;
FRAME = OLDFRAME;
} /* TERMINATEBLOCK */
void COPYOLDDISPLAY(void) {
int T;
int J;
void COPY(int FLAG, int TO) {
struct STACKFM *F;
struct STACKFM *T;
F = LITERAL(0);
if (FLAG >= 0) goto L_0611;
F->BASE = *LOCAL;
goto L_0612;
L_0611:;
F->BASE = 9;
F->FORM = 2;
CLAIM(F->BASE);
LOADUP(F);
L_0612:;
T = LOCALINTEGER(TO);
PLANT2(67108864, F->BASE, T);
RELEASEANDDROPPAIR(F, T);
} /* COPY */
T = LOCALDISPLAY;
J = DANGERLEVEL - 1; /*%for J = DANGERLEVEL, 1, *LOCAL - 1 %cycle*/
L_0613:
if (J == *LOCAL - 1) goto L_0614;
J += 1;
COPY(0, T);
T = T + 4;
goto L_0613;
L_0614:;
COPY(-1, T);
} /* COPYOLDDISPLAY */
int FINISHPARAMS(void) {
int J;
int MOD;
MOD = 0;
int TYPE;
int A;
int N;
struct VARFM *AP;
struct VARFM *FP;
struct VARFM *V;
struct STACKFM *S;
PARAMETERREGS = 0;
*PARAMETERLIST = 0;
if (AMODE >= 0) goto L_0616;
FLUSHDIAGS();
return 1 /*TRUE*/;
L_0616:;
PARAMETERFRAME = FRAME;
if (*AVAR->P & 524288 == 0) goto L_0617;
if (*AVAR->P & 8 != 0) goto L_0617;
if (AVAR == 8) goto L_0615;
if (AVAR != 9) goto L_0617;
L_0615:;
PARAMETERFRAME = PARAMETERFRAME + 4;
STRINGRESULT = 4;
MOD = MOD + 4;
L_0617:;
if (AMODE != 0) goto L_0618;
N = 1;
A = 4;
L_0619:;
if (A >= PARAMETERFRAME) goto L_061A;
S = LOCALINTEGER(A);
REMEMBER(N, S);
DROP(S);
PARAMETERREGS = PARAMETERREGS + 1;
A = A + 4;
if (N != 4) goto L_061B;
goto L_061A;
L_061B:;
N = N + 1;
goto L_0619;
L_061A:;
L_0618:;
FRAME = -20;
if (VARBASE == *VARS) goto L_061C;
AVAR = PARMS;
AVAR = PARAMETERFRAME;
J = VARBASE + 1 - 1; /*%for J = VARBASE + 1, 1, *VARS %cycle*/
L_061D:
if (J == *VARS) goto L_061E;
J += 1;
AP = VAR(J);
PARMS = PARMS - 1;
FP = VAR(PARMS);
AP->BASE = *LOCAL;
*FP = *AP;
FP->BASE = 13;
FP->FORM = 3;
FP->DISP = 0;
AP->DISP = AP->DISP + MOD;
FP->FLAGS = FP->FLAGS | 128;
if (AP->FORM == 1) goto L_061F;
FP->FLAGS = FP->FLAGS | 131072;
L_061F:;
if (FP->TYPE == 4) goto L_060D;
if (FP->TYPE != 2) goto L_0620;
L_060D:;
FP->TYPE = 1;
L_0620:;
if (AP->FLAGS & 131072 == 0) goto L_0621;
if (AMODE != 0) goto L_0621;
if (AP->FORM == 4) goto L_0621;
AP->FLAGS = AP->FLAGS - 131072;
V = VAR(2000);
*V = *AP;
FRAME = FRAME - ITEMSIZE(AP->FORMAT);
V->BASE = *LOCAL;
V->DISP = FRAME;
STACKVAR(2000);
STACKVAR(J);
TYPE = STACK->TYPE;
STACK->TYPE = 1;
VMAP(STACK, TYPE);
ASSIGN(0);
*AP = *V;
L_0621:;
if (AP->FLAGS & 4 != 0) goto L_0622;
AP->FLAGS = AP->FLAGS | 128;
L_0622:;
goto L_061D;
L_061E:;
FLUSHDIAGS();
L_061C:;
if (AMODE == 0) goto L_0623;
return 1 /*TRUE*/;
L_0623:;
if (DANGERMARKER == 0) goto L_0624;
if (DANGERLEVEL != 32767) goto L_0625;
DANGERLEVEL = *LOCAL;
L_0625:;
L_0624:;
if (DANGERLEVEL == 32767) goto L_0626;
FRAME = (FRAME & (~3)) - 4 * (*LOCAL - DANGERLEVEL + 1);
LOCALDISPLAY = FRAME;
ATTRIBUTES = ATTRIBUTES | 128 | 256;
L_0626:;
if (LOCALDISPLAY == 0) goto L_0627;
COPYOLDDISPLAY();
L_0627:;
return 0 /*FALSE*/;
} /* FINISHPARAMS */
int TAG(void) {
int N;
_imp_READSYMBOL(&N);
N = (PENDING << 8) + N;
_imp_READSYMBOL(&PENDING);
return N;
} /* TAG */
void GETSTRING(_imp_string * TEXT) {
int J;
int SYM;
int LIMIT;
LIMIT = _imp_SIZEOF(&TEXT) - 1;
TEXT = _imp_str_literal("");
J = PENDING + 1; /*%for J = PENDING, -1, 1 %cycle*/
L_0628:
if (J == 1) goto L_0629;
J -= 1;
_imp_READSYMBOL(&SYM);
if (*_imp_LENGTH(&TEXT) >= LIMIT) goto L_062B;
TEXT = _imp_join((_imp_string)(TEXT), (_imp_string)(_imp_TOSTRING(SYM)));
L_062B:;
goto L_0628;
L_0629:;
_imp_READSYMBOL(&PENDING);
} /* GETSTRING */
int ONIEEE(void) {
int MONE;
MONE = -1;
double M;
M = MONE;
unsigned char B;
B = *_imp_BYTEINTEGER(_imp_ADDR(&M));
if (B == 0) goto L_062A;
if (B != 191) goto L_062C;
L_062A:;
return 1 /*TRUE*/;
L_062C:;
return 0 /*FALSE*/;
} /* ONIEEE */
void CONVERTFORMAT(struct STACKFM * V, int TYPE) {
float SINGLE;
int A;
A = V;
int B;
B = V;
int FH;
int FL;
int S;
int X;
if (A != 0) goto L_062D;
if (0 == B) goto L_062E;
L_062D:;
if (ONIEEE()) goto L_062E;
FH = (A & 127) << 16 | (unsigned int)A >> 16;
FL = (B & 65535) << 16 | (unsigned int)B >> 16;
X = (unsigned int)A >> 7;
X = (X & 255) - 128;
S = (unsigned int)A >> 15 & 1;
if (TYPE != 7) goto L_062F;
X = X + 1023 - 1 & 2047;
B = (FH & 7) << 29 | (unsigned int)FL >> 3;
A = (S << 31) + (X << 20) + ((unsigned int)FH >> 3 & 1048575);
goto L_0630;
L_062F:;
X = X + 127 - 1 & 255;
A = (S << 31) + (X << 23) + FH;
B = 0;
L_0630:;
goto L_0631;
L_062E:;
if (TYPE != 6) goto L_0632;
SINGLE = V;
A = *_imp_INTEGER(_imp_ADDR(&SINGLE));
B = 0;
L_0632:;
L_0631:;
V = A;
V = B;
} /* CONVERTFORMAT */
void TOSHORTREAL(struct STACKFM * V) {
int X;
int Y;
int EXP;
int S;
if (V != 0) goto L_0633;
if (0 != V) goto L_0633;
return;
L_0633:;
if (!(ONIEEE())) goto L_0634;
*_imp_REAL(_imp_ADDR(&V)) = V;
goto L_0635;
L_0634:;
X = V;
S = X;
Y = V;
EXP = ((unsigned int)X >> 20 & 2047) - 1023 + 1;
EXP = EXP + 127 - 1;
X = (X & 1048575) << 3;
X = X | (unsigned int)Y >> 32 - 3;
if (Y & 268435456 == 0) goto L_0636;
X = X + 1;
L_0636:;
if (X & 8388608 == 0) goto L_0637;
X = (unsigned int)X >> 1;
EXP = EXP + 1;
L_0637:;
X = X | (EXP & 255) << 23;
if (S >= 0) goto L_0638;
X = X | -2147483648;
L_0638:;
V = X;
V = 0;
L_0635:;
} /* TOSHORTREAL */
double REALCONSTANT(void) {
extern double TEXTTOFLOATING(_imp_string255 S, int EXP) __asm__("3L___text_to_float");
int EXP;
int J;
double VALUE;
_imp_string255 S;
if (!_imp_on_event(1, 4)) goto L_0639;
if (_imp_EVENT().EVENT != 1) goto L_063A;
FAIL(_imp_str_literal("overflow while processing real constant"));
L_063A:;
if (_imp_EVENT().EVENT != 4) goto L_063B;
FAIL(_imp_str_literal("error in real constant"));
L_063B:;
FAIL(_imp_str_literal("Bad signal"));
L_0639:;
S = _imp_str_literal("");
EXP = 0;
J = 0; /*%for J = 1, 1, TAG() %cycle*/
L_063C:
if (J == TAG()) goto L_063D;
J += 1;
if (PENDING != 64) goto L_063F;
_imp_READSYMBOL(&PENDING);
EXP = TAG();
if (EXP & -32768 == 0) goto L_0640;
EXP = EXP | -32768;
L_0640:;
goto L_063D;
L_063F:;
S = _imp_join((_imp_string)(S), (_imp_string)(_imp_TOSTRING(PENDING)));
_imp_READSYMBOL(&PENDING);
goto L_063C;
L_063D:;
VALUE = TEXTTOFLOATING(S, EXP);
if (PENDING != 85) goto L_0641;
VALUE = -VALUE;
_imp_READSYMBOL(&PENDING);
L_0641:;
return VALUE;
} /* REALCONSTANT */
int FOURBYTES(void) {
int A;
int B;
int C;
int D;
A = PENDING;
_imp_READSYMBOL(&B);
_imp_READSYMBOL(&C);
_imp_READSYMBOL(&D);
_imp_READSYMBOL(&PENDING);
return (((A << 8) + B << 8) + C << 8) + D;
} /* FOURBYTES */
void INPUTINTEGERVALUE(int BYTE) {
CONSTANTTYPE = 1;
if (BYTE != 0) goto L_0642;
VALUE.INTEGER = FOURBYTES();
goto L_0643;
L_0642:;
VALUE.INTEGER = PENDING;
_imp_READSYMBOL(&PENDING);
L_0643:;
if (PENDING != 85) goto L_0644;
VALUE.INTEGER = -VALUE.INTEGER;
_imp_READSYMBOL(&PENDING);
goto L_0645;
L_0644:;
if (PENDING != 92) goto L_0646;
VALUE.INTEGER = (~VALUE.INTEGER);
_imp_READSYMBOL(&PENDING);
L_0646:;
L_0645:;
if (PENDING == 65) goto L_0647;
STACKINTEGER(VALUE.INTEGER);
L_0647:;
} /* INPUTINTEGERVALUE */
void INPUTREALVALUE(void) {
CONSTANTTYPE = 6;
VALUE.REAL = REALCONSTANT();
if (PENDING == 65) goto L_0648;
if (PENDING == 36) goto L_0648;
STACKINTEGER(0);
if (VALUE.REAL != 0) goto L_05EB;
if (PENDING == 83) goto L_0649;
if (PENDING == 63) goto L_0649;
L_05EB:;
STACK->TYPE = 7;
STACK->RVAL = VALUE.REAL;
CONVERTFORMAT(STACK, 7);
L_0649:;
L_0648:;
} /* INPUTREALVALUE */
void INPUTSTRINGVALUE(void) {
struct STACKFM *W;
CONSTANTTYPE = 8;
GETSTRING(&VALUE.STRING);
if (PENDING == 36) goto L_063E;
if (PENDING != 65) goto L_064A;
L_063E:;
return;
L_064A:;
if (*_imp_LENGTH(&VALUE.STRING) != 1) goto L_064B;
STACKINTEGER(*_imp_CHARNO(&VALUE.STRING, 1));
STACK->BIAS = -1;
goto L_064C;
L_064B:;
W = CONSTSTRING();
W->STACK = STACK;
STACK = W;
L_064C:;
} /* INPUTSTRINGVALUE */
int INREG(struct STACKFM * V) {
if (V == NIL) goto L_064D;
if (V->FORM != 0) goto L_064D;
if (V->DISP != 0) goto L_064D;
if (V->BASE == 0) goto L_064D;
if (V->AREA != 0) goto L_064D;
if (V->OPER != 0) goto L_064D;
if (V->INDEX != NIL) goto L_064D;
if (V->RECORD == NIL) goto L_064E;
L_064D:;
return 0 /*FALSE*/;
L_064E:;
return 1 /*TRUE*/;
} /* INREG */
int FLOATING(struct STACKFM * V) {
if (6 > V->TYPE) goto L_064F;
if (V->TYPE <= 7) goto L_0650;
L_064F:;
if (V->OPER < 23) goto L_0651;
L_0650:;
return 1 /*TRUE*/;
L_0651:;
return 0 /*FALSE*/;
} /* FLOATING */
int SAME(struct STACKFM * A, struct STACKFM * B) {
if (A != &B) goto L_0652;
return 1 /*TRUE*/;
L_0652:;
if (A == NIL) goto L_0653;
if (&B != NIL) goto L_0654;
L_0653:;
return 0 /*FALSE*/;
L_0654:;
if (A->DISP != B) goto L_0655;
if (A->BASE != B) goto L_0655;
if (A->TYPE != B) goto L_0655;
if (A->FORM != B) goto L_0655;
if (A->EXTRA != B) goto L_0655;
if (A->AREA == B) goto L_0656;
L_0655:;
return 0 /*FALSE*/;
L_0656:;
if (A->INDEX == NIL) goto L_0657;
if (&B == NIL) goto L_0658;
if (A->XSIZE != B) goto L_0658;
if (!(SAME(A->INDEX, &B))) goto L_0658;
if (A->INDEX->OPER != B) goto L_0658;
if (SAME(A->INDEX->LINK, &B)) goto L_0659;
L_0658:;
return 0 /*FALSE*/;
L_0659:;
goto L_065A;
L_0657:;
if (&B == NIL) goto L_065B;
return 0 /*FALSE*/;
L_065B:;
L_065A:;
if (A->RECORD == NIL) goto L_065C;
if (&B == NIL) goto L_065D;
if (!(SAME(A->RECORD, &B))) goto L_065D;
if (A->RECORD->OPER != B) goto L_065D;
if (SAME(A->RECORD->LINK, &B)) goto L_065E;
L_065D:;
return 0 /*FALSE*/;
L_065E:;
goto L_065F;
L_065C:;
if (&B == NIL) goto L_0660;
return 0 /*FALSE*/;
L_0660:;
L_065F:;
return 1 /*TRUE*/;
} /* SAME */
int CONST(struct STACKFM * V) {
if (V->FORM != 0) goto L_0661;
if (V->BASE != 0) goto L_0661;
if (V->OPER != 0) goto L_0661;
if (V->INDEX != NIL) goto L_0661;
if (V->RECORD != NIL) goto L_0661;
if (V->AREA == 0) goto L_0662;
L_0661:;
return 0 /*FALSE*/;
L_0662:;
return 1 /*TRUE*/;
} /* CONST */
int ICONST(struct STACKFM * V) {
if (V == NIL) goto L_0663;
if (V->FORM != 0) goto L_0663;
if (V->BASE != 0) goto L_0663;
if (V->OPER != 0) goto L_0663;
if (V->INDEX != NIL) goto L_0663;
if (V->RECORD != NIL) goto L_0663;
if (V->TYPE > 5) goto L_0663;
if (V->AREA == 0) goto L_0664;
L_0663:;
return 0 /*FALSE*/;
L_0664:;
return 1 /*TRUE*/;
} /* ICONST */
int ICONSTITEM(struct STACKFM * V) {
if (V == NIL) goto L_0665;
if (V->FORM != 0) goto L_0665;
if (V->BASE != 0) goto L_0665;
if (V->INDEX != NIL) goto L_0665;
if (V->RECORD != NIL) goto L_0665;
if (V->TYPE > 5) goto L_0665;
if (V->AREA == 0) goto L_0666;
L_0665:;
return 0 /*FALSE*/;
L_0666:;
return 1 /*TRUE*/;
} /* ICONSTITEM */
int POWER(int N) {
int P;
int MASK;
if (*N <= (unsigned int)~((unsigned int)-1 >> 1) >> 1) goto L_0667;
return -1;
L_0667:;
MASK = 1;
P = 0;
L_0668:;
if (MASK != *N) goto L_0669;
return P;
L_0669:;
if (MASK <= *N) goto L_066A;
return -1;
L_066A:;
MASK = MASK << 1;
P = P + 1;
goto L_0668;
} /* POWER */
int ITEMSIZE(int F) {
if (*F < 0) goto L_066B;
return *F;
L_066B:;
return VAR(-*F)->FORMAT;
} /* ITEMSIZE */
struct STACKFM *CLAIMWORKAREA(int BYTES, int TYPE) {
struct STACKFM *T;
struct WORKFM *W;
struct WORKFM *BEST;
BEST = NIL;
int P;
if (*BYTES > 0) goto L_066C;
FAIL(_imp_str_literal("claim work area/1"));
L_066C:;
P = WORKBASE;
L_066D:;
if (P != LASTWORK) goto L_066E;
if (BEST != NIL) goto L_066F;
LASTWORK = LASTWORK + 1;
BEST = WORKAREA(LASTWORK);
FRAME = FRAME - *BYTES & (~3);
BEST->SIZE = *BYTES;
BEST->DISPLACEMENT = FRAME;
L_066F:;
W = BEST;
goto L_0670;
L_066E:;
P = P + 1;
W = WORKAREA(P);
if (DIAG & 2 == 0) goto L_0671;
MONITORN(P, _imp_str_literal("try work"));
L_0671:;
if (W->VALIDITY >= WORKVALIDITY) goto L_0672;
if (W->SIZE < *BYTES) goto L_0672;
if (W->SIZE != *BYTES) goto L_0673;
goto L_0670;
L_0673:;
if (BEST == NIL) goto L_0674;
if (BEST->SIZE <= W->SIZE) goto L_0675;
L_0674:;
BEST = W;
L_0675:;
L_0672:;
goto L_066D;
L_0670:;
W->VALIDITY = WORKVALIDITY;
if (DIAG & 2 == 0) goto L_0676;
MONITORN(W->DISPLACEMENT, _imp_str_literal("temporary"));
L_0676:;
T = LITERAL(W->DISPLACEMENT);
T->BASE = *LOCAL;
T->TYPE = TYPE;
T->FORM = 1;
T->FORMAT = *BYTES;
return T;
} /* CLAIMWORKAREA */
void CONSTANTBOUNDS(void) {
VUB = POPPEDVALUE();
VLB = POPPEDVALUE();
} /* CONSTANTBOUNDS */
void SETCD(int VALUE, int *CD) {
if (*VALUE & 49152 != 2 << 14) goto L_0677;
*CD = *VALUE & 16383;
L_0677:;
} /* SETCD */
int ALTERNATEFORMAT(int CODE) {
int ATTR;
ATTR = 0;
struct VARFM DUMMY;
if (*CODE != 65) goto L_0678;
ASSEMBLE(&DUMMY, -2, *VARS, *LOCAL, -1, &ATTR);
ALTALIGN = ALTALIGN & FALIGN;
goto L_0679;
L_0678:;
if (*CODE != 67) goto L_067A;
if (FRAME <= MAXFRAME) goto L_067B;
MAXFRAME = FRAME;
L_067B:;
FRAME = FRAMEBASE;
goto L_0679;
L_067A:;
if (*CODE != 66) goto L_067C;
if (MAXFRAME <= FRAME) goto L_067D;
FRAME = MAXFRAME;
L_067D:;
FALIGN = ALTALIGN;
return 1 /*TRUE*/;
L_067C:;
FAIL(_imp_join((_imp_string)(_imp_str_literal("Format ")), (_imp_string)(_imp_ITOS(*CODE, 0))));
L_0679:;
return 0 /*FALSE*/;
} /* ALTERNATEFORMAT */
void COMPILEBEGIN(void) {
int MAINEP;
MAINEP = 0;
struct VARFM B;
B = 0;
B.TYPE = 10;
B.DISP = NEWLABEL();
B.BASE = 0;
if (*LOCAL == 128) goto L_067E;
STACKINTEGER(B.DISP);
if (*LOCAL < DANGERLEVEL) goto L_067F;
STACK->FLAGS = STACK->FLAGS | 65536;
L_067F:;
CALL(0);
OSTATE = 0;
goto L_0680;
L_067E:;
OSTATE = 3;
EXTERNALID = _imp_str_literal("3L___main_program");
ENTRYPOINT = EXTERNALNO + 1;
MAINEP = 1;
L_0680:;
INTERNALID = _imp_str_literal("block");
if (_imp_strcmp(ALIAS, _imp_str_literal("")) == 0) goto L_0681;
INTERNALID = ALIAS;
ALIAS = _imp_str_literal("");
L_0681:;
ASSEMBLE(&B, 0, *VARS, *LOCAL + 1, 0, &ATTRIBUTES);
} /* COMPILEBEGIN */
void CLEARVARS(int LIMIT) {
if (LIMIT < PARMS) goto L_0682;
FAIL(_imp_str_literal("Too many objects"));
L_0682:;
L_0683:;
if (*VARS >= LIMIT) goto L_0684;
*VARS = *VARS + 1;
*VAR(*VARS) = 0;
goto L_0683;
L_0684:;
} /* CLEARVARS */
void DIRSTRING(int OP, _imp_string *S) {
int L;
L = *_imp_LENGTH(&S);
int J;
if (OP < 0) goto L_0685;
DIR1(OP);
L_0685:;
DIR1(L);
J = 0; /*%for J = 1, 1, L %cycle*/
L_0686:
if (J == L) goto L_0687;
J += 1;
DIR1(*_imp_CHARNO(&S, J));
goto L_0686;
L_0687:;
} /* DIRSTRING */
void DUMPEXTERNAL(int CODE, struct VARFM *V) {
EXTERNALNO = EXTERNALNO + 1;
if (CODE & 1 != 0) goto L_0689;
if (V.FORM != 4) goto L_068A;
V.AREA = 23;
V.DISP = EXTERNALNO;
goto L_068B;
L_068A:;
V.AREA = -EXTERNALNO;
V.DISP = 0;
L_068B:;
L_0689:;
if (CODE & 2 == 0) goto L_068C;
if (V.FLAGS & 256 == 0) goto L_068C;
CODE = CODE | 4;
L_068C:;
DIRSTRING(21, &EXTERNALID);
DIR2(CODE, V.DISP);
} /* DUMPEXTERNAL */
void PLANTDIAG(struct DIAGFM * D) {
int DISP;
int TYPE;
int IND;
int BASE;
int BTYPE;
int PTYPE;
struct AFM *DV;
if (D.PRIM & 64 == 0) goto L_068D;
if (D.FORM & 65535 != 0) goto L_068D;
return;
L_068D:;
DISP = D.BASE.DISP;
if (D.RVAR == 0) goto L_068E;
DISP = D.RVAR;
L_068E:;
TYPE = (unsigned int)D.PRIM >> 2 & 15;
if (INTERFACE->OPTIONS & 4 == 0) goto L_068F;
if (TYPE == 14) goto L_068F;
DIRSTRING(2, &D.DISP);
DUMPENCODED(D.PRIM);
DUMPENCODED(D.TYPE);
DUMPENCODED(D.BASE.DISP);
if (D.PRIM & 64 == 0) goto L_0690;
DUMPENCODED(D.FORM & 65535);
L_0690:;
L_068F:;
if (DEBUG == 0) goto L_0691;
BASE = D.PRIM & 3;
IND = (unsigned int)D.PRIM >> 7;
BTYPE = D.TYPE & 15;
PTYPE = (unsigned int)D.TYPE >> 4 & 15;
if (TYPE != 14) goto L_0692;
DIRSTRING(33, &D.DISP);
DV = D.BASE.ADATA;
DUMPENCODED(DV->BOUNDDV->BOUND.DIMENSION);
DUMPENCODED(DV->BOUNDDV->BOUND.TOTALSIZE);
DUMPENCODED(DV->TOTALSIZE);
DUMPENCODED(BTYPE);
DUMPENCODED(D.FORM & 65535);
goto L_0693;
L_0692:;
if (BASE == 1) goto L_0694;
if (BASE == 2) goto L_0694;
return;
L_0694:;
DIRSTRING(34, &D.DISP);
DUMPENCODED(TYPE);
DUMPENCODED(IND);
DUMPENCODED(BASE);
DUMPENCODED(BTYPE);
DUMPENCODED(PTYPE);
DUMPENCODED(D.BASE.DISP);
DUMPENCODED(D.FORM & 65535);
DUMPENCODED(ITEMSIZE(D.BASE.FORMAT));
L_0693:;
L_0691:;
} /* PLANTDIAG */
void DUMPDIAG(int BASE, struct QFM *Q) {
struct DIAGFM D;
struct DIAGFM *ND;
if (COMPILINGPRIM == 0) goto L_0695;
return;
L_0695:;
D.LINK = DIAGLIST;
D.ID = INTERNALID;
D.XTYPE = 0;
D.EXT = 0;
if (BASE != 17) goto L_0696;
if (*PARAMETERLIST != 0) goto L_0697;
return;
L_0697:;
BASE = 0;
D.XTYPE = (unsigned int)Q >> 2 & 15;
Q = 14 << 2;
goto L_0698;
L_0696:;
if (BASE != *LOCAL) goto L_0699;
BASE = 1;
goto L_0698;
L_0699:;
if (BASE != 10) goto L_069A;
BASE = 2;
goto L_0698;
L_069A:;
if (BASE >= 0) goto L_069B;
D.EXT = -BASE;
BASE = 3;
goto L_0698;
L_069B:;
BASE = 0;
L_0698:;
if (&Q != NIL) goto L_069C;
D.X = 0;
D.FORMAT = 0;
goto L_069D;
L_069C:;
D.FORMAT = Q;
if (&Q == NIL) goto L_069E;
D.XTYPE = (unsigned int)Q >> 2 | ((unsigned int)Q >> 2 & 15) << 4;
Q = Q | 15 << 2 | Q & 64;
D.FORMAT = Q;
L_069E:;
D.X = Q << 7 | Q | BASE;
L_069D:;
D.VAR = DEFV;
if (D.FORMAT != 0) goto L_069F;
if (D.X & 64 == 0) goto L_069F;
return;
L_069F:;
if (*PARAMETERLIST != 0) goto L_06A0;
PLANTDIAG(&D);
goto L_06A1;
L_06A0:;
ND = _imp_NEW(DIAGFMTYPE);
U_100D:;
*ND = D;
DIAGLIST = ND;
L_06A1:;
} /* DUMPDIAG */
void FLUSHDIAGS(void) {
void FLUSH(struct DIAGFM * D) {
if (&D != NIL) goto L_06A2;
return;
L_06A2:;
FLUSH(&D);
PLANTDIAG(&D);
_imp_DISPOSE(&D);
} /* FLUSH */
FLUSH(DIAGLIST);
DIAGLIST = NIL;
} /* FLUSHDIAGS */
void DEFINEVAR(void) {
int DECL;
int TF;
int NEWV;
int AREA;
int EXTERNALMODE;
int *AT;
int SPEC;
int OFLAGS;
int N;
int TYPE;
int FORM;
int FORMAT;
struct VARFM *FV;
struct QFM Q;
struct QFM PQ;
struct STACKFM *VV;
const unsigned char FORMMAP[16] = {0, 1, 15, [3 ... 6] = 0, [7 ... 10] = 4, 1, 1, 1, 1, 0};
void ENCODETYPE(int TYPE, int FORMAT, struct QFM *Q) {
static const void *T[14] = {&&case_T_M3, &&case_T_M2, &&case_T_M1, &&case_T_0, &&case_T_1,
&&case_T_2, &&case_T_3, &&case_T_4, &&case_T_5, &&case_T_6,
&&case_T_7, &&case_T_8, &&case_T_9, &&case_T_10};
const short int DIAGMAP[14] = {20, 12, 8, 0, 4, 16, 24, 92, 32, 52, 104, 108, 48, 36};
const unsigned char TYPEMAP[14] = {7, 4, 2, 10, 1, 6, 8, 9, 4, 13, 4, 2, 1, 4};
const unsigned char SIZEMAP[14] = {8, 1, 2, 12, 4, 4, 0, 0, 1, 32, 1, 2, 4, 1};
const unsigned char ALGNMAP[14] = {3, 0, 1, 3, 3, 3, 0, 0, 0, 3, 0, 1, 3, 0};
if (TYPE != 1) goto L_06A3;
if (FORMAT != 2) goto L_06A4;
TYPE = -2;
goto L_06A5;
L_06A4:;
if (FORMAT != 3) goto L_06A6;
TYPE = -1;
L_06A6:;
L_06A5:;
goto L_06A7;
L_06A3:;
if (TYPE != 2) goto L_06A8;
if (FORMAT != 4) goto L_06A9;
TYPE = -3;
L_06A9:;
L_06A8:;
L_06A7:;
if (-3 > TYPE) goto L_0688;
if (TYPE <= 10) goto L_06AA;
L_0688:;
FAIL(_imp_str_literal("Unknown type"));
L_06AA:;
Q = TYPEMAP[TYPE + 3];
Q = SIZEMAP[TYPE + 3];
DEFV->FORMAT = Q;
Q = ALGNMAP[TYPE + 3];
Q = 0;
Q = DIAGMAP[TYPE + 3];
Q = 0;
Q = FORMAT;
Q = 1;
Q = 0;
Q = NIL;
goto *T[TYPE + 3]; /*TO DO*/
case_T_0:;
Q = 0;
return;
case_T_M3:;
case_T_1:;
case_T_2:;
case_T_5:;
DEFV->FLAGS = DEFV->FLAGS | 1048576;
case_T_M1:;
case_T_M2:;
case_T_10:;
return;
case_T_3:;
Q = FORMAT + 1;
DEFV->FORMAT = Q;
return;
case_T_4:;
FV = VAR(FORMAT);
if (FORMAT <= *VARS) goto L_06AC;
CLEARVARS(FORMAT);
INTERFACE->FORMATS = INTERFACE->FORMATS + 1;
FV->AREA = INTERFACE->FORMATS;
goto L_06AD;
L_06AC:;
Q = FV->FORMAT;
L_06AD:;
DEFV->FORMAT = -FORMAT;
Q = FV->DISP;
Q = FV->AREA;
case_T_7:;
Q = VAR(FORMAT)->AREA;
return;
case_T_8:;
Q = VAR(FORMAT)->AREA;
return;
case_T_9:;
DEFV->FLAGS = DEFV->FLAGS | 1048576;
case_T_6:;
if (&Q == &PQ) goto L_06AE;
ENCODETYPE(Q, FORMAT, &PQ);
DEFV->FORMAT = SIZEMAP[TYPE + 3];
Q = &PQ;
goto L_06AF;
L_06AE:;
Q = 0;
L_06AF:;
if (TYPE != 6) goto L_06B0;
DEFV->FLAGS = DEFV->FLAGS & (~1048576);
L_06B0:;
return;
} /* ENCODETYPE */
NEWV = 1;
DECL = TAG();
if (DECL == 0) goto L_06B1;
if (DECL > *VARS) goto L_06B2;
NEWV = 0;
L_06B2:;
DEFV = VAR(DECL);
CLEARVARS(DECL);
goto L_06B3;
L_06B1:;
PARMS = PARMS - 1;
DEFV = VAR(PARMS);
*DEFV = 0;
L_06B3:;
if (PARMS > *VARS) goto L_06B4;
FAIL(_imp_str_literal("Too many objects"));
L_06B4:;
INTERNALID = _imp_str_literal("");
L_06B5:;
if (PENDING == 44) goto L_06B6;
if (*_imp_LENGTH(&INTERNALID) == 127) goto L_06B7;
INTERNALID = _imp_join((_imp_string)(INTERNALID), (_imp_string)(_imp_TOSTRING(PENDING)));
L_06B7:;
_imp_READSYMBOL(&PENDING);
goto L_06B5;
L_06B6:;
_imp_READSYMBOL(&PENDING);
TF = TAG();
FORMAT = TAG();
OSTATE = TAG();
Q.DIM = (unsigned int)OSTATE >> 8;
SPEC = OSTATE & 8;
OFLAGS = OSTATE & 240;
OSTATE = OSTATE & 7;
if (OSTATE != 5) goto L_06B8;
OSTATE = 3;
L_06B8:;
TYPE = (unsigned int)TF >> 4 & 15;
FORM = TF & 15;
if (_imp_strcmp(ALIAS, _imp_str_literal("")) == 0) goto L_06B9;
if (OSTATE != 4) goto L_06BA;
OSTATE = 3;
L_06BA:;
EXTERNALID = ALIAS;
ALIAS = _imp_str_literal("");
goto L_06BB;
L_06B9:;
if (OSTATE != 4) goto L_06BC;
OSTATE = 3;
EXTERNALID = _imp_join((_imp_string)(_imp_str_literal("$")), (_imp_string)(INTERNALID));
goto L_06BB;
L_06BC:;
EXTERNALID = INTERNALID;
L_06BB:;
EXTERNALMODE = OSTATE;
if (FORM != 0) goto L_06BD;
if (DECL != 0) goto L_06BD;
PARMS = PARMS + 1;
DUMPDIAG(0, NIL);
return;
L_06BD:;
ENCODETYPE(TYPE, FORMAT, &Q);
if (_imp_strcmp(INTERNALID, _imp_str_literal("")) != 0) goto L_06BE;
Q.DIAGS = 0;
L_06BE:;
DEFV->TYPE = Q.TYPE;
if (OFLAGS & 16 == 0) goto L_06BF;
DEFV->TYPE = 1;
DEFV->FORMAT = 4;
Q.IND = 1;
Q.SIZE = 4;
Q.ROUND = 3;
Q.BIAS = 0;
FORM = 1;
L_06BF:;
if (FORM == 1) goto L_06C0;
Q.BIAS = 0;
L_06C0:;
if (OFLAGS & 32 == 0) goto L_06C1;
DEFV->FLAGS = DEFV->FLAGS | 1048576;
L_06C1:;
DECLSIZE = Q.SIZE;
DEFV->FORM = FORMMAP[FORM];
if (FORM != 4) goto L_06C2;
DEFV->EXTRA = PARMS;
PARAMETERMODE = -1;
BLOCKTYPE = -1;
if (DEFV->AREA != 0) goto L_06C3;
INTERFACE->FORMATS = INTERFACE->FORMATS + 1;
DEFV->AREA = INTERFACE->FORMATS;
L_06C3:;
return;
L_06C2:;
if (FORM != 3) goto L_06C4;
SETUSERLABEL(DECL);
if (LANGUAGEFLAGS & 1 == 0) goto L_06C5;
if (WSPSAVE != 0) goto L_06C6;
SAVEWSP();
L_06C6:;
DEFV->EXTRA = WSPSAVE;
L_06C5:;
goto L_06C7;
L_06C4:;
if (FORM != 6) goto L_06C8;
DEFV->AREA = FREELABEL - VLB + 1;
DEFV->DISP = VLB;
DEFV->EXTRA = VUB;
N = FREELABEL + 1;
FREELABEL = N + VUB - VLB;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
SELECTCONSTANTAREA();
DEFV->FORMAT = *CA;
DUMPWORD(VUB);
DUMPWORD(VLB);
DIR3(28, N, FREELABEL);
CONSTANTBASE = CONSTANTBASE + 4 * (VUB - VLB + 1);
SELECTCODEAREA();
goto L_06C7;
L_06C8:;
if (7 > FORM) goto L_06C9;
if (FORM > 10) goto L_06C9;
PARAMETERMODE = 1;
BLOCKTYPE = SPEC;
if (8 > FORM) goto L_06CA;
if (FORM > 9) goto L_06CA;
DEFV->FLAGS = DEFV->FLAGS | 524288;
if (FORM != 9) goto L_06CB;
DEFV->FLAGS = DEFV->FLAGS | 8;
goto L_06CC;
L_06CB:;
if (DEFV->TYPE > 5) goto L_06CD;
DEFV->TYPE = 1;
L_06CD:;
L_06CC:;
goto L_06CE;
L_06CA:;
if (FORM != 10) goto L_06CF;
DEFV->FLAGS = DEFV->FLAGS | 2097152;
L_06CF:;
L_06CE:;
if (EXTERNALMODE != 1) goto L_06D0;
EXTERNALMODE = 3;
OSTATE = 3;
DEFV->FLAGS = DEFV->FLAGS | 32768;
goto L_06D1;
L_06D0:;
if (EXTERNALMODE < 6) goto L_06D2;
if (EXTERNALMODE != 6) goto L_06D3;
DEFV->FLAGS = DEFV->FLAGS | 512;
DEFV->PRIM = Q.DIM;
goto L_06D4;
L_06D3:;
DEFV->FLAGS = DEFV->FLAGS | 256;
L_06D4:;
EXTERNALMODE = 3;
OSTATE = 3;
L_06D2:;
L_06D1:;
if (*PARAMETERLIST <= 0) goto L_06D5;
DANGERMARKER = 1;
FRAME = FRAME + 3 & (~3);
DEFV->DISP = FRAME;
DEFV->BASE = *LOCAL;
DEFV->FLAGS = DEFV->FLAGS | 4;
FRAME = FRAME + 4 * 2;
goto L_06D6;
L_06D5:;
if (*LOCAL < DANGERLEVEL) goto L_06D7;
DEFV->FLAGS = DEFV->FLAGS | 65536;
L_06D7:;
L_06D6:;
goto L_06C7;
L_06C9:;
if (FORM == 11) goto L_06D8;
if (FORM != 13) goto L_06D9;
L_06D8:;
Q.DIAGS = 0;
if (FORM != 13) goto L_06DA;
DECLSIZE = 4;
if (Q.TYPE != 8) goto L_06DB;
if (Q.SIZE != 1) goto L_06DB;
DECLSIZE = 4 * 2;
L_06DB:;
DEFV->FLAGS = 8;
Q.ROUND = 3;
L_06DA:;
Q.SIZE = 0;
goto L_06DC;
L_06D9:;
if (FORM != 2) goto L_06DD;
Q.IND = 1;
Q.ROUND = 3;
if (Q.TYPE == 10) goto L_06DE;
DECLSIZE = 4;
if (Q.TYPE != 8) goto L_06DF;
if (Q.SIZE != 1) goto L_06DF;
DECLSIZE = 4 * 2;
L_06DF:;
Q.SIZE = DECLSIZE;
L_06DE:;
goto L_06DC;
L_06DD:;
if (FORM != 1) goto L_06E0;
if (*PARAMETERLIST <= 0) goto L_06E1;
if (Q.TYPE == 8) goto L_06E2;
if (Q.TYPE == 9) goto L_06E2;
if (Q.TYPE != 13) goto L_06E1;
L_06E2:;
Q.SIZE = 4;
if (OFLAGS & 16 != 0) goto L_06E3;
DEFV->FLAGS = DEFV->FLAGS | 131072;
L_06E3:;
L_06E1:;
goto L_06DC;
L_06E0:;
Q.DIAGS = 0;
Q.ROUND = 3;
Q.SIZE = 4 * 2;
if (FORM != 14) goto L_06E4;
DEFV->FLAGS = 8;
L_06E4:;
DEFV->FLAGS = DEFV->FLAGS | 64;
L_06DC:;
if (EXTERNALMODE != 0) goto L_06E5;
DEFV->BASE = *LOCAL;
if (DECL != 0) goto L_06E6;
FRAME = FRAME + Q.ROUND & (~Q.ROUND);
DEFV->DISP = FRAME;
FRAME = FRAME + Q.SIZE;
goto L_06E7;
L_06E6:;
if (*PARAMETERLIST <= 0) goto L_06E8;
if (Q.ROUND >= 3) goto L_06E9;
Q.ROUND = 3;
L_06E9:;
if (Q.SIZE >= 4) goto L_06EA;
Q.SIZE = 4;
L_06EA:;
FRAME = FRAME + 3 & (~3);
DEFV->DISP = FRAME;
FRAME = FRAME + Q.SIZE;
goto L_06E7;
L_06E8:;
if (Q.SIZE <= 256) goto L_06EB;
Q.IND = 1;
FRAME = (FRAME & (~3)) - 4;
DEFV->DISP = FRAME;
DEFV->FORM = 15;
DEFV->FLAGS = DEFV->FLAGS & (~1048576);
N = Q.SIZE + 3 & (~3);
ATTRIBUTES = ATTRIBUTES | 32;
if (UNASSIGNED == 0) goto L_06EC;
ATTRIBUTES = ATTRIBUTES | 4;
VV = LITERAL(N);
LOAD(VV, 5);
RELEASEANDDROP(VV);
PRIM(56);
goto L_06ED;
L_06EC:;
VV = LOCALINTEGER(-N);
VV->BASE = 13;
VV->FORM = 0;
LOAD(VV, 13);
DROP(VV);
L_06ED:;
VV = LOCALINTEGER(FRAME);
PLANT2(67108864, 13, VV);
RELEASEANDDROP(VV);
if (WSPSAVE == 0) goto L_06EE;
SAVEWSP();
L_06EE:;
goto L_06EF;
L_06EB:;
FRAME = (FRAME & (~Q.ROUND)) - Q.SIZE;
DEFV->DISP = FRAME;
L_06EF:;
L_06E7:;
if (TF & 256 == 0) goto L_06F0;
DEFV->FLAGS = DEFV->FLAGS | 128;
L_06F0:;
if (Q.DIAGS == 0) goto L_06F1;
if (AMODE > 0) goto L_06F1;
DUMPDIAG(*LOCAL, &Q);
L_06F1:;
goto L_06F2;
L_06E5:;
OWNEXTRA = 0;
if (SPEC != 0) goto L_06F3;
INITFLAG = 0;
OWNTYPE = Q.TYPE;
OWNFORM = FORM;
if (EXTERNALMODE != 2) goto L_06F4;
if (FORM == 2) goto L_06F5;
if (FORM == 12) goto L_06F5;
if (FORM != 14) goto L_06F6;
L_06F5:;
DEFV->FORM = 1;
INITFLAG = -1;
return;
L_06F6:;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
AREA = 512;
AT = &CONSTANTBASE;
DEFV->AREA = 512;
Q.DIAGS = 0;
goto L_06F7;
L_06F4:;
AREA = 256;
AT = &OWNBASE;
DEFV->BASE = 10;
if (FORM == 11) goto L_06F8;
if (FORM != 13) goto L_06F9;
L_06F8:;
OWNARRAYBASE = OWNARRAYBASE + 3 & (~3);
AREA = 768;
AT = &OWNARRAYBASE;
OSTATE = 255;
L_06F9:;
L_06F7:;
if (OWNFORM == 12) goto L_06FA;
if (OWNFORM != 14) goto L_06FB;
L_06FA:;
OWNEXTRA = 1;
L_06FB:;
if (OWNTYPE != 8) goto L_06FC;
if (DEFV->FORMAT != 1) goto L_06FC;
if (OWNFORM == 2) goto L_06FD;
if (OWNFORM != 13) goto L_06FC;
L_06FD:;
OWNEXTRA = 1;
L_06FC:;
if (OWNFORM == 1) goto L_06FE;
if (OWNFORM == 11) goto L_06FE;
OWNTYPE = 1;
Q.ROUND = 3;
L_06FE:;
*AT = *AT + Q.ROUND & (~Q.ROUND);
DEFV->DISP = *AT;
if (FORM == 11) goto L_06FF;
if (FORM != 13) goto L_0700;
L_06FF:;
DEFV->FLAGS = DEFV->FLAGS | 64;
N = DEFV->DISP - VLB * DECLSIZE;
OWNBASE = OWNBASE + 3 & (~3);
DEFV->BASE = 10;
DEFV->DISP = OWNBASE;
DEFV->AREA = 0;
SELECTOWNAREA();
DIR4(17, (unsigned int)AREA >> 8, N, 0);
*CA = *CA + 8;
SELECTCODEAREA();
VALUE = DEFAULTVALUE;
INITFLAG = 1;
DEFV->ADATA = _imp_NEW(ATYPE);
U_100E:;
*DEFV->ADATA = 0;
L_0700:;
if (EXTERNALMODE != 3) goto L_0701;
DUMPEXTERNAL(1, DEFV);
DEFV->AREA = 0;
DEFV->FLAGS = DEFV->FLAGS & (~8388608);
L_0701:;
if (Q.DIAGS == 0) goto L_0702;
DUMPDIAG(DEFV->BASE, &Q);
L_0702:;
goto L_0703;
L_06F3:;
DEFV->FLAGS = DEFV->FLAGS | 8388608;
if (FORM == 11) goto L_0704;
if (FORM != 13) goto L_0705;
L_0704:;
DEFV->FLAGS = DEFV->FLAGS | 64;
L_0705:;
DUMPEXTERNAL(0, DEFV);
L_0703:;
L_06F2:;
L_06C7:;
ALTALIGN = ALTALIGN & (~Q.ROUND);
ROUND = Q.ROUND;
DTYPE = Q.DTYPE;
} /* DEFINEVAR */
void DUMPTEXT(int MAX) {
int J;
int LEN;
LEN = *_imp_LENGTH(&VALUE.STRING);
if (MAX != 0) goto L_0706;
MAX = LEN;
goto L_0707;
L_0706:;
if (LEN <= MAX) goto L_0708;
LEN = MAX;
WARN(0, _imp_str_literal("String truncated"));
L_0708:;
L_0707:;
DUMPBYTE(LEN);
J = 0; /*%for J = 1, 1, MAX %cycle*/
L_0709:
if (J == MAX) goto L_070A;
J += 1;
if (J <= LEN) goto L_070C;
DUMPBYTE(0);
goto L_070D;
L_070C:;
DUMPBYTE(*_imp_CHARNO(&VALUE.STRING, J));
L_070D:;
goto L_0709;
L_070A:;
} /* DUMPTEXT */
void ADUMP(void) {
struct STACKFM RV;
int J;
int DISP;
int KEY;
if (OWNTYPE == 1) goto L_070B;
if (OWNTYPE != 5) goto L_070E;
L_070B:;
if (STACK != NIL) goto L_070F;
DUMPWORD(VALUE.INTEGER);
goto L_0710;
L_070F:;
if (STACK->RECORD == NIL) goto L_0711;
FAIL(_imp_str_literal("Adump/0"));
L_0711:;
SIMPLIFY(STACK);
DISP = STACK->DISP;
if (STACK->RECORD != NIL) goto L_0712;
if (STACK->INDEX == NIL) goto L_0713;
L_0712:;
FAIL(_imp_str_literal("Adump/1"));
L_0713:;
if (STACK->FORM != 0) goto L_0714;
if (STACK->BASE != 10) goto L_0715;
KEY = 0;
goto L_0716;
L_0715:;
if (STACK->BASE != 0) goto L_0717;
if (STACK->AREA != 512) goto L_0718;
KEY = -1;
goto L_0719;
L_0718:;
KEY = -STACK->AREA;
if (KEY > 0) goto L_071A;
FAIL(_imp_str_literal("Adump/4"));
L_071A:;
L_0719:;
goto L_0716;
L_0717:;
FAIL(_imp_str_literal("Adump/2"));
L_0716:;
DIR3(30, KEY, DISP);
goto L_071B;
L_0714:;
FAIL(_imp_str_literal("Adump/3"));
L_071B:;
*CA = *CA + 4;
POPRELEASEANDDROP();
L_0710:;
goto L_071C;
L_070E:;
if (OWNTYPE == 4) goto L_071D;
if (OWNTYPE != 12) goto L_071E;
L_071D:;
if (0 > VALUE.INTEGER) goto L_071F;
if (VALUE.INTEGER <= 255) goto L_0720;
L_071F:;
WARN(0, _imp_str_literal("value truncated to 8 bits unsigned"));
L_0720:;
DUMPBYTE(VALUE.INTEGER);
goto L_071C;
L_071E:;
if (OWNTYPE != 2) goto L_0721;
if (-32768 > VALUE.INTEGER) goto L_0722;
if (VALUE.INTEGER <= 32767) goto L_0723;
L_0722:;
WARN(0, _imp_str_literal("value truncated to 16 bits signed"));
L_0723:;
DUMPHALF(VALUE.INTEGER);
goto L_071C;
L_0721:;
if (OWNTYPE == 6) goto L_0724;
if (OWNTYPE != 7) goto L_0725;
L_0724:;
RV.RVAL = VALUE.REAL;
CONVERTFORMAT(&RV, OWNTYPE);
DUMPWORD(RV.RHIGH);
if (OWNTYPE != 7) goto L_0726;
DUMPWORD(RV.RLOW);
L_0726:;
goto L_071C;
L_0725:;
if (OWNTYPE != 8) goto L_0727;
DUMPTEXT(DECLSIZE - 1);
goto L_071C;
L_0727:;
if (OWNTYPE == 9) goto L_0728;
if (OWNTYPE != 13) goto L_0729;
L_0728:;
J = 0; /*%for J = 1, 1, DECLSIZE %cycle*/
L_072A:
if (J == DECLSIZE) goto L_072B;
J += 1;
DUMPBYTE(0);
goto L_072A;
L_072B:;
goto L_071C;
L_0729:;
FAIL(_imp_str_literal("Init"));
L_071C:;
L_072D:;
if (OWNEXTRA <= 0) goto L_072E;
DUMPWORD(0);
OWNEXTRA = OWNEXTRA - 1;
goto L_072D;
L_072E:;
} /* ADUMP */
void INIT(int N) {
if (STACK == NIL) goto L_072F;
if (!(ICONST(STACK))) goto L_072F;
VALUE.INTEGER = STACK->DISP;
CONSTANTTYPE = 1;
POPRELEASEANDDROP();
L_072F:;
if (6 > OWNTYPE) goto L_0730;
if (OWNTYPE > 7) goto L_0730;
if (CONSTANTTYPE != 1) goto L_0731;
VALUE.REAL = VALUE.INTEGER;
L_0731:;
L_0730:;
if (INITFLAG >= 0) goto L_0732;
DEFV->DISP = VALUE.INTEGER;
goto L_0733;
L_0732:;
if (OSTATE != 2) goto L_0734;
SELECTCONSTANTAREA();
goto L_0735;
L_0734:;
if (OSTATE != 255) goto L_0736;
SELECTOWNARRAYAREA();
goto L_0735;
L_0736:;
SELECTOWNAREA();
L_0735:;
L_0737:;
if (N <= 0) goto L_0738;
N = N - 1;
ADUMP();
goto L_0737;
L_0738:;
SELECTCODEAREA();
L_0733:;
VALUE = DEFAULTVALUE;
DEFV->FLAGS = DEFV->FLAGS | 128;
} /* INIT */
void DIMENSION(int DIM, int N) {
int X;
int STATICARRAY;
STATICARRAY = 0;
int J;
struct VARFM *V;
struct AFM DOPE;
struct STACKFM *B;
struct STACKFM *TOTAL;
struct STACKFM *DOPEVECTOR;
struct STACKFM *ZERO;
struct STACKFM *HEADER;
struct STACKFM *L1;
struct STACKFM *L2;
struct STACKFM *U1;
struct STACKFM *U2;
struct STACKFM *M1;
struct STACKFM *M2;
struct QFM Q;
int ALLCONST(void) {
struct STACKFM *P;
struct BOUNDFM *B;
int J;
int N;
P = STACK;
N = DECLSIZE;
J = DIM + 1; /*%for J = DIM, -1, 1 %cycle*/
L_0739:
if (J == 1) goto L_073A;
J -= 1;
B = &DOPE.BOUNDDOPE.BOUND;
if (ICONST(P)) goto L_073C;
return 0 /*FALSE*/;
L_073C:;
B->UPPER = P->DISP;
P = P->STACK;
if (ICONST(P)) goto L_073D;
return 0 /*FALSE*/;
L_073D:;
B->LOWER = P->DISP;
P = P->STACK;
B->MULT = N;
N = B->UPPER - B->LOWER + 1;
if (N >= 0) goto L_073E;
FAIL(_imp_str_literal("Array inside-out"));
L_073E:;
goto L_0739;
L_073A:;
DOPE.TOTALSIZE = N;
DOPE.BASE = *LOCAL;
DOPE.DIMENSION = DIM;
DOPE.ZERODISPLACEMENT = 0;
N = 0;
J = 0; /*%for J = 1, 1, DIM %cycle*/
L_073F:
if (J == DIM) goto L_0740;
J += 1;
B = &DOPE.BOUNDDOPE.BOUND;
DOPE.ZERODISPLACEMENT = DOPE.ZERODISPLACEMENT * N - B->LOWER;
N = B->MULT;
DOPE.TOTALSIZE = DOPE.TOTALSIZE * N;
goto L_073F;
L_0740:;
DOPE.ZERODISPLACEMENT = DOPE.ZERODISPLACEMENT * N;
J = 0; /*%for J = 1, 1, DIM * 2 %cycle*/
L_0741:
if (J == DIM * 2) goto L_0742;
J += 1;
POPRELEASEANDDROP();
goto L_0741;
L_0742:;
STATICARRAY = 1;
CONSTANTBASE = CONSTANTBASE + 3 & -4;
DOPE.DV = CONSTANTBASE;
if (*PARAMETERLIST != 0) goto L_0743;
DOPE.TOTALSIZE = DOPE.TOTALSIZE + 3 & (~3);
L_0743:;
SELECTCONSTANTAREA();
DUMPWORD(DIM);
DUMPWORD(DOPE.TOTALSIZE);
DUMPWORD(DOPE.ZERODISPLACEMENT);
J = 0; /*%for J = 1, 1, DIM %cycle*/
L_0744:
if (J == DIM) goto L_0745;
J += 1;
B = &DOPE.BOUNDDOPE.BOUND;
DUMPWORD(B->LOWER);
DUMPWORD(B->UPPER);
DUMPWORD(B->MULT);
goto L_0744;
L_0745:;
SELECTCODEAREA();
return 1 /*TRUE*/;
} /* ALLCONST */
ATTRIBUTES = ATTRIBUTES | 32;
if (!(ALLCONST())) goto L_0746;
if (N != 0) goto L_0747;
return;
L_0747:;
if (*PARAMETERLIST == 0) goto L_0748;
X = PARMS + N;
FRAME = FRAME + ROUND & (~ROUND);
L_0749:;
if (N <= 0) goto L_074A;
N = N - 1;
X = X - 1;
V = VAR(X);
V->DISP = FRAME + DOPE.ZERODISPLACEMENT;
FRAME = FRAME + DOPE.TOTALSIZE;
V->FORM = 1;
V->FLAGS = V->FLAGS | 2;
V->ADATA = _imp_NEW(ATYPE);
U_100F:;
*V->ADATA = DOPE;
if (DEBUG == 0) goto L_074B;
Q.DFORM = 0;
if (V->FORMAT >= 0) goto L_074C;
Q.DFORM = VAR(-V->FORMAT)->AREA;
L_074C:;
Q.POINTED = NIL;
Q.IND = 0;
Q.DTYPE = DTYPE;
DEFV = V;
DUMPDIAG(17, &Q);
L_074B:;
goto L_0749;
L_074A:;
return;
L_0748:;
ZERO = NIL;
if (DOPE.ZERODISPLACEMENT == 0) goto L_074D;
ZERO = LITERAL(DOPE.ZERODISPLACEMENT);
L_074D:;
TOTAL = LITERAL(DOPE.TOTALSIZE);
DOPEVECTOR = LITERAL(DOPE.DV);
DOPEVECTOR->FORM = 0;
DOPEVECTOR->AREA = 512;
LOAD(DOPEVECTOR, 4);
if (ZERO == NIL) goto L_074E;
LOAD(ZERO, 3);
L_074E:;
LOAD(TOTAL, 2);
goto L_074F;
L_0746:;
if (DIM != 1) goto L_0750;
U1 = STACK;
STACK = U1->STACK;
L1 = STACK;
STACK = L1->STACK;
M1 = LITERAL(DECLSIZE);
LOADTRIO(U1, 5, L1, 4, M1, 6);
RELEASEANDDROPPAIR(L1, U1);
RELEASEANDDROP(M1);
PRIM(43);
goto L_0751;
L_0750:;
if (DIM != 2) goto L_0752;
U2 = STACK;
STACK = U2->STACK;
L2 = STACK;
STACK = L2->STACK;
M2 = LITERAL(DECLSIZE);
U1 = STACK;
STACK = U1->STACK;
L1 = STACK;
STACK = L1->STACK;
LOADPAIR(U1, 5, L1, 4);
LOADTRIO(U2, 8, L2, 7, M2, 9);
LOADPAIR(U1, 5, L1, 4);
LOADTRIO(U2, 8, L2, 7, M2, 9);
RELEASEANDDROPPAIR(L1, U1);
RELEASEANDDROPPAIR(L2, U2);
RELEASEANDDROP(M2);
PRIM(44);
goto L_0751;
L_0752:;
X = DECLSIZE;
J = 0; /*%for J = 1, 1, DIM %cycle*/
L_0753:
if (J == DIM) goto L_0754;
J += 1;
PUSHLITERAL(X);
X = 0;
B = STACK;
STACK = B->STACK;
PUSH(B);
RELEASEANDDROP(B);
B = STACK;
STACK = B->STACK;
PUSH(B);
RELEASEANDDROP(B);
goto L_0753;
L_0754:;
PUSHLITERAL(0);
PUSHLITERAL(0);
PUSHLITERAL(DIM);
PRIM(17);
L_0751:;
TOTAL = REGISTER(2);
ZERO = REGISTER(3);
DOPEVECTOR = REGISTER(4);
L_074F:;
FRAME = FRAME & (~3);
HEADER = LOCALINTEGER(FRAME - 4);
LOADADDRESS(HEADER, 5);
X = *VARS - N;
L_0756:;
if (N <= 0) goto L_0757;
N = N - 1;
X = X + 1;
V = VAR(X);
FRAME = FRAME - 2 * 4;
V->DISP = FRAME;
V->FLAGS = V->FLAGS | 128 | 64;
V->FORM = 1;
PLANT1(4194304, 13, 13, JUST(2));
if (ZERO != NIL) goto L_0758;
PLANT1(27262976, 0, 1, JUST(13));
goto L_0759;
L_0758:;
PLANT1(8388608, 13, 1, JUST(3));
L_0759:;
PLANT4(134217728 | 2097152, 5, 9);
goto L_0756;
L_0757:;
RELEASEANDDROP(TOTAL);
if (ZERO == NIL) goto L_075A;
RELEASEANDDROP(ZERO);
L_075A:;
RELEASEANDDROP(DOPEVECTOR);
RELEASEANDDROP(HEADER);
} /* DIMENSION */
void SWOP(void) {
struct STACKFM *T;
T = STACK;
STACK = T->STACK;
T->STACK = STACK->STACK;
STACK->STACK = T;
} /* SWOP */
void DEFINERANGE(void) {
int T;
struct VARFM *V;
T = TAG();
V = VAR(T);
CLEARVARS(T);
CONSTANTBOUNDS();
V->DISP = VLB;
V->EXTRA = VUB;
V->FORMAT = -1;
} /* DEFINERANGE */
void TESTRANGE(struct STACKFM * S, struct VARFM * V) {
struct STACKFM *R;
struct STACKFM *L;
struct STACKFM *U;
struct STACKFM *LOW;
struct STACKFM *HIGH;
if (INTERFACE->OPTIONS & 128 != 0) goto L_075B;
return;
L_075B:;
if (S != 13) goto L_075C;
LOW = LITERAL(V->DISP);
HIGH = LITERAL(V->EXTRA);
if (S == 0) goto L_075D;
LOADUP(&S);
L_075D:;
if (&S == NIL) goto L_075E;
BUILDSET(&S);
L_075E:;
R = COPY(&S);
AMAP(R);
LOADTRIO(LOW, 2, HIGH, 3, R, 1);
PRIM(46);
RELEASEANDDROPPAIR(LOW, HIGH);
RELEASEANDDROP(R);
return;
L_075C:;
if (!(ICONST(&S))) goto L_075F;
if (V->DISP > S) goto L_0760;
if (S > V->EXTRA) goto L_0760;
return;
L_0760:;
WARN(1, _imp_str_literal("Range violation"));
L_075F:;
LOADUP(&S);
R = COPY(&S);
U = LITERAL(V->EXTRA);
if (V->DISP == 0) goto L_0761;
L = LITERAL(V->DISP);
LOADTRIO(R, 2, L, 3, U, 4);
PRIM(16);
RELEASEANDDROP(L);
goto L_0762;
L_0761:;
LOADPAIR(R, 2, U, 4);
PRIM(33);
L_0762:;
RELEASEANDDROPPAIR(R, U);
} /* TESTRANGE */
void DUPLICATE(void) {
struct STACKFM *V;
V = COPY(STACK);
V->STACK = STACK;
STACK = V;
} /* DUPLICATE */
void STACKWORKVARIABLE(void) {
int T;
struct VARFM *V;
T = TAG();
V = VAR(T);
CLEARVARS(T);
if (V->BASE != 0) goto L_0763;
FRAME = (FRAME & -4) - 4;
V->TYPE = 1;
V->FORM = 1;
V->BASE = *LOCAL;
V->DISP = FRAME;
V->FLAGS = 128;
L_0763:;
STACKVAR(T);
} /* STACKWORKVARIABLE */
void CLAIMWITH(int N) {
int FORMAT;
struct WITHFM *W;
W = _imp_NEW(WITHFMTYPE);
W->LINK = WITHS;
WITHS = W;
W->KEY = *N;
if (STACK->INDEX != NIL) goto L_073B;
if (STACK->RECORD != NIL) goto L_073B;
if (STACK->FORM != 1) goto L_073B;
if (LOCKED(STACK->BASE)) goto L_0764;
L_073B:;
FORMAT = STACK->FORMAT;
AMAP(STACK);
STAB(STACK);
STACK->FORMAT = FORMAT;
STACK->FLAGS = STACK->FLAGS | 4194304;
L_0764:;
W->DATA = STACK->DATA;
POPRELEASEANDDROP();
} /* CLAIMWITH */
void RELEASEWITH(int N) {
struct WITHFM BASE;
struct WITHFM *W;
W = &BASE;
struct WITHFM *X;
BASE.LINK = WITHS;
L_0765:;
if (W->LINK == NIL) goto L_0766;
if (W->LINK->KEY != N) goto L_0767;
X = W->LINK;
W->LINK = X->LINK;
WITHS = BASE.LINK;
_imp_DISPOSE(X);
return;
L_0767:;
W = W->LINK;
goto L_0765;
L_0766:;
FAIL(_imp_str_literal("No use"));
} /* RELEASEWITH */
void USEWITH(int N) {
int FORMAT;
struct WITHFM *W;
W = WITHS;
L_0768:;
if (W == NIL) goto L_0769;
if (W->KEY != N) goto L_076A;
STACKINTEGER(0);
STACK->DATA = W->DATA;
if (STACK->FLAGS & 4194304 == 0) goto L_076B;
FORMAT = STACK->FORMAT;
VMAP(STACK, 1);
STACK->FORMAT = FORMAT;
L_076B:;
return;
L_076A:;
W = W->LINK;
goto L_0768;
L_0769:;
FAIL(_imp_str_literal("No use"));
} /* USEWITH */
void BUILDSET(struct STACKFM * S) {
struct STACKFM *W;
struct STACKFM *Z;
struct STACKFM *OLDLINK;
struct MEMBERFM *M;
struct MEMBERFM *X;
struct CSETFM {
union {
struct {
unsigned char SET[32];
};
};
};
struct CSETFM C;
int DUMPED;
DUMPED = 0;
int MARKED;
MARKED = 0;
int INWORK;
INWORK = 0;
int LOW;
int HIGH;
int OP;
int OLDOPER;
void DUMPSET(void) {
int J;
DUMPED = 1;
CONSTANTBASE = CONSTANTBASE + 3 & (~3);
S = 13;
S = CONSTANTBASE;
S = 1;
S = 512;
SELECTCONSTANTAREA();
J = -1; /*%for J = 0, 1, 31 %cycle*/
L_076C:
if (J == 31) goto L_076D;
J += 1;
DUMPBYTE(C.SETC.SET);
goto L_076C;
L_076D:;
SELECTCODEAREA();
} /* DUMPSET */
void MARK(int N) {
int W;
if (0 > N) goto L_076E;
if (N <= 255) goto L_076F;
L_076E:;
WARN(1,
_imp_join((_imp_string)(_imp_str_literal("Set element out of range ")), (_imp_string)(_imp_ITOS(N, 0))));
return;
L_076F:;
W = (unsigned int)N >> 3;
C.SETC.SET = C.SETC.SET | 1 << (N & 7);
MARKED = 1;
} /* MARK */
if (DIAG & 8 == 0) goto L_0770;
MONITOR(&S, _imp_str_literal("Bset->"));
L_0770:;
OLDLINK = &S;
S = NIL;
OLDOPER = S;
S = 0;
C = 0;
M = &S;
S = NIL;
*S.LINK = *S.LINK & (~16384);
L_0771:;
if (M == NIL) goto L_0772;
X = M;
M = M->LINK;
if (X->CONST == 0) goto L_0773;
HIGH = X->A;
DROP(X->A);
if (X->B != NIL) goto L_0774;
MARK(HIGH);
goto L_0775;
L_0774:;
LOW = X->B;
DROP(X->B);
L_0776:;
if (LOW > HIGH) goto L_0777;
MARK(LOW);
LOW = LOW + 1;
goto L_0776;
L_0777:;
L_0775:;
goto L_0778;
L_0773:;
if (INWORK != 0) goto L_0779;
W = CLAIMWORKAREA(32, 13);
if (MARKED == 0) goto L_077A;
if (DUMPED != 0) goto L_077B;
DUMPSET();
L_077B:;
SETASSIGN(&S, W);
RELEASE(S);
MARKED = 0;
goto L_077C;
L_077A:;
Z = LITERAL(0);
Z->FLAGS = 16384;
SETASSIGN(Z, W);
RELEASEANDDROP(Z);
L_077C:;
S.DATA = W->DATA;
DROP(W);
DUMPED = 1;
INWORK = 1;
L_0779:;
AMAP(&S);
LOADPAIR(&S, 9, X->A, 2);
if (X->B != NIL) goto L_077D;
OP = 20;
goto L_077E;
L_077D:;
LOADTRIO(X->B, 1, &S, 9, X->A, 2);
RELEASEANDDROP(X->B);
OP = 28;
L_077E:;
PRIM(OP);
VMAP(&S, 13);
*S.LINK = *S.LINK | 262144;
RELEASEANDDROP(X->A);
L_0778:;
_imp_DISPOSE(X);
goto L_0771;
L_0772:;
if (DUMPED != 0) goto L_077F;
DUMPSET();
L_077F:;
S = OLDLINK;
S = OLDOPER;
if (DIAG & 8 == 0) goto L_0780;
MONITOR(&S, _imp_str_literal("Bset<-"));
L_0780:;
} /* BUILDSET */
void COMPILEIN(int STACKIT) {
int N;
struct STACKFM *V;
struct STACKFM *SET;
struct STACKFM *C;
SET = STACK;
V = SET->STACK;
STACK = V->STACK;
if (SET->MEMBERS == NIL) goto L_0781;
BUILDSET(SET);
L_0781:;
if (SET->OPER == 0) goto L_0782;
LOADUP(SET);
L_0782:;
if (SET->FLAGS & 16384 == 0) goto L_0783;
if (*STACKIT == 0) goto L_0784;
C = LITERAL(0);
C->STACK = STACK;
STACK = C;
goto L_0785;
L_0784:;
DUMPWORD(-514850816);
L_0785:;
RELEASEANDDROP(SET);
RELEASEANDDROP(V);
return;
L_0783:;
if (!(ICONST(V))) goto L_0786;
if (0 > V->DISP) goto L_0786;
if (V->DISP > 255) goto L_0786;
ADVANCE(SET, 1, (unsigned int)V->DISP >> 5 << 2);
OPERATE(9, SET, LITERAL(1 << (V->DISP & 31)));
TESTZERO(SET);
goto L_0787;
L_0786:;
AMAP(SET);
LOADPAIR(V, 2, SET, 3);
PRIM(11);
L_0787:;
RELEASEANDDROPPAIR(SET, V);
if (*STACKIT == 0) goto L_0788;
STACKTRUEORFALSE(6);
L_0788:;
} /* COMPILEIN */
void ADDMEMBER(int N) {
struct MEMBERFM BASE;
struct MEMBERFM *M;
struct MEMBERFM *P;
struct STACKFM *A;
struct STACKFM *B;
B = NIL;
int ITEMS;
ITEMS = 0;
A = STACK;
STACK = A->STACK;
if (N == 0) goto L_0789;
B = STACK;
STACK = B->STACK;
if (!(ICONST(A))) goto L_078A;
if (!(ICONST(B))) goto L_078A;
if (A->DISP >= B->DISP) goto L_078A;
DROP(A);
DROP(B);
return;
L_078A:;
L_0789:;
M = _imp_NEW(MEMBERFMTYPE);
M->A = A;
M->B = B;
if (STACK->MEMBERS == NIL) goto L_078B;
ITEMS = STACK->MEMBERS->DATA;
L_078B:;
if (!(ICONST(A))) goto L_078C;
if (B == NIL) goto L_078D;
if (!(ICONST(B))) goto L_078C;
L_078D:;
M->CONST = 1;
M->LINK = STACK->MEMBERS;
STACK->MEMBERS = M;
goto L_078E;
L_078C:;
M->CONST = 0;
BASE.LINK = STACK->MEMBERS;
P = &BASE;
L_078F:;
if (P->LINK == NIL) goto L_0790;
if (P->LINK->CONST == 0) goto L_0790;
P = P->LINK;
goto L_078F;
L_0790:;
M->LINK = P->LINK;
P->LINK = M;
STACK->MEMBERS = BASE.LINK;
L_078E:;
STACK->MEMBERS->DATA = ITEMS + 1;
STACK->FLAGS = STACK->FLAGS & (~16384);
} /* ADDMEMBER */
void STACKDATASIZE(void) {
int T;
int N;
T = PENDING;
_imp_READSYMBOL(&PENDING);
if (T != 0) goto L_0791;
T = TAG();
N = VAR(T)->FORMAT;
if (N >= 0) goto L_0792;
N = VAR(-N)->FORMAT;
L_0792:;
goto L_0793;
L_0791:;
if (0 > T) goto L_0794;
if (T > 13) goto L_0794;
N = TYPESIZE[T];
goto L_0795;
L_0794:;
N = 0;
L_0795:;
if (N != 0) goto L_0796;
FAIL(_imp_str_literal("Unknown type"));
L_0796:;
L_0793:;
STACKINTEGER(N);
} /* STACKDATASIZE */
void TESTFORNIL(void) {
if (UNASSIGNED == 0) goto L_0797;
STACK->FLAGS = STACK->FLAGS | 128;
LOAD(STACK, 2);
PRIM(13);
L_0797:;
} /* TESTFORNIL */
void SETVARIANTCOUNT(int N) {
struct STACKFM *V;
V = COPY(STACK);
struct STACKFM *COUNT;
VMAP(V, 2);
COUNT = LITERAL(*N);
SIMPLE(COUNT, V);
RELEASEANDDROPPAIR(COUNT, V);
} /* SETVARIANTCOUNT */
void TESTVARIANTCOUNT(int N) {
struct STACKFM *V;
V = COPY(STACK);
struct STACKFM *COUNT;
COUNT = LITERAL(*N);
VMAP(V, 2);
LOADPAIR(V, 4, COUNT, 1);
PRIM(36);
RELEASEANDDROPPAIR(V, COUNT);
} /* TESTVARIANTCOUNT */
void CHECKNOTLONGNEW(void) {
struct STACKFM *V;
V = COPY(STACK);
AMAP(V);
VMAP(V, 2);
TESTZERO(V);
INVERT = 0;
PRIM(26);
RELEASEANDDROP(V);
} /* CHECKNOTLONGNEW */
void CHECKDYNAMICBOUNDS(void) {
struct STACKFM *LOWER;
struct STACKFM *UPPER;
UPPER = STACK;
LOWER = UPPER->STACK;
STACK = LOWER->STACK;
LOADTRIO(STACK, 2, LOWER, 3, UPPER, 4);
PRIM(16);
RELEASEANDDROPPAIR(LOWER, UPPER);
} /* CHECKDYNAMICBOUNDS */
void LOCALISE(void) {
struct STACKFM *LOC;
struct STACKFM *SIZE;
struct STACKFM *ZERO;
ZERO = STACK;
SIZE = ZERO->STACK;
LOC = SIZE->STACK;
STACK = LOC->STACK;
FORGETDESTINATION(LOC);
AMAP(LOC);
LOADTRIO(SIZE, 1, ZERO, 2, LOC, 3);
PRIM(14);
ATTRIBUTES = ATTRIBUTES | 32;
RELEASEANDDROPPAIR(SIZE, ZERO);
RELEASEANDDROP(LOC);
} /* LOCALISE */
void ENDOFBLOCK(void) {
if (*LOCAL == 128) goto L_0798;
if (UNCONDJUMP == *CA) goto L_0799;
if (AVAR != 10) goto L_0799;
if (*AVAR->P & 256 != 0) goto L_0799;
RETURN(0);
L_0799:;
L_0798:;
} /* ENDOFBLOCK */
void PROCESSINCLUDEFILE(void) {
GETSTRING(&INCLUDEFILE);
DIRSTRING(4, &INCLUDEFILE);
} /* PROCESSINCLUDEFILE */
static const void *C[256] = {
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_33, &&case_C_34, &&case_C_35,
&&case_C_36, &&case_C_37, &&case_C_38, &&case_C_39, &&case_C_40, &&case_C_41,
&&case_C_42, &&case_C_43, &&case_C_default, &&case_C_45, &&case_C_46, &&case_C_47,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_58, &&case_C_59,
&&case_C_60, &&case_C_61, &&case_C_62, &&case_C_63, &&case_C_64, &&case_C_65,
&&case_C_66, &&case_C_67, &&case_C_68, &&case_C_69, &&case_C_70, &&case_C_71,
&&case_C_72, &&case_C_73, &&case_C_74, &&case_C_75, &&case_C_76, &&case_C_77,
&&case_C_78, &&case_C_79, &&case_C_80, &&case_C_81, &&case_C_82, &&case_C_83,
&&case_C_84, &&case_C_85, &&case_C_86, &&case_C_87, &&case_C_88, &&case_C_default,
&&case_C_90, &&case_C_91, &&case_C_92, &&case_C_93, &&case_C_94, &&case_C_95,
&&case_C_default, &&case_C_97, &&case_C_98, &&case_C_99, &&case_C_100, &&case_C_101,
&&case_C_102, &&case_C_103, &&case_C_104, &&case_C_105, &&case_C_106, &&case_C_107,
&&case_C_108, &&case_C_109, &&case_C_110, &&case_C_111, &&case_C_112, &&case_C_113,
&&case_C_114, &&case_C_115, &&case_C_116, &&case_C_117, &&case_C_118, &&case_C_119,
&&case_C_120, &&case_C_121, &&case_C_122, &&case_C_123, &&case_C_default, &&case_C_125,
&&case_C_126, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_162, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_172, &&case_C_default,
&&case_C_default, &&case_C_175, &&case_C_176, &&case_C_177, &&case_C_178, &&case_C_179,
&&case_C_180, &&case_C_181, &&case_C_182, &&case_C_default, &&case_C_default, &&case_C_default,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_191,
&&case_C_192, &&case_C_193, &&case_C_194, &&case_C_195, &&case_C_196, &&case_C_197,
&&case_C_198, &&case_C_default, &&case_C_default, &&case_C_201, &&case_C_default, &&case_C_default,
&&case_C_204, &&case_C_205, &&case_C_206, &&case_C_207, &&case_C_208, &&case_C_default,
&&case_C_210, &&case_C_211, &&case_C_212, &&case_C_213, &&case_C_214, &&case_C_215,
&&case_C_216, &&case_C_default, &&case_C_218, &&case_C_219, &&case_C_default, &&case_C_221,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_default, &&case_C_226, &&case_C_227,
&&case_C_default, &&case_C_229, &&case_C_230, &&case_C_231, &&case_C_default, &&case_C_233,
&&case_C_default, &&case_C_default, &&case_C_default, &&case_C_237, &&case_C_238, &&case_C_239,
&&case_C_240, &&case_C_default, &&case_C_242, &&case_C_243, &&case_C_244, &&case_C_default,
&&case_C_246, &&case_C_247, &&case_C_default, &&case_C_default, &&case_C_250, &&case_C_251,
&&case_C_252, &&case_C_253, &&case_C_default, &&case_C_default};
AT = 0;
PENDINGAUTO = 0;
OLDFRAME = FRAME;
if (AMODE < -1) goto L_079A;
FRAME = 0;
if (AMODE < 0) goto L_079B;
FRAME = 4;
if (*AVAR->P & 1024 == 0) goto L_079C;
*AVAR->P = *AVAR->P - 1024;
AVAR = 0;
L_079C:;
if (AVAR != 0) goto L_079D;
if (7 == OSTATE) goto L_079E;
if (OSTATE != 3) goto L_0755;
L_079E:;
if (AMODE != 0) goto L_079D;
L_0755:;
AVAR = NEWLABEL();
L_079D:;
if (AMODE != 0) goto L_079F;
if (*LOCAL <= 128 + 17) goto L_07A0;
FAIL(_imp_str_literal("Subroutines nested too deeply"));
L_07A0:;
UNCONDJUMP = -1;
FORGETEVERYTHING();
DIR2(1, AVAR);
BLOCKS = BLOCKS + 1;
DIRSTRING(-1, &INTERNALID);
FMARK = FMARK + 1;
FRAMEUSE[*LOCAL - 128] = FMARK;
if (DEBUG == 0) goto L_07A1;
DIR3(35, 0, CURRENTLINE);
L_07A1:;
L_079F:;
if (OSTATE != 3) goto L_07A2;
if (AMODE == 0) goto L_07A3;
*AVAR->P = *AVAR->P | 1024;
DUMPEXTERNAL(2, AVAR);
goto L_07A4;
L_07A3:;
*AVAR->P = *AVAR->P | 16777216;
N = 3;
if (*AVAR->P & 32768 == 0) goto L_07A5;
N = 3 | 1 << 4;
L_07A5:;
DUMPEXTERNAL(N, AVAR);
ATTRIBUTES = ATTRIBUTES | 16;
if (*AVAR->P & 256 == 0) goto L_07A6;
ATTRIBUTES = ATTRIBUTES | 8;
L_07A6:;
L_07A4:;
L_07A2:;
goto L_07A7;
L_079B:;
DIR2(5, AVAR);
L_07A7:;
L_079A:;
FRAMEEXTRA = FRAME;
FRAME = FRAME + 3 & -4;
FRAMEEXTRA = FRAME - FRAMEEXTRA;
FRAMEBASE = FRAME;
MYMARK = FMARK;
MAXFRAME = 0;
ALTALIGN = (~0);
PENDINGKNOWNREGISTER = 0;
PENDINGAUTO = 0;
if (CODE != 72) goto L_07A8;
goto *C[125]; /*TO DO*/
L_07A8:;
L_07A9:;
CODE = PENDING;
_imp_READSYMBOL(&PENDING);
goto *C[CODE]; /*TO DO*/
case_C_33:;
OPERATION(10);
goto L_07AA;
case_C_34:;
COMPAREDOUBLE();
goto L_07AA;
case_C_35:;
JUMPFORWARD(TAG(), 6);
goto L_07AA;
case_C_36:;
DEFINEVAR();
goto L_07AA;
case_C_37:;
OPERATION(11);
goto L_07AA;
case_C_38:;
OPERATION(9);
goto L_07AA;
case_C_39:;
INPUTSTRINGVALUE();
goto L_07AA;
case_C_40:;
JUMPFORWARD(TAG(), 3);
goto L_07AA;
case_C_41:;
JUMPFORWARD(TAG(), 5);
goto L_07AA;
case_C_42:;
OPERATION(6);
goto L_07AA;
case_C_43:;
OPERATION(4);
goto L_07AA;
case_C_45:;
OPERATION(5);
goto L_07AA;
case_C_46:;
OPERATION(22);
goto L_07AA;
case_C_47:;
OPERATION(7);
goto L_07AA;
case_C_58:;
DEFINECOMPILERLABEL(TAG());
goto L_07AA;
case_C_59:;
ENDOFBLOCK();
goto L_07AB;
case_C_60:;
JUMPFORWARD(TAG(), 2);
goto L_07AA;
case_C_61:;
JUMPFORWARD(TAG(), 1);
goto L_07AA;
case_C_62:;
JUMPFORWARD(TAG(), 4);
goto L_07AA;
case_C_63:;
COMPAREVALUES();
goto L_07AA;
case_C_64:;
STACKVAR(TAG());
goto L_07AA;
case_C_65:;
INIT(TAG());
goto L_07AA;
case_C_66:;
JUMPBACKWARD(TAG());
goto L_07AA;
case_C_67:;
COMPAREADDRESSES();
goto L_07AA;
case_C_68:;
INPUTREALVALUE();
goto L_07AA;
case_C_69:;
CALL(0);
goto L_07AA;
case_C_70:;
JUMPFORWARD(TAG(), 7);
goto L_07AA;
case_C_71:;
GETSTRING(&ALIAS);
goto L_07AA;
case_C_72:;
COMPILEBEGIN();
goto L_07AA;
case_C_73:;
_imp_SELECTINPUT(2);
_imp_READSYMBOL(&PENDING);
goto L_07AA;
case_C_74:;
USERJUMP(TAG());
goto L_07AA;
case_C_75:;
RETURN(2);
goto L_07AA;
case_C_76:;
DEFINEUSERLABEL(TAG());
goto L_07AA;
case_C_77:;
RETURN(-2);
goto L_07AA;
case_C_78:;
INPUTINTEGERVALUE(0);
goto L_07AA;
case_C_79:;
UPDATELINE(TAG());
goto L_07AA;
case_C_80:;
DUMPBYTE(POPPEDVALUE() & 255);
goto L_07AA;
case_C_81:;
OPERATION(28);
goto L_07AA;
case_C_82:;
RETURN(0);
goto L_07AA;
case_C_83:;
ASSIGN(0);
goto L_07AA;
case_C_84:;
RETURN(1);
goto L_07AA;
case_C_85:;
OPERATE(2, STACK, NIL);
goto L_07AA;
case_C_86:;
RETURN(-1);
goto L_07AA;
case_C_87:;
SWITCHJUMP(TAG());
goto L_07AA;
case_C_88:;
OPERATION(8);
goto L_07AA;
case_C_90:;
ASSIGN(1);
goto L_07AA;
case_C_91:;
OPERATION(14);
goto L_07AA;
case_C_92:;
OPERATE(1, STACK, NIL);
goto L_07AA;
case_C_93:;
OPERATION(15);
goto L_07AA;
case_C_94:;
STACK->FORMAT = -TAG();
goto L_07AA;
case_C_95:;
SWITCHLABEL(TAG());
goto L_07AA;
case_C_97:;
ARRAYACCESS();
goto L_07AA;
case_C_98:;
CONSTANTBOUNDS();
goto L_07AA;
case_C_99:;
SECTION = 1;
GETSTRING(&SECTIONID);
goto L_07AB;
case_C_100:;
D = TAG();
N = TAG();
DIMENSION(D, N);
goto L_07AA;
case_C_101:;
SIGNALEVENT(TAG());
goto L_07AA;
case_C_102:;
COMPILEFOR(TAG());
goto L_07AA;
case_C_103:;
TESTFORNIL();
goto L_07AA;
case_C_104:;
SPECIALCALL(TAG());
goto L_07AA;
case_C_105:;
ARRAYINDEX();
goto L_07AA;
case_C_106:;
ASSIGN(-1);
goto L_07AA;
case_C_107:;
JUMPFORWARD(TAG(), 9);
goto L_07AA;
case_C_108:;
LANGUAGEFLAGS = TAG();
goto L_07AA;
case_C_109:;
DO(MONITORID, &MONITOREP, 0);
goto L_07AA;
case_C_110:;
SELECT(TAG());
goto L_07AA;
case_C_111:;
EVENTTRAP(TAG());
goto L_07AA;
case_C_112:;
ASSIGNPARAMETER();
goto L_07AA;
case_C_113:;
PROCESSINCLUDEFILE();
goto L_07AA;
case_C_114:;
RESOLVE(TAG());
goto L_07AA;
case_C_115:;
TOSTORE(TAG());
goto L_07AA;
case_C_116:;
JUMPFORWARD(TAG(), 8);
goto L_07AA;
case_C_117:;
AOP();
goto L_07AA;
case_C_118:;
OPERATE(3, STACK, NIL);
goto L_07AA;
case_C_119:;
MACHINECODE();
FORGETEVERYTHING();
goto L_07AA;
case_C_120:;
OPERATION(29);
goto L_07AA;
case_C_121:;
SETCD(TAG(), &DIAG);
goto L_07AA;
case_C_122:;
SETCD(TAG(), &CONTROL);
goto L_07AA;
case_C_123:;
ASSEMBLE(DEFV, BLOCKTYPE, *VARS, *LOCAL + 1, PARAMETERMODE, &ATTRIBUTES);
goto L_07AA;
case_C_125:;
if (!(FINISHPARAMS())) goto L_07AC;
goto L_07AB;
L_07AC:;
if (INTERFACE->OPTIONS & 1048576 == 0) goto L_07AD;
DO(_imp_str_literal("3L___stack_check"), &STACKCHECK, 0);
L_07AD:;
goto L_07AA;
case_C_126:;
N = PENDING;
_imp_READSYMBOL(&PENDING);
if (!(ALTERNATEFORMAT(N))) goto L_07AE;
goto L_07AB;
L_07AE:;
goto L_07AA;
case_C_162:;
UNSIGNED = 10;
STACKCONDITION();
goto L_07AA;
case_C_191:;
UNSIGNED = 10;
COMPAREVALUES();
goto L_07AA;
case_C_172:;
if (FRAME <= MAXFRAME) goto L_07AF;
MAXFRAME = FRAME;
L_07AF:;
FRAME = FRAMEBASE;
goto L_07AA;
case_C_176:;
N = TAG();
goto L_07AA;
case_C_177:;
ADDMEMBER(0);
goto L_07AA;
case_C_178:;
ADDMEMBER(1);
goto L_07AA;
case_C_179:;
SETVARIANTCOUNT(TAG());
goto L_07AA;
case_C_180:;
TESTVARIANTCOUNT(TAG());
goto L_07AA;
case_C_181:;
CHECKNOTLONGNEW();
goto L_07AA;
case_C_182:;
CHECKDYNAMICBOUNDS();
goto L_07AA;
case_C_175:;
OPERATION(19);
goto L_07AA;
case_C_252:;
OPERATION(20);
goto L_07AA;
case_C_192:;
if (DIAG & 1 == 0) goto L_07B0;
DECODE(0, -1);
L_07B0:;
CURRENTLINE = TAG();
goto L_07AA;
case_C_193:;
AMAP(STACK);
goto L_07AA;
case_C_194:;
if (PENDING != 116) goto L_07B1;
PENDING = 35;
goto L_07B2;
L_07B1:;
PENDING = 61;
L_07B2:;
TESTZERO(STACK);
POPRELEASEANDDROP();
goto L_07AA;
case_C_195:;
UNSIGNED = 0;
STACKCONDITION();
goto L_07AA;
case_C_196:;
DUPLICATE();
goto L_07AA;
case_C_197:;
if (STACK->FORM != 0) goto L_072C;
if (!(LOCKED(STACK->BASE))) goto L_072C;
if (STACK->RECORD != NIL) goto L_072C;
if (STACK->INDEX == NIL) goto L_07B3;
L_072C:;
LOADUP(STACK);
L_07B3:;
goto L_07AA;
case_C_198:;
STACK->FORMAT = -TAG();
goto L_07AA;
case_C_201:;
COMPILEIN(1);
goto L_07AA;
case_C_204:;
LOCALISE();
goto L_07AA;
case_C_205:;
OPERATION(17);
goto L_07AA;
case_C_206:;
OPERATION(16);
goto L_07AA;
case_C_207:;
APPLYROUND(STACK);
goto L_07AA;
case_C_208:;
POPRELEASEANDDROP();
goto L_07AA;
case_C_210:;
DEFINERANGE();
goto L_07AA;
case_C_211:;
SWOP();
goto L_07AA;
case_C_212:;
APPLYTRUNC(STACK);
goto L_07AA;
case_C_213:;
USEWITH(TAG());
goto L_07AA;
case_C_214:;
VMAP(STACK, TAG());
goto L_07AA;
case_C_215:;
STACKWORKVARIABLE();
goto L_07AA;
case_C_216:;
if (STACK->TYPE == 7) goto L_07B4;
LOADUP(STACK);
L_07B4:;
goto L_07AA;
case_C_218:;
STACKINTEGER(0);
STACK->TYPE = 13;
STACK->FLAGS = 16384;
goto L_07AA;
case_C_219:;
CLAIMWITH(TAG());
goto L_07AA;
case_C_221:;
RELEASEWITH(TAG());
goto L_07AA;
case_C_226:;
INPUTINTEGERVALUE(1);
goto L_07AA;
case_C_227:;
GENERALCOMPARE();
goto L_07AA;
case_C_229:;
N = STACK->TYPE;
AMAP(STACK);
if (STACK->FORM != 0) goto L_07B5;
if (!(LOCKED(STACK->BASE))) goto L_07B5;
if (STACK->INDEX != NIL) goto L_07B5;
if (STACK->RECORD == NIL) goto L_07B6;
L_07B5:;
LOADUP(STACK);
L_07B6:;
VMAP(STACK, N);
goto L_07AA;
case_C_230:;
FORRANGE = VAR(TAG());
goto L_07AA;
case_C_231:;
CALL(1);
goto L_07AA;
case_C_233:;
COMPILEIN(0);
goto L_07AA;
case_C_238:;
APPLYINT(STACK);
goto L_07AA;
case_C_237:;
GENERALMOVE();
goto L_07AA;
case_C_239:;
OWNTYPE = TAG();
goto L_07AA;
case_C_240:;
FMAP(TAG());
goto L_07AA;
case_C_242:;
TESTRANGE(STACK, VAR(TAG()));
goto L_07AA;
case_C_243:;
SETSIZEORTYPE(1, STACK);
goto L_07AA;
case_C_244:;
SETSIZEORTYPE(2, STACK);
goto L_07AA;
case_C_246:;
COMPAREVALUES();
PRIM(36);
goto L_07AA;
case_C_247:;
APPLYINTPT(STACK);
goto L_07AA;
case_C_250:;
STACKDATASIZE();
goto L_07AA;
case_C_251:;
NN = 0;
ASSEMBLE(&ALTV, -2, *VARS, *LOCAL, -1, &NN);
ALTALIGN = ALTALIGN & FALIGN;
goto L_07AA;
case_C_253:;
if (MAXFRAME <= FRAME) goto L_07B7;
FRAME = MAXFRAME;
L_07B7:;
FALIGN = ALTALIGN;
goto L_07AB;
L_07AA:;
goto L_07A9;
L_07AB:;
*GLOBALATTRIBUTES = *GLOBALATTRIBUTES | ATTRIBUTES & 512;
if (AMODE & 8 != 0) goto L_07B8;
if (FRAMEUSE[*LOCAL - 128] == MYMARK) goto L_07B9;
ATTRIBUTES = ATTRIBUTES | 2;
L_07B9:;
if (DEBUG == 0) goto L_07BA;
DIR2(36, CURRENTLINE);
L_07BA:;
DIR1(32);
DUMPENCODED((FRAME & -4) - AFRAME);
DUMPENCODED(CODEBASE);
DUMPENCODED(PARAMETERFRAME);
DUMPENCODED(PARAMETERREGS);
DUMPENCODED(DISPLAYVECTOR[*LOCAL - 128]);
DUMPENCODED(LOCALDISPLAY);
DUMPENCODED(ARRAYBASE);
DUMPENCODED(ATTRIBUTES);
DUMPENCODED(ENTRYMASK);
DUMPENCODED(EVENTBITS & 65535);
DUMPENCODED(EVENTLABEL);
DUMPENCODED(EVENTBODY);
FORGETEVERYTHING();
*AVAR->P = *AVAR->P | OPEN;
L_07B8:;
TERMINATEBLOCK();
if (*LOCAL == 145) goto L_07BB;
DISPLAYVECTOR[*LOCAL + 1 - 128] = 0;
L_07BB:;
if (DANGERLEVEL != *LOCAL) goto L_07BC;
DANGERLEVEL = 32767;
L_07BC:;
PENDINGKNOWNREGISTER = 0;
PENDINGAUTO = 0;
LASTWORK = WORKBASE;
return;
case_C_default:;
FAIL(_imp_join((_imp_string)(_imp_str_literal("Code ")), (_imp_string)(_imp_ITOS(CODE, 0))));
} /* ASSEMBLE */
ACTIVITY[13] = -1;
ACTIVITY[11] = -1;
ACTIVITY[10] = -1;
COMPILINGPRIM = INTERFACE->PRIM;
UNASSIGNED = INTERFACE->OPTIONS & 32;
DEBUG = INTERFACE->OPTIONS & 8388608;
if (UNASSIGNED == 0) goto L_07BD;
OWNBASE = 16;
L_07BD:;
J = -1; /*%for J = 0, 1, 31 %cycle*/
L_07BE:
if (J == 31) goto L_07BF;
J += 1;
PVAR[J].P = NIL;
goto L_07BE;
L_07BF:;
J = -1; /*%for J = 0, 1, (unsigned int)8191 >> 8 %cycle*/
L_07C1:
if (J == (unsigned int)8191 >> 8) goto L_07C2;
J += 1;
ILABELS[J].LABEL = NIL;
goto L_07C1;
L_07C2:;
_imp_SELECTINPUT(1);
_imp_READSYMBOL(&PENDING);
*VAR(0) = 0;
DEFAULTVALUE = 0;
VALUE = DEFAULTVALUE;
void INITIALISE(struct STACKFM * V, int BASE, int FORM) {
V = 0;
V = *BASE;
V = 1;
V = *FORM;
V = 128;
} /* INITIALISE */
INITIALISE(&UAPAT, 10, 1);
INITIALISE(&ZERO, 0, 0);
INITIALISE(&ONE, 0, 0);
ONE.DISP = 1;
INITIALISE(&SPV, 13, 0);
{ /*%begin*/
int J;
struct STACKFM *R;
J = 0; /*%for J = 1, 1, 26 %cycle*/
L_07C3:
if (J == 26) goto L_07C4;
J += 1;
R = ®V[J];
*R = 0;
R->BASE = J;
R->TYPE = 1;
R->FORM = 0;
R->FORMAT = 4;
if (J < 18) goto L_07C5;
R->TYPE = 7;
R->FORMAT = 4 * 2;
L_07C5:;
goto L_07C3;
L_07C4:;
}
KNOWING = NIL;
KASL = NIL;
_imp_SELECTOUTPUT(2);
PARMS = 2000;
CONSTANTBASE = 0;
FREELABEL = 0;
SECTION = 0;
ASSEMBLE(VAR(0), -16, 0, 128, 0, &J);
DUMPENCODED(ENTRYPOINT);
DUMPENCODED(CONTROL);
DUMPENCODED(MINSB);
INTERFACE->REFCOUNT = REFS;
INTERFACE->DEFCOUNT = FREELABEL;
INTERFACE->BLOCKCOUNT = BLOCKS;
INTERFACE->EXTERNALCOUNT = EXTERNALNO;
INTERFACE->GLOBALSIZE = OWNBASE;
INTERFACE->GLOBALARRAYSIZE = OWNARRAYBASE;
INTERFACE->CONSTANTSIZE = CONSTANTBASE;
{ /*%begin*/
void MONITOR(_imp_string255 TEXT) {
_imp_SELECTOUTPUT(0);
_imp_PRINTSTRING(*TEXT);
_imp_NEWLINE();
} /* MONITOR */
struct VVFM *V;
if (DIAG & 64 == 0) goto L_07C6;
MONITOR(_imp_str_literal("Dispose Vars"));
L_07C6:;
L_07C7:;
if (VARLIST == NIL) goto L_07C8;
V = VARLIST;
VARLIST = VARLIST->LINK;
_imp_DISPOSE(V);
goto L_07C7;
L_07C8:;
struct KNOWFM *K;
if (DIAG & 64 == 0) goto L_07C9;
MONITOR(_imp_str_literal("Dispose Kasl"));
L_07C9:;
L_07CA:;
if (KASL == NIL) goto L_07CB;
K = KASL;
KASL = KASL->LINK;
_imp_DISPOSE(K);
goto L_07CA;
L_07CB:;
struct ILABELFM *I;
if (DIAG & 64 == 0) goto L_07CC;
MONITOR(_imp_str_literal("Dispose Labels"));
L_07CC:;
L_07CD:;
if (ILABELLIST == NIL) goto L_07CE;
I = ILABELLIST;
ILABELLIST = I->LINK;
_imp_DISPOSE(I);
goto L_07CD;
L_07CE:;
struct WORKVFM *W1;
struct WORKVFM *W2;
W2 = WORKLIST.LINK;
if (DIAG & 64 == 0) goto L_07CF;
MONITOR(_imp_str_literal("Dispose Work"));
L_07CF:;
L_07D0:;
if (W2 == NIL) goto L_07D1;
W1 = W2;
W2 = W2->LINK;
_imp_DISPOSE(W1);
goto L_07D0;
L_07D1:;
if (DIAG & 64 == 0) goto L_07D2;
MONITOR(_imp_str_literal("Disposed"));
L_07D2:;
}
return;
}
/* %endoffile */