proc poly
	filen	polystuf.icn
	local	0,001000,terms
	local	1,000020,p
	local	2,000020,coef
	local	3,000020,expn
	local	4,000000,table
	local	5,000000,get
	local	6,000000,numeric
	local	7,000000,real
	con	0,002000,1,2
	con	1,002000,1,1
	con	2,002000,1,0
	declend
	line	37
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	pnull
	var	0
	line	39
	colm	6
	size
	int	0
	line	39
	colm	13
	mod
	int	1
	line	39
	colm	17
	numeq
	unmark
	line	39
	colm	26
	pfail
	unmark
lab L1
	mark	L2
	pnull
	var	1
	var	4
	line	42
	colm	13
	invoke	0
	line	42
	colm	5
	asgn
	unmark
lab L2
	mark	L3
lab L4
	mark0
	pnull
	pnull
	var	0
	line	43
	colm	9
	size
	int	2
	line	43
	colm	16
	numgt
	unmark
	mark	L4
	mark	L7
	pnull
	var	2
	var	5
	var	0
	line	44
	colm	16
	invoke	1
	line	44
	colm	10
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	3
	var	5
	var	0
	line	45
	colm	16
	invoke	1
	line	45
	colm	10
	asgn
	unmark
lab L8
	mark0
	var	6
	var	2
	line	47
	colm	15
	invoke	1
	unmark
	mark0
	var	6
	var	3
	line	47
	colm	37
	invoke	1
	unmark
	pnull
	pnull
	var	1
	var	7
	var	3
	line	48
	colm	18
	invoke	1
	line	48
	colm	13
	subsc
	var	2
	line	48
	colm	26
	asgn
lab L5
	unmark
	goto	L4
lab L6
	unmark
lab L3
	mark	L9
	mark	L10
	var	1
	line	53
	colm	3
	pret
lab L10
	pfail
	unmark
lab L9
	pnull
	line	54
	colm	1
	pfail
	end
proc is_zero
	local	0,001000,n
	local	1,000000,integer
	con	0,002000,1,0
	declend
	line	56
	colm	11
	mark	L1
	mark	L2
	pnull
	var	0
	var	1
	var	0
	line	57
	colm	19
	invoke	1
	line	57
	colm	10
	numeq
	pop
	pnull
	var	0
	int	0
	line	57
	colm	29
	numeq
	unmark
	mark	L4
	pnull
	line	57
	colm	40
	pret
lab L4
	pfail
	goto	L3
lab L2
	line	57
	colm	52
	pfail
lab L3
	unmark
lab L1
	pnull
	line	58
	colm	1
	pfail
	end
proc is_zero_poly
	local	0,001000,p
	local	1,000000,is_zero
	local	2,000000,real
	con	0,002000,1,1
	con	1,002000,1,0
	declend
	line	60
	colm	11
	mark	L1
	mark	L2
	pnull
	pnull
	var	0
	line	61
	colm	8
	size
	int	0
	line	61
	colm	11
	numeq
	pop
	var	1
	pnull
	var	0
	var	2
	int	1
	line	61
	colm	32
	invoke	1
	line	61
	colm	27
	subsc
	line	61
	colm	25
	invoke	1
	unmark
	mark	L4
	pnull
	line	61
	colm	44
	pret
lab L4
	pfail
	goto	L3
lab L2
	line	61
	colm	56
	pfail
lab L3
	unmark
lab L1
	pnull
	line	62
	colm	1
	pfail
	end
proc poly_add
	local	0,001000,p1
	local	1,001000,p2
	local	2,000020,p3
	local	3,000020,z
	local	4,000000,copy
	local	5,000000,is_zero_poly
	local	6,000000,delete
	local	7,000000,real
	local	8,000000,key
	local	9,000000,member
	local	10,000000,is_zero
	con	0,002000,1,0
	declend
	line	64
	colm	11
	mark	L1
	pnull
	var	2
	var	4
	var	0
	line	66
	colm	13
	invoke	1
	line	66
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	var	5
	var	2
	line	67
	colm	19
	invoke	1
	unmark
	var	6
	var	2
	var	7
	int	0
	line	67
	colm	45
	invoke	1
	line	67
	colm	36
	invoke	2
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	3
	var	8
	var	1
	line	70
	colm	17
	invoke	1
	line	70
	colm	11
	asgn
	pop
	mark0
	mark	L6
	mark	L7
	var	9
	var	2
	var	3
	line	71
	colm	15
	invoke	2
	unmark
	pnull
	pnull
	var	2
	var	3
	line	71
	colm	30
	subsc
	dup
	pnull
	var	1
	var	3
	line	71
	colm	40
	subsc
	line	71
	colm	34
	plus
	asgn
	goto	L8
lab L7
	pnull
	pnull
	var	2
	var	3
	line	72
	colm	14
	subsc
	pnull
	var	1
	var	3
	line	72
	colm	23
	subsc
	line	72
	colm	18
	asgn
lab L8
	unmark
lab L6
	mark0
	var	10
	pnull
	var	2
	var	3
	line	75
	colm	18
	subsc
	line	75
	colm	15
	invoke	1
	unmark
	var	6
	var	2
	var	3
	line	75
	colm	35
	invoke	2
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L9
	mark0
	pnull
	pnull
	var	2
	line	79
	colm	6
	size
	int	0
	line	79
	colm	10
	numeq
	unmark
	pnull
	pnull
	var	2
	var	7
	int	0
	line	79
	colm	26
	invoke	1
	line	79
	colm	21
	subsc
	int	0
	line	79
	colm	31
	asgn
	unmark
lab L9
	mark	L10
	mark	L11
	var	2
	line	81
	colm	3
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	82
	colm	1
	pfail
	end
proc poly_sub
	local	0,001000,p1
	local	1,001000,p2
	local	2,000020,p3
	local	3,000020,z
	local	4,000000,copy
	local	5,000000,is_zero_poly
	local	6,000000,delete
	local	7,000000,real
	local	8,000000,key
	local	9,000000,member
	local	10,000000,is_zero
	con	0,002000,1,0
	declend
	line	84
	colm	11
	mark	L1
	pnull
	var	2
	var	4
	var	0
	line	86
	colm	13
	invoke	1
	line	86
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	var	5
	var	2
	line	87
	colm	19
	invoke	1
	unmark
	var	6
	var	2
	var	7
	int	0
	line	87
	colm	45
	invoke	1
	line	87
	colm	36
	invoke	2
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	3
	var	8
	var	1
	line	88
	colm	17
	invoke	1
	line	88
	colm	11
	asgn
	pop
	mark0
	mark	L6
	mark	L7
	var	9
	var	2
	var	3
	line	89
	colm	15
	invoke	2
	unmark
	pnull
	pnull
	var	2
	var	3
	line	89
	colm	30
	subsc
	dup
	pnull
	var	1
	var	3
	line	89
	colm	40
	subsc
	line	89
	colm	34
	minus
	asgn
	goto	L8
lab L7
	pnull
	pnull
	var	2
	var	3
	line	90
	colm	14
	subsc
	pnull
	pnull
	var	1
	var	3
	line	90
	colm	24
	subsc
	line	90
	colm	21
	neg
	line	90
	colm	18
	asgn
lab L8
	unmark
lab L6
	mark0
	var	10
	pnull
	var	2
	var	3
	line	91
	colm	18
	subsc
	line	91
	colm	15
	invoke	1
	unmark
	var	6
	var	2
	var	3
	line	91
	colm	35
	invoke	2
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L9
	mark0
	pnull
	pnull
	var	2
	line	93
	colm	6
	size
	int	0
	line	93
	colm	10
	numeq
	unmark
	pnull
	pnull
	var	2
	var	7
	int	0
	line	93
	colm	26
	invoke	1
	line	93
	colm	21
	subsc
	int	0
	line	93
	colm	31
	asgn
	unmark
lab L9
	mark	L10
	mark	L11
	var	2
	line	94
	colm	3
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	95
	colm	1
	pfail
	end
proc poly_mul
	local	0,001000,p1
	local	1,001000,p2
	local	2,000020,p3
	local	3,000020,c
	local	4,000020,e
	local	5,000020,y
	local	6,000020,z
	local	7,000000,table
	local	8,000000,key
	local	9,000000,member
	local	10,000000,is_zero
	local	11,000000,delete
	local	12,000000,real
	con	0,002000,1,0
	declend
	line	97
	colm	11
	mark	L1
	pnull
	var	2
	var	7
	line	99
	colm	14
	invoke	0
	line	99
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	5
	var	8
	var	0
	line	100
	colm	17
	invoke	1
	line	100
	colm	11
	asgn
	pop
	mark0
	mark0
	pnull
	var	6
	var	8
	var	1
	line	101
	colm	19
	invoke	1
	line	101
	colm	13
	asgn
	pop
	mark0
	mark	L7
	pnull
	var	3
	pnull
	pnull
	var	0
	var	5
	line	102
	colm	14
	subsc
	pnull
	var	1
	var	6
	line	102
	colm	22
	subsc
	line	102
	colm	18
	mult
	line	102
	colm	9
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	4
	pnull
	var	5
	var	6
	line	103
	colm	14
	plus
	line	103
	colm	9
	asgn
	unmark
lab L8
	mark	L9
	mark	L10
	var	9
	var	2
	var	4
	line	104
	colm	17
	invoke	2
	unmark
	pnull
	pnull
	var	2
	var	4
	line	104
	colm	32
	subsc
	dup
	var	3
	line	104
	colm	36
	plus
	asgn
	goto	L11
lab L10
	pnull
	pnull
	var	2
	var	4
	line	105
	colm	16
	subsc
	var	3
	line	105
	colm	20
	asgn
lab L11
	unmark
lab L9
	mark0
	var	10
	pnull
	var	2
	var	4
	line	106
	colm	20
	subsc
	line	106
	colm	17
	invoke	1
	unmark
	var	11
	var	2
	var	4
	line	106
	colm	37
	invoke	2
	unmark
lab L5
	efail
lab L6
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L12
	mark0
	pnull
	pnull
	var	2
	line	108
	colm	6
	size
	int	0
	line	108
	colm	10
	numeq
	unmark
	pnull
	pnull
	var	2
	var	12
	int	0
	line	108
	colm	26
	invoke	1
	line	108
	colm	21
	subsc
	int	0
	line	108
	colm	31
	asgn
	unmark
lab L12
	mark	L13
	mark	L14
	var	2
	line	109
	colm	3
	pret
lab L14
	pfail
	unmark
lab L13
	pnull
	line	110
	colm	1
	pfail
	end
proc poly_eval
	local	0,001000,p
	local	1,001000,x
	local	2,000020,e
	local	3,000020,sum
	local	4,000000,key
	con	0,002000,1,0
	declend
	line	112
	colm	11
	mark	L1
	pnull
	var	3
	int	0
	line	114
	colm	7
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	2
	var	4
	var	0
	line	115
	colm	17
	invoke	1
	line	115
	colm	11
	asgn
	pop
	mark0
	pnull
	var	3
	dup
	pnull
	pnull
	var	0
	var	2
	line	116
	colm	14
	subsc
	pnull
	var	1
	var	2
	line	116
	colm	23
	power
	line	116
	colm	18
	mult
	line	116
	colm	9
	plus
	asgn
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	3
	line	119
	colm	3
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	120
	colm	1
	pfail
	end
proc term2string
	local	0,001000,c
	local	1,001000,e
	local	2,000020,t
	local	3,000000,integer
	con	0,010000,0
	con	1,002000,1,1
	con	2,010000,1,055
	con	3,002000,1,0
	con	4,010000,1,170
	con	5,010000,1,136
	declend
	line	122
	colm	11
	mark	L1
	pnull
	var	2
	str	0
	line	124
	colm	5
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	var	3
	var	1
	line	125
	colm	17
	invoke	1
	line	125
	colm	8
	numeq
	unmark
	pnull
	var	1
	var	3
	var	1
	line	125
	colm	38
	invoke	1
	line	125
	colm	28
	asgn
	unmark
lab L2
	mark	L3
	mark	L4
	pnull
	var	0
	int	1
	line	126
	colm	8
	numne
	unmark
	mark	L6
	pnull
	var	0
	pnull
	int	1
	line	127
	colm	12
	neg
	line	127
	colm	10
	numeq
	unmark
	pnull
	var	2
	dup
	str	2
	line	127
	colm	22
	cat
	asgn
	goto	L7
lab L6
	pnull
	var	2
	dup
	var	0
	line	127
	colm	38
	cat
	asgn
lab L7
	goto	L5
lab L4
	mark0
	pnull
	var	1
	int	3
	line	130
	colm	15
	numeq
	unmark
	pnull
	var	2
	dup
	var	0
	line	130
	colm	26
	cat
	asgn
lab L5
	unmark
lab L3
	mark	L8
	mark0
	pnull
	var	1
	int	3
	line	132
	colm	8
	numne
	unmark
	mark	L9
	pnull
	var	2
	dup
	str	4
	line	133
	colm	7
	cat
	asgn
	unmark
lab L9
	mark0
	pnull
	var	1
	int	1
	line	134
	colm	10
	numne
	unmark
	pnull
	var	2
	dup
	pnull
	str	5
	var	1
	line	134
	colm	32
	cat
	line	134
	colm	22
	cat
	asgn
	unmark
lab L8
	mark	L10
	mark	L11
	var	2
	line	136
	colm	3
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	137
	colm	1
	pfail
	end
proc poly_string
	local	0,001000,p
	local	1,000020,pstr
	local	2,000020,plist
	local	3,000020,c
	local	4,000020,e
	local	5,000000,sort
	local	6,000000,pull
	local	7,000000,term2string
	con	0,010000,0
	con	1,002000,1,3
	con	2,002000,1,0
	con	3,010000,3,040,053,040
	con	4,002000,1,1
	declend
	line	139
	colm	11
	mark	L1
	pnull
	var	1
	str	0
	line	141
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	5
	var	0
	int	1
	line	142
	colm	16
	invoke	2
	line	142
	colm	9
	asgn
	unmark
lab L2
	mark	L3
lab L4
	mark0
	pnull
	pnull
	var	2
	line	143
	colm	9
	size
	int	2
	line	143
	colm	16
	numgt
	unmark
	mark	L4
	mark	L7
	pnull
	var	3
	var	6
	var	2
	line	144
	colm	14
	invoke	1
	line	144
	colm	7
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	4
	var	6
	var	2
	line	145
	colm	14
	invoke	1
	line	145
	colm	7
	asgn
	unmark
lab L8
	pnull
	var	1
	dup
	pnull
	var	7
	var	3
	var	4
	line	146
	colm	28
	invoke	2
	str	3
	line	146
	colm	35
	cat
	line	146
	colm	10
	cat
	asgn
lab L5
	unmark
	goto	L4
lab L6
	unmark
lab L3
	mark	L9
	pnull
	var	1
	pnull
	var	1
	int	4
	pnull
	int	1
	line	148
	colm	18
	neg
	line	148
	colm	17
	sect
	line	148
	colm	8
	asgn
	unmark
lab L9
	mark	L10
	mark	L11
	var	1
	line	149
	colm	3
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	150
	colm	1
	pfail
	end
