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

```c
#define K scanf("%d",
#define I(x)for(x=N;--x;)
#define L(a,b,c)I(i)I(j)if(k[i][j])b=b>a?b:a,c=a<c?a:c;b-=c-1;
N=404;main(c,i,j,l,e,f,g,h,n,d){int k[N][N],m[N],o[N];for(;c;){I(i)I(j)l=k[i][j]=m[j]=o[j]=0;e=g=m[0]=o[0]=(f=h=N)/2;K&c);if(k[e][e]=c){for(;--c;K&d),d/2?i=3-d,j=2-d:(i=d-1,j=d),d=m[n]+i,n=o[n]+j,k[d][n]=m[++l]=d,o[l]=n)K&n);L(i,e,f)L(j,g,h)c=printf("%d %d\n",e,g);}}}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movl	%esi, -120(%rbp)
	movl	%edx, -124(%rbp)
	movl	%ecx, -128(%rbp)
	movl	%r8d, -132(%rbp)
	movl	%r9d, -136(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -144(%rbp)
	movl	N(%rip), %esi
	movl	N(%rip), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%esi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movq	%r13, %rdx
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r12, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r12, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-160(%rbp), %r11
	movq	-152(%rbp), %r12
	movq	%r12, %rdx
	imulq	%r14, %rdx
	movq	%r11, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r11, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	jmp	.L11
.L28:
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L12
.L15:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L13
.L14:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rax
	shrq	$2, %rax
	movq	-80(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rdx,%rcx,4), %ecx
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %esi
	movslq	%esi, %rdi
	movl	-120(%rbp), %esi
	movslq	%esi, %rsi
	imulq	%rax, %rsi
	addq	%rdi, %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rsi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	movl	%eax, -128(%rbp)
.L13:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L14
.L12:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L15
	movl	N(%rip), %eax
	movl	%eax, 24(%rbp)
	movl	24(%rbp), %eax
	movl	%eax, -136(%rbp)
	movl	-136(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-64(%rbp), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %rax
	movl	%edx, (%rax)
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbp)
	movl	16(%rbp), %eax
	movl	%eax, -132(%rbp)
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movq	%rbx, %rax
	shrq	$2, %rax
	movl	-116(%rbp), %esi
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rdi
	movl	-132(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	movl	%esi, (%rdx,%rcx,4)
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rcx
	movl	-132(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movl	(%rdx,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	jmp	.L16
.L19:
	leaq	32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	leaq	40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	40(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	40(%rbp), %edx
	movl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, -124(%rbp)
	jmp	.L18
.L17:
	movl	40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	32(%rbp), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 40(%rbp)
	movl	32(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 32(%rbp)
	addl	$1, -128(%rbp)
	movl	40(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rdi
	shrq	$2, %rdi
	movl	40(%rbp), %ecx
	movl	32(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-96(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%rsi, %rcx
	movl	%edx, (%rax,%rcx,4)
	movl	32(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L16:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -116(%rbp)
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L20
.L23:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L21
	movl	-132(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-136(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -136(%rbp)
.L21:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L22
.L20:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L23
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -132(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L24
.L27:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L25
.L26:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L25
	movl	16(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, 16(%rbp)
	movl	24(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 24(%rbp)
.L25:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L26
.L24:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L27
	movl	24(%rbp), %eax
	subl	$1, %eax
	subl	%eax, 16(%rbp)
	movl	-132(%rbp), %eax
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	%eax, -116(%rbp)
.L11:
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movq	-144(%rbp), %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	movl	%ecx, %r14d
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -68(%rbp)
	movq	%rsp, %rsi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movslq	N(%rip), %rax
	leaq	0(,%rax,4), %rcx
	imulq	%rax, %rax
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rax
	cmpq	%rsi, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L58
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L59
.L4:
	leaq	15(%rcx), %rax
	movq	%rsp, -88(%rbp)
	movq	%rsp, %rsi
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L60
.L7:
	movq	%rsp, -104(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L60:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L10
	orq	$0, -8(%rsp,%rax)
.L10:
	movq	%rcx, %rbx
	negq	%rcx
	movq	%rsp, -112(%rbp)
	movl	-68(%rbp), %eax
	shrq	$2, %rbx
	movq	%rcx, -80(%rbp)
	movq	%rbx, -128(%rbp)
.L11:
	testl	%eax, %eax
	je	.L14
	movl	N(%rip), %eax
	movl	%eax, -72(%rbp)
	subl	$1, %eax
	movl	%eax, -92(%rbp)
	je	.L61
	movl	%eax, %r14d
	movq	-128(%rbp), %rcx
	movl	-72(%rbp), %eax
	addq	$1, %rcx
	leal	-2(%rax), %edx
	movslq	%r14d, %rax
	salq	$2, %rax
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rcx, -120(%rbp)
	imulq	%rax, %rbx
	negq	%r13
	leaq	4(,%rdx,4), %r12
	salq	$2, %r13
	addq	%r13, %rbx
	addq	%rax, %r13
	movq	-112(%rbp), %rax
	addq	-88(%rbp), %rbx
	leaq	(%rax,%r13), %r15
	addq	-104(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	memset@PLT
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%r13, %rdi
	call	memset@PLT
	movq	%rbx, %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	-80(%rbp), %rbx
	subl	$1, %r14d
	jne	.L13
.L12:
	movl	-72(%rbp), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	movq	-112(%rbp), %rax
	sarl	%esi
	movl	%esi, (%rax)
	movq	-104(%rbp), %rax
	movl	%esi, %r13d
	movl	%esi, %r15d
	movl	%esi, (%rax)
	leaq	-68(%rbp), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	%r13d, %rax
	imulq	-120(%rbp), %rax
	movl	-68(%rbp), %edx
	movq	-88(%rbp), %rcx
	movl	%edx, (%rcx,%rax,4)
	testl	%edx, %edx
	jne	.L62
.L14:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L63
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L61:
	.cfi_restore_state
	movq	-128(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -120(%rbp)
	jmp	.L12
.L62:
	subl	$1, %edx
	movl	%edx, -68(%rbp)
	je	.L15
	leal	1(%r14), %ecx
	leaq	40(%rbp), %r12
	movq	-104(%rbp), %r15
	movl	%r13d, -120(%rbp)
	movslq	%ecx, %rbx
	leaq	32(%rbp), %rax
	movl	%r13d, -96(%rbp)
	movq	%r12, %r13
	movq	%rbx, %r14
	movq	-112(%rbp), %rbx
	movq	%rax, %r12
.L18:
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	40(%rbp), %eax
	leal	1(%rax), %esi
	leal	-1(%rax), %edx
	cmpl	$2, %esi
	jbe	.L17
	movl	$2, %esi
	movl	$3, %edx
	subl	%eax, %esi
	subl	%eax, %edx
	movl	%esi, %eax
.L17:
	movslq	32(%rbp), %rsi
	movq	-88(%rbp), %rcx
	movl	%r14d, %r8d
	addl	(%r15,%rsi,4), %edx
	addl	(%rbx,%rsi,4), %eax
	movslq	%edx, %rdi
	imulq	-128(%rbp), %rdi
	movl	%eax, (%rbx,%r14,4)
	movslq	%eax, %rsi
	movl	%eax, 32(%rbp)
	movl	-68(%rbp), %eax
	movl	%edx, (%r15,%r14,4)
	addq	$1, %r14
	addq	%rdi, %rsi
	subl	$1, %eax
	movl	%edx, 40(%rbp)
	movl	%edx, (%rcx,%rsi,4)
	movl	%eax, -68(%rbp)
	testl	%eax, %eax
	jne	.L18
	movl	-120(%rbp), %r15d
	movl	-96(%rbp), %r13d
	movl	%r8d, %r14d
.L15:
	movl	N(%rip), %edi
	subl	$1, %edi
	je	.L19
	movq	-128(%rbp), %rax
	movslq	%edi, %r8
	movq	-88(%rbp), %rcx
	movl	-72(%rbp), %edx
	movq	-80(%rbp), %r10
	imulq	%r8, %rax
	leaq	(%rcx,%rax,4), %rcx
	movl	%edi, %eax
	movq	%rcx, %r9
.L22:
	movq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%r9,%rsi,4), %r11d
	testl	%r11d, %r11d
	je	.L20
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L20:
	subq	$1, %rsi
	testl	%esi, %esi
	jne	.L21
	addq	%r10, %r9
	subl	$1, %eax
	jne	.L22
	subl	$1, %edx
	movq	-80(%rbp), %r9
	subl	%edx, %r13d
	movl	-72(%rbp), %edx
.L26:
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%rcx,%rax,4), %esi
	testl	%esi, %esi
	je	.L24
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L24:
	subq	$1, %rax
	testl	%eax, %eax
	jne	.L25
	addq	%r9, %rcx
	subl	$1, %edi
	jne	.L26
	movl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -92(%rbp)
.L28:
	movl	%r15d, %edx
	movl	%r13d, %esi
	subl	-92(%rbp), %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	printf@PLT
	movl	%eax, -68(%rbp)
	jmp	.L11
.L19:
	subl	-92(%rbp), %r13d
	jmp	.L28
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	404
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	movl	%ecx, %r14d
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -68(%rbp)
	movq	%rsp, %rsi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movslq	N(%rip), %rax
	leaq	0(,%rax,4), %rcx
	imulq	%rax, %rax
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rax
	cmpq	%rsi, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L58
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L59
.L4:
	leaq	15(%rcx), %rax
	movq	%rsp, -88(%rbp)
	movq	%rsp, %rsi
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L60
.L7:
	movq	%rsp, -104(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L60:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L10
	orq	$0, -8(%rsp,%rax)
.L10:
	movq	%rcx, %rbx
	negq	%rcx
	movq	%rsp, -112(%rbp)
	movl	-68(%rbp), %eax
	shrq	$2, %rbx
	movq	%rcx, -80(%rbp)
	movq	%rbx, -128(%rbp)
.L11:
	testl	%eax, %eax
	je	.L14
	movl	N(%rip), %eax
	movl	%eax, -72(%rbp)
	subl	$1, %eax
	movl	%eax, -92(%rbp)
	je	.L61
	movl	%eax, %r14d
	movq	-128(%rbp), %rcx
	movl	-72(%rbp), %eax
	addq	$1, %rcx
	leal	-2(%rax), %edx
	movslq	%r14d, %rax
	salq	$2, %rax
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rcx, -120(%rbp)
	imulq	%rax, %rbx
	negq	%r13
	leaq	4(,%rdx,4), %r12
	salq	$2, %r13
	addq	%r13, %rbx
	addq	%rax, %r13
	movq	-112(%rbp), %rax
	addq	-88(%rbp), %rbx
	leaq	(%rax,%r13), %r15
	addq	-104(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	memset@PLT
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%r13, %rdi
	call	memset@PLT
	movq	%rbx, %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	addq	-80(%rbp), %rbx
	subl	$1, %r14d
	jne	.L13
.L12:
	movl	-72(%rbp), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	movq	-112(%rbp), %rax
	sarl	%esi
	movl	%esi, (%rax)
	movq	-104(%rbp), %rax
	movl	%esi, %r13d
	movl	%esi, %r15d
	movl	%esi, (%rax)
	leaq	-68(%rbp), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	%r13d, %rax
	imulq	-120(%rbp), %rax
	movl	-68(%rbp), %edx
	movq	-88(%rbp), %rcx
	movl	%edx, (%rcx,%rax,4)
	testl	%edx, %edx
	jne	.L62
.L14:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L63
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L61:
	.cfi_restore_state
	movq	-128(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -120(%rbp)
	jmp	.L12
.L62:
	subl	$1, %edx
	movl	%edx, -68(%rbp)
	je	.L15
	leal	1(%r14), %ecx
	leaq	40(%rbp), %r12
	movq	-104(%rbp), %r15
	movl	%r13d, -120(%rbp)
	movslq	%ecx, %rbx
	leaq	32(%rbp), %rax
	movl	%r13d, -96(%rbp)
	movq	%r12, %r13
	movq	%rbx, %r14
	movq	-112(%rbp), %rbx
	movq	%rax, %r12
.L18:
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	40(%rbp), %eax
	leal	1(%rax), %esi
	leal	-1(%rax), %edx
	cmpl	$2, %esi
	jbe	.L17
	movl	$2, %esi
	movl	$3, %edx
	subl	%eax, %esi
	subl	%eax, %edx
	movl	%esi, %eax
.L17:
	movslq	32(%rbp), %rsi
	movq	-88(%rbp), %rcx
	movl	%r14d, %r8d
	addl	(%r15,%rsi,4), %edx
	addl	(%rbx,%rsi,4), %eax
	movslq	%edx, %rdi
	imulq	-128(%rbp), %rdi
	movl	%eax, (%rbx,%r14,4)
	movslq	%eax, %rsi
	movl	%eax, 32(%rbp)
	movl	-68(%rbp), %eax
	movl	%edx, (%r15,%r14,4)
	addq	$1, %r14
	addq	%rdi, %rsi
	subl	$1, %eax
	movl	%edx, 40(%rbp)
	movl	%edx, (%rcx,%rsi,4)
	movl	%eax, -68(%rbp)
	testl	%eax, %eax
	jne	.L18
	movl	-120(%rbp), %r15d
	movl	-96(%rbp), %r13d
	movl	%r8d, %r14d
.L15:
	movl	N(%rip), %edi
	subl	$1, %edi
	je	.L19
	movq	-128(%rbp), %rax
	movslq	%edi, %r8
	movq	-88(%rbp), %rcx
	movl	-72(%rbp), %edx
	movq	-80(%rbp), %r10
	imulq	%r8, %rax
	leaq	(%rcx,%rax,4), %rcx
	movl	%edi, %eax
	movq	%rcx, %r9
.L22:
	movq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%r9,%rsi,4), %r11d
	testl	%r11d, %r11d
	je	.L20
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L20:
	subq	$1, %rsi
	testl	%esi, %esi
	jne	.L21
	addq	%r10, %r9
	subl	$1, %eax
	jne	.L22
	subl	$1, %edx
	movq	-80(%rbp), %r9
	subl	%edx, %r13d
	movl	-72(%rbp), %edx
.L26:
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%rcx,%rax,4), %esi
	testl	%esi, %esi
	je	.L24
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L24:
	subq	$1, %rax
	testl	%eax, %eax
	jne	.L25
	addq	%r9, %rcx
	subl	$1, %edi
	jne	.L26
	movl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -92(%rbp)
.L28:
	movl	%r15d, %edx
	movl	%r13d, %esi
	subl	-92(%rbp), %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	printf@PLT
	movl	%eax, -68(%rbp)
	jmp	.L11
.L19:
	subl	-92(%rbp), %r13d
	jmp	.L28
.L63:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	404
	.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:

#define K scanf("%d",
#define I(x)for(x=N;--x;)
#define L(a,b,c)I(i)I(j)if(k[i][j])b=b>a?b:a,c=a<c?a:c;b-=c-1;
N=404;main(c,i,j,l,e,f,g,h,n,d){int k[N][N],m[N],o[N];for(;c;){I(i)I(j)l=k[i][j]=m[j]=o[j]=0;e=g=m[0]=o[0]=(f=h=N)/2;K&c);if(k[e][e]=c){for(;--c;K&d),d/2?i=3-d,j=2-d:(i=d-1,j=d),d=m[n]+i,n=o[n]+j,k[d][n]=m[++l]=d,o[l]=n)K&n);L(i,e,f)L(j,g,h)c=printf("%d %d\n",e,g);}}}
1
5
0 0
0 1
0 2
0 3
12
0 0
1 1
2 0
3 1
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 2
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 1
0 2
0 3
12
0 0
1 0
2 0
3 1
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 0
0 2
0 3
12
0 0
1 0
2 0
3 1
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 0
0 2
0 3
12
0 0
1 0
2 0
3 0
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 0
0 2
0 3
12
0 0
1 0
2 0
3 0
4 1
5 1
6 2
3 2
8 2
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 1
0 2
0 3
12
0 0
1 0
2 0
3 1
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 2
2 2
3 2
2 1
5 1
6 1
7 1
8 2
0
 1
5
0 0
0 1
0 2
0 3
12
0 0
1 0
2 0
3 1
4 2
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 1
0 2
0 3
12
0 0
1 0
2 0
3 1
4 1
5 1
6 2
7 2
8 2
9 3
10 3
10
0 2
1 2
2 1
3 2
2 1
5 1
6 1
7 1
8 2
0
 1
5
0 0
0 1
0 2
0 3
12
0 0
1 0
2 0
3 1
4 2
5 1
6 2
7 1
8 1
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0
 1
5
0 0
0 1
0 2
0 3
12
0 1
1 0
2 0
3 1
4 2
5 1
6 2
7 1
8 1
9 3
10 3
10
0 2
1 3
2 2
3 2
2 1
5 1
6 1
7 1
8 1
0

1 1
3 3
4 5
5 6
 1 1
3 3
4 4
4 6
 1 1
3 2
4 4
4 6
 1 1
3 2
5 3
4 6
 1 1
3 2
5 5
4 6
 1 1
3 3
4 4
5 5
 1 1
3 3
5 3
4 6
 1 1
3 3
4 4
4 5
 1 1
3 3
4 5
4 6
 1 1
3 3
3 6
4 6

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

```c
#define K scanf("%d",
#define I(x)for(x=N;--x;)
#define L(a,b,c)I(i)I(j)if(k[i][j])b=b>a?b:a,c=a<c?a:c;b-=c-1;
N=404;main(c,i,j,l,e,f,g,h,n,d){int k[N][N],m[N],o[N];for(;c;){I(i)I(j)l=k[i][j]=m[j]=o[j]=0;e=g=m[0]=o[0]=(f=h=N)/2;K&c);if(k[e][e]=c){for(;--c;K&d),d/2?i=3-d,j=2-d:(i=d-1,j=d),d=m[n]+i,n=o[n]+j,k[d][n]=m[++l]=d,o[l]=n)K&n);L(i,e,f)L(j,g,h)c=printf("%d %d\n",e,g);}}}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movl	%esi, -120(%rbp)
	movl	%edx, -124(%rbp)
	movl	%ecx, -128(%rbp)
	movl	%r8d, -132(%rbp)
	movl	%r9d, -136(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -144(%rbp)
	movl	N(%rip), %esi
	movl	N(%rip), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%esi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movq	%r13, %rdx
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r12, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r12, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-160(%rbp), %r11
	movq	-152(%rbp), %r12
	movq	%r12, %rdx
	imulq	%r14, %rdx
	movq	%r11, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r11, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	jmp	.L11
.L28:
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L12
.L15:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L13
.L14:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rax
	shrq	$2, %rax
	movq	-80(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rdx,%rcx,4), %ecx
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %esi
	movslq	%esi, %rdi
	movl	-120(%rbp), %esi
	movslq	%esi, %rsi
	imulq	%rax, %rsi
	addq	%rdi, %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rsi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	movl	%eax, -128(%rbp)
.L13:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L14
.L12:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L15
	movl	N(%rip), %eax
	movl	%eax, 24(%rbp)
	movl	24(%rbp), %eax
	movl	%eax, -136(%rbp)
	movl	-136(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-64(%rbp), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %rax
	movl	%edx, (%rax)
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbp)
	movl	16(%rbp), %eax
	movl	%eax, -132(%rbp)
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movq	%rbx, %rax
	shrq	$2, %rax
	movl	-116(%rbp), %esi
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rdi
	movl	-132(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	movl	%esi, (%rdx,%rcx,4)
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rcx
	movl	-132(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movl	(%rdx,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	jmp	.L16
.L19:
	leaq	32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	leaq	40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	40(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	40(%rbp), %edx
	movl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, -124(%rbp)
	jmp	.L18
.L17:
	movl	40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	32(%rbp), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 40(%rbp)
	movl	32(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 32(%rbp)
	addl	$1, -128(%rbp)
	movl	40(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rdi
	shrq	$2, %rdi
	movl	40(%rbp), %ecx
	movl	32(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-96(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%rsi, %rcx
	movl	%edx, (%rax,%rcx,4)
	movl	32(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L16:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -116(%rbp)
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L20
.L23:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L21
	movl	-132(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-136(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -136(%rbp)
.L21:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L22
.L20:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L23
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -132(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L24
.L27:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L25
.L26:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L25
	movl	16(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, 16(%rbp)
	movl	24(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 24(%rbp)
.L25:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L26
.L24:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L27
	movl	24(%rbp), %eax
	subl	$1, %eax
	subl	%eax, 16(%rbp)
	movl	-132(%rbp), %eax
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	%eax, -116(%rbp)
.L11:
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movq	-144(%rbp), %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movl	%esi, -120(%rbp)
	movl	%edx, -124(%rbp)
	movl	%ecx, -128(%rbp)
	movl	%r8d, -132(%rbp)
	movl	%r9d, -136(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -144(%rbp)
	movl	N(%rip), %esi
	movl	N(%rip), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%esi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movq	%r13, %rdx
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r12, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r12, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-160(%rbp), %r11
	movq	-152(%rbp), %r12
	movq	%r12, %rdx
	imulq	%r14, %rdx
	movq	%r11, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r11, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	N(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	jmp	.L11
.L28:
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L12
.L15:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L13
.L14:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rax
	shrq	$2, %rax
	movq	-80(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rdx,%rcx,4), %ecx
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %esi
	movslq	%esi, %rdi
	movl	-120(%rbp), %esi
	movslq	%esi, %rsi
	imulq	%rax, %rsi
	addq	%rdi, %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movq	-96(%rbp), %rdx
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rsi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	movl	%eax, -128(%rbp)
.L13:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L14
.L12:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L15
	movl	N(%rip), %eax
	movl	%eax, 24(%rbp)
	movl	24(%rbp), %eax
	movl	%eax, -136(%rbp)
	movl	-136(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-64(%rbp), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %rax
	movl	%edx, (%rax)
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbp)
	movl	16(%rbp), %eax
	movl	%eax, -132(%rbp)
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movq	%rbx, %rax
	shrq	$2, %rax
	movl	-116(%rbp), %esi
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rdi
	movl	-132(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	movl	%esi, (%rdx,%rcx,4)
	movq	-96(%rbp), %rdx
	leaq	1(%rax), %rcx
	movl	-132(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movl	(%rdx,%rax,4), %eax
	testl	%eax, %eax
	je	.L11
	jmp	.L16
.L19:
	leaq	32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	leaq	40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	40(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	40(%rbp), %edx
	movl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, -124(%rbp)
	jmp	.L18
.L17:
	movl	40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	movl	40(%rbp), %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	32(%rbp), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 40(%rbp)
	movl	32(%rbp), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, 32(%rbp)
	addl	$1, -128(%rbp)
	movl	40(%rbp), %ecx
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	%rbx, %rdi
	shrq	$2, %rdi
	movl	40(%rbp), %ecx
	movl	32(%rbp), %esi
	movq	-80(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-96(%rbp), %rax
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	imulq	%rdi, %rcx
	addq	%rsi, %rcx
	movl	%edx, (%rax,%rcx,4)
	movl	32(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	-128(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L16:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -116(%rbp)
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L20
.L23:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L21
	movl	-132(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -132(%rbp)
	movl	-136(%rbp), %edx
	movl	-120(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -136(%rbp)
.L21:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L22
.L20:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L23
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	%eax, -132(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -120(%rbp)
	jmp	.L24
.L27:
	movl	N(%rip), %eax
	movl	%eax, -124(%rbp)
	jmp	.L25
.L26:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-96(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	je	.L25
	movl	16(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, 16(%rbp)
	movl	24(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 24(%rbp)
.L25:
	subl	$1, -124(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L26
.L24:
	subl	$1, -120(%rbp)
	cmpl	$0, -120(%rbp)
	jne	.L27
	movl	24(%rbp), %eax
	subl	$1, %eax
	subl	%eax, 16(%rbp)
	movl	-132(%rbp), %eax
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	%eax, -116(%rbp)
.L11:
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movq	-144(%rbp), %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
