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>

int main(){
  int N,ans=0;
  scanf("%d",&N);
  char S[N+1];
  char T[N+1];
  scanf("%s",S);
  scanf("%s",T);

  int i=N-1;
  int j=i;
  while (i>=0)
  {
    int i=N-1;
    while (j>=0&&S[i]!=T[j])
    {
      j--;
    }
    if(j>=0){
      while (j>=0&&S[i]==T[j]){ i--; j--; }
      if (j<0){
        ans=2*N-(N-i-1);
        break;
      }
    }else
    {
      ans=2*N-(N-i-1);
      break;
    }
  }

  printf("%d",ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -104(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	movl	%eax, -100(%rbp)
	jmp	.L8
.L17:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	subl	$1, -100(%rbp)
.L9:
	cmpl	$0, -100(%rbp)
	js	.L10
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	jne	.L11
.L10:
	cmpl	$0, -100(%rbp)
	js	.L12
	jmp	.L13
.L15:
	subl	$1, -96(%rbp)
	subl	$1, -100(%rbp)
.L13:
	cmpl	$0, -100(%rbp)
	js	.L14
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	je	.L15
.L14:
	cmpl	$0, -100(%rbp)
	jns	.L8
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L12:
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L8:
	cmpl	$0, -92(%rbp)
	jns	.L17
.L16:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	pushq	%r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$16, %rsp
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	movq	%rsp, %rcx
	addl	$1, %eax
	cltq
	addq	$15, %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
	cmpq	%rcx, %rsp
	je	.L3
.L30:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L30
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L31
.L4:
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	movq	%rsp, %r13
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L31:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L32
.L7:
	leaq	.LC1(%rip), %r14
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %r11d
	leal	-1(%r11), %r9d
	movl	%r9d, %ecx
	testl	%r9d, %r9d
	js	.L16
	movslq	%r9d, %rsi
	movslq	%r11d, %r10
	movzbl	0(%r13,%rsi), %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %rsi
	movq	%rsi, %rcx
.L9:
	leal	-1(%rcx), %edx
	cmpb	(%rbx,%rsi), %dil
	je	.L33
.L11:
	cmpl	$-1, %edx
	jne	.L34
	leal	(%r11,%r11), %edx
.L8:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L35
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movslq	%edx, %rax
	movq	%r10, %rdx
	movl	%r9d, %r8d
	subq	%rsi, %rdx
	subl	%ecx, %r8d
	leaq	0(%r13,%rdx), %rsi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L36:
	movzbl	-1(%rsi,%rax), %ecx
	subq	$1, %rax
	cmpb	1(%rbx,%rax), %cl
	jne	.L11
.L13:
	leal	(%r8,%rax), %ecx
	movl	%eax, %edx
	cmpl	$-1, %eax
	jne	.L36
	leal	1(%rcx,%r11), %edx
	jmp	.L8
.L32:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L16:
	xorl	%edx, %edx
	jmp	.L8
.L35:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	pushq	%r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$16, %rsp
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	movq	%rsp, %rcx
	addl	$1, %eax
	cltq
	addq	$15, %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
	cmpq	%rcx, %rsp
	je	.L3
.L30:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L30
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L31
.L4:
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	movq	%rsp, %r13
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L31:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L32
.L7:
	leaq	.LC1(%rip), %r14
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %r11d
	leal	-1(%r11), %r9d
	movl	%r9d, %ecx
	testl	%r9d, %r9d
	js	.L16
	movslq	%r9d, %rsi
	movslq	%r11d, %r10
	movzbl	0(%r13,%rsi), %edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %rsi
	movq	%rsi, %rcx
.L9:
	leal	-1(%rcx), %edx
	cmpb	(%rbx,%rsi), %dil
	je	.L33
.L11:
	cmpl	$-1, %edx
	jne	.L34
	leal	(%r11,%r11), %edx
.L8:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L35
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movslq	%edx, %rax
	movq	%r10, %rdx
	movl	%r9d, %r8d
	subq	%rsi, %rdx
	subl	%ecx, %r8d
	leaq	0(%r13,%rdx), %rsi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L36:
	movzbl	-1(%rsi,%rax), %ecx
	subq	$1, %rax
	cmpb	1(%rbx,%rax), %cl
	jne	.L11
.L13:
	leal	(%r8,%rax), %ecx
	movl	%eax, %edx
	cmpl	$-1, %eax
	jne	.L36
	leal	1(%rcx,%r11), %edx
	jmp	.L8
.L32:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L16:
	xorl	%edx, %edx
	jmp	.L8
.L35:
	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:

#include<stdio.h>

int main(){
  int N,ans=0;
  scanf("%d",&N);
  char S[N+1];
  char T[N+1];
  scanf("%s",S);
  scanf("%s",T);

  int i=N-1;
  int j=i;
  while (i>=0)
  {
    int i=N-1;
    while (j>=0&&S[i]!=T[j])
    {
      j--;
    }
    if(j>=0){
      while (j>=0&&S[i]==T[j]){ i--; j--; }
      if (j<0){
        ans=2*N-(N-i-1);
        break;
      }
    }else
    {
      ans=2*N-(N-i-1);
      break;
    }
  }

  printf("%d",ans);

  return 0;
}
3
abc
cce
 1
a
{
 4
expr
expq
 3
cba
cec
 4
expr
rxep
 3
abc
cec
 1
`
z
 4
expr
epxq
 1
`
{
 4
expr
pexq

5 2 8 6 7 5 2 8 2 8
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>

int main(){
  int N,ans=0;
  scanf("%d",&N);
  char S[N+1];
  char T[N+1];
  scanf("%s",S);
  scanf("%s",T);

  int i=N-1;
  int j=i;
  while (i>=0)
  {
    int i=N-1;
    while (j>=0&&S[i]!=T[j])
    {
      j--;
    }
    if(j>=0){
      while (j>=0&&S[i]==T[j]){ i--; j--; }
      if (j<0){
        ans=2*N-(N-i-1);
        break;
      }
    }else
    {
      ans=2*N-(N-i-1);
      break;
    }
  }

  printf("%d",ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -104(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	movl	%eax, -100(%rbp)
	jmp	.L8
.L17:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	subl	$1, -100(%rbp)
.L9:
	cmpl	$0, -100(%rbp)
	js	.L10
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	jne	.L11
.L10:
	cmpl	$0, -100(%rbp)
	js	.L12
	jmp	.L13
.L15:
	subl	$1, -96(%rbp)
	subl	$1, -100(%rbp)
.L13:
	cmpl	$0, -100(%rbp)
	js	.L14
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	je	.L15
.L14:
	cmpl	$0, -100(%rbp)
	jns	.L8
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L12:
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L8:
	cmpl	$0, -92(%rbp)
	jns	.L17
.L16:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d"
.LC1:
	.string	"%s"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -104(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -92(%rbp)
	movl	-92(%rbp), %eax
	movl	%eax, -100(%rbp)
	jmp	.L8
.L17:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	subl	$1, -100(%rbp)
.L9:
	cmpl	$0, -100(%rbp)
	js	.L10
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	jne	.L11
.L10:
	cmpl	$0, -100(%rbp)
	js	.L12
	jmp	.L13
.L15:
	subl	$1, -96(%rbp)
	subl	$1, -100(%rbp)
.L13:
	cmpl	$0, -100(%rbp)
	js	.L14
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %ecx
	movq	-64(%rbp), %rdx
	movl	-100(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, %cl
	je	.L15
.L14:
	cmpl	$0, -100(%rbp)
	jns	.L8
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L12:
	movl	-108(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-108(%rbp), %eax
	subl	-96(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -104(%rbp)
	jmp	.L16
.L8:
	cmpl	$0, -92(%rbp)
	jns	.L17
.L16:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
