proc depth
	filen	trees.icn
	local	0,001000,ltree
	local	1,000020,count
	local	2,000000,depth
	con	0,002000,1,0
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	33
	colm	11
	mark	L1
	pnull
	var	1
	int	0
	line	36
	colm	10
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	dup
	pnull
	int	1
	var	2
	pnull
	var	0
	pnull
	int	2
	pnull
	var	0
	line	37
	colm	41
	size
	push1
	line	37
	colm	38
	toby
	line	37
	colm	35
	subsc
	line	37
	colm	29
	invoke	1
	line	37
	colm	22
	plus
	line	37
	colm	16
	numlt
	asgn
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	38
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	40
	colm	1
	pfail
	end
proc ldag
	local	0,001000,stree
	local	1,001000,done
	local	2,000020,L
	local	3,000000,table
	local	4,000000,tab
	local	5,000000,upto
	local	6,000000,move
	local	7,000000,put
	local	8,000000,ldag
	local	9,000000,bal
	con	0,020000,1,050
	con	1,002000,1,1
	con	2,020000,2,054,051
	con	3,002000,1,0
	declend
	line	42
	colm	11
	mark	L1
	pnull
	pnull
	var	1
	line	45
	colm	4
	null
	var	3
	line	45
	colm	18
	invoke	0
	line	45
	colm	10
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	2
	pnull
	pnull
	var	1
	var	0
	line	46
	colm	17
	subsc
	line	46
	colm	12
	nonnull
	line	46
	colm	9
	asgn
	unmark
	mark	L3
	var	2
	line	46
	colm	30
	pret
lab L3
	pfail
	unmark
lab L2
	mark	L4
	var	0
	line	47
	colm	10
	bscan
	mark	L5
	pnull
	var	2
	pnull
	var	4
	var	5
	cset	0
	line	48
	colm	24
	invoke	1
	line	48
	colm	19
	invoke	1
	line	48
	colm	15
	llist	1
	line	48
	colm	12
	asgn
	unmark
	mark	L7
	var	6
	int	1
	line	49
	colm	14
	invoke	1
	unmark
lab L7
lab L8
	mark0
	var	7
	var	2
	var	8
	var	4
	var	9
	cset	2
	line	50
	colm	34
	invoke	1
	line	50
	colm	30
	invoke	1
	var	1
	line	50
	colm	26
	invoke	2
	line	50
	colm	19
	invoke	2
	unmark
	mark	L8
	var	6
	int	1
	line	51
	colm	17
	invoke	1
lab L9
	unmark
	goto	L8
lab L10
	goto	L6
lab L5
	pnull
	var	2
	pnull
	var	4
	int	3
	line	53
	colm	21
	invoke	1
	line	53
	colm	17
	llist	1
	line	53
	colm	14
	asgn
lab L6
	line	47
	colm	10
	escan
	unmark
lab L4
	mark	L11
	mark	L12
	pnull
	pnull
	var	1
	var	0
	line	54
	colm	15
	subsc
	var	2
	line	54
	colm	23
	asgn
	line	54
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	56
	colm	1
	pfail
	end
proc ltree
	local	0,001000,stree
	local	1,000020,L
	local	2,000000,tab
	local	3,000000,upto
	local	4,000000,move
	local	5,000000,put
	local	6,000000,ltree
	local	7,000000,bal
	con	0,020000,1,050
	con	1,002000,1,1
	con	2,020000,2,054,051
	con	3,002000,1,0
	declend
	line	58
	colm	11
	mark	L1
	var	0
	line	61
	colm	10
	bscan
	mark	L2
	pnull
	var	1
	pnull
	var	2
	var	3
	cset	0
	line	62
	colm	24
	invoke	1
	line	62
	colm	19
	invoke	1
	line	62
	colm	15
	llist	1
	line	62
	colm	12
	asgn
	unmark
	mark	L4
	var	4
	int	1
	line	63
	colm	14
	invoke	1
	unmark
lab L4
lab L5
	mark0
	var	5
	var	1
	var	6
	var	2
	var	7
	cset	2
	line	64
	colm	35
	invoke	1
	line	64
	colm	31
	invoke	1
	line	64
	colm	27
	invoke	1
	line	64
	colm	19
	invoke	2
	unmark
	mark	L5
	var	4
	int	1
	line	65
	colm	17
	invoke	1
lab L6
	unmark
	goto	L5
lab L7
	goto	L3
lab L2
	pnull
	var	1
	pnull
	var	2
	int	3
	line	67
	colm	21
	invoke	1
	line	67
	colm	17
	llist	1
	line	67
	colm	14
	asgn
lab L3
	line	61
	colm	10
	escan
	unmark
lab L1
	mark	L8
	mark	L9
	var	1
	line	68
	colm	4
	pret
lab L9
	pfail
	unmark
lab L8
	pnull
	line	70
	colm	1
	pfail
	end
proc stree
	local	0,001000,ltree
	local	1,000020,s
	local	2,000000,stree
	con	0,002000,1,1
	con	1,010000,1,050
	con	2,002000,1,2
	con	3,010000,1,054
	con	4,010000,1,051
	declend
	line	72
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	var	0
	line	75
	colm	7
	size
	int	0
	line	75
	colm	14
	numeq
	unmark
	mark	L2
	pnull
	var	0
	int	0
	line	75
	colm	35
	subsc
	line	75
	colm	23
	pret
lab L2
	pfail
	unmark
lab L1
	mark	L3
	pnull
	var	1
	pnull
	pnull
	var	0
	int	0
	line	76
	colm	14
	subsc
	str	1
	line	76
	colm	18
	cat
	line	76
	colm	6
	asgn
	unmark
lab L3
	mark	L4
	mark0
	pnull
	var	1
	dup
	pnull
	var	2
	pnull
	var	0
	pnull
	int	2
	pnull
	var	0
	line	77
	colm	34
	size
	push1
	line	77
	colm	31
	toby
	line	77
	colm	28
	subsc
	line	77
	colm	22
	invoke	1
	str	3
	line	77
	colm	43
	cat
	line	77
	colm	12
	cat
	asgn
	pop
lab L5
	efail
lab L6
	unmark
lab L4
	mark	L7
	mark	L8
	pnull
	pnull
	var	1
	int	0
	pnull
	int	0
	line	78
	colm	15
	neg
	line	78
	colm	14
	sect
	str	4
	line	78
	colm	19
	cat
	line	78
	colm	4
	pret
lab L8
	pfail
	unmark
lab L7
	pnull
	line	80
	colm	1
	pfail
	end
proc tcopy
	local	0,001000,ltree
	local	1,000020,L
	local	2,000000,put
	local	3,000000,tcopy
	con	0,002000,1,1
	con	1,002000,1,2
	declend
	line	82
	colm	11
	mark	L1
	pnull
	var	1
	pnull
	pnull
	var	0
	int	0
	line	85
	colm	15
	subsc
	line	85
	colm	9
	llist	1
	line	85
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	var	2
	var	1
	var	3
	pnull
	var	0
	pnull
	int	1
	pnull
	var	0
	line	86
	colm	33
	size
	push1
	line	86
	colm	30
	toby
	line	86
	colm	27
	subsc
	line	86
	colm	21
	invoke	1
	line	86
	colm	13
	invoke	2
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	1
	line	87
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	89
	colm	1
	pfail
	end
proc teq
	local	0,001000,L1
	local	1,001000,L2
	local	2,000020,i
	local	3,000000,teq
	con	0,002000,1,1
	con	1,002000,1,2
	declend
	line	91
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	var	0
	line	94
	colm	7
	size
	pnull
	var	1
	line	94
	colm	14
	size
	line	94
	colm	11
	numne
	unmark
	line	94
	colm	23
	pfail
	unmark
lab L1
	mark	L2
	mark0
	pnull
	pnull
	var	0
	int	0
	line	95
	colm	9
	subsc
	pnull
	var	1
	int	0
	line	95
	colm	19
	subsc
	line	95
	colm	13
	lexne
	unmark
	line	95
	colm	28
	pfail
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	2
	pnull
	int	1
	pnull
	var	0
	line	96
	colm	20
	size
	push1
	line	96
	colm	17
	toby
	line	96
	colm	12
	asgn
	pop
	mark0
	mark0
	mark	L6
	var	3
	pnull
	var	0
	var	2
	line	97
	colm	20
	subsc
	pnull
	var	1
	var	2
	line	97
	colm	26
	subsc
	line	97
	colm	17
	invoke	2
	unmark
	efail
lab L6
	pnull
	unmark
	line	97
	colm	36
	pfail
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L7
	mark	L8
	var	1
	line	98
	colm	4
	pret
lab L8
	pfail
	unmark
lab L7
	pnull
	line	100
	colm	1
	pfail
	end
proc visit
	local	0,001000,ltree
	local	1,000000,visit
	con	0,002000,1,2
	declend
	line	102
	colm	11
	mark	L1
	mark0
	mark	L4
	var	0
	esusp
	goto	L5
lab L4
	var	1
	pnull
	var	0
	pnull
	int	0
	pnull
	var	0
	line	104
	colm	37
	size
	push1
	line	104
	colm	34
	toby
	line	104
	colm	31
	subsc
	line	104
	colm	25
	invoke	1
lab L5
	line	104
	colm	4
	psusp
	pop
lab L2
	efail
lab L3
	unmark
lab L1
	pnull
	line	106
	colm	1
	pfail
	end
