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*)a-*(int*)b;
}

int main()
{
  int n,k;
  int a[200001];
  int i;
  int b[200001];
  int c=0;
  int ans=0;
  scanf("%d%d",&n,&k);
  for(i=0;i<n;i++){
    b[i]=0;
  }
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    if(b[a[i]-1]==0) c++;
    b[a[i]-1]++;
  }
  qsort(b,n,sizeof(int),compare_int);
  i=0;
  while(c>k){
    if(b[i]!=0){
      c--;
      ans+=b[i];
    }
    i++;
  }
  printf("%d",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	(%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"
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 1600096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	leaq	800032(%rsp), %rbp
	leaq	0(,%rsi,4), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	call	memset@PLT
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	8(%rsp), %rsi
	subl	$1, %eax
	cltq
	movl	800032(%rsp,%rax,4), %edx
	cmpl	$1, %edx
	adcl	$0, %r12d
	addl	$1, %edx
	addq	$1, %rbx
	movl	%edx, 800032(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L6
.L4:
	movl	$4, %edx
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	xorl	%r8d, %r8d
	cmpl	%r12d, %edx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	0(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	subl	$1, %r12d
	addl	%eax, %r8d
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
.L7:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1600048, %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
.L8:
	.cfi_restore_state
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	leaq	800032(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L4
.L16:
	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	(%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"
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 1600096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	leaq	800032(%rsp), %rbp
	leaq	0(,%rsi,4), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	call	memset@PLT
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	8(%rsp), %rsi
	subl	$1, %eax
	cltq
	movl	800032(%rsp,%rax,4), %edx
	cmpl	$1, %edx
	adcl	$0, %r12d
	addl	$1, %edx
	addq	$1, %rbx
	movl	%edx, 800032(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L6
.L4:
	movl	$4, %edx
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	xorl	%r8d, %r8d
	cmpl	%r12d, %edx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	0(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	subl	$1, %r12d
	addl	%eax, %r8d
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
.L7:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1600048, %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
.L8:
	.cfi_restore_state
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	leaq	800032(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L4
.L16:
	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	(%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"
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 1600096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	leaq	800032(%rsp), %rbp
	leaq	0(,%rsi,4), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	call	memset@PLT
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	8(%rsp), %rsi
	subl	$1, %eax
	cltq
	movl	800032(%rsp,%rax,4), %edx
	cmpl	$1, %edx
	adcl	$0, %r12d
	addl	$1, %edx
	addq	$1, %rbx
	movl	%edx, 800032(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L6
.L4:
	movl	$4, %edx
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	xorl	%r8d, %r8d
	cmpl	%r12d, %edx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	0(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	subl	$1, %r12d
	addl	%eax, %r8d
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
.L7:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1600048, %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
.L8:
	.cfi_restore_state
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	leaq	800032(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L4
.L16:
	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*)a-*(int*)b;
}

int main()
{
  int n,k;
  int a[200001];
  int i;
  int b[200001];
  int c=0;
  int ans=0;
  scanf("%d%d",&n,&k);
  for(i=0;i<n;i++){
    b[i]=0;
  }
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    if(b[a[i]-1]==0) c++;
    b[a[i]-1]++;
  }
  qsort(b,n,sizeof(int),compare_int);
  i=0;
  while(c>k){
    if(b[i]!=0){
      c--;
      ans+=b[i];
    }
    i++;
  }
  printf("%d",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*)a-*(int*)b;
}

int main()
{
  int n,k;
  int a[200001];
  int i;
  int b[200001];
  int c=0;
  int ans=0;
  scanf("%d%d",&n,&k);
  for(i=0;i<n;i++){
    b[i]=0;
  }
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    if(b[a[i]-1]==0) c++;
    b[a[i]-1]++;
  }
  qsort(b,n,sizeof(int),compare_int);
  i=0;
  while(c>k){
    if(b[i]!=0){
      c--;
      ans+=b[i];
    }
    i++;
  }
  printf("%d",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:

5 2
1 1 2 2 5

1
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*)a-*(int*)b;
}

int main()
{
  int n,k;
  int a[200001];
  int i;
  int b[200001];
  int c=0;
  int ans=0;
  scanf("%d%d",&n,&k);
  for(i=0;i<n;i++){
    b[i]=0;
  }
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    if(b[a[i]-1]==0) c++;
    b[a[i]-1]++;
  }
  qsort(b,n,sizeof(int),compare_int);
  i=0;
  while(c>k){
    if(b[i]!=0){
      c--;
      ans+=b[i];
    }
    i++;
  }
  printf("%d",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	(%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"
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 1600096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	leaq	800032(%rsp), %rbp
	leaq	0(,%rsi,4), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	call	memset@PLT
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	8(%rsp), %rsi
	subl	$1, %eax
	cltq
	movl	800032(%rsp,%rax,4), %edx
	cmpl	$1, %edx
	adcl	$0, %r12d
	addl	$1, %edx
	addq	$1, %rbx
	movl	%edx, 800032(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L6
.L4:
	movl	$4, %edx
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	xorl	%r8d, %r8d
	cmpl	%r12d, %edx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	0(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	subl	$1, %r12d
	addl	%eax, %r8d
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
.L7:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1600048, %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
.L8:
	.cfi_restore_state
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	leaq	800032(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L4
.L16:
	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	(%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"
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 1600096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	leaq	800032(%rsp), %rbp
	leaq	0(,%rsi,4), %rdx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	call	memset@PLT
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	8(%rsp), %rsi
	subl	$1, %eax
	cltq
	movl	800032(%rsp,%rax,4), %edx
	cmpl	$1, %edx
	adcl	$0, %r12d
	addl	$1, %edx
	addq	$1, %rbx
	movl	%edx, 800032(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L6
.L4:
	movl	$4, %edx
	leaq	compare_int(%rip), %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	xorl	%r8d, %r8d
	cmpl	%r12d, %edx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	movl	0(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	subl	$1, %r12d
	addl	%eax, %r8d
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
.L7:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1600048, %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
.L8:
	.cfi_restore_state
	addq	$4, %rbp
	cmpl	%edx, %r12d
	jg	.L10
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	leaq	800032(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	jmp	.L4
.L16:
	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:
```