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>
int main(){
  int n,i,j,k;
  long flag=1;
  char s[301][301];
  long cnt=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n;i++){
    flag=1;
    for(j=0;j<n-1;j++){
      for(k=j+1;k<n;k++){
        if(s[(i+j)%n][k]!=s[(i+k)%n][j]) flag=0;
      }
    }
    cnt+=(long)flag*n;
  }
  printf("%ld\n",cnt);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%ld\n"
	.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
	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	-90112(%rsp), %r11
	.cfi_def_cfa 11, 90168
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$536, %rsp
	.cfi_def_cfa_offset 90704
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 90632(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$301, %rbp
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	leal	-2(%rsi), %ebp
	movslq	%esi, %r15
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	addq	$2, %rbp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %ebx
	movl	$1, %edi
	leal	-1(%r10), %r12d
	cmpl	$1, %esi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rbx), %r9d
	cmpl	%ebx, %esi
	jle	.L5
	leal	(%r12,%rbx), %eax
	movq	%rbx, %rcx
	movslq	%r9d, %r9
	cltd
	idivl	%esi
	movslq	%edx, %r8
	imulq	$301, %r8, %r8
	addq	%r13, %r8
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%r10,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	imulq	$301, %rdx, %rdx
	leaq	90640(%rdx), %rax
	leaq	(%rsp,%rax), %rdx
	movzbl	(%r8,%rcx), %eax
	cmpb	%al, -90624(%rdx,%r9)
	cmovne	%r11, %rdi
	addq	$1, %rcx
	cmpl	%ecx, %esi
	jg	.L7
.L5:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	jne	.L8
.L11:
	imulq	%r15, %rdi
	addl	$1, %r10d
	addq	%rdi, %r14
	cmpl	%r10d, %esi
	jne	.L4
.L9:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	90632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$90648, %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
	xorl	%r14d, %r14d
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%ld\n"
	.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
	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	-90112(%rsp), %r11
	.cfi_def_cfa 11, 90168
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$536, %rsp
	.cfi_def_cfa_offset 90704
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 90632(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$301, %rbp
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	leal	-2(%rsi), %ebp
	movslq	%esi, %r15
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	addq	$2, %rbp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %ebx
	movl	$1, %edi
	leal	-1(%r10), %r12d
	cmpl	$1, %esi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rbx), %r9d
	cmpl	%ebx, %esi
	jle	.L5
	leal	(%r12,%rbx), %eax
	movq	%rbx, %rcx
	movslq	%r9d, %r9
	cltd
	idivl	%esi
	movslq	%edx, %r8
	imulq	$301, %r8, %r8
	addq	%r13, %r8
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%r10,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	imulq	$301, %rdx, %rdx
	leaq	90640(%rdx), %rax
	leaq	(%rsp,%rax), %rdx
	movzbl	(%r8,%rcx), %eax
	cmpb	%al, -90624(%rdx,%r9)
	cmovne	%r11, %rdi
	addq	$1, %rcx
	cmpl	%ecx, %esi
	jg	.L7
.L5:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	jne	.L8
.L11:
	imulq	%r15, %rdi
	addl	$1, %r10d
	addq	%rdi, %r14
	cmpl	%r10d, %esi
	jne	.L4
.L9:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	90632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$90648, %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
	xorl	%r14d, %r14d
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%ld\n"
	.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
	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	-90112(%rsp), %r11
	.cfi_def_cfa 11, 90168
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$536, %rsp
	.cfi_def_cfa_offset 90704
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 90632(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$301, %rbp
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	leal	-2(%rsi), %ebp
	movslq	%esi, %r15
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	addq	$2, %rbp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %ebx
	movl	$1, %edi
	leal	-1(%r10), %r12d
	cmpl	$1, %esi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rbx), %r9d
	cmpl	%ebx, %esi
	jle	.L5
	leal	(%r12,%rbx), %eax
	movq	%rbx, %rcx
	movslq	%r9d, %r9
	cltd
	idivl	%esi
	movslq	%edx, %r8
	imulq	$301, %r8, %r8
	addq	%r13, %r8
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%r10,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	imulq	$301, %rdx, %rdx
	leaq	90640(%rdx), %rax
	leaq	(%rsp,%rax), %rdx
	movzbl	(%r8,%rcx), %eax
	cmpb	%al, -90624(%rdx,%r9)
	cmovne	%r11, %rdi
	addq	$1, %rcx
	cmpl	%ecx, %esi
	jg	.L7
.L5:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	jne	.L8
.L11:
	imulq	%r15, %rdi
	addl	$1, %r10d
	addq	%rdi, %r14
	cmpl	%r10d, %esi
	jne	.L4
.L9:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	90632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$90648, %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
	xorl	%r14d, %r14d
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>
int main(){
  int n,i,j,k;
  long flag=1;
  char s[301][301];
  long cnt=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n;i++){
    flag=1;
    for(j=0;j<n-1;j++){
      for(k=j+1;k<n;k++){
        if(s[(i+j)%n][k]!=s[(i+k)%n][j]) flag=0;
      }
    }
    cnt+=(long)flag*n;
  }
  printf("%ld\n",cnt);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int n,i,j,k;
  long flag=1;
  char s[301][301];
  long cnt=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n;i++){
    flag=1;
    for(j=0;j<n-1;j++){
      for(k=j+1;k<n;k++){
        if(s[(i+j)%n][k]!=s[(i+k)%n][j]) flag=0;
      }
    }
    cnt+=(long)flag*n;
  }
  printf("%ld\n",cnt);
}```

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>
int main(){
  int n,i,j,k;
  long flag=1;
  char s[301][301];
  long cnt=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n;i++){
    flag=1;
    for(j=0;j<n-1;j++){
      for(k=j+1;k<n;k++){
        if(s[(i+j)%n][k]!=s[(i+k)%n][j]) flag=0;
      }
    }
    cnt+=(long)flag*n;
  }
  printf("%ld\n",cnt);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%ld\n"
	.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
	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	-90112(%rsp), %r11
	.cfi_def_cfa 11, 90168
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$536, %rsp
	.cfi_def_cfa_offset 90704
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 90632(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$301, %rbp
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	leal	-2(%rsi), %ebp
	movslq	%esi, %r15
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	addq	$2, %rbp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %ebx
	movl	$1, %edi
	leal	-1(%r10), %r12d
	cmpl	$1, %esi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rbx), %r9d
	cmpl	%ebx, %esi
	jle	.L5
	leal	(%r12,%rbx), %eax
	movq	%rbx, %rcx
	movslq	%r9d, %r9
	cltd
	idivl	%esi
	movslq	%edx, %r8
	imulq	$301, %r8, %r8
	addq	%r13, %r8
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%r10,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	imulq	$301, %rdx, %rdx
	leaq	90640(%rdx), %rax
	leaq	(%rsp,%rax), %rdx
	movzbl	(%r8,%rcx), %eax
	cmpb	%al, -90624(%rdx,%r9)
	cmovne	%r11, %rdi
	addq	$1, %rcx
	cmpl	%ecx, %esi
	jg	.L7
.L5:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	jne	.L8
.L11:
	imulq	%r15, %rdi
	addl	$1, %r10d
	addq	%rdi, %r14
	cmpl	%r10d, %esi
	jne	.L4
.L9:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	90632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$90648, %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
	xorl	%r14d, %r14d
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%ld\n"
	.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
	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	-90112(%rsp), %r11
	.cfi_def_cfa 11, 90168
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$536, %rsp
	.cfi_def_cfa_offset 90704
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 90632(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$301, %rbp
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	leal	-2(%rsi), %ebp
	movslq	%esi, %r15
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	addq	$2, %rbp
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %ebx
	movl	$1, %edi
	leal	-1(%r10), %r12d
	cmpl	$1, %esi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rbx), %r9d
	cmpl	%ebx, %esi
	jle	.L5
	leal	(%r12,%rbx), %eax
	movq	%rbx, %rcx
	movslq	%r9d, %r9
	cltd
	idivl	%esi
	movslq	%edx, %r8
	imulq	$301, %r8, %r8
	addq	%r13, %r8
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%r10,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	imulq	$301, %rdx, %rdx
	leaq	90640(%rdx), %rax
	leaq	(%rsp,%rax), %rdx
	movzbl	(%r8,%rcx), %eax
	cmpb	%al, -90624(%rdx,%r9)
	cmovne	%r11, %rdi
	addq	$1, %rcx
	cmpl	%ecx, %esi
	jg	.L7
.L5:
	addq	$1, %rbx
	cmpq	%rbp, %rbx
	jne	.L8
.L11:
	imulq	%r15, %rdi
	addl	$1, %r10d
	addq	%rdi, %r14
	cmpl	%r10d, %esi
	jne	.L4
.L9:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	90632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$90648, %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
	xorl	%r14d, %r14d
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```