proc matrix_width
	filen	matrix.icn
	local	0,001000,M
	con	0,002000,1,1
	declend
	line	27
	colm	11
	mark	L1
	mark	L2
	pnull
	pnull
	var	0
	int	0
	line	29
	colm	13
	subsc
	line	29
	colm	11
	size
	line	29
	colm	4
	pret
lab L2
	pfail
	unmark
lab L1
	pnull
	line	31
	colm	1
	pfail
	end
proc matrix_height
	local	0,001000,M
	declend
	line	33
	colm	11
	mark	L1
	mark	L2
	pnull
	var	0
	line	35
	colm	11
	size
	line	35
	colm	4
	pret
lab L2
	pfail
	unmark
lab L1
	pnull
	line	37
	colm	1
	pfail
	end
proc write_matrix
	local	0,001000,file
	local	1,001000,M
	local	2,001000,x
	local	3,001000,s
	local	4,000020,r
	local	5,000020,c
	local	6,000020,row
	local	7,000020,col
	local	8,000000,matrix_height
	local	9,000000,matrix_width
	local	10,000000,writes
	local	11,000000,write
	con	0,002000,1,1
	con	1,010000,1,133
	con	2,010000,2,054,040
	con	3,010000,1,135
	declend
	line	39
	colm	11
	mark	L1
	pnull
	var	4
	var	8
	var	1
	line	42
	colm	22
	invoke	1
	line	42
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	5
	var	9
	var	1
	line	43
	colm	21
	invoke	1
	line	43
	colm	6
	asgn
	unmark
lab L2
	mark	L3
	mark	L4
	pnull
	var	2
	line	45
	colm	7
	null
	unmark
	mark0
	pnull
	var	6
	pnull
	int	0
	var	4
	push1
	line	46
	colm	22
	toby
	line	46
	colm	17
	asgn
	pop
	mark0
	mark	L8
	mark0
	pnull
	var	7
	pnull
	int	0
	var	5
	push1
	line	47
	colm	25
	toby
	line	47
	colm	20
	asgn
	pop
	mark0
	var	10
	var	0
	pnull
	pnull
	var	1
	var	6
	line	48
	colm	27
	subsc
	var	7
	line	48
	colm	32
	subsc
	var	3
	line	48
	colm	19
	invoke	3
	unmark
lab L9
	efail
lab L10
	unmark
lab L8
	var	11
	var	0
	line	50
	colm	15
	invoke	1
	unmark
lab L6
	efail
lab L7
	goto	L5
lab L4
	mark0
	pnull
	var	6
	pnull
	int	0
	var	4
	push1
	line	54
	colm	22
	toby
	line	54
	colm	17
	asgn
	pop
	mark0
	mark	L13
	var	10
	var	0
	str	1
	line	55
	colm	16
	invoke	2
	unmark
lab L13
	mark	L14
	mark0
	pnull
	var	7
	pnull
	int	0
	var	5
	push1
	line	56
	colm	25
	toby
	line	56
	colm	20
	asgn
	pop
	mark0
	var	10
	var	0
	pnull
	pnull
	var	1
	var	6
	line	57
	colm	27
	subsc
	var	7
	line	57
	colm	32
	subsc
	str	2
	line	57
	colm	19
	invoke	3
	unmark
lab L15
	efail
lab L16
	unmark
lab L14
	var	11
	var	0
	str	3
	line	59
	colm	15
	invoke	2
	unmark
lab L11
	efail
lab L12
lab L5
	unmark
lab L3
	pnull
	line	63
	colm	1
	pfail
	end
proc copy_matrix
	local	0,001000,M
	local	1,000020,M1
	local	2,000020,n
	local	3,000020,i
	local	4,000000,list
	local	5,000000,copy
	con	0,002000,1,1
	declend
	line	65
	colm	11
	mark	L1
	pnull
	var	2
	pnull
	var	0
	line	68
	colm	9
	size
	line	68
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	var	4
	var	2
	line	70
	colm	14
	invoke	1
	line	70
	colm	7
	asgn
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	3
	pnull
	int	0
	var	2
	push1
	line	72
	colm	17
	toby
	line	72
	colm	12
	asgn
	pop
	mark0
	pnull
	pnull
	var	1
	var	3
	line	73
	colm	9
	subsc
	var	5
	pnull
	var	0
	var	3
	line	73
	colm	22
	subsc
	line	73
	colm	20
	invoke	1
	line	73
	colm	13
	asgn
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L6
	mark	L7
	var	1
	line	75
	colm	4
	pret
lab L7
	pfail
	unmark
lab L6
	pnull
	line	77
	colm	1
	pfail
	end
proc create_matrix
	local	0,001000,n
	local	1,001000,m
	local	2,001000,x
	local	3,000020,M
	local	4,000000,list
	declend
	line	79
	colm	11
	mark	L1
	pnull
	var	3
	var	4
	var	0
	line	82
	colm	13
	invoke	1
	line	82
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	pnull
	var	3
	line	83
	colm	10
	bang
	var	4
	var	1
	var	2
	line	83
	colm	20
	invoke	2
	line	83
	colm	13
	asgn
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	mark	L6
	var	3
	line	85
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	87
	colm	1
	pfail
	end
proc identity_matrix
	local	0,001000,n
	local	1,001000,m
	local	2,000020,r
	local	3,000020,c
	local	4,000020,M
	local	5,000000,create_matrix
	con	0,002000,1,0
	con	1,002000,1,1
	declend
	line	89
	colm	11
	mark	L1
	pnull
	var	4
	var	5
	var	0
	var	1
	int	0
	line	92
	colm	22
	invoke	3
	line	92
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	2
	pnull
	int	1
	var	0
	push1
	line	94
	colm	17
	toby
	line	94
	colm	12
	asgn
	pop
	mark0
	mark0
	pnull
	var	3
	pnull
	int	1
	var	1
	push1
	line	95
	colm	20
	toby
	line	95
	colm	15
	asgn
	pop
	mark0
	mark0
	pnull
	var	2
	var	3
	line	96
	colm	15
	numeq
	unmark
	pnull
	pnull
	pnull
	var	4
	var	2
	line	96
	colm	25
	subsc
	var	3
	line	96
	colm	28
	subsc
	int	1
	line	96
	colm	32
	asgn
	unmark
lab L5
	efail
lab L6
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L7
	mark	L8
	var	4
	line	100
	colm	4
	pret
lab L8
	pfail
	unmark
lab L7
	pnull
	line	102
	colm	1
	pfail
	end
proc add_matrix
	local	0,001000,M1
	local	1,001000,M2
	local	2,000020,M3
	local	3,000020,r
	local	4,000020,c
	local	5,000020,n
	local	6,000020,m
	local	7,000000,stop
	local	8,000000,create_matrix
	con	0,002000,1,1
	con	1,010000,26,052,052,052,040,151,156,143,157,162,162,145,143,164,040,155,141,164,162,151,170,040,163,151,172,145,163
	declend
	line	104
	colm	11
	mark	L1
	mark0
	mark	L2
	pnull
	pnull
	var	5
	pnull
	var	0
	line	107
	colm	14
	size
	line	107
	colm	11
	asgn
	pnull
	var	1
	line	107
	colm	22
	size
	line	107
	colm	19
	numne
	esusp
	goto	L3
lab L2
	pnull
	pnull
	var	6
	pnull
	pnull
	var	0
	int	0
	line	107
	colm	39
	subsc
	line	107
	colm	36
	size
	line	107
	colm	33
	asgn
	pnull
	pnull
	var	1
	int	0
	line	107
	colm	50
	subsc
	line	107
	colm	47
	size
	line	107
	colm	44
	numne
lab L3
	unmark
	var	7
	str	1
	line	108
	colm	11
	invoke	1
	unmark
lab L1
	mark	L4
	pnull
	var	2
	var	8
	var	5
	var	6
	line	110
	colm	23
	invoke	2
	line	110
	colm	7
	asgn
	unmark
lab L4
	mark	L5
	mark0
	pnull
	var	3
	pnull
	int	0
	var	5
	push1
	line	112
	colm	17
	toby
	line	112
	colm	12
	asgn
	pop
	mark0
	mark0
	pnull
	var	4
	pnull
	int	0
	var	6
	push1
	line	113
	colm	20
	toby
	line	113
	colm	15
	asgn
	pop
	mark0
	pnull
	pnull
	pnull
	var	2
	var	3
	line	114
	colm	12
	subsc
	var	4
	line	114
	colm	15
	subsc
	pnull
	pnull
	pnull
	var	0
	var	3
	line	114
	colm	24
	subsc
	var	4
	line	114
	colm	27
	subsc
	pnull
	pnull
	var	1
	var	3
	line	114
	colm	35
	subsc
	var	4
	line	114
	colm	38
	subsc
	line	114
	colm	31
	plus
	line	114
	colm	19
	asgn
	unmark
lab L8
	efail
lab L9
	unmark
lab L6
	efail
lab L7
	unmark
lab L5
	mark	L10
	mark	L11
	var	2
	line	116
	colm	4
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	118
	colm	1
	pfail
	end
proc mult_matrix
	local	0,001000,M1
	local	1,001000,M2
	local	2,000020,M3
	local	3,000020,r
	local	4,000020,c
	local	5,000020,n
	local	6,000020,k
	local	7,000000,stop
	local	8,000000,create_matrix
	con	0,002000,1,1
	con	1,010000,26,052,052,052,040,151,156,143,157,162,162,145,143,164,040,155,141,164,162,151,170,040,163,151,172,145,163
	con	2,002000,1,0
	declend
	line	120
	colm	11
	mark	L1
	mark0
	pnull
	pnull
	var	5
	pnull
	pnull
	var	0
	int	0
	line	123
	colm	16
	subsc
	line	123
	colm	13
	size
	line	123
	colm	10
	asgn
	pnull
	var	1
	line	123
	colm	24
	size
	line	123
	colm	21
	numne
	unmark
	var	7
	str	1
	line	123
	colm	37
	invoke	1
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	8
	pnull
	var	0
	line	125
	colm	24
	size
	pnull
	pnull
	var	1
	int	0
	line	125
	colm	31
	subsc
	line	125
	colm	28
	size
	line	125
	colm	23
	invoke	2
	line	125
	colm	7
	asgn
	unmark
lab L2
	mark	L3
	mark0
	pnull
	var	3
	pnull
	int	0
	pnull
	var	0
	line	126
	colm	20
	size
	push1
	line	126
	colm	17
	toby
	line	126
	colm	12
	asgn
	pop
	mark0
	mark0
	pnull
	var	4
	pnull
	int	0
	pnull
	pnull
	var	1
	int	0
	line	127
	colm	26
	subsc
	line	127
	colm	23
	size
	push1
	line	127
	colm	20
	toby
	line	127
	colm	15
	asgn
	pop
	mark0
	mark	L8
	pnull
	pnull
	pnull
	var	2
	var	3
	line	128
	colm	12
	subsc
	var	4
	line	128
	colm	15
	subsc
	int	2
	line	128
	colm	19
	asgn
	unmark
lab L8
	mark0
	pnull
	var	6
	pnull
	int	0
	var	5
	push1
	line	129
	colm	23
	toby
	line	129
	colm	18
	asgn
	pop
	mark0
	pnull
	pnull
	pnull
	var	2
	var	3
	line	130
	colm	16
	subsc
	var	4
	line	130
	colm	19
	subsc
	dup
	pnull
	pnull
	pnull
	var	0
	var	3
	line	130
	colm	29
	subsc
	var	6
	line	130
	colm	32
	subsc
	pnull
	pnull
	var	1
	var	6
	line	130
	colm	40
	subsc
	var	4
	line	130
	colm	43
	subsc
	line	130
	colm	36
	mult
	line	130
	colm	23
	plus
	asgn
	unmark
lab L9
	efail
lab L10
	unmark
lab L6
	efail
lab L7
	unmark
lab L4
	efail
lab L5
	unmark
lab L3
	mark	L11
	mark	L12
	var	2
	line	135
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	137
	colm	1
	pfail
	end
proc invert_matrix
	local	0,001000,M
	local	1,000020,M1
	local	2,000020,Y
	local	3,000020,I
	local	4,000020,d
	local	5,000020,i
	local	6,000020,n
	local	7,000020,B
	local	8,000020,j
	local	9,000000,stop
	local	10,000000,copy_matrix
	local	11,000000,identity_matrix
	local	12,000000,list
	local	13,000000,lu_decomp
	local	14,000000,lu_back_sub
	con	0,002000,1,1
	con	1,010000,21,052,052,052,040,155,141,164,162,151,170,040,156,157,164,040,163,161,165,141,162,145
	con	2,002000,1,0
	con	3,010000,19,052,052,052,040,163,151,156,147,165,154,141,162,040,155,141,164,162,151,170
	declend
	line	139
	colm	11
	mark	L1
	pnull
	var	6
	pnull
	var	0
	line	142
	colm	9
	size
	line	142
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	6
	pnull
	pnull
	var	0
	int	0
	line	143
	colm	14
	subsc
	line	143
	colm	12
	size
	line	143
	colm	9
	numne
	unmark
	var	9
	str	1
	line	143
	colm	27
	invoke	1
	unmark
lab L2
	mark	L3
	pnull
	var	1
	var	10
	var	0
	line	145
	colm	21
	invoke	1
	line	145
	colm	7
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	2
	var	11
	var	6
	var	6
	line	146
	colm	24
	invoke	2
	line	146
	colm	6
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	3
	var	12
	var	6
	int	2
	line	147
	colm	13
	invoke	2
	line	147
	colm	6
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	4
	mark	L7
	var	13
	var	1
	var	3
	line	152
	colm	18
	invoke	2
	esusp
	goto	L8
lab L7
	var	9
	str	3
	line	152
	colm	32
	invoke	1
lab L8
	line	152
	colm	6
	asgn
	unmark
lab L6
	mark	L9
	mark0
	pnull
	var	8
	pnull
	int	0
	var	6
	push1
	line	154
	colm	17
	toby
	line	154
	colm	12
	asgn
	pop
	mark0
	mark	L12
	pnull
	var	7
	var	12
	var	6
	line	155
	colm	16
	invoke	1
	line	155
	colm	9
	asgn
	unmark
lab L12
	mark	L13
	mark0
	pnull
	var	5
	pnull
	int	0
	var	6
	push1
	line	156
	colm	20
	toby
	line	156
	colm	15
	asgn
	pop
	mark0
	pnull
	pnull
	var	7
	var	5
	line	157
	colm	11
	subsc
	pnull
	pnull
	var	2
	var	5
	line	157
	colm	19
	subsc
	var	8
	line	157
	colm	22
	subsc
	line	157
	colm	15
	asgn
	unmark
lab L14
	efail
lab L15
	unmark
lab L13
	mark	L16
	var	14
	var	1
	var	3
	var	7
	line	158
	colm	18
	invoke	3
	unmark
lab L16
	mark0
	pnull
	var	5
	pnull
	int	0
	var	6
	push1
	line	159
	colm	20
	toby
	line	159
	colm	15
	asgn
	pop
	mark0
	pnull
	pnull
	pnull
	var	2
	var	5
	line	160
	colm	11
	subsc
	var	8
	line	160
	colm	14
	subsc
	pnull
	var	7
	var	5
	line	160
	colm	22
	subsc
	line	160
	colm	18
	asgn
	unmark
lab L17
	efail
lab L18
	unmark
lab L10
	efail
lab L11
	unmark
lab L9
	mark	L19
	mark	L20
	var	2
	line	163
	colm	4
	pret
lab L20
	pfail
	unmark
lab L19
	pnull
	line	165
	colm	1
	pfail
	end
proc determinant
	local	0,001000,M
	local	1,000020,M1
	local	2,000020,I
	local	3,000020,result
	local	4,000020,i
	local	5,000020,n
	local	6,000000,stop
	local	7,000000,copy_matrix
	local	8,000000,list
	local	9,000000,lu_decomp
	con	0,002000,1,1
	con	1,010000,21,052,052,052,040,155,141,164,162,151,170,040,156,157,164,040,163,161,165,141,162,145
	con	2,002000,1,0
	con	3,010000,19,052,052,052,040,163,151,156,147,165,154,141,162,040,155,141,164,162,151,170
	declend
	line	167
	colm	11
	mark	L1
	pnull
	var	5
	pnull
	var	0
	line	170
	colm	9
	size
	line	170
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	5
	pnull
	pnull
	var	0
	int	0
	line	171
	colm	14
	subsc
	line	171
	colm	12
	size
	line	171
	colm	9
	numne
	unmark
	var	6
	str	1
	line	171
	colm	27
	invoke	1
	unmark
lab L2
	mark	L3
	pnull
	var	1
	var	7
	var	0
	line	173
	colm	21
	invoke	1
	line	173
	colm	7
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	2
	var	8
	var	5
	int	2
	line	174
	colm	13
	invoke	2
	line	174
	colm	6
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	3
	mark	L6
	var	9
	var	1
	var	2
	line	176
	colm	23
	invoke	2
	esusp
	goto	L7
lab L6
	var	6
	str	3
	line	176
	colm	37
	invoke	1
lab L7
	line	176
	colm	11
	asgn
	unmark
lab L5
	mark	L8
	mark0
	pnull
	var	4
	pnull
	int	0
	var	5
	push1
	line	178
	colm	17
	toby
	line	178
	colm	12
	asgn
	pop
	mark0
	pnull
	var	3
	dup
	pnull
	pnull
	var	1
	var	4
	line	179
	colm	20
	subsc
	var	4
	line	179
	colm	23
	subsc
	line	179
	colm	14
	mult
	asgn
	unmark
lab L9
	efail
lab L10
	unmark
lab L8
	mark	L11
	mark	L12
	var	3
	line	181
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	183
	colm	1
	pfail
	end
