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<stdlib.h>
#include<string.h>
#define MAX(x,y) ((x>y)?x:y)

char x[260][260];
int main(){
	int i,j,n,ans,a,b,c,d;
	
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		memset(x,0,sizeof(x));
		for(i=0;i<n;i++)scanf("%s",x[i]);
		ans=0;
		for(i=0;i<n;i++){
			a=b=c=d=0;
			for(j=0;j<n;j++){
				if(x[i][j]=='1')a++;
				else{ans=MAX(ans,a);a=0;}
				
				if(x[j][i]=='1')b++;
				else{ans=MAX(ans,b);b=0;}
				
				if(j<=i){
					if(x[i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
					
					if(j==i){
						ans=MAX(ans,c);
						ans=MAX(ans,d);
						c=d=0;
					}
				}
				else{
					if(x[n+i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[n+i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
				}
			}
			ans=MAX(ans,a);
			ans=MAX(ans,b);
			ans=MAX(ans,c);
			ans=MAX(ans,d);
		}
		printf("%d\n",ans);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 67600
x:
	.zero	67600
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L23:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L27
	movl	$67600, %edx
	movl	$0, %esi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	x(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L6
.L22:
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L8
	addl	$1, -24(%rbp)
	jmp	.L9
.L8:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -24(%rbp)
.L9:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L10
	addl	$1, -20(%rbp)
	jmp	.L11
.L10:
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -20(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jg	.L12
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L13
	addl	$1, -16(%rbp)
	jmp	.L14
.L13:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L15
	addl	$1, -12(%rbp)
	jmp	.L16
.L15:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jne	.L17
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L12:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L18
	addl	$1, -16(%rbp)
	jmp	.L19
.L18:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L19:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L20
	addl	$1, -12(%rbp)
	jmp	.L17
.L20:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L17:
	addl	$1, -32(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L22
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	x(%rip), %r15
	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
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rax
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L30:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	xorl	%esi, %esi
	movl	$67600, %edx
	movq	%r15, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L3
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %r14d
	addq	$260, %rbp
	cmpl	%ebx, %r14d
	jg	.L4
	testl	%r14d, %r14d
	jle	.L3
	leal	-1(%r14), %eax
	movl	%r14d, 24(%rsp)
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	movl	%eax, 28(%rsp)
	movslq	%r14d, %rax
	leaq	x(%rip), %rbp
	movq	$0, 8(%rsp)
	subq	$1, %rax
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L28:
	movl	28(%rsp), %eax
	leal	1(%r12), %r9d
	movq	%rbp, %r10
	movl	%r9d, 20(%rsp)
	movq	%rbp, %r9
	cmpl	%r12d, %eax
	movl	%eax, %r13d
	movq	32(%rsp), %rax
	cmovg	%r12d, %r13d
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	leaq	(%rax,%rbp), %rbx
	movq	8(%rsp), %rax
	xorl	%edi, %edi
	leaq	(%r15,%rax), %r11
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$49, (%r9)
	je	.L39
.L5:
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
.L6:
	cmpb	$49, (%r11)
	je	.L40
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
	cmpb	$49, (%r10)
	je	.L9
.L46:
	cmpl	%r8d, %edx
	cmovl	%r8d, %edx
	xorl	%r8d, %r8d
	cmpb	$49, (%rbx)
	je	.L41
.L11:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	xorl	%esi, %esi
	cmpl	%edi, %r12d
	je	.L42
.L13:
	addl	$1, %edi
	addq	$1, %r9
	subq	$261, %rbx
	subq	$259, %r10
	addq	$260, %r11
	cmpl	%edi, %r13d
	jge	.L16
.L15:
	cmpl	%edi, %r14d
	jle	.L26
	movl	24(%rsp), %r11d
	movslq	%edi, %r9
	movq	8(%rsp), %rbx
	subl	%edi, %r11d
	movslq	%r11d, %r11
	movq	%r11, %r10
	salq	$6, %r10
	addq	%r11, %r10
	movl	28(%rsp), %r11d
	salq	$2, %r10
	subl	%edi, %r11d
	leaq	(%r10,%r9), %rdi
	movslq	%r11d, %r11
	addq	%r15, %rdi
	addq	%r10, %r11
	movq	%r9, %r10
	salq	$6, %r10
	addq	%r15, %r11
	addq	%r9, %r10
	leaq	(%rbx,%r10,4), %r10
	addq	%r15, %r10
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	cmpb	$49, (%r10)
	je	.L43
.L19:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
	cmpb	$49, (%rdi)
	je	.L21
.L45:
	cmpl	%r8d, %edx
	cmovl	%r8d, %edx
	xorl	%r8d, %r8d
	cmpb	$49, (%r11)
	je	.L44
.L23:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	xorl	%esi, %esi
.L24:
	addq	$1, %r9
	subq	$261, %r11
	subq	$259, %rdi
	addq	$260, %r10
	cmpl	%r9d, %r14d
	jle	.L26
.L25:
	cmpb	$49, 0(%rbp,%r9)
	jne	.L17
	addl	$1, %eax
	cmpb	$49, (%r10)
	jne	.L19
.L43:
	addl	$1, %ecx
	cmpb	$49, (%rdi)
	jne	.L45
.L21:
	addl	$1, %r8d
	cmpb	$49, (%r11)
	jne	.L23
.L44:
	addl	$1, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L40:
	addl	$1, %ecx
	cmpb	$49, (%r10)
	jne	.L46
.L9:
	addl	$1, %r8d
	cmpb	$49, (%rbx)
	jne	.L11
.L41:
	addl	$1, %esi
	cmpl	%edi, %r12d
	jne	.L13
.L42:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	movl	20(%rsp), %esi
	cmpl	%edx, %r8d
	movl	%esi, %edi
	cmovge	%r8d, %edx
	addq	$1, %r9
	subq	$261, %rbx
	subq	$259, %r10
	addq	$260, %r11
	cmpl	%r13d, %esi
	movl	$0, %r8d
	movl	$0, %esi
	jg	.L15
	cmpb	$49, (%r9)
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L39:
	addl	$1, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	%r8d, %esi
	movl	20(%rsp), %r12d
	cmovl	%r8d, %esi
	cmpl	%ecx, %esi
	cmovl	%ecx, %esi
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addq	$1, 8(%rsp)
	addq	$260, %rbp
	addl	$1, 24(%rsp)
	cmpl	%r12d, %r14d
	jne	.L28
.L29:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L30
.L2:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$72, %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
.L3:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L29
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 67600
x:
	.zero	67600
	.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	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	x(%rip), %r15
	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
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rax
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L30:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	xorl	%esi, %esi
	movl	$67600, %edx
	movq	%r15, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L3
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %r14d
	addq	$260, %rbp
	cmpl	%ebx, %r14d
	jg	.L4
	testl	%r14d, %r14d
	jle	.L3
	leal	-1(%r14), %eax
	movl	%r14d, 24(%rsp)
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	movl	%eax, 28(%rsp)
	movslq	%r14d, %rax
	leaq	x(%rip), %rbp
	movq	$0, 8(%rsp)
	subq	$1, %rax
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L28:
	movl	28(%rsp), %eax
	leal	1(%r12), %r9d
	movq	%rbp, %r10
	movl	%r9d, 20(%rsp)
	movq	%rbp, %r9
	cmpl	%r12d, %eax
	movl	%eax, %r13d
	movq	32(%rsp), %rax
	cmovg	%r12d, %r13d
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	leaq	(%rax,%rbp), %rbx
	movq	8(%rsp), %rax
	xorl	%edi, %edi
	leaq	(%r15,%rax), %r11
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$49, (%r9)
	je	.L39
.L5:
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
.L6:
	cmpb	$49, (%r11)
	je	.L40
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
	cmpb	$49, (%r10)
	je	.L9
.L46:
	cmpl	%r8d, %edx
	cmovl	%r8d, %edx
	xorl	%r8d, %r8d
	cmpb	$49, (%rbx)
	je	.L41
.L11:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	xorl	%esi, %esi
	cmpl	%edi, %r12d
	je	.L42
.L13:
	addl	$1, %edi
	addq	$1, %r9
	subq	$261, %rbx
	subq	$259, %r10
	addq	$260, %r11
	cmpl	%edi, %r13d
	jge	.L16
.L15:
	cmpl	%edi, %r14d
	jle	.L26
	movl	24(%rsp), %r11d
	movslq	%edi, %r9
	movq	8(%rsp), %rbx
	subl	%edi, %r11d
	movslq	%r11d, %r11
	movq	%r11, %r10
	salq	$6, %r10
	addq	%r11, %r10
	movl	28(%rsp), %r11d
	salq	$2, %r10
	subl	%edi, %r11d
	leaq	(%r10,%r9), %rdi
	movslq	%r11d, %r11
	addq	%r15, %rdi
	addq	%r10, %r11
	movq	%r9, %r10
	salq	$6, %r10
	addq	%r15, %r11
	addq	%r9, %r10
	leaq	(%rbx,%r10,4), %r10
	addq	%r15, %r10
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
	cmpb	$49, (%r10)
	je	.L43
.L19:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
	cmpb	$49, (%rdi)
	je	.L21
.L45:
	cmpl	%r8d, %edx
	cmovl	%r8d, %edx
	xorl	%r8d, %r8d
	cmpb	$49, (%r11)
	je	.L44
.L23:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	xorl	%esi, %esi
.L24:
	addq	$1, %r9
	subq	$261, %r11
	subq	$259, %rdi
	addq	$260, %r10
	cmpl	%r9d, %r14d
	jle	.L26
.L25:
	cmpb	$49, 0(%rbp,%r9)
	jne	.L17
	addl	$1, %eax
	cmpb	$49, (%r10)
	jne	.L19
.L43:
	addl	$1, %ecx
	cmpb	$49, (%rdi)
	jne	.L45
.L21:
	addl	$1, %r8d
	cmpb	$49, (%r11)
	jne	.L23
.L44:
	addl	$1, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L40:
	addl	$1, %ecx
	cmpb	$49, (%r10)
	jne	.L46
.L9:
	addl	$1, %r8d
	cmpb	$49, (%rbx)
	jne	.L11
.L41:
	addl	$1, %esi
	cmpl	%edi, %r12d
	jne	.L13
.L42:
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	movl	20(%rsp), %esi
	cmpl	%edx, %r8d
	movl	%esi, %edi
	cmovge	%r8d, %edx
	addq	$1, %r9
	subq	$261, %rbx
	subq	$259, %r10
	addq	$260, %r11
	cmpl	%r13d, %esi
	movl	$0, %r8d
	movl	$0, %esi
	jg	.L15
	cmpb	$49, (%r9)
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L39:
	addl	$1, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	%r8d, %esi
	movl	20(%rsp), %r12d
	cmovl	%r8d, %esi
	cmpl	%ecx, %esi
	cmovl	%ecx, %esi
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addq	$1, 8(%rsp)
	addq	$260, %rbp
	addl	$1, 24(%rsp)
	cmpl	%r12d, %r14d
	jne	.L28
.L29:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L30
.L2:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$72, %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
.L3:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L29
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 67600
x:
	.zero	67600
	.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<stdlib.h>
#include<string.h>
#define MAX(x,y) ((x>y)?x:y)

char x[260][260];
int main(){
	int i,j,n,ans,a,b,c,d;
	
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		memset(x,0,sizeof(x));
		for(i=0;i<n;i++)scanf("%s",x[i]);
		ans=0;
		for(i=0;i<n;i++){
			a=b=c=d=0;
			for(j=0;j<n;j++){
				if(x[i][j]=='1')a++;
				else{ans=MAX(ans,a);a=0;}
				
				if(x[j][i]=='1')b++;
				else{ans=MAX(ans,b);b=0;}
				
				if(j<=i){
					if(x[i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
					
					if(j==i){
						ans=MAX(ans,c);
						ans=MAX(ans,d);
						c=d=0;
					}
				}
				else{
					if(x[n+i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[n+i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
				}
			}
			ans=MAX(ans,a);
			ans=MAX(ans,b);
			ans=MAX(ans,c);
			ans=MAX(ans,d);
		}
		printf("%d\n",ans);
	}
	
	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<stdlib.h>
#include<string.h>
#define MAX(x,y) ((x>y)?x:y)

char x[260][260];
int main(){
	int i,j,n,ans,a,b,c,d;
	
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		memset(x,0,sizeof(x));
		for(i=0;i<n;i++)scanf("%s",x[i]);
		ans=0;
		for(i=0;i<n;i++){
			a=b=c=d=0;
			for(j=0;j<n;j++){
				if(x[i][j]=='1')a++;
				else{ans=MAX(ans,a);a=0;}
				
				if(x[j][i]=='1')b++;
				else{ans=MAX(ans,b);b=0;}
				
				if(j<=i){
					if(x[i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
					
					if(j==i){
						ans=MAX(ans,c);
						ans=MAX(ans,d);
						c=d=0;
					}
				}
				else{
					if(x[n+i-j][j]=='1')c++;
					else{ans=MAX(ans,c);c=0;}
					
					if(x[n+i-j][n-1-j]=='1')d++;
					else{ans=MAX(ans,d);d=0;}
				}
			}
			ans=MAX(ans,a);
			ans=MAX(ans,b);
			ans=MAX(ans,c);
			ans=MAX(ans,d);
		}
		printf("%d\n",ans);
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 67600
x:
	.zero	67600
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L23:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L27
	movl	$67600, %edx
	movl	$0, %esi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	x(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L6
.L22:
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L8
	addl	$1, -24(%rbp)
	jmp	.L9
.L8:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -24(%rbp)
.L9:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L10
	addl	$1, -20(%rbp)
	jmp	.L11
.L10:
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -20(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jg	.L12
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L13
	addl	$1, -16(%rbp)
	jmp	.L14
.L13:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L15
	addl	$1, -12(%rbp)
	jmp	.L16
.L15:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jne	.L17
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L12:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L18
	addl	$1, -16(%rbp)
	jmp	.L19
.L18:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L19:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L20
	addl	$1, -12(%rbp)
	jmp	.L17
.L20:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L17:
	addl	$1, -32(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L22
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 67600
x:
	.zero	67600
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L23:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L27
	movl	$67600, %edx
	movl	$0, %esi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	x(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L6
.L22:
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L21:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L8
	addl	$1, -24(%rbp)
	jmp	.L9
.L8:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -24(%rbp)
.L9:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L10
	addl	$1, -20(%rbp)
	jmp	.L11
.L10:
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -20(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jg	.L12
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L13
	addl	$1, -16(%rbp)
	jmp	.L14
.L13:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L15
	addl	$1, -12(%rbp)
	jmp	.L16
.L15:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L16:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jne	.L17
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L17
.L12:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L18
	addl	$1, -16(%rbp)
	jmp	.L19
.L18:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -16(%rbp)
.L19:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	-32(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	$1, %edx
	subl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	jne	.L20
	addl	$1, -12(%rbp)
	jmp	.L17
.L20:
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	$0, -12(%rbp)
.L17:
	addl	$1, -32(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -28(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L22
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
