Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 2035
  Title:It Prefokery Pio
  @kankichi573
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define MAXLEN 2000

char a[MAXLEN+1],b[MAXLEN+1];
int lcs[MAXLEN+1][MAXLEN+1];
int lena,lenb;
char answer[MAXLEN+1];
int anslen;

void print_lcs(char a[],char b[],int lcs[][MAXLEN+1],int i,int j)
{
  if(i==0 || j==0)
    return;
  if(a[i-1]==b[j-1])
    {
      print_lcs(a,b,lcs,i-1,j-1);
      answer[anslen]=a[i-1];
      anslen++;
    }
  else if(lcs[i-1][j]>=lcs[i][j-1])
    print_lcs(a,b,lcs,i-1,j);
  else
    print_lcs(a,b,lcs,i,j-1);
}
void strreverse(char a[],char b[],int len)
{
  int i;
  b[lena]='\0';
  for(i=0;i<len;i++)
    b[i]=a[len-1-i];
}
main()
{
  int i,j;
  while(EOF!=scanf("%s",a))
    {
      memset(answer,0,sizeof(answer));
      lena=lenb=strlen(a);
      strreverse(a,b,lena);
      
      for(i=0;i<=lena;i++)
	lcs[i][0]=0;
      for(i=0;i<=lena;i++)
	lcs[0][i]=0;
      for(i=0;i<lena;i++)
	for(j=0;j<lenb;j++)
	  {
	    if(a[i]==b[j])
	      lcs[i+1][j+1]=lcs[i][j]+1;
	    else
	      lcs[i+1][j+1]=max(lcs[i][j+1],lcs[i+1][j]);
	  }
      anslen=0;
      print_lcs(a,b,lcs,lena,lenb);
      answer[anslen+1]='\0';
      printf("%s\n",answer);
    }
      return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 2001
a:
	.zero	2001
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 2001
b:
	.zero	2001
	.globl	lcs
	.align 32
	.type	lcs, @object
	.size	lcs, 16016004
lcs:
	.zero	16016004
	.globl	lena
	.align 4
	.type	lena, @object
	.size	lena, 4
lena:
	.zero	4
	.globl	lenb
	.align 4
	.type	lenb, @object
	.size	lenb, 4
lenb:
	.zero	4
	.globl	answer
	.align 32
	.type	answer, @object
	.size	answer, 2001
answer:
	.zero	2001
	.globl	anslen
	.align 4
	.type	anslen, @object
	.size	anslen, 4
anslen:
	.zero	4
	.text
	.globl	print_lcs
	.type	print_lcs, @function
print_lcs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movl	%ecx, -28(%rbp)
	movl	%r8d, -32(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L7
	cmpl	$0, -32(%rbp)
	je	.L7
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	anslen(%rip), %eax
	movzbl	(%rdx), %edx
	cltq
	leaq	answer(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	anslen(%rip), %eax
	addl	$1, %eax
	movl	%eax, anslen(%rip)
	jmp	.L1
.L5:
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	-8004(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rax, %rcx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	(%rcx,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L6
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-32(%rbp), %edi
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L6:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_lcs, .-print_lcs
	.globl	strreverse
	.type	strreverse, @function
strreverse:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	lena(%rip), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	strreverse, .-strreverse
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L12
.L23:
	movl	$2001, %edx
	movl	$0, %esi
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, lenb(%rip)
	movl	lenb(%rip), %eax
	movl	%eax, lena(%rip)
	movl	lena(%rip), %eax
	movl	%eax, %edx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strreverse
	movl	$0, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	lcs(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L13:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L15:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L22:
	movl	$0, -4(%rbp)
	jmp	.L18
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	b(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jne	.L19
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	leal	1(%rdx), %esi
	movl	-4(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	movslq	%esi, %rax
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L20
.L19:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	lcs(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-8(%rbp), %ecx
	leal	1(%rcx), %esi
	movl	-4(%rbp), %ecx
	addl	$1, %ecx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movslq	%ecx, %rcx
	movslq	%esi, %rdx
	imulq	$2001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lcs(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -4(%rbp)
.L18:
	movl	lenb(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	addl	$1, -8(%rbp)
.L17:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
	movl	$0, anslen(%rip)
	movl	lenb(%rip), %edx
	movl	lena(%rip), %eax
	movl	%edx, %r8d
	movl	%eax, %ecx
	leaq	lcs(%rip), %rax
	movq	%rax, %rdx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	print_lcs
	movl	anslen(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	answer(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L12:
	leaq	a(%rip), %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
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.p2align 4
	.globl	print_lcs
	.type	print_lcs, @function
print_lcs:
.LFB51:
	.cfi_startproc
	endbr64
	movslq	%ecx, %rax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdx, %r12
	imulq	$8004, %rax, %rdx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1(%r10,%rax), %rbx
	leaq	-8004(%r12,%rdx), %rdi
.L5:
	testl	%ecx, %ecx
	leaq	8004(%rdi), %r11
	movslq	%r8d, %rax
	sete	%r9b
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rdi,%rax,4), %edx
	subq	$1, %rax
	cmpl	(%r11,%rax,4), %edx
	jge	.L9
.L4:
	movl	%eax, %edx
	movl	%eax, %r8d
	testl	%eax, %eax
	je	.L1
	testb	%r9b, %r9b
	jne	.L1
	movzbl	-1(%rsi,%rax), %r14d
	subl	$1, %edx
	cmpb	%r14b, (%rbx)
	jne	.L3
	subl	$1, %ecx
	movl	%edx, %r8d
	movq	%r10, %rdi
	movq	%r12, %rdx
	call	print_lcs
	movslq	anslen(%rip), %rdx
	movzbl	(%rbx), %esi
	leaq	answer(%rip), %rcx
	movq	%rdx, %rax
	movb	%sil, (%rcx,%rdx)
	addl	$1, %eax
	movl	%eax, anslen(%rip)
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	subl	$1, %ecx
	subq	$8004, %rdi
	subq	$1, %rbx
	jmp	.L5
	.cfi_endproc
.LFE51:
	.size	print_lcs, .-print_lcs
	.p2align 4
	.globl	strreverse
	.type	strreverse, @function
strreverse:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	lena(%rip), %rax
	movb	$0, (%rsi,%rax)
	testl	%edx, %edx
	jle	.L10
	leal	-1(%rdx), %r8d
	movslq	%edx, %rdx
	movslq	%r8d, %rax
	leaq	-2(%rdi,%rdx), %rcx
	movl	%r8d, %r8d
	addq	%rdi, %rax
	subq	%r8, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movzbl	(%rax), %edx
	subq	$1, %rax
	addq	$1, %rsi
	movb	%dl, -1(%rsi)
	cmpq	%rcx, %rax
	jne	.L12
.L10:
	ret
	.cfi_endproc
.LFE52:
	.size	strreverse, .-strreverse
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	answer(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L46
	xorl	%eax, %eax
	movl	$250, %ecx
	movq	%rbp, %rdi
	rep stosq
	movb	$0, (%rdi)
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, lenb(%rip)
	movq	%rax, %r8
	movl	%eax, %r10d
	movl	%eax, lena(%rip)
	movb	$0, (%r12,%rax)
	testq	%rax, %rax
	je	.L20
	leal	-1(%rax), %ecx
	leaq	b(%rip), %rax
	movslq	%ecx, %rdx
	leaq	1(%rax), %rdi
	movl	%ecx, %ecx
	addq	%rbx, %rdx
	leaq	(%rcx,%rdi), %rsi
	.p2align 4,,10
	.p2align 3
.L19:
	movzbl	(%rdx), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%cl, -1(%rax)
	cmpq	%rsi, %rax
	jne	.L19
.L20:
	leaq	lcs(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %eax
	movl	$0, (%rdx)
	addq	$8004, %rdx
	cmpl	%eax, %r10d
	jge	.L18
	movl	$4, %edx
	leaq	4(,%r8,4), %rax
	testl	%r8d, %r8d
	cmovs	%rdx, %rax
	leaq	lcs(%rip), %rdi
	movl	%eax, %edx
	cmpl	$8, %eax
	jb	.L21
	shrl	$3, %eax
	movl	%eax, %ecx
	xorl	%eax, %eax
	rep stosq
.L21:
	andl	$4, %edx
	je	.L24
	movl	$0, (%rdi)
.L24:
	testl	%r8d, %r8d
	je	.L25
	leaq	a(%rip), %r13
	leal	-1(%r8), %r9d
	leaq	1(%r13), %r14
	leaq	1+b(%rip), %rax
	addq	%r9, %r14
	leaq	8008+lcs(%rip), %r11
	addq	%rax, %r9
	.p2align 4,,10
	.p2align 3
.L26:
	movzbl	0(%r13), %edi
	leaq	b(%rip), %rax
	leaq	-8008(%r11), %rsi
	movq	%r11, %rdx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rdx), %ecx
	movl	4(%rsi), %r15d
	cmpl	%r15d, %ecx
	cmovl	%r15d, %ecx
.L45:
	addq	$1, %rax
	movl	%ecx, (%rdx)
	addq	$4, %rsi
	addq	$4, %rdx
	cmpq	%rax, %r9
	je	.L47
.L30:
	cmpb	(%rax), %dil
	jne	.L27
	movl	(%rsi), %ecx
	addl	$1, %ecx
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$1, %r13
	addq	$8004, %r11
	cmpq	%r14, %r13
	jne	.L26
.L25:
	movq	%rbx, %rdi
	movl	%r10d, %ecx
	leaq	lcs(%rip), %rdx
	movq	%r12, %rsi
	movl	$0, anslen(%rip)
	call	print_lcs
	movl	anslen(%rip), %eax
	movq	%rbp, %rdi
	addl	$1, %eax
	cltq
	movb	$0, 0(%rbp,%rax)
	call	puts@PLT
	jmp	.L16
.L46:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	anslen
	.bss
	.align 4
	.type	anslen, @object
	.size	anslen, 4
anslen:
	.zero	4
	.globl	answer
	.align 32
	.type	answer, @object
	.size	answer, 2001
answer:
	.zero	2001
	.globl	lenb
	.align 4
	.type	lenb, @object
	.size	lenb, 4
lenb:
	.zero	4
	.globl	lena
	.align 4
	.type	lena, @object
	.size	lena, 4
lena:
	.zero	4
	.globl	lcs
	.align 32
	.type	lcs, @object
	.size	lcs, 16016004
lcs:
	.zero	16016004
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 2001
b:
	.zero	2001
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 2001
a:
	.zero	2001
	.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
	.p2align 4
	.globl	print_lcs
	.type	print_lcs, @function
print_lcs:
.LFB51:
	.cfi_startproc
	endbr64
	movslq	%ecx, %rax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r10
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdx, %r12
	imulq	$8004, %rax, %rdx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1(%r10,%rax), %rbx
	leaq	-8004(%r12,%rdx), %rdi
.L5:
	testl	%ecx, %ecx
	leaq	8004(%rdi), %r11
	movslq	%r8d, %rax
	sete	%r9b
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rdi,%rax,4), %edx
	subq	$1, %rax
	cmpl	(%r11,%rax,4), %edx
	jge	.L9
.L4:
	movl	%eax, %edx
	movl	%eax, %r8d
	testl	%eax, %eax
	je	.L1
	testb	%r9b, %r9b
	jne	.L1
	movzbl	-1(%rsi,%rax), %r14d
	subl	$1, %edx
	cmpb	%r14b, (%rbx)
	jne	.L3
	subl	$1, %ecx
	movl	%edx, %r8d
	movq	%r10, %rdi
	movq	%r12, %rdx
	call	print_lcs
	movslq	anslen(%rip), %rdx
	movzbl	(%rbx), %esi
	leaq	answer(%rip), %rcx
	movq	%rdx, %rax
	movb	%sil, (%rcx,%rdx)
	addl	$1, %eax
	movl	%eax, anslen(%rip)
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	subl	$1, %ecx
	subq	$8004, %rdi
	subq	$1, %rbx
	jmp	.L5
	.cfi_endproc
.LFE51:
	.size	print_lcs, .-print_lcs
	.p2align 4
	.globl	strreverse
	.type	strreverse, @function
strreverse:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	lena(%rip), %rax
	movb	$0, (%rsi,%rax)
	testl	%edx, %edx
	jle	.L10
	leal	-1(%rdx), %r8d
	movslq	%edx, %rdx
	movslq	%r8d, %rax
	leaq	-2(%rdi,%rdx), %rcx
	movl	%r8d, %r8d
	addq	%rdi, %rax
	subq	%r8, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movzbl	(%rax), %edx
	subq	$1, %rax
	addq	$1, %rsi
	movb	%dl, -1(%rsi)
	cmpq	%rcx, %rax
	jne	.L12
.L10:
	ret
	.cfi_endproc
.LFE52:
	.size	strreverse, .-strreverse
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	answer(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L46
	xorl	%eax, %eax
	movl	$250, %ecx
	movq	%rbp, %rdi
	rep stosq
	movb	$0, (%rdi)
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, lenb(%rip)
	movq	%rax, %r8
	movl	%eax, %r10d
	movl	%eax, lena(%rip)
	movb	$0, (%r12,%rax)
	testq	%rax, %rax
	je	.L20
	leal	-1(%rax), %ecx
	leaq	b(%rip), %rax
	movslq	%ecx, %rdx
	leaq	1(%rax), %rdi
	movl	%ecx, %ecx
	addq	%rbx, %rdx
	leaq	(%rcx,%rdi), %rsi
	.p2align 4,,10
	.p2align 3
.L19:
	movzbl	(%rdx), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%cl, -1(%rax)
	cmpq	%rsi, %rax
	jne	.L19
.L20:
	leaq	lcs(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %eax
	movl	$0, (%rdx)
	addq	$8004, %rdx
	cmpl	%eax, %r10d
	jge	.L18
	movl	$4, %edx
	leaq	4(,%r8,4), %rax
	testl	%r8d, %r8d
	cmovs	%rdx, %rax
	leaq	lcs(%rip), %rdi
	movl	%eax, %edx
	cmpl	$8, %eax
	jb	.L21
	shrl	$3, %eax
	movl	%eax, %ecx
	xorl	%eax, %eax
	rep stosq
.L21:
	andl	$4, %edx
	je	.L24
	movl	$0, (%rdi)
.L24:
	testl	%r8d, %r8d
	je	.L25
	leaq	a(%rip), %r13
	leal	-1(%r8), %r9d
	leaq	1(%r13), %r14
	leaq	1+b(%rip), %rax
	addq	%r9, %r14
	leaq	8008+lcs(%rip), %r11
	addq	%rax, %r9
	.p2align 4,,10
	.p2align 3
.L26:
	movzbl	0(%r13), %edi
	leaq	b(%rip), %rax
	leaq	-8008(%r11), %rsi
	movq	%r11, %rdx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rdx), %ecx
	movl	4(%rsi), %r15d
	cmpl	%r15d, %ecx
	cmovl	%r15d, %ecx
.L45:
	addq	$1, %rax
	movl	%ecx, (%rdx)
	addq	$4, %rsi
	addq	$4, %rdx
	cmpq	%rax, %r9
	je	.L47
.L30:
	cmpb	(%rax), %dil
	jne	.L27
	movl	(%rsi), %ecx
	addl	$1, %ecx
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$1, %r13
	addq	$8004, %r11
	cmpq	%r14, %r13
	jne	.L26
.L25:
	movq	%rbx, %rdi
	movl	%r10d, %ecx
	leaq	lcs(%rip), %rdx
	movq	%r12, %rsi
	movl	$0, anslen(%rip)
	call	print_lcs
	movl	anslen(%rip), %eax
	movq	%rbp, %rdi
	addl	$1, %eax
	cltq
	movb	$0, 0(%rbp,%rax)
	call	puts@PLT
	jmp	.L16
.L46:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	anslen
	.bss
	.align 4
	.type	anslen, @object
	.size	anslen, 4
anslen:
	.zero	4
	.globl	answer
	.align 32
	.type	answer, @object
	.size	answer, 2001
answer:
	.zero	2001
	.globl	lenb
	.align 4
	.type	lenb, @object
	.size	lenb, 4
lenb:
	.zero	4
	.globl	lena
	.align 4
	.type	lena, @object
	.size	lena, 4
lena:
	.zero	4
	.globl	lcs
	.align 32
	.type	lcs, @object
	.size	lcs, 16016004
lcs:
	.zero	16016004
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 2001
b:
	.zero	2001
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 2001
a:
	.zero	2001
	.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:

/*
  AOJ 2035
  Title:It Prefokery Pio
  @kankichi573
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define MAXLEN 2000

char a[MAXLEN+1],b[MAXLEN+1];
int lcs[MAXLEN+1][MAXLEN+1];
int lena,lenb;
char answer[MAXLEN+1];
int anslen;

void print_lcs(char a[],char b[],int lcs[][MAXLEN+1],int i,int j)
{
  if(i==0 || j==0)
    return;
  if(a[i-1]==b[j-1])
    {
      print_lcs(a,b,lcs,i-1,j-1);
      answer[anslen]=a[i-1];
      anslen++;
    }
  else if(lcs[i-1][j]>=lcs[i][j-1])
    print_lcs(a,b,lcs,i-1,j);
  else
    print_lcs(a,b,lcs,i,j-1);
}
void strreverse(char a[],char b[],int len)
{
  int i;
  b[lena]='\0';
  for(i=0;i<len;i++)
    b[i]=a[len-1-i];
}
main()
{
  int i,j;
  while(EOF!=scanf("%s",a))
    {
      memset(answer,0,sizeof(answer));
      lena=lenb=strlen(a);
      strreverse(a,b,lena);
      
      for(i=0;i<=lena;i++)
	lcs[i][0]=0;
      for(i=0;i<=lena;i++)
	lcs[0][i]=0;
      for(i=0;i<lena;i++)
	for(j=0;j<lenb;j++)
	  {
	    if(a[i]==b[j])
	      lcs[i+1][j+1]=lcs[i][j]+1;
	    else
	      lcs[i+1][j+1]=max(lcs[i][j+1],lcs[i+1][j]);
	  }
      anslen=0;
      print_lcs(a,b,lcs,lena,lenb);
      answer[anslen+1]='\0';
      printf("%s\n",answer);
    }
      return(0);
}
AMMADAAHMIMAODKOAMY
LELVEEL
 YMAOKDOAMIMHAADAMMA
LEMVEEL
 YMAOKDOAMIMHAADAMMA
LFMVEEL
 YMAOKDOAMIMHAADAMMA
MEEVLFM
 YMAOKDOAMIMAAHDAMMA
MEEVLFL
 YMAOKDOAMIMAAHDBMMA
LFLVEEM
 YMAOKDOAMIMAAHDBMMA
LLFVEEM
 YMAOKDOAMIMAAMDBHMA
MDEVFML
 YMAOKDOAMIMAAMDBHMA
LDEVFML
 YMBDLDOAMIMAALOBHMA
LFMVEDL

MADAMIMADAM
LELEL
 MADAMIMADAM
LEMEL
 MADAMIMADAM
LEEL
 MADAMIMADAM
MEEM
 MADAMIMADAM
LFL
 MAAMIMAAM
LFL
 MAAMIMAAM
LL
 MAAMIMAAM
MDM
 MAAMIMAAM
LDL
 MBLAMIMALBM
LFL

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 2035
  Title:It Prefokery Pio
  @kankichi573
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define MAXLEN 2000

char a[MAXLEN+1],b[MAXLEN+1];
int lcs[MAXLEN+1][MAXLEN+1];
int lena,lenb;
char answer[MAXLEN+1];
int anslen;

void print_lcs(char a[],char b[],int lcs[][MAXLEN+1],int i,int j)
{
  if(i==0 || j==0)
    return;
  if(a[i-1]==b[j-1])
    {
      print_lcs(a,b,lcs,i-1,j-1);
      answer[anslen]=a[i-1];
      anslen++;
    }
  else if(lcs[i-1][j]>=lcs[i][j-1])
    print_lcs(a,b,lcs,i-1,j);
  else
    print_lcs(a,b,lcs,i,j-1);
}
void strreverse(char a[],char b[],int len)
{
  int i;
  b[lena]='\0';
  for(i=0;i<len;i++)
    b[i]=a[len-1-i];
}
main()
{
  int i,j;
  while(EOF!=scanf("%s",a))
    {
      memset(answer,0,sizeof(answer));
      lena=lenb=strlen(a);
      strreverse(a,b,lena);
      
      for(i=0;i<=lena;i++)
	lcs[i][0]=0;
      for(i=0;i<=lena;i++)
	lcs[0][i]=0;
      for(i=0;i<lena;i++)
	for(j=0;j<lenb;j++)
	  {
	    if(a[i]==b[j])
	      lcs[i+1][j+1]=lcs[i][j]+1;
	    else
	      lcs[i+1][j+1]=max(lcs[i][j+1],lcs[i+1][j]);
	  }
      anslen=0;
      print_lcs(a,b,lcs,lena,lenb);
      answer[anslen+1]='\0';
      printf("%s\n",answer);
    }
      return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 2001
a:
	.zero	2001
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 2001
b:
	.zero	2001
	.globl	lcs
	.align 32
	.type	lcs, @object
	.size	lcs, 16016004
lcs:
	.zero	16016004
	.globl	lena
	.align 4
	.type	lena, @object
	.size	lena, 4
lena:
	.zero	4
	.globl	lenb
	.align 4
	.type	lenb, @object
	.size	lenb, 4
lenb:
	.zero	4
	.globl	answer
	.align 32
	.type	answer, @object
	.size	answer, 2001
answer:
	.zero	2001
	.globl	anslen
	.align 4
	.type	anslen, @object
	.size	anslen, 4
anslen:
	.zero	4
	.text
	.globl	print_lcs
	.type	print_lcs, @function
print_lcs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movl	%ecx, -28(%rbp)
	movl	%r8d, -32(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L7
	cmpl	$0, -32(%rbp)
	je	.L7
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	anslen(%rip), %eax
	movzbl	(%rdx), %edx
	cltq
	leaq	answer(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	anslen(%rip), %eax
	addl	$1, %eax
	movl	%eax, anslen(%rip)
	jmp	.L1
.L5:
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	-8004(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rax, %rcx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	(%rcx,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L6
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-32(%rbp), %edi
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L6:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_lcs, .-print_lcs
	.globl	strreverse
	.type	strreverse, @function
strreverse:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	lena(%rip), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	strreverse, .-strreverse
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L12
.L23:
	movl	$2001, %edx
	movl	$0, %esi
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, lenb(%rip)
	movl	lenb(%rip), %eax
	movl	%eax, lena(%rip)
	movl	lena(%rip), %eax
	movl	%eax, %edx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strreverse
	movl	$0, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	lcs(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L13:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L15:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L22:
	movl	$0, -4(%rbp)
	jmp	.L18
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	b(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jne	.L19
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	leal	1(%rdx), %esi
	movl	-4(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	movslq	%esi, %rax
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L20
.L19:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	lcs(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-8(%rbp), %ecx
	leal	1(%rcx), %esi
	movl	-4(%rbp), %ecx
	addl	$1, %ecx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movslq	%ecx, %rcx
	movslq	%esi, %rdx
	imulq	$2001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lcs(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -4(%rbp)
.L18:
	movl	lenb(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	addl	$1, -8(%rbp)
.L17:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
	movl	$0, anslen(%rip)
	movl	lenb(%rip), %edx
	movl	lena(%rip), %eax
	movl	%edx, %r8d
	movl	%eax, %ecx
	leaq	lcs(%rip), %rax
	movq	%rax, %rdx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	print_lcs
	movl	anslen(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	answer(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L12:
	leaq	a(%rip), %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
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 2001
a:
	.zero	2001
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 2001
b:
	.zero	2001
	.globl	lcs
	.align 32
	.type	lcs, @object
	.size	lcs, 16016004
lcs:
	.zero	16016004
	.globl	lena
	.align 4
	.type	lena, @object
	.size	lena, 4
lena:
	.zero	4
	.globl	lenb
	.align 4
	.type	lenb, @object
	.size	lenb, 4
lenb:
	.zero	4
	.globl	answer
	.align 32
	.type	answer, @object
	.size	answer, 2001
answer:
	.zero	2001
	.globl	anslen
	.align 4
	.type	anslen, @object
	.size	anslen, 4
anslen:
	.zero	4
	.text
	.globl	print_lcs
	.type	print_lcs, @function
print_lcs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movl	%ecx, -28(%rbp)
	movl	%r8d, -32(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L7
	cmpl	$0, -32(%rbp)
	je	.L7
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	-1(%rax), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	movl	-28(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movl	anslen(%rip), %eax
	movzbl	(%rdx), %edx
	cltq
	leaq	answer(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	anslen(%rip), %eax
	addl	$1, %eax
	movl	%eax, anslen(%rip)
	jmp	.L1
.L5:
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	-8004(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rax, %rcx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	(%rcx,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L6
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-32(%rbp), %edi
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L6:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edi
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rsi
	movq	-8(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	print_lcs
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_lcs, .-print_lcs
	.globl	strreverse
	.type	strreverse, @function
strreverse:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	lena(%rip), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L10
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	strreverse, .-strreverse
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L12
.L23:
	movl	$2001, %edx
	movl	$0, %esi
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, lenb(%rip)
	movl	lenb(%rip), %eax
	movl	%eax, lena(%rip)
	movl	lena(%rip), %eax
	movl	%eax, %edx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	strreverse
	movl	$0, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	imulq	$8004, %rax, %rax
	leaq	lcs(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L13:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L15:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L22:
	movl	$0, -4(%rbp)
	jmp	.L18
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	b(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jne	.L19
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	leal	1(%rdx), %esi
	movl	-4(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	movslq	%esi, %rax
	imulq	$2001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L20
.L19:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	lcs(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	cltq
	imulq	$2001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	lcs(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-8(%rbp), %ecx
	leal	1(%rcx), %esi
	movl	-4(%rbp), %ecx
	addl	$1, %ecx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movslq	%ecx, %rcx
	movslq	%esi, %rdx
	imulq	$2001, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lcs(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L20:
	addl	$1, -4(%rbp)
.L18:
	movl	lenb(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	addl	$1, -8(%rbp)
.L17:
	movl	lena(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
	movl	$0, anslen(%rip)
	movl	lenb(%rip), %edx
	movl	lena(%rip), %eax
	movl	%edx, %r8d
	movl	%eax, %ecx
	leaq	lcs(%rip), %rax
	movq	%rax, %rdx
	leaq	b(%rip), %rax
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	print_lcs
	movl	anslen(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	answer(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	answer(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L12:
	leaq	a(%rip), %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
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
