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_int(const void *a, const void *b){
    return *(int*)a - *(int*)b;
}
int main(){
    int n,m,k,a[200001]={0},kind=0,cnt=0;
    scanf("%d%d",&n,&k);
    for(int i=0; i<n; i++){
        scanf("%d",&m);
        if(!a[m]){ kind++; }
        a[m]++;
    }
    if( kind <= k ){ printf("0\n"); return 0; }

    qsort( a, 200001, sizeof(int), compare_int );
    for(int i=0; i<200000; i++){
        if( a[i] ){ cnt+=a[i]; kind--; }
        if( kind <= k ){ break; }
    }
    printf("%d\n",cnt);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.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	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800016(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L4
.L6:
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800040(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L5
	addl	$1, -800032(%rbp)
.L5:
	movl	-800040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-800016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800016(%rbp,%rax,4)
	addl	$1, -800024(%rbp)
.L4:
	movl	-800044(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L6
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jg	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L7:
	leaq	-800016(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$200001, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800020(%rbp)
	jmp	.L9
.L13:
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800028(%rbp)
	subl	$1, -800032(%rbp)
.L10:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jle	.L16
	addl	$1, -800020(%rbp)
.L9:
	cmpl	$199999, -800020(%rbp)
	jle	.L13
	jmp	.L12
.L16:
	nop
.L12:
	movl	-800028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	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
.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_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rdx
	leaq	4(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	xorl	%r14d, %r14d
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdx
	movl	16(%rsp,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %ebp
	addl	$1, %eax
	addl	$1, %r14d
	movl	%eax, 16(%rsp,%rdx,4)
	cmpl	%r14d, 4(%rsp)
	jg	.L6
.L4:
	cmpl	%ebp, 12(%rsp)
	jge	.L20
	leaq	compare_int(%rip), %rcx
	movl	$200001, %esi
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	leaq	800016(%rsp), %rsi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$4, %rax
	cmpq	%rax, %rsi
	je	.L10
.L11:
	movl	(%rax), %edx
	testl	%edx, %edx
	je	.L9
	addl	%edx, %r8d
	subl	$1, %ebp
.L9:
	cmpl	%ebp, %ecx
	jl	.L21
.L10:
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$800032, %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
.L20:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L13:
	xorl	%ebp, %ebp
	jmp	.L4
.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_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare_int, .-compare_int
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rdx
	leaq	4(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	xorl	%r14d, %r14d
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdx
	movl	16(%rsp,%rdx,4), %eax
	cmpl	$1, %eax
	adcl	$0, %ebp
	addl	$1, %eax
	addl	$1, %r14d
	movl	%eax, 16(%rsp,%rdx,4)
	cmpl	%r14d, 4(%rsp)
	jg	.L6
.L4:
	cmpl	%ebp, 12(%rsp)
	jge	.L20
	leaq	compare_int(%rip), %rcx
	movl	$200001, %esi
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	leaq	800016(%rsp), %rsi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$4, %rax
	cmpq	%rax, %rsi
	je	.L10
.L11:
	movl	(%rax), %edx
	testl	%edx, %edx
	je	.L9
	addl	%edx, %r8d
	subl	$1, %ebp
.L9:
	cmpl	%ebp, %ecx
	jl	.L21
.L10:
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$800032, %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
.L20:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L13:
	xorl	%ebp, %ebp
	jmp	.L4
.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_int(const void *a, const void *b){
    return *(int*)a - *(int*)b;
}
int main(){
    int n,m,k,a[200001]={0},kind=0,cnt=0;
    scanf("%d%d",&n,&k);
    for(int i=0; i<n; i++){
        scanf("%d",&m);
        if(!a[m]){ kind++; }
        a[m]++;
    }
    if( kind <= k ){ printf("0\n"); return 0; }

    qsort( a, 200001, sizeof(int), compare_int );
    for(int i=0; i<200000; i++){
        if( a[i] ){ cnt+=a[i]; kind--; }
        if( kind <= k ){ break; }
    }
    printf("%d\n",cnt);
    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_int(const void *a, const void *b){
    return *(int*)a - *(int*)b;
}
int main(){
    int n,m,k,a[200001]={0},kind=0,cnt=0;
    scanf("%d%d",&n,&k);
    for(int i=0; i<n; i++){
        scanf("%d",&m);
        if(!a[m]){ kind++; }
        a[m]++;
    }
    if( kind <= k ){ printf("0\n"); return 0; }

    qsort( a, 200001, sizeof(int), compare_int );
    for(int i=0; i<200000; i++){
        if( a[i] ){ cnt+=a[i]; kind--; }
        if( kind <= k ){ break; }
    }
    printf("%d\n",cnt);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.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	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800016(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L4
.L6:
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800040(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L5
	addl	$1, -800032(%rbp)
.L5:
	movl	-800040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-800016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800016(%rbp,%rax,4)
	addl	$1, -800024(%rbp)
.L4:
	movl	-800044(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L6
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jg	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L7:
	leaq	-800016(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$200001, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800020(%rbp)
	jmp	.L9
.L13:
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800028(%rbp)
	subl	$1, -800032(%rbp)
.L10:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jle	.L16
	addl	$1, -800020(%rbp)
.L9:
	cmpl	$199999, -800020(%rbp)
	jle	.L13
	jmp	.L12
.L16:
	nop
.L12:
	movl	-800028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	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
.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_int
	.type	compare_int, @function
compare_int:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.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	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800016(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -800032(%rbp)
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rdx
	leaq	-800044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800024(%rbp)
	jmp	.L4
.L6:
	leaq	-800040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800040(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L5
	addl	$1, -800032(%rbp)
.L5:
	movl	-800040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-800016(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -800016(%rbp,%rax,4)
	addl	$1, -800024(%rbp)
.L4:
	movl	-800044(%rbp), %eax
	cmpl	%eax, -800024(%rbp)
	jl	.L6
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jg	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L7:
	leaq	-800016(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$200001, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800020(%rbp)
	jmp	.L9
.L13:
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-800020(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	addl	%eax, -800028(%rbp)
	subl	$1, -800032(%rbp)
.L10:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jle	.L16
	addl	$1, -800020(%rbp)
.L9:
	cmpl	$199999, -800020(%rbp)
	jle	.L13
	jmp	.L12
.L16:
	nop
.L12:
	movl	-800028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	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
.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:
