	.psect	.prog.
wheur1:
	jsr	r0,__csav
	sub	$12,sp
	mov	amp,r0
	tst	-4(r0)
	beq	.2
	mov	amp,r0
	mov	-6(r0),-10(r5)
	mov	-10(r5),r0
	asl	r0
	add	$board,r0
	mov	(r0),-12(r5)
	mov	-10(r5),r0
	asl	r0
	add	$board,r0
	clr	(r0)
.2:
	mov	lmp,-2(r5)
	jsr	pc,wgen
	mov	lmp,-4(r5)
	mov	-2(r5),lmp
	jsr	pc,bgen
	mov	lmp,-6(r5)
	mov	-2(r5),lmp
	mov	$2,-(sp)
	mov	-4(r5),-(sp)
	sub	-6(r5),(sp)
	.globl	div_i
	jsr	pc,div_i
	cmp	(sp)+,(sp)+
	mov	r0,-10(r5)
	asl	-10(r5)
	mov	amp,r0
	tst	-4(r0)
	beq	.3
	mov	amp,r0
	mov	-6(r0),r0
	asl	r0
	add	$board,r0
	mov	-12(r5),(r0)
.3:
	mov	-10(r5),r0
.1:
	jmp	__cret
wheur2:
	jsr	r0,__csav
	tst	-(sp)
	clr	-2(r5)
	cmp	game,$2
	ble	.5
	mov	-2(r5),r0
	br	.4
.5:
	cmp	board+162,$177776
	beq	.77777
	mov	$1,-(sp)
	br	.77776
.77777:
	clr	-(sp)
.77776:
	cmp	board+174,$177776
	beq	.77775
	mov	$1,r0
	br	.77774
.77775:
	clr	r0
.77774:
	add	(sp)+,r0
	mov	r0,-(sp)
	asl	r0
	asl	r0
	asl	r0
	add	(sp)+,r0
	add	r0,-2(r5)
	cmp	board+164,$177775
	beq	.77773
	mov	$1,-(sp)
	br	.77772
.77773:
	clr	-(sp)
.77772:
	cmp	board+172,$177775
	beq	.77771
	mov	$1,r0
	br	.77770
.77771:
	clr	r0
.77770:
	add	(sp)+,r0
	asl	r0
	asl	r0
	asl	r0
	add	r0,-2(r5)
	cmp	board+146,$177777
	bne	.6
	tst	board+126
	beq	.6
	sub	$12,-2(r5)
.6:
	cmp	board+150,$177777
	bne	.7
	tst	board+130
	beq	.7
	sub	$12,-2(r5)
.7:
	mov	-2(r5),r0
.4:
	jmp	__cret
wheur3:
	jsr	r0,__csav
	tst	-(sp)
	clr	-2(r5)
	bit	flag,$2
	beq	.11
	cmp	board+140,$177777
	bne	.11
	cmp	board+142,$177777
	bne	.11
	cmp	board+144,$177777
	bne	.11
	add	$24,-2(r5)
.11:
	bit	flag,$1
	beq	.12
	cmp	board+152,$177777
	bne	.12
	cmp	board+154,$177777
	bne	.12
	cmp	board+156,$177777
	bne	.12
	add	$24,-2(r5)
.12:
	cmp	-2(r5),$50
	bne	.13
	mov	$26,-2(r5)
.13:
	cmp	wkpos,$72
	bne	.14
	cmp	board+144,$177777
	bne	.15
	cmp	board+140,$177777
	beq	.77767
	cmp	board+120,$177777
	bne	.15
.77767:
	cmp	board+142,$177777
	beq	.77766
	cmp	board+122,$177777
	bne	.15
.77766:
	add	$50,-2(r5)
.15:
.14:
	cmp	wkpos,$76
	bne	.16
	cmp	board+152,$177777
	bne	.17
	cmp	board+154,$177777
	beq	.77765
	cmp	board+134,$177777
	bne	.17
.77765:
	cmp	board+156,$177777
	beq	.77764
	cmp	board+136,$177777
	bne	.17
.77764:
	add	$50,-2(r5)
.17:
.16:
	mov	-2(r5),r0
.10:
	jmp	__cret
wheur4:
	jsr	r0,__csav
	sub	$10,sp
	mov	amp,r0
	cmp	-2(r0),$1
	beq	.21
	clr	r0
	br	.20
.21:
	mov	amp,r0
	mov	-6(r0),-6(r5)
	mov	-6(r5),r0
	asl	r0
	add	$board,r0
	cmp	(r0),$177777
	bne	.22
	clr	r0
	br	.20
.22:
	mov	-6(r5),(sp)
	jsr	pc,xheur
	tst	r0
	beq	.23
	clr	r0
	br	.20
.23:
	mov	lmp,-2(r5)
	mov	-2(r5),-4(r5)
	jsr	pc,bagen
	clr	-10(r5)
.25:
	cmp	-4(r5),lmp
	beq	.24
	add	$2,-4(r5)
	mov	-4(r5),r0
	add	$2,-4(r5)
	mov	(r0),r0
	mov	r0,(sp)
	jsr	pc,bmove
	mov	-6(r5),(sp)
	jsr	pc,xheur
	mov	r0,-10(r5)
	jsr	pc,bremove
	tst	-10(r5)
	bne	.24
.26:
	br	.25
.24:
	mov	-2(r5),lmp
	mov	-10(r5),r0
.20:
	jmp	__cret
wheur5:
	jsr	r0,__csav
	sub	$16,sp
	mov	amp,r0
	tst	-4(r0)
	beq	.30
	mov	amp,r0
	mov	-6(r0),-2(r5)
	mov	-2(r5),r0
	asl	r0
	add	$board,r0
	mov	(r0),-16(r5)
	mov	-2(r5),r0
	asl	r0
	add	$board,r0
	clr	(r0)
.30:
	mov	$100,-2(r5)
.32:
	mov	-2(r5),r0
	dec	-2(r5)
	tst	r0
	beq	.31
	mov	-2(r5),r0
	asl	r0
	add	$control,r0
	clr	(r0)
	br	.32
.31:
	cmp	game,$2
	bge	.33
	mov	$100,-2(r5)
.35:
	mov	-2(r5),r0
	dec	-2(r5)
	tst	r0
	beq	.34
	mov	-2(r5),r4
	asl	r4
	add	$center,r4
	mov	-2(r5),r0
	asl	r0
	add	$control,r0
	add	(r4),(r0)
	br	.35
.34:
.33:
	tst	mantom
	beq	.36
	bit	flag,$3
	bne	.37
	mov	wkpos,(sp)
	jsr	pc,srnd
.37:
	br	.40
.36:
	bit	flag,$30
	bne	.41
	mov	bkpos,(sp)
	jsr	pc,srnd
.41:
.40:
	mov	$100,-2(r5)
	clr	-10(r5)
.43:
	mov	-2(r5),r0
	dec	-2(r5)
	tst	r0
	beq	.42
	mov	$144,-(sp)
	mov	-2(r5),r0
	asl	r0
	add	$control,r0
	mov	(r0),r0
	mov	r0,-(sp)
	.globl	mul_i
	jsr	pc,mul_i
	cmp	(sp)+,(sp)+
	mov	r0,-12(r5)
	mov	-2(r5),(sp)
	jsr	pc,attack
	clr	-4(r5)
.45:
	mov	-4(r5),r0
	inc	-4(r5)
	asl	r0
	add	$attacv,r0
	mov	(r0),-6(r5)
	beq	.44
	mov	-6(r5),r0
	asl	r0
	add	$pval+14,r0
	mov	(r0),-14(r5)
	tst	-14(r5)
	bge	.46
	mov	-14(r5),-(sp)
	neg	(sp)
	mov	-12(r5),-(sp)
	.globl	div_i
	jsr	pc,div_i
	cmp	(sp)+,(sp)+
	sub	r0,-10(r5)
	br	.47
.46:
	mov	-14(r5),-(sp)
	mov	-12(r5),-(sp)
	.globl	div_i
	jsr	pc,div_i
	cmp	(sp)+,(sp)+
	add	r0,-10(r5)
.47:
	br	.45
.44:
	br	.43
.42:
	mov	amp,r0
	tst	-4(r0)
	beq	.50
	mov	amp,r0
	mov	-6(r0),r0
	asl	r0
	add	$board,r0
	mov	-16(r5),(r0)
.50:
	mov	-10(r5),r0
	neg	r0
.27:
	jmp	__cret
wheur6:
	jsr	r0,__csav
	tst	-(sp)
	clr	-2(r5)
	mov	amp,r0
	add	$2,amp
	mov	$177777,(r0)
	mov	bkpos,(sp)
	jsr	pc,wattack
	tst	r0
	beq	.52
	clr	(sp)
	mov	$2,-(sp)
	jsr	pc,mate
	tst	(sp)+
	tst	r0
	beq	.53
	add	$17,-2(r5)
.53:
.52:
	sub	$2,amp
	mov	-2(r5),r0
.51:
	jmp	__cret
	.globl	mate
	.globl	wattack
	.globl	wheur6
	.globl	attack
	.globl	srnd
	.globl	wheur5
	.globl	bremove
	.globl	bmove
	.globl	bagen
	.globl	xheur
	.globl	wheur4
	.globl	wheur3
	.globl	wheur2
	.globl	bgen
	.globl	wgen
	.globl	wheur1
	.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
