Given the following C code and 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 ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)

char s[300][300];
ll ans;
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n)scanf("%s",s[i]);
	rep(a,0,n){
		int flag=1;
		rep(i,0,n)rep(j,0,n)if(s[(a+i)%n][+j]!=s[(a+j)%n][i])flag=0;
		if(flag)ans+=n;
	}
	printf("%lld\n",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	ans(%rip), %r14
	testl	%eax, %eax
	jle	.L3
	leaq	s(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$300, %r12
	cmpq	%rbp, %rsi
	jg	.L4
	movq	ans(%rip), %r14
	movq	%r14, %r12
	testq	%rsi, %rsi
	jle	.L3
	movq	%rsi, %r10
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%r9d, %r9d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%r9,%rbp), %rax
	movq	%rbp, %rcx
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	subq	%rbp, %rdx
	leaq	(%rbx,%rdx), %r8
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	addq	%rbx, %rdx
	movzbl	(%rdx,%r9), %eax
	cmpb	%al, (%r8,%rcx)
	cmovne	%r11d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L8
	leaq	1(%r9), %rax
	cmpq	%rax, %rsi
	je	.L26
	movq	%rax, %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	je	.L10
	addq	%rsi, %r12
	movl	$1, %r13d
.L10:
	leaq	1(%rbp), %rax
	addq	$1, %r10
	cmpq	%r9, %rbp
	je	.L11
	movq	%rax, %rbp
	jmp	.L6
.L11:
	testb	%r13b, %r13b
	je	.L3
	movq	%r12, ans(%rip)
	movq	%r12, %r14
.L3:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 90000
s:
	.zero	90000
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	ans(%rip), %r14
	testl	%eax, %eax
	jle	.L3
	leaq	s(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$300, %r12
	cmpq	%rbp, %rsi
	jg	.L4
	movq	ans(%rip), %r14
	movq	%r14, %r12
	testq	%rsi, %rsi
	jle	.L3
	movq	%rsi, %r10
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%r9d, %r9d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%r9,%rbp), %rax
	movq	%rbp, %rcx
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	subq	%rbp, %rdx
	leaq	(%rbx,%rdx), %r8
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	addq	%rbx, %rdx
	movzbl	(%rdx,%r9), %eax
	cmpb	%al, (%r8,%rcx)
	cmovne	%r11d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L8
	leaq	1(%r9), %rax
	cmpq	%rax, %rsi
	je	.L26
	movq	%rax, %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	je	.L10
	addq	%rsi, %r12
	movl	$1, %r13d
.L10:
	leaq	1(%rbp), %rax
	addq	$1, %r10
	cmpq	%r9, %rbp
	je	.L11
	movq	%rax, %rbp
	jmp	.L6
.L11:
	testb	%r13b, %r13b
	je	.L3
	movq	%r12, ans(%rip)
	movq	%r12, %r14
.L3:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 90000
s:
	.zero	90000
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	ans(%rip), %r14
	testl	%eax, %eax
	jle	.L3
	leaq	s(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$300, %r12
	cmpq	%rbp, %rsi
	jg	.L4
	movq	ans(%rip), %r14
	movq	%r14, %r12
	testq	%rsi, %rsi
	jle	.L3
	movq	%rsi, %r10
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%r9d, %r9d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%r9,%rbp), %rax
	movq	%rbp, %rcx
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	subq	%rbp, %rdx
	leaq	(%rbx,%rdx), %r8
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	addq	%rbx, %rdx
	movzbl	(%rdx,%r9), %eax
	cmpb	%al, (%r8,%rcx)
	cmovne	%r11d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L8
	leaq	1(%r9), %rax
	cmpq	%rax, %rsi
	je	.L26
	movq	%rax, %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	je	.L10
	addq	%rsi, %r12
	movl	$1, %r13d
.L10:
	leaq	1(%rbp), %rax
	addq	$1, %r10
	cmpq	%r9, %rbp
	je	.L11
	movq	%rax, %rbp
	jmp	.L6
.L11:
	testb	%r13b, %r13b
	je	.L3
	movq	%r12, ans(%rip)
	movq	%r12, %r14
.L3:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 90000
s:
	.zero	90000
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)

char s[300][300];
ll ans;
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n)scanf("%s",s[i]);
	rep(a,0,n){
		int flag=1;
		rep(i,0,n)rep(j,0,n)if(s[(a+i)%n][+j]!=s[(a+j)%n][i])flag=0;
		if(flag)ans+=n;
	}
	printf("%lld\n",ans);
	return 0;
}```
Given the following C 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 ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)

char s[300][300];
ll ans;
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n)scanf("%s",s[i]);
	rep(a,0,n){
		int flag=1;
		rep(i,0,n)rep(j,0,n)if(s[(a+i)%n][+j]!=s[(a+j)%n][i])flag=0;
		if(flag)ans+=n;
	}
	printf("%lld\n",ans);
	return 0;
}```

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.
Optimized Assembly Code:

2
ab
da
 5
abcde
fghij
klmno
pqrst
uvvxy
 4
aaaa
aaaa
aaaa
baaa
 2
ab
ad
 5
abcde
fghij
onmlk
pqrst
uvwxy
 4
baaa
aaaa
aaaa
baaa
 2
ab
ac
 5
edcba
fghij
onmlk
pqrst
uvwxy
 4
baaa
aaa`
aaaa
baaa
 2
ba
ca

2
 0
 4
 0
 0
 0
 0
 0
 0
 0

Given the following C code and 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 ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)

char s[300][300];
ll ans;
int main(){
	int n;
	scanf("%d",&n);
	rep(i,0,n)scanf("%s",s[i]);
	rep(a,0,n){
		int flag=1;
		rep(i,0,n)rep(j,0,n)if(s[(a+i)%n][+j]!=s[(a+j)%n][i])flag=0;
		if(flag)ans+=n;
	}
	printf("%lld\n",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	ans(%rip), %r14
	testl	%eax, %eax
	jle	.L3
	leaq	s(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$300, %r12
	cmpq	%rbp, %rsi
	jg	.L4
	movq	ans(%rip), %r14
	movq	%r14, %r12
	testq	%rsi, %rsi
	jle	.L3
	movq	%rsi, %r10
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%r9d, %r9d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%r9,%rbp), %rax
	movq	%rbp, %rcx
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	subq	%rbp, %rdx
	leaq	(%rbx,%rdx), %r8
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	addq	%rbx, %rdx
	movzbl	(%rdx,%r9), %eax
	cmpb	%al, (%r8,%rcx)
	cmovne	%r11d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L8
	leaq	1(%r9), %rax
	cmpq	%rax, %rsi
	je	.L26
	movq	%rax, %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	je	.L10
	addq	%rsi, %r12
	movl	$1, %r13d
.L10:
	leaq	1(%rbp), %rax
	addq	$1, %r10
	cmpq	%r9, %rbp
	je	.L11
	movq	%rax, %rbp
	jmp	.L6
.L11:
	testb	%r13b, %r13b
	je	.L3
	movq	%r12, ans(%rip)
	movq	%r12, %r14
.L3:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 90000
s:
	.zero	90000
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	ans(%rip), %r14
	testl	%eax, %eax
	jle	.L3
	leaq	s(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$300, %r12
	cmpq	%rbp, %rsi
	jg	.L4
	movq	ans(%rip), %r14
	movq	%r14, %r12
	testq	%rsi, %rsi
	jle	.L3
	movq	%rsi, %r10
	xorl	%r13d, %r13d
	xorl	%ebp, %ebp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%r9d, %r9d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	(%r9,%rbp), %rax
	movq	%rbp, %rcx
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	subq	%rbp, %rdx
	leaq	(%rbx,%rdx), %r8
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	imulq	$300, %rdx, %rdx
	addq	%rbx, %rdx
	movzbl	(%rdx,%r9), %eax
	cmpb	%al, (%r8,%rcx)
	cmovne	%r11d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L8
	leaq	1(%r9), %rax
	cmpq	%rax, %rsi
	je	.L26
	movq	%rax, %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%edi, %edi
	je	.L10
	addq	%rsi, %r12
	movl	$1, %r13d
.L10:
	leaq	1(%rbp), %rax
	addq	$1, %r10
	cmpq	%r9, %rbp
	je	.L11
	movq	%rax, %rbp
	jmp	.L6
.L11:
	testb	%r13b, %r13b
	je	.L3
	movq	%r12, ans(%rip)
	movq	%r12, %r14
.L3:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 90000
s:
	.zero	90000
	.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:
```