version	U12.1.00
uid	imsutils.u1-1786033007-0
record	tdim,2
	0,w
	1,h
impl	error
link	convert.u
global	26
	0,000011,tdim,2
	1,000005,patident,2
	2,000005,XDrawTile,6
	3,000005,XDrawRows,6
	4,000005,bits2hex,1
	5,000005,decspec,1
	6,000005,getpatt,1
	7,000005,getpattnote,1
	8,000005,hex2bits,1
	9,000005,hexspec,1
	10,000005,legalpat,1
	11,000005,legaltile,1
	12,000005,pat2xbm,2
	13,000005,tilebits,1
	14,000005,pdensity,1
	15,000005,pix2pat,5
	16,000005,readims,1
	17,000005,readimsline,1
	18,000005,rowbits,1
	19,000005,imstoimx,1
	20,000005,imxtoims,1
	21,000005,showbits,1
	22,000005,tiledim,1
	23,000005,pheight,1
	24,000005,pwidth,1
	25,000005,xbm2rows,1

proc patident
	local	0,001000,imx1
	local	1,001000,imx2
	local	2,000020,i
	con	0,002000,1,1
	declend
	filen	imsutils.icn
	line	65
	colm	11
	synt	any
	mark	L1
	line	68
	colm	4
	synt	if
	mark0
	pnull
	pnull
	var	0
	line	68
	colm	7
	synt	any
	size
	pnull
	var	1
	line	68
	colm	16
	synt	any
	size
	line	68
	colm	13
	synt	any
	numne
	unmark
	line	68
	colm	27
	synt	any
	pfail
	line	68
	colm	4
	synt	endif
	unmark
lab L1
	mark	L2
	line	69
	colm	4
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	0
	line	69
	colm	7
	synt	any
	size
	size
	pnull
	pnull
	var	1
	line	69
	colm	17
	synt	any
	size
	size
	line	69
	colm	14
	synt	any
	numne
	unmark
	line	69
	colm	29
	synt	any
	pfail
	line	69
	colm	4
	synt	endif
	unmark
lab L2
	mark	L3
	line	71
	colm	4
	synt	every
	mark0
	pnull
	var	2
	pnull
	int	0
	pnull
	var	0
	line	71
	colm	20
	synt	any
	size
	push1
	line	71
	colm	17
	synt	any
	toby
	line	71
	colm	12
	synt	any
	asgn
	pop
	mark0
	line	72
	colm	7
	synt	if
	mark0
	pnull
	pnull
	var	0
	var	2
	line	72
	colm	14
	synt	any
	subsc
	pnull
	var	1
	int	0
	line	72
	colm	26
	synt	any
	subsc
	line	72
	colm	18
	synt	any
	lexne
	unmark
	line	72
	colm	35
	synt	any
	pfail
	line	72
	colm	7
	synt	endif
	unmark
lab L4
	efail
lab L5
	line	71
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	mark	L7
	var	1
	line	74
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	76
	colm	1
	synt	any
	pfail
	end
proc XDrawTile
	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,DrawImage
	local	14,000000,tiledim
	local	15,000000,EraseArea
	local	16,000000,rowbits
	local	17,000000,put
	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
	line	81
	colm	11
	synt	any
	mark	L1
	line	84
	colm	4
	synt	if
	mark0
	pnull
	var	12
	var	0
	line	84
	colm	11
	synt	any
	invoke	1
	str	0
	line	84
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	pnull
	var	2
	pnull
	var	3
	var	5
	line	85
	colm	41
	synt	any
	swap
	line	85
	colm	29
	synt	any
	swap
	line	85
	colm	20
	synt	any
	swap
	line	85
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	86
	colm	14
	synt	any
	keywd	window
	line	86
	colm	11
	synt	any
	asgn
	line	84
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	line	89
	colm	4
	synt	ifelse
	mark	L4
	pnull
	var	4
	int	1
	line	89
	colm	14
	synt	any
	numeq
	unmark
	var	13
	var	0
	var	1
	var	2
	var	3
	var	5
	line	89
	colm	32
	synt	any
	invoke	5
	goto	L5
lab L4
	mark	L6
	line	91
	colm	7
	synt	if
	mark0
	pnull
	var	5
	line	91
	colm	10
	synt	any
	nonnull
	unmark
	mark	L7
	pnull
	var	10
	var	14
	var	3
	line	92
	colm	25
	synt	any
	invoke	1
	line	92
	colm	15
	synt	any
	asgn
	unmark
lab L7
	var	15
	var	1
	var	2
	pnull
	pnull
	var	10
	line	93
	colm	36
	synt	any
	field	w
	var	4
	line	93
	colm	39
	synt	any
	mult
	pnull
	pnull
	var	10
	line	93
	colm	53
	synt	any
	field	h
	var	4
	line	93
	colm	56
	synt	any
	mult
	line	93
	colm	19
	synt	any
	invoke	4
	line	91
	colm	7
	synt	endif
	unmark
lab L6
	mark	L8
	pnull
	var	7
	var	2
	line	95
	colm	9
	synt	any
	asgn
	unmark
lab L8
	line	96
	colm	7
	synt	every
	mark0
	pnull
	var	8
	var	16
	var	3
	line	96
	colm	27
	synt	any
	invoke	1
	line	96
	colm	17
	synt	any
	asgn
	pop
	mark0
	mark	L11
	pnull
	var	6
	var	1
	line	97
	colm	12
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	var	11
	pnull
	line	98
	colm	21
	synt	any
	llist	0
	line	98
	colm	18
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	line	99
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	99
	colm	25
	synt	any
	bang
	line	99
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L16
	line	100
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	100
	colm	22
	synt	any
	numeq
	unmark
	var	17
	var	11
	var	6
	var	7
	var	4
	var	4
	line	100
	colm	36
	synt	any
	invoke	5
	line	100
	colm	13
	synt	endif
	unmark
lab L16
	pnull
	var	6
	dup
	var	4
	line	101
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L14
	efail
lab L15
	line	99
	colm	10
	synt	endevery
	unmark
lab L13
	mark	L17
	pnull
	var	7
	dup
	var	4
	line	103
	colm	12
	synt	any
	plus
	asgn
	unmark
lab L17
	mark	L18
	line	104
	colm	10
	synt	if
	mark0
	pnull
	pnull
	var	11
	line	104
	colm	13
	synt	any
	size
	int	3
	line	104
	colm	22
	synt	any
	numeq
	unmark
	unmark
	unmark
	goto	L9
	line	104
	colm	10
	synt	endif
	unmark
lab L18
	var	18
	var	11
	invoke	-1
	unmark
lab L9
	efail
lab L10
	line	96
	colm	7
	synt	endevery
lab L5
	line	89
	colm	4
	synt	endifelse
	unmark
lab L3
	mark	L19
	mark	L20
	pnull
	line	109
	colm	4
	synt	any
	pret
lab L20
	synt	any
	pfail
	unmark
lab L19
	pnull
	line	111
	colm	1
	synt	any
	pfail
	end
proc XDrawRows
	local	0,001000,win
	local	1,001000,xoff
	local	2,001000,yoff
	local	3,001000,imx
	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	116
	colm	11
	synt	any
	mark	L1
	line	119
	colm	4
	synt	if
	mark0
	pnull
	var	11
	var	0
	line	119
	colm	11
	synt	any
	invoke	1
	str	0
	line	119
	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	120
	colm	48
	synt	any
	swap
	line	120
	colm	37
	synt	any
	swap
	line	120
	colm	29
	synt	any
	swap
	line	120
	colm	20
	synt	any
	swap
	line	120
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	121
	colm	14
	synt	any
	keywd	window
	line	121
	colm	11
	synt	any
	asgn
	line	119
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	pnull
	var	4
	line	124
	colm	4
	synt	any
	null
	int	1
	line	124
	colm	12
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	7
	var	2
	line	126
	colm	6
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	line	128
	colm	4
	synt	if
	mark0
	pnull
	var	5
	line	128
	colm	7
	synt	any
	nonnull
	unmark
	var	12
	var	1
	var	2
	pnull
	pnull
	pnull
	var	3
	int	1
	line	129
	colm	33
	synt	any
	subsc
	line	129
	colm	29
	synt	any
	size
	var	4
	line	129
	colm	37
	synt	any
	mult
	pnull
	pnull
	var	3
	line	129
	colm	47
	synt	any
	size
	var	4
	line	129
	colm	52
	synt	any
	mult
	line	129
	colm	16
	synt	any
	invoke	4
	line	128
	colm	4
	synt	endif
	unmark
lab L5
	mark	L6
	line	131
	colm	4
	synt	every
	mark0
	pnull
	var	8
	pnull
	var	3
	line	131
	colm	17
	synt	any
	bang
	line	131
	colm	14
	synt	any
	asgn
	pop
	mark0
	mark	L9
	pnull
	var	6
	var	1
	line	132
	colm	9
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	var	10
	pnull
	line	133
	colm	18
	synt	any
	llist	0
	line	133
	colm	15
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	line	135
	colm	7
	synt	ifelse
	mark	L12
	pnull
	var	4
	int	1
	line	135
	colm	17
	synt	any
	numeq
	unmark
	mark	L14
	line	136
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	136
	colm	25
	synt	any
	bang
	line	136
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L17
	line	137
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	137
	colm	22
	synt	any
	lexeq
	unmark
	var	13
	var	10
	var	6
	var	7
	line	137
	colm	37
	synt	any
	invoke	3
	line	137
	colm	13
	synt	endif
	unmark
lab L17
	pnull
	var	6
	dup
	int	1
	line	138
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L15
	efail
lab L16
	line	136
	colm	10
	synt	endevery
	unmark
lab L14
	pnull
	var	7
	dup
	int	1
	line	140
	colm	12
	synt	any
	plus
	asgn
	goto	L13
lab L12
	mark	L18
	line	143
	colm	10
	synt	every
	mark0
	pnull
	var	9
	pnull
	var	8
	line	143
	colm	25
	synt	any
	bang
	line	143
	colm	22
	synt	any
	asgn
	pop
	mark0
	mark	L21
	line	144
	colm	13
	synt	if
	mark0
	pnull
	var	9
	str	2
	line	144
	colm	22
	synt	any
	numeq
	unmark
	var	13
	var	10
	var	6
	var	7
	var	4
	var	4
	line	144
	colm	36
	synt	any
	invoke	5
	line	144
	colm	13
	synt	endif
	unmark
lab L21
	pnull
	var	6
	dup
	var	4
	line	145
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L19
	efail
lab L20
	line	143
	colm	10
	synt	endevery
	unmark
lab L18
	pnull
	var	7
	dup
	var	4
	line	147
	colm	12
	synt	any
	plus
	asgn
lab L13
	line	135
	colm	7
	synt	endifelse
	unmark
lab L11
	mark	L22
	line	149
	colm	7
	synt	if
	mark0
	pnull
	pnull
	var	10
	line	149
	colm	10
	synt	any
	size
	int	3
	line	149
	colm	19
	synt	any
	numeq
	unmark
	unmark
	unmark
	goto	L7
	line	149
	colm	7
	synt	endif
	unmark
lab L22
	line	150
	colm	7
	synt	ifelse
	mark	L23
	pnull
	var	4
	int	1
	line	150
	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	150
	colm	7
	synt	endifelse
	unmark
lab L7
	efail
lab L8
	line	131
	colm	4
	synt	endevery
	unmark
lab L6
	mark	L25
	mark	L26
	pnull
	line	153
	colm	4
	synt	any
	pret
lab L26
	synt	any
	pfail
	unmark
lab L25
	pnull
	line	155
	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	160
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	1
	var	3
	line	165
	colm	22
	synt	any
	invoke	0
	line	165
	colm	14
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	1
	str	0
	line	166
	colm	13
	synt	any
	subsc
	str	1
	line	166
	colm	22
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	1
	str	2
	line	167
	colm	13
	synt	any
	subsc
	str	3
	line	167
	colm	22
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	pnull
	var	1
	str	4
	line	168
	colm	13
	synt	any
	subsc
	str	5
	line	168
	colm	22
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	pnull
	var	1
	str	6
	line	169
	colm	13
	synt	any
	subsc
	str	7
	line	169
	colm	22
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	pnull
	var	1
	str	8
	line	170
	colm	13
	synt	any
	subsc
	str	9
	line	170
	colm	22
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	pnull
	var	1
	str	10
	line	171
	colm	13
	synt	any
	subsc
	str	11
	line	171
	colm	22
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	pnull
	pnull
	var	1
	str	12
	line	172
	colm	13
	synt	any
	subsc
	str	13
	line	172
	colm	22
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	pnull
	var	1
	str	14
	line	173
	colm	13
	synt	any
	subsc
	str	15
	line	173
	colm	22
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	pnull
	pnull
	var	1
	str	16
	line	174
	colm	13
	synt	any
	subsc
	str	17
	line	174
	colm	22
	synt	any
	asgn
	unmark
lab L13
	mark	L14
	pnull
	pnull
	var	1
	str	18
	line	175
	colm	13
	synt	any
	subsc
	str	19
	line	175
	colm	22
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	pnull
	pnull
	var	1
	str	20
	line	176
	colm	13
	synt	any
	subsc
	str	21
	line	176
	colm	22
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	pnull
	var	1
	str	22
	line	177
	colm	13
	synt	any
	subsc
	str	23
	line	177
	colm	22
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	pnull
	pnull
	var	1
	str	24
	line	178
	colm	13
	synt	any
	subsc
	str	25
	line	178
	colm	22
	synt	any
	asgn
	unmark
lab L17
	mark	L18
	pnull
	pnull
	var	1
	str	26
	line	179
	colm	13
	synt	any
	subsc
	str	27
	line	179
	colm	22
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	pnull
	pnull
	var	1
	str	28
	line	180
	colm	13
	synt	any
	subsc
	str	29
	line	180
	colm	22
	synt	any
	asgn
	unmark
lab L19
	pnull
	pnull
	var	1
	str	30
	line	181
	colm	13
	synt	any
	subsc
	str	31
	line	181
	colm	22
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L20
	pnull
	var	2
	str	32
	line	184
	colm	8
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	var	0
	line	186
	colm	6
	synt	any
	bscan
	mark	L22
lab L23
	line	187
	colm	8
	synt	while
	mark0
	pnull
	var	2
	pnull
	pnull
	var	1
	var	4
	int	33
	line	187
	colm	32
	synt	any
	invoke	1
	line	187
	colm	27
	synt	any
	subsc
	var	2
	line	187
	colm	37
	synt	any
	cat
	line	187
	colm	18
	synt	any
	asgn
lab L24
	unmark
	goto	L23
lab L25
	line	187
	colm	8
	synt	endwhile
	unmark
lab L22
	line	188
	colm	8
	synt	if
	mark0
	mark	L26
	var	5
	int	34
	line	188
	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	188
	colm	49
	synt	any
	invoke	1
	int	33
	str	1
	line	188
	colm	45
	synt	any
	invoke	3
	line	188
	colm	40
	synt	any
	subsc
	var	2
	line	188
	colm	63
	synt	any
	cat
	line	188
	colm	31
	synt	any
	asgn
	line	188
	colm	8
	synt	endif
	line	186
	colm	6
	synt	any
	escan
	unmark
lab L21
	mark	L27
	mark	L28
	var	2
	line	191
	colm	4
	synt	any
	pret
lab L28
	synt	any
	pfail
	unmark
lab L27
	pnull
	line	193
	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	198
	colm	11
	synt	any
	mark	L1
	var	0
	line	201
	colm	12
	synt	any
	bscan
	mark	L2
	line	202
	colm	7
	synt	if
	mark0
	mark	L3
	var	4
	str	0
	line	202
	colm	18
	synt	any
	invoke	1
	unmark
	efail
lab L3
	pnull
	unmark
	mark	L4
	var	0
	line	202
	colm	29
	synt	any
	pret
lab L4
	synt	any
	pfail
	line	202
	colm	7
	synt	endif
	unmark
lab L2
	mark	L5
	pnull
	var	1
	var	5
	var	4
	cset	1
	line	203
	colm	23
	synt	any
	invoke	1
	line	203
	colm	18
	synt	any
	invoke	1
	line	203
	colm	12
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	var	6
	int	2
	line	204
	colm	11
	synt	any
	invoke	1
	unmark
lab L6
	mark	L7
	pnull
	var	2
	pnull
	pnull
	var	1
	int	3
	line	205
	colm	22
	synt	any
	plus
	int	4
	line	205
	colm	27
	synt	any
	div
	line	205
	colm	13
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	3
	pnull
	var	1
	str	5
	line	206
	colm	19
	synt	any
	cat
	line	206
	colm	11
	synt	any
	asgn
	unmark
lab L8
lab L9
	line	207
	colm	7
	synt	while
	mark0
	pnull
	var	3
	dup
	pnull
	var	7
	pnull
	str	6
	var	6
	var	2
	line	207
	colm	43
	synt	any
	invoke	1
	line	207
	colm	36
	synt	any
	cat
	line	207
	colm	29
	synt	any
	invoke	1
	str	5
	line	207
	colm	52
	synt	any
	cat
	line	207
	colm	17
	synt	any
	cat
	asgn
lab L10
	unmark
	goto	L9
lab L11
	line	207
	colm	7
	synt	endwhile
	line	201
	colm	12
	synt	any
	escan
	unmark
lab L1
	mark	L12
	mark	L13
	pnull
	var	3
	int	7
	pnull
	int	7
	line	210
	colm	17
	synt	any
	neg
	line	210
	colm	16
	synt	any
	synt	any
	sect
	line	210
	colm	4
	synt	any
	pret
lab L13
	synt	any
	pfail
	unmark
lab L12
	pnull
	line	212
	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	218
	colm	11
	synt	any
	mark	L1
	var	0
	line	220
	colm	9
	synt	any
	bscan
	mark	L2
	var	1
	var	2
	cset	0
	line	221
	colm	15
	synt	any
	invoke	1
	line	221
	colm	10
	synt	any
	invoke	1
	unmark
lab L2
	mark	L3
	var	1
	mark	L4
	var	3
	cset	0
	line	222
	colm	22
	synt	any
	invoke	1
	line	222
	colm	30
	synt	any
	esusp
	goto	L5
lab L4
	int	1
lab L5
	line	222
	colm	17
	synt	any
	invoke	1
	line	222
	colm	7
	synt	any
	pret
lab L3
	synt	any
	pfail
	line	220
	colm	9
	synt	any
	escan
	unmark
lab L1
	pnull
	line	225
	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	231
	colm	11
	synt	any
	mark	L1
	var	0
	line	233
	colm	9
	synt	any
	bscan
	mark	L2
	var	1
	var	2
	cset	0
	line	234
	colm	15
	synt	any
	invoke	1
	line	234
	colm	10
	synt	any
	invoke	1
	unmark
lab L2
	mark	L3
	mark	L4
	var	1
	var	3
	cset	0
	line	235
	colm	15
	synt	any
	invoke	1
	line	235
	colm	10
	synt	any
	invoke	1
	line	235
	colm	24
	synt	any
	esusp
	goto	L5
lab L4
	mark	L6
	str	1
	line	235
	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	236
	colm	15
	synt	any
	invoke	1
	line	236
	colm	10
	synt	any
	invoke	1
	line	236
	colm	22
	synt	any
	esusp
	goto	L9
lab L8
	mark	L10
	str	1
	line	236
	colm	24
	synt	any
	pret
lab L10
	synt	any
	pfail
lab L9
	unmark
lab L7
	mark	L11
	var	1
	var	2
	cset	3
	line	237
	colm	15
	synt	any
	invoke	1
	line	237
	colm	10
	synt	any
	invoke	1
	unmark
lab L11
	mark	L12
	var	1
	int	4
	line	238
	colm	17
	synt	any
	invoke	1
	line	238
	colm	7
	synt	any
	pret
lab L12
	synt	any
	pfail
	line	233
	colm	9
	synt	any
	escan
	unmark
lab L1
	pnull
	line	241
	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	245
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	1
	var	3
	line	250
	colm	22
	synt	any
	invoke	0
	line	250
	colm	14
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	1
	str	0
	line	251
	colm	13
	synt	any
	subsc
	str	1
	line	251
	colm	19
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	1
	str	2
	line	252
	colm	13
	synt	any
	subsc
	str	3
	line	252
	colm	19
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	pnull
	var	1
	str	4
	line	253
	colm	13
	synt	any
	subsc
	str	5
	line	253
	colm	19
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	pnull
	var	1
	str	6
	line	254
	colm	13
	synt	any
	subsc
	str	7
	line	254
	colm	19
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	pnull
	var	1
	str	8
	line	255
	colm	13
	synt	any
	subsc
	str	9
	line	255
	colm	19
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	pnull
	pnull
	var	1
	str	10
	line	256
	colm	13
	synt	any
	subsc
	str	11
	line	256
	colm	19
	synt	any
	asgn
	unmark
lab L10
	mark	L11
	pnull
	pnull
	var	1
	str	12
	line	257
	colm	13
	synt	any
	subsc
	str	13
	line	257
	colm	19
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	pnull
	var	1
	str	14
	line	258
	colm	13
	synt	any
	subsc
	str	15
	line	258
	colm	19
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	pnull
	pnull
	var	1
	str	16
	line	259
	colm	13
	synt	any
	subsc
	str	17
	line	259
	colm	19
	synt	any
	asgn
	unmark
lab L13
	mark	L14
	pnull
	pnull
	var	1
	str	18
	line	260
	colm	13
	synt	any
	subsc
	str	19
	line	260
	colm	19
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	pnull
	pnull
	var	1
	str	20
	line	261
	colm	13
	synt	any
	subsc
	str	21
	line	261
	colm	19
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	pnull
	var	1
	str	22
	line	262
	colm	13
	synt	any
	subsc
	str	23
	line	262
	colm	19
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	pnull
	pnull
	var	1
	str	24
	line	263
	colm	13
	synt	any
	subsc
	str	25
	line	263
	colm	19
	synt	any
	asgn
	unmark
lab L17
	mark	L18
	pnull
	pnull
	var	1
	str	26
	line	264
	colm	13
	synt	any
	subsc
	str	27
	line	264
	colm	19
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	pnull
	pnull
	var	1
	str	28
	line	265
	colm	13
	synt	any
	subsc
	str	29
	line	265
	colm	19
	synt	any
	asgn
	unmark
lab L19
	pnull
	pnull
	var	1
	str	30
	line	266
	colm	13
	synt	any
	subsc
	str	31
	line	266
	colm	19
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L20
	pnull
	var	2
	str	32
	line	269
	colm	9
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	var	4
	var	0
	line	271
	colm	7
	synt	any
	invoke	1
	line	271
	colm	11
	synt	any
	bscan
lab L22
	line	272
	colm	7
	synt	while
	mark0
	pnull
	var	2
	dup
	pnull
	var	1
	var	5
	int	33
	line	272
	colm	34
	synt	any
	invoke	1
	line	272
	colm	29
	synt	any
	subsc
	line	272
	colm	18
	synt	any
	cat
	asgn
lab L23
	unmark
	goto	L22
lab L24
	line	272
	colm	7
	synt	endwhile
	line	271
	colm	11
	synt	any
	escan
	unmark
lab L21
	mark	L25
	mark	L26
	var	2
	line	275
	colm	4
	synt	any
	pret
lab L26
	synt	any
	pfail
	unmark
lab L25
	pnull
	line	277
	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	282
	colm	11
	synt	any
	mark	L1
	var	0
	line	285
	colm	12
	synt	any
	bscan
	mark	L2
	line	286
	colm	7
	synt	if
	mark0
	var	4
	str	0
	line	286
	colm	14
	synt	any
	invoke	1
	unmark
	mark	L3
	var	0
	line	286
	colm	25
	synt	any
	pret
lab L3
	synt	any
	pfail
	line	286
	colm	7
	synt	endif
	unmark
lab L2
	mark	L4
	pnull
	var	1
	var	5
	var	6
	cset	1
	line	287
	colm	23
	synt	any
	invoke	1
	line	287
	colm	18
	synt	any
	invoke	1
	line	287
	colm	12
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	var	7
	int	2
	line	288
	colm	11
	synt	any
	invoke	1
	unmark
lab L5
	mark	L6
	pnull
	var	2
	pnull
	pnull
	var	1
	int	3
	line	289
	colm	22
	synt	any
	plus
	int	4
	line	289
	colm	27
	synt	any
	div
	line	289
	colm	13
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	3
	pnull
	var	1
	str	5
	line	290
	colm	19
	synt	any
	cat
	line	290
	colm	11
	synt	any
	asgn
	unmark
lab L7
lab L8
	line	291
	colm	7
	synt	while
	mark0
	pnull
	var	3
	dup
	var	8
	var	9
	var	5
	mark	L11
	var	6
	cset	1
	line	291
	colm	45
	synt	any
	invoke	1
	line	291
	colm	51
	synt	any
	esusp
	goto	L12
lab L11
	int	6
lab L12
	line	291
	colm	40
	synt	any
	invoke	1
	int	7
	line	291
	colm	36
	synt	any
	invoke	2
	var	2
	str	8
	line	291
	colm	27
	synt	any
	invoke	3
	line	291
	colm	17
	synt	any
	cat
	asgn
	unmark
	mark	L8
	mark	L13
	var	7
	int	2
	line	292
	colm	14
	synt	any
	invoke	1
	line	292
	colm	18
	synt	any
	esusp
	goto	L14
lab L13
	unmark
	pnull
	goto	L10
lab L14
lab L9
	unmark
	goto	L8
lab L10
	line	291
	colm	7
	synt	endwhile
	line	285
	colm	12
	synt	any
	escan
	unmark
lab L1
	mark	L15
	mark	L16
	var	3
	line	295
	colm	4
	synt	any
	pret
lab L16
	synt	any
	pfail
	unmark
lab L15
	pnull
	line	297
	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	303
	colm	11
	synt	any
	mark	L1
	line	305
	colm	4
	synt	if
	mark0
	mark	L2
	var	1
	var	0
	line	305
	colm	20
	synt	any
	invoke	1
	unmark
	efail
lab L2
	pnull
	unmark
	line	305
	colm	32
	synt	any
	pfail
	line	305
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	var	0
	line	307
	colm	9
	synt	any
	bscan
	line	308
	colm	7
	synt	ifelse
	mark	L4
	pnull
	pnull
	int	0
	var	2
	var	3
	var	4
	cset	1
	line	308
	colm	30
	synt	any
	invoke	1
	line	308
	colm	25
	synt	any
	invoke	1
	line	308
	colm	21
	synt	any
	invoke	1
	line	308
	colm	12
	synt	any
	numlt
	int	2
	line	308
	colm	38
	synt	any
	numle
	unmark
	mark	L6
	var	0
	line	308
	colm	49
	synt	any
	pret
lab L6
	synt	any
	pfail
	goto	L5
lab L4
	line	309
	colm	12
	synt	any
	pfail
lab L5
	line	308
	colm	7
	synt	endifelse
	line	307
	colm	9
	synt	any
	escan
	unmark
lab L3
	pnull
	line	312
	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	318
	colm	11
	synt	any
	mark	L1
	var	1
	var	0
	line	320
	colm	7
	synt	any
	invoke	1
	line	320
	colm	14
	synt	any
	bscan
	mark	L2
	mark	L3
	var	2
	var	3
	line	321
	colm	17
	synt	any
	keywd	digits
	line	321
	colm	16
	synt	any
	invoke	1
	line	321
	colm	11
	synt	any
	invoke	1
	pop
	pnull
	str	0
	line	321
	colm	29
	synt	any
	tabmat
	line	321
	colm	35
	synt	any
	esusp
	goto	L4
lab L3
	line	321
	colm	37
	synt	any
	pfail
lab L4
	unmark
lab L2
	line	322
	colm	7
	synt	ifelse
	mark	L5
	pnull
	str	1
	line	322
	colm	10
	synt	any
	tabmat
	unmark
	mark	L7
	var	2
	var	3
	cset	2
	line	322
	colm	29
	synt	any
	invoke	1
	line	322
	colm	24
	synt	any
	invoke	1
	pop
	var	4
	int	3
	line	322
	colm	56
	synt	any
	invoke	1
	line	322
	colm	61
	synt	any
	esusp
	goto	L8
lab L7
	line	322
	colm	63
	synt	any
	pfail
lab L8
	goto	L6
lab L5
	mark	L9
lab L10
	line	324
	colm	10
	synt	while
	mark0
	var	2
	var	3
	line	324
	colm	25
	synt	any
	keywd	digits
	line	324
	colm	24
	synt	any
	invoke	1
	line	324
	colm	19
	synt	any
	invoke	1
	unmark
	mark	L10
	line	325
	colm	13
	synt	ifelse
	mark	L13
	var	4
	int	3
	line	325
	colm	19
	synt	any
	invoke	1
	unmark
	unmark
	pnull
	goto	L12
	goto	L14
lab L13
	mark	L15
	pnull
	str	0
	line	326
	colm	18
	synt	any
	tabmat
	line	326
	colm	23
	synt	any
	esusp
	goto	L16
lab L15
	line	326
	colm	25
	synt	any
	pfail
lab L16
lab L14
	line	325
	colm	13
	synt	endifelse
lab L11
	unmark
	goto	L10
lab L12
	line	324
	colm	10
	synt	endwhile
	unmark
lab L9
	line	328
	colm	10
	synt	if
	mark0
	mark	L17
	var	4
	int	3
	line	328
	colm	20
	synt	any
	invoke	1
	unmark
	efail
lab L17
	pnull
	unmark
	line	328
	colm	29
	synt	any
	pfail
	line	328
	colm	10
	synt	endif
lab L6
	line	322
	colm	7
	synt	endifelse
	line	320
	colm	14
	synt	any
	escan
	unmark
lab L1
	mark	L18
	mark	L19
	pnull
	var	5
	var	6
	var	0
	line	332
	colm	26
	synt	any
	invoke	1
	line	332
	colm	18
	synt	any
	invoke	1
	var	0
	line	332
	colm	34
	synt	any
	lexeq
	line	332
	colm	4
	synt	any
	pret
lab L19
	synt	any
	pfail
	unmark
lab L18
	pnull
	line	334
	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	339
	colm	11
	synt	any
	mark	L1
	pnull
	pnull
	var	1
	line	342
	colm	4
	synt	any
	null
	str	0
	line	342
	colm	10
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	5
	var	0
	line	344
	colm	19
	synt	any
	invoke	1
	line	344
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	var	6
	str	1
	var	1
	str	2
	pnull
	var	2
	line	347
	colm	43
	synt	any
	field	w
	line	347
	colm	9
	synt	any
	invoke	4
	unmark
lab L3
	mark	L4
	var	6
	str	1
	var	1
	str	3
	pnull
	var	2
	line	348
	colm	44
	synt	any
	field	h
	line	348
	colm	9
	synt	any
	invoke	4
	unmark
lab L4
	mark	L5
	var	6
	str	4
	var	1
	str	5
	line	349
	colm	9
	synt	any
	invoke	3
	unmark
lab L5
	mark	L6
	pnull
	var	3
	pnull
	pnull
	pnull
	var	2
	line	351
	colm	18
	synt	any
	field	w
	int	6
	line	351
	colm	21
	synt	any
	plus
	int	7
	line	351
	colm	26
	synt	any
	div
	line	351
	colm	10
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	var	0
	line	353
	colm	12
	synt	any
	bscan
	mark	L8
	var	7
	pnull
	var	8
	cset	8
	line	354
	colm	15
	synt	any
	invoke	1
	int	9
	line	354
	colm	21
	synt	any
	plus
	line	354
	colm	10
	synt	any
	invoke	1
	unmark
lab L8
lab L9
	line	355
	colm	7
	synt	while
	mark0
	pnull
	var	4
	var	9
	var	3
	line	355
	colm	24
	synt	any
	invoke	1
	line	355
	colm	17
	synt	any
	asgn
	unmark
	mark	L9
	mark	L12
	line	356
	colm	10
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	4
	line	356
	colm	13
	synt	any
	size
	int	10
	line	356
	colm	18
	synt	any
	mod
	int	11
	line	356
	colm	22
	synt	any
	numne
	unmark
	pnull
	var	4
	pnull
	str	12
	var	4
	line	356
	colm	43
	synt	any
	cat
	line	356
	colm	36
	synt	any
	asgn
	line	356
	colm	10
	synt	endif
	unmark
lab L12
	mark	L13
	var	4
	line	357
	colm	14
	synt	any
	bscan
	mark	L14
	var	7
	int	11
	line	358
	colm	16
	synt	any
	invoke	1
	unmark
lab L14
lab L15
	line	359
	colm	13
	synt	while
	mark0
	var	10
	str	13
	var	9
	pnull
	int	10
	line	359
	colm	37
	synt	any
	neg
	line	359
	colm	36
	synt	any
	invoke	1
	str	14
	line	359
	colm	25
	synt	any
	invoke	3
lab L16
	unmark
	goto	L15
lab L17
	line	359
	colm	13
	synt	endwhile
	line	357
	colm	14
	synt	any
	escan
	unmark
lab L13
	var	6
	line	361
	colm	15
	synt	any
	invoke	0
lab L10
	unmark
	goto	L9
lab L11
	line	355
	colm	7
	synt	endwhile
	line	353
	colm	12
	synt	any
	escan
	unmark
lab L7
	mark	L18
	var	6
	str	15
	line	365
	colm	9
	synt	any
	invoke	1
	unmark
lab L18
	pnull
	line	367
	colm	1
	synt	any
	pfail
	end
proc tilebits
	local	0,001000,imx
	local	1,000020,bits
	con	0,002000,1,0
	declend
	line	372
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	int	0
	line	375
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	377
	colm	4
	synt	every
	mark0
	pnull
	var	1
	dup
	pnull
	pnull
	var	0
	line	377
	colm	20
	synt	any
	bang
	line	377
	colm	19
	synt	any
	bang
	line	377
	colm	15
	synt	any
	plus
	asgn
	pop
lab L3
	efail
lab L4
	line	377
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	379
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	381
	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	386
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	3
	var	0
	line	390
	colm	19
	synt	any
	invoke	1
	line	390
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	4
	var	0
	line	392
	colm	11
	synt	any
	invoke	1
	line	392
	colm	21
	synt	any
	bscan
	mark	L3
	pnull
	var	1
	int	0
	line	393
	colm	12
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	line	394
	colm	7
	synt	every
	mark0
	var	5
	var	0
	line	394
	colm	20
	synt	any
	invoke	1
	line	394
	colm	30
	synt	any
	bscan
	line	395
	colm	10
	synt	every
	mark0
	var	6
	cset	1
	line	395
	colm	20
	synt	any
	invoke	1
	pop
	mark0
	pnull
	var	1
	dup
	int	2
	line	396
	colm	18
	synt	any
	plus
	asgn
	unmark
lab L7
	efail
lab L8
	line	395
	colm	10
	synt	endevery
	line	394
	colm	30
	synt	any
	escan
	pop
lab L5
	efail
lab L6
	line	394
	colm	7
	synt	endevery
	unmark
lab L4
	mark	L9
	pnull
	var	1
	var	7
	pnull
	pnull
	var	2
	line	398
	colm	30
	synt	any
	field	w
	pnull
	var	2
	line	398
	colm	39
	synt	any
	field	h
	line	398
	colm	33
	synt	any
	mult
	line	398
	colm	25
	synt	any
	invoke	1
	line	398
	colm	19
	synt	any
	div
	line	398
	colm	7
	synt	any
	pret
lab L9
	synt	any
	pfail
	line	392
	colm	21
	synt	any
	escan
	unmark
lab L2
	pnull
	line	401
	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,tile
	local	7,000020,pattern
	local	8,000020,pixels
	local	9,000020,y0
	local	10,000000,Pixel
	local	11,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	406
	colm	11
	synt	any
	mark	L1
	pnull
	var	7
	str	0
	line	409
	colm	12
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	411
	colm	4
	synt	every
	mark0
	pnull
	var	9
	pnull
	int	1
	pnull
	var	4
	int	2
	line	411
	colm	26
	synt	any
	minus
	push1
	line	411
	colm	18
	synt	any
	toby
	line	411
	colm	13
	synt	any
	asgn
	pop
	mark0
	mark	L5
	pnull
	var	8
	str	0
	line	412
	colm	14
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	line	413
	colm	7
	synt	every
	mark0
	pnull
	var	5
	var	10
	var	0
	var	1
	pnull
	var	9
	var	2
	line	413
	colm	38
	synt	any
	plus
	var	3
	int	2
	line	413
	colm	23
	synt	any
	invoke	5
	line	413
	colm	15
	synt	any
	asgn
	pop
	mark0
	pnull
	var	8
	dup
	line	414
	colm	23
	synt	ifelse
	mark	L9
	pnull
	var	5
	str	3
	line	414
	colm	28
	synt	any
	lexeq
	unmark
	str	4
	goto	L10
lab L9
	str	5
lab L10
	line	414
	colm	23
	synt	endifelse
	line	414
	colm	17
	synt	any
	cat
	asgn
	unmark
lab L7
	efail
lab L8
	line	413
	colm	7
	synt	endevery
	unmark
lab L6
	pnull
	var	7
	dup
	var	11
	var	8
	line	415
	colm	28
	synt	any
	invoke	1
	line	415
	colm	15
	synt	any
	cat
	asgn
	unmark
lab L3
	efail
lab L4
	line	411
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L11
	line	418
	colm	4
	synt	ifelse
	mark	L12
	pnull
	pnull
	var	7
	line	418
	colm	7
	synt	any
	size
	int	1
	line	418
	colm	16
	synt	any
	numeq
	unmark
	line	418
	colm	25
	synt	any
	pfail
	goto	L13
lab L12
	mark	L14
	pnull
	pnull
	var	3
	str	6
	line	419
	colm	21
	synt	any
	cat
	var	7
	line	419
	colm	29
	synt	any
	cat
	line	419
	colm	9
	synt	any
	pret
lab L14
	synt	any
	pfail
lab L13
	line	418
	colm	4
	synt	endifelse
	unmark
lab L11
	pnull
	line	421
	colm	1
	synt	any
	pfail
	end
proc readims
	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	428
	colm	11
	synt	any
	mark	L1
lab L2
	line	431
	colm	4
	synt	while
	mark0
	pnull
	var	1
	var	2
	var	0
	line	431
	colm	22
	synt	any
	invoke	1
	line	431
	colm	15
	synt	any
	asgn
	unmark
	mark	L2
	var	1
	line	432
	colm	12
	synt	any
	bscan
	mark	L5
	line	433
	colm	10
	synt	if
	mark0
	mark	L6
	var	3
	int	0
	line	433
	colm	16
	synt	any
	invoke	1
	line	433
	colm	20
	synt	any
	esusp
	goto	L7
lab L6
	pnull
	str	1
	line	433
	colm	22
	synt	any
	tabmat
lab L7
	unmark
	unmark
	goto	L3
	line	433
	colm	10
	synt	endif
	unmark
lab L5
	mark	L8
	var	4
	mark	L9
	var	5
	cset	2
	line	434
	colm	25
	synt	any
	invoke	1
	line	434
	colm	33
	synt	any
	esusp
	goto	L10
lab L9
	int	0
lab L10
	line	434
	colm	20
	synt	any
	invoke	1
	line	434
	colm	10
	synt	any
	pret
lab L8
	synt	any
	pfail
	line	432
	colm	12
	synt	any
	escan
lab L3
	unmark
	goto	L2
lab L4
	line	431
	colm	4
	synt	endwhile
	unmark
lab L1
	mark	L11
	line	437
	colm	4
	synt	any
	pfail
	unmark
lab L11
	pnull
	line	439
	colm	1
	synt	any
	pfail
	end
proc readimsline
	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	446
	colm	11
	synt	any
	mark	L1
lab L2
	line	449
	colm	4
	synt	while
	mark0
	pnull
	var	1
	var	2
	var	0
	line	449
	colm	22
	synt	any
	invoke	1
	line	449
	colm	15
	synt	any
	asgn
	unmark
	mark	L2
	var	1
	line	450
	colm	12
	synt	any
	bscan
	mark	L5
	line	451
	colm	10
	synt	if
	mark0
	mark	L6
	var	3
	int	0
	line	451
	colm	16
	synt	any
	invoke	1
	line	451
	colm	20
	synt	any
	esusp
	goto	L7
lab L6
	pnull
	str	1
	line	451
	colm	22
	synt	any
	tabmat
lab L7
	unmark
	unmark
	goto	L3
	line	451
	colm	10
	synt	endif
	unmark
lab L5
	mark	L8
	var	4
	int	0
	line	452
	colm	20
	synt	any
	invoke	1
	line	452
	colm	10
	synt	any
	pret
lab L8
	synt	any
	pfail
	line	450
	colm	12
	synt	any
	escan
lab L3
	unmark
	goto	L2
lab L4
	line	449
	colm	4
	synt	endwhile
	unmark
lab L1
	mark	L9
	line	455
	colm	4
	synt	any
	pfail
	unmark
lab L9
	pnull
	line	457
	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	463
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	5
	var	0
	line	466
	colm	19
	synt	any
	invoke	1
	line	466
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	6
	var	0
	line	468
	colm	11
	synt	any
	invoke	1
	line	468
	colm	21
	synt	any
	bscan
	mark	L3
	var	7
	pnull
	var	8
	cset	0
	line	469
	colm	15
	synt	any
	invoke	1
	int	1
	line	469
	colm	21
	synt	any
	plus
	line	469
	colm	10
	synt	any
	invoke	1
	unmark
lab L3
	mark	L4
	pnull
	var	4
	var	7
	int	2
	line	470
	colm	17
	synt	any
	invoke	1
	line	470
	colm	11
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	3
	pnull
	pnull
	var	4
	line	471
	colm	16
	synt	any
	size
	pnull
	var	2
	line	471
	colm	27
	synt	any
	field	h
	line	471
	colm	21
	synt	any
	div
	line	471
	colm	13
	synt	any
	asgn
	unmark
lab L5
	var	4
	line	472
	colm	11
	synt	any
	bscan
lab L6
	line	473
	colm	10
	synt	while
	mark0
	pnull
	var	1
	var	9
	var	10
	var	11
	var	3
	line	473
	colm	42
	synt	any
	invoke	1
	line	473
	colm	37
	synt	any
	invoke	1
	pnull
	var	2
	line	473
	colm	56
	synt	any
	field	w
	str	3
	line	473
	colm	28
	synt	any
	invoke	3
	line	473
	colm	20
	synt	any
	asgn
	unmark
	mark	L6
	line	474
	colm	13
	synt	suspend
	mark0
	var	12
	var	1
	line	474
	colm	28
	synt	any
	invoke	1
	line	474
	colm	13
	synt	any
	psusp
	pop
lab L9
	efail
lab L10
	line	474
	colm	13
	synt	endsuspend
lab L7
	unmark
	goto	L6
lab L8
	line	473
	colm	10
	synt	endwhile
	line	472
	colm	11
	synt	any
	escan
	line	468
	colm	21
	synt	any
	escan
	unmark
lab L2
	pnull
	line	478
	colm	1
	synt	any
	pfail
	end
proc imstoimx
	local	0,001000,ims
	local	1,000020,imx
	local	2,000000,put
	local	3,000000,rowbits
	declend
	line	483
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	pnull
	line	486
	colm	11
	synt	any
	llist	0
	line	486
	colm	8
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	488
	colm	4
	synt	every
	mark0
	var	2
	var	1
	var	3
	var	0
	line	488
	colm	26
	synt	any
	invoke	1
	line	488
	colm	13
	synt	any
	invoke	2
	pop
lab L3
	efail
lab L4
	line	488
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	490
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	492
	colm	1
	synt	any
	pfail
	end
proc imxtoims
	local	0,001000,imx
	local	1,000020,pattern
	local	2,000000,bits2hex
	con	0,002000,1,1
	con	1,010000,2,054,043
	declend
	line	497
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	pnull
	pnull
	pnull
	var	0
	int	0
	line	500
	colm	19
	synt	any
	subsc
	line	500
	colm	15
	synt	any
	size
	str	1
	line	500
	colm	23
	synt	any
	cat
	line	500
	colm	12
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	502
	colm	4
	synt	every
	mark0
	pnull
	var	1
	dup
	var	2
	pnull
	var	0
	line	502
	colm	32
	synt	any
	bang
	line	502
	colm	31
	synt	any
	invoke	1
	line	502
	colm	18
	synt	any
	cat
	asgn
	pop
lab L3
	efail
lab L4
	line	502
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	504
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	506
	colm	1
	synt	any
	pfail
	end
proc showbits
	local	0,001000,pattern
	local	1,000000,write
	local	2,000000,rowbits
	declend
	line	510
	colm	11
	synt	any
	mark	L1
	line	512
	colm	4
	synt	every
	mark0
	var	1
	var	2
	var	0
	line	512
	colm	23
	synt	any
	invoke	1
	line	512
	colm	15
	synt	any
	invoke	1
	pop
lab L2
	efail
lab L3
	line	512
	colm	4
	synt	endevery
	unmark
lab L1
	mark	L4
	var	1
	line	514
	colm	9
	synt	any
	invoke	0
	unmark
lab L4
	mark	L5
	mark	L6
	pnull
	line	516
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	518
	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,move
	local	7,000000,tdim
	con	0,020000,1,054
	con	1,002000,1,2
	con	2,002000,1,0
	con	3,002000,1,3
	con	4,002000,1,4
	declend
	line	524
	colm	11
	synt	any
	mark	L1
	var	2
	var	0
	line	527
	colm	11
	synt	any
	invoke	1
	line	527
	colm	21
	synt	any
	bscan
	mark	L2
	pnull
	var	1
	var	3
	var	4
	var	5
	cset	0
	line	528
	colm	31
	synt	any
	invoke	1
	line	528
	colm	26
	synt	any
	invoke	1
	line	528
	colm	22
	synt	any
	invoke	1
	line	528
	colm	12
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	var	6
	int	1
	line	529
	colm	11
	synt	any
	invoke	1
	unmark
lab L3
	mark	L4
	var	7
	var	1
	pnull
	pnull
	var	4
	int	2
	line	530
	colm	29
	synt	any
	invoke	1
	line	530
	colm	25
	synt	any
	size
	pnull
	pnull
	var	1
	int	3
	line	530
	colm	42
	synt	any
	plus
	int	4
	line	530
	colm	47
	synt	any
	div
	line	530
	colm	33
	synt	any
	div
	line	530
	colm	18
	synt	any
	invoke	2
	line	530
	colm	7
	synt	any
	pret
lab L4
	synt	any
	pfail
	line	527
	colm	21
	synt	any
	escan
	unmark
lab L1
	pnull
	line	533
	colm	1
	synt	any
	pfail
	end
proc pheight
	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,move
	con	0,020000,1,054
	con	1,002000,1,2
	con	2,002000,1,0
	con	3,002000,1,3
	con	4,002000,1,4
	declend
	line	538
	colm	11
	synt	any
	mark	L1
	var	2
	var	0
	line	541
	colm	11
	synt	any
	invoke	1
	line	541
	colm	21
	synt	any
	bscan
	mark	L2
	pnull
	var	1
	var	3
	var	4
	var	5
	cset	0
	line	542
	colm	31
	synt	any
	invoke	1
	line	542
	colm	26
	synt	any
	invoke	1
	line	542
	colm	22
	synt	any
	invoke	1
	line	542
	colm	12
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	var	6
	int	1
	line	543
	colm	11
	synt	any
	invoke	1
	unmark
lab L3
	mark	L4
	pnull
	pnull
	var	4
	int	2
	line	544
	colm	19
	synt	any
	invoke	1
	line	544
	colm	15
	synt	any
	size
	pnull
	pnull
	var	1
	int	3
	line	544
	colm	32
	synt	any
	plus
	int	4
	line	544
	colm	37
	synt	any
	div
	line	544
	colm	23
	synt	any
	div
	line	544
	colm	7
	synt	any
	pret
lab L4
	synt	any
	pfail
	line	541
	colm	21
	synt	any
	escan
	unmark
lab L1
	pnull
	line	547
	colm	1
	synt	any
	pfail
	end
proc pwidth
	local	0,001000,pattern
	local	1,000000,hexspec
	local	2,000000,integer
	local	3,000000,tab
	local	4,000000,upto
	con	0,020000,1,054
	declend
	line	552
	colm	11
	synt	any
	mark	L1
	var	1
	var	0
	line	554
	colm	11
	synt	any
	invoke	1
	line	554
	colm	21
	synt	any
	bscan
	mark	L2
	var	2
	var	3
	var	4
	cset	0
	line	555
	colm	30
	synt	any
	invoke	1
	line	555
	colm	25
	synt	any
	invoke	1
	line	555
	colm	21
	synt	any
	invoke	1
	line	555
	colm	7
	synt	any
	pret
lab L2
	synt	any
	pfail
	line	554
	colm	21
	synt	any
	escan
	unmark
lab L1
	pnull
	line	558
	colm	1
	synt	any
	pfail
	end
proc xbm2rows
	local	0,001000,input
	local	1,000020,imagex
	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,000040,hexdigit
	local	9,000000,read
	local	10,000000,tab
	local	11,000000,find
	local	12,000000,upto
	local	13,000000,integer
	local	14,000000,many
	local	15,000000,reads
	local	16,000000,any
	local	17,000000,move
	local	18,000000,reverse
	local	19,000000,right
	local	20,000000,hex2bits
	local	21,000000,left
	con	0,020000,6,141,142,143,144,145,146
	con	1,010000,0
	con	2,010000,5,167,151,144,164,150
	con	3,002000,1,6
	con	4,010000,6,150,145,151,147,150,164
	con	5,002000,1,8
	con	6,002000,1,0
	con	7,002000,1,1
	con	8,002000,6,500000
	con	9,010000,2,060,170
	con	10,002000,1,2
	con	11,010000,2,060,060
	con	12,010000,8,060,060,060,060,060,060,060,060
	con	13,010000,2,146,146
	con	14,010000,8,061,061,061,061,061,061,061,061
	con	15,010000,1,060
	declend
	line	565
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	pnull
	var	8
	pnull
	line	569
	colm	24
	synt	any
	keywd	digits
	cset	0
	line	569
	colm	32
	synt	any
	unions
	line	569
	colm	21
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L4
	pnull
	var	1
	str	1
	line	571
	colm	11
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	var	9
	var	0
	line	573
	colm	8
	synt	any
	invoke	1
	line	573
	colm	16
	synt	any
	bscan
	mark	L6
	var	10
	pnull
	var	11
	str	2
	line	574
	colm	15
	synt	any
	invoke	1
	int	3
	line	574
	colm	25
	synt	any
	plus
	line	574
	colm	10
	synt	any
	invoke	1
	unmark
lab L6
	mark	L7
	var	10
	var	12
	line	575
	colm	16
	synt	any
	keywd	digits
	line	575
	colm	15
	synt	any
	invoke	1
	line	575
	colm	10
	synt	any
	invoke	1
	unmark
lab L7
	pnull
	var	5
	var	13
	var	10
	var	14
	line	576
	colm	33
	synt	any
	keywd	digits
	line	576
	colm	32
	synt	any
	invoke	1
	line	576
	colm	27
	synt	any
	invoke	1
	line	576
	colm	23
	synt	any
	invoke	1
	line	576
	colm	13
	synt	any
	asgn
	line	573
	colm	16
	synt	any
	escan
	unmark
lab L5
	mark	L8
	var	9
	var	0
	line	579
	colm	8
	synt	any
	invoke	1
	line	579
	colm	16
	synt	any
	bscan
	mark	L9
	var	10
	pnull
	var	11
	str	4
	line	580
	colm	15
	synt	any
	invoke	1
	int	3
	line	580
	colm	26
	synt	any
	plus
	line	580
	colm	10
	synt	any
	invoke	1
	unmark
lab L9
	mark	L10
	var	10
	var	12
	line	581
	colm	16
	synt	any
	keywd	digits
	line	581
	colm	15
	synt	any
	invoke	1
	line	581
	colm	10
	synt	any
	invoke	1
	unmark
lab L10
	pnull
	var	6
	var	13
	var	10
	var	14
	line	582
	colm	34
	synt	any
	keywd	digits
	line	582
	colm	33
	synt	any
	invoke	1
	line	582
	colm	28
	synt	any
	invoke	1
	line	582
	colm	24
	synt	any
	invoke	1
	line	582
	colm	14
	synt	any
	asgn
	line	579
	colm	16
	synt	any
	escan
	unmark
lab L8
	mark	L11
	pnull
	var	7
	pnull
	pnull
	var	5
	int	5
	line	585
	colm	21
	synt	any
	div
	line	585
	colm	28
	synt	ifelse
	mark	L12
	pnull
	pnull
	var	5
	int	5
	line	585
	colm	38
	synt	any
	mod
	int	6
	line	585
	colm	43
	synt	any
	numgt
	unmark
	int	7
	goto	L13
lab L12
	int	6
lab L13
	line	585
	colm	28
	synt	endifelse
	line	585
	colm	26
	synt	any
	plus
	line	585
	colm	11
	synt	any
	asgn
	unmark
lab L11
	mark	L14
lab L15
	line	587
	colm	4
	synt	while
	mark0
	pnull
	var	1
	dup
	var	15
	var	0
	int	8
	line	587
	colm	27
	synt	any
	invoke	2
	line	587
	colm	17
	synt	any
	cat
	asgn
lab L16
	unmark
	goto	L15
lab L17
	line	587
	colm	4
	synt	endwhile
	unmark
lab L14
	mark	L18
	var	1
	line	589
	colm	11
	synt	any
	bscan
	line	590
	colm	7
	synt	every
	mark0
	pnull
	int	7
	var	6
	push1
	line	590
	colm	15
	synt	any
	toby
	pop
	mark0
	mark	L21
	pnull
	var	3
	str	1
	line	591
	colm	14
	synt	any
	asgn
	unmark
lab L21
	mark	L22
	line	592
	colm	10
	synt	every
	mark0
	pnull
	int	7
	var	7
	push1
	line	592
	colm	18
	synt	any
	toby
	pop
	mark0
	mark	L25
	mark	L26
	pnull
	var	4
	pnull
	var	10
	var	16
	var	8
	line	593
	colm	28
	synt	any
	invoke	1
	line	593
	colm	24
	synt	any
	invoke	1
	var	10
	var	16
	var	8
	line	593
	colm	50
	synt	any
	invoke	1
	line	593
	colm	46
	synt	any
	invoke	1
	line	593
	colm	40
	synt	any
	cat
	line	593
	colm	18
	synt	any
	asgn
	line	593
	colm	63
	synt	any
	esusp
	goto	L27
lab L26
	mark	L28
	var	10
	pnull
	var	11
	str	9
	line	594
	colm	24
	synt	any
	invoke	1
	int	10
	line	594
	colm	31
	synt	any
	plus
	line	594
	colm	19
	synt	any
	invoke	1
	unmark
lab L28
	pnull
	var	4
	var	17
	int	10
	line	595
	colm	27
	synt	any
	invoke	1
	line	595
	colm	20
	synt	any
	asgn
lab L27
	unmark
lab L25
	pnull
	var	3
	dup
	line	597
	colm	22
	synt	case
	mark0
	var	4
	eret
	mark	L30
	ccase
	str	11
	line	598
	colm	19
	synt	any
	eqv
	unmark
	pop
	str	12
	goto	L29
lab L30
	mark	L31
	ccase
	str	13
	line	599
	colm	19
	synt	any
	eqv
	unmark
	pop
	str	14
	goto	L29
lab L31
	pop
	var	18
	var	19
	var	20
	var	4
	line	600
	colm	47
	synt	any
	invoke	1
	int	5
	str	15
	line	600
	colm	38
	synt	any
	invoke	3
	line	600
	colm	32
	synt	any
	invoke	1
lab L29
	line	597
	colm	22
	synt	endcase
	line	597
	colm	17
	synt	any
	cat
	asgn
	unmark
lab L23
	efail
lab L24
	line	592
	colm	10
	synt	endevery
	unmark
lab L22
	line	603
	colm	10
	synt	suspend
	mark0
	var	21
	var	3
	var	5
	line	603
	colm	22
	synt	any
	invoke	2
	line	603
	colm	10
	synt	any
	psusp
	pop
lab L32
	efail
lab L33
	line	603
	colm	10
	synt	endsuspend
	unmark
lab L19
	efail
lab L20
	line	590
	colm	7
	synt	endevery
	line	589
	colm	11
	synt	any
	escan
	unmark
lab L18
	pnull
	line	607
	colm	1
	synt	any
	pfail
	end
