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 <stdlib.h>
#include <string.h>
char s[200001][11];
int a[200000];
int cmpstr(const void* a, const void* b) { return strcmp((char*)a, (char*)b); }
int main() {
	int n, max = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%s", s[i]);
	}
	qsort(s, n, sizeof(s[0]), cmpstr);
	for (int i = 0; i < n; i++) {
		if (strcmp(s[i], s[i + 1]) == 0) {
			a[i]++;
			a[i + 1] = a[i] + 1;
		}
	}
	for (int i = 0; i < n; i++) {
		if (a[i] > max) max = a[i];
	}
	for (int i = 0; i <= n; i++) {
		if (a[i] == max) printf("%s\n", s[i]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2200011
s:
	.zero	2200011
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.text
	.globl	cmpstr
	.type	cmpstr, @function
cmpstr:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpstr, .-cmpstr
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -28(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movl	-32(%rbp), %eax
	cltq
	leaq	cmpstr(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	jmp	.L6
.L8:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L13
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	addl	$1, -12(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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
	.p2align 4
	.globl	cmpstr
	.type	cmpstr, @function
cmpstr:
.LFB51:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE51:
	.size	cmpstr, .-cmpstr
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	s(%rip), %r13
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%r13, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	addq	$11, %rbp
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	leaq	cmpstr(%rip), %rcx
	movl	$11, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	20(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L6
	leal	-1(%rbp), %ecx
	leaq	a(%rip), %r14
	movl	%ecx, 12(%rsp)
	leaq	4(%r14), %rax
	movq	%r14, %r12
	movq	%r14, %rbx
	leaq	11+s(%rip), %r15
	leaq	(%rax,%rcx,4), %r13
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	-11(%r15), %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L7
	movq	.LC2(%rip), %xmm4
	movd	(%rbx), %xmm3
	pshufd	$0xe0, %xmm3, %xmm0
	paddd	%xmm4, %xmm0
	movq	%xmm0, (%rbx)
.L7:
	addq	$4, %rbx
	addq	$11, %r15
	cmpq	%r13, %rbx
	jne	.L8
	cmpl	$2, 12(%rsp)
	jbe	.L18
	movl	%ebp, %eax
	leaq	16+a(%rip), %rcx
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	addq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm0, %xmm1
	addq	$16, %r14
	pcmpgtd	-16(%r14), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%r14), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rax, %r14
	jne	.L10
	movdqa	%xmm0, %xmm2
	movl	%ebp, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %r13d
	testb	$3, %bpl
	je	.L16
.L9:
	movslq	%eax, %rdx
	movl	(%r12,%rdx,4), %edx
	cmpl	%edx, %r13d
	cmovl	%edx, %r13d
	leal	1(%rax), %edx
	cmpl	%ebp, %edx
	jge	.L16
	movslq	%edx, %rdx
	movl	(%r12,%rdx,4), %edx
	cmpl	%edx, %r13d
	cmovl	%edx, %r13d
	addl	$2, %eax
	cmpl	%eax, %ebp
	jle	.L16
	cltq
	movl	(%r12,%rax,4), %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L16:
	leaq	s(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%r13d, (%r12,%rbx,4)
	je	.L26
	addq	$1, %rbx
	addq	$11, %r14
	cmpl	%ebx, %ebp
	jge	.L15
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movq	%r14, %rdi
	addq	$1, %rbx
	addq	$11, %r14
	call	puts@PLT
	movl	20(%rsp), %ebp
	cmpl	%ebx, %ebp
	jge	.L15
	jmp	.L14
.L6:
	jne	.L14
	xorl	%r13d, %r13d
	leaq	a(%rip), %r12
	jmp	.L16
.L18:
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 2200011
s:
	.zero	2200011
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	1
	.long	2
	.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	cmpstr
	.type	cmpstr, @function
cmpstr:
.LFB51:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE51:
	.size	cmpstr, .-cmpstr
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	s(%rip), %r13
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	movq	%r13, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	addq	$11, %rbp
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	leaq	cmpstr(%rip), %rcx
	movl	$11, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	20(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L6
	leal	-1(%rbp), %ecx
	leaq	a(%rip), %r14
	movl	%ecx, 12(%rsp)
	leaq	4(%r14), %rax
	movq	%r14, %r12
	movq	%r14, %rbx
	leaq	11+s(%rip), %r15
	leaq	(%rax,%rcx,4), %r13
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	-11(%r15), %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L7
	movq	.LC2(%rip), %xmm4
	movd	(%rbx), %xmm3
	pshufd	$0xe0, %xmm3, %xmm0
	paddd	%xmm4, %xmm0
	movq	%xmm0, (%rbx)
.L7:
	addq	$4, %rbx
	addq	$11, %r15
	cmpq	%r13, %rbx
	jne	.L8
	cmpl	$2, 12(%rsp)
	jbe	.L18
	movl	%ebp, %eax
	leaq	16+a(%rip), %rcx
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	addq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm0, %xmm1
	addq	$16, %r14
	pcmpgtd	-16(%r14), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%r14), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rax, %r14
	jne	.L10
	movdqa	%xmm0, %xmm2
	movl	%ebp, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %r13d
	testb	$3, %bpl
	je	.L16
.L9:
	movslq	%eax, %rdx
	movl	(%r12,%rdx,4), %edx
	cmpl	%edx, %r13d
	cmovl	%edx, %r13d
	leal	1(%rax), %edx
	cmpl	%ebp, %edx
	jge	.L16
	movslq	%edx, %rdx
	movl	(%r12,%rdx,4), %edx
	cmpl	%edx, %r13d
	cmovl	%edx, %r13d
	addl	$2, %eax
	cmpl	%eax, %ebp
	jle	.L16
	cltq
	movl	(%r12,%rax,4), %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L16:
	leaq	s(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%r13d, (%r12,%rbx,4)
	je	.L26
	addq	$1, %rbx
	addq	$11, %r14
	cmpl	%ebx, %ebp
	jge	.L15
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movq	%r14, %rdi
	addq	$1, %rbx
	addq	$11, %r14
	call	puts@PLT
	movl	20(%rsp), %ebp
	cmpl	%ebx, %ebp
	jge	.L15
	jmp	.L14
.L6:
	jne	.L14
	xorl	%r13d, %r13d
	leaq	a(%rip), %r12
	jmp	.L16
.L18:
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 2200011
s:
	.zero	2200011
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	1
	.long	2
	.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 <stdlib.h>
#include <string.h>
char s[200001][11];
int a[200000];
int cmpstr(const void* a, const void* b) { return strcmp((char*)a, (char*)b); }
int main() {
	int n, max = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%s", s[i]);
	}
	qsort(s, n, sizeof(s[0]), cmpstr);
	for (int i = 0; i < n; i++) {
		if (strcmp(s[i], s[i + 1]) == 0) {
			a[i]++;
			a[i + 1] = a[i] + 1;
		}
	}
	for (int i = 0; i < n; i++) {
		if (a[i] > max) max = a[i];
	}
	for (int i = 0; i <= n; i++) {
		if (a[i] == max) printf("%s\n", s[i]);
	}
	return 0;
}

8
buffalo
buffalo
buffalo
buffalo
olaffub
buffalo
buffalo
buffalo
 7
beat
veu
beet
bed
vet
bet
beet
 7
bass
bass
kick
kick
bats
kick
kick
 4
ushi
taou
nichia
kun
 4
ihsu
taou
nichia
kun
 7
beat
veu
beet
bed
vte
bet
teeb
 4
ihsu
taou
michia
kun
 7
beat
veu
bfet
bed
vte
bet
teeb
 4
ihsu
taou
michia
nuk
 7
beat
veu
bfet
bed
vte
cet
teeb

buffalo
 beet
 kick
 kun
nichia
taou
ushi

 ihsu
kun
nichia
taou

 beat
bed
beet
bet
teeb
veu
vte

 ihsu
kun
michia
taou

 beat
bed
bet
bfet
teeb
veu
vte

 ihsu
michia
nuk
taou

 beat
bed
bfet
cet
teeb
veu
vte


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 <stdlib.h>
#include <string.h>
char s[200001][11];
int a[200000];
int cmpstr(const void* a, const void* b) { return strcmp((char*)a, (char*)b); }
int main() {
	int n, max = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%s", s[i]);
	}
	qsort(s, n, sizeof(s[0]), cmpstr);
	for (int i = 0; i < n; i++) {
		if (strcmp(s[i], s[i + 1]) == 0) {
			a[i]++;
			a[i + 1] = a[i] + 1;
		}
	}
	for (int i = 0; i < n; i++) {
		if (a[i] > max) max = a[i];
	}
	for (int i = 0; i <= n; i++) {
		if (a[i] == max) printf("%s\n", s[i]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2200011
s:
	.zero	2200011
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.text
	.globl	cmpstr
	.type	cmpstr, @function
cmpstr:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpstr, .-cmpstr
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -28(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movl	-32(%rbp), %eax
	cltq
	leaq	cmpstr(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	jmp	.L6
.L8:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L13
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	addl	$1, -12(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2200011
s:
	.zero	2200011
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.text
	.globl	cmpstr
	.type	cmpstr, @function
cmpstr:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpstr, .-cmpstr
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -28(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movl	-32(%rbp), %eax
	cltq
	leaq	cmpstr(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	jmp	.L6
.L8:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	leaq	(%rax,%rdx), %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	leal	1(%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -28(%rbp)
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$0, -12(%rbp)
	jmp	.L12
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L13
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	addl	$1, -12(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
