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>
int compare(const void *a,const void *b){
  return *(long*)a - *(long*)b;
}

int main(){
  long n = 0;
  long k = 0;
  long a[200000] = {};
  long i = 0;
  long hoge[200000] = {};
  long hozon = 0; 
  long hogecnt = 0;
  long sum = 0;
  long hogem = 0;
  scanf("%lu %lu",&n,&k);
  for(i=0 ; i < n; i++){
    scanf("%lu",&a[i]);
  }
  qsort(a,n,sizeof(long),compare);
  hozon = a[0];
  for(i=0;i<n;i++){
    if(hozon == a[i]){
      hoge[hogecnt]++;
    }else{
      hozon = a[i];
      hoge[hogecnt+1]++;
      hogecnt++;
    }
  }
  qsort(hoge,n,sizeof(long),compare);
  if((hogecnt+1) <= k){
    sum = 0;
  }else{
    hogem = 0;
    for(i=0;hogem < (hogecnt+1)-k;i++){
      if(hoge[i] != 0){	
      	sum += hoge[i];
      	hogem++;
      }
  	}
  }
  printf("%lu",sum);
  return 0;
}
  
  ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%lu %lu"
.LC1:
	.string	"%lu"
	.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
	leaq	-3198976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -3200072(%rbp)
	movq	$0, -3200064(%rbp)
	leaq	-3200016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200056(%rbp)
	leaq	-1600016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200048(%rbp)
	movq	$0, -3200040(%rbp)
	movq	$0, -3200032(%rbp)
	movq	$0, -3200024(%rbp)
	leaq	-3200064(%rbp), %rdx
	leaq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -3200056(%rbp)
	jmp	.L4
.L5:
	leaq	-3200016(%rbp), %rdx
	movq	-3200056(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -3200056(%rbp)
.L4:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L5
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-3200016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200016(%rbp), %rax
	movq	%rax, -3200048(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L6
.L9:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	cmpq	%rax, -3200048(%rbp)
	jne	.L7
	movq	-3200040(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-3200040(%rbp), %rax
	movq	%rdx, -1600016(%rbp,%rax,8)
	jmp	.L8
.L7:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	movq	%rax, -3200048(%rbp)
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-1600016(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -1600016(%rbp,%rax,8)
	addq	$1, -3200040(%rbp)
.L8:
	addq	$1, -3200056(%rbp)
.L6:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L9
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-1600016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200064(%rbp), %rax
	cmpq	%rax, -3200040(%rbp)
	jge	.L10
	movq	$0, -3200032(%rbp)
	jmp	.L11
.L10:
	movq	$0, -3200024(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L12
.L14:
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -3200032(%rbp)
	addq	$1, -3200024(%rbp)
.L13:
	addq	$1, -3200056(%rbp)
.L12:
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-3200064(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -3200024(%rbp)
	jl	.L14
.L11:
	movq	-3200032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lu %lu"
.LC1:
	.string	"%lu"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	-3198976(%rsp), %r11
	.cfi_def_cfa 11, 3199024
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1056, %rsp
	.cfi_def_cfa_offset 3200080
	movl	$1600000, %edx
	xorl	%esi, %esi
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 3200024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	1600016(%rsp), %rbp
	movq	$0, (%rsp)
	movq	$0, 8(%rsp)
	movq	%rbx, %rdi
	call	memset@PLT
	movl	$1600000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L4
	movq	%rbx, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	addq	$8, %r14
	cmpq	%r13, %rsi
	jg	.L5
.L4:
	leaq	compare(%rip), %r13
	movl	$8, %edx
	movq	%rbx, %rdi
	movq	%r13, %rcx
	call	qsort@PLT
	movq	(%rsp), %r8
	movq	16(%rsp), %rcx
	testq	%r8, %r8
	jle	.L15
	movq	%rbx, %rax
	leaq	(%rbx,%r8,8), %rsi
	xorl	%ebx, %ebx
.L9:
	movq	(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L21
.L7:
	addq	$1, %rbx
	addq	$8, %rax
	addq	$1, 1600016(%rsp,%rbx,8)
	cmpq	%rsi, %rax
	je	.L6
	movq	%rdx, %rcx
	movq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jne	.L7
.L21:
	addq	$1, 1600016(%rsp,%rbx,8)
	addq	$8, %rax
	cmpq	%rsi, %rax
	jne	.L9
.L6:
	movq	%r8, %rsi
	movq	%r13, %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rax
	xorl	%r8d, %r8d
	cmpq	%rbx, %rax
	jg	.L10
	addq	$1, %rbx
	subq	%rax, %rbx
	testq	%rbx, %rbx
	jle	.L10
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	0(%rbp), %rax
	testq	%rax, %rax
	je	.L11
	addq	$1, %rdx
	addq	%rax, %r8
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jl	.L13
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	3200024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$3200032, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jl	.L13
	jmp	.L10
.L15:
	xorl	%ebx, %ebx
	jmp	.L6
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lu %lu"
.LC1:
	.string	"%lu"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	-3198976(%rsp), %r11
	.cfi_def_cfa 11, 3199024
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1056, %rsp
	.cfi_def_cfa_offset 3200080
	movl	$1600000, %edx
	xorl	%esi, %esi
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 3200024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	1600016(%rsp), %rbp
	movq	$0, (%rsp)
	movq	$0, 8(%rsp)
	movq	%rbx, %rdi
	call	memset@PLT
	movl	$1600000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L4
	movq	%rbx, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	addq	$8, %r14
	cmpq	%r13, %rsi
	jg	.L5
.L4:
	leaq	compare(%rip), %r13
	movl	$8, %edx
	movq	%rbx, %rdi
	movq	%r13, %rcx
	call	qsort@PLT
	movq	(%rsp), %r8
	movq	16(%rsp), %rcx
	testq	%r8, %r8
	jle	.L15
	movq	%rbx, %rax
	leaq	(%rbx,%r8,8), %rsi
	xorl	%ebx, %ebx
.L9:
	movq	(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L21
.L7:
	addq	$1, %rbx
	addq	$8, %rax
	addq	$1, 1600016(%rsp,%rbx,8)
	cmpq	%rsi, %rax
	je	.L6
	movq	%rdx, %rcx
	movq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jne	.L7
.L21:
	addq	$1, 1600016(%rsp,%rbx,8)
	addq	$8, %rax
	cmpq	%rsi, %rax
	jne	.L9
.L6:
	movq	%r8, %rsi
	movq	%r13, %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rax
	xorl	%r8d, %r8d
	cmpq	%rbx, %rax
	jg	.L10
	addq	$1, %rbx
	subq	%rax, %rbx
	testq	%rbx, %rbx
	jle	.L10
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	0(%rbp), %rax
	testq	%rax, %rax
	je	.L11
	addq	$1, %rdx
	addq	%rax, %r8
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jl	.L13
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	3200024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$3200032, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jl	.L13
	jmp	.L10
.L15:
	xorl	%ebx, %ebx
	jmp	.L6
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
int compare(const void *a,const void *b){
  return *(long*)a - *(long*)b;
}

int main(){
  long n = 0;
  long k = 0;
  long a[200000] = {};
  long i = 0;
  long hoge[200000] = {};
  long hozon = 0; 
  long hogecnt = 0;
  long sum = 0;
  long hogem = 0;
  scanf("%lu %lu",&n,&k);
  for(i=0 ; i < n; i++){
    scanf("%lu",&a[i]);
  }
  qsort(a,n,sizeof(long),compare);
  hozon = a[0];
  for(i=0;i<n;i++){
    if(hozon == a[i]){
      hoge[hogecnt]++;
    }else{
      hozon = a[i];
      hoge[hogecnt+1]++;
      hogecnt++;
    }
  }
  qsort(hoge,n,sizeof(long),compare);
  if((hogecnt+1) <= k){
    sum = 0;
  }else{
    hogem = 0;
    for(i=0;hogem < (hogecnt+1)-k;i++){
      if(hoge[i] != 0){	
      	sum += hoge[i];
      	hogem++;
      }
  	}
  }
  printf("%lu",sum);
  return 0;
}
  
  
4 4
0 1 2 2
 10 3
5 1 3 2 4 1 2 2 3 4
 10 3
5 1 3 4 8 1 2 2 3 4
 10 3
3 2 3 4 8 1 2 2 3 4
 5 2
2 1 4 2 1
 10 1
5 1 3 2 4 1 2 2 3 8
 10 1
5 2 3 2 4 1 2 2 3 8
 4 4
0 1 2 4
 4 4
-1 1 2 4
 4 4
-2 1 2 4

0 3 4 2 1 7 6 0 0 0
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>
int compare(const void *a,const void *b){
  return *(long*)a - *(long*)b;
}

int main(){
  long n = 0;
  long k = 0;
  long a[200000] = {};
  long i = 0;
  long hoge[200000] = {};
  long hozon = 0; 
  long hogecnt = 0;
  long sum = 0;
  long hogem = 0;
  scanf("%lu %lu",&n,&k);
  for(i=0 ; i < n; i++){
    scanf("%lu",&a[i]);
  }
  qsort(a,n,sizeof(long),compare);
  hozon = a[0];
  for(i=0;i<n;i++){
    if(hozon == a[i]){
      hoge[hogecnt]++;
    }else{
      hozon = a[i];
      hoge[hogecnt+1]++;
      hogecnt++;
    }
  }
  qsort(hoge,n,sizeof(long),compare);
  if((hogecnt+1) <= k){
    sum = 0;
  }else{
    hogem = 0;
    for(i=0;hogem < (hogecnt+1)-k;i++){
      if(hoge[i] != 0){	
      	sum += hoge[i];
      	hogem++;
      }
  	}
  }
  printf("%lu",sum);
  return 0;
}
  
  ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%lu %lu"
.LC1:
	.string	"%lu"
	.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
	leaq	-3198976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -3200072(%rbp)
	movq	$0, -3200064(%rbp)
	leaq	-3200016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200056(%rbp)
	leaq	-1600016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200048(%rbp)
	movq	$0, -3200040(%rbp)
	movq	$0, -3200032(%rbp)
	movq	$0, -3200024(%rbp)
	leaq	-3200064(%rbp), %rdx
	leaq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -3200056(%rbp)
	jmp	.L4
.L5:
	leaq	-3200016(%rbp), %rdx
	movq	-3200056(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -3200056(%rbp)
.L4:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L5
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-3200016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200016(%rbp), %rax
	movq	%rax, -3200048(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L6
.L9:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	cmpq	%rax, -3200048(%rbp)
	jne	.L7
	movq	-3200040(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-3200040(%rbp), %rax
	movq	%rdx, -1600016(%rbp,%rax,8)
	jmp	.L8
.L7:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	movq	%rax, -3200048(%rbp)
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-1600016(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -1600016(%rbp,%rax,8)
	addq	$1, -3200040(%rbp)
.L8:
	addq	$1, -3200056(%rbp)
.L6:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L9
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-1600016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200064(%rbp), %rax
	cmpq	%rax, -3200040(%rbp)
	jge	.L10
	movq	$0, -3200032(%rbp)
	jmp	.L11
.L10:
	movq	$0, -3200024(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L12
.L14:
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -3200032(%rbp)
	addq	$1, -3200024(%rbp)
.L13:
	addq	$1, -3200056(%rbp)
.L12:
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-3200064(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -3200024(%rbp)
	jl	.L14
.L11:
	movq	-3200032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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	compare
	.type	compare, @function
compare:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%lu %lu"
.LC1:
	.string	"%lu"
	.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
	leaq	-3198976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -3200072(%rbp)
	movq	$0, -3200064(%rbp)
	leaq	-3200016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200056(%rbp)
	leaq	-1600016(%rbp), %rax
	movl	$1600000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	$0, -3200048(%rbp)
	movq	$0, -3200040(%rbp)
	movq	$0, -3200032(%rbp)
	movq	$0, -3200024(%rbp)
	leaq	-3200064(%rbp), %rdx
	leaq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -3200056(%rbp)
	jmp	.L4
.L5:
	leaq	-3200016(%rbp), %rdx
	movq	-3200056(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -3200056(%rbp)
.L4:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L5
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-3200016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200016(%rbp), %rax
	movq	%rax, -3200048(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L6
.L9:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	cmpq	%rax, -3200048(%rbp)
	jne	.L7
	movq	-3200040(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movq	-3200040(%rbp), %rax
	movq	%rdx, -1600016(%rbp,%rax,8)
	jmp	.L8
.L7:
	movq	-3200056(%rbp), %rax
	movq	-3200016(%rbp,%rax,8), %rax
	movq	%rax, -3200048(%rbp)
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-1600016(%rbp,%rax,8), %rdx
	addq	$1, %rdx
	movq	%rdx, -1600016(%rbp,%rax,8)
	addq	$1, -3200040(%rbp)
.L8:
	addq	$1, -3200056(%rbp)
.L6:
	movq	-3200072(%rbp), %rax
	cmpq	%rax, -3200056(%rbp)
	jl	.L9
	movq	-3200072(%rbp), %rax
	movq	%rax, %rsi
	leaq	-1600016(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-3200064(%rbp), %rax
	cmpq	%rax, -3200040(%rbp)
	jge	.L10
	movq	$0, -3200032(%rbp)
	jmp	.L11
.L10:
	movq	$0, -3200024(%rbp)
	movq	$0, -3200056(%rbp)
	jmp	.L12
.L14:
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-3200056(%rbp), %rax
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -3200032(%rbp)
	addq	$1, -3200024(%rbp)
.L13:
	addq	$1, -3200056(%rbp)
.L12:
	movq	-3200040(%rbp), %rax
	addq	$1, %rax
	movq	-3200064(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -3200024(%rbp)
	jl	.L14
.L11:
	movq	-3200032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	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:
