	.psect	.prog.
statl:
	jsr	r0,__csav
	sub	$6,sp
	mov	lmp,r0
	mov	r0,-4(r5)
	mov	r0,-2(r5)
	jsr	pc,stage
	tst	mantom
	beq	.77777
	jsr	pc,bagen
	br	.77776
.77777:
	jsr	pc,wagen
.77776:
	mov	-2(r5),r0
	add	$2,r0
	cmp	r0,lmp
	bne	.2
	mov	-2(r5),r0
	br	.1
.2:
.4:
	cmp	-4(r5),lmp
	beq	.3
	mov	-4(r5),r0
	add	$2,-4(r5)
	mov	r0,-6(r5)
	tst	mantom
	beq	.5
	mov	-4(r5),r0
	add	$2,-4(r5)
	mov	(r0),r0
	mov	r0,(sp)
	jsr	pc,bmove
	clr	(sp)
	jsr	pc,bstatic
	mov	r0,*-6(r5)
	jsr	pc,bremove
	br	.6
.5:
	mov	-4(r5),r0
	add	$2,-4(r5)
	mov	(r0),r0
	mov	r0,(sp)
	jsr	pc,wmove
	clr	(sp)
	jsr	pc,wstatic
	mov	r0,*-6(r5)
	jsr	pc,wremove
.6:
	br	.4
.3:
	mov	lmp,(sp)
	mov	-2(r5),-(sp)
	jsr	pc,qsort
	tst	(sp)+
	mov	-2(r5),r0
.1:
	jmp	__cret
wstatic:
	jsr	r0,__csav
	sub	$10,sp
	clr	r0
	mov	r0,-2(r5)
	mov	r0,-6(r5)
.11:
	mov	-6(r5),r0
	inc	-6(r5)
	asl	r0
	add	$wheur,r0
	mov	(r0),-10(r5)
	beq	.10
	jsr	pc,*-10(r5)
	mov	r0,-4(r5)
	tst	12(r5)
	beq	.12
	.psect	.strn.
.13:
	.byte	45
	.byte	64
	.byte	144
	.byte	40
	.byte	0
	.psect	.prog.
	mov	-4(r5),(sp)
	mov	$.13,-(sp)
	jsr	pc,printf
	tst	(sp)+
.12:
	add	-4(r5),-2(r5)
	br	.11
.10:
	tst	12(r5)
	beq	.14
	.psect	.strn.
.15:
	.byte	75
	.byte	45
	.byte	64
	.byte	144
	.byte	40
	.byte	0
	.psect	.prog.
	mov	-2(r5),(sp)
	mov	$.15,-(sp)
	jsr	pc,printf
	tst	(sp)+
.14:
	mov	-2(r5),r0
	neg	r0
.7:
	jmp	__cret
bstatic:
	jsr	r0,__csav
	sub	$10,sp
	clr	r0
	mov	r0,-2(r5)
	mov	r0,-6(r5)
.20:
	mov	-6(r5),r0
	inc	-6(r5)
	asl	r0
	add	$bheur,r0
	mov	(r0),-10(r5)
	beq	.17
	jsr	pc,*-10(r5)
	mov	r0,-4(r5)
	tst	12(r5)
	beq	.21
	.psect	.strn.
.22:
	.byte	45
	.byte	64
	.byte	144
	.byte	40
	.byte	0
	.psect	.prog.
	mov	-4(r5),(sp)
	mov	$.22,-(sp)
	jsr	pc,printf
	tst	(sp)+
.21:
	add	-4(r5),-2(r5)
	br	.20
.17:
	tst	12(r5)
	beq	.23
	.psect	.strn.
.24:
	.byte	75
	.byte	45
	.byte	64
	.byte	144
	.byte	40
	.byte	0
	.psect	.prog.
	mov	-2(r5),(sp)
	mov	$.24,-(sp)
	jsr	pc,printf
	tst	(sp)+
.23:
	mov	-2(r5),r0
	neg	r0
.16:
	jmp	__cret
xheur:
	jsr	r0,__csav
	sub	$12,sp
	mov	12(r5),r0
	asl	r0
	add	$board,r0
	mov	(r0),-12(r5)
	mov	lmp,-2(r5)
	mov	-2(r5),-4(r5)
	tst	mantom
	beq	.77775
	jsr	pc,wgen
	br	.77774
.77775:
	jsr	pc,bgen
.77774:
.27:
	cmp	-4(r5),lmp
	beq	.26
	add	$2,-4(r5)
	mov	-4(r5),r0
	add	$2,-4(r5)
	mov	(r0),r0
	bic	$177400,r0
	mov	r0,-10(r5)
	cmp	-10(r5),12(r5)
	bne	.30
	mov	$10,-(sp)
	mov	-4(r5),r0
	mov	-2(r0),-(sp)
	.globl	asr_i
	jsr	pc,asr_i
	cmp	(sp)+,(sp)+
	mov	r0,-6(r5)
	mov	-12(r5),(sp)
	jsr	pc,abs
	mov	r0,-(sp)
	mov	-6(r5),r0
	asl	r0
	add	$board,r0
	mov	(r0),r0
	mov	r0,-(sp)
	jsr	pc,abs
	tst	(sp)+
	cmp	r0,(sp)+
	bge	.31
	mov	-2(r5),lmp
	mov	$74,-(sp)
	mov	-12(r5),r0
	asl	r0
	add	$pval+14,r0
	mov	(r0),r0
	mov	r0,-(sp)
	.globl	div_i
	jsr	pc,div_i
	cmp	(sp)+,(sp)+
	br	.25
.31:
.30:
	br	.27
.26:
	mov	-2(r5),lmp
	clr	r0
.25:
	jmp	__cret
srnd:
	jsr	r0,__csav
	mov	$177767,(sp)
	mov	$4040,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$177771,(sp)
	mov	$4004,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$7,(sp)
	mov	$440,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$11,(sp)
	mov	$404,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$177770,(sp)
	mov	$4000,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$177777,(sp)
	mov	$40,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$1,(sp)
	mov	$4,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	mov	$10,(sp)
	mov	$400,-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
	clr	(sp)
	clr	-(sp)
	mov	12(r5),-(sp)
	jsr	pc,srnd1
	cmp	(sp)+,(sp)+
.32:
	jmp	__cret
srnd1:
	jsr	r0,__csav
	mov	12(r5),r0
	asl	r0
	add	$dir,r0
	bit	(r0),14(r5)
	bne	.34
	mov	12(r5),r0
	add	16(r5),r0
	asl	r0
	add	$control,r0
	add	$12,(r0)
.34:
.33:
	jmp	__cret
	.globl	srnd1
	.globl	srnd
	.globl	abs
	.globl	bgen
	.globl	wgen
	.globl	xheur
	.globl	printf
	.globl	qsort
	.globl	wremove
	.globl	wstatic
	.globl	wmove
	.globl	bremove
	.globl	bstatic
	.globl	bmove
	.globl	wagen
	.globl	bagen
	.globl	stage
	.globl	statl
	.globl	sbuf
	.globl	ambuf
	.globl	lmbuf
	.globl	board
	.globl	dir
	.globl	ipval
	.globl	pval
	.globl	edge
	.globl	column
	.globl	wkpos
	.globl	bkpos
	.globl	eppos
	.globl	flag
	.globl	depth
	.globl	mfmt
	.globl	ivalue
	.globl	value
	.globl	ply
	.globl	mantom
	.globl	lastmov
	.globl	sbufp
	.globl	amp
	.globl	lmp
	.globl	abmove
	.globl	game
	.globl	gval
	.globl	moveno
	.globl	intrp
	.globl	matflg
	.globl	manflg
	.globl	bookp
	.globl	bookf
	.globl	mdepth
	.globl	qdepth
	.globl	testf
	.globl	clktim
	.globl	control
	.globl	bheur
	.globl	wheur
	.globl	center
	.globl	attacv
	.globl	__csav
	.globl	__cret
	.psect	.prog.
	.even
	.psect	.data.
	.even
	.psect	.mwcn.
	.even
	.psect	.prof.
	.even
