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

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

int main(void)
{
    int data[255][255];
    int rec[255][255];
    char buf[512];
    int n;
    int i, j, k;
    int max;
    int dx[4] = {-1, 0, -1, 1};
    int dy[4] = {0, -1, -1, -1};
    
    while (scanf("%d", &n), n){
        for (i = 0; i < n; i++){
            scanf("%s", buf);
            for (j = 0; j < n; j++){
                data[i][j] = buf[j] - '0';
            }
        }
        
        max = 0;
        for (i = 0; i < 4; i++){
            memset(rec, 0, sizeof(rec));
            for (j = 0; j < n; j++){
                for (k = 0; k < n; k++){
                    rec[j][k] = data[j][k];
                    if (0 <= k + dx[i] && k + dx[i] < n &&
                            0 <= j + dy[i] && j + dy[i] < n && rec[j][k] == 1){
                        rec[j][k] += rec[j + dy[i]][k + dx[i]];
                    }
                    max = max > rec[j][k] ? max : rec[j][k];
                }
            }
        }
        
        printf("%d\n", max);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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
	leaq	-520192(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -520784(%rbp)
	movl	$0, -520780(%rbp)
	movl	$-1, -520776(%rbp)
	movl	$1, -520772(%rbp)
	movl	$0, -520768(%rbp)
	movl	$-1, -520764(%rbp)
	movl	$-1, -520760(%rbp)
	movl	$-1, -520756(%rbp)
	jmp	.L2
.L14:
	movl	$0, -520800(%rbp)
	jmp	.L3
.L6:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -520796(%rbp)
	jmp	.L4
.L5:
	movl	-520796(%rbp), %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520800(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -520752(%rbp,%rax,4)
	addl	$1, -520796(%rbp)
.L4:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L5
	addl	$1, -520800(%rbp)
.L3:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520800(%rbp)
	jl	.L6
	movl	$0, -520788(%rbp)
	movl	$0, -520800(%rbp)
	jmp	.L7
.L13:
	leaq	-260640(%rbp), %rax
	movl	$260100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -520796(%rbp)
	jmp	.L8
.L12:
	movl	$0, -520792(%rbp)
	jmp	.L9
.L11:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-520752(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -260640(%rbp,%rax,4)
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %ecx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %esi
	movl	-520792(%rbp), %eax
	addl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	-260640(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -260640(%rbp,%rax,4)
.L10:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	movl	-520788(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -520788(%rbp)
	addl	$1, -520792(%rbp)
.L9:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520792(%rbp)
	jl	.L11
	addl	$1, -520796(%rbp)
.L8:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L12
	addl	$1, -520800(%rbp)
.L7:
	cmpl	$3, -520800(%rbp)
	jle	.L13
	movl	-520788(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-520804(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-520804(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.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
.LC2:
	.string	"%s"
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-520192(%rsp), %r11
	.cfi_def_cfa 11, 520248
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$648, %rsp
	.cfi_def_cfa_offset 520896
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 520824(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 24(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, (%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movq	24(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L13
	movq	(%rsp), %rbp
	movl	$0, %r13d
	leaq	520304(%rsp), %r12
	jg	.L6
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L77:
	leal	-1(%rbx), %eax
	cmpl	$14, %eax
	jbe	.L17
	movdqa	520304(%rsp), %xmm0
	pxor	%xmm4, %xmm4
	movl	%ebx, %eax
	movdqa	%xmm4, %xmm2
	shrl	$4, %eax
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm0
	pxor	%xmm2, %xmm2
	paddw	%xmm1, %xmm3
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 16(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 0(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 32(%rbp)
	movups	%xmm0, 48(%rbp)
	cmpl	$1, %eax
	je	.L5
	movdqa	520320(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 80(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 64(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 96(%rbp)
	movups	%xmm0, 112(%rbp)
	cmpl	$2, %eax
	je	.L5
	movdqa	520336(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 144(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 128(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 160(%rbp)
	movups	%xmm0, 176(%rbp)
	cmpl	$3, %eax
	je	.L5
	movdqa	520352(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 208(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 192(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 224(%rbp)
	movups	%xmm0, 240(%rbp)
	cmpl	$4, %eax
	je	.L5
	movdqa	520368(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 272(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 256(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 288(%rbp)
	movups	%xmm0, 304(%rbp)
	cmpl	$5, %eax
	je	.L5
	movdqa	520384(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 336(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 320(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 352(%rbp)
	movups	%xmm0, 368(%rbp)
	cmpl	$6, %eax
	je	.L5
	movdqa	520400(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 400(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 384(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 416(%rbp)
	movups	%xmm0, 432(%rbp)
	cmpl	$7, %eax
	je	.L5
	movdqa	520416(%rsp), %xmm0
	pcmpgtb	%xmm0, %xmm4
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm4, %xmm3
	punpckhbw	%xmm4, %xmm0
	movdqa	%xmm2, %xmm4
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm4
	pcmpgtw	%xmm0, %xmm2
	movdqa	%xmm3, %xmm5
	punpckhwd	%xmm4, %xmm3
	punpcklwd	%xmm4, %xmm5
	movups	%xmm3, 464(%rbp)
	movdqa	%xmm0, %xmm3
	punpckhwd	%xmm2, %xmm0
	punpcklwd	%xmm2, %xmm3
	movups	%xmm5, 448(%rbp)
	movups	%xmm3, 480(%rbp)
	movups	%xmm0, 496(%rbp)
	cmpl	$8, %eax
	je	.L5
	movdqa	520432(%rsp), %xmm0
	pxor	%xmm4, %xmm4
	movdqa	%xmm4, %xmm2
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm0
	pxor	%xmm2, %xmm2
	paddw	%xmm1, %xmm3
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 528(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 512(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 544(%rbp)
	movups	%xmm0, 560(%rbp)
	cmpl	$9, %eax
	je	.L5
	movdqa	520448(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 592(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 576(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 608(%rbp)
	movups	%xmm0, 624(%rbp)
	cmpl	$10, %eax
	je	.L5
	movdqa	520464(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 656(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 640(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 672(%rbp)
	movups	%xmm0, 688(%rbp)
	cmpl	$11, %eax
	je	.L5
	movdqa	520480(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 720(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 704(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 736(%rbp)
	movups	%xmm0, 752(%rbp)
	cmpl	$12, %eax
	je	.L5
	movdqa	520496(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 784(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 768(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 800(%rbp)
	movups	%xmm0, 816(%rbp)
	cmpl	$13, %eax
	je	.L5
	movdqa	520512(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 848(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 832(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 864(%rbp)
	movups	%xmm0, 880(%rbp)
	cmpl	$14, %eax
	je	.L5
	movdqa	520528(%rsp), %xmm0
	pcmpgtb	%xmm0, %xmm4
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm4, %xmm3
	punpckhbw	%xmm4, %xmm0
	movdqa	%xmm2, %xmm4
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm4
	pcmpgtw	%xmm0, %xmm2
	movdqa	%xmm3, %xmm5
	punpckhwd	%xmm4, %xmm3
	punpcklwd	%xmm4, %xmm5
	movups	%xmm3, 912(%rbp)
	movdqa	%xmm0, %xmm3
	punpckhwd	%xmm2, %xmm0
	punpcklwd	%xmm2, %xmm3
	movups	%xmm5, 896(%rbp)
	movups	%xmm3, 928(%rbp)
	movups	%xmm0, 944(%rbp)
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ebx, %eax
	andl	$-16, %eax
	testb	$15, %bl
	je	.L7
.L4:
	movslq	%r13d, %rsi
	movslq	%eax, %rcx
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	2(%rax), %ecx
	cmpl	%ebx, %ecx
	jge	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	3(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	4(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	5(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	6(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	7(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	8(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	9(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdx,4)
	leal	10(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L7
	movslq	%edx, %rcx
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	11(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	12(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	13(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	addl	$14, %eax
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	cmpl	%eax, %ebx
	jle	.L7
	cltq
	addq	%rax, %rdx
	movsbl	520304(%rsp,%rax), %eax
	subl	$48, %eax
	movl	%eax, 80(%rsp,%rdx,4)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r13d
	addq	$1020, %rbp
	cmpl	%ebx, %r13d
	jge	.L15
.L6:
	xorl	%eax, %eax
	movq	%r12, %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %ebx
	movdqa	.LC3(%rip), %xmm1
	testl	%ebx, %ebx
	jg	.L77
.L15:
	leaq	48(%rsp), %rax
	leaq	64(%rsp), %rbp
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
	leaq	260192(%rsp), %rax
	movq	%rax, 16(%rsp)
.L12:
	movq	16(%rsp), %r13
	xorl	%esi, %esi
	movl	$260100, %edx
	movq	%r13, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L8
	movq	8(%rsp), %rax
	movq	(%rsp), %r14
	xorl	%r10d, %r10d
	movl	(%rax), %r15d
	leal	(%rbx,%r15), %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r15d, %eax
	movq	%r13, %rcx
	movq	%r14, %rsi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%edx, %r12d
	cmovl	%edx, %r12d
	addl	$1, %eax
	addq	$4, %rsi
	addq	$4, %rcx
	cmpl	%r8d, %eax
	je	.L78
.L10:
	movl	(%rsi), %edx
	movl	%edx, (%rcx)
	cmpl	%ebx, %eax
	jge	.L9
	testl	%eax, %eax
	js	.L9
	movl	0(%rbp), %r9d
	addl	%r10d, %r9d
	movl	%r9d, %edi
	cmpl	%ebx, %r9d
	notl	%edi
	setl	%r11b
	shrl	$31, %edi
	testb	%dil, %r11b
	je	.L9
	cmpl	$1, %edx
	jne	.L9
	movslq	%r9d, %r9
	movslq	%eax, %rdi
	movq	%r9, %rdx
	salq	$8, %rdx
	subq	%r9, %rdx
	addq	%rdi, %rdx
	movl	260192(%rsp,%rdx,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L78:
	addl	$1, %r10d
	addq	$1020, %r14
	addq	$1020, %r13
	cmpl	%ebx, %r10d
	jne	.L11
.L8:
	addq	$4, 8(%rsp)
	addq	$4, %rbp
	cmpq	%rbp, (%rsp)
	jne	.L12
	movl	%r12d, %edx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L17:
	xorl	%eax, %eax
	jmp	.L4
.L13:
	movq	520824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$520840, %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
.L79:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	-1
	.long	0
	.long	-1
	.long	1
	.align 16
.LC1:
	.long	0
	.long	-1
	.long	-1
	.long	-1
	.align 16
.LC3:
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.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
.LC2:
	.string	"%s"
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-520192(%rsp), %r11
	.cfi_def_cfa 11, 520248
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$648, %rsp
	.cfi_def_cfa_offset 520896
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 520824(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 24(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, (%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movq	24(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L13
	movq	(%rsp), %rbp
	movl	$0, %r13d
	leaq	520304(%rsp), %r12
	jg	.L6
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L77:
	leal	-1(%rbx), %eax
	cmpl	$14, %eax
	jbe	.L17
	movdqa	520304(%rsp), %xmm0
	pxor	%xmm4, %xmm4
	movl	%ebx, %eax
	movdqa	%xmm4, %xmm2
	shrl	$4, %eax
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm0
	pxor	%xmm2, %xmm2
	paddw	%xmm1, %xmm3
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 16(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 0(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 32(%rbp)
	movups	%xmm0, 48(%rbp)
	cmpl	$1, %eax
	je	.L5
	movdqa	520320(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 80(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 64(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 96(%rbp)
	movups	%xmm0, 112(%rbp)
	cmpl	$2, %eax
	je	.L5
	movdqa	520336(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 144(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 128(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 160(%rbp)
	movups	%xmm0, 176(%rbp)
	cmpl	$3, %eax
	je	.L5
	movdqa	520352(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 208(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 192(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 224(%rbp)
	movups	%xmm0, 240(%rbp)
	cmpl	$4, %eax
	je	.L5
	movdqa	520368(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 272(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 256(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 288(%rbp)
	movups	%xmm0, 304(%rbp)
	cmpl	$5, %eax
	je	.L5
	movdqa	520384(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 336(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 320(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 352(%rbp)
	movups	%xmm0, 368(%rbp)
	cmpl	$6, %eax
	je	.L5
	movdqa	520400(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 400(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 384(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 416(%rbp)
	movups	%xmm0, 432(%rbp)
	cmpl	$7, %eax
	je	.L5
	movdqa	520416(%rsp), %xmm0
	pcmpgtb	%xmm0, %xmm4
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm4, %xmm3
	punpckhbw	%xmm4, %xmm0
	movdqa	%xmm2, %xmm4
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm4
	pcmpgtw	%xmm0, %xmm2
	movdqa	%xmm3, %xmm5
	punpckhwd	%xmm4, %xmm3
	punpcklwd	%xmm4, %xmm5
	movups	%xmm3, 464(%rbp)
	movdqa	%xmm0, %xmm3
	punpckhwd	%xmm2, %xmm0
	punpcklwd	%xmm2, %xmm3
	movups	%xmm5, 448(%rbp)
	movups	%xmm3, 480(%rbp)
	movups	%xmm0, 496(%rbp)
	cmpl	$8, %eax
	je	.L5
	movdqa	520432(%rsp), %xmm0
	pxor	%xmm4, %xmm4
	movdqa	%xmm4, %xmm2
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm0
	pxor	%xmm2, %xmm2
	paddw	%xmm1, %xmm3
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 528(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 512(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 544(%rbp)
	movups	%xmm0, 560(%rbp)
	cmpl	$9, %eax
	je	.L5
	movdqa	520448(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 592(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 576(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 608(%rbp)
	movups	%xmm0, 624(%rbp)
	cmpl	$10, %eax
	je	.L5
	movdqa	520464(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 656(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 640(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 672(%rbp)
	movups	%xmm0, 688(%rbp)
	cmpl	$11, %eax
	je	.L5
	movdqa	520480(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 720(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 704(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 736(%rbp)
	movups	%xmm0, 752(%rbp)
	cmpl	$12, %eax
	je	.L5
	movdqa	520496(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 784(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 768(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 800(%rbp)
	movups	%xmm0, 816(%rbp)
	cmpl	$13, %eax
	je	.L5
	movdqa	520512(%rsp), %xmm0
	movdqa	%xmm4, %xmm5
	pcmpgtb	%xmm0, %xmm5
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm5, %xmm3
	punpckhbw	%xmm5, %xmm0
	movdqa	%xmm2, %xmm5
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm5
	movdqa	%xmm3, %xmm6
	punpckhwd	%xmm5, %xmm3
	punpcklwd	%xmm5, %xmm6
	movdqa	%xmm0, %xmm5
	movups	%xmm3, 848(%rbp)
	movdqa	%xmm2, %xmm3
	pcmpgtw	%xmm0, %xmm3
	movups	%xmm6, 832(%rbp)
	punpcklwd	%xmm3, %xmm5
	punpckhwd	%xmm3, %xmm0
	movups	%xmm5, 864(%rbp)
	movups	%xmm0, 880(%rbp)
	cmpl	$14, %eax
	je	.L5
	movdqa	520528(%rsp), %xmm0
	pcmpgtb	%xmm0, %xmm4
	movdqa	%xmm0, %xmm3
	punpcklbw	%xmm4, %xmm3
	punpckhbw	%xmm4, %xmm0
	movdqa	%xmm2, %xmm4
	paddw	%xmm1, %xmm3
	paddw	%xmm1, %xmm0
	pcmpgtw	%xmm3, %xmm4
	pcmpgtw	%xmm0, %xmm2
	movdqa	%xmm3, %xmm5
	punpckhwd	%xmm4, %xmm3
	punpcklwd	%xmm4, %xmm5
	movups	%xmm3, 912(%rbp)
	movdqa	%xmm0, %xmm3
	punpckhwd	%xmm2, %xmm0
	punpcklwd	%xmm2, %xmm3
	movups	%xmm5, 896(%rbp)
	movups	%xmm3, 928(%rbp)
	movups	%xmm0, 944(%rbp)
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%ebx, %eax
	andl	$-16, %eax
	testb	$15, %bl
	je	.L7
.L4:
	movslq	%r13d, %rsi
	movslq	%eax, %rcx
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	1(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	2(%rax), %ecx
	cmpl	%ebx, %ecx
	jge	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	3(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	4(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	5(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	6(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	7(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	8(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rdi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdi,4)
	leal	9(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rdx,4)
	leal	10(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L7
	movslq	%edx, %rcx
	movq	%rsi, %rdx
	salq	$8, %rdx
	subq	%rsi, %rdx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	11(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	12(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	leal	13(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L7
	movslq	%ecx, %rcx
	addl	$14, %eax
	leaq	(%rdx,%rcx), %rsi
	movsbl	520304(%rsp,%rcx), %ecx
	subl	$48, %ecx
	movl	%ecx, 80(%rsp,%rsi,4)
	cmpl	%eax, %ebx
	jle	.L7
	cltq
	addq	%rax, %rdx
	movsbl	520304(%rsp,%rax), %eax
	subl	$48, %eax
	movl	%eax, 80(%rsp,%rdx,4)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r13d
	addq	$1020, %rbp
	cmpl	%ebx, %r13d
	jge	.L15
.L6:
	xorl	%eax, %eax
	movq	%r12, %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %ebx
	movdqa	.LC3(%rip), %xmm1
	testl	%ebx, %ebx
	jg	.L77
.L15:
	leaq	48(%rsp), %rax
	leaq	64(%rsp), %rbp
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
	leaq	260192(%rsp), %rax
	movq	%rax, 16(%rsp)
.L12:
	movq	16(%rsp), %r13
	xorl	%esi, %esi
	movl	$260100, %edx
	movq	%r13, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L8
	movq	8(%rsp), %rax
	movq	(%rsp), %r14
	xorl	%r10d, %r10d
	movl	(%rax), %r15d
	leal	(%rbx,%r15), %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r15d, %eax
	movq	%r13, %rcx
	movq	%r14, %rsi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%edx, %r12d
	cmovl	%edx, %r12d
	addl	$1, %eax
	addq	$4, %rsi
	addq	$4, %rcx
	cmpl	%r8d, %eax
	je	.L78
.L10:
	movl	(%rsi), %edx
	movl	%edx, (%rcx)
	cmpl	%ebx, %eax
	jge	.L9
	testl	%eax, %eax
	js	.L9
	movl	0(%rbp), %r9d
	addl	%r10d, %r9d
	movl	%r9d, %edi
	cmpl	%ebx, %r9d
	notl	%edi
	setl	%r11b
	shrl	$31, %edi
	testb	%dil, %r11b
	je	.L9
	cmpl	$1, %edx
	jne	.L9
	movslq	%r9d, %r9
	movslq	%eax, %rdi
	movq	%r9, %rdx
	salq	$8, %rdx
	subq	%r9, %rdx
	addq	%rdi, %rdx
	movl	260192(%rsp,%rdx,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L78:
	addl	$1, %r10d
	addq	$1020, %r14
	addq	$1020, %r13
	cmpl	%ebx, %r10d
	jne	.L11
.L8:
	addq	$4, 8(%rsp)
	addq	$4, %rbp
	cmpq	%rbp, (%rsp)
	jne	.L12
	movl	%r12d, %edx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L17:
	xorl	%eax, %eax
	jmp	.L4
.L13:
	movq	520824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$520840, %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
.L79:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	-1
	.long	0
	.long	-1
	.long	1
	.align 16
.LC1:
	.long	0
	.long	-1
	.long	-1
	.long	-1
	.align 16
.LC3:
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.value	-48
	.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:

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

int main(void)
{
    int data[255][255];
    int rec[255][255];
    char buf[512];
    int n;
    int i, j, k;
    int max;
    int dx[4] = {-1, 0, -1, 1};
    int dy[4] = {0, -1, -1, -1};
    
    while (scanf("%d", &n), n){
        for (i = 0; i < n; i++){
            scanf("%s", buf);
            for (j = 0; j < n; j++){
                data[i][j] = buf[j] - '0';
            }
        }
        
        max = 0;
        for (i = 0; i < 4; i++){
            memset(rec, 0, sizeof(rec));
            for (j = 0; j < n; j++){
                for (k = 0; k < n; k++){
                    rec[j][k] = data[j][k];
                    if (0 <= k + dx[i] && k + dx[i] < n &&
                            0 <= j + dy[i] && j + dy[i] < n && rec[j][k] == 1){
                        rec[j][k] += rec[j + dy[i]][k + dx[i]];
                    }
                    max = max > rec[j][k] ? max : rec[j][k];
                }
            }
        }
        
        printf("%d\n", max);
    }
    
    return (0);
}
5
00011
00101
01000
10101
00010
8
11000001
10110111
01100111
01111010
11111111
01001010
10100010
10000001
2
01
00
3
000
000
000
0
 5
01011
00101
01000
10101
00010
8
11000001
10110111
01100111
01111010
11111111
01001010
10100000
10000001
0
01
00
3
000
000
000
0
 5
01011
00101
01100
10101
00010
8
11000001
10110111
01100111
10111010
10111111
01001010
10100000
10000000
0
01
00
3
001
100
000
0
 5
01011
00000
01000
10101
01010
8
11010001
10110111
01100011
01111010
11111111
01101000
10100010
10000101
0
0
1
6
000
100
000
0
 5
01011
10000
01000
10001
01010
8
11010001
10110111
01100011
01111010
11111111
01101000
10100010
10000101
0
0
1
6
000
100
000
0
 5
00011
00101
01000
10101
00010
8
11000001
10110111
01100111
01111010
11111111
01001010
10100010
10000001
2
01
00
3
000
010
000
0
 5
01011
00100
01000
10101
01010
8
11010001
10110111
01100111
01111010
11011111
01001010
10100000
10000001
0
0
1
3
000
000
000
0
 5
01011
00101
01000
10101
00010
8
11000001
10110111
01100111
01111010
11111111
01001010
10100010
10000001
2
01
00
3
000
011
000
0
 5
01011
00101
01000
10101
00010
8
11100001
10110111
01100111
01111010
11111111
01000010
10100000
10000001
2
01
00
0
000
000
000
0
 5
01010
00101
01000
10101
00010
8
10000001
10110111
01100011
01111010
11111110
01001010
10110000
10000001
0
0
00
1
000
010
100
0

4
8
1
0
 4
8
 4
6
 3
8
 2
8
 4
8
1
1
 4
5
 4
8
1
2
 4
8
1
 4
7

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

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

int main(void)
{
    int data[255][255];
    int rec[255][255];
    char buf[512];
    int n;
    int i, j, k;
    int max;
    int dx[4] = {-1, 0, -1, 1};
    int dy[4] = {0, -1, -1, -1};
    
    while (scanf("%d", &n), n){
        for (i = 0; i < n; i++){
            scanf("%s", buf);
            for (j = 0; j < n; j++){
                data[i][j] = buf[j] - '0';
            }
        }
        
        max = 0;
        for (i = 0; i < 4; i++){
            memset(rec, 0, sizeof(rec));
            for (j = 0; j < n; j++){
                for (k = 0; k < n; k++){
                    rec[j][k] = data[j][k];
                    if (0 <= k + dx[i] && k + dx[i] < n &&
                            0 <= j + dy[i] && j + dy[i] < n && rec[j][k] == 1){
                        rec[j][k] += rec[j + dy[i]][k + dx[i]];
                    }
                    max = max > rec[j][k] ? max : rec[j][k];
                }
            }
        }
        
        printf("%d\n", max);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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
	leaq	-520192(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -520784(%rbp)
	movl	$0, -520780(%rbp)
	movl	$-1, -520776(%rbp)
	movl	$1, -520772(%rbp)
	movl	$0, -520768(%rbp)
	movl	$-1, -520764(%rbp)
	movl	$-1, -520760(%rbp)
	movl	$-1, -520756(%rbp)
	jmp	.L2
.L14:
	movl	$0, -520800(%rbp)
	jmp	.L3
.L6:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -520796(%rbp)
	jmp	.L4
.L5:
	movl	-520796(%rbp), %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520800(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -520752(%rbp,%rax,4)
	addl	$1, -520796(%rbp)
.L4:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L5
	addl	$1, -520800(%rbp)
.L3:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520800(%rbp)
	jl	.L6
	movl	$0, -520788(%rbp)
	movl	$0, -520800(%rbp)
	jmp	.L7
.L13:
	leaq	-260640(%rbp), %rax
	movl	$260100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -520796(%rbp)
	jmp	.L8
.L12:
	movl	$0, -520792(%rbp)
	jmp	.L9
.L11:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-520752(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -260640(%rbp,%rax,4)
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %ecx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %esi
	movl	-520792(%rbp), %eax
	addl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	-260640(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -260640(%rbp,%rax,4)
.L10:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	movl	-520788(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -520788(%rbp)
	addl	$1, -520792(%rbp)
.L9:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520792(%rbp)
	jl	.L11
	addl	$1, -520796(%rbp)
.L8:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L12
	addl	$1, -520800(%rbp)
.L7:
	cmpl	$3, -520800(%rbp)
	jle	.L13
	movl	-520788(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-520804(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-520804(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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
	leaq	-520192(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -520784(%rbp)
	movl	$0, -520780(%rbp)
	movl	$-1, -520776(%rbp)
	movl	$1, -520772(%rbp)
	movl	$0, -520768(%rbp)
	movl	$-1, -520764(%rbp)
	movl	$-1, -520760(%rbp)
	movl	$-1, -520756(%rbp)
	jmp	.L2
.L14:
	movl	$0, -520800(%rbp)
	jmp	.L3
.L6:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -520796(%rbp)
	jmp	.L4
.L5:
	movl	-520796(%rbp), %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %ecx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520800(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -520752(%rbp,%rax,4)
	addl	$1, -520796(%rbp)
.L4:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L5
	addl	$1, -520800(%rbp)
.L3:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520800(%rbp)
	jl	.L6
	movl	$0, -520788(%rbp)
	movl	$0, -520800(%rbp)
	jmp	.L7
.L13:
	leaq	-260640(%rbp), %rax
	movl	$260100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -520796(%rbp)
	jmp	.L8
.L12:
	movl	$0, -520792(%rbp)
	jmp	.L9
.L11:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-520752(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$8, %rax
	subq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -260640(%rbp,%rax,4)
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %edx
	movl	-520792(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L10
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520804(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %ecx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520768(%rbp,%rax,4), %edx
	movl	-520796(%rbp), %eax
	addl	%eax, %edx
	movl	-520800(%rbp), %eax
	cltq
	movl	-520784(%rbp,%rax,4), %esi
	movl	-520792(%rbp), %eax
	addl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	-260640(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-520792(%rbp), %eax
	movslq	%eax, %rsi
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -260640(%rbp,%rax,4)
.L10:
	movl	-520792(%rbp), %eax
	movslq	%eax, %rcx
	movl	-520796(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	movl	-260640(%rbp,%rax,4), %eax
	movl	-520788(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -520788(%rbp)
	addl	$1, -520792(%rbp)
.L9:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520792(%rbp)
	jl	.L11
	addl	$1, -520796(%rbp)
.L8:
	movl	-520804(%rbp), %eax
	cmpl	%eax, -520796(%rbp)
	jl	.L12
	addl	$1, -520800(%rbp)
.L7:
	cmpl	$3, -520800(%rbp)
	jle	.L13
	movl	-520788(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-520804(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-520804(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.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:
