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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define INF ((1LL<<62)-(1LL<<31))
#define min(p,q)((p)<(q)?(p):(q))

ll a[310][310];
ll d[310];//deleted flag
ll ans=INF;
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	rep(i,0,n)rep(j,0,m)scanf("%lld",&a[i][j]);
	rep(xxx,0,m){
		ll cnt[310]={};
		rep(i,0,n){
			rep(j,0,m)if(!d[a[i][j]]){
				cnt[a[i][j]]++;
				break;
			}
		}
		ll M=0,Mi;
		rep(i,1,m+1)if(M<cnt[i]){
			M=cnt[i];
			Mi=i;
		}
		ans=min(ans,M);
		d[Mi]=1;
	}
	printf("%lld",ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 768800
a:
	.zero	768800
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 2480
d:
	.zero	2480
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
	.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
	subq	$2576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2564(%rbp), %rdx
	leaq	-2568(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2560(%rbp)
	jmp	.L2
.L5:
	movq	$0, -2552(%rbp)
	jmp	.L3
.L4:
	movq	-2560(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2552(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -2552(%rbp)
.L3:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2552(%rbp)
	jl	.L4
	addq	$1, -2560(%rbp)
.L2:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2560(%rbp)
	jl	.L5
	movq	$0, -2544(%rbp)
	jmp	.L6
.L16:
	leaq	-2496(%rbp), %rdx
	movl	$0, %eax
	movl	$310, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -2536(%rbp)
	jmp	.L7
.L12:
	movq	$0, -2528(%rbp)
	jmp	.L8
.L11:
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-2496(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -2496(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2528(%rbp)
.L8:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2528(%rbp)
	jl	.L11
.L10:
	addq	$1, -2536(%rbp)
.L7:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2536(%rbp)
	jl	.L12
	movq	$0, -2520(%rbp)
	movq	$1, -2504(%rbp)
	jmp	.L13
.L15:
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	cmpq	%rax, -2520(%rbp)
	jge	.L14
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	movq	%rax, -2520(%rbp)
	movq	-2504(%rbp), %rax
	movq	%rax, -2512(%rbp)
.L14:
	addq	$1, -2504(%rbp)
.L13:
	movl	-2564(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -2504(%rbp)
	jl	.L15
	movq	ans(%rip), %rdx
	movq	-2520(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	-2512(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	$1, (%rdx,%rax)
	addq	$1, -2544(%rbp)
.L6:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2544(%rbp)
	jl	.L16
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$2536, %rsp
	.cfi_def_cfa_offset 2592
	movq	%fs:40, %rax
	movq	%rax, 2520(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %r15
	testq	%r15, %r15
	jle	.L2
	movl	28(%rsp), %eax
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	a(%rip), %rax
	xorl	%r14d, %r14d
	leaq	(%rax,%r13,8), %r15
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$1, %r14
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %r9
	addq	$8, %r15
	movq	%r9, %rax
	cmpq	%r14, %r9
	jg	.L4
	movslq	24(%rsp), %r15
	addq	$1, %r12
	cmpq	%r15, %r12
	jge	.L6
	addq	$310, %r13
	testl	%eax, %eax
	jg	.L7
.L35:
	movq	ans(%rip), %r13
.L9:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$2536, %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
.L2:
	.cfi_restore_state
	movslq	28(%rsp), %r9
	leaq	.LC1(%rip), %rbp
	movq	%r9, %rax
.L6:
	movq	ans(%rip), %r13
	testq	%r9, %r9
	jle	.L9
	addl	$1, %eax
	movq	%rbp, 8(%rsp)
	xorl	%r14d, %r14d
	leaq	32(%rsp), %r10
	movslq	%eax, %r8
	imulq	$310, %r15, %rax
	leaq	a(%rip), %rdx
	leaq	0(,%r9,8), %r11
	leaq	d(%rip), %rsi
	leaq	(%r11,%rdx), %rdi
	addq	%r9, %rax
	movq	%rdi, %rbp
	leaq	(%rdx,%rax,8), %r12
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$310, %ecx
	movq	%r10, %rdi
	rep stosq
	movq	%rbp, %rdi
	testq	%r15, %r15
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rdi, %rdx
	subq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rdx), %rcx
	cmpq	$0, (%rsi,%rcx,8)
	je	.L37
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L15
	addq	$2480, %rdi
	cmpq	%r12, %rdi
	jne	.L10
.L16:
	movl	$1, %edx
	xorl	%edi, %edi
	cmpq	$1, %r8
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%r10,%rdx,8), %rcx
	cmpq	%rdi, %rcx
	jle	.L17
	movq	%rdx, %rbx
	movq	%rcx, %rdi
.L17:
	addq	$1, %rdx
	cmpq	%r8, %rdx
	jne	.L11
.L12:
	cmpq	%rdi, %r13
	movq	$1, (%rsi,%rbx,8)
	cmovg	%rdi, %r13
	addq	$1, %r14
	movq	%r13, ans(%rip)
	cmpq	%r9, %r14
	jne	.L18
	movq	8(%rsp), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$2480, %rdi
	addq	$1, 32(%rsp,%rcx,8)
	cmpq	%r12, %rdi
	jne	.L10
	jmp	.L16
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 2480
d:
	.zero	2480
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 768800
a:
	.zero	768800
	.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%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$2536, %rsp
	.cfi_def_cfa_offset 2592
	movq	%fs:40, %rax
	movq	%rax, 2520(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %r15
	testq	%r15, %r15
	jle	.L2
	movl	28(%rsp), %eax
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbp
	testl	%eax, %eax
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	a(%rip), %rax
	xorl	%r14d, %r14d
	leaq	(%rax,%r13,8), %r15
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$1, %r14
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %r9
	addq	$8, %r15
	movq	%r9, %rax
	cmpq	%r14, %r9
	jg	.L4
	movslq	24(%rsp), %r15
	addq	$1, %r12
	cmpq	%r15, %r12
	jge	.L6
	addq	$310, %r13
	testl	%eax, %eax
	jg	.L7
.L35:
	movq	ans(%rip), %r13
.L9:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$2536, %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
.L2:
	.cfi_restore_state
	movslq	28(%rsp), %r9
	leaq	.LC1(%rip), %rbp
	movq	%r9, %rax
.L6:
	movq	ans(%rip), %r13
	testq	%r9, %r9
	jle	.L9
	addl	$1, %eax
	movq	%rbp, 8(%rsp)
	xorl	%r14d, %r14d
	leaq	32(%rsp), %r10
	movslq	%eax, %r8
	imulq	$310, %r15, %rax
	leaq	a(%rip), %rdx
	leaq	0(,%r9,8), %r11
	leaq	d(%rip), %rsi
	leaq	(%r11,%rdx), %rdi
	addq	%r9, %rax
	movq	%rdi, %rbp
	leaq	(%rdx,%rax,8), %r12
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$310, %ecx
	movq	%r10, %rdi
	rep stosq
	movq	%rbp, %rdi
	testq	%r15, %r15
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rdi, %rdx
	subq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rdx), %rcx
	cmpq	$0, (%rsi,%rcx,8)
	je	.L37
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L15
	addq	$2480, %rdi
	cmpq	%r12, %rdi
	jne	.L10
.L16:
	movl	$1, %edx
	xorl	%edi, %edi
	cmpq	$1, %r8
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%r10,%rdx,8), %rcx
	cmpq	%rdi, %rcx
	jle	.L17
	movq	%rdx, %rbx
	movq	%rcx, %rdi
.L17:
	addq	$1, %rdx
	cmpq	%r8, %rdx
	jne	.L11
.L12:
	cmpq	%rdi, %r13
	movq	$1, (%rsi,%rbx,8)
	cmovg	%rdi, %r13
	addq	$1, %r14
	movq	%r13, ans(%rip)
	cmpq	%r9, %r14
	jne	.L18
	movq	8(%rsp), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$2480, %rdi
	addq	$1, 32(%rsp,%rcx,8)
	cmpq	%r12, %rdi
	jne	.L10
	jmp	.L16
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 2480
d:
	.zero	2480
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 768800
a:
	.zero	768800
	.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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define INF ((1LL<<62)-(1LL<<31))
#define min(p,q)((p)<(q)?(p):(q))

ll a[310][310];
ll d[310];//deleted flag
ll ans=INF;
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	rep(i,0,n)rep(j,0,m)scanf("%lld",&a[i][j]);
	rep(xxx,0,m){
		ll cnt[310]={};
		rep(i,0,n){
			rep(j,0,m)if(!d[a[i][j]]){
				cnt[a[i][j]]++;
				break;
			}
		}
		ll M=0,Mi;
		rep(i,1,m+1)if(M<cnt[i]){
			M=cnt[i];
			Mi=i;
		}
		ans=min(ans,M);
		d[Mi]=1;
	}
	printf("%lld",ans);
}
2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 4 5
2 5 4 3 1
 2 3
2 1 3
2 1 3
2 1 3
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 7
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 0 1 4 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 4 5
2 5 5 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 10
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
4 0 1 4 5
2 5 4 3 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 10
2 5 4 2 1
 2 5
5 1 3 4 2
2 5 3 1 4
2 3 1 6 8
2 5 4 2 1

1 2 1 1 1 1 1 1 1 1
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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define INF ((1LL<<62)-(1LL<<31))
#define min(p,q)((p)<(q)?(p):(q))

ll a[310][310];
ll d[310];//deleted flag
ll ans=INF;
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	rep(i,0,n)rep(j,0,m)scanf("%lld",&a[i][j]);
	rep(xxx,0,m){
		ll cnt[310]={};
		rep(i,0,n){
			rep(j,0,m)if(!d[a[i][j]]){
				cnt[a[i][j]]++;
				break;
			}
		}
		ll M=0,Mi;
		rep(i,1,m+1)if(M<cnt[i]){
			M=cnt[i];
			Mi=i;
		}
		ans=min(ans,M);
		d[Mi]=1;
	}
	printf("%lld",ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 768800
a:
	.zero	768800
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 2480
d:
	.zero	2480
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
	.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
	subq	$2576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2564(%rbp), %rdx
	leaq	-2568(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2560(%rbp)
	jmp	.L2
.L5:
	movq	$0, -2552(%rbp)
	jmp	.L3
.L4:
	movq	-2560(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2552(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -2552(%rbp)
.L3:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2552(%rbp)
	jl	.L4
	addq	$1, -2560(%rbp)
.L2:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2560(%rbp)
	jl	.L5
	movq	$0, -2544(%rbp)
	jmp	.L6
.L16:
	leaq	-2496(%rbp), %rdx
	movl	$0, %eax
	movl	$310, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -2536(%rbp)
	jmp	.L7
.L12:
	movq	$0, -2528(%rbp)
	jmp	.L8
.L11:
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-2496(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -2496(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2528(%rbp)
.L8:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2528(%rbp)
	jl	.L11
.L10:
	addq	$1, -2536(%rbp)
.L7:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2536(%rbp)
	jl	.L12
	movq	$0, -2520(%rbp)
	movq	$1, -2504(%rbp)
	jmp	.L13
.L15:
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	cmpq	%rax, -2520(%rbp)
	jge	.L14
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	movq	%rax, -2520(%rbp)
	movq	-2504(%rbp), %rax
	movq	%rax, -2512(%rbp)
.L14:
	addq	$1, -2504(%rbp)
.L13:
	movl	-2564(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -2504(%rbp)
	jl	.L15
	movq	ans(%rip), %rdx
	movq	-2520(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	-2512(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	$1, (%rdx,%rax)
	addq	$1, -2544(%rbp)
.L6:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2544(%rbp)
	jl	.L16
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 768800
a:
	.zero	768800
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 2480
d:
	.zero	2480
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
	.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
	subq	$2576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2564(%rbp), %rdx
	leaq	-2568(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2560(%rbp)
	jmp	.L2
.L5:
	movq	$0, -2552(%rbp)
	jmp	.L3
.L4:
	movq	-2560(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2552(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -2552(%rbp)
.L3:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2552(%rbp)
	jl	.L4
	addq	$1, -2560(%rbp)
.L2:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2560(%rbp)
	jl	.L5
	movq	$0, -2544(%rbp)
	jmp	.L6
.L16:
	leaq	-2496(%rbp), %rdx
	movl	$0, %eax
	movl	$310, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -2536(%rbp)
	jmp	.L7
.L12:
	movq	$0, -2528(%rbp)
	jmp	.L8
.L11:
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-2536(%rbp), %rax
	imulq	$310, %rax, %rdx
	movq	-2528(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-2496(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -2496(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2528(%rbp)
.L8:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2528(%rbp)
	jl	.L11
.L10:
	addq	$1, -2536(%rbp)
.L7:
	movl	-2568(%rbp), %eax
	cltq
	cmpq	%rax, -2536(%rbp)
	jl	.L12
	movq	$0, -2520(%rbp)
	movq	$1, -2504(%rbp)
	jmp	.L13
.L15:
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	cmpq	%rax, -2520(%rbp)
	jge	.L14
	movq	-2504(%rbp), %rax
	movq	-2496(%rbp,%rax,8), %rax
	movq	%rax, -2520(%rbp)
	movq	-2504(%rbp), %rax
	movq	%rax, -2512(%rbp)
.L14:
	addq	$1, -2504(%rbp)
.L13:
	movl	-2564(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -2504(%rbp)
	jl	.L15
	movq	ans(%rip), %rdx
	movq	-2520(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	-2512(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	$1, (%rdx,%rax)
	addq	$1, -2544(%rbp)
.L6:
	movl	-2564(%rbp), %eax
	cltq
	cmpq	%rax, -2544(%rbp)
	jl	.L16
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
