version	U12.1.00
uid	popular.u1-1786033009-0
impl	error
link	imrutils.u
link	wopen.u
global	1
	0,000005,popularity,1

proc popularity
	local	0,001000,ims
	local	1,000020,imr
	local	2,000020,color_tbl
	local	3,000020,color_list
	local	4,000020,color
	local	5,000000,imstoimr
	local	6,000000,table
	local	7,000000,PaletteColor
	local	8,000000,sort
	local	9,000000,write
	local	10,000000,pull
	local	11,000000,left
	local	12,000000,right
	con	0,002000,1,0
	con	1,002000,1,1
	con	2,002000,1,4
	con	3,010000,12,144,151,155,145,156,163,151,157,156,163,072,040
	con	4,010000,1,170
	con	5,010000,8,160,151,170,145,154,163,072,040
	con	6,010000,9,160,141,154,145,164,164,145,072,040
	con	7,010000,28,156,165,155,142,145,162,040,157,146,040,144,151,146,146,145,162,145,156,164,040,143,157,154,157,162,163,072,040
	con	8,010000,17,143,157,154,157,162,040,160,157,160,165,154,141,162,151,164,171,072
	con	9,002000,2,20
	con	10,002000,1,6
	declend
	filen	popular.icn
	line	32
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	var	5
	var	0
	line	35
	colm	19
	synt	any
	invoke	1
	line	35
	colm	8
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	6
	int	0
	line	37
	colm	22
	synt	any
	invoke	1
	line	37
	colm	14
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	39
	colm	4
	synt	every
	mark0
	pnull
	pnull
	var	2
	var	7
	pnull
	var	1
	line	39
	colm	36
	synt	any
	field	palette
	pnull
	pnull
	var	1
	line	39
	colm	50
	synt	any
	field	pixels
	line	39
	colm	46
	synt	any
	bang
	line	39
	colm	32
	synt	any
	invoke	2
	line	39
	colm	19
	synt	any
	subsc
	dup
	int	1
	line	39
	colm	60
	synt	any
	plus
	asgn
	pop
lab L4
	efail
lab L5
	line	39
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	pnull
	var	3
	var	8
	var	2
	int	2
	line	41
	colm	22
	synt	any
	invoke	2
	line	41
	colm	15
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	var	9
	str	3
	pnull
	var	1
	line	43
	colm	29
	synt	any
	field	width
	str	4
	pnull
	var	1
	line	43
	colm	45
	synt	any
	field	height
	line	43
	colm	9
	synt	any
	invoke	4
	unmark
lab L7
	mark	L8
	var	9
	str	5
	pnull
	pnull
	var	1
	line	44
	colm	26
	synt	any
	field	pixels
	line	44
	colm	22
	synt	any
	size
	line	44
	colm	9
	synt	any
	invoke	2
	unmark
lab L8
	mark	L9
	var	9
	str	6
	pnull
	var	1
	line	45
	colm	26
	synt	any
	field	palette
	line	45
	colm	9
	synt	any
	invoke	2
	unmark
lab L9
	mark	L10
	var	9
	str	7
	pnull
	var	2
	line	46
	colm	42
	synt	any
	size
	line	46
	colm	9
	synt	any
	invoke	2
	unmark
lab L10
	mark	L11
	var	9
	line	47
	colm	9
	synt	any
	invoke	0
	unmark
lab L11
	mark	L12
	var	9
	str	8
	line	48
	colm	9
	synt	any
	invoke	1
	unmark
lab L12
	mark	L13
	var	9
	line	49
	colm	9
	synt	any
	invoke	0
	unmark
lab L13
	mark	L14
lab L15
	line	51
	colm	4
	synt	while
	mark0
	pnull
	var	4
	var	10
	var	3
	line	51
	colm	23
	synt	any
	invoke	1
	line	51
	colm	16
	synt	any
	asgn
	unmark
	mark	L15
	var	9
	var	11
	var	10
	var	3
	line	52
	colm	22
	synt	any
	invoke	1
	int	9
	line	52
	colm	17
	synt	any
	invoke	2
	var	12
	var	4
	int	10
	line	52
	colm	46
	synt	any
	invoke	2
	line	52
	colm	12
	synt	any
	invoke	2
lab L16
	unmark
	goto	L15
lab L17
	line	51
	colm	4
	synt	endwhile
	unmark
lab L14
	pnull
	line	54
	colm	1
	synt	any
	pfail
	end
