
int cells[TWICE_NCELLS];
int n_cells;
int atomlist;
int curr_cell;
int cell_max;

int FF; // TODO workaround for bug shifting a constant

int ch;
int ch2;
int token_type;

int gc_car;
int gc_cdr;

// token IO variables

int token_list;
int token_new;
int token_tail;

// virtual machine variables

int globals;
int env;
int code;
int instructions;
int instruction;
int opcode;
int operands;
int binding;
int closure;
int returnval;
int arglist;
int stack;
int stacksize;
int stackidx;
int stack_arg1;
int stack_arg2;
int stack_arg3;
int stack_arg4;

// assembler variables

int label_instructions;

int call_cc_code;

// argument flags

int debug;
int trace;
int trace_globals;
int display_histogram;
int case_sensitive;
int histogram[150];

// the following point directly to the named
// primitive so they can be referenced directly

int haltatom;
int caratom;
int cdratom;
int consatom;
int listpatom;
int symbolpatom;
int eqatom;
int quoteatom;
int nullatom;
int notatom;
int constatom;
int lvaratom;
int lsetatom;
int gvaratom;
int gsetatom;
int argsatom;
int bratom;
int btratom;
int bflatom;
int saveatom;
int procatom;
int calljatom;
int returnatom;
int popatom;
int caaratom;
int cdaratom;
int cadratom;
int cddratom;
int listrefatom;
int listtailatom;
int memqatom;
int memberatom;
int assqatom;
int vecpatom;
int makevecatom;
int veclengthatom;
int vecrefatom;
int vecsetatom;
int readcharatom;
int eofobjectatom;
int eofatom;
int unspecifiedatom;
int displayatom;
int writeatom;
int newlineatom;
int divatom;
int addatom;
int subatom;
int multatom;
int quotientatom;
int remainderatom;
int moduloatom;
int lengthatom;
int numberpatom;
int stringpatom;
int makestratom;
int strrefatom;
int strsetatom;
int writecharatom;
int streqatom;
int strlenatom;
int strtosymatom;
int strtonumberatom;
int symtostratom;
int numbertostratom;
int aeqatom;
int lesspatom;
int leqatom;
int greaterpatom;
int geqatom;
int equalpatom;
int rplacaatom;
int rplacdatom;
int traceatom;
int eqvatom;
int charpatom;
int chareqatom;
int charalphaatom;
int charnumatom;
int chartointatom;
int inttocharatom;
int charupatom;
int chardownatom;
int pairatom;
int nameatom;
int argsdatom;
int callnjatom;
int arglatom;
int procedureatom;
int procedurepatom;
int exitatom;
int boolpatom;
int ccatom;
int setccatom;
int memvatom;
int assvatom;
int integerpatom;
int makevectorwithfillatom;
int makestringwithfillatom;
int bitwiseandatom;
int bitwiseoratom;
int bitwisenotatom;
int bitwisexoratom;
int arithmeticshiftatom;
int strltatom;
int strgtatom;
int strleatom;
int strgeatom;
int strciltatom;
int strcigtatom;
int strcileatom;
int strcigeatom;
int strcieqatom;

// data stream structures

int data_stream[2000];
int is_data_stream;
int data_stream_idx;
