version	U12.1.00
uid	patutils.u1-1788085504-0
record	tdim,2
	0,w
	1,h
impl	error
link	convert.u
global	23
	0,000011,tdim,2
	1,000005,DrawTile,6
	2,000005,DrawRows,6
	3,000005,bits2hex,1
	4,000005,decspec,1
	5,000005,getpatt,1
	6,000005,getpattnote,1
	7,000005,hex2bits,1
	8,000005,hexspec,1
	9,000005,legalpat,1
	10,000005,legaltile,1
	11,000005,pat2xbm,2
	12,000005,tilebits,1
	13,000005,pdensity,1
	14,000005,pix2pat,5
	15,000005,readpatt,1
	16,000005,readpattline,1
	17,000005,rowbits,1
	18,000005,pat2rows,1
	19,000005,rows2pat,1
	20,000005,showbits,1
	21,000005,tiledim,1
	22,000005,xbm2rows,1

proc DrawTile
	local	0,001000,win
	local	1,001000,xoff
	local	2,001000,yoff
	local	3,001000,pattern
	local	4,001000,magnif
	local	5,001000,mode
	local	6,000020,x
	local	7,000020,y
	local	8,000020,row
	local	9,000020,pixel
	local	10,000020,dims
	local	11,000020,arglist
	local	12,000000,type
	local	13,000000,tiledim
	local	14,000000,EraseArea
	local	15,000000,rowbits
	local	16,000000,put
	local	17,000000,DrawPoint
	local	18,000000,FillRectangle
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,1,1
	con	2,010000,1,061
	con	3,002000,1,0
	declend
	filen	patutils.icn
	line	65
	colm	11
	synt	any
	mark	L1
	line	68
	colm	4
	synt	if
	mark0
	pnull
	var	12
	var	0
	line	68
	colm	11
	synt	any
	invoke	1
	str	0
	line	68
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	pnull
	var	2
	pnull
	var	3
	var	5
	line	69
	colm	41
	synt	any
	swap
	line	69
	colm	29
	synt	any
	swap
	line	69
	colm	20
	synt	any
	swap
	line	69
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	70
	colm	14
	synt	any
	keywd	window
	line	70
	colm	11
	synt	any
	asgn
	line	68
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	pnull
	var	4
	line	73
	colm	4
	synt	any
	null
	int	1
	line	73
	colm	12
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	7
	var	2
	line	75
	colm	6
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	line	77
	colm	4
	synt	if
	mark0
	pnull
	var	5
	line	77
	colm	7
	synt	any
	nonnull
	unmark
	mark	L6
	pnull
	var	10
	var	13
	var	3
	line	78
	colm	22
	synt	any
	invoke	1
	line	78
	colm	12
	synt	any
	asgn
	unmark
lab L6
	var	14
	var	1
	var	2
	pnull
	pnull
	var	10
	line	79
	colm	33
	synt	any
	field	w
	var	4
	line	79
	colm	36
	synt	any
	mult
	pnull
	pnull
	var	10
	line	79
	colm	50
	synt	any
	field	h
	var	4
	line	79
	colm	53
	synt	any
	mult
	line	79
	colm	16
	synt	any
	invoke	4
	line	77
	colm	4
	synt	endif
	unmark
lab L5
	mark	L7
	line	82
	colm	4
	synt	every
	mark0
	pnull
	var	8
	var	15
	var	3
	line	82
	colm	24
	synt	any
	invoke	1
	line	82
	colm	14
	synt	any
	asgn
	pop
	mark0
	mark	L10
	pnull
	var	6
	var	1
	line	83
	colm	9
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	pnull
	var	11
	pnull
	line	84
	colm	18
	synt	any
	llist	0
	line	84
	colm	15
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	line	86
	colm	7
	synt	ifelse
	mark	L13
	pnull
	var	4
	int	1
	line	86
	colm	17
	synt	any
	numeq
	unmark
	mark	L15
	line	87
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	87
	colm	25
	synt	any
	bang
	line	87
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L18
	line	88
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	88
	colm	22
	synt	any
	lexeq
	unmark
	var	16
	var	11
	var	6
	var	7
	line	88
	colm	37
	synt	any
	invoke	3
	line	88
	colm	13
	synt	endif
	unmark
lab L18
	pnull
	var	6
	dup
	int	1
	line	89
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L16
	efail
lab L17
	line	87
	colm	10
	synt	endevery
	unmark
lab L15
	pnull
	var	7
	dup
	int	1
	line	91
	colm	12
	synt	any
	plus
	asgn
	goto	L14
lab L13
	mark	L19
	line	94
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	94
	colm	25
	synt	any
	bang
	line	94
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L22
	line	95
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	95
	colm	22
	synt	any
	lexeq
	unmark
	var	16
	var	11
	var	6
	var	7
	var	4
	var	4
	line	95
	colm	37
	synt	any
	invoke	5
	line	95
	colm	13
	synt	endif
	unmark
lab L22
	pnull
	var	6
	dup
	var	4
	line	96
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L20
	efail
lab L21
	line	94
	colm	10
	synt	endevery
	unmark
lab L19
	pnull
	var	7
	dup
	var	4
	line	98
	colm	12
	synt	any
	plus
	asgn
lab L14
	line	86
	colm	7
	synt	endifelse
	unmark
lab L12
	mark	L23
	line	100
	colm	7
	synt	if
	mark0
	pnull
	pnull
	var	11
	line	100
	colm	10
	synt	any
	size
	int	3
	line	100
	colm	19
	synt	any
	numeq
	unmark
	unmark
	unmark
	goto	L8
	line	100
	colm	7
	synt	endif
	unmark
lab L23
	line	101
	colm	7
	synt	ifelse
	mark	L24
	pnull
	var	4
	int	1
	line	101
	colm	17
	synt	any
	numeq
	unmark
	var	17
	var	11
	invoke	-1
	goto	L25
lab L24
	var	18
	var	11
	invoke	-1
lab L25
	line	101
	colm	7
	synt	endifelse
	unmark
lab L8
	efail
lab L9
	line	82
	colm	4
	synt	endevery
	unmark
lab L7
	mark	L26
	mark	L27
	pnull
	line	104
	colm	4
	synt	any
	pret
lab L27
	synt	any
	pfail
	unmark
lab L26
	pnull
	line	106
	colm	1
	synt	any
	pfail
	end
proc DrawRows
	local	0,001000,win
	local	1,001000,xoff
	local	2,001000,yoff
	local	3,001000,rows
	local	4,001000,magnif
	local	5,001000,mode
	local	6,000020,x
	local	7,000020,y
	local	8,000020,row
	local	9,000020,pixel
	local	10,000020,arglist
	local	11,000000,type
	local	12,000000,EraseArea
	local	13,000000,put
	local	14,000000,DrawPoint
	local	15,000000,FillRectangle
	con	0,010000,6,167,151,156,144,157,167
	con	1,002000,1,1
	con	2,010000,1,061
	con	3,002000,1,0
	declend
	line	111
	colm	11
	synt	any
	mark	L1
	line	114
	colm	4
	synt	if
	mark0
	pnull
	var	11
	var	0
	line	114
	colm	11
	synt	any
	invoke	1
	str	0
	line	114
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	pnull
	var	2
	pnull
	var	3
	pnull
	var	4
	var	5
	line	115
	colm	49
	synt	any
	swap
	line	115
	colm	38
	synt	any
	swap
	line	115
	colm	29
	synt	any
	swap
	line	115
	colm	20
	synt	any
	swap
	line	115
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	116
	colm	14
	synt	any
	keywd	window
	line	116
	colm	11
	synt	any
	asgn
	line	114
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	pnull
	var	4
	line	119
	colm	4
	synt	any
	null
	int	1
	line	119
	colm	12
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	7
	var	2
	line	121
	colm	6
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	line	123
	colm	4
	synt	if
	mark0
	pnull
	var	5
	line	123
	colm	7
	synt	any
	nonnull
	unmark
	var	12
	var	1
	var	2
	pnull
	pnull
	pnull
	var	3
	int	1
	line	124
	colm	34
	synt	any
	subsc
	line	124
	colm	29
	synt	any
	size
	var	4
	line	124
	colm	38
	synt	any
	mult
	pnull
	pnull
	var	3
	line	124
	colm	48
	synt	any
	size
	var	4
	line	124
	colm	54
	synt	any
	mult
	line	124
	colm	16
	synt	any
	invoke	4
	line	123
	colm	4
	synt	endif
	unmark
lab L5
	mark	L6
	line	126
	colm	4
	synt	every
	mark0
	pnull
	var	8
	pnull
	var	3
	line	126
	colm	17
	synt	any
	bang
	line	126
	colm	14
	synt	any
	asgn
	pop
	mark0
	mark	L9
	pnull
	var	6
	var	1
	line	127
	colm	9
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	var	10
	pnull
	line	128
	colm	18
	synt	any
	llist	0
	line	128
	colm	15
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	line	130
	colm	7
	synt	ifelse
	mark	L12
	pnull
	var	4
	int	1
	line	130
	colm	17
	synt	any
	numeq
	unmark
	mark	L14
	line	131
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	131
	colm	25
	synt	any
	bang
	line	131
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L17
	line	132
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	132
	colm	22
	synt	any
	lexeq
	unmark
	var	13
	var	10
	var	6
	var	7
	line	132
	colm	37
	synt	any
	invoke	3
	line	132
	colm	13
	synt	endif
	unmark
lab L17
	pnull
	var	6
	dup
	int	1
	line	133
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L15
	efail
lab L16
	line	131
	colm	10
	synt	endevery
	unmark
lab L14
	pnull
	var	7
	dup
	int	1
	line	135
	colm	12
	synt	any
	plus
	asgn
	goto	L13
lab L12
	mark	L18
	line	138
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	138
	colm	25
	synt	any
	bang
	line	138
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L21
	line	139
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	139
	colm	22
	synt	any
	numeq
	unmark
	var	13
	var	10
	var	6
	var	7
	var	4
	var	4
	line	139
	colm	36
	synt	any
	invoke	5
	line	139
	colm	13
	synt	endif
	unmark
lab L21
	pnull
	var	6
	dup
	var	4
	line	140
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L19
	efail
lab L20
	line	138
	colm	10
	synt	endevery
	unmark
lab L18
	pnull
	var	7
	dup
	var	4
	line	142
	colm	12
	synt	any
	plus
	asgn
lab L13
	line	130
	colm	7
	synt	endifelse
	unmark
lab L11
	mark	L22
	line	144
	colm	7
	synt	if
	mark0
	pnull
	pnull
	var	10
	line	144
	colm	10
	synt	any
	size
	int	3
	line	144
	colm	19
	synt	any
	numeq
	unmark
	unmark
	unmark
	goto	L7
	line	144
	colm	7
	synt	endif
	unmark
lab L22
	line	145
	colm	7
	synt	ifelse
	mark	L23
	pnull
	var	4
	int	1
	line	145
	colm	17
	synt	any
	numeq
	unmark
	var	14
	var	10
	invoke	-1
	goto	L24
lab L23
	var	15
	var	10
	invoke	-1
lab L24
	line	145
	colm	7
	synt	endifelse
	unmark
lab L7
	efail
lab L8
	line	126
	colm	4
	synt	endevery
	unmark
lab L6
	mark	L25
	mark	L26
	pnull
	line	148
	colm	4
	synt	any
	pret
lab L26
	synt	any
	pfail
	unmark
lab L25
	pnull
	line	150
	colm	1
	synt	any
	pfail
	end
proc bits2hex
	local	0,001000,s
	local	1,000040,bittab
	local	2,000020,hex
	local	3,000000,table
	local	4,000000,move
	local	5,000000,pos
	local	6,000000,left
	local	7,000000,tab
	con	0,010000,4,060,060,060,060
	con	1,010000,1,060
	con	2,010000,4,061,060,060,060
	con	3,010000,1,061
	con	4,010000,4,060,061,060,060
	con	5,010000,1,062
	con	6,010000,4,061,061,060,060
	con	7,010000,1,063
	con	8,010000,4,060,060,061,060
	con	9,010000,1,064
	con	10,010000,4,061,060,061,060
	con	11,010000,1,065
	con	12,010000,4,060,061,061,060
	con	13,010000,1,066
	con	14,010000,4,061,061,061,060
	con	15,010000,1,067
	con	16,010000,4,060,060,060,061
	con	17,010000,1,070
	con	18,010000,4,061,060,060,061
	con	19,010000,1,071
	con	20,010000,4,060,061,060,061
	con	21,010000,1,141
	con	22,010000,4,061,061,060,061
	con	23,010000,1,142
	con	24,010000,4,060,060,061,061
	con	25,010000,1,143
	con	26,010000,4,061,060,061,061
	con	27,010000,1,144
	con	28,010000,4,060,061,061,061
	con	29,010000,1,145
	con	30,010000,4,061,061,061,061
	con	31,010000,1,146
	con	32,010000,0
	con	33,002000,1,4
	con	34,002000,1,0
	declend
	line	155
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	1
	var	3
	line	160
	colm	22
	synt	any
	invoke	0
	line	160
	colm	14
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	1
	str	0
	line	161
	colm	13
	synt	any
	subsc
	str	1
	line	161
	colm	22
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	1
	str	2
	line	162
	colm	13
	synt	any
	subsc
	str	3
	line	162
	colm	22
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	pnull
	var	1
	str	4
	line	163
	colm	13
	synt	any
	subsc
	str	5
	line	163
	colm	22
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	pnull
	var	1
	str	6
	line	164
	colm	13
	synt	any
	subsc
	str	7
	line	164
	colm	22
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	pnull
	var	1
	str	8
	line	165
	colm	13
	synt	any
	subsc
	str	9
	line	165
	colm	22
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	pnull
	var	1
	str	10
	line	166
	colm	13
	synt	any
	subsc
	str	11
	line	166
	colm	22
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	pnull
	pnull
	var	1
	str	12
	line	167
	colm	13
	synt	any
	subsc
	str	13
	line	167
	colm	22
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	pnull
	var	1
	str	14
	line	168
	colm	13
	synt	any
	subsc
	str	15
	line	168
	colm	22
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	pnull
	pnull
	var	1
	str	16
	line	169
	colm	13
	synt	any
	subsc
	str	17
	line	169
	colm	22
	synt	any
	asgn
	unmark
lab L13
	mark	L14
	pnull
	pnull
	var	1
	str	18
	line	170
	colm	13
	synt	any
	subsc
	str	19
	line	170
	colm	22
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	pnull
	pnull
	var	1
	str	20
	line	171
	colm	13
	synt	any
	subsc
	str	21
	line	171
	colm	22
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	pnull
	var	1
	str	22
	line	172
	colm	13
	synt	any
	subsc
	str	23
	line	172
	colm	22
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	pnull
	pnull
	var	1
	str	24
	line	173
	colm	13
	synt	any
	subsc
	str	25
	line	173
	colm	22
	synt	any
	asgn
	unmark
lab L17
	mark	L18
	pnull
	pnull
	var	1
	str	26
	line	174
	colm	13
	synt	any
	subsc
	str	27
	line	174
	colm	22
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	pnull
	pnull
	var	1
	str	28
	line	175
	colm	13
	synt	any
	subsc
	str	29
	line	175
	colm	22
	synt	any
	asgn
	unmark
lab L19
	pnull
	pnull
	var	1
	str	30
	line	176
	colm	13
	synt	any
	subsc
	str	31
	line	176
	colm	22
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L20
	pnull
	var	2
	str	32
	line	179
	colm	8
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	var	0
	line	181
	colm	6
	synt	any
	bscan
	mark	L22
lab L23
	line	182
	colm	8
	synt	while
	mark0
	pnull
	var	2
	pnull
	pnull
	var	1
	var	4
	int	33
	line	182
	colm	32
	synt	any
	invoke	1
	line	182
	colm	27
	synt	any
	subsc
	var	2
	line	182
	colm	37
	synt	any
	cat
	line	182
	colm	18
	synt	any
	asgn
lab L24
	unmark
	goto	L23
lab L25
	line	182
	colm	8
	synt	endwhile
	unmark
lab L22
	line	183
	colm	8
	synt	if
	mark0
	mark	L26
	var	5
	int	34
	line	183
	colm	18
	synt	any
	invoke	1
	unmark
	efail
lab L26
	pnull
	unmark
	pnull
	var	2
	pnull
	pnull
	var	1
	var	6
	var	7
	int	34
	line	183
	colm	49
	synt	any
	invoke	1
	int	33
	str	1
	line	183
	colm	45
	synt	any
	invoke	3
	line	183
	colm	40
	synt	any
	subsc
	var	2
	line	183
	colm	63
	synt	any
	cat
	line	183
	colm	31
	synt	any
	asgn
	line	183
	colm	8
	synt	endif
	line	181
	colm	6
	synt	any
	escan
	unmark
lab L21
	mark	L27
	mark	L28
	var	2
	line	186
	colm	4
	synt	any
	pret
lab L28
	synt	any
	pfail
	unmark
lab L27
	pnull
	line	188
	colm	1
	synt	any
	pfail
	end
proc decspec
	local	0,001000,pattern
	local	1,000020,cols
	local	2,000020,chunk
	local	3,000020,dec
	local	4,000000,upto
	local	5,000000,tab
	local	6,000000,move
	local	7,000000,integer
	con	0,010000,1,043
	con	1,020000,1,054
	con	2,002000,1,2
	con	3,002000,1,3
	con	4,002000,1,4
	con	5,010000,1,054
	con	6,010000,3,061,066,162
	con	7,002000,1,1
	declend
	line	193
	colm	11
	synt	any
	mark	L1
	var	0
	line	196
	colm	12
	synt	any
	bscan
	mark	L2
	line	197
	colm	7
	synt	if
	mark0
	mark	L3
	var	4
	str	0
	line	197
	colm	18
	synt	any
	invoke	1
	unmark
	efail
lab L3
	pnull
	unmark
	mark	L4
	var	0
	line	197
	colm	29
	synt	any
	pret
lab L4
	synt	any
	pfail
	line	197
	colm	7
	synt	endif
	unmark
lab L2
	mark	L5
	pnull
	var	1
	var	5
	var	4
	cset	1
	line	198
	colm	23
	synt	any
	invoke	1
	line	198
	colm	18
	synt	any
	invoke	1
	line	198
	colm	12
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	var	6
	int	2
	line	199
	colm	11
	synt	any
	invoke	1
	unmark
lab L6
	mark	L7
	pnull
	var	2
	pnull
	pnull
	var	1
	int	3
	line	200
	colm	22
	synt	any
	plus
	int	4
	line	200
	colm	27
	synt	any
	div
	line	200
	colm	13
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	3
	pnull
	var	1
	str	5
	line	201
	colm	19
	synt	any
	cat
	line	201
	colm	11
	synt	any
	asgn
	unmark
lab L8
lab L9
	line	202
	colm	7
	synt	while
	mark0
	pnull
	var	3
	dup
	pnull
	var	7
	pnull
	str	6
	var	6
	var	2
	line	202
	colm	43
	synt	any
	invoke	1
	line	202
	colm	36
	synt	any
	cat
	line	202
	colm	29
	synt	any
	invoke	1
	str	5
	line	202
	colm	52
	synt	any
	cat
	line	202
	colm	17
	synt	any
	cat
	asgn
lab L10
	unmark
	goto	L9
lab L11
	line	202
	colm	7
	synt	endwhile
	line	196
	colm	12
	synt	any
	escan
	unmark
lab L1
	mark	L12
	mark	L13
	pnull
	var	3
	int	7
	pnull
	int	7
	line	205
	colm	17
	synt	any
	neg
	line	205
	colm	16
	synt	any
	synt	any
	sect
	line	205
	colm	4
	synt	any
	pret
lab L13
	synt	any
	pfail
	unmark
lab L12
	pnull
	line	207
	colm	1
	synt	any
	pfail
	end
proc getpatt
	local	0,001000,line
	local	1,000000,tab
	local	2,000000,many
	local	3,000000,upto
	con	0,020000,2,040,011
	con	1,002000,1,0
	declend
	line	213
	colm	11
	synt	any
	mark	L1
	var	0
	line	215
	colm	9
	synt	any
	bscan
	mark	L2
	var	1
	var	2
	cset	0
	line	216
	colm	15
	synt	any
	invoke	1
	line	216
	colm	10
	synt	any
	invoke	1
	unmark
lab L2
	mark	L3
	var	1
	mark	L4
	var	3
	cset	0
	line	217
	colm	22
	synt	any
	invoke	1
	line	217
	colm	30
	synt	any
	esusp
	goto	L5
lab L4
	int	1
lab L5
	line	217
	colm	17
	synt	any
	invoke	1
	line	217
	colm	7
	synt	any
	pret
lab L3
	synt	any
	pfail
	line	215
	colm	9
	synt	any
	escan
	unmark
lab L1
	pnull
	line	220
	colm	1
	synt	any
	pfail
	end
proc getpattnote
	local	0,001000,line
	local	1,000000,tab
	local	2,000000,many
	local	3,000000,upto
	con	0,020000,2,040,011
	con	1,010000,0
	con	2,020000,1,043
	con	3,020000,3,043,040,011
	con	4,002000,1,0
	declend
	line	226
	colm	11
	synt	any
	mark	L1
	var	0
	line	228
	colm	9
	synt	any
	bscan
	mark	L2
	var	1
	var	2
	cset	0
	line	229
	colm	15
	synt	any
	invoke	1
	line	229
	colm	10
	synt	any
	invoke	1
	unmark
lab L2
	mark	L3
	mark	L4
	var	1
	var	3
	cset	0
	line	230
	colm	15
	synt	any
	invoke	1
	line	230
	colm	10
	synt	any
	invoke	1
	line	230
	colm	24
	synt	any
	esusp
	goto	L5
lab L4
	mark	L6
	str	1
	line	230
	colm	26
	synt	any
	pret
lab L6
	synt	any
	pfail
lab L5
	unmark
lab L3
	mark	L7
	mark	L8
	var	1
	var	3
	cset	2
	line	231
	colm	15
	synt	any
	invoke	1
	line	231
	colm	10
	synt	any
	invoke	1
	line	231
	colm	22
	synt	any
	esusp
	goto	L9
lab L8
	mark	L10
	str	1
	line	231
	colm	24
	synt	any
	pret
lab L10
	synt	any
	pfail
lab L9
	unmark
lab L7
	mark	L11
	var	1
	var	2
	cset	3
	line	232
	colm	15
	synt	any
	invoke	1
	line	232
	colm	10
	synt	any
	invoke	1
	unmark
lab L11
	mark	L12
	var	1
	int	4
	line	233
	colm	17
	synt	any
	invoke	1
	line	233
	colm	7
	synt	any
	pret
lab L12
	synt	any
	pfail
	line	228
	colm	9
	synt	any
	escan
	unmark
lab L1
	pnull
	line	236
	colm	1
	synt	any
	pfail
	end
proc hex2bits
	local	0,001000,s
	local	1,000040,hextab
	local	2,000020,bits
	local	3,000000,table
	local	4,000000,map
	local	5,000000,move
	con	0,010000,1,060
	con	1,010000,4,060,060,060,060
	con	2,010000,1,061
	con	3,010000,4,060,060,060,061
	con	4,010000,1,062
	con	5,010000,4,060,060,061,060
	con	6,010000,1,063
	con	7,010000,4,060,060,061,061
	con	8,010000,1,064
	con	9,010000,4,060,061,060,060
	con	10,010000,1,065
	con	11,010000,4,060,061,060,061
	con	12,010000,1,066
	con	13,010000,4,060,061,061,060
	con	14,010000,1,067
	con	15,010000,4,060,061,061,061
	con	16,010000,1,070
	con	17,010000,4,061,060,060,060
	con	18,010000,1,071
	con	19,010000,4,061,060,060,061
	con	20,010000,1,141
	con	21,010000,4,061,060,061,060
	con	22,010000,1,142
	con	23,010000,4,061,060,061,061
	con	24,010000,1,143
	con	25,010000,4,061,061,060,060
	con	26,010000,1,144
	con	27,010000,4,061,061,060,061
	con	28,010000,1,145
	con	29,010000,4,061,061,061,060
	con	30,010000,1,146
	con	31,010000,4,061,061,061,061
	con	32,010000,0
	con	33,002000,1,1
	declend
	line	240
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	1
	var	3
	line	245
	colm	22
	synt	any
	invoke	0
	line	245
	colm	14
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	1
	str	0
	line	246
	colm	13
	synt	any
	subsc
	str	1
	line	246
	colm	19
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	1
	str	2
	line	247
	colm	13
	synt	any
	subsc
	str	3
	line	247
	colm	19
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	pnull
	var	1
	str	4
	line	248
	colm	13
	synt	any
	subsc
	str	5
	line	248
	colm	19
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	pnull
	var	1
	str	6
	line	249
	colm	13
	synt	any
	subsc
	str	7
	line	249
	colm	19
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	pnull
	var	1
	str	8
	line	250
	colm	13
	synt	any
	subsc
	str	9
	line	250
	colm	19
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	pnull
	var	1
	str	10
	line	251
	colm	13
	synt	any
	subsc
	str	11
	line	251
	colm	19
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	pnull
	pnull
	var	1
	str	12
	line	252
	colm	13
	synt	any
	subsc
	str	13
	line	252
	colm	19
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	pnull
	var	1
	str	14
	line	253
	colm	13
	synt	any
	subsc
	str	15
	line	253
	colm	19
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	pnull
	pnull
	var	1
	str	16
	line	254
	colm	13
	synt	any
	subsc
	str	17
	line	254
	colm	19
	synt	any
	asgn
	unmark
lab L13
	mark	L14
	pnull
	pnull
	var	1
	str	18
	line	255
	colm	13
	synt	any
	subsc
	str	19
	line	255
	colm	19
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	pnull
	pnull
	var	1
	str	20
	line	256
	colm	13
	synt	any
	subsc
	str	21
	line	256
	colm	19
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	pnull
	var	1
	str	22
	line	257
	colm	13
	synt	any
	subsc
	str	23
	line	257
	colm	19
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	pnull
	pnull
	var	1
	str	24
	line	258
	colm	13
	synt	any
	subsc
	str	25
	line	258
	colm	19
	synt	any
	asgn
	unmark
lab L17
	mark	L18
	pnull
	pnull
	var	1
	str	26
	line	259
	colm	13
	synt	any
	subsc
	str	27
	line	259
	colm	19
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	pnull
	pnull
	var	1
	str	28
	line	260
	colm	13
	synt	any
	subsc
	str	29
	line	260
	colm	19
	synt	any
	asgn
	unmark
lab L19
	pnull
	pnull
	var	1
	str	30
	line	261
	colm	13
	synt	any
	subsc
	str	31
	line	261
	colm	19
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L20
	pnull
	var	2
	str	32
	line	264
	colm	9
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	var	4
	var	0
	line	266
	colm	7
	synt	any
	invoke	1
	line	266
	colm	11
	synt	any
	bscan
lab L22
	line	267
	colm	7
	synt	while
	mark0
	pnull
	var	2
	dup
	pnull
	var	1
	var	5
	int	33
	line	267
	colm	34
	synt	any
	invoke	1
	line	267
	colm	29
	synt	any
	subsc
	line	267
	colm	18
	synt	any
	cat
	asgn
lab L23
	unmark
	goto	L22
lab L24
	line	267
	colm	7
	synt	endwhile
	line	266
	colm	11
	synt	any
	escan
	unmark
lab L21
	mark	L25
	mark	L26
	var	2
	line	270
	colm	4
	synt	any
	pret
lab L26
	synt	any
	pfail
	unmark
lab L25
	pnull
	line	272
	colm	1
	synt	any
	pfail
	end
proc hexspec
	local	0,001000,pattern
	local	1,000020,cols
	local	2,000020,chunk
	local	3,000020,hex
	local	4,000000,find
	local	5,000000,tab
	local	6,000000,upto
	local	7,000000,move
	local	8,000000,right
	local	9,000000,exbase10
	con	0,010000,1,043
	con	1,020000,1,054
	con	2,002000,1,1
	con	3,002000,1,3
	con	4,002000,1,4
	con	5,010000,2,054,043
	con	6,002000,1,0
	con	7,002000,2,16
	con	8,010000,1,060
	declend
	line	277
	colm	11
	synt	any
	mark	L1
	var	0
	line	280
	colm	12
	synt	any
	bscan
	mark	L2
	line	281
	colm	7
	synt	if
	mark0
	var	4
	str	0
	line	281
	colm	14
	synt	any
	invoke	1
	unmark
	mark	L3
	var	0
	line	281
	colm	25
	synt	any
	pret
lab L3
	synt	any
	pfail
	line	281
	colm	7
	synt	endif
	unmark
lab L2
	mark	L4
	pnull
	var	1
	var	5
	var	6
	cset	1
	line	282
	colm	23
	synt	any
	invoke	1
	line	282
	colm	18
	synt	any
	invoke	1
	line	282
	colm	12
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	var	7
	int	2
	line	283
	colm	11
	synt	any
	invoke	1
	unmark
lab L5
	mark	L6
	pnull
	var	2
	pnull
	pnull
	var	1
	int	3
	line	284
	colm	22
	synt	any
	plus
	int	4
	line	284
	colm	27
	synt	any
	div
	line	284
	colm	13
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	3
	pnull
	var	1
	str	5
	line	285
	colm	19
	synt	any
	cat
	line	285
	colm	11
	synt	any
	asgn
	unmark
lab L7
lab L8
	line	286
	colm	7
	synt	while
	mark0
	pnull
	var	3
	dup
	var	8
	var	9
	var	5
	mark	L11
	var	6
	cset	1
	line	286
	colm	45
	synt	any
	invoke	1
	line	286
	colm	51
	synt	any
	esusp
	goto	L12
lab L11
	int	6
lab L12
	line	286
	colm	40
	synt	any
	invoke	1
	int	7
	line	286
	colm	36
	synt	any
	invoke	2
	var	2
	str	8
	line	286
	colm	27
	synt	any
	invoke	3
	line	286
	colm	17
	synt	any
	cat
	asgn
	unmark
	mark	L8
	mark	L13
	var	7
	int	2
	line	287
	colm	14
	synt	any
	invoke	1
	line	287
	colm	18
	synt	any
	esusp
	goto	L14
lab L13
	unmark
	pnull
	goto	L10
lab L14
lab L9
	unmark
	goto	L8
lab L10
	line	286
	colm	7
	synt	endwhile
	line	280
	colm	12
	synt	any
	escan
	unmark
lab L1
	mark	L15
	mark	L16
	var	3
	line	290
	colm	4
	synt	any
	pret
lab L16
	synt	any
	pfail
	unmark
lab L15
	pnull
	line	292
	colm	1
	synt	any
	pfail
	end
proc legalpat
	local	0,001000,tile
	local	1,000000,legaltile
	local	2,000000,integer
	local	3,000000,tab
	local	4,000000,upto
	con	0,002000,1,0
	con	1,020000,1,054
	con	2,002000,2,32
	declend
	line	298
	colm	11
	synt	any
	mark	L1
	line	300
	colm	4
	synt	if
	mark0
	mark	L2
	var	1
	var	0
	line	300
	colm	20
	synt	any
	invoke	1
	unmark
	efail
lab L2
	pnull
	unmark
	line	300
	colm	32
	synt	any
	pfail
	line	300
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	var	0
	line	302
	colm	9
	synt	any
	bscan
	line	303
	colm	7
	synt	ifelse
	mark	L4
	pnull
	pnull
	int	0
	var	2
	var	3
	var	4
	cset	1
	line	303
	colm	30
	synt	any
	invoke	1
	line	303
	colm	25
	synt	any
	invoke	1
	line	303
	colm	21
	synt	any
	invoke	1
	line	303
	colm	12
	synt	any
	numlt
	int	2
	line	303
	colm	38
	synt	any
	numle
	unmark
	mark	L6
	var	0
	line	303
	colm	49
	synt	any
	pret
lab L6
	synt	any
	pfail
	goto	L5
lab L4
	line	304
	colm	12
	synt	any
	pfail
lab L5
	line	303
	colm	7
	synt	endifelse
	line	302
	colm	9
	synt	any
	escan
	unmark
lab L3
	pnull
	line	307
	colm	1
	synt	any
	pfail
	end
proc legaltile
	local	0,001000,tile
	local	1,000000,map
	local	2,000000,tab
	local	3,000000,many
	local	4,000000,pos
	local	5,000000,hexspec
	local	6,000000,decspec
	con	0,010000,1,054
	con	1,010000,1,043
	con	2,020000,16,060,061,062,063,064,065,066,067,070,071,141,142,143,144,145,146
	con	3,002000,1,0
	declend
	line	313
	colm	11
	synt	any
	mark	L1
	var	1
	var	0
	line	315
	colm	7
	synt	any
	invoke	1
	line	315
	colm	14
	synt	any
	bscan
	mark	L2
	mark	L3
	var	2
	var	3
	line	316
	colm	17
	synt	any
	keywd	digits
	line	316
	colm	16
	synt	any
	invoke	1
	line	316
	colm	11
	synt	any
	invoke	1
	pop
	pnull
	str	0
	line	316
	colm	29
	synt	any
	tabmat
	line	316
	colm	35
	synt	any
	esusp
	goto	L4
lab L3
	line	316
	colm	37
	synt	any
	pfail
lab L4
	unmark
lab L2
	line	317
	colm	7
	synt	ifelse
	mark	L5
	pnull
	str	1
	line	317
	colm	10
	synt	any
	tabmat
	unmark
	mark	L7
	var	2
	var	3
	cset	2
	line	317
	colm	29
	synt	any
	invoke	1
	line	317
	colm	24
	synt	any
	invoke	1
	pop
	var	4
	int	3
	line	317
	colm	56
	synt	any
	invoke	1
	line	317
	colm	61
	synt	any
	esusp
	goto	L8
lab L7
	line	317
	colm	63
	synt	any
	pfail
lab L8
	goto	L6
lab L5
	mark	L9
lab L10
	line	319
	colm	10
	synt	while
	mark0
	var	2
	var	3
	line	319
	colm	25
	synt	any
	keywd	digits
	line	319
	colm	24
	synt	any
	invoke	1
	line	319
	colm	19
	synt	any
	invoke	1
	unmark
	mark	L10
	line	320
	colm	13
	synt	ifelse
	mark	L13
	var	4
	int	3
	line	320
	colm	19
	synt	any
	invoke	1
	unmark
	unmark
	pnull
	goto	L12
	goto	L14
lab L13
	mark	L15
	pnull
	str	0
	line	321
	colm	18
	synt	any
	tabmat
	line	321
	colm	23
	synt	any
	esusp
	goto	L16
lab L15
	line	321
	colm	25
	synt	any
	pfail
lab L16
lab L14
	line	320
	colm	13
	synt	endifelse
lab L11
	unmark
	goto	L10
lab L12
	line	319
	colm	10
	synt	endwhile
	unmark
lab L9
	line	323
	colm	10
	synt	if
	mark0
	mark	L17
	var	4
	int	3
	line	323
	colm	20
	synt	any
	invoke	1
	unmark
	efail
lab L17
	pnull
	unmark
	line	323
	colm	29
	synt	any
	pfail
	line	323
	colm	10
	synt	endif
lab L6
	line	317
	colm	7
	synt	endifelse
	line	315
	colm	14
	synt	any
	escan
	unmark
lab L1
	mark	L18
	mark	L19
	pnull
	var	5
	var	6
	var	0
	line	327
	colm	26
	synt	any
	invoke	1
	line	327
	colm	18
	synt	any
	invoke	1
	var	0
	line	327
	colm	34
	synt	any
	lexeq
	line	327
	colm	4
	synt	any
	pret
lab L19
	synt	any
	pfail
	unmark
lab L18
	pnull
	line	329
	colm	1
	synt	any
	pfail
	end
proc pat2xbm
	local	0,001000,pattern
	local	1,001000,name
	local	2,000020,dims
	local	3,000020,chunk
	local	4,000020,row
	local	5,000000,tiledim
	local	6,000000,write
	local	7,000000,tab
	local	8,000000,upto
	local	9,000000,move
	local	10,000000,writes
	con	0,010000,6,156,157,156,141,155,145
	con	1,010000,8,043,144,145,146,151,156,145,040
	con	2,010000,7,137,167,151,144,164,150,040
	con	3,010000,8,137,150,145,151,147,150,164,040
	con	4,010000,12,163,164,141,164,151,143,040,143,150,141,162,040
	con	5,010000,11,137,142,151,164,163,133,135,040,075,040,173
	con	6,002000,1,3
	con	7,002000,1,4
	con	8,020000,1,043
	con	9,002000,1,1
	con	10,002000,1,2
	con	11,002000,1,0
	con	12,010000,1,060
	con	13,010000,2,060,170
	con	14,010000,1,054
	con	15,010000,2,175,073
	declend
	line	334
	colm	11
	synt	any
	mark	L1
	pnull
	pnull
	var	1
	line	337
	colm	4
	synt	any
	null
	str	0
	line	337
	colm	10
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	5
	var	0
	line	339
	colm	19
	synt	any
	invoke	1
	line	339
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	var	6
	str	1
	var	1
	str	2
	pnull
	var	2
	line	342
	colm	43
	synt	any
	field	w
	line	342
	colm	9
	synt	any
	invoke	4
	unmark
lab L3
	mark	L4
	var	6
	str	1
	var	1
	str	3
	pnull
	var	2
	line	343
	colm	44
	synt	any
	field	h
	line	343
	colm	9
	synt	any
	invoke	4
	unmark
lab L4
	mark	L5
	var	6
	str	4
	var	1
	str	5
	line	344
	colm	9
	synt	any
	invoke	3
	unmark
lab L5
	mark	L6
	pnull
	var	3
	pnull
	pnull
	pnull
	var	2
	line	346
	colm	18
	synt	any
	field	w
	int	6
	line	346
	colm	21
	synt	any
	plus
	int	7
	line	346
	colm	26
	synt	any
	div
	line	346
	colm	10
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	var	0
	line	348
	colm	12
	synt	any
	bscan
	mark	L8
	var	7
	pnull
	var	8
	cset	8
	line	349
	colm	15
	synt	any
	invoke	1
	int	9
	line	349
	colm	21
	synt	any
	plus
	line	349
	colm	10
	synt	any
	invoke	1
	unmark
lab L8
lab L9
	line	350
	colm	7
	synt	while
	mark0
	pnull
	var	4
	var	9
	var	3
	line	350
	colm	24
	synt	any
	invoke	1
	line	350
	colm	17
	synt	any
	asgn
	unmark
	mark	L9
	mark	L12
	line	351
	colm	10
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	4
	line	351
	colm	13
	synt	any
	size
	int	10
	line	351
	colm	18
	synt	any
	mod
	int	11
	line	351
	colm	22
	synt	any
	numne
	unmark
	pnull
	var	4
	pnull
	str	12
	var	4
	line	351
	colm	43
	synt	any
	cat
	line	351
	colm	36
	synt	any
	asgn
	line	351
	colm	10
	synt	endif
	unmark
lab L12
	mark	L13
	var	4
	line	352
	colm	14
	synt	any
	bscan
	mark	L14
	var	7
	int	11
	line	353
	colm	16
	synt	any
	invoke	1
	unmark
lab L14
lab L15
	line	354
	colm	13
	synt	while
	mark0
	var	10
	str	13
	var	9
	pnull
	int	10
	line	354
	colm	37
	synt	any
	neg
	line	354
	colm	36
	synt	any
	invoke	1
	str	14
	line	354
	colm	25
	synt	any
	invoke	3
lab L16
	unmark
	goto	L15
lab L17
	line	354
	colm	13
	synt	endwhile
	line	352
	colm	14
	synt	any
	escan
	unmark
lab L13
	var	6
	line	356
	colm	15
	synt	any
	invoke	0
lab L10
	unmark
	goto	L9
lab L11
	line	350
	colm	7
	synt	endwhile
	line	348
	colm	12
	synt	any
	escan
	unmark
lab L7
	mark	L18
	var	6
	str	15
	line	360
	colm	9
	synt	any
	invoke	1
	unmark
lab L18
	pnull
	line	362
	colm	1
	synt	any
	pfail
	end
proc tilebits
	local	0,001000,rows
	local	1,000020,bits
	con	0,002000,1,0
	declend
	line	367
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	int	0
	line	370
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	372
	colm	4
	synt	every
	mark0
	pnull
	var	1
	dup
	pnull
	pnull
	var	0
	line	372
	colm	20
	synt	any
	bang
	line	372
	colm	19
	synt	any
	bang
	line	372
	colm	15
	synt	any
	plus
	asgn
	pop
lab L3
	efail
lab L4
	line	372
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	374
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	376
	colm	1
	synt	any
	pfail
	end
proc pdensity
	local	0,001000,pattern
	local	1,000020,dark
	local	2,000020,dims
	local	3,000000,tiledim
	local	4,000000,hexspec
	local	5,000000,rowbits
	local	6,000000,upto
	local	7,000000,real
	con	0,002000,1,0
	con	1,020000,1,061
	con	2,002000,1,1
	declend
	line	381
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	3
	var	0
	line	385
	colm	19
	synt	any
	invoke	1
	line	385
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	4
	var	0
	line	387
	colm	11
	synt	any
	invoke	1
	line	387
	colm	21
	synt	any
	bscan
	mark	L3
	pnull
	var	1
	int	0
	line	388
	colm	12
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	line	389
	colm	7
	synt	every
	mark0
	var	5
	var	0
	line	389
	colm	20
	synt	any
	invoke	1
	line	389
	colm	30
	synt	any
	bscan
	line	390
	colm	10
	synt	every
	mark0
	var	6
	cset	1
	line	390
	colm	20
	synt	any
	invoke	1
	pop
	mark0
	pnull
	var	1
	dup
	int	2
	line	391
	colm	18
	synt	any
	plus
	asgn
	unmark
lab L7
	efail
lab L8
	line	390
	colm	10
	synt	endevery
	line	389
	colm	30
	synt	any
	escan
	pop
lab L5
	efail
lab L6
	line	389
	colm	7
	synt	endevery
	unmark
lab L4
	mark	L9
	pnull
	var	1
	var	7
	pnull
	pnull
	var	2
	line	393
	colm	30
	synt	any
	field	w
	pnull
	var	2
	line	393
	colm	39
	synt	any
	field	h
	line	393
	colm	33
	synt	any
	mult
	line	393
	colm	25
	synt	any
	invoke	1
	line	393
	colm	19
	synt	any
	div
	line	393
	colm	7
	synt	any
	pret
lab L9
	synt	any
	pfail
	line	387
	colm	21
	synt	any
	escan
	unmark
lab L2
	pnull
	line	396
	colm	1
	synt	any
	pfail
	end
proc pix2pat
	local	0,001000,window
	local	1,001000,x
	local	2,001000,y
	local	3,001000,cols
	local	4,001000,rows
	local	5,000020,c
	local	6,000020,j
	local	7,000020,tile
	local	8,000020,pattern
	local	9,000020,pixels
	local	10,000020,y0
	local	11,000000,Pixel
	local	12,000000,bits2hex
	con	0,010000,0
	con	1,002000,1,0
	con	2,002000,1,1
	con	3,010000,5,060,054,060,054,060
	con	4,010000,1,061
	con	5,010000,1,060
	con	6,010000,2,054,043
	declend
	line	401
	colm	11
	synt	any
	mark	L1
	pnull
	var	8
	str	0
	line	404
	colm	12
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	406
	colm	4
	synt	every
	mark0
	pnull
	var	10
	pnull
	int	1
	pnull
	var	4
	int	2
	line	406
	colm	26
	synt	any
	minus
	push1
	line	406
	colm	18
	synt	any
	toby
	line	406
	colm	13
	synt	any
	asgn
	pop
	mark0
	mark	L5
	pnull
	var	9
	str	0
	line	407
	colm	14
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	line	408
	colm	7
	synt	every
	mark0
	pnull
	var	6
	pnull
	int	1
	pnull
	var	3
	int	2
	line	408
	colm	28
	synt	any
	minus
	push1
	line	408
	colm	20
	synt	any
	toby
	line	408
	colm	15
	synt	any
	asgn
	pop
	mark0
	line	409
	colm	10
	synt	every
	mark0
	pnull
	var	5
	var	11
	var	0
	pnull
	var	1
	var	6
	line	409
	colm	37
	synt	any
	plus
	pnull
	var	10
	var	2
	line	409
	colm	45
	synt	any
	plus
	int	2
	int	2
	line	409
	colm	26
	synt	any
	invoke	5
	line	409
	colm	18
	synt	any
	asgn
	pop
	mark0
	pnull
	var	9
	dup
	line	410
	colm	26
	synt	ifelse
	mark	L11
	pnull
	var	5
	str	3
	line	410
	colm	31
	synt	any
	lexeq
	unmark
	str	4
	goto	L12
lab L11
	str	5
lab L12
	line	410
	colm	26
	synt	endifelse
	line	410
	colm	20
	synt	any
	cat
	asgn
	unmark
lab L9
	efail
lab L10
	line	409
	colm	10
	synt	endevery
	unmark
lab L7
	efail
lab L8
	line	408
	colm	7
	synt	endevery
	unmark
lab L6
	pnull
	var	8
	dup
	var	12
	var	9
	line	411
	colm	28
	synt	any
	invoke	1
	line	411
	colm	15
	synt	any
	cat
	asgn
	unmark
lab L3
	efail
lab L4
	line	406
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L13
	line	414
	colm	4
	synt	ifelse
	mark	L14
	pnull
	pnull
	var	8
	line	414
	colm	7
	synt	any
	size
	int	1
	line	414
	colm	16
	synt	any
	numeq
	unmark
	line	414
	colm	25
	synt	any
	pfail
	goto	L15
lab L14
	mark	L16
	pnull
	pnull
	var	3
	str	6
	line	415
	colm	21
	synt	any
	cat
	var	8
	line	415
	colm	29
	synt	any
	cat
	line	415
	colm	9
	synt	any
	pret
lab L16
	synt	any
	pfail
lab L15
	line	414
	colm	4
	synt	endifelse
	unmark
lab L13
	pnull
	line	417
	colm	1
	synt	any
	pfail
	end
proc readpatt
	local	0,001000,input
	local	1,000020,line
	local	2,000000,read
	local	3,000000,pos
	local	4,000000,tab
	local	5,000000,upto
	con	0,002000,1,0
	con	1,010000,1,043
	con	2,020000,2,040,011
	declend
	line	424
	colm	11
	synt	any
	mark	L1
lab L2
	line	427
	colm	4
	synt	while
	mark0
	pnull
	var	1
	var	2
	var	0
	line	427
	colm	22
	synt	any
	invoke	1
	line	427
	colm	15
	synt	any
	asgn
	unmark
	mark	L2
	var	1
	line	428
	colm	12
	synt	any
	bscan
	mark	L5
	line	429
	colm	10
	synt	if
	mark0
	mark	L6
	var	3
	int	0
	line	429
	colm	16
	synt	any
	invoke	1
	line	429
	colm	20
	synt	any
	esusp
	goto	L7
lab L6
	pnull
	str	1
	line	429
	colm	22
	synt	any
	tabmat
lab L7
	unmark
	unmark
	goto	L3
	line	429
	colm	10
	synt	endif
	unmark
lab L5
	mark	L8
	var	4
	mark	L9
	var	5
	cset	2
	line	430
	colm	25
	synt	any
	invoke	1
	line	430
	colm	33
	synt	any
	esusp
	goto	L10
lab L9
	int	0
lab L10
	line	430
	colm	20
	synt	any
	invoke	1
	line	430
	colm	10
	synt	any
	pret
lab L8
	synt	any
	pfail
	line	428
	colm	12
	synt	any
	escan
lab L3
	unmark
	goto	L2
lab L4
	line	427
	colm	4
	synt	endwhile
	unmark
lab L1
	mark	L11
	line	433
	colm	4
	synt	any
	pfail
	unmark
lab L11
	pnull
	line	435
	colm	1
	synt	any
	pfail
	end
proc readpattline
	local	0,001000,input
	local	1,000020,line
	local	2,000000,read
	local	3,000000,pos
	local	4,000000,tab
	con	0,002000,1,0
	con	1,010000,1,043
	declend
	line	442
	colm	11
	synt	any
	mark	L1
lab L2
	line	445
	colm	4
	synt	while
	mark0
	pnull
	var	1
	var	2
	var	0
	line	445
	colm	22
	synt	any
	invoke	1
	line	445
	colm	15
	synt	any
	asgn
	unmark
	mark	L2
	var	1
	line	446
	colm	12
	synt	any
	bscan
	mark	L5
	line	447
	colm	10
	synt	if
	mark0
	mark	L6
	var	3
	int	0
	line	447
	colm	16
	synt	any
	invoke	1
	line	447
	colm	20
	synt	any
	esusp
	goto	L7
lab L6
	pnull
	str	1
	line	447
	colm	22
	synt	any
	tabmat
lab L7
	unmark
	unmark
	goto	L3
	line	447
	colm	10
	synt	endif
	unmark
lab L5
	mark	L8
	var	4
	int	0
	line	448
	colm	20
	synt	any
	invoke	1
	line	448
	colm	10
	synt	any
	pret
lab L8
	synt	any
	pfail
	line	446
	colm	12
	synt	any
	escan
lab L3
	unmark
	goto	L2
lab L4
	line	445
	colm	4
	synt	endwhile
	unmark
lab L1
	mark	L9
	line	451
	colm	4
	synt	any
	pfail
	unmark
lab L9
	pnull
	line	453
	colm	1
	synt	any
	pfail
	end
proc rowbits
	local	0,001000,pattern
	local	1,000020,row
	local	2,000020,dims
	local	3,000020,chunk
	local	4,000020,hex
	local	5,000000,tiledim
	local	6,000000,hexspec
	local	7,000000,tab
	local	8,000000,upto
	local	9,000000,right
	local	10,000000,hex2bits
	local	11,000000,move
	local	12,000000,reverse
	con	0,020000,1,054
	con	1,002000,1,2
	con	2,002000,1,0
	con	3,010000,1,060
	declend
	line	459
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	5
	var	0
	line	462
	colm	19
	synt	any
	invoke	1
	line	462
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	6
	var	0
	line	464
	colm	11
	synt	any
	invoke	1
	line	464
	colm	21
	synt	any
	bscan
	mark	L3
	var	7
	pnull
	var	8
	cset	0
	line	465
	colm	15
	synt	any
	invoke	1
	int	1
	line	465
	colm	21
	synt	any
	plus
	line	465
	colm	10
	synt	any
	invoke	1
	unmark
lab L3
	mark	L4
	pnull
	var	4
	var	7
	int	2
	line	466
	colm	17
	synt	any
	invoke	1
	line	466
	colm	11
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	3
	pnull
	pnull
	var	4
	line	467
	colm	16
	synt	any
	size
	pnull
	var	2
	line	467
	colm	27
	synt	any
	field	h
	line	467
	colm	21
	synt	any
	div
	line	467
	colm	13
	synt	any
	asgn
	unmark
lab L5
	var	4
	line	468
	colm	11
	synt	any
	bscan
lab L6
	line	469
	colm	10
	synt	while
	mark0
	pnull
	var	1
	var	9
	var	10
	var	11
	var	3
	line	469
	colm	42
	synt	any
	invoke	1
	line	469
	colm	37
	synt	any
	invoke	1
	pnull
	var	2
	line	469
	colm	56
	synt	any
	field	w
	str	3
	line	469
	colm	28
	synt	any
	invoke	3
	line	469
	colm	20
	synt	any
	asgn
	unmark
	mark	L6
	line	470
	colm	13
	synt	suspend
	mark0
	var	12
	var	1
	line	470
	colm	28
	synt	any
	invoke	1
	line	470
	colm	13
	synt	any
	psusp
	pop
lab L9
	efail
lab L10
	line	470
	colm	13
	synt	endsuspend
lab L7
	unmark
	goto	L6
lab L8
	line	469
	colm	10
	synt	endwhile
	line	468
	colm	11
	synt	any
	escan
	line	464
	colm	21
	synt	any
	escan
	unmark
lab L2
	pnull
	line	474
	colm	1
	synt	any
	pfail
	end
proc pat2rows
	local	0,001000,pattern
	local	1,000020,rlist
	local	2,000000,put
	local	3,000000,rowbits
	declend
	line	479
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	pnull
	line	482
	colm	13
	synt	any
	llist	0
	line	482
	colm	10
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	484
	colm	4
	synt	every
	mark0
	var	2
	var	1
	var	3
	var	0
	line	484
	colm	28
	synt	any
	invoke	1
	line	484
	colm	13
	synt	any
	invoke	2
	pop
lab L3
	efail
lab L4
	line	484
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	486
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	488
	colm	1
	synt	any
	pfail
	end
proc rows2pat
	local	0,001000,rlist
	local	1,000020,pattern
	local	2,000000,bits2hex
	con	0,002000,1,1
	con	1,010000,2,054,043
	declend
	line	493
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	pnull
	pnull
	pnull
	var	0
	int	0
	line	496
	colm	21
	synt	any
	subsc
	line	496
	colm	15
	synt	any
	size
	str	1
	line	496
	colm	25
	synt	any
	cat
	line	496
	colm	12
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	498
	colm	4
	synt	every
	mark0
	pnull
	var	1
	dup
	var	2
	pnull
	var	0
	line	498
	colm	32
	synt	any
	bang
	line	498
	colm	31
	synt	any
	invoke	1
	line	498
	colm	18
	synt	any
	cat
	asgn
	pop
lab L3
	efail
lab L4
	line	498
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	500
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	502
	colm	1
	synt	any
	pfail
	end
proc showbits
	local	0,001000,pattern
	local	1,000000,write
	local	2,000000,rowbits
	declend
	line	506
	colm	11
	synt	any
	mark	L1
	line	508
	colm	4
	synt	every
	mark0
	var	1
	var	2
	var	0
	line	508
	colm	23
	synt	any
	invoke	1
	line	508
	colm	15
	synt	any
	invoke	1
	pop
lab L2
	efail
lab L3
	line	508
	colm	4
	synt	endevery
	unmark
lab L1
	mark	L4
	var	1
	line	510
	colm	9
	synt	any
	invoke	0
	unmark
lab L4
	mark	L5
	mark	L6
	pnull
	line	512
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	514
	colm	1
	synt	any
	pfail
	end
proc tiledim
	local	0,001000,pattern
	local	1,000020,cols
	local	2,000000,hexspec
	local	3,000000,integer
	local	4,000000,tab
	local	5,000000,upto
	local	6,000000,tdim
	con	0,020000,1,054
	con	1,010000,2,054,043
	con	2,002000,1,0
	con	3,002000,1,3
	con	4,002000,1,4
	declend
	line	520
	colm	11
	synt	any
	mark	L1
	var	2
	var	0
	line	523
	colm	11
	synt	any
	invoke	1
	line	523
	colm	21
	synt	any
	bscan
	mark	L2
	pnull
	var	1
	var	3
	var	4
	var	5
	cset	0
	line	524
	colm	31
	synt	any
	invoke	1
	line	524
	colm	26
	synt	any
	invoke	1
	line	524
	colm	22
	synt	any
	invoke	1
	line	524
	colm	12
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	mark	L4
	pnull
	str	1
	line	525
	colm	7
	synt	any
	tabmat
	line	525
	colm	13
	synt	any
	esusp
	goto	L5
lab L4
	line	525
	colm	15
	synt	any
	pfail
lab L5
	unmark
lab L3
	mark	L6
	var	6
	var	1
	pnull
	pnull
	var	4
	int	2
	line	526
	colm	29
	synt	any
	invoke	1
	line	526
	colm	25
	synt	any
	size
	pnull
	pnull
	var	1
	int	3
	line	526
	colm	42
	synt	any
	plus
	int	4
	line	526
	colm	47
	synt	any
	div
	line	526
	colm	33
	synt	any
	div
	line	526
	colm	18
	synt	any
	invoke	2
	line	526
	colm	7
	synt	any
	pret
lab L6
	synt	any
	pfail
	line	523
	colm	21
	synt	any
	escan
	unmark
lab L1
	pnull
	line	529
	colm	1
	synt	any
	pfail
	end
proc xbm2rows
	local	0,001000,input
	local	1,000020,image
	local	2,000020,bits
	local	3,000020,row
	local	4,000020,hex
	local	5,000020,width
	local	6,000020,height
	local	7,000020,chunks
	local	8,000000,read
	local	9,000000,tab
	local	10,000000,find
	local	11,000000,upto
	local	12,000000,integer
	local	13,000000,many
	local	14,000000,reads
	local	15,000000,move
	local	16,000000,reverse
	local	17,000000,right
	local	18,000000,hex2bits
	local	19,000000,left
	con	0,010000,0
	con	1,010000,5,167,151,144,164,150
	con	2,002000,1,6
	con	3,010000,6,150,145,151,147,150,164
	con	4,002000,1,8
	con	5,002000,1,0
	con	6,002000,1,1
	con	7,002000,6,500000
	con	8,010000,2,060,170
	con	9,002000,1,2
	con	10,010000,2,060,060
	con	11,010000,8,060,060,060,060,060,060,060,060
	con	12,010000,2,146,146
	con	13,010000,8,061,061,061,061,061,061,061,061
	con	14,010000,1,060
	declend
	line	534
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	str	0
	line	537
	colm	10
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	8
	var	0
	line	539
	colm	8
	synt	any
	invoke	1
	line	539
	colm	16
	synt	any
	bscan
	mark	L3
	var	9
	pnull
	var	10
	str	1
	line	540
	colm	15
	synt	any
	invoke	1
	int	2
	line	540
	colm	25
	synt	any
	plus
	line	540
	colm	10
	synt	any
	invoke	1
	unmark
lab L3
	mark	L4
	var	9
	var	11
	line	541
	colm	16
	synt	any
	keywd	digits
	line	541
	colm	15
	synt	any
	invoke	1
	line	541
	colm	10
	synt	any
	invoke	1
	unmark
lab L4
	pnull
	var	5
	var	12
	var	9
	var	13
	line	542
	colm	33
	synt	any
	keywd	digits
	line	542
	colm	32
	synt	any
	invoke	1
	line	542
	colm	27
	synt	any
	invoke	1
	line	542
	colm	23
	synt	any
	invoke	1
	line	542
	colm	13
	synt	any
	asgn
	line	539
	colm	16
	synt	any
	escan
	unmark
lab L2
	mark	L5
	var	8
	var	0
	line	545
	colm	8
	synt	any
	invoke	1
	line	545
	colm	16
	synt	any
	bscan
	mark	L6
	var	9
	pnull
	var	10
	str	3
	line	546
	colm	15
	synt	any
	invoke	1
	int	2
	line	546
	colm	26
	synt	any
	plus
	line	546
	colm	10
	synt	any
	invoke	1
	unmark
lab L6
	mark	L7
	var	9
	var	11
	line	547
	colm	16
	synt	any
	keywd	digits
	line	547
	colm	15
	synt	any
	invoke	1
	line	547
	colm	10
	synt	any
	invoke	1
	unmark
lab L7
	pnull
	var	6
	var	12
	var	9
	var	13
	line	548
	colm	34
	synt	any
	keywd	digits
	line	548
	colm	33
	synt	any
	invoke	1
	line	548
	colm	28
	synt	any
	invoke	1
	line	548
	colm	24
	synt	any
	invoke	1
	line	548
	colm	14
	synt	any
	asgn
	line	545
	colm	16
	synt	any
	escan
	unmark
lab L5
	mark	L8
	pnull
	var	7
	pnull
	pnull
	var	5
	int	4
	line	551
	colm	21
	synt	any
	div
	line	551
	colm	28
	synt	ifelse
	mark	L9
	pnull
	pnull
	var	5
	int	4
	line	551
	colm	38
	synt	any
	mod
	int	5
	line	551
	colm	43
	synt	any
	numgt
	unmark
	int	6
	goto	L10
lab L9
	int	5
lab L10
	line	551
	colm	28
	synt	endifelse
	line	551
	colm	26
	synt	any
	plus
	line	551
	colm	11
	synt	any
	asgn
	unmark
lab L8
	mark	L11
lab L12
	line	553
	colm	4
	synt	while
	mark0
	pnull
	var	1
	dup
	var	14
	var	0
	int	7
	line	553
	colm	26
	synt	any
	invoke	2
	line	553
	colm	16
	synt	any
	cat
	asgn
lab L13
	unmark
	goto	L12
lab L14
	line	553
	colm	4
	synt	endwhile
	unmark
lab L11
	mark	L15
	var	1
	line	555
	colm	10
	synt	any
	bscan
	line	556
	colm	7
	synt	every
	mark0
	pnull
	int	6
	var	6
	push1
	line	556
	colm	15
	synt	any
	toby
	pop
	mark0
	mark	L18
	pnull
	var	3
	str	0
	line	557
	colm	14
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	line	558
	colm	10
	synt	every
	mark0
	pnull
	int	6
	var	7
	push1
	line	558
	colm	18
	synt	any
	toby
	pop
	mark0
	mark	L22
	var	9
	pnull
	var	10
	str	8
	line	559
	colm	21
	synt	any
	invoke	1
	int	9
	line	559
	colm	28
	synt	any
	plus
	line	559
	colm	16
	synt	any
	invoke	1
	unmark
lab L22
	mark	L23
	pnull
	var	4
	var	15
	int	9
	line	560
	colm	24
	synt	any
	invoke	1
	line	560
	colm	17
	synt	any
	asgn
	unmark
lab L23
	pnull
	var	3
	dup
	line	561
	colm	22
	synt	case
	mark0
	var	4
	eret
	mark	L25
	ccase
	str	10
	line	562
	colm	19
	synt	any
	eqv
	unmark
	pop
	str	11
	goto	L24
lab L25
	mark	L26
	ccase
	str	12
	line	563
	colm	19
	synt	any
	eqv
	unmark
	pop
	str	13
	goto	L24
lab L26
	pop
	var	16
	var	17
	var	18
	var	4
	line	564
	colm	47
	synt	any
	invoke	1
	int	4
	str	14
	line	564
	colm	38
	synt	any
	invoke	3
	line	564
	colm	32
	synt	any
	invoke	1
lab L24
	line	561
	colm	22
	synt	endcase
	line	561
	colm	17
	synt	any
	cat
	asgn
	unmark
lab L20
	efail
lab L21
	line	558
	colm	10
	synt	endevery
	unmark
lab L19
	line	567
	colm	10
	synt	suspend
	mark0
	var	19
	var	3
	var	5
	line	567
	colm	22
	synt	any
	invoke	2
	line	567
	colm	10
	synt	any
	psusp
	pop
lab L27
	efail
lab L28
	line	567
	colm	10
	synt	endsuspend
	unmark
lab L16
	efail
lab L17
	line	556
	colm	7
	synt	endevery
	line	555
	colm	10
	synt	any
	escan
	unmark
lab L15
	pnull
	line	571
	colm	1
	synt	any
	pfail
	end
