proc choose
	filen	random.icn
	local	0,001000,k
	local	1,001000,n
	local	2,000020,s
	local	3,000020,j
	local	4,000020,t
	local	5,000000,set
	local	6,000000,insert
	local	7,000000,member
	con	0,002000,1,1
	declend
	line	68
	colm	11
	mark	L1
	pnull
	var	2
	var	5
	line	70
	colm	12
	invoke	0
	line	70
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	3
	pnull
	pnull
	pnull
	var	1
	var	0
	line	71
	colm	17
	minus
	int	0
	line	71
	colm	21
	plus
	var	1
	push1
	line	71
	colm	25
	toby
	line	71
	colm	12
	asgn
	pop
	mark0
	mark	L5
	pnull
	var	4
	pnull
	var	3
	line	72
	colm	12
	random
	line	72
	colm	9
	asgn
	unmark
lab L5
	var	6
	var	2
	mark	L6
	var	7
	var	2
	var	4
	line	73
	colm	26
	invoke	2
	unmark
	var	3
	goto	L7
lab L6
	var	4
lab L7
	line	73
	colm	13
	invoke	2
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L8
	mark	L9
	var	2
	line	75
	colm	4
	pret
lab L9
	pfail
	unmark
lab L8
	pnull
	line	76
	colm	1
	pfail
	end
proc rand_num
	local	0,001000,a_
	local	1,001000,c_
	local	2,001000,m_
	local	3,000040,random_last
	local	4,000040,a
	local	5,000040,c
	local	6,000040,m
	local	7,000000,random
	con	0,002000,1,0
	con	1,002000,10,1103515245
	con	2,002000,9,453816694
	con	3,002000,1,2
	con	4,002000,2,31
	declend
	line	78
	colm	11
	init	L1
	mark	L1
	mark	L2
	pnull
	pnull
	var	7
	line	82
	colm	7
	null
	int	0
	line	82
	colm	15
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	4
	mark	L4
	pnull
	var	0
	line	83
	colm	12
	nonnull
	esusp
	goto	L5
lab L4
	int	1
lab L5
	line	83
	colm	9
	asgn
	unmark
lab L3
	mark	L6
	pnull
	var	5
	mark	L7
	pnull
	var	1
	line	84
	colm	12
	nonnull
	esusp
	goto	L8
lab L7
	int	2
lab L8
	line	84
	colm	9
	asgn
	unmark
lab L6
	pnull
	var	6
	mark	L9
	pnull
	var	2
	line	85
	colm	13
	nonnull
	esusp
	goto	L10
lab L9
	pnull
	int	3
	int	4
	line	85
	colm	21
	power
lab L10
	line	85
	colm	9
	asgn
	unmark
lab L1
	mark	L11
	mark	L12
	pnull
	var	7
	pnull
	pnull
	pnull
	var	4
	var	7
	line	88
	colm	25
	mult
	var	5
	line	88
	colm	34
	plus
	var	6
	line	88
	colm	39
	mod
	line	88
	colm	19
	asgn
	line	88
	colm	5
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	90
	colm	1
	pfail
	end
proc rand_int
	local	0,001000,i
	local	1,000040,scale
	local	2,000000,integer
	local	3,000000,runerr
	local	4,000000,rand_num
	con	0,004000,1.0
	con	1,002000,1,2
	con	2,002000,2,31
	con	3,002000,1,1
	con	4,002000,1,0
	con	5,002000,3,205
	declend
	line	92
	colm	11
	init	L1
	mark	L1
	pnull
	var	1
	pnull
	real	0
	pnull
	pnull
	int	1
	int	2
	line	95
	colm	30
	power
	int	3
	line	95
	colm	35
	minus
	line	95
	colm	25
	div
	line	95
	colm	18
	asgn
	unmark
lab L1
	mark	L2
	mark	L3
	pnull
	var	0
	pnull
	int	4
	var	2
	var	0
	line	97
	colm	22
	invoke	1
	line	97
	colm	13
	numlt
	line	97
	colm	7
	asgn
	esusp
	goto	L4
lab L3
	var	3
	int	5
	var	0
	line	97
	colm	36
	invoke	2
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	pnull
	var	2
	pnull
	pnull
	var	0
	var	4
	line	99
	colm	31
	invoke	0
	line	99
	colm	21
	mult
	var	1
	line	99
	colm	34
	mult
	line	99
	colm	18
	invoke	1
	int	3
	line	99
	colm	43
	plus
	line	99
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	101
	colm	1
	pfail
	end
proc randomize
	local	0,000020,f
	local	1,000020,s
	local	2,000020,i
	local	3,000040,ncalls
	local	4,000000,open
	local	5,000000,reads
	local	6,000000,close
	local	7,000000,ord
	local	8,000000,map
	con	0,002000,1,0
	con	1,002000,1,1
	con	2,010000,12,057,144,145,166,057,165,162,141,156,144,157,155
	con	3,010000,2,162,165
	con	4,002000,1,4
	con	5,002000,3,167
	con	6,010000,6,163,123,155,115,150,110
	con	7,010000,8,110,150,072,115,155,072,123,163
	con	8,010000,8,131,171,130,170,115,155,104,144
	con	9,010000,10,131,171,130,170,057,115,155,057,104,144
	con	10,002000,4,1009
	declend
	line	103
	colm	11
	init	L1
	mark	L1
	pnull
	var	3
	int	0
	line	106
	colm	19
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	3
	dup
	int	1
	line	108
	colm	11
	plus
	asgn
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	0
	var	4
	str	2
	str	3
	line	110
	colm	16
	invoke	2
	line	110
	colm	9
	asgn
	unmark
	mark	L4
	pnull
	var	1
	var	5
	var	0
	int	4
	line	111
	colm	17
	invoke	2
	line	111
	colm	9
	asgn
	unmark
lab L4
	mark	L5
	var	6
	var	0
	line	112
	colm	12
	invoke	1
	unmark
lab L5
	mark0
	pnull
	pnull
	pnull
	var	1
	line	113
	colm	11
	nonnull
	line	113
	colm	10
	size
	int	0
	line	113
	colm	14
	numgt
	unmark
	mark	L6
	pnull
	line	114
	colm	10
	keywd	random
	int	1
	line	114
	colm	18
	asgn
	unmark
lab L6
	mark	L7
	mark0
	pnull
	var	2
	var	7
	pnull
	var	1
	line	115
	colm	25
	bang
	line	115
	colm	24
	invoke	1
	line	115
	colm	18
	asgn
	pop
	mark0
	pnull
	line	116
	colm	13
	keywd	random
	pnull
	pnull
	int	5
	line	116
	colm	30
	keywd	random
	line	116
	colm	28
	mult
	var	2
	line	116
	colm	38
	plus
	line	116
	colm	21
	asgn
	unmark
lab L8
	efail
lab L9
	unmark
lab L7
	mark	L10
	pnull
	line	117
	colm	10
	pret
lab L10
	pfail
	unmark
lab L3
	mark	L11
	pnull
	line	121
	colm	4
	keywd	random
	pnull
	pnull
	pnull
	var	8
	str	6
	str	7
	line	121
	colm	41
	keywd	clock
	line	121
	colm	18
	invoke	3
	var	8
	str	8
	str	9
	line	122
	colm	37
	keywd	date
	line	122
	colm	10
	invoke	3
	line	121
	colm	49
	plus
	line	122
	colm	46
	keywd	time
	line	122
	colm	44
	plus
	pnull
	int	10
	var	3
	line	122
	colm	59
	mult
	line	122
	colm	52
	plus
	line	121
	colm	12
	asgn
	unmark
lab L11
	mark	L12
	mark	L13
	pnull
	line	124
	colm	4
	pret
lab L13
	pfail
	unmark
lab L12
	pnull
	line	126
	colm	1
	pfail
	end
proc randrange
	local	0,001000,min
	local	1,001000,max
	con	0,002000,1,1
	declend
	line	128
	colm	11
	mark	L1
	mark	L2
	pnull
	pnull
	var	0
	int	0
	line	130
	colm	15
	minus
	pnull
	pnull
	pnull
	var	1
	var	0
	line	130
	colm	27
	minus
	int	0
	line	130
	colm	33
	plus
	line	130
	colm	21
	random
	line	130
	colm	19
	plus
	line	130
	colm	4
	pret
lab L2
	pfail
	unmark
lab L1
	pnull
	line	132
	colm	1
	pfail
	end
proc randrangeseq
	local	0,001000,i
	local	1,001000,j
	local	2,000020,x
	local	3,000020,m
	local	4,000020,a
	local	5,000020,c
	local	6,000020,n
	local	7,000000,nxtprime
	con	0,002000,1,1
	con	1,002000,1,0
	declend
	line	134
	colm	11
	mark	L1
	pnull
	var	6
	pnull
	pnull
	var	1
	var	0
	line	137
	colm	11
	minus
	int	0
	line	137
	colm	15
	plus
	line	137
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	6
	int	1
	line	139
	colm	9
	numlt
	unmark
	line	139
	colm	18
	pfail
	unmark
lab L2
	mark	L3
	pnull
	var	2
	int	0
	line	141
	colm	6
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	3
	var	7
	var	6
	line	142
	colm	17
	invoke	1
	line	142
	colm	6
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	4
	pnull
	var	3
	int	0
	line	143
	colm	11
	plus
	line	143
	colm	6
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	5
	var	7
	var	3
	line	144
	colm	17
	invoke	1
	line	144
	colm	6
	asgn
	unmark
lab L6
	mark	L7
	mark0
	pnull
	int	0
	var	3
	push1
	line	146
	colm	12
	toby
	pop
	mark0
	mark	L10
	pnull
	var	2
	pnull
	pnull
	pnull
	var	4
	var	2
	line	147
	colm	15
	mult
	var	5
	line	147
	colm	19
	plus
	var	3
	line	147
	colm	24
	mod
	line	147
	colm	9
	asgn
	unmark
lab L10
	mark0
	pnull
	var	2
	var	6
	line	148
	colm	12
	numlt
	unmark
	mark0
	pnull
	var	2
	var	0
	line	149
	colm	20
	plus
	line	149
	colm	10
	psusp
	pop
lab L11
	efail
lab L12
	unmark
lab L8
	efail
lab L9
	unmark
lab L7
	pnull
	line	153
	colm	1
	pfail
	end
proc randseq
	local	0,001000,seed
	con	0,002000,1,1
	declend
	line	155
	colm	11
	mark	L1
	mark0
	pnull
	line	157
	colm	12
	keywd	random
	var	0
	line	157
	colm	20
	asgn
	line	157
	colm	4
	psusp
	pop
lab L2
	efail
lab L3
	unmark
lab L1
	mark	L4
	mark0
lab L7
	mark0
	pnull
	int	0
	line	158
	colm	13
	random
	chfail	L7
	esusp
	pop
	line	158
	colm	18
	keywd	random
	line	158
	colm	4
	psusp
	pop
lab L5
	efail
lab L6
	unmark
lab L4
	pnull
	line	160
	colm	1
	pfail
	end
proc rng
	local	0,001000,a
	local	1,001000,c
	local	2,001000,m
	local	3,001000,x
	local	4,000000,iand
	con	0,002000,10,1103515245
	con	1,002000,9,453816694
	con	2,002000,1,2
	con	3,002000,2,31
	con	4,002000,1,1
	con	5,002000,1,0
	declend
	line	162
	colm	11
	mark	L1
	pnull
	pnull
	var	0
	line	164
	colm	4
	null
	int	0
	line	164
	colm	7
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	var	1
	line	165
	colm	4
	null
	int	1
	line	165
	colm	7
	asgn
	unmark
lab L2
	mark	L3
	pnull
	pnull
	var	2
	line	166
	colm	4
	null
	pnull
	pnull
	int	2
	int	3
	line	166
	colm	12
	power
	int	4
	line	166
	colm	17
	minus
	line	166
	colm	7
	asgn
	unmark
lab L3
	mark	L4
	pnull
	pnull
	var	3
	line	167
	colm	4
	null
	int	5
	line	167
	colm	7
	asgn
	unmark
lab L4
	mark	L5
	mark0
	var	3
	line	169
	colm	4
	psusp
	pop
lab L6
	efail
lab L7
	unmark
lab L5
	mark	L8
	mark0
	pnull
	var	3
	var	4
	pnull
	pnull
	var	0
lab L11
	mark0
	var	3
	chfail	L11
	esusp
	line	170
	colm	24
	mult
	var	1
	line	170
	colm	29
	plus
	var	2
	line	170
	colm	21
	invoke	2
	line	170
	colm	14
	asgn
	line	170
	colm	4
	psusp
	pop
lab L9
	efail
lab L10
	unmark
lab L8
	pnull
	line	172
	colm	1
	pfail
	end
proc shuffle
	local	0,001000,x
	local	1,000020,i
	local	2,000000,string
	con	0,002000,1,2
	con	1,002000,1,1
	declend
	line	179
	colm	11
	mark	L1
	pnull
	var	0
	var	2
	var	0
	line	182
	colm	15
	invoke	1
	line	182
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	pnull
	pnull
	var	0
	line	183
	colm	15
	size
	int	0
	pnull
	int	1
	line	183
	colm	26
	neg
	line	183
	colm	18
	toby
	line	183
	colm	12
	asgn
	pop
	mark0
	pnull
	pnull
	var	0
	pnull
	var	1
	line	184
	colm	9
	random
	line	184
	colm	8
	subsc
	pnull
	var	0
	var	1
	line	184
	colm	18
	subsc
	line	184
	colm	13
	swap
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	0
	line	185
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	186
	colm	1
	pfail
	end
