proc popularity
	filen	popular.icn
	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
	line	32
	colm	11
	mark	L1
	pnull
	var	1
	var	5
	var	0
	line	35
	colm	19
	invoke	1
	line	35
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	6
	int	0
	line	37
	colm	22
	invoke	1
	line	37
	colm	14
	asgn
	unmark
lab L2
	mark	L3
	mark0
	pnull
	pnull
	var	2
	var	7
	pnull
	var	1
	line	39
	colm	36
	field	palette
	pnull
	pnull
	var	1
	line	39
	colm	50
	field	pixels
	line	39
	colm	46
	bang
	line	39
	colm	32
	invoke	2
	line	39
	colm	19
	subsc
	dup
	int	1
	line	39
	colm	60
	plus
	asgn
	pop
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L6
	pnull
	var	3
	var	8
	var	2
	int	2
	line	41
	colm	22
	invoke	2
	line	41
	colm	15
	asgn
	unmark
lab L6
	mark	L7
	var	9
	str	3
	pnull
	var	1
	line	43
	colm	29
	field	width
	str	4
	pnull
	var	1
	line	43
	colm	45
	field	height
	line	43
	colm	9
	invoke	4
	unmark
lab L7
	mark	L8
	var	9
	str	5
	pnull
	pnull
	var	1
	line	44
	colm	26
	field	pixels
	line	44
	colm	22
	size
	line	44
	colm	9
	invoke	2
	unmark
lab L8
	mark	L9
	var	9
	str	6
	pnull
	var	1
	line	45
	colm	26
	field	palette
	line	45
	colm	9
	invoke	2
	unmark
lab L9
	mark	L10
	var	9
	str	7
	pnull
	var	2
	line	46
	colm	42
	size
	line	46
	colm	9
	invoke	2
	unmark
lab L10
	mark	L11
	var	9
	line	47
	colm	9
	invoke	0
	unmark
lab L11
	mark	L12
	var	9
	str	8
	line	48
	colm	9
	invoke	1
	unmark
lab L12
	mark	L13
	var	9
	line	49
	colm	9
	invoke	0
	unmark
lab L13
	mark	L14
lab L15
	mark0
	pnull
	var	4
	var	10
	var	3
	line	51
	colm	23
	invoke	1
	line	51
	colm	16
	asgn
	unmark
	mark	L15
	var	9
	var	11
	var	10
	var	3
	line	52
	colm	22
	invoke	1
	int	9
	line	52
	colm	17
	invoke	2
	var	12
	var	4
	int	10
	line	52
	colm	46
	invoke	2
	line	52
	colm	12
	invoke	2
lab L16
	unmark
	goto	L15
lab L17
	unmark
lab L14
	pnull
	line	54
	colm	1
	pfail
	end
