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, x, cnt=0, a[100]={0};
    long long sum=0;

    scanf("%d%d", &n, &x);
    for(int i=0; i<n; i++){ scanf("%d", &a[i]); sum+=a[i]; }

  	//お菓子の方が多い -> 1人犠牲になってもらう
    if( x > sum ){ printf("%d\n", n-1); return 0; }
  	
  	//お菓子の方が少ない -> 少ない人から順に配る
    qsort( a, n, sizeof(int), compare_int );
  	for(int i=0; i<n; i++){
     	x -= a[i];
      	if	   ( x >  0 ){ cnt++; }
      	else if( x == 0 ){ printf("%d\n", i+1);	return 0; }	//ぴったり配りきった
      	else			 { printf("%d\n", cnt); return 0; }	//お菓子が足りなかった
    }
  	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	"%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
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -424(%rbp)
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -424(%rbp)
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-440(%rbp), %eax
	cltq
	cmpq	%rax, -424(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-444(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -428(%rbp)
	jmp	.L8
.L12:
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -440(%rbp)
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	addl	$1, -436(%rbp)
	jmp	.L15
.L9:
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L11:
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L15:
	addl	$1, -428(%rbp)
.L8:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"%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
	movl	$50, %ecx
	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
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	12(%rsp), %rdx
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	0(%rbp,%rbx,4), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	0(%rbp,%rbx,4), %rax
	movslq	8(%rsp), %rsi
	addq	$1, %rbx
	addq	%rax, %r12
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	12(%rsp), %rax
	cmpq	%r12, %rax
	jg	.L16
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L7
	movl	12(%rsp), %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L7
.L9:
	subl	0(%rbp,%rax,4), %ecx
	movl	%eax, %edx
	testl	%ecx, %ecx
	jg	.L17
	movl	%ecx, 12(%rsp)
	jne	.L10
	addl	$1, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$440, %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
.L16:
	.cfi_restore_state
	leal	-1(%rsi), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L7
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
.L18:
	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	"%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
	movl	$50, %ecx
	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
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	12(%rsp), %rdx
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	0(%rbp,%rbx,4), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	0(%rbp,%rbx,4), %rax
	movslq	8(%rsp), %rsi
	addq	$1, %rbx
	addq	%rax, %r12
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movslq	12(%rsp), %rax
	cmpq	%r12, %rax
	jg	.L16
	leaq	compare_int(%rip), %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L7
	movl	12(%rsp), %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L7
.L9:
	subl	0(%rbp,%rax,4), %ecx
	movl	%eax, %edx
	testl	%ecx, %ecx
	jg	.L17
	movl	%ecx, 12(%rsp)
	jne	.L10
	addl	$1, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$440, %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
.L16:
	.cfi_restore_state
	leal	-1(%rsi), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L7
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
.L18:
	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, x, cnt=0, a[100]={0};
    long long sum=0;

    scanf("%d%d", &n, &x);
    for(int i=0; i<n; i++){ scanf("%d", &a[i]); sum+=a[i]; }

  	//お菓子の方が多い -> 1人犠牲になってもらう
    if( x > sum ){ printf("%d\n", n-1); return 0; }
  	
  	//お菓子の方が少ない -> 少ない人から順に配る
    qsort( a, n, sizeof(int), compare_int );
  	for(int i=0; i<n; i++){
     	x -= a[i];
      	if	   ( x >  0 ){ cnt++; }
      	else if( x == 0 ){ printf("%d\n", i+1);	return 0; }	//ぴったり配りきった
      	else			 { printf("%d\n", cnt); return 0; }	//お菓子が足りなかった
    }
  	return 0;
}
3 70
20 30 5
 3 10
20 18 10
 2 10
29 20
 4 1111
1 5 100 1000
 4 1111
-1 2 110 1000
 3 70
20 49 5
 3 10
20 9 10
 2 10
30 20
 3 70
4 49 5
 3 10
20 4 10

2
 1
 0
 3
 4
 2
 1
 0
 2
 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>

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

int main(){
    int n, x, cnt=0, a[100]={0};
    long long sum=0;

    scanf("%d%d", &n, &x);
    for(int i=0; i<n; i++){ scanf("%d", &a[i]); sum+=a[i]; }

  	//お菓子の方が多い -> 1人犠牲になってもらう
    if( x > sum ){ printf("%d\n", n-1); return 0; }
  	
  	//お菓子の方が少ない -> 少ない人から順に配る
    qsort( a, n, sizeof(int), compare_int );
  	for(int i=0; i<n; i++){
     	x -= a[i];
      	if	   ( x >  0 ){ cnt++; }
      	else if( x == 0 ){ printf("%d\n", i+1);	return 0; }	//ぴったり配りきった
      	else			 { printf("%d\n", cnt); return 0; }	//お菓子が足りなかった
    }
  	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	"%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
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -424(%rbp)
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -424(%rbp)
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-440(%rbp), %eax
	cltq
	cmpq	%rax, -424(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-444(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -428(%rbp)
	jmp	.L8
.L12:
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -440(%rbp)
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	addl	$1, -436(%rbp)
	jmp	.L15
.L9:
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L11:
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L15:
	addl	$1, -428(%rbp)
.L8:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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.
val
	.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	"%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
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -424(%rbp)
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -424(%rbp)
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-440(%rbp), %eax
	cltq
	cmpq	%rax, -424(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-444(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -428(%rbp)
	jmp	.L8
.L12:
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -440(%rbp)
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	addl	$1, -436(%rbp)
	jmp	.L15
.L9:
	movl	-440(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L11:
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L13
.L15:
	addl	$1, -428(%rbp)
.L8:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L12
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
