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>
#include<string.h>
int main(void)
{
	int i,j,k,p;
	int max,len;
	char a[4001],b[4001];
	int la,lb;
	
	while(scanf("%s",a)!=EOF)	{
		scanf("%s",b);
//		printf("%s %s\n",a,b);
		la=strlen(a);
		lb=strlen(b);
		max=0;
		for(i=la-1;i>=0;i--)	{
//			printf("i=%d\n",i);
			
			len=0;
			p=i;
			for(j=0;j<lb;j++)	{

				if(p>=la)	break;
				if(a[p]==b[j])	{
					len++;	
//				printf("j=%d p=%d len=%d\n",j,p,len);		
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		for(j=1;j<lb;j++)	{
			len=0;
			p=j;
			for(i=0;i<la;i++)	{
				if(p>=lb)	break;
				if(a[i]==b[p])	{
					len++;
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L23:
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-8032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8040(%rbp)
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8036(%rbp)
	movl	$0, -8048(%rbp)
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8060(%rbp)
	jmp	.L3
.L12:
	movl	$0, -8044(%rbp)
	movl	-8060(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8056(%rbp)
	jmp	.L4
.L10:
	movl	-8052(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jge	.L26
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8056(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	addl	$1, -8044(%rbp)
	jmp	.L8
.L7:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L9
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L9:
	movl	$0, -8044(%rbp)
.L8:
	addl	$1, -8052(%rbp)
	addl	$1, -8056(%rbp)
.L4:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L10
	jmp	.L6
.L26:
	nop
.L6:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L11
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L11:
	subl	$1, -8060(%rbp)
.L3:
	cmpl	$0, -8060(%rbp)
	jns	.L12
	movl	$1, -8056(%rbp)
	jmp	.L13
.L22:
	movl	$0, -8044(%rbp)
	movl	-8056(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L14
.L20:
	movl	-8052(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jge	.L27
	movl	-8060(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L17
	addl	$1, -8044(%rbp)
	jmp	.L18
.L17:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L19
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L19:
	movl	$0, -8044(%rbp)
.L18:
	addl	$1, -8052(%rbp)
	addl	$1, -8060(%rbp)
.L14:
	movl	-8060(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jl	.L20
	jmp	.L16
.L27:
	nop
.L16:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L21
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L21:
	addl	$1, -8056(%rbp)
.L13:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L22
	movl	-8048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-8032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	4032(%rsp), %rax
	leaq	16(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	4031(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	movq	8(%rsp), %r15
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r15, %rdi
	movq	%rax, %r14
	movl	%eax, %r12d
	call	strlen@PLT
	leal	-1(%r14), %r9d
	movq	%rax, %r15
	movl	%eax, %edi
	testl	%r14d, %r14d
	je	.L17
	testl	%eax, %eax
	movslq	%r9d, %r10
	setle	%r11b
	addq	%rbx, %r10
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%r9d, %r12d
	jle	.L18
	testb	%r11b, %r11b
	jne	.L18
	movl	$1, %eax
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
.L6:
	leal	(%r9,%rax), %esi
	cmpl	%esi, %r12d
	setle	%sil
	cmpl	%eax, %edi
	setle	%r8b
	addq	$1, %rax
	orb	%r8b, %sil
	jne	.L8
.L7:
	movzbl	0(%r13,%rax), %esi
	cmpb	%sil, -1(%r10,%rax)
	jne	.L5
	addl	$1, %ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	subl	$1, %r9d
	subq	$1, %r10
	cmpl	$-1, %r9d
	jne	.L4
.L3:
	cmpq	$1, %r15
	jbe	.L9
	testl	%r14d, %r14d
	movl	$1, %r8d
	leaq	15(%rsp), %r10
	setle	%r11b
	leaq	4033(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r8d, %edi
	jle	.L19
	testb	%r11b, %r11b
	jne	.L19
	movl	$1, %eax
	xorl	%ecx, %ecx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
.L12:
	leal	(%r8,%rax), %esi
	cmpl	%esi, %edi
	setle	%sil
	cmpl	%eax, %r12d
	setle	%r14b
	addq	$1, %rax
	orb	%r14b, %sil
	jne	.L14
.L13:
	movzbl	(%r10,%rax), %esi
	cmpb	%sil, -1(%rax,%r9)
	jne	.L11
	addl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %r8d
	addq	$1, %r9
	cmpl	%r8d, %edi
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L31:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$8056, %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
.L17:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L3
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	4032(%rsp), %rax
	leaq	16(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	4031(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	movq	8(%rsp), %r15
	movq	%rbp, %rdi
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%r15, %rdi
	movq	%rax, %r14
	movl	%eax, %r12d
	call	strlen@PLT
	leal	-1(%r14), %r9d
	movq	%rax, %r15
	movl	%eax, %edi
	testl	%r14d, %r14d
	je	.L17
	testl	%eax, %eax
	movslq	%r9d, %r10
	setle	%r11b
	addq	%rbx, %r10
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpl	%r9d, %r12d
	jle	.L18
	testb	%r11b, %r11b
	jne	.L18
	movl	$1, %eax
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
.L6:
	leal	(%r9,%rax), %esi
	cmpl	%esi, %r12d
	setle	%sil
	cmpl	%eax, %edi
	setle	%r8b
	addq	$1, %rax
	orb	%r8b, %sil
	jne	.L8
.L7:
	movzbl	0(%r13,%rax), %esi
	cmpb	%sil, -1(%r10,%rax)
	jne	.L5
	addl	$1, %ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	subl	$1, %r9d
	subq	$1, %r10
	cmpl	$-1, %r9d
	jne	.L4
.L3:
	cmpq	$1, %r15
	jbe	.L9
	testl	%r14d, %r14d
	movl	$1, %r8d
	leaq	15(%rsp), %r10
	setle	%r11b
	leaq	4033(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r8d, %edi
	jle	.L19
	testb	%r11b, %r11b
	jne	.L19
	movl	$1, %eax
	xorl	%ecx, %ecx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	xorl	%ecx, %ecx
.L12:
	leal	(%r8,%rax), %esi
	cmpl	%esi, %edi
	setle	%sil
	cmpl	%eax, %r12d
	setle	%r14b
	addq	$1, %rax
	orb	%r14b, %sil
	jne	.L14
.L13:
	movzbl	(%r10,%rax), %esi
	cmpb	%sil, -1(%rax,%r9)
	jne	.L11
	addl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %r8d
	addq	$1, %r9
	cmpl	%r8d, %edi
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L31:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$8056, %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
.L17:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L3
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include<string.h>
int main(void)
{
	int i,j,k,p;
	int max,len;
	char a[4001],b[4001];
	int la,lb;
	
	while(scanf("%s",a)!=EOF)	{
		scanf("%s",b);
//		printf("%s %s\n",a,b);
		la=strlen(a);
		lb=strlen(b);
		max=0;
		for(i=la-1;i>=0;i--)	{
//			printf("i=%d\n",i);
			
			len=0;
			p=i;
			for(j=0;j<lb;j++)	{

				if(p>=la)	break;
				if(a[p]==b[j])	{
					len++;	
//				printf("j=%d p=%d len=%d\n",j,p,len);		
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		for(j=1;j<lb;j++)	{
			len=0;
			p=j;
			for(i=0;i<la;i++)	{
				if(p>=lb)	break;
				if(a[i]==b[p])	{
					len++;
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}

Nnne
 ABRACADAARA
ECADADABRBCRDARA
UPWJCIRUCAXIIRGL
SBQNYBSBZDFNEV
 DBRACAAAARA
ECADADBBRBCRDARA
LCRIIXACURIGJWPU
SBQNYBSBZDFOEV
 DBRACAAAARA
ECADADBBRBBRDARA
LCRIIXACURIGJWPU
SBQNYBSBFDZOEU
 DBRACAAA@RA
ECADADBBRBBRDARA
LCRIIXACURIGJWPU
SBQNYBSBFDZOEU
 CARBR@AA?CB
ABRDRBSBAACADACD
LDRTIXAWURIHKCOI
BBDDYRTBDNZOUQ
 AD?BB>ARCBQ
CBBDQARCBEB@ADRA
OVKRMDAESKVVHKXI
ZBARNTWBBCYCOQ
 A>?BR@BQ@BD
BSDACBFQERB@CBBA
IVXVOCJHEAJURKMR
BA@CQXAYNSYTBP
 Nnnd
 ABRACADAARA
ECADADABRBCRDARA
LGRIIXACURICJWPU
SBQNYBSBZDFNEV

0
 4
0
 3
0
 3
1
 2
1
 2
2
 4
1
 1
1
 1
 4
0

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>
#include<string.h>
int main(void)
{
	int i,j,k,p;
	int max,len;
	char a[4001],b[4001];
	int la,lb;
	
	while(scanf("%s",a)!=EOF)	{
		scanf("%s",b);
//		printf("%s %s\n",a,b);
		la=strlen(a);
		lb=strlen(b);
		max=0;
		for(i=la-1;i>=0;i--)	{
//			printf("i=%d\n",i);
			
			len=0;
			p=i;
			for(j=0;j<lb;j++)	{

				if(p>=la)	break;
				if(a[p]==b[j])	{
					len++;	
//				printf("j=%d p=%d len=%d\n",j,p,len);		
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		for(j=1;j<lb;j++)	{
			len=0;
			p=j;
			for(i=0;i<la;i++)	{
				if(p>=lb)	break;
				if(a[i]==b[p])	{
					len++;
				}
				else {
					if(len>max)	{
						max=len;
					}
					len=0;
				}
				p++;
			}
			if(len>=max)	{
				max=len;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L23:
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-8032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8040(%rbp)
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8036(%rbp)
	movl	$0, -8048(%rbp)
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8060(%rbp)
	jmp	.L3
.L12:
	movl	$0, -8044(%rbp)
	movl	-8060(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8056(%rbp)
	jmp	.L4
.L10:
	movl	-8052(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jge	.L26
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8056(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	addl	$1, -8044(%rbp)
	jmp	.L8
.L7:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L9
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L9:
	movl	$0, -8044(%rbp)
.L8:
	addl	$1, -8052(%rbp)
	addl	$1, -8056(%rbp)
.L4:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L10
	jmp	.L6
.L26:
	nop
.L6:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L11
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L11:
	subl	$1, -8060(%rbp)
.L3:
	cmpl	$0, -8060(%rbp)
	jns	.L12
	movl	$1, -8056(%rbp)
	jmp	.L13
.L22:
	movl	$0, -8044(%rbp)
	movl	-8056(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L14
.L20:
	movl	-8052(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jge	.L27
	movl	-8060(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L17
	addl	$1, -8044(%rbp)
	jmp	.L18
.L17:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L19
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L19:
	movl	$0, -8044(%rbp)
.L18:
	addl	$1, -8052(%rbp)
	addl	$1, -8060(%rbp)
.L14:
	movl	-8060(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jl	.L20
	jmp	.L16
.L27:
	nop
.L16:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L21
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L21:
	addl	$1, -8056(%rbp)
.L13:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L22
	movl	-8048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-8032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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	"%s"
.LC1:
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L23:
	leaq	-4016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-8032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8040(%rbp)
	leaq	-4016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -8036(%rbp)
	movl	$0, -8048(%rbp)
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8060(%rbp)
	jmp	.L3
.L12:
	movl	$0, -8044(%rbp)
	movl	-8060(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8056(%rbp)
	jmp	.L4
.L10:
	movl	-8052(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jge	.L26
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8056(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	addl	$1, -8044(%rbp)
	jmp	.L8
.L7:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L9
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L9:
	movl	$0, -8044(%rbp)
.L8:
	addl	$1, -8052(%rbp)
	addl	$1, -8056(%rbp)
.L4:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L10
	jmp	.L6
.L26:
	nop
.L6:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L11
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L11:
	subl	$1, -8060(%rbp)
.L3:
	cmpl	$0, -8060(%rbp)
	jns	.L12
	movl	$1, -8056(%rbp)
	jmp	.L13
.L22:
	movl	$0, -8044(%rbp)
	movl	-8056(%rbp), %eax
	movl	%eax, -8052(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L14
.L20:
	movl	-8052(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jge	.L27
	movl	-8060(%rbp), %eax
	cltq
	movzbl	-8032(%rbp,%rax), %edx
	movl	-8052(%rbp), %eax
	cltq
	movzbl	-4016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L17
	addl	$1, -8044(%rbp)
	jmp	.L18
.L17:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jle	.L19
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L19:
	movl	$0, -8044(%rbp)
.L18:
	addl	$1, -8052(%rbp)
	addl	$1, -8060(%rbp)
.L14:
	movl	-8060(%rbp), %eax
	cmpl	-8040(%rbp), %eax
	jl	.L20
	jmp	.L16
.L27:
	nop
.L16:
	movl	-8044(%rbp), %eax
	cmpl	-8048(%rbp), %eax
	jl	.L21
	movl	-8044(%rbp), %eax
	movl	%eax, -8048(%rbp)
.L21:
	addl	$1, -8056(%rbp)
.L13:
	movl	-8056(%rbp), %eax
	cmpl	-8036(%rbp), %eax
	jl	.L22
	movl	-8048(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-8032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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:
