Given the following C code and 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*)b - *(int*)a;
}
int main(void){
    int n, k, num[200000+5]={0};
    scanf("%d %d", &n, &k);
    for(int i=0; i<n; i++){
        int a;
        scanf("%d", &a);
        num[a-1]++;
    }
    
    int cnt=0;
    for(int i=0; i<200000; i++){
        if(num[i]>0)cnt++;
    }
    
    int ans=0;
    if(k<cnt){
        qsort(num, 200000, sizeof(int), compare_int);
        // for(int i=0; i<5; i++)printf("%d ", num[i]);
        for(int i=cnt-1; i>k-1; i--)ans+=num[i];
    }
    printf("%d\n", ans);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	movl	$800020, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	8(%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	.L4
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebx, 4(%rsp)
	jg	.L5
.L4:
	pxor	%xmm1, %xmm1
	movq	%rbp, %rax
	leaq	800016(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpl	%ebx, 8(%rsp)
	jl	.L20
.L7:
	xorl	%edx, %edx
.L11:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	movl	$4, %edx
	movl	$200000, %esi
	call	qsort@PLT
	movl	8(%rsp), %edi
	leal	-1(%rbx), %ecx
	cmpl	%ecx, %edi
	jg	.L7
	movl	%ebx, %r8d
	subl	%edi, %r8d
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movslq	%ebx, %rbx
	movl	%r8d, %esi
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	leaq	-16(%rbp,%rbx,4), %rdx
	leal	-1(%rsi), %r9d
	leaq	-16(%rdx), %rax
	salq	$4, %r9
	movq	%rax, %rsi
	subq	%r9, %rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L9:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	pshufd	$27, %xmm1, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L22
	movdqa	%xmm0, %xmm1
	movl	%r8d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r8d
	je	.L11
.L8:
	movslq	%ecx, %rax
	addl	16(%rsp,%rax,4), %edx
	leal	-1(%rcx), %eax
	cmpl	%edi, %eax
	jl	.L11
	cltq
	subl	$2, %ecx
	addl	16(%rsp,%rax,4), %edx
	cmpl	%ecx, %edi
	jg	.L11
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
	jmp	.L11
.L14:
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	movl	$800020, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	8(%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	.L4
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebx, 4(%rsp)
	jg	.L5
.L4:
	pxor	%xmm1, %xmm1
	movq	%rbp, %rax
	leaq	800016(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpl	%ebx, 8(%rsp)
	jl	.L20
.L7:
	xorl	%edx, %edx
.L11:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	movl	$4, %edx
	movl	$200000, %esi
	call	qsort@PLT
	movl	8(%rsp), %edi
	leal	-1(%rbx), %ecx
	cmpl	%ecx, %edi
	jg	.L7
	movl	%ebx, %r8d
	subl	%edi, %r8d
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movslq	%ebx, %rbx
	movl	%r8d, %esi
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	leaq	-16(%rbp,%rbx,4), %rdx
	leal	-1(%rsi), %r9d
	leaq	-16(%rdx), %rax
	salq	$4, %r9
	movq	%rax, %rsi
	subq	%r9, %rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L9:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	pshufd	$27, %xmm1, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L22
	movdqa	%xmm0, %xmm1
	movl	%r8d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r8d
	je	.L11
.L8:
	movslq	%ecx, %rax
	addl	16(%rsp,%rax,4), %edx
	leal	-1(%rcx), %eax
	cmpl	%edi, %eax
	jl	.L11
	cltq
	subl	$2, %ecx
	addl	16(%rsp,%rax,4), %edx
	cmpl	%ecx, %edi
	jg	.L11
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
	jmp	.L11
.L14:
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	movl	$800020, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	8(%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	.L4
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebx, 4(%rsp)
	jg	.L5
.L4:
	pxor	%xmm1, %xmm1
	movq	%rbp, %rax
	leaq	800016(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpl	%ebx, 8(%rsp)
	jl	.L20
.L7:
	xorl	%edx, %edx
.L11:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	movl	$4, %edx
	movl	$200000, %esi
	call	qsort@PLT
	movl	8(%rsp), %edi
	leal	-1(%rbx), %ecx
	cmpl	%ecx, %edi
	jg	.L7
	movl	%ebx, %r8d
	subl	%edi, %r8d
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movslq	%ebx, %rbx
	movl	%r8d, %esi
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	leaq	-16(%rbp,%rbx,4), %rdx
	leal	-1(%rsi), %r9d
	leaq	-16(%rdx), %rax
	salq	$4, %r9
	movq	%rax, %rsi
	subq	%r9, %rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L9:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	pshufd	$27, %xmm1, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L22
	movdqa	%xmm0, %xmm1
	movl	%r8d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r8d
	je	.L11
.L8:
	movslq	%ecx, %rax
	addl	16(%rsp,%rax,4), %edx
	leal	-1(%rcx), %eax
	cmpl	%edi, %eax
	jl	.L11
	cltq
	subl	$2, %ecx
	addl	16(%rsp,%rax,4), %edx
	cmpl	%ecx, %edi
	jg	.L11
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
	jmp	.L11
.L14:
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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:
```
```c
#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b){
    return *(int*)b - *(int*)a;
}
int main(void){
    int n, k, num[200000+5]={0};
    scanf("%d %d", &n, &k);
    for(int i=0; i<n; i++){
        int a;
        scanf("%d", &a);
        num[a-1]++;
    }
    
    int cnt=0;
    for(int i=0; i<200000; i++){
        if(num[i]>0)cnt++;
    }
    
    int ans=0;
    if(k<cnt){
        qsort(num, 200000, sizeof(int), compare_int);
        // for(int i=0; i<5; i++)printf("%d ", num[i]);
        for(int i=cnt-1; i>k-1; i--)ans+=num[i];
    }
    printf("%d\n", ans);
    return 0;
}
```
Given the following C 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*)b - *(int*)a;
}
int main(void){
    int n, k, num[200000+5]={0};
    scanf("%d %d", &n, &k);
    for(int i=0; i<n; i++){
        int a;
        scanf("%d", &a);
        num[a-1]++;
    }
    
    int cnt=0;
    for(int i=0; i<200000; i++){
        if(num[i]>0)cnt++;
    }
    
    int ans=0;
    if(k<cnt){
        qsort(num, 200000, sizeof(int), compare_int);
        // for(int i=0; i<5; i++)printf("%d ", num[i]);
        for(int i=cnt-1; i>k-1; i--)ans+=num[i];
    }
    printf("%d\n", ans);
    return 0;
}
```

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.
Optimized Assembly Code:

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 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*)b - *(int*)a;
}
int main(void){
    int n, k, num[200000+5]={0};
    scanf("%d %d", &n, &k);
    for(int i=0; i<n; i++){
        int a;
        scanf("%d", &a);
        num[a-1]++;
    }
    
    int cnt=0;
    for(int i=0; i<200000; i++){
        if(num[i]>0)cnt++;
    }
    
    int ans=0;
    if(k<cnt){
        qsort(num, 200000, sizeof(int), compare_int);
        // for(int i=0; i<5; i++)printf("%d ", num[i]);
        for(int i=cnt-1; i>k-1; i--)ans+=num[i];
    }
    printf("%d\n", ans);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	movl	$800020, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	8(%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	.L4
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebx, 4(%rsp)
	jg	.L5
.L4:
	pxor	%xmm1, %xmm1
	movq	%rbp, %rax
	leaq	800016(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpl	%ebx, 8(%rsp)
	jl	.L20
.L7:
	xorl	%edx, %edx
.L11:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	movl	$4, %edx
	movl	$200000, %esi
	call	qsort@PLT
	movl	8(%rsp), %edi
	leal	-1(%rbx), %ecx
	cmpl	%ecx, %edi
	jg	.L7
	movl	%ebx, %r8d
	subl	%edi, %r8d
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movslq	%ebx, %rbx
	movl	%r8d, %esi
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	leaq	-16(%rbp,%rbx,4), %rdx
	leal	-1(%rsi), %r9d
	leaq	-16(%rdx), %rax
	salq	$4, %r9
	movq	%rax, %rsi
	subq	%r9, %rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L9:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	pshufd	$27, %xmm1, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L22
	movdqa	%xmm0, %xmm1
	movl	%r8d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r8d
	je	.L11
.L8:
	movslq	%ecx, %rax
	addl	16(%rsp,%rax,4), %edx
	leal	-1(%rcx), %eax
	cmpl	%edi, %eax
	jl	.L11
	cltq
	subl	$2, %ecx
	addl	16(%rsp,%rax,4), %edx
	cmpl	%ecx, %edi
	jg	.L11
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
	jmp	.L11
.L14:
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	movl	$800020, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	8(%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	.L4
	xorl	%ebx, %ebx
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebx, 4(%rsp)
	jg	.L5
.L4:
	pxor	%xmm1, %xmm1
	movq	%rbp, %rax
	leaq	800016(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpl	%ebx, 8(%rsp)
	jl	.L20
.L7:
	xorl	%edx, %edx
.L11:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	movl	$4, %edx
	movl	$200000, %esi
	call	qsort@PLT
	movl	8(%rsp), %edi
	leal	-1(%rbx), %ecx
	cmpl	%ecx, %edi
	jg	.L7
	movl	%ebx, %r8d
	subl	%edi, %r8d
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movslq	%ebx, %rbx
	movl	%r8d, %esi
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
	leaq	-16(%rbp,%rbx,4), %rdx
	leal	-1(%rsi), %r9d
	leaq	-16(%rdx), %rax
	salq	$4, %r9
	movq	%rax, %rsi
	subq	%r9, %rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$16, %rax
.L9:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	pshufd	$27, %xmm1, %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rsi
	jne	.L22
	movdqa	%xmm0, %xmm1
	movl	%r8d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r8d
	je	.L11
.L8:
	movslq	%ecx, %rax
	addl	16(%rsp,%rax,4), %edx
	leal	-1(%rcx), %eax
	cmpl	%edi, %eax
	jl	.L11
	cltq
	subl	$2, %ecx
	addl	16(%rsp,%rax,4), %edx
	cmpl	%ecx, %edi
	jg	.L11
	movslq	%ecx, %rcx
	addl	16(%rsp,%rcx,4), %edx
	jmp	.L11
.L14:
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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:
```