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

```c
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void LCS(char *x, char *y){
	int m = strlen(x+1);
	int n = strlen(y+1);
	int i, j, **c;
	
	c = malloc(sizeof(int)*(2205));
	for (i = 0; i <= m; i++)
		c[i] = malloc(sizeof(int)*(2205));
	
	for (i = 0; i <= m; i++){
		for (j = 0; j <= n; j++){
			c[i][j] = 0;
		}
	}
	
	for (i = 1; i <= m; i++){
		for (j = 1; j <= n; j++){
			if (x[i] == y[j])
				c[i][j] = c[i - 1][j - 1] + 1;
			else if (c[i - 1][j] >= c[i][j - 1])
				c[i][j] = c[i - 1][j];
			else
				c[i][j] = c[i][j - 1];
		}
	}
	
	printf("%d\n", c[i-1][j-1]);
	for (i = 0; i < m; i++)free(c[i]);
	free(c);
	
}

int main(){
	int i, n;
	char x[1001], y[1001];

	scanf("%d", &n);
	for (i = 0; i < n; i++){
		scanf("%s%s", x + 1, y + 1);
		LCS(x, y);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	LCS
	.type	LCS, @function
LCS:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	-56(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movq	-64(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -28(%rbp)
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L3
	movl	$0, -40(%rbp)
	jmp	.L4
.L7:
	movl	$0, -36(%rbp)
	jmp	.L5
.L6:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L6
	addl	$1, -40(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L7
	movl	$1, -40(%rbp)
	jmp	.L8
.L14:
	movl	$1, -36(%rbp)
	jmp	.L9
.L13:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
.L11:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	addl	$1, -40(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L14
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -40(%rbp)
	jmp	.L15
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -40(%rbp)
.L15:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	LCS, .-LCS
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2036(%rbp)
	jmp	.L18
.L19:
	leaq	-1024(%rbp), %rdx
	addq	$1, %rdx
	leaq	-2032(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rdx
	leaq	-2032(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	LCS
	addl	$1, -2036(%rbp)
.L18:
	movl	-2040(%rbp), %eax
	cmpl	%eax, -2036(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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\n"
	.text
	.p2align 4
	.globl	LCS
	.type	LCS, @function
LCS:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 24(%rsp)
	addq	$1, %rdi
	call	strlen@PLT
	leaq	1(%r15), %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	strlen@PLT
	movl	$8820, %edi
	movq	%rax, 16(%rsp)
	movl	%eax, %ebx
	call	malloc@PLT
	movq	%rax, %rbp
	testl	%r14d, %r14d
	js	.L2
	leaq	8(%rbp), %rsi
	movq	%rax, %r13
	movl	%r14d, %eax
	movq	%rbp, %r14
	movq	%rsi, 32(%rsp)
	leaq	(%rsi,%rax,8), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$8820, %edi
	addq	$8, %r14
	call	malloc@PLT
	movq	%rax, -8(%r14)
	cmpq	%r14, %r12
	jne	.L3
	movq	16(%rsp), %rsi
	movl	%esi, %eax
	leaq	4(,%rax,4), %r14
	movq	%rsi, %rax
	addl	$1, %esi
	testl	%eax, %eax
	movl	$0, %eax
	movl	%esi, 40(%rsp)
	cmovns	%esi, %eax
	movl	%eax, 44(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%ebx, %ebx
	js	.L7
	movq	0(%r13), %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
.L7:
	addq	$8, %r13
	cmpq	%r13, %r12
	jne	.L4
	movq	8(%rsp), %rax
	testl	%eax, %eax
	jle	.L2
	movq	16(%rsp), %rsi
	movslq	40(%rsp), %r14
	leal	-1(%rax), %r12d
	movl	$1, %eax
	movq	24(%rsp), %r8
	leaq	2(%r12), %r10
	movl	$1, %r11d
	testl	%esi, %esi
	leal	-1(%rsi), %r13d
	cmovle	%rax, %r14
	addq	$2, %r13
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L14
	movzbl	(%r8,%r11), %esi
	movq	-8(%rbp,%r11,8), %rdi
	movl	$1, %eax
	movq	0(%rbp,%r11,8), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdi,%rax,4), %r9d
	movl	-4(%rcx,%rax,4), %edx
	cmpl	%r9d, %edx
	cmovl	%r9d, %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %r13
	je	.L14
.L11:
	cmpb	(%r15,%rax), %sil
	jne	.L9
	movl	-4(%rdi,%rax,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %r13
	jne	.L11
.L14:
	addq	$1, %r11
	cmpq	%r11, %r10
	jne	.L8
	movl	8(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	movq	%rbp, %rbx
	addl	$1, %eax
	cltq
	movq	-8(%rbp,%rax,8), %rax
	movl	-4(%rax,%r14,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	32(%rsp), %rax
	leaq	(%rax,%r12,8), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rbx), %rdi
	addq	$8, %rbx
	call	free@PLT
	cmpq	%rbx, %r12
	jne	.L15
.L16:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%rbp, %rdi
	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
	jmp	free@PLT
.L2:
	.cfi_restore_state
	movslq	44(%rsp), %rax
	movq	0(%rbp), %rdx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	movl	-4(%rdx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
	.cfi_endproc
.LFE51:
	.size	LCS, .-LCS
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rdi
	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	$2056, %rsp
	.cfi_def_cfa_offset 2112
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	leaq	17(%rsp), %r12
	leaq	1024(%rsp), %r15
	leaq	1025(%rsp), %r14
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%r14, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r15, %rsi
	movq	%r13, %rdi
	addl	$1, %ebx
	call	LCS
	cmpl	%ebx, 12(%rsp)
	jg	.L24
.L23:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$2056, %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
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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\n"
	.text
	.p2align 4
	.globl	LCS
	.type	LCS, @function
LCS:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 24(%rsp)
	addq	$1, %rdi
	call	strlen@PLT
	leaq	1(%r15), %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	strlen@PLT
	movl	$8820, %edi
	movq	%rax, 16(%rsp)
	movl	%eax, %ebx
	call	malloc@PLT
	movq	%rax, %rbp
	testl	%r14d, %r14d
	js	.L2
	leaq	8(%rbp), %rsi
	movq	%rax, %r13
	movl	%r14d, %eax
	movq	%rbp, %r14
	movq	%rsi, 32(%rsp)
	leaq	(%rsi,%rax,8), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$8820, %edi
	addq	$8, %r14
	call	malloc@PLT
	movq	%rax, -8(%r14)
	cmpq	%r14, %r12
	jne	.L3
	movq	16(%rsp), %rsi
	movl	%esi, %eax
	leaq	4(,%rax,4), %r14
	movq	%rsi, %rax
	addl	$1, %esi
	testl	%eax, %eax
	movl	$0, %eax
	movl	%esi, 40(%rsp)
	cmovns	%esi, %eax
	movl	%eax, 44(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%ebx, %ebx
	js	.L7
	movq	0(%r13), %rdi
	movq	%r14, %rdx
	xorl	%esi, %esi
	call	memset@PLT
.L7:
	addq	$8, %r13
	cmpq	%r13, %r12
	jne	.L4
	movq	8(%rsp), %rax
	testl	%eax, %eax
	jle	.L2
	movq	16(%rsp), %rsi
	movslq	40(%rsp), %r14
	leal	-1(%rax), %r12d
	movl	$1, %eax
	movq	24(%rsp), %r8
	leaq	2(%r12), %r10
	movl	$1, %r11d
	testl	%esi, %esi
	leal	-1(%rsi), %r13d
	cmovle	%rax, %r14
	addq	$2, %r13
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L14
	movzbl	(%r8,%r11), %esi
	movq	-8(%rbp,%r11,8), %rdi
	movl	$1, %eax
	movq	0(%rbp,%r11,8), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdi,%rax,4), %r9d
	movl	-4(%rcx,%rax,4), %edx
	cmpl	%r9d, %edx
	cmovl	%r9d, %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %r13
	je	.L14
.L11:
	cmpb	(%r15,%rax), %sil
	jne	.L9
	movl	-4(%rdi,%rax,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %r13
	jne	.L11
.L14:
	addq	$1, %r11
	cmpq	%r11, %r10
	jne	.L8
	movl	8(%rsp), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	movq	%rbp, %rbx
	addl	$1, %eax
	cltq
	movq	-8(%rbp,%rax,8), %rax
	movl	-4(%rax,%r14,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	32(%rsp), %rax
	leaq	(%rax,%r12,8), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rbx), %rdi
	addq	$8, %rbx
	call	free@PLT
	cmpq	%rbx, %r12
	jne	.L15
.L16:
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%rbp, %rdi
	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
	jmp	free@PLT
.L2:
	.cfi_restore_state
	movslq	44(%rsp), %rax
	movq	0(%rbp), %rdx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	movl	-4(%rdx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
	.cfi_endproc
.LFE51:
	.size	LCS, .-LCS
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rdi
	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	$2056, %rsp
	.cfi_def_cfa_offset 2112
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L23
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	leaq	17(%rsp), %r12
	leaq	1024(%rsp), %r15
	leaq	1025(%rsp), %r14
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%r14, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r15, %rsi
	movq	%r13, %rdi
	addl	$1, %ebx
	call	LCS
	cmpl	%ebx, 12(%rsp)
	jg	.L24
.L23:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$2056, %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
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void LCS(char *x, char *y){
	int m = strlen(x+1);
	int n = strlen(y+1);
	int i, j, **c;
	
	c = malloc(sizeof(int)*(2205));
	for (i = 0; i <= m; i++)
		c[i] = malloc(sizeof(int)*(2205));
	
	for (i = 0; i <= m; i++){
		for (j = 0; j <= n; j++){
			c[i][j] = 0;
		}
	}
	
	for (i = 1; i <= m; i++){
		for (j = 1; j <= n; j++){
			if (x[i] == y[j])
				c[i][j] = c[i - 1][j - 1] + 1;
			else if (c[i - 1][j] >= c[i][j - 1])
				c[i][j] = c[i - 1][j];
			else
				c[i][j] = c[i][j - 1];
		}
	}
	
	printf("%d\n", c[i-1][j-1]);
	for (i = 0; i < m; i++)free(c[i]);
	free(c);
	
}

int main(){
	int i, n;
	char x[1001], y[1001];

	scanf("%d", &n);
	for (i = 0; i < n; i++){
		scanf("%s%s", x + 1, y + 1);
		LCS(x, y);
	}
	return 0;
}
3
abcbdab
bdcaba
abc
abc
acb
bc
 3
abcbdab
bdcaba
abc
abc
bcb
bc
 3
abcbdab
bdcaba
`bc
abc
bcb
bc
 3
badbcba
bdcaba
`bc
abc
bcb
bc
 3
badbdba
bdcaba
`bc
abc
bcb
cc
 3
badbdba
bdcaba
`bc
abd
bcb
cc
 3
badbdba
abacdb
_cb
dba
bbb
cc
 3
`bdbdab
abacdb
_cb
dba
bbb
cb
 3
`bdadab
ab`cdb
_cb
db`
bcb
cb
 3
`bdad`b
bdc`ba
bc`
dc_
bbc
bc

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

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

```c
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void LCS(char *x, char *y){
	int m = strlen(x+1);
	int n = strlen(y+1);
	int i, j, **c;
	
	c = malloc(sizeof(int)*(2205));
	for (i = 0; i <= m; i++)
		c[i] = malloc(sizeof(int)*(2205));
	
	for (i = 0; i <= m; i++){
		for (j = 0; j <= n; j++){
			c[i][j] = 0;
		}
	}
	
	for (i = 1; i <= m; i++){
		for (j = 1; j <= n; j++){
			if (x[i] == y[j])
				c[i][j] = c[i - 1][j - 1] + 1;
			else if (c[i - 1][j] >= c[i][j - 1])
				c[i][j] = c[i - 1][j];
			else
				c[i][j] = c[i][j - 1];
		}
	}
	
	printf("%d\n", c[i-1][j-1]);
	for (i = 0; i < m; i++)free(c[i]);
	free(c);
	
}

int main(){
	int i, n;
	char x[1001], y[1001];

	scanf("%d", &n);
	for (i = 0; i < n; i++){
		scanf("%s%s", x + 1, y + 1);
		LCS(x, y);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	LCS
	.type	LCS, @function
LCS:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	-56(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movq	-64(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -28(%rbp)
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L3
	movl	$0, -40(%rbp)
	jmp	.L4
.L7:
	movl	$0, -36(%rbp)
	jmp	.L5
.L6:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L6
	addl	$1, -40(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L7
	movl	$1, -40(%rbp)
	jmp	.L8
.L14:
	movl	$1, -36(%rbp)
	jmp	.L9
.L13:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
.L11:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	addl	$1, -40(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L14
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -40(%rbp)
	jmp	.L15
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -40(%rbp)
.L15:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	LCS, .-LCS
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2036(%rbp)
	jmp	.L18
.L19:
	leaq	-1024(%rbp), %rdx
	addq	$1, %rdx
	leaq	-2032(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rdx
	leaq	-2032(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	LCS
	addl	$1, -2036(%rbp)
.L18:
	movl	-2040(%rbp), %eax
	cmpl	%eax, -2036(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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\n"
	.text
	.globl	LCS
	.type	LCS, @function
LCS:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	-56(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movq	-64(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -28(%rbp)
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movl	$8820, %edi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L3
	movl	$0, -40(%rbp)
	jmp	.L4
.L7:
	movl	$0, -36(%rbp)
	jmp	.L5
.L6:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L6
	addl	$1, -40(%rbp)
.L4:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L7
	movl	$1, -40(%rbp)
	jmp	.L8
.L14:
	movl	$1, -36(%rbp)
	jmp	.L9
.L13:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	-40(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
.L11:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	addl	$1, -40(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L14
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -40(%rbp)
	jmp	.L15
.L16:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -40(%rbp)
.L15:
	movl	-40(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	LCS, .-LCS
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2036(%rbp)
	jmp	.L18
.L19:
	leaq	-1024(%rbp), %rdx
	addq	$1, %rdx
	leaq	-2032(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rdx
	leaq	-2032(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	LCS
	addl	$1, -2036(%rbp)
.L18:
	movl	-2040(%rbp), %eax
	cmpl	%eax, -2036(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
