.globl	fnctex
.globl	bsnext
.globl	mcexit
.globl	entx2
.globl	inv1
.globl	mcabrt
/start of logic -- main scanning routine
mbegin:	mov	pvarpt,r1
	mov	r1,ffpt
	inc	r1
	mov	r1,spt
	inc	ffpt
	bic	$1,ffpt
	mov	pvnum,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	ffpt,inffpt
	mov	pvnum,r1
	asl	r1
	mov	r1,temp
	mov	pvarpt,r1
	sub	temp,r1
	mov	r1,stffpt
bsnext:	jsr	pc,smsksw
	jsr	pc,sbstpl
	clr	bespt
bsloop:	jsr	pc,gtatom
	cmpb	*idpt,$stopcd
	jeq	mnstop
	tst	nestlv
	jeq	bsname
/search delimiter chain
	clr	htabpt
	mov	delpt,r1
	jsr	pc,loschn
	jmp	macerr
chn1:	mov	chanpt,r1
	jsr	pc,cmpare
	jmp	bsc1
	jsr	pc,tebest
bsc1:	jsr	pc,loechn
	jmp	chn1
	cmp	masksw,$5.
	jeq	enexcl
/search chain of names
bsname:	jsr	pc,mdfind
bsn1:
	mov	*htabpt,chanpt
bshash:
	tst	chanpt
	jeq	bsswit
	mov	chanpt,r1
	add	$2.,r1
	jsr	pc,cmpare
	jmp	bsh1
	jsr	pc,tebest
bsh1:
	mov	*chanpt,chanpt
	jbr	bshash
bsswit:	mov	$0f,-(sp)
	mov	$bestpl,-(sp)
	jmp	_goswitch
	.data
0:
	mnout
	callo
	warno
	callo
	skippo
	dello
	bsloop
	wrnerr
	sastak
	stopo
/add atom to output text
	.text
mnout:	mov	idpt,r1
	add	idlen,r1
	mov	r1,tempt
outlp:
	cmpb	*idpt,$slrep
	jeq	notou
	movb	*idpt,r1
	jsr	pc,mdouch
notou:	mov	idpt,r1
	inc	r1
	mov	r1,idpt
	cmp	r1,tempt
	jne	outlp
	jbr	bsloop
/place atom on forwards stack
sastak:
	mov	ffpt,dstpt
	mov	idlen,r1
	jsr	pc,bumpff
	mov	idpt,srcpt
	mov	idlen,r1
	jsr	pc,_fmove
	add	idlen,arglen
	jbr	bsloop
/action at end of source text
mnstop:	jsr	pc,ermtst
	jbr	lohalt
/action at skip name
skippo:	jsr	pc,encall
	mov	*binfpt,r1
	bic	$177777-4.,r1
	mov	r1,masksw
	tst	skiplv
	jne	skdel
	mov	nestlv,skiplv
	mov	*binfpt,r1
	bic	$177777-1.,r1
	mov	r1,copdsw
	mov	*binfpt,r1
	bic	$177777-2.,r1
	mov	r1,coptsw
/skip delimiter
skdel:	jsr	pc,sbstpl
	tst	coptsw
	jne	gl1
	mov	$6.,bestpl
gl1:	mov	bespt,r1
	sub	idpt,r1
	inc	r1
	mov	r1,idlen
	jsr	pc,ressp
	jmp	skd1
/end of skip
	jsr	pc,decalv
	jmp	enskip
	cmp	skiplv,nestlv
	jgt	enskip
/end of nested skip
	mov	$4.,masksw
	jbr	bst1
/end of outermost skip
enskip:	clr	skiplv
	tst	copdsw
	jeq	bsnext
bstrex:	jsr	pc,smsksw
	jsr	pc,sbstpl
	clr	bespt
bst1:
	tst	idlen
	jeq	bsloop
	jbr	bsswit
/non-closing skip delimiter
skd1:
	cmp	skiplv,nestlv
	jne	bsswit
	tst	copdsw
	jeq	bsloop
	tst	skval
	jne	bsloop
	tst	oplev
	jeq	mnout
	jbr	sastak
/action at warning marker
warno:	jsr	pc,ressp
	jmp	wrn1
wrn1:
	mov	spt,wnspt
	mov	idpt,wnidpt
	clr	idlen
	jsr	pc,gsatom
	jmp	wrnerr
	mov	$7.,bestpl
	mov	$1.,masksw
	jbr	bsname
wrnerr:	mov	svarpt,r1
	sub	$6.,r1
	tst	(r1)
	jne	gl2
	jsr	pc,ersnw
gl2:
	mov	wnidpt,idpt
	mov	wnspt,r1
	mov	r1,spt
	sub	idpt,r1
	inc	r1
	mov	r1,idlen
	jbr	bstrex
/action at stop marker
stopo:	mov	idpt,r1
	dec	r1
	mov	r1,spt
	cmpb	*idpt,$nlrep
	jne	gl3
	dec	linect
gl3:	jsr	pc,ermtst
	jbr	bsnext
/action at macro or insert name
callo:	jsr	pc,smsksw
	mov	binfpt,tempt
	cmp	*binfpt,$4.
	jne	el1
	clr	masksw
	add	$2.,tempt
el1:
	tst	nestlv
	jne	mn2
	mov	tempt,r1
	add	$2.,r1
	mov	r1,cinfpt
	mov	*tempt,r1
	mov	r1,caltyp
	cmp	r1,$1.
	jne	mn1
	cmp	ohsw,$1.
	jeq	mn1
	mov	hashpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	jsr	pc,stkhsh
mn1:	mov	$36.,r1
	jsr	pc,declf
	mov	lfpt,nargpt
	clr	argct
	mov	idpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	bespt,r1
	inc	r1
	mov	r1,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	clr	r1
	sub	skval,r1
	dec	r1
	mov	r1,skval
mn2:	jsr	pc,encall
	jbr	mdel1
/action at secondary delimiter
dello:
	tst	skiplv
	jeq	el2
	mov	binfpt,r1
	add	bindic,r1
	mov	r1,delpt
	jbr	skdel
el2:
	cmp	nestlv,$1.
	jne	mdel2
	inc	argct
	mov	idpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	bespt,r1
	inc	r1
	mov	r1,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
mdel2:	mov	binfpt,r1
	add	bindic,r1
	mov	r1,delpt
mdel1:
	mov	$6.,bestpl
	jsr	pc,ressp
	jmp	bsloop
/perform call
	jsr	pc,decalv
	jmp	mn3
	jbr	bsnext
mn3:	clr	r1
	sub	skval,r1
	dec	r1
	mov	r1,skval
	clr	-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	$argct,srcpt
	mov	nargpt,dstpt
	mov	$36.,r1
	jsr	pc,_fmove
/test for insert
	cmp	caltyp,$2.
	jge	opins
	tst	skval
	jeq	el3
/still searching for label
	mov	nargpt,r1
	add	$36.,r1
	mov	r1,lfpt
	jbr	bsnext
el3:	inc	invoct
/test for operation macro
	tst	caltyp
	jge	opins
/case of call of user macro
	inc	level
	mov	caltyp,r1
	add	cinfpt,r1
	sub	$2.,r1
	mov	r1,stoppt
	mov	*cinfpt,r1
	add	cinfpt,r1
	dec	r1
	mov	r1,spt
	mov	mtchpt,dbugpt
	mov	$1.,dbugsw
	mov	nargpt,r1
	mov	r1,stakpt
	mov	r1,argpt
	jsr	pc,prscan
/set up temporary variables
	mov	lfpt,r1
	sub	$2.,r1
	mov	r1,tvarpt
	mov	cinfpt,r1
	mov	2.(r1),r1
	mov	r1,temp
	mov	r1,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	argct,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	invoct,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	level,r1
	sub	oplev,r1
	mov	r1,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	temp,r1
	asl	r1
	mov	r1,temp
	sub	$6.,r1
	jsr	pc,declf
	jbr	bsnext
/perform operation macro call or insert
opins:	inc	level
	tst	oplev
	jeq	opm1
	mov	$18.,r1
	jsr	pc,declf
	mov	$topspt,srcpt
	mov	lfpt,dstpt
	mov	$18.,r1
	jsr	pc,_fmove
opm1:	inc	oplev
	mov	hashpt,mhshpt
	mov	lfpt,topspt
	mov	caltyp,optyp
	mov	$5.,dbugsw
	mov	$1.,argno
	mov	ffpt,inffpt
	mov	nargpt,r1
	mov	r1,stakpt
	mov	r1,dbugpt
/test for insert
	cmp	caltyp,$2.
	jge	insrt
	mov	*cinfpt,type
/go to code associated with macro called
	mov	$0f,-(sp)
	mov	$type,-(sp)
	jmp	_goswitch
	.data
0:
	mno
	mwn
	mno
	mno
	def
	wrn
	ins
	skip
	mset
	mgo
	alt
	nte
	pvr
	lng
	ssub
	stp
/perform insert
	.text
insrt:
	mov	skval,sqnum
	jsr	pc,stkarg
	jsr	pc,gargch
	jmp	erlia
	cmpb	*spt,$'l
	jeq	insl
	tst	sqnum
	jne	mcexit
	clr	wsw
	cmpb	*spt,$'w
	jne	el4
	mov	$1.,wsw
	jsr	pc,gargch
	jmp	erlia
el4:
	mov	$5.,insw
	cmpb	*spt,$'a
	jeq	insa
	cmpb	*spt,$'b
	jeq	insb
	cmpb	*spt,$'d
	jeq	insd
	cmp	wsw,$1.
	jeq	erlia
/case of macro expression
	dec	spt
	jsr	pc,getexp
inv1:	jsr	pc,mdconv
fnctex:
	jsr	pc,opexit
	jbr	bstrex
/arg etc
insd:
	mov	$6.,insw
	jsr	pc,getexp
	tst	meval
	jne	gl4
	tst	argpt
	jne	insa1
gl4:	jbr	insa2
insb:
	mov	$4.,insw
insa:	jsr	pc,getexp
insa2:
	mov	argpt,varpt
	jsr	pc,er1tst
insa1:
	mov	argpt,dbugpt
	mov	meval,argno
	jsr	pc,prarg
	cmp	wsw,$1.
	jne	el5
	mov	spt,r1
	inc	r1
	mov	r1,idpt
	mov	stoppt,r1
	sub	idpt,r1
	mov	r1,idlen
	jbr	fnctex
/test for protected insert
el5:
	cmp	optyp,$3.
	jne	gl5
	mov	dbugpt,r1
	mov	20.(r1),hashpt
gl5:	jsr	pc,unopdb
	mov	stakpt,lfpt
	mov	dbugpt,r1
	mov	18.(r1),tvarpt
	mov	dbugpt,r1
	mov	4.(r1),argpt
	jbr	bsnext
/case of label
insl:	jsr	pc,getexp
	tst	meval
	jgt	insl1
	jbr	erlme
insl1:	jsr	pc,opexit
	cmp	meval,skval
	jne	gl6
	clr	skval
/remember label if necessary
gl6:
	tst	level
	jeq	bsnext
	jsr	pc,sklab
	jmp	inlmlt
	mov	linect,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	spt,r1
	sub	stoppt,r1
	mov	r1,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	meval,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	labpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	lfpt,labpt
	jbr	bsnext
inlmlt:	mov	*chanpt,r1
	add	stoppt,r1
	cmp	r1,spt
	jeq	bsnext
	jbr	erlmd
/action at end of piece of text
entext:
	tst	nestlv
	jeq	entx1
	cmp	dbugsw,$4.
	jeq	gl7
	cmp	dbugsw,$2.
	jne	entx1
/end of arg. look ahead for exclusive delimiter
gl7:
	mov	$6.,insw
	jsr	pc,setpts
	mov	idpt,r1
	add	idlen,r1
	mov	r1,stoppt
	mov	idpt,r1
	dec	r1
	mov	r1,spt
	mov	$5.,masksw
	jbr	bsloop
/subsequently returning at
enexcl:
	mov	idpt,stoppt
	cmp	bindic,exclmk
	jeq	dello
entx1:	jsr	pc,ermtst
entx2:
	cmp	dbugsw,$2.
	jeq	saexit
	jsr	pc,unsdb
	jbr	bsnext
/exit from operation macro
mcexit:	jsr	pc,opexit
	jbr	bsnext
/error exit from operation macro
mcabrt:	jsr	pc,opexit
	mov	mtchpt,r1
	jsr	pc,prname
	mov	$0f,-(sp)
	jsr	pc,_message
	.data;
0:	< aborted due to above error\n\n\0>; .even
	.text
	jbr	bsnext
/
				.globl	advnce
advnce:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	inc	spt
	cmp	spt,stoppt
	jne	gl8
	jmp	*9b
gl8:
	cmp	spt,ffpt
	jne	gotit
	tst	nlsw
	jeq	notsl
/update s2
	mov	svarpt,r1
	sub	$4.,r1
	mov	r1,tempt
	inc	*tempt
	cmp	linect,tlinct
	jne	nottl
	mov	*tempt,tlinct
nottl:
	mov	*tempt,linect
	mov	tempt,r1
	tst	2.(r1)
	jeq	notsl
/insert startline
	movb	$slrep,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
notsl:
	mov	ffpt,tempt
	jsr	pc,mdread
	jmp	rdstop
	movb	r1,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
	clr	nlsw
	cmpb	*tempt,$nlrep
	jne	gotit
	inc	nlsw
	jbr	gotit
/end of input
rdstop:
	mov	spt,ffpt
/add preceding newline if necessary
	tst	nlsw
	jne	stpstk
	movb	$nlrep,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
stpstk:
	movb	$stopcd,(ffpt)+
	cmp	ffpt,$_endstack
	jhis	erlso
gotit:	add	$4*1.,9b
	jmp	*9b
/
				.globl	bumpff
bumpff:	mov	r1,parnm
	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	mov	ffpt,r1
	add	parnm,r1
	mov	r1,ffpt
	cmp	r1,lfpt
	jhis	erlso
	jmp	*9b
/
				.globl	chatom
chatom:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	tst	arglen
	jeq	erlia
	jsr	pc,gtatom
	cmp	idlen,arglen
	jne	gl10
	jmp	*9b
gl10:	jbr	erlia
/
				.globl	chekid
chekid:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	jsr	pc,gsatom
	jmp	erlia
	jsr	pc,gsatom
	jmp	ckret
	jbr	erlia
ckret:	jmp	*9b
/
				.globl	ckvaly
ckvaly:	mov	r1,parnm
	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	cmp	r1,endpt
	jhi	ckvex
	mov	type,r1
	asl	r1
	mov	r1,temp
	mov	hashpt,r1
	add	temp,r1
	add	$62.,r1
	mov	r1,temapt
	cmp	parnm,*temapt
	jlo	ckvex
	jmp	*9b
ckvex:	add	$4*1.,9b
	jmp	*9b
/
				.globl	cmpare
cmpare:	mov	r1,parnm
	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	add	$2.,r1
	mov	r1,temapt
	cmp	idlen,*temapt
	jeq	gl12
	jmp	*9b
gl12:	add	$2.,temapt
	mov	temapt,r1
	add	idlen,r1
	mov	r1,infopt
	mov	idpt,tempt
cmp1:
	cmpb	*tempt,*temapt
	jeq	gl13
	jmp	*9b
gl13:	inc	tempt
	inc	temapt
	cmp	temapt,infopt
	jne	cmp1
	mov	temapt,r1
	inc	r1
	bic	$1,r1
	mov	r1,infopt
	add	$4*1.,9b
	jmp	*9b
/
				.globl	corect
corect:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	cmp	ndefpt,*tempt
	jhi	crexit
	cmp	*tempt,inffpt
	jhi	crexit
	add	idlen,*tempt
crexit:	jmp	*9b
/
				.globl	decalv
decalv:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	mov	nestlv,r1
	dec	r1
	mov	r1,nestlv
	tst	r1
	jne	gl14
	jmp	*9b
gl14:	mov	(lfpt)+,delpt
	mov	(lfpt)+,mtchpt
	mov	(lfpt)+,mchlin
	mov	lfpt,cllfpt
	add	$4*1.,9b
	jmp	*9b
/
				.globl	declf
declf:	mov	r1,parnm
	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	sub	parnm,lfpt
	cmp	ffpt,lfpt
	jhis	erlso
	jmp	*9b
/
				.globl	encall
encall:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	tst	nestlv
	jeq	entc1
	mov	mchlin,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	mtchpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
	mov	delpt,-(lfpt)
	cmp	ffpt,$_endstack
	jhis	erlso
entc1:
	mov	lfpt,cllfpt
	mov	binfpt,r1
	add	bindic,r1
	sub	$4.,r1
	mov	r1,delpt
	mov	bfndpt,mtchpt
	mov	linect,mchlin
	inc	nestlv
	jmp	*9b
/
				.globl	er1tst
er1tst:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	tst	varpt
	jeq	erlme
	cmp	meval,*varpt
	jgt	erlme
	tst	meval
	jle	gl15
	jmp	*9b
gl15:	jbr	erlme
/
				.globl	gargch
gargch:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
gar1:	jsr	pc,advnce
	jmp	garex
	cmpb	*spt,$sprep
	jeq	gar1
	add	$4*1.,9b
	jmp	*9b
garex:	jmp	*9b
/
				.globl	getexp
getexp:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	clr	sum
	mov	spt,olidpt
	mov	$1.,varsw
	clr	meval
gxp1:	clr	opsw
gxp3:	clr	negval
gxp6:	jsr	pc,gsatom
	jmp	gmexit
	cmpb	*idpt,$'+
	jeq	gmp
	cmpb	*idpt,$'-
	jeq	gmm
	cmpb	*idpt,$'*
	jeq	gmt
	cmpb	*idpt,$'/
	jeq	gmd
	tst	varsw
	jeq	erlia
	jsr	pc,lonum
	jmp	gxp2
	jbr	gxp5
gxp2:	jsr	pc,gmeadd
gxp5:
	cmp	negval,$1.
	jne	gl16
	clr	r1
	sub	meval,r1
	mov	r1,meval
gl16:	clr	varsw
	tst	opsw
	jeq	gxp3
	jsr	pc,mdop
	jmp	erlovf
	jbr	gxp1
/minus and plus
gmm:	clr	r1
	sub	negval,r1
	inc	r1
	mov	r1,negval
gmp:
	add	meval,sum
gxp4:
	mov	$1.,varsw
	clr	meval
	jbr	gxp6
/divide and times
gmd:
	mov	$2.,opsw
	jbr	gmt1
gmt:
	mov	$1.,opsw
gmt1:
	cmp	varsw,$1.
	jeq	erlia
	mov	meval,op1
	jbr	gxp4
gmexit:
	cmp	varsw,$1.
	jeq	erlia
	add	sum,meval
	mov	olidpt,idpt
	jmp	*9b
/
				.globl	gmeadd
gmeadd:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	mov	idpt,flagpt
gmd3:
	cmpb	*idpt,$'p
	jeq	gmd2
	cmpb	*idpt,$'s
	jeq	gmd2
	cmpb	*idpt,$'t
	jeq	gmd2
	cmp	idpt,flagpt
	jeq	erlia
	jsr	pc,lonum
	jmp	erlia
gmd1:
	dec	idpt
	mov	pvarpt,varpt
	cmpb	*idpt,$'t
	jne	gl17
	mov	tvarpt,varpt
gl17:
	cmpb	*idpt,$'s
	jne	gl18
	mov	svarpt,varpt
gl18:	jsr	pc,er1tst
	mov	meval,r1
	asl	r1
	mov	r1,meval
	mov	varpt,r1
	sub	meval,r1
	mov	r1,tempt
	mov	*tempt,meval
	cmp	idpt,flagpt
	jne	gl19
	jmp	*9b
gl19:	jbr	gmd1
gmd2:
	cmp	idpt,spt
	jeq	erlia
	inc	idpt
	jbr	gmd3
/
				.globl	gsatom
gsatom:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	jsr	pc,gargch
	jmp	gserr
	cmpb	*spt,$stopcd
	jeq	gserr
	dec	spt
	jsr	pc,gtatom
	add	$4*1.,9b
	jmp	*9b
gserr:
	dec	spt
	jmp	*9b
/
				.globl	gtatom
gtatom:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	tst	level
	jne	el6
	tst	skval
	jlt	el6
	mov	ffpt,r1
	sub	spt,r1
	cmp	r1,$1.
	jne	el6
	mov	inffpt,r1
	mov	r1,ffpt
	dec	r1
	mov	r1,spt
el6:	jsr	pc,advnce
	jmp	entext
	cmpb	*spt,$nlrep
	jne	gl20
	inc	linect
gl20:
	mov	spt,idpt
	mov	$1.,idlen
	movb	*spt,r1
	tstb	_tstchr(r1)
	jlt	gt3
gt2:	jsr	pc,advnce
	jmp	endid
	movb	*spt,r1
	tstb	_tstchr(r1)
	jlt	endid
	inc	idlen
	jbr	gt2
/end of identifier
endid:
	dec	spt
gt3:	jmp	*9b
/
				.globl	ludel
ludel:	mov	r1,parnm
	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	jsr	pc,loschn
	jmp	macerr
chn2:	mov	chanpt,r1
	add	$2.,r1
	jsr	pc,cmpare
	jmp	ldcnt
	add	$4*1.,9b
	jmp	*9b
ldcnt:	jsr	pc,loechn
	jmp	chn2
	jmp	*9b
/
				.globl	lulayk
lulayk:	mov	(sp)+,9f;	.bss;9:.=.+2;.text
	mov	$laychn,r1
	jsr	pc,loschn
	jmp	macerr
chn3:	mov	chanpt,r1
	add	$2.,r1
	mov	r1,tempt
	mov	*tempt,r1
	add	tempt,r1
	mov	r1,tidpt
/unless called from prid routine ...
/...compare with list of layout characters
	cmp	exitsw,$2.
	jeq	lkcont
	mov	tempt,r1
	jsr	pc,cmpare
	jmp	lkcont
	mov	tidpt,idpt
	mov	$1.,idlen
lulret:	add	$4*1.,9b
	jmp	*9b
lkcont:
	cmpb	*tidpt,*idpt
	jne	gl21
	jmp	*9b
gl21:
	cmp	$kspacs,chanpt
	jeq	lulret
	jsr	pc,loechn
	jmp	chn3
	jbr	macerr
/input 985,output 830, 20.3% optimalized
