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,i,ans,k=0;
		char s[101],t[101];
		scanf("%d",&n);
		ans=n*2;
		scanf("%s",s);
		scanf("%s",t);
		for(i=0;i<n;i++){
				int j;
				for(j=n-i-1;j<n;j++){
						if(s[j]!=t[j-n+i+1])break;
				}
				if(j==n)k=i+1;
		}
		printf("%d\n",ans-k);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	leaq	-244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-244(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -228(%rbp)
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -240(%rbp)
	jmp	.L2
.L8:
	movl	-244(%rbp), %eax
	subl	-240(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -232(%rbp)
	jmp	.L3
.L6:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-244(%rbp), %ecx
	movl	-232(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %esi
	movl	-240(%rbp), %eax
	addl	%esi, %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L11
	addl	$1, -232(%rbp)
.L3:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L6
	jmp	.L5
.L11:
	nop
.L5:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jne	.L7
	movl	-240(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
.L7:
	addl	$1, -240(%rbp)
.L2:
	movl	-244(%rbp), %eax
	cmpl	%eax, -240(%rbp)
	jl	.L8
	movl	-228(%rbp), %eax
	subl	-236(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$248, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	128(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	leal	(%rax,%rax), %ebp
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movslq	%ecx, %rax
	leal	-1(%rcx), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	notq	%rax
	leaq	(%rbx,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%edi, %edx
	cmpl	%ecx, %edi
	jge	.L3
	movslq	%edi, %rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	leal	1(%rax), %edx
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L3
.L4:
	movzbl	2(%rsi,%rax), %ebx
	movl	%eax, %edx
	cmpb	%bl, (%r12,%rax)
	je	.L14
.L3:
	addl	$1, %r8d
	subl	$1, %edi
	addq	$1, %rsi
	cmpl	%edx, %ecx
	je	.L5
	cmpl	%r8d, %ecx
	jne	.L7
.L2:
	movl	%ebp, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	subl	%r9d, %edx
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmpl	%r8d, %ecx
	je	.L10
	movl	%r8d, %r9d
	jmp	.L7
.L10:
	movl	%ecx, %r9d
	jmp	.L2
.L9:
	xorl	%r9d, %r9d
	jmp	.L2
.L15:
	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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$248, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	leaq	128(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%r12, %rsi
	movq	%r13, %rdi
	leal	(%rax,%rax), %ebp
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movslq	%ecx, %rax
	leal	-1(%rcx), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	notq	%rax
	leaq	(%rbx,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%edi, %edx
	cmpl	%ecx, %edi
	jge	.L3
	movslq	%edi, %rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	leal	1(%rax), %edx
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L3
.L4:
	movzbl	2(%rsi,%rax), %ebx
	movl	%eax, %edx
	cmpb	%bl, (%r12,%rax)
	je	.L14
.L3:
	addl	$1, %r8d
	subl	$1, %edi
	addq	$1, %rsi
	cmpl	%edx, %ecx
	je	.L5
	cmpl	%r8d, %ecx
	jne	.L7
.L2:
	movl	%ebp, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	subl	%r9d, %edx
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmpl	%r8d, %ecx
	je	.L10
	movl	%r8d, %r9d
	jmp	.L7
.L10:
	movl	%ecx, %r9d
	jmp	.L2
.L9:
	xorl	%r9d, %r9d
	jmp	.L2
.L15:
	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,i,ans,k=0;
		char s[101],t[101];
		scanf("%d",&n);
		ans=n*2;
		scanf("%s",s);
		scanf("%s",t);
		for(i=0;i<n;i++){
				int j;
				for(j=n-i-1;j<n;j++){
						if(s[j]!=t[j-n+i+1])break;
				}
				if(j==n)k=i+1;
		}
		printf("%d\n",ans-k);
		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,i,ans,k=0;
		char s[101],t[101];
		scanf("%d",&n);
		ans=n*2;
		scanf("%s",s);
		scanf("%s",t);
		for(i=0;i<n;i++){
				int j;
				for(j=n-i-1;j<n;j++){
						if(s[j]!=t[j-n+i+1])break;
				}
				if(j==n)k=i+1;
		}
		printf("%d\n",ans-k);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	leaq	-244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-244(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -228(%rbp)
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -240(%rbp)
	jmp	.L2
.L8:
	movl	-244(%rbp), %eax
	subl	-240(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -232(%rbp)
	jmp	.L3
.L6:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-244(%rbp), %ecx
	movl	-232(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %esi
	movl	-240(%rbp), %eax
	addl	%esi, %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L11
	addl	$1, -232(%rbp)
.L3:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L6
	jmp	.L5
.L11:
	nop
.L5:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jne	.L7
	movl	-240(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
.L7:
	addl	$1, -240(%rbp)
.L2:
	movl	-244(%rbp), %eax
	cmpl	%eax, -240(%rbp)
	jl	.L8
	movl	-228(%rbp), %eax
	subl	-236(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	leaq	-244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-244(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -228(%rbp)
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -240(%rbp)
	jmp	.L2
.L8:
	movl	-244(%rbp), %eax
	subl	-240(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -232(%rbp)
	jmp	.L3
.L6:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-244(%rbp), %ecx
	movl	-232(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %esi
	movl	-240(%rbp), %eax
	addl	%esi, %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L11
	addl	$1, -232(%rbp)
.L3:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L6
	jmp	.L5
.L11:
	nop
.L5:
	movl	-244(%rbp), %eax
	cmpl	%eax, -232(%rbp)
	jne	.L7
	movl	-240(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
.L7:
	addl	$1, -240(%rbp)
.L2:
	movl	-244(%rbp), %eax
	cmpl	%eax, -240(%rbp)
	jl	.L8
	movl	-228(%rbp), %eax
	subl	-236(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
