Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 1308 Awkward Lights
// 2018.3.8 bal4u

#include <stdio.h>
#include <string.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

#define N 630

// solve A X = C
int A[N][N], X[N], C[N];
int B[N][N];				// working

int gauss_jordan(int n)
{
	int i, j, k, t, pivot;

	for (i = 0; i < n; i++) for (j = 0; j < n; j++) B[i][j] = A[i][j];
	for (i = 0; i < n; i++) B[i][n] = C[i];

	for (i = 0; i < n; i++) {
		pivot = -1, t = -1;
		for (j = i; j < n; j++) if (B[j][i] > t) pivot = j, t = B[j][i];
		if (pivot < 0 || !t) continue;

		for (j = 0; j <= n; j++) {					// swap(B[i],B[pivot]);
			t = B[i][j], B[i][j] = B[pivot][j], B[pivot][j] = t;
		}

		for (j = 0; j < n; j++) if (i != j && B[j][i]) {
	        for (k = i; k <= n; k++) B[j][k] = (B[j][k]+B[i][k]) & 1;
		}
	}

	for (i = 0; i < n; i++) {
		X[i] = B[i][n];
		if (!B[i][i] && B[i][n]) return 0;
	}
	return 1;
}

#define ABS(a)	((a)>=0?(a):-(a))
#define ID(r,c)	((r)*m+(c))
int  s[28][28];

int main()
{
	int m, n, d, i, j, r, c, t;

	while (m = in()) {
		n = in(), d = in();
		memset(A, 0, sizeof(A)), memset(C, 0, sizeof(C));

		for (i = 0; i < n; i++) for (j = 0; j < m; j++) s[i][j] = in();
	
		for (i = 0; i < n; i++) for (j = 0; j < m; j++) {
			if (s[i][j]) C[ID(i,j)] = 1;
			for (r = 0; r < n; r++) for (c = 0; c < m; c++) {
				t = ABS(r-i)+ABS(c-j);
				if (t == d || t == 0) A[ID(i,j)][ID(r,c)] = 1;
			}
		}
		putchar('0' + gauss_jordan(m*n));
		putchar('\n');
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 1587600
A:
	.zero	1587600
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 2520
X:
	.zero	2520
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 2520
C:
	.zero	2520
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 1587600
B:
	.zero	1587600
	.text
	.globl	gauss_jordan
	.type	gauss_jordan, @function
gauss_jordan:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	movl	$0, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L7
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$0, -20(%rbp)
	jmp	.L9
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	movl	$0, -20(%rbp)
	jmp	.L11
.L25:
	movl	$-1, -4(%rbp)
	movl	$-1, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L12
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L13
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	cmpl	$0, -4(%rbp)
	js	.L30
	cmpl	$0, -8(%rbp)
	je	.L30
	movl	$0, -16(%rbp)
	jmp	.L18
.L19:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	B(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L19
	movl	$0, -16(%rbp)
	jmp	.L20
.L24:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	je	.L21
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L24
	jmp	.L17
.L30:
	nop
.L17:
	addl	$1, -20(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	imulq	$2524, %rax, %rax
	leaq	B(%rip), %rdx
	movl	(%rax,%rdx), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$1, %eax
.L28:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	gauss_jordan, .-gauss_jordan
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3136
s:
	.zero	3136
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	jmp	.L32
.L48:
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -8(%rbp)
	movl	$1587600, %edx
	movl	$0, %esi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2520, %edx
	movl	$0, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L33
.L36:
	movl	$0, -28(%rbp)
	jmp	.L34
.L35:
	movl	$0, %eax
	call	in
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	subq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -28(%rbp)
.L34:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L35
	addl	$1, -32(%rbp)
.L33:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L36
	movl	$0, -32(%rbp)
	jmp	.L37
.L47:
	movl	$0, -28(%rbp)
	jmp	.L38
.L46:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L39
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	$1, (%rdx,%rax)
.L39:
	movl	$0, -24(%rbp)
	jmp	.L40
.L45:
	movl	$0, -20(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L42
	cmpl	$0, -4(%rbp)
	jne	.L43
.L42:
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$630, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$1, (%rdx,%rax)
.L43:
	addl	$1, -20(%rbp)
.L41:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L44
	addl	$1, -24(%rbp)
.L40:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L45
	addl	$1, -28(%rbp)
.L38:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L46
	addl	$1, -32(%rbp)
.L37:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L47
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edi
	call	gauss_jordan
	addl	$48, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$10, %edi
	call	putchar@PLT
.L32:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L48
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB35:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE35:
	.size	in, .-in
	.p2align 4
	.globl	gauss_jordan
	.type	gauss_jordan, @function
gauss_jordan:
.LFB36:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	jle	.L80
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rdi), %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	B(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r14, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movl	%eax, 32(%rsp)
	movq	%rax, 104(%rsp)
	movl	%edi, %eax
	movq	%rax, 40(%rsp)
	imulq	$2520, %rax, %r15
	leaq	0(,%rax,4), %rbp
	movl	%edi, (%rsp)
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	0(%r13,%r12), %rdi
	leaq	(%rbx,%r12), %rsi
	movq	%rbp, %rdx
	addq	$2520, %r12
	call	memcpy@PLT
	leaq	B(%rip), %r14
	cmpq	%r15, %r12
	jne	.L14
	cmpl	$2, 32(%rsp)
	movl	(%rsp), %r12d
	movq	%r14, 96(%rsp)
	jbe	.L48
	movl	%r12d, %ecx
	leaq	C(%rip), %rsi
	movslq	%r12d, %rax
	shrl	$2, %ecx
	leaq	16(%rsi), %rdi
	movq	%rax, 80(%rsp)
	movq	%rsi, %rdx
	subl	$1, %ecx
	leaq	0(%r13,%rax,4), %rax
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	movdqa	(%rdx), %xmm0
	addq	$16, %rdx
	addq	$10080, %rax
	pshufd	$85, %xmm0, %xmm1
	movd	%xmm0, -10080(%rax)
	movd	%xmm1, -7560(%rax)
	movdqa	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm1
	pshufd	$255, %xmm0, %xmm0
	movd	%xmm1, -5040(%rax)
	movd	%xmm0, -2520(%rax)
	cmpq	%rcx, %rdx
	jne	.L17
	movl	%r12d, %eax
	andl	$-4, %eax
	testb	$3, %r12b
	je	.L18
.L16:
	movslq	%eax, %rcx
	movq	80(%rsp), %rbx
	imulq	$630, %rcx, %rdx
	movl	(%rsi,%rcx,4), %ecx
	addq	%rbx, %rdx
	movl	%ecx, 0(%r13,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r12d
	jle	.L18
	movslq	%edx, %rdx
	addl	$2, %eax
	imulq	$630, %rdx, %rcx
	movl	(%rsi,%rdx,4), %edx
	addq	%rbx, %rcx
	movl	%edx, 0(%r13,%rcx,4)
	cmpl	%r12d, %eax
	jge	.L18
	cltq
	imulq	$630, %rax, %rdx
	movl	(%rsi,%rax,4), %eax
	addq	%rbx, %rdx
	movl	%eax, 0(%r13,%rdx,4)
.L18:
	leal	1(%r12), %ebx
	movq	%r13, 16(%rsp)
	movq	%r13, %rbp
	xorl	%r14d, %r14d
	movl	%ebx, %eax
	movl	%ebx, 64(%rsp)
	andl	$-4, %ebx
	movq	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movl	%ebx, 88(%rsp)
	movq	%r13, %rbx
	movdqa	.LC0(%rip), %xmm1
	subl	$1, %eax
	movq	$0, 24(%rsp)
	addq	$1, %rax
	movq	$0, (%rsp)
	movq	$0, 8(%rsp)
	salq	$4, %rax
	movq	%rax, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%r14d, 32(%rsp)
	movl	%r14d, %edx
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	movq	$-1, %rax
	movl	$-1, %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%rsi), %edi
	cmpl	%edi, %r8d
	jge	.L19
	movslq	%ecx, %rax
	movl	%edi, %r8d
.L19:
	addl	$1, %ecx
	addq	$2520, %rsi
	cmpl	%ecx, %r12d
	jg	.L20
	testl	%eax, %eax
	js	.L36
	testl	%r8d, %r8d
	je	.L36
	imulq	$2520, %rax, %rsi
	movq	8(%rsp), %rdi
	leaq	16(%rsi), %rcx
	cmpq	%rdi, %rcx
	jle	.L54
	leaq	16(%rdi), %rcx
	cmpq	%rsi, %rcx
	jg	.L25
.L54:
	cmpl	$2, %r12d
	jle	.L49
	movq	72(%rsp), %rdi
	addq	%r13, %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqu	0(%rbp,%rcx), %xmm0
	movdqu	(%rsi,%rcx), %xmm5
	movups	%xmm5, 0(%rbp,%rcx)
	movups	%xmm0, (%rsi,%rcx)
	addq	$16, %rcx
	cmpq	%rdi, %rcx
	jne	.L28
	movl	64(%rsp), %r9d
	movl	88(%rsp), %esi
	cmpl	%esi, %r9d
	je	.L33
	subl	%esi, %r9d
	movl	%esi, %ecx
	cmpl	%r12d, %esi
	je	.L30
.L27:
	movq	24(%rsp), %rdi
	addq	%rsi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	imulq	$630, %rax, %rdi
	addq	%rsi, %rdi
	leaq	0(%r13,%rdi,4), %rsi
	movq	(%r8), %rdi
	movq	(%rsi), %r10
	movq	%r10, (%r8)
	movq	%rdi, (%rsi)
	movl	%r9d, %esi
	andl	$-2, %esi
	addl	%esi, %ecx
	cmpl	%r9d, %esi
	je	.L33
.L30:
	movslq	32(%rsp), %rsi
	imulq	$630, %rax, %rax
	movslq	%ecx, %rcx
	imulq	$630, %rsi, %rsi
	addq	%rcx, %rax
	addq	%rcx, %rsi
	movl	0(%r13,%rax,4), %ecx
	movl	0(%r13,%rsi,4), %edi
	movl	%ecx, 0(%r13,%rsi,4)
	movl	%edi, 0(%r13,%rax,4)
.L33:
	movl	64(%rsp), %eax
	movslq	32(%rsp), %r10
	movl	%r14d, %r9d
	subl	%edx, %eax
	cmpl	%r10d, %r12d
	movl	%eax, %esi
	movl	$1, %eax
	cmovl	%eax, %esi
	movl	%r12d, %eax
	subl	%edx, %eax
	cmpl	$2, %eax
	movl	%esi, 36(%rsp)
	setbe	%cl
	cmpl	%r14d, %r12d
	setl	%al
	imulq	$630, %r10, %r10
	orl	%eax, %ecx
	movl	%esi, %eax
	andl	$-4, %esi
	shrl	$2, %eax
	addl	%esi, %edx
	movb	%cl, 59(%rsp)
	xorl	%ecx, %ecx
	leal	-1(%rax), %r8d
	movq	$-4, %rax
	movl	%esi, 60(%rsp)
	movq	%r14, %rsi
	addq	$1, %r8
	subq	%rbx, %rax
	movl	%edx, 68(%rsp)
	movq	16(%rsp), %rdx
	movq	%rax, 48(%rsp)
	salq	$4, %r8
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %ecx
	addq	$2520, %rdx
	addq	$630, %rsi
	cmpl	%ecx, %r12d
	je	.L36
.L35:
	cmpl	%r9d, %ecx
	je	.L37
	movl	(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L37
	movq	48(%rsp), %rax
	addq	%rdx, %rax
	cmpq	$8, %rax
	jbe	.L51
	cmpl	%r9d, %r12d
	jle	.L51
	cmpb	$0, 59(%rsp)
	jne	.L52
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L40:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%rbx,%rax), %xmm4
	paddd	%xmm4, %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L40
	movl	60(%rsp), %eax
	cmpl	%eax, 36(%rsp)
	je	.L37
	movl	%eax, %edi
	movl	68(%rsp), %eax
.L39:
	movl	36(%rsp), %r11d
	subl	%edi, %r11d
	cmpl	$1, %r11d
	je	.L43
	leaq	(%rdi,%rsi), %r15
	addq	(%rsp), %rdi
	leaq	0(%r13,%r15,4), %r15
	movq	0(%r13,%rdi,4), %xmm0
	movl	%r11d, %edi
	movq	(%r15), %xmm2
	andl	$-2, %edi
	addl	%edi, %eax
	paddd	%xmm2, %xmm0
	pand	%xmm3, %xmm0
	movq	%xmm0, (%r15)
	cmpl	%edi, %r11d
	je	.L37
.L43:
	movslq	%ecx, %rdi
	cltq
	imulq	$630, %rdi, %rdi
	addq	%rax, %rdi
	addq	%r10, %rax
	movl	0(%r13,%rax,4), %eax
	addl	0(%r13,%rdi,4), %eax
	andl	$1, %eax
	movl	%eax, 0(%r13,%rdi,4)
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L36:
	addq	$4, 16(%rsp)
	addq	$1, %r14
	addq	$2524, %rbx
	addq	$2520, %rbp
	addq	$2520, 8(%rsp)
	addq	$631, (%rsp)
	addq	$630, 24(%rsp)
	cmpq	40(%rsp), %r14
	jne	.L23
	movq	80(%rsp), %rax
	movq	104(%rsp), %rbx
	leaq	0(%r13,%rax,4), %rdx
	leaq	X(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rbx,4), %rsi
	movq	96(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L47:
	movl	(%rdx), %edi
	movl	(%rcx), %r8d
	movl	%edi, (%rax)
	testl	%r8d, %r8d
	jne	.L55
	testl	%edi, %edi
	jne	.L53
.L55:
	addq	$4, %rax
	addq	$2520, %rdx
	addq	$2524, %rcx
	cmpq	%rsi, %rax
	jne	.L47
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore_state
	movq	16(%rsp), %r15
	movl	32(%rsp), %r11d
	movl	%ecx, 92(%rsp)
	movq	%rdx, %rdi
	movq	8(%rsp), %rcx
	subq	%rdx, %r15
	.p2align 4,,10
	.p2align 3
.L38:
	leaq	(%r15,%rdi), %rax
	addl	$1, %r11d
	addq	$4, %rdi
	movl	(%rax,%rcx), %eax
	addl	-4(%rdi), %eax
	andl	$1, %eax
	movl	%eax, -4(%rdi)
	cmpl	%r11d, %r12d
	jge	.L38
	movl	92(%rsp), %ecx
	jmp	.L37
.L25:
	leaq	0(%r13,%rsi), %rax
	movq	80(%rsp), %rsi
	movq	%rbp, %rcx
	leaq	4(%rbp,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rax), %r8d
	movl	(%rcx), %esi
	addq	$4, %rcx
	addq	$4, %rax
	movl	%r8d, -4(%rcx)
	movl	%esi, -4(%rax)
	cmpq	%rcx, %rdi
	jne	.L32
	jmp	.L33
.L52:
	movl	32(%rsp), %eax
	xorl	%edi, %edi
	jmp	.L39
.L53:
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L49:
	.cfi_restore_state
	movl	64(%rsp), %r9d
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L27
.L48:
	movslq	%r12d, %rbx
	xorl	%eax, %eax
	leaq	C(%rip), %rsi
	movq	%rbx, 80(%rsp)
	jmp	.L16
.L80:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	gauss_jordan, .-gauss_jordan
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	A(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
.L84:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L141
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L118:
	xorl	%r12d, %r12d
	jmp	.L122
.L119:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L121
.L120:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L122:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L119
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L121
	movq	stdin(%rip), %rdi
	jmp	.L120
.L121:
	testl	%r12d, %r12d
	je	.L142
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rdx
	cmpq	%rdx, %rax
	jnb	.L143
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %eax
.L86:
	xorl	%ebx, %ebx
	jmp	.L90
.L87:
	leaq	1(%rcx), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rcx), %eax
	cmpl	$47, %eax
	jle	.L138
.L88:
	movq	%rsi, %rcx
.L90:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%rdx, %rcx
	jb	.L87
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %rdx
	cmpl	$47, %eax
	jg	.L88
.L138:
	movl	%ebx, 4(%rsp)
	cmpq	%rdx, %rsi
	jnb	.L144
	leaq	1(%rsi), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rsi), %eax
.L92:
	xorl	%ebx, %ebx
	jmp	.L96
.L93:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %eax
	cmpl	$47, %eax
	jle	.L95
.L94:
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
.L96:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%rdx, %rcx
	jb	.L93
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L95
	movq	stdin(%rip), %rdi
	jmp	.L94
.L95:
	movl	$1587600, %edx
	movq	%rbp, %rdi
	xorl	%esi, %esi
	call	memset@PLT
	movl	4(%rsp), %edx
	movl	$315, %ecx
	xorl	%eax, %eax
	leaq	C(%rip), %rdi
	rep stosq
	testl	%edx, %edx
	jle	.L98
	testl	%r12d, %r12d
	jle	.L98
	movl	4(%rsp), %eax
	leal	-1(%r12), %ecx
	movq	$-4, %r14
	leaq	4+s(%rip), %r13
	leaq	0(,%rcx,4), %rdx
	leal	-1(%rax), %esi
	subq	%rdx, %r14
	addq	%rdx, %r13
	leaq	0(,%rsi,8), %rax
	movq	%r14, 16(%rsp)
	subq	%rsi, %rax
	leaq	(%rcx,%rax,4), %rcx
	leaq	116+s(%rip), %rax
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 8(%rsp)
.L106:
	movq	16(%rsp), %rax
	leaq	(%rax,%r13), %r15
	.p2align 4,,10
	.p2align 3
.L105:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L145
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L100:
	xorl	%r14d, %r14d
	jmp	.L104
	.p2align 4,,10
	.p2align 3
.L101:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L103
.L102:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L104:
	leal	(%r14,%r14,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r14d
	cmpq	%rcx, %rdx
	jb	.L101
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L103
	movq	stdin(%rip), %rdi
	jmp	.L102
	.p2align 4,,10
	.p2align 3
.L103:
	movl	%r14d, (%r15)
	addq	$4, %r15
	cmpq	%r15, %r13
	jne	.L105
	addq	$112, %r13
	cmpq	8(%rsp), %r13
	jne	.L106
	movslq	%r12d, %rax
	movl	$0, 16(%rsp)
	movl	4(%rsp), %r11d
	movq	$0, 24(%rsp)
	movq	%rax, 8(%rsp)
.L116:
	movq	24(%rsp), %rax
	movl	16(%rsp), %r14d
	movl	%r12d, %esi
	xorl	%r10d, %r10d
	xorl	%r13d, %r13d
	leaq	0(,%rax,8), %r15
	subq	%rax, %r15
	leaq	s(%rip), %rax
	salq	$4, %r15
	addq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L115:
	movl	(%r15,%r13,4), %eax
	testl	%eax, %eax
	je	.L109
	movslq	%r14d, %rax
	leaq	C(%rip), %rdi
	movl	$1, (%rdi,%rax,4)
.L109:
	movslq	%r14d, %r9
	movl	%r11d, %r8d
	movl	%r13d, %edi
	subl	4(%rsp), %r8d
	imulq	$630, %r9, %r9
	.p2align 4,,10
	.p2align 3
.L110:
	movl	%r8d, %ecx
	movl	%r10d, %edx
	negl	%ecx
	cmovs	%r8d, %ecx
	jmp	.L113
	.p2align 4,,10
	.p2align 3
.L111:
	addl	$1, %edx
	cmpl	%edx, %esi
	je	.L146
.L113:
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	addl	%ecx, %eax
	cmpl	%ebx, %eax
	je	.L124
	testl	%eax, %eax
	jne	.L111
.L124:
	leal	(%rdi,%rdx), %eax
	addl	$1, %edx
	cltq
	addq	%r9, %rax
	movl	$1, 0(%rbp,%rax,4)
	cmpl	%edx, %esi
	jne	.L113
.L146:
	addl	$1, %r8d
	addl	%r12d, %edi
	cmpl	%r8d, %r11d
	jne	.L110
	addq	$1, %r13
	subl	$1, %esi
	subl	$1, %r10d
	addl	$1, %r14d
	cmpq	%r13, 8(%rsp)
	jne	.L115
	addq	$1, 24(%rsp)
	addl	%r12d, 16(%rsp)
	subl	$1, %r11d
	jne	.L116
.L98:
	movl	4(%rsp), %edi
	imull	%r12d, %edi
	call	gauss_jordan
	movq	stdout(%rip), %rsi
	leal	48(%rax), %edi
	call	putc@PLT
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L84
.L145:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L100
.L144:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
	jmp	.L92
.L143:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
	jmp	.L86
.L142:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L141:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L118
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3136
s:
	.zero	3136
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 1587600
B:
	.zero	1587600
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 2520
C:
	.zero	2520
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 2520
X:
	.zero	2520
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 1587600
A:
	.zero	1587600
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.set	.LC1,.LC0
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB35:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE35:
	.size	in, .-in
	.p2align 4
	.globl	gauss_jordan
	.type	gauss_jordan, @function
gauss_jordan:
.LFB36:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	jle	.L80
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rdi), %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	B(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r14, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movl	%eax, 32(%rsp)
	movq	%rax, 104(%rsp)
	movl	%edi, %eax
	movq	%rax, 40(%rsp)
	imulq	$2520, %rax, %r15
	leaq	0(,%rax,4), %rbp
	movl	%edi, (%rsp)
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	0(%r13,%r12), %rdi
	leaq	(%rbx,%r12), %rsi
	movq	%rbp, %rdx
	addq	$2520, %r12
	call	memcpy@PLT
	leaq	B(%rip), %r14
	cmpq	%r15, %r12
	jne	.L14
	cmpl	$2, 32(%rsp)
	movl	(%rsp), %r12d
	movq	%r14, 96(%rsp)
	jbe	.L48
	movl	%r12d, %ecx
	leaq	C(%rip), %rsi
	movslq	%r12d, %rax
	shrl	$2, %ecx
	leaq	16(%rsi), %rdi
	movq	%rax, 80(%rsp)
	movq	%rsi, %rdx
	subl	$1, %ecx
	leaq	0(%r13,%rax,4), %rax
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	movdqa	(%rdx), %xmm0
	addq	$16, %rdx
	addq	$10080, %rax
	pshufd	$85, %xmm0, %xmm1
	movd	%xmm0, -10080(%rax)
	movd	%xmm1, -7560(%rax)
	movdqa	%xmm0, %xmm1
	punpckhdq	%xmm0, %xmm1
	pshufd	$255, %xmm0, %xmm0
	movd	%xmm1, -5040(%rax)
	movd	%xmm0, -2520(%rax)
	cmpq	%rcx, %rdx
	jne	.L17
	movl	%r12d, %eax
	andl	$-4, %eax
	testb	$3, %r12b
	je	.L18
.L16:
	movslq	%eax, %rcx
	movq	80(%rsp), %rbx
	imulq	$630, %rcx, %rdx
	movl	(%rsi,%rcx,4), %ecx
	addq	%rbx, %rdx
	movl	%ecx, 0(%r13,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r12d
	jle	.L18
	movslq	%edx, %rdx
	addl	$2, %eax
	imulq	$630, %rdx, %rcx
	movl	(%rsi,%rdx,4), %edx
	addq	%rbx, %rcx
	movl	%edx, 0(%r13,%rcx,4)
	cmpl	%r12d, %eax
	jge	.L18
	cltq
	imulq	$630, %rax, %rdx
	movl	(%rsi,%rax,4), %eax
	addq	%rbx, %rdx
	movl	%eax, 0(%r13,%rdx,4)
.L18:
	leal	1(%r12), %ebx
	movq	%r13, 16(%rsp)
	movq	%r13, %rbp
	xorl	%r14d, %r14d
	movl	%ebx, %eax
	movl	%ebx, 64(%rsp)
	andl	$-4, %ebx
	movq	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movl	%ebx, 88(%rsp)
	movq	%r13, %rbx
	movdqa	.LC0(%rip), %xmm1
	subl	$1, %eax
	movq	$0, 24(%rsp)
	addq	$1, %rax
	movq	$0, (%rsp)
	movq	$0, 8(%rsp)
	salq	$4, %rax
	movq	%rax, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%r14d, 32(%rsp)
	movl	%r14d, %edx
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	movq	$-1, %rax
	movl	$-1, %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%rsi), %edi
	cmpl	%edi, %r8d
	jge	.L19
	movslq	%ecx, %rax
	movl	%edi, %r8d
.L19:
	addl	$1, %ecx
	addq	$2520, %rsi
	cmpl	%ecx, %r12d
	jg	.L20
	testl	%eax, %eax
	js	.L36
	testl	%r8d, %r8d
	je	.L36
	imulq	$2520, %rax, %rsi
	movq	8(%rsp), %rdi
	leaq	16(%rsi), %rcx
	cmpq	%rdi, %rcx
	jle	.L54
	leaq	16(%rdi), %rcx
	cmpq	%rsi, %rcx
	jg	.L25
.L54:
	cmpl	$2, %r12d
	jle	.L49
	movq	72(%rsp), %rdi
	addq	%r13, %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqu	0(%rbp,%rcx), %xmm0
	movdqu	(%rsi,%rcx), %xmm5
	movups	%xmm5, 0(%rbp,%rcx)
	movups	%xmm0, (%rsi,%rcx)
	addq	$16, %rcx
	cmpq	%rdi, %rcx
	jne	.L28
	movl	64(%rsp), %r9d
	movl	88(%rsp), %esi
	cmpl	%esi, %r9d
	je	.L33
	subl	%esi, %r9d
	movl	%esi, %ecx
	cmpl	%r12d, %esi
	je	.L30
.L27:
	movq	24(%rsp), %rdi
	addq	%rsi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	imulq	$630, %rax, %rdi
	addq	%rsi, %rdi
	leaq	0(%r13,%rdi,4), %rsi
	movq	(%r8), %rdi
	movq	(%rsi), %r10
	movq	%r10, (%r8)
	movq	%rdi, (%rsi)
	movl	%r9d, %esi
	andl	$-2, %esi
	addl	%esi, %ecx
	cmpl	%r9d, %esi
	je	.L33
.L30:
	movslq	32(%rsp), %rsi
	imulq	$630, %rax, %rax
	movslq	%ecx, %rcx
	imulq	$630, %rsi, %rsi
	addq	%rcx, %rax
	addq	%rcx, %rsi
	movl	0(%r13,%rax,4), %ecx
	movl	0(%r13,%rsi,4), %edi
	movl	%ecx, 0(%r13,%rsi,4)
	movl	%edi, 0(%r13,%rax,4)
.L33:
	movl	64(%rsp), %eax
	movslq	32(%rsp), %r10
	movl	%r14d, %r9d
	subl	%edx, %eax
	cmpl	%r10d, %r12d
	movl	%eax, %esi
	movl	$1, %eax
	cmovl	%eax, %esi
	movl	%r12d, %eax
	subl	%edx, %eax
	cmpl	$2, %eax
	movl	%esi, 36(%rsp)
	setbe	%cl
	cmpl	%r14d, %r12d
	setl	%al
	imulq	$630, %r10, %r10
	orl	%eax, %ecx
	movl	%esi, %eax
	andl	$-4, %esi
	shrl	$2, %eax
	addl	%esi, %edx
	movb	%cl, 59(%rsp)
	xorl	%ecx, %ecx
	leal	-1(%rax), %r8d
	movq	$-4, %rax
	movl	%esi, 60(%rsp)
	movq	%r14, %rsi
	addq	$1, %r8
	subq	%rbx, %rax
	movl	%edx, 68(%rsp)
	movq	16(%rsp), %rdx
	movq	%rax, 48(%rsp)
	salq	$4, %r8
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %ecx
	addq	$2520, %rdx
	addq	$630, %rsi
	cmpl	%ecx, %r12d
	je	.L36
.L35:
	cmpl	%r9d, %ecx
	je	.L37
	movl	(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L37
	movq	48(%rsp), %rax
	addq	%rdx, %rax
	cmpq	$8, %rax
	jbe	.L51
	cmpl	%r9d, %r12d
	jle	.L51
	cmpb	$0, 59(%rsp)
	jne	.L52
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L40:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%rbx,%rax), %xmm4
	paddd	%xmm4, %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L40
	movl	60(%rsp), %eax
	cmpl	%eax, 36(%rsp)
	je	.L37
	movl	%eax, %edi
	movl	68(%rsp), %eax
.L39:
	movl	36(%rsp), %r11d
	subl	%edi, %r11d
	cmpl	$1, %r11d
	je	.L43
	leaq	(%rdi,%rsi), %r15
	addq	(%rsp), %rdi
	leaq	0(%r13,%r15,4), %r15
	movq	0(%r13,%rdi,4), %xmm0
	movl	%r11d, %edi
	movq	(%r15), %xmm2
	andl	$-2, %edi
	addl	%edi, %eax
	paddd	%xmm2, %xmm0
	pand	%xmm3, %xmm0
	movq	%xmm0, (%r15)
	cmpl	%edi, %r11d
	je	.L37
.L43:
	movslq	%ecx, %rdi
	cltq
	imulq	$630, %rdi, %rdi
	addq	%rax, %rdi
	addq	%r10, %rax
	movl	0(%r13,%rax,4), %eax
	addl	0(%r13,%rdi,4), %eax
	andl	$1, %eax
	movl	%eax, 0(%r13,%rdi,4)
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L36:
	addq	$4, 16(%rsp)
	addq	$1, %r14
	addq	$2524, %rbx
	addq	$2520, %rbp
	addq	$2520, 8(%rsp)
	addq	$631, (%rsp)
	addq	$630, 24(%rsp)
	cmpq	40(%rsp), %r14
	jne	.L23
	movq	80(%rsp), %rax
	movq	104(%rsp), %rbx
	leaq	0(%r13,%rax,4), %rdx
	leaq	X(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rbx,4), %rsi
	movq	96(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L47:
	movl	(%rdx), %edi
	movl	(%rcx), %r8d
	movl	%edi, (%rax)
	testl	%r8d, %r8d
	jne	.L55
	testl	%edi, %edi
	jne	.L53
.L55:
	addq	$4, %rax
	addq	$2520, %rdx
	addq	$2524, %rcx
	cmpq	%rsi, %rax
	jne	.L47
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore_state
	movq	16(%rsp), %r15
	movl	32(%rsp), %r11d
	movl	%ecx, 92(%rsp)
	movq	%rdx, %rdi
	movq	8(%rsp), %rcx
	subq	%rdx, %r15
	.p2align 4,,10
	.p2align 3
.L38:
	leaq	(%r15,%rdi), %rax
	addl	$1, %r11d
	addq	$4, %rdi
	movl	(%rax,%rcx), %eax
	addl	-4(%rdi), %eax
	andl	$1, %eax
	movl	%eax, -4(%rdi)
	cmpl	%r11d, %r12d
	jge	.L38
	movl	92(%rsp), %ecx
	jmp	.L37
.L25:
	leaq	0(%r13,%rsi), %rax
	movq	80(%rsp), %rsi
	movq	%rbp, %rcx
	leaq	4(%rbp,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rax), %r8d
	movl	(%rcx), %esi
	addq	$4, %rcx
	addq	$4, %rax
	movl	%r8d, -4(%rcx)
	movl	%esi, -4(%rax)
	cmpq	%rcx, %rdi
	jne	.L32
	jmp	.L33
.L52:
	movl	32(%rsp), %eax
	xorl	%edi, %edi
	jmp	.L39
.L53:
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L49:
	.cfi_restore_state
	movl	64(%rsp), %r9d
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L27
.L48:
	movslq	%r12d, %rbx
	xorl	%eax, %eax
	leaq	C(%rip), %rsi
	movq	%rbx, 80(%rsp)
	jmp	.L16
.L80:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	gauss_jordan, .-gauss_jordan
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	A(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
.L84:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L141
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L118:
	xorl	%r12d, %r12d
	jmp	.L122
.L119:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L121
.L120:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L122:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L119
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L121
	movq	stdin(%rip), %rdi
	jmp	.L120
.L121:
	testl	%r12d, %r12d
	je	.L142
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rdx
	cmpq	%rdx, %rax
	jnb	.L143
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %eax
.L86:
	xorl	%ebx, %ebx
	jmp	.L90
.L87:
	leaq	1(%rcx), %rsi
	movq	%rsi, 8(%rdi)
	movzbl	(%rcx), %eax
	cmpl	$47, %eax
	jle	.L138
.L88:
	movq	%rsi, %rcx
.L90:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%rdx, %rcx
	jb	.L87
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rsi
	movq	16(%rdi), %rdx
	cmpl	$47, %eax
	jg	.L88
.L138:
	movl	%ebx, 4(%rsp)
	cmpq	%rdx, %rsi
	jnb	.L144
	leaq	1(%rsi), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rsi), %eax
.L92:
	xorl	%ebx, %ebx
	jmp	.L96
.L93:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %eax
	cmpl	$47, %eax
	jle	.L95
.L94:
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
.L96:
	leal	(%rbx,%rbx,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %ebx
	cmpq	%rdx, %rcx
	jb	.L93
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L95
	movq	stdin(%rip), %rdi
	jmp	.L94
.L95:
	movl	$1587600, %edx
	movq	%rbp, %rdi
	xorl	%esi, %esi
	call	memset@PLT
	movl	4(%rsp), %edx
	movl	$315, %ecx
	xorl	%eax, %eax
	leaq	C(%rip), %rdi
	rep stosq
	testl	%edx, %edx
	jle	.L98
	testl	%r12d, %r12d
	jle	.L98
	movl	4(%rsp), %eax
	leal	-1(%r12), %ecx
	movq	$-4, %r14
	leaq	4+s(%rip), %r13
	leaq	0(,%rcx,4), %rdx
	leal	-1(%rax), %esi
	subq	%rdx, %r14
	addq	%rdx, %r13
	leaq	0(,%rsi,8), %rax
	movq	%r14, 16(%rsp)
	subq	%rsi, %rax
	leaq	(%rcx,%rax,4), %rcx
	leaq	116+s(%rip), %rax
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 8(%rsp)
.L106:
	movq	16(%rsp), %rax
	leaq	(%rax,%r13), %r15
	.p2align 4,,10
	.p2align 3
.L105:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L145
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L100:
	xorl	%r14d, %r14d
	jmp	.L104
	.p2align 4,,10
	.p2align 3
.L101:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L103
.L102:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L104:
	leal	(%r14,%r14,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r14d
	cmpq	%rcx, %rdx
	jb	.L101
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L103
	movq	stdin(%rip), %rdi
	jmp	.L102
	.p2align 4,,10
	.p2align 3
.L103:
	movl	%r14d, (%r15)
	addq	$4, %r15
	cmpq	%r15, %r13
	jne	.L105
	addq	$112, %r13
	cmpq	8(%rsp), %r13
	jne	.L106
	movslq	%r12d, %rax
	movl	$0, 16(%rsp)
	movl	4(%rsp), %r11d
	movq	$0, 24(%rsp)
	movq	%rax, 8(%rsp)
.L116:
	movq	24(%rsp), %rax
	movl	16(%rsp), %r14d
	movl	%r12d, %esi
	xorl	%r10d, %r10d
	xorl	%r13d, %r13d
	leaq	0(,%rax,8), %r15
	subq	%rax, %r15
	leaq	s(%rip), %rax
	salq	$4, %r15
	addq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L115:
	movl	(%r15,%r13,4), %eax
	testl	%eax, %eax
	je	.L109
	movslq	%r14d, %rax
	leaq	C(%rip), %rdi
	movl	$1, (%rdi,%rax,4)
.L109:
	movslq	%r14d, %r9
	movl	%r11d, %r8d
	movl	%r13d, %edi
	subl	4(%rsp), %r8d
	imulq	$630, %r9, %r9
	.p2align 4,,10
	.p2align 3
.L110:
	movl	%r8d, %ecx
	movl	%r10d, %edx
	negl	%ecx
	cmovs	%r8d, %ecx
	jmp	.L113
	.p2align 4,,10
	.p2align 3
.L111:
	addl	$1, %edx
	cmpl	%edx, %esi
	je	.L146
.L113:
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	addl	%ecx, %eax
	cmpl	%ebx, %eax
	je	.L124
	testl	%eax, %eax
	jne	.L111
.L124:
	leal	(%rdi,%rdx), %eax
	addl	$1, %edx
	cltq
	addq	%r9, %rax
	movl	$1, 0(%rbp,%rax,4)
	cmpl	%edx, %esi
	jne	.L113
.L146:
	addl	$1, %r8d
	addl	%r12d, %edi
	cmpl	%r8d, %r11d
	jne	.L110
	addq	$1, %r13
	subl	$1, %esi
	subl	$1, %r10d
	addl	$1, %r14d
	cmpq	%r13, 8(%rsp)
	jne	.L115
	addq	$1, 24(%rsp)
	addl	%r12d, 16(%rsp)
	subl	$1, %r11d
	jne	.L116
.L98:
	movl	4(%rsp), %edi
	imull	%r12d, %edi
	call	gauss_jordan
	movq	stdout(%rip), %rsi
	leal	48(%rax), %edi
	call	putc@PLT
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L84
.L145:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L100
.L144:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
	jmp	.L92
.L143:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
	jmp	.L86
.L142:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L141:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L118
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3136
s:
	.zero	3136
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 1587600
B:
	.zero	1587600
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 2520
C:
	.zero	2520
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 2520
X:
	.zero	2520
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 1587600
A:
	.zero	1587600
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.set	.LC1,.LC0
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

// AOJ 1308 Awkward Lights
// 2018.3.8 bal4u

#include <stdio.h>
#include <string.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

#define N 630

// solve A X = C
int A[N][N], X[N], C[N];
int B[N][N];				// working

int gauss_jordan(int n)
{
	int i, j, k, t, pivot;

	for (i = 0; i < n; i++) for (j = 0; j < n; j++) B[i][j] = A[i][j];
	for (i = 0; i < n; i++) B[i][n] = C[i];

	for (i = 0; i < n; i++) {
		pivot = -1, t = -1;
		for (j = i; j < n; j++) if (B[j][i] > t) pivot = j, t = B[j][i];
		if (pivot < 0 || !t) continue;

		for (j = 0; j <= n; j++) {					// swap(B[i],B[pivot]);
			t = B[i][j], B[i][j] = B[pivot][j], B[pivot][j] = t;
		}

		for (j = 0; j < n; j++) if (i != j && B[j][i]) {
	        for (k = i; k <= n; k++) B[j][k] = (B[j][k]+B[i][k]) & 1;
		}
	}

	for (i = 0; i < n; i++) {
		X[i] = B[i][n];
		if (!B[i][i] && B[i][n]) return 0;
	}
	return 1;
}

#define ABS(a)	((a)>=0?(a):-(a))
#define ID(r,c)	((r)*m+(c))
int  s[28][28];

int main()
{
	int m, n, d, i, j, r, c, t;

	while (m = in()) {
		n = in(), d = in();
		memset(A, 0, sizeof(A)), memset(C, 0, sizeof(C));

		for (i = 0; i < n; i++) for (j = 0; j < m; j++) s[i][j] = in();
	
		for (i = 0; i < n; i++) for (j = 0; j < m; j++) {
			if (s[i][j]) C[ID(i,j)] = 1;
			for (r = 0; r < n; r++) for (c = 0; c < m; c++) {
				t = ABS(r-i)+ABS(c-j);
				if (t == d || t == 0) A[ID(i,j)][ID(r,c)] = 1;
			}
		}
		putchar('0' + gauss_jordan(m*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0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
13 13 7
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -1 0 0 0 0 0 0 0 0
0 0 0

1
1
0
1
0
0
1
1
0
1
 1
1
0
1
0
0
1
1
0
0
 1
1
0
1
0
0
1
0
0
1
 1
1
0
1
0
0
1
0
0
0
 1
1
0
1
0
0
0
0
0
0
 1
1
0
1
0
0
1
1
1
 1
1
0
1
0
0
1
0
 1
1
0
1
0
0
1
0
1
 1
1
0
1
0
0
0
0
 1
1
0
1
0
0
1

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 1308 Awkward Lights
// 2018.3.8 bal4u

#include <stdio.h>
#include <string.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

#define N 630

// solve A X = C
int A[N][N], X[N], C[N];
int B[N][N];				// working

int gauss_jordan(int n)
{
	int i, j, k, t, pivot;

	for (i = 0; i < n; i++) for (j = 0; j < n; j++) B[i][j] = A[i][j];
	for (i = 0; i < n; i++) B[i][n] = C[i];

	for (i = 0; i < n; i++) {
		pivot = -1, t = -1;
		for (j = i; j < n; j++) if (B[j][i] > t) pivot = j, t = B[j][i];
		if (pivot < 0 || !t) continue;

		for (j = 0; j <= n; j++) {					// swap(B[i],B[pivot]);
			t = B[i][j], B[i][j] = B[pivot][j], B[pivot][j] = t;
		}

		for (j = 0; j < n; j++) if (i != j && B[j][i]) {
	        for (k = i; k <= n; k++) B[j][k] = (B[j][k]+B[i][k]) & 1;
		}
	}

	for (i = 0; i < n; i++) {
		X[i] = B[i][n];
		if (!B[i][i] && B[i][n]) return 0;
	}
	return 1;
}

#define ABS(a)	((a)>=0?(a):-(a))
#define ID(r,c)	((r)*m+(c))
int  s[28][28];

int main()
{
	int m, n, d, i, j, r, c, t;

	while (m = in()) {
		n = in(), d = in();
		memset(A, 0, sizeof(A)), memset(C, 0, sizeof(C));

		for (i = 0; i < n; i++) for (j = 0; j < m; j++) s[i][j] = in();
	
		for (i = 0; i < n; i++) for (j = 0; j < m; j++) {
			if (s[i][j]) C[ID(i,j)] = 1;
			for (r = 0; r < n; r++) for (c = 0; c < m; c++) {
				t = ABS(r-i)+ABS(c-j);
				if (t == d || t == 0) A[ID(i,j)][ID(r,c)] = 1;
			}
		}
		putchar('0' + gauss_jordan(m*n));
		putchar('\n');
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 1587600
A:
	.zero	1587600
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 2520
X:
	.zero	2520
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 2520
C:
	.zero	2520
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 1587600
B:
	.zero	1587600
	.text
	.globl	gauss_jordan
	.type	gauss_jordan, @function
gauss_jordan:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	movl	$0, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L7
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$0, -20(%rbp)
	jmp	.L9
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	movl	$0, -20(%rbp)
	jmp	.L11
.L25:
	movl	$-1, -4(%rbp)
	movl	$-1, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L12
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L13
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	cmpl	$0, -4(%rbp)
	js	.L30
	cmpl	$0, -8(%rbp)
	je	.L30
	movl	$0, -16(%rbp)
	jmp	.L18
.L19:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	B(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L19
	movl	$0, -16(%rbp)
	jmp	.L20
.L24:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	je	.L21
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L24
	jmp	.L17
.L30:
	nop
.L17:
	addl	$1, -20(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	imulq	$2524, %rax, %rax
	leaq	B(%rip), %rdx
	movl	(%rax,%rdx), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$1, %eax
.L28:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	gauss_jordan, .-gauss_jordan
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3136
s:
	.zero	3136
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	jmp	.L32
.L48:
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -8(%rbp)
	movl	$1587600, %edx
	movl	$0, %esi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2520, %edx
	movl	$0, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L33
.L36:
	movl	$0, -28(%rbp)
	jmp	.L34
.L35:
	movl	$0, %eax
	call	in
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	subq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -28(%rbp)
.L34:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L35
	addl	$1, -32(%rbp)
.L33:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L36
	movl	$0, -32(%rbp)
	jmp	.L37
.L47:
	movl	$0, -28(%rbp)
	jmp	.L38
.L46:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L39
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	$1, (%rdx,%rax)
.L39:
	movl	$0, -24(%rbp)
	jmp	.L40
.L45:
	movl	$0, -20(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L42
	cmpl	$0, -4(%rbp)
	jne	.L43
.L42:
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$630, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$1, (%rdx,%rax)
.L43:
	addl	$1, -20(%rbp)
.L41:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L44
	addl	$1, -24(%rbp)
.L40:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L45
	addl	$1, -28(%rbp)
.L38:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L46
	addl	$1, -32(%rbp)
.L37:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L47
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edi
	call	gauss_jordan
	addl	$48, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$10, %edi
	call	putchar@PLT
.L32:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L48
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 1587600
A:
	.zero	1587600
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 2520
X:
	.zero	2520
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 2520
C:
	.zero	2520
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 1587600
B:
	.zero	1587600
	.text
	.globl	gauss_jordan
	.type	gauss_jordan, @function
gauss_jordan:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L5
.L8:
	movl	$0, -16(%rbp)
	jmp	.L6
.L7:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L7
	addl	$1, -20(%rbp)
.L5:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$0, -20(%rbp)
	jmp	.L9
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	movl	$0, -20(%rbp)
	jmp	.L11
.L25:
	movl	$-1, -4(%rbp)
	movl	$-1, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L12
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jge	.L13
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	cmpl	$0, -4(%rbp)
	js	.L30
	cmpl	$0, -8(%rbp)
	je	.L30
	movl	$0, -16(%rbp)
	jmp	.L18
.L19:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$630, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	B(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L19
	movl	$0, -16(%rbp)
	jmp	.L20
.L24:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	je	.L21
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L21
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L24
	jmp	.L17
.L30:
	nop
.L17:
	addl	$1, -20(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	imulq	$2524, %rax, %rax
	leaq	B(%rip), %rdx
	movl	(%rax,%rdx), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$630, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$1, %eax
.L28:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	gauss_jordan, .-gauss_jordan
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3136
s:
	.zero	3136
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	jmp	.L32
.L48:
	movl	$0, %eax
	call	in
	movl	%eax, -12(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -8(%rbp)
	movl	$1587600, %edx
	movl	$0, %esi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2520, %edx
	movl	$0, %esi
	leaq	C(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L33
.L36:
	movl	$0, -28(%rbp)
	jmp	.L34
.L35:
	movl	$0, %eax
	call	in
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	subq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -28(%rbp)
.L34:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L35
	addl	$1, -32(%rbp)
.L33:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L36
	movl	$0, -32(%rbp)
	jmp	.L37
.L47:
	movl	$0, -28(%rbp)
	jmp	.L38
.L46:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L39
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	$1, (%rdx,%rax)
.L39:
	movl	$0, -24(%rbp)
	jmp	.L40
.L45:
	movl	$0, -20(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L42
	cmpl	$0, -4(%rbp)
	jne	.L43
.L42:
	movl	-32(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$630, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$1, (%rdx,%rax)
.L43:
	addl	$1, -20(%rbp)
.L41:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L44
	addl	$1, -24(%rbp)
.L40:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L45
	addl	$1, -28(%rbp)
.L38:
	movl	-28(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L46
	addl	$1, -32(%rbp)
.L37:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L47
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edi
	call	gauss_jordan
	addl	$48, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$10, %edi
	call	putchar@PLT
.L32:
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L48
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
