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>
#include<stdlib.h>

int main()
{
  int n, i;
  int cnt = 1;
  char S[200000][11];
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++)
  {
    scanf("%s", S[i]);
  }
  
  qsort(S, n, 11, strcmp);
  
  for(i = 1; i < n; i++)
  {
    if(strcmp(S[i], S[i - 1]) != 0)
      ++cnt;
  }
  
  printf("%d", cnt);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2199552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2200020(%rbp)
	leaq	-2200028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2200024(%rbp)
	jmp	.L2
.L3:
	leaq	-2200016(%rbp), %rcx
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2200024(%rbp)
.L2:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L3
	movl	-2200028(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-2200016(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -2200024(%rbp)
	jmp	.L4
.L6:
	movl	-2200024(%rbp), %eax
	subl	$1, %eax
	leaq	-2200016(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rcx
	leaq	-2200016(%rbp), %rsi
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L5
	addl	$1, -2200020(%rbp)
.L5:
	addl	$1, -2200024(%rbp)
.L4:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L6
	movl	-2200020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-2199552(%rsp), %r11
	.cfi_def_cfa 11, 2199600
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$480, %rsp
	.cfi_def_cfa_offset 2200080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2200024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$11, %rbp
	cmpl	%ebx, %esi
	jg	.L3
.L2:
	movq	strcmp@GOTPCREL(%rip), %rcx
	movl	$11, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	jle	.L8
	subl	$2, %eax
	leaq	27(%rsp), %rbx
	movl	$1, %r13d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	leaq	38(%rsp,%rax), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	-11(%rbx), %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$-1, %r13d
	addq	$11, %rbx
	cmpq	%rbp, %rbx
	jne	.L6
.L4:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2200024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$2200032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$1, %r13d
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-2199552(%rsp), %r11
	.cfi_def_cfa 11, 2199600
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$480, %rsp
	.cfi_def_cfa_offset 2200080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2200024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$11, %rbp
	cmpl	%ebx, %esi
	jg	.L3
.L2:
	movq	strcmp@GOTPCREL(%rip), %rcx
	movl	$11, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	jle	.L8
	subl	$2, %eax
	leaq	27(%rsp), %rbx
	movl	$1, %r13d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %rax
	leaq	38(%rsp,%rax), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	-11(%rbx), %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$-1, %r13d
	addq	$11, %rbx
	cmpq	%rbp, %rbx
	jne	.L6
.L4:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2200024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$2200032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$1, %r13d
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include<stdlib.h>

int main()
{
  int n, i;
  int cnt = 1;
  char S[200000][11];
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++)
  {
    scanf("%s", S[i]);
  }
  
  qsort(S, n, 11, strcmp);
  
  for(i = 1; i < n; i++)
  {
    if(strcmp(S[i], S[i - 1]) != 0)
      ++cnt;
  }
  
  printf("%d", cnt);

  return 0;
}
4
a`aa
a
aaa
aa
 3
bpple
orange
apple
 5
grape
grape
graoe
grape
grape
 5
egapr
grape
graoe
gr`pe
epaqg
 4
a`ab
a
aaa
aa
 3
bpple
egnaro
apple
 5
grape
grape
graoe
grape
eparg
 4
b`aa
a
aaa
aa
 3
bpple
egnaro
appld
 5
grape
grape
graoe
grape
epaqg

4 3 2 5 4 3 3 4 3 3
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>
#include<stdlib.h>

int main()
{
  int n, i;
  int cnt = 1;
  char S[200000][11];
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++)
  {
    scanf("%s", S[i]);
  }
  
  qsort(S, n, 11, strcmp);
  
  for(i = 1; i < n; i++)
  {
    if(strcmp(S[i], S[i - 1]) != 0)
      ++cnt;
  }
  
  printf("%d", cnt);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2199552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2200020(%rbp)
	leaq	-2200028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2200024(%rbp)
	jmp	.L2
.L3:
	leaq	-2200016(%rbp), %rcx
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2200024(%rbp)
.L2:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L3
	movl	-2200028(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-2200016(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -2200024(%rbp)
	jmp	.L4
.L6:
	movl	-2200024(%rbp), %eax
	subl	$1, %eax
	leaq	-2200016(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rcx
	leaq	-2200016(%rbp), %rsi
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L5
	addl	$1, -2200020(%rbp)
.L5:
	addl	$1, -2200024(%rbp)
.L4:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L6
	movl	-2200020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2199552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -2200020(%rbp)
	leaq	-2200028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2200024(%rbp)
	jmp	.L2
.L3:
	leaq	-2200016(%rbp), %rcx
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2200024(%rbp)
.L2:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L3
	movl	-2200028(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-2200016(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$11, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -2200024(%rbp)
	jmp	.L4
.L6:
	movl	-2200024(%rbp), %eax
	subl	$1, %eax
	leaq	-2200016(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rcx
	leaq	-2200016(%rbp), %rsi
	movl	-2200024(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L5
	addl	$1, -2200020(%rbp)
.L5:
	addl	$1, -2200024(%rbp)
.L4:
	movl	-2200028(%rbp), %eax
	cmpl	%eax, -2200024(%rbp)
	jl	.L6
	movl	-2200020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
