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>

int cmp(const void *a,const void *b){
  return *(char*)a - *(char*)b;
}

int scmp(const void *a,const void *b){
  return strcmp((char *)a,(char *)b);
}


int main(){
  long long n = 0;
  char str[100000][20] = {};
  long long cnt = 0;
  long long hoge[100000] = {};
  long long i = 0;
  long long total = 0;
  scanf("%lld",&n);
  for(i=0;i<n;i++){
    scanf(" %s",str[i]);
    qsort(str[i],10,sizeof(char),cmp);
  }
  
  qsort((void*)str,n,sizeof(str[0]),scmp);
  
  cnt = 0;
  hoge[0] = 1;
  for(i=1;i<n;i++){

    if(!strcmp(str[i-1],str[i])){
      hoge[cnt]++;
      //printf("#");
      //printf("%d-%d/",cnt,hoge[cnt]);
    }else{
      cnt++;
      hoge[cnt] = 1;
      //printf("%d-%d/",cnt,hoge[cnt]);
    }
  }
  //printf("%d/",hoge[i]);
  for(i=0;i<=cnt;i++){
    total += hoge[i]*(hoge[i]-1)/2;
  }
    
  printf("%lld",total);
  /*for(i=0;i<n;i++){
    printf("%s\n",str[i]);
  }*/
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.globl	scmp
	.type	scmp, @function
scmp:
.LFB7:
	.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
.LFE7:
	.size	scmp, .-scmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	" %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2797568(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2800048(%rbp)
	leaq	-2000016(%rbp), %rax
	movl	$2000000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800040(%rbp)
	leaq	-2800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800032(%rbp)
	movq	$0, -2800024(%rbp)
	leaq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2800032(%rbp)
	jmp	.L6
.L7:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$1, %edx
	movl	$10, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	addq	$1, -2800032(%rbp)
.L6:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L7
	movq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-2000016(%rbp), %rax
	leaq	scmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$20, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -2800040(%rbp)
	movq	$1, -2800016(%rbp)
	movq	$1, -2800032(%rbp)
	jmp	.L8
.L11:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movq	-2800032(%rbp), %rax
	leaq	-1(%rax), %rcx
	leaq	-2000016(%rbp), %rsi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movq	-2800040(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-2800040(%rbp), %rax
	movq	%rdx, -2800016(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2800040(%rbp)
	movq	-2800040(%rbp), %rax
	movq	$1, -2800016(%rbp,%rax,8)
.L10:
	addq	$1, -2800032(%rbp)
.L8:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L11
	movq	$0, -2800032(%rbp)
	jmp	.L12
.L13:
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rdx
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -2800024(%rbp)
	addq	$1, -2800032(%rbp)
.L12:
	movq	-2800032(%rbp), %rax
	cmpq	-2800040(%rbp), %rax
	jle	.L13
	movq	-2800024(%rbp), %rax
	movq	%rax, %rsi
	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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.p2align 4
	.globl	scmp
	.type	scmp, @function
scmp:
.LFB52:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE52:
	.size	scmp, .-scmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	" %s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-2797568(%rsp), %r11
	.cfi_def_cfa 11, 2797624
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2488, %rsp
	.cfi_def_cfa_offset 2800112
	movl	$2000000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 2800040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rbx
	movq	$0, 24(%rsp)
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	32(%rsp), %rax
	movl	$800000, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L5
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	leaq	cmp(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movl	$10, %esi
	movq	%r13, %rdi
	movq	%r14, %rcx
	movl	$1, %edx
	addq	$20, %r13
	call	qsort@PLT
	movq	24(%rsp), %rsi
	cmpq	%r12, %rsi
	jg	.L6
.L5:
	leaq	scmp(%rip), %rcx
	movl	$20, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	24(%rsp), %rax
	movq	$1, 32(%rsp)
	cmpq	$1, %rax
	jle	.L13
	leaq	(%rax,%rax,4), %rax
	xorl	%r13d, %r13d
	leaq	800012(%rsp,%rax,4), %r14
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$1, 32(%rsp,%r13,8)
	cmpq	%rbx, %r14
	je	.L18
.L10:
	movq	%rbx, %rdi
	addq	$20, %rbx
	movq	%rbx, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L19
	addq	$1, %r13
	movq	$1, 32(%rsp,%r13,8)
	cmpq	%rbx, %r14
	jne	.L10
.L18:
	movq	8(%rsp), %rcx
	leaq	40(%rsp,%r13,8), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rcx), %rax
	addq	$8, %rcx
	leaq	-1(%rax), %rdx
	imulq	%rax, %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, %r8
	cmpq	%rcx, %rsi
	jne	.L11
.L7:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$2800056, %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
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.p2align 4
	.globl	scmp
	.type	scmp, @function
scmp:
.LFB52:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE52:
	.size	scmp, .-scmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	" %s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-2797568(%rsp), %r11
	.cfi_def_cfa 11, 2797624
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2488, %rsp
	.cfi_def_cfa_offset 2800112
	movl	$2000000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 2800040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rbx
	movq	$0, 24(%rsp)
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	32(%rsp), %rax
	movl	$800000, %edx
	xorl	%esi, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L5
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	leaq	cmp(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movl	$10, %esi
	movq	%r13, %rdi
	movq	%r14, %rcx
	movl	$1, %edx
	addq	$20, %r13
	call	qsort@PLT
	movq	24(%rsp), %rsi
	cmpq	%r12, %rsi
	jg	.L6
.L5:
	leaq	scmp(%rip), %rcx
	movl	$20, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	24(%rsp), %rax
	movq	$1, 32(%rsp)
	cmpq	$1, %rax
	jle	.L13
	leaq	(%rax,%rax,4), %rax
	xorl	%r13d, %r13d
	leaq	800012(%rsp,%rax,4), %r14
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$1, 32(%rsp,%r13,8)
	cmpq	%rbx, %r14
	je	.L18
.L10:
	movq	%rbx, %rdi
	addq	$20, %rbx
	movq	%rbx, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L19
	addq	$1, %r13
	movq	$1, 32(%rsp,%r13,8)
	cmpq	%rbx, %r14
	jne	.L10
.L18:
	movq	8(%rsp), %rcx
	leaq	40(%rsp,%r13,8), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rcx), %rax
	addq	$8, %rcx
	leaq	-1(%rax), %rdx
	imulq	%rax, %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, %r8
	cmpq	%rcx, %rsi
	jne	.L11
.L7:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$2800056, %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
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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<stdlib.h>
#include<string.h>

int cmp(const void *a,const void *b){
  return *(char*)a - *(char*)b;
}

int scmp(const void *a,const void *b){
  return strcmp((char *)a,(char *)b);
}


int main(){
  long long n = 0;
  char str[100000][20] = {};
  long long cnt = 0;
  long long hoge[100000] = {};
  long long i = 0;
  long long total = 0;
  scanf("%lld",&n);
  for(i=0;i<n;i++){
    scanf(" %s",str[i]);
    qsort(str[i],10,sizeof(char),cmp);
  }
  
  qsort((void*)str,n,sizeof(str[0]),scmp);
  
  cnt = 0;
  hoge[0] = 1;
  for(i=1;i<n;i++){

    if(!strcmp(str[i-1],str[i])){
      hoge[cnt]++;
      //printf("#");
      //printf("%d-%d/",cnt,hoge[cnt]);
    }else{
      cnt++;
      hoge[cnt] = 1;
      //printf("%d-%d/",cnt,hoge[cnt]);
    }
  }
  //printf("%d/",hoge[i]);
  for(i=0;i<=cnt;i++){
    total += hoge[i]*(hoge[i]-1)/2;
  }
    
  printf("%lld",total);
  /*for(i=0;i<n;i++){
    printf("%s\n",str[i]);
  }*/
  return 0;
}
5
abaaaaaaaa
oweplustno
aaaaaaaaba
twoplusone
aaaabaaaaa
 2
oneplustwo
nioemodsix
 3
acornistnt
peaoutbnmb
constraint
 5
abaaaaaaaa
oweplustmo
aaaaaaaaba
unoselpowt
aaaaaaaaba
 5
abaaaaaaaa
oweplustno
aaaaaaaaba
twoplusone
aaaaaaaaba
 2
onepltsuwo
nioemodsix
 3
acornistnt
peaoutbnmb
nonstraict
 5
abaaaaaaaa
oweplustno
aaaaaaaaba
enosulpowt
aaaaaaaaba
 2
owustlpeno
nioemodsix
 3
acornistnt
bmnbtuoaep
nonstraict

4 0 1 3 4 0 1 4 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<stdlib.h>
#include<string.h>

int cmp(const void *a,const void *b){
  return *(char*)a - *(char*)b;
}

int scmp(const void *a,const void *b){
  return strcmp((char *)a,(char *)b);
}


int main(){
  long long n = 0;
  char str[100000][20] = {};
  long long cnt = 0;
  long long hoge[100000] = {};
  long long i = 0;
  long long total = 0;
  scanf("%lld",&n);
  for(i=0;i<n;i++){
    scanf(" %s",str[i]);
    qsort(str[i],10,sizeof(char),cmp);
  }
  
  qsort((void*)str,n,sizeof(str[0]),scmp);
  
  cnt = 0;
  hoge[0] = 1;
  for(i=1;i<n;i++){

    if(!strcmp(str[i-1],str[i])){
      hoge[cnt]++;
      //printf("#");
      //printf("%d-%d/",cnt,hoge[cnt]);
    }else{
      cnt++;
      hoge[cnt] = 1;
      //printf("%d-%d/",cnt,hoge[cnt]);
    }
  }
  //printf("%d/",hoge[i]);
  for(i=0;i<=cnt;i++){
    total += hoge[i]*(hoge[i]-1)/2;
  }
    
  printf("%lld",total);
  /*for(i=0;i<n;i++){
    printf("%s\n",str[i]);
  }*/
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.globl	scmp
	.type	scmp, @function
scmp:
.LFB7:
	.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
.LFE7:
	.size	scmp, .-scmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	" %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2797568(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2800048(%rbp)
	leaq	-2000016(%rbp), %rax
	movl	$2000000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800040(%rbp)
	leaq	-2800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800032(%rbp)
	movq	$0, -2800024(%rbp)
	leaq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2800032(%rbp)
	jmp	.L6
.L7:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$1, %edx
	movl	$10, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	addq	$1, -2800032(%rbp)
.L6:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L7
	movq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-2000016(%rbp), %rax
	leaq	scmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$20, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -2800040(%rbp)
	movq	$1, -2800016(%rbp)
	movq	$1, -2800032(%rbp)
	jmp	.L8
.L11:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movq	-2800032(%rbp), %rax
	leaq	-1(%rax), %rcx
	leaq	-2000016(%rbp), %rsi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movq	-2800040(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-2800040(%rbp), %rax
	movq	%rdx, -2800016(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2800040(%rbp)
	movq	-2800040(%rbp), %rax
	movq	$1, -2800016(%rbp,%rax,8)
.L10:
	addq	$1, -2800032(%rbp)
.L8:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L11
	movq	$0, -2800032(%rbp)
	jmp	.L12
.L13:
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rdx
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -2800024(%rbp)
	addq	$1, -2800032(%rbp)
.L12:
	movq	-2800032(%rbp), %rax
	cmpq	-2800040(%rbp), %rax
	jle	.L13
	movq	-2800024(%rbp), %rax
	movq	%rax, %rsi
	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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.globl	scmp
	.type	scmp, @function
scmp:
.LFB7:
	.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
.LFE7:
	.size	scmp, .-scmp
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	" %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-2797568(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2800048(%rbp)
	leaq	-2000016(%rbp), %rax
	movl	$2000000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800040(%rbp)
	leaq	-2800016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -2800032(%rbp)
	movq	$0, -2800024(%rbp)
	leaq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -2800032(%rbp)
	jmp	.L6
.L7:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$1, %edx
	movl	$10, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	addq	$1, -2800032(%rbp)
.L6:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L7
	movq	-2800048(%rbp), %rax
	movq	%rax, %rsi
	leaq	-2000016(%rbp), %rax
	leaq	scmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$20, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -2800040(%rbp)
	movq	$1, -2800016(%rbp)
	movq	$1, -2800032(%rbp)
	jmp	.L8
.L11:
	leaq	-2000016(%rbp), %rcx
	movq	-2800032(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movq	-2800032(%rbp), %rax
	leaq	-1(%rax), %rcx
	leaq	-2000016(%rbp), %rsi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movq	-2800040(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-2800040(%rbp), %rax
	movq	%rdx, -2800016(%rbp,%rax,8)
	jmp	.L10
.L9:
	addq	$1, -2800040(%rbp)
	movq	-2800040(%rbp), %rax
	movq	$1, -2800016(%rbp,%rax,8)
.L10:
	addq	$1, -2800032(%rbp)
.L8:
	movq	-2800048(%rbp), %rax
	cmpq	%rax, -2800032(%rbp)
	jl	.L11
	movq	$0, -2800032(%rbp)
	jmp	.L12
.L13:
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rdx
	movq	-2800032(%rbp), %rax
	movq	-2800016(%rbp,%rax,8), %rax
	subq	$1, %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -2800024(%rbp)
	addq	$1, -2800032(%rbp)
.L12:
	movq	-2800032(%rbp), %rax
	cmpq	-2800040(%rbp), %rax
	jle	.L13
	movq	-2800024(%rbp), %rax
	movq	%rax, %rsi
	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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
