version	U12.1.00
uid	permutat.u1-1788539911-0
impl	error
link	lists.u
link	seqops.u
global	4
	0,000005,multireduce,2
	1,000005,permperiod,1
	2,000005,cycles,1
	3,000005,mutate,2

proc multireduce
	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
	filen	permutat.icn
	line	24
	colm	11
	synt	any
	mark	L1
	pnull
	pnull
	var	1
	line	27
	colm	4
	synt	any
	null
	int	0
	line	27
	colm	7
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	pnull
	line	29
	colm	15
	synt	any
	llist	0
	line	29
	colm	12
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	31
	colm	4
	synt	every
	mark0
	var	5
	var	2
	pnull
	int	1
	var	1
	push1
	line	31
	colm	25
	synt	any
	toby
	line	31
	colm	13
	synt	any
	invoke	2
	pop
lab L4
	efail
lab L5
	line	31
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	pnull
	var	4
	var	6
	var	2
	var	7
	int	1
	var	0
	line	33
	colm	37
	synt	any
	invoke	2
	line	33
	colm	23
	synt	any
	invoke	2
	line	33
	colm	10
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	3
	pnull
	line	35
	colm	14
	synt	any
	llist	0
	line	35
	colm	11
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	line	37
	colm	4
	synt	every
	mark0
	pnull
	var	3
	dup
	pnull
	var	4
	line	37
	colm	23
	synt	any
	bang
	line	37
	colm	17
	synt	any
	lconcat
	asgn
	pop
lab L9
	efail
lab L10
	line	37
	colm	4
	synt	endevery
	unmark
lab L8
	mark	L11
	mark	L12
	var	3
	line	39
	colm	4
	synt	any
	pret
lab L12
	synt	any
	pfail
	unmark
lab L11
	pnull
	line	41
	colm	1
	synt	any
	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
	synt	any
	mark	L1
	pnull
	var	1
	pnull
	line	46
	colm	15
	synt	any
	llist	0
	line	46
	colm	12
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	48
	colm	4
	synt	every
	mark0
	var	2
	var	1
	pnull
	pnull
	var	3
	var	0
	line	48
	colm	31
	synt	any
	invoke	1
	line	48
	colm	24
	synt	any
	bang
	line	48
	colm	23
	synt	any
	size
	line	48
	colm	13
	synt	any
	invoke	2
	pop
lab L3
	efail
lab L4
	line	48
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	4
	var	1
	invoke	-1
	line	50
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	52
	colm	1
	synt	any
	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
	synt	any
	mark	L1
	pnull
	var	3
	pnull
	line	57
	colm	14
	synt	any
	llist	0
	line	57
	colm	11
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	var	5
	line	59
	colm	18
	synt	any
	invoke	0
	line	59
	colm	12
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	61
	colm	4
	synt	every
	mark0
	var	6
	var	1
	pnull
	int	0
	pnull
	var	0
	line	61
	colm	31
	synt	any
	size
	push1
	line	61
	colm	28
	synt	any
	toby
	line	61
	colm	16
	synt	any
	invoke	2
	pop
lab L4
	efail
lab L5
	line	61
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
lab L7
	line	63
	colm	4
	synt	repeat
	mark	L7
	mark	L10
	pnull
	var	4
	mark	L11
	pnull
	var	1
	line	64
	colm	12
	synt	any
	bang
	line	64
	colm	21
	synt	any
	esusp
	goto	L12
lab L11
	unmark
	unmark
	pnull
	goto	L9
lab L12
	line	64
	colm	9
	synt	any
	asgn
	unmark
lab L10
	mark	L13
	var	7
	var	1
	var	4
	line	65
	colm	13
	synt	any
	invoke	2
	unmark
lab L13
	mark	L14
	pnull
	var	2
	var	5
	line	66
	colm	19
	synt	any
	invoke	0
	line	66
	colm	13
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	var	6
	var	2
	var	4
	line	67
	colm	13
	synt	any
	invoke	2
	unmark
lab L15
	mark	L16
lab L17
	line	68
	colm	7
	synt	repeat
	mark	L17
	mark	L20
	pnull
	var	4
	var	8
	pnull
	var	0
	var	4
	line	69
	colm	24
	synt	any
	subsc
	line	69
	colm	22
	synt	any
	invoke	1
	line	69
	colm	12
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	var	7
	var	1
	var	4
	line	70
	colm	16
	synt	any
	invoke	2
	unmark
lab L21
	line	71
	colm	10
	synt	ifelse
	mark	L22
	var	9
	var	2
	var	4
	line	71
	colm	19
	synt	any
	invoke	2
	unmark
	unmark
	pnull
	goto	L19
	goto	L23
lab L22
	var	6
	var	2
	var	4
	line	72
	colm	21
	synt	any
	invoke	2
lab L23
	line	71
	colm	10
	synt	endifelse
lab L18
	unmark
	goto	L17
lab L19
	line	68
	colm	7
	synt	endrepeat
	unmark
lab L16
	var	10
	var	3
	var	11
	var	2
	line	74
	colm	23
	synt	any
	invoke	1
	line	74
	colm	10
	synt	any
	invoke	2
lab L8
	unmark
	goto	L7
lab L9
	line	63
	colm	4
	synt	endrepeat
	unmark
lab L6
	mark	L24
	mark	L25
	var	3
	line	77
	colm	4
	synt	any
	pret
lab L25
	synt	any
	pfail
	unmark
lab L24
	pnull
	line	79
	colm	1
	synt	any
	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
	synt	any
	mark	L1
	pnull
	var	2
	pnull
	line	84
	colm	14
	synt	any
	llist	0
	line	84
	colm	11
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	86
	colm	4
	synt	every
	mark0
	var	3
	var	2
	pnull
	var	0
	pnull
	var	1
	line	86
	colm	26
	synt	any
	bang
	line	86
	colm	25
	synt	any
	subsc
	line	86
	colm	13
	synt	any
	invoke	2
	pop
lab L3
	efail
lab L4
	line	86
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	2
	line	88
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	90
	colm	1
	synt	any
	pfail
	end
