proc multireduce
	filen	permutat.icn
	local	0,001000,i
	local	1,001000,j
	local	2,000020,indexes
	local	3,000020,result
	local	4,000020,parts
	local	5,000000,put
	local	6,000000,ldecollate
	local	7,000000,srun
	con	0,002000,1,2
	con	1,002000,1,1
	declend
	line	24
	colm	11
	mark	L1
	pnull
	pnull
	var	1
	line	27
	colm	4
	null
	int	0
	line	27
	colm	7
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	pnull
	line	29
	colm	15
	llist	0
	line	29
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	mark0
	var	5
	var	2
	pnull
	int	1
	var	1
	push1
	line	31
	colm	25
	toby
	line	31
	colm	13
	invoke	2
	pop
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L6
	pnull
	var	4
	var	6
	var	2
	var	7
	int	1
	var	0
	line	33
	colm	37
	invoke	2
	line	33
	colm	23
	invoke	2
	line	33
	colm	10
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	3
	pnull
	line	35
	colm	14
	llist	0
	line	35
	colm	11
	asgn
	unmark
lab L7
	mark	L8
	mark0
	pnull
	var	3
	dup
	pnull
	var	4
	line	37
	colm	23
	bang
	line	37
	colm	17
	lconcat
	asgn
	pop
lab L9
	efail
lab L10
	unmark
lab L8
	mark	L11
	mark	L12
	var	3
	line	39
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	41
	colm	1
	pfail
	end
proc permperiod
	local	0,001000,p
	local	1,000020,lengths
	local	2,000000,put
	local	3,000000,cycles
	local	4,000000,lcml
	declend
	line	43
	colm	11
	mark	L1
	pnull
	var	1
	pnull
	line	46
	colm	15
	llist	0
	line	46
	colm	12
	asgn
	unmark
lab L1
	mark	L2
	mark0
	var	2
	var	1
	pnull
	pnull
	var	3
	var	0
	line	48
	colm	31
	invoke	1
	line	48
	colm	24
	bang
	line	48
	colm	23
	size
	line	48
	colm	13
	invoke	2
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	4
	var	1
	invoke	-1
	line	50
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	52
	colm	1
	pfail
	end
proc cycles
	local	0,001000,p
	local	1,000020,indices
	local	2,000020,cycle
	local	3,000020,cycles
	local	4,000020,i
	local	5,000000,set
	local	6,000000,insert
	local	7,000000,delete
	local	8,000000,integer
	local	9,000000,member
	local	10,000000,put
	local	11,000000,sort
	con	0,002000,1,1
	declend
	line	54
	colm	11
	mark	L1
	pnull
	var	3
	pnull
	line	57
	colm	14
	llist	0
	line	57
	colm	11
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	var	5
	line	59
	colm	18
	invoke	0
	line	59
	colm	12
	asgn
	unmark
lab L2
	mark	L3
	mark0
	var	6
	var	1
	pnull
	int	0
	pnull
	var	0
	line	61
	colm	31
	size
	push1
	line	61
	colm	28
	toby
	line	61
	colm	16
	invoke	2
	pop
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L6
lab L7
	mark	L7
	mark	L10
	pnull
	var	4
	mark	L11
	pnull
	var	1
	line	64
	colm	12
	bang
	esusp
	goto	L12
lab L11
	unmark
	unmark
	pnull
	goto	L9
lab L12
	line	64
	colm	9
	asgn
	unmark
lab L10
	mark	L13
	var	7
	var	1
	var	4
	line	65
	colm	13
	invoke	2
	unmark
lab L13
	mark	L14
	pnull
	var	2
	var	5
	line	66
	colm	19
	invoke	0
	line	66
	colm	13
	asgn
	unmark
lab L14
	mark	L15
	var	6
	var	2
	var	4
	line	67
	colm	13
	invoke	2
	unmark
lab L15
	mark	L16
lab L17
	mark	L17
	mark	L20
	pnull
	var	4
	var	8
	pnull
	var	0
	var	4
	line	69
	colm	24
	subsc
	line	69
	colm	22
	invoke	1
	line	69
	colm	12
	asgn
	unmark
lab L20
	mark	L21
	var	7
	var	1
	var	4
	line	70
	colm	16
	invoke	2
	unmark
lab L21
	mark	L22
	var	9
	var	2
	var	4
	line	71
	colm	19
	invoke	2
	unmark
	unmark
	pnull
	goto	L19
	goto	L23
lab L22
	var	6
	var	2
	var	4
	line	72
	colm	21
	invoke	2
lab L23
lab L18
	unmark
	goto	L17
lab L19
	unmark
lab L16
	var	10
	var	3
	var	11
	var	2
	line	74
	colm	23
	invoke	1
	line	74
	colm	10
	invoke	2
lab L8
	unmark
	goto	L7
lab L9
	unmark
lab L6
	mark	L24
	mark	L25
	var	3
	line	77
	colm	4
	pret
lab L25
	pfail
	unmark
lab L24
	pnull
	line	79
	colm	1
	pfail
	end
proc mutate
	local	0,001000,seq
	local	1,001000,mutation
	local	2,000020,result
	local	3,000000,put
	declend
	line	81
	colm	11
	mark	L1
	pnull
	var	2
	pnull
	line	84
	colm	14
	llist	0
	line	84
	colm	11
	asgn
	unmark
lab L1
	mark	L2
	mark0
	var	3
	var	2
	pnull
	var	0
	pnull
	var	1
	line	86
	colm	26
	bang
	line	86
	colm	25
	subsc
	line	86
	colm	13
	invoke	2
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	2
	line	88
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	90
	colm	1
	pfail
	end
