version	U12.1.00
uid	pqueue.u1-1784908804-0
record	pqelem,2
	0,data
	1,priority
impl	error
global	7
	0,000011,pqelem,2
	1,000005,pq,1
	2,000005,pqget,1
	3,000005,pqgen,1
	4,000005,pqput,2
	5,000005,pq__down,2
	6,000005,pq__up,2

proc pq
	local	0,001000,L
	local	1,000020,Q
	local	2,000020,i
	local	3,000020,e
	local	4,000000,list
	local	5,000000,put
	local	6,000000,pqelem
	local	7,000000,numeric
	local	8,000000,runerr
	local	9,000000,pq__down
	con	0,002000,3,102
	con	1,002000,1,2
	con	2,002000,1,1
	declend
	filen	pqueue.icn
	line	45
	colm	11
	synt	any
	mark	L1
	pnull
	pnull
	var	0
	line	48
	colm	4
	synt	any
	null
	var	4
	line	48
	colm	14
	synt	any
	invoke	0
	line	48
	colm	7
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	var	4
	line	49
	colm	13
	synt	any
	invoke	0
	line	49
	colm	6
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	50
	colm	4
	synt	every
	mark0
	pnull
	var	3
	pnull
	var	0
	line	50
	colm	15
	synt	any
	bang
	line	50
	colm	12
	synt	any
	asgn
	pop
	mark0
	var	5
	var	1
	var	6
	pnull
	var	3
	line	51
	colm	22
	synt	any
	field	data
	mark	L6
	var	7
	pnull
	var	3
	line	51
	colm	38
	synt	any
	field	priority
	line	51
	colm	36
	synt	any
	invoke	1
	line	51
	colm	49
	synt	any
	esusp
	goto	L7
lab L6
	var	8
	int	0
	pnull
	var	3
	line	51
	colm	64
	synt	any
	field	priority
	line	51
	colm	57
	synt	any
	invoke	2
lab L7
	line	51
	colm	20
	synt	any
	invoke	2
	line	51
	colm	10
	synt	any
	invoke	2
	unmark
lab L4
	efail
lab L5
	line	50
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L8
	line	52
	colm	4
	synt	every
	mark0
	pnull
	var	2
	pnull
	pnull
	pnull
	var	1
	line	52
	colm	15
	synt	any
	size
	int	1
	line	52
	colm	18
	synt	any
	div
	int	2
	pnull
	int	2
	line	52
	colm	30
	synt	any
	neg
	line	52
	colm	22
	synt	any
	toby
	line	52
	colm	12
	synt	any
	asgn
	pop
	mark0
	var	9
	var	1
	var	2
	line	53
	colm	15
	synt	any
	invoke	2
	unmark
lab L9
	efail
lab L10
	line	52
	colm	4
	synt	endevery
	unmark
lab L8
	mark	L11
	mark	L12
	var	1
	line	54
	colm	4
	synt	any
	pret
lab L12
	synt	any
	pfail
	unmark
lab L11
	pnull
	line	55
	colm	1
	synt	any
	pfail
	end
proc pqget
	local	0,001000,Q
	local	1,000020,e
	local	2,000000,get
	local	3,000000,push
	local	4,000000,pull
	local	5,000000,pq__down
	con	0,002000,1,1
	declend
	line	57
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	mark	L2
	var	2
	var	0
	line	60
	colm	12
	synt	any
	invoke	1
	line	60
	colm	16
	synt	any
	esusp
	goto	L3
lab L2
	line	60
	colm	18
	synt	any
	pfail
lab L3
	line	60
	colm	6
	synt	any
	asgn
	unmark
lab L1
	mark	L4
	var	3
	var	0
	var	4
	var	0
	line	61
	colm	16
	synt	any
	invoke	1
	line	61
	colm	8
	synt	any
	invoke	2
	unmark
lab L4
	mark	L5
	var	5
	var	0
	int	0
	line	62
	colm	12
	synt	any
	invoke	2
	unmark
lab L5
	mark	L6
	mark	L7
	var	1
	line	63
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	64
	colm	1
	synt	any
	pfail
	end
proc pqgen
	local	0,001000,Q
	local	1,000020,q
	local	2,000020,e
	local	3,000000,copy
	local	4,000000,pqget
	declend
	line	66
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	var	3
	var	0
	line	69
	colm	13
	synt	any
	invoke	1
	line	69
	colm	6
	synt	any
	asgn
	unmark
lab L1
	mark	L2
lab L3
	line	70
	colm	4
	synt	while
	mark0
	pnull
	var	2
	var	3
	var	4
	var	1
	line	70
	colm	25
	synt	any
	invoke	1
	line	70
	colm	19
	synt	any
	invoke	1
	line	70
	colm	12
	synt	any
	asgn
	unmark
	mark	L3
	line	71
	colm	7
	synt	suspend
	mark0
	var	2
	line	71
	colm	7
	synt	any
	psusp
	pop
lab L6
	efail
lab L7
	line	71
	colm	7
	synt	endsuspend
lab L4
	unmark
	goto	L3
lab L5
	line	70
	colm	4
	synt	endwhile
	unmark
lab L2
	pnull
	line	72
	colm	1
	synt	any
	pfail
	end
proc pqput
	local	0,001000,Q
	local	1,001000,e
	local	2,000000,put
	local	3,000000,pqelem
	local	4,000000,numeric
	local	5,000000,runerr
	local	6,000000,pq__up
	con	0,002000,3,102
	declend
	line	74
	colm	11
	synt	any
	mark	L1
	var	2
	var	0
	var	3
	pnull
	var	1
	line	75
	colm	19
	synt	any
	field	data
	mark	L2
	var	4
	pnull
	var	1
	line	75
	colm	35
	synt	any
	field	priority
	line	75
	colm	33
	synt	any
	invoke	1
	line	75
	colm	46
	synt	any
	esusp
	goto	L3
lab L2
	var	5
	int	0
	pnull
	var	1
	line	75
	colm	61
	synt	any
	field	priority
	line	75
	colm	54
	synt	any
	invoke	2
lab L3
	line	75
	colm	17
	synt	any
	invoke	2
	line	75
	colm	7
	synt	any
	invoke	2
	unmark
lab L1
	mark	L4
	var	6
	var	0
	pnull
	var	0
	line	76
	colm	14
	synt	any
	size
	line	76
	colm	10
	synt	any
	invoke	2
	unmark
lab L4
	mark	L5
	mark	L6
	var	0
	line	77
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	78
	colm	1
	synt	any
	pfail
	end
proc pq__down
	local	0,001000,Q
	local	1,001000,i
	local	2,000020,left
	local	3,000020,right
	local	4,000020,largest
	local	5,000000,pq__down
	con	0,002000,1,2
	con	1,002000,1,1
	declend
	line	83
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	pnull
	var	1
	int	0
	line	86
	colm	14
	synt	any
	mult
	line	86
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	3
	pnull
	var	2
	int	1
	line	87
	colm	18
	synt	any
	plus
	line	87
	colm	10
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	89
	colm	4
	synt	ifelse
	mark	L4
	pnull
	pnull
	pnull
	var	0
	var	2
	line	89
	colm	8
	synt	any
	subsc
	line	89
	colm	14
	synt	any
	field	priority
	pnull
	pnull
	var	0
	var	1
	line	89
	colm	27
	synt	any
	subsc
	line	89
	colm	30
	synt	any
	field	priority
	line	89
	colm	24
	synt	any
	numgt
	unmark
	pnull
	var	4
	var	2
	line	89
	colm	53
	synt	any
	asgn
	goto	L5
lab L4
	pnull
	var	4
	var	1
	line	90
	colm	17
	synt	any
	asgn
lab L5
	line	89
	colm	4
	synt	endifelse
	unmark
lab L3
	mark	L6
	line	91
	colm	4
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	0
	var	3
	line	91
	colm	8
	synt	any
	subsc
	line	91
	colm	15
	synt	any
	field	priority
	pnull
	pnull
	var	0
	var	4
	line	91
	colm	28
	synt	any
	subsc
	line	91
	colm	37
	synt	any
	field	priority
	line	91
	colm	25
	synt	any
	numgt
	unmark
	pnull
	var	4
	var	3
	line	91
	colm	60
	synt	any
	asgn
	line	91
	colm	4
	synt	endif
	unmark
lab L6
	mark	L7
	line	92
	colm	4
	synt	if
	mark0
	pnull
	var	4
	var	1
	line	92
	colm	15
	synt	any
	numne
	unmark
	mark	L8
	pnull
	pnull
	var	0
	var	1
	line	93
	colm	8
	synt	any
	subsc
	pnull
	var	0
	var	4
	line	93
	colm	17
	synt	any
	subsc
	line	93
	colm	12
	synt	any
	swap
	unmark
lab L8
	var	5
	var	0
	var	4
	line	94
	colm	15
	synt	any
	invoke	2
	line	92
	colm	4
	synt	endif
	unmark
lab L7
	mark	L9
	mark	L10
	pnull
	line	96
	colm	4
	synt	any
	pret
lab L10
	synt	any
	pfail
	unmark
lab L9
	pnull
	line	97
	colm	1
	synt	any
	pfail
	end
proc pq__up
	local	0,001000,Q
	local	1,001000,i
	local	2,000020,parent
	local	3,000000,pq__up
	con	0,002000,1,2
	declend
	line	99
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	pnull
	var	1
	int	0
	line	102
	colm	16
	synt	any
	div
	line	102
	colm	11
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	103
	colm	4
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	0
	var	1
	line	103
	colm	8
	synt	any
	subsc
	line	103
	colm	11
	synt	any
	field	priority
	pnull
	pnull
	var	0
	var	2
	line	103
	colm	24
	synt	any
	subsc
	line	103
	colm	32
	synt	any
	field	priority
	line	103
	colm	21
	synt	any
	numgt
	unmark
	mark	L3
	pnull
	pnull
	var	0
	var	1
	line	104
	colm	8
	synt	any
	subsc
	pnull
	var	0
	var	2
	line	104
	colm	17
	synt	any
	subsc
	line	104
	colm	12
	synt	any
	swap
	unmark
lab L3
	var	3
	var	0
	var	2
	line	105
	colm	13
	synt	any
	invoke	2
	line	103
	colm	4
	synt	endif
	unmark
lab L2
	mark	L4
	mark	L5
	pnull
	line	107
	colm	4
	synt	any
	pret
lab L5
	synt	any
	pfail
	unmark
lab L4
	pnull
	line	108
	colm	1
	synt	any
	pfail
	end
