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 n,m,count=0,max=0;
    scanf("%d",&n);
    char s[n][10+1];
    for(int i=0; i<n; i++)
        scanf("%s",s[i]);
    scanf("%d",&m);
    char t[m][10+1];
    for(int i=0; i<m; i++)
        scanf("%s",t[i]);
    for(int i=0; i<n; i++){
        count=0;
        for(int j=0; j<n; j++){
            if(strcmp(s[i],s[j])==0)
                count++;
        }
        for(int j=0; j<m; j++){
            if(strcmp(s[i],t[j])==0)
                count--;
        }
        if(count>max)
            max=count;
    }
    printf("%d",max);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$88, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$88, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L5:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L6
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$88, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$88, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L10
.L11:
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L11
	movl	$0, -100(%rbp)
	jmp	.L12
.L20:
	movl	$0, -116(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movl	-96(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	addl	$1, -116(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-124(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	$0, -92(%rbp)
	jmp	.L16
.L18:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	subl	$1, -116(%rbp)
.L17:
	addl	$1, -92(%rbp)
.L16:
	movl	-120(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L18
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jle	.L19
	movl	-116(%rbp), %eax
	movl	%eax, -112(%rbp)
.L19:
	addl	$1, -100(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L20
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rax
	movq	%rsp, %rsi
	leaq	(%rax,%rax,4), %rdx
	movq	%rax, %rcx
	leaq	15(%rax,%rdx,2), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L34:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L34
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L35
.L4:
	movq	%rsp, -80(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%rsp, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$11, %r13
	cmpl	%r12d, -64(%rbp)
	jg	.L6
.L5:
	leaq	-60(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	(%rax,%rax,4), %rdx
	movl	%eax, -68(%rbp)
	leaq	15(%rax,%rdx,2), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L8
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L36
.L8:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L37
.L9:
	cmpl	$0, -68(%rbp)
	movq	%rsp, -88(%rbp)
	jle	.L10
	movq	%rsp, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$11, %r13
	movl	%eax, -68(%rbp)
	cmpl	%r12d, %eax
	jg	.L11
.L10:
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L20
	leaq	(%rax,%rax,4), %rdx
	movq	-80(%rbp), %r12
	movq	-88(%rbp), %rcx
	movl	$0, -72(%rbp)
	leaq	(%rax,%rdx,2), %r13
	movl	-68(%rbp), %eax
	addq	%r12, %r13
	subl	$1, %eax
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	leaq	11(%rcx,%rax), %r14
	.p2align 4,,10
	.p2align 3
.L18:
	movq	-80(%rbp), %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %ebx
	addq	$11, %r15
	cmpq	%r13, %r15
	jne	.L14
	movl	-68(%rbp), %eax
	testl	%eax, %eax
	jle	.L15
	movq	-88(%rbp), %r15
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$0, %ebx
	addq	$11, %r15
	cmpq	%r15, %r14
	jne	.L17
.L15:
	movl	-72(%rbp), %eax
	cmpl	%ebx, %eax
	cmovge	%eax, %ebx
	addq	$11, %r12
	movl	%ebx, -72(%rbp)
	cmpq	%r13, %r12
	jne	.L18
	movl	%ebx, %edx
.L12:
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L37:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L9
.L35:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L20:
	movl	$0, -72(%rbp)
	movl	-72(%rbp), %edx
	jmp	.L12
.L38:
	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	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rax
	movq	%rsp, %rsi
	leaq	(%rax,%rax,4), %rdx
	movq	%rax, %rcx
	leaq	15(%rax,%rdx,2), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L34:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L34
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L35
.L4:
	movq	%rsp, -80(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%rsp, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$11, %r13
	cmpl	%r12d, -64(%rbp)
	jg	.L6
.L5:
	leaq	-60(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	(%rax,%rax,4), %rdx
	movl	%eax, -68(%rbp)
	leaq	15(%rax,%rdx,2), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L8
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L36
.L8:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L37
.L9:
	cmpl	$0, -68(%rbp)
	movq	%rsp, -88(%rbp)
	jle	.L10
	movq	%rsp, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$11, %r13
	movl	%eax, -68(%rbp)
	cmpl	%r12d, %eax
	jg	.L11
.L10:
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L20
	leaq	(%rax,%rax,4), %rdx
	movq	-80(%rbp), %r12
	movq	-88(%rbp), %rcx
	movl	$0, -72(%rbp)
	leaq	(%rax,%rdx,2), %r13
	movl	-68(%rbp), %eax
	addq	%r12, %r13
	subl	$1, %eax
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	leaq	11(%rcx,%rax), %r14
	.p2align 4,,10
	.p2align 3
.L18:
	movq	-80(%rbp), %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %ebx
	addq	$11, %r15
	cmpq	%r13, %r15
	jne	.L14
	movl	-68(%rbp), %eax
	testl	%eax, %eax
	jle	.L15
	movq	-88(%rbp), %r15
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$0, %ebx
	addq	$11, %r15
	cmpq	%r15, %r14
	jne	.L17
.L15:
	movl	-72(%rbp), %eax
	cmpl	%ebx, %eax
	cmovge	%eax, %ebx
	addq	$11, %r12
	movl	%ebx, -72(%rbp)
	cmpq	%r13, %r12
	jne	.L18
	movl	%ebx, %edx
.L12:
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L37:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L9
.L35:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L20:
	movl	$0, -72(%rbp)
	movl	-72(%rbp), %edx
	jmp	.L12
.L38:
	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 n,m,count=0,max=0;
    scanf("%d",&n);
    char s[n][10+1];
    for(int i=0; i<n; i++)
        scanf("%s",s[i]);
    scanf("%d",&m);
    char t[m][10+1];
    for(int i=0; i<m; i++)
        scanf("%s",t[i]);
    for(int i=0; i<n; i++){
        count=0;
        for(int j=0; j<n; j++){
            if(strcmp(s[i],s[j])==0)
                count++;
        }
        for(int j=0; j<m; j++){
            if(strcmp(s[i],t[j])==0)
                count--;
        }
        if(count>max)
            max=count;
    }
    printf("%d",max);
}
3
apple
orange
apple
5
aeplp
apple
apple
apple
apple
 6
red
red
blue
yellow
yellow
red
5
red
ree
yellow
green
blue
 1
voldemort
10
voldemort
voldemort
voldemort
voldemort
uoldemort
voldemort
voldemort
voldemort
voldemort
voldemort
 6
red
red
blue
yellow
yellow
red
5
rde
erd
lelyow
green
blte
 3
appme
orange
apple
1
grape
 3
apple
orange
lppae
5
aeplp
apple
apple
apple
apple
 3
appme
orange
apple
0
grape
 6
red
red
blue
ylelow
yellow
red
5
red
ree
yellow
green
blue
 1
voldemort
10
voldemort
voldemort
voldemort
voldemort
uoldemort
voldemort
voldemort
voleemort
voldemort
voldemort
 3
apole
orange
lppae
5
aeplp
apple
apple
apple
apple

1 2 0 3 1 1 1 2 0 1
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 n,m,count=0,max=0;
    scanf("%d",&n);
    char s[n][10+1];
    for(int i=0; i<n; i++)
        scanf("%s",s[i]);
    scanf("%d",&m);
    char t[m][10+1];
    for(int i=0; i<m; i++)
        scanf("%s",t[i]);
    for(int i=0; i<n; i++){
        count=0;
        for(int j=0; j<n; j++){
            if(strcmp(s[i],s[j])==0)
                count++;
        }
        for(int j=0; j<m; j++){
            if(strcmp(s[i],t[j])==0)
                count--;
        }
        if(count>max)
            max=count;
    }
    printf("%d",max);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$88, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$88, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L5:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L6
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$88, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$88, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L10
.L11:
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L11
	movl	$0, -100(%rbp)
	jmp	.L12
.L20:
	movl	$0, -116(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movl	-96(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	addl	$1, -116(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-124(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	$0, -92(%rbp)
	jmp	.L16
.L18:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	subl	$1, -116(%rbp)
.L17:
	addl	$1, -92(%rbp)
.L16:
	movl	-120(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L18
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jle	.L19
	movl	-116(%rbp), %eax
	movl	%eax, -112(%rbp)
.L19:
	addl	$1, -100(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L20
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$88, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$88, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -108(%rbp)
.L5:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L6
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$88, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$88, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$88, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L10
.L11:
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L11
	movl	$0, -100(%rbp)
	jmp	.L12
.L20:
	movl	$0, -116(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L13
.L15:
	movl	-96(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	addl	$1, -116(%rbp)
.L14:
	addl	$1, -96(%rbp)
.L13:
	movl	-124(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L15
	movl	$0, -92(%rbp)
	jmp	.L16
.L18:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-64(%rbp), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	-80(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	subl	$1, -116(%rbp)
.L17:
	addl	$1, -92(%rbp)
.L16:
	movl	-120(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L18
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jle	.L19
	movl	-116(%rbp), %eax
	movl	%eax, -112(%rbp)
.L19:
	addl	$1, -100(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L20
	movl	-112(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
