Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdlib.h>
#include <stdio.h>
int compare(const void *a,const  void*b){
    if(*(int *)a>*(int *)b)return 1;
    return -1;
}
int main()
{   int n;
    scanf("%d",&n);
    int a[n];
    long long sub=0;
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        sub+=a[i];
    }
    qsort(a,n,sizeof(int),compare);
    int ans=1;
    for(int i=n-1;i>=0;i--){
        sub-=a[i];
        if(a[i]>2*sub){
            break;
        }else{
            ans++;
        }
    }
    printf("%d",ans);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L14
	movq	%r14, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	(%r12), %rax
	addq	$4, %r12
	addq	%rax, %rbx
	movl	-60(%rbp), %eax
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movq	%r14, %rdi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L15
	movslq	%edi, %rax
	movl	$1, %edx
	addl	$1, %edi
	leaq	(%r14,%rax,4), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %edx
	subq	$4, %rcx
	cmpl	%edx, %edi
	je	.L11
.L12:
	movslq	-4(%rcx), %rax
	subq	%rax, %rbx
	leaq	(%rbx,%rbx), %rsi
	cmpq	%rsi, %rax
	jle	.L24
.L11:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L14:
	xorl	%ebx, %ebx
	jmp	.L9
.L15:
	movl	$1, %edx
	jmp	.L11
.L25:
	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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L14
	movq	%r14, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	(%r12), %rax
	addq	$4, %r12
	addq	%rax, %rbx
	movl	-60(%rbp), %eax
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movq	%r14, %rdi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L15
	movslq	%edi, %rax
	movl	$1, %edx
	addl	$1, %edi
	leaq	(%r14,%rax,4), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %edx
	subq	$4, %rcx
	cmpl	%edx, %edi
	je	.L11
.L12:
	movslq	-4(%rcx), %rax
	subq	%rax, %rbx
	leaq	(%rbx,%rbx), %rsi
	cmpq	%rsi, %rax
	jle	.L24
.L11:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L14:
	xorl	%ebx, %ebx
	jmp	.L9
.L15:
	movl	$1, %edx
	jmp	.L11
.L25:
	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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L14
	movq	%r14, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	(%r12), %rax
	addq	$4, %r12
	addq	%rax, %rbx
	movl	-60(%rbp), %eax
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movq	%r14, %rdi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L15
	movslq	%edi, %rax
	movl	$1, %edx
	addl	$1, %edi
	leaq	(%r14,%rax,4), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %edx
	subq	$4, %rcx
	cmpl	%edx, %edi
	je	.L11
.L12:
	movslq	-4(%rcx), %rax
	subq	%rax, %rbx
	leaq	(%rbx,%rbx), %rsi
	cmpq	%rsi, %rax
	jle	.L24
.L11:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L14:
	xorl	%ebx, %ebx
	jmp	.L9
.L15:
	movl	$1, %edx
	jmp	.L11
.L25:
	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 <stdlib.h>
#include <stdio.h>
int compare(const void *a,const  void*b){
    if(*(int *)a>*(int *)b)return 1;
    return -1;
}
int main()
{   int n;
    scanf("%d",&n);
    int a[n];
    long long sub=0;
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        sub+=a[i];
    }
    qsort(a,n,sizeof(int),compare);
    int ans=1;
    for(int i=n-1;i>=0;i--){
        sub-=a[i];
        if(a[i]>2*sub){
            break;
        }else{
            ans++;
        }
    }
    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 <stdlib.h>
#include <stdio.h>
int compare(const void *a,const  void*b){
    if(*(int *)a>*(int *)b)return 1;
    return -1;
}
int main()
{   int n;
    scanf("%d",&n);
    int a[n];
    long long sub=0;
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        sub+=a[i];
    }
    qsort(a,n,sizeof(int),compare);
    int ans=1;
    for(int i=n-1;i>=0;i--){
        sub-=a[i];
        if(a[i]>2*sub){
            break;
        }else{
            ans++;
        }
    }
    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
1 1 1 1 2
 3
3 1 3
 6
40 1 26 2 7 20
 3
1 1 3
 6
7 2 21 2 9 20
 5
1 2 1 1 2
 6
40 1 26 2 9 20
 5
1 2 1 0 2
 6
40 1 21 2 9 20
 5
1 1 1 0 2

5 2 4 3 6 5 4 4 4 4
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdlib.h>
#include <stdio.h>
int compare(const void *a,const  void*b){
    if(*(int *)a>*(int *)b)return 1;
    return -1;
}
int main()
{   int n;
    scanf("%d",&n);
    int a[n];
    long long sub=0;
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        sub+=a[i];
    }
    qsort(a,n,sizeof(int),compare);
    int ans=1;
    for(int i=n-1;i>=0;i--){
        sub-=a[i];
        if(a[i]>2*sub){
            break;
        }else{
            ans++;
        }
    }
    printf("%d",ans);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L14
	movq	%r14, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	(%r12), %rax
	addq	$4, %r12
	addq	%rax, %rbx
	movl	-60(%rbp), %eax
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movq	%r14, %rdi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L15
	movslq	%edi, %rax
	movl	$1, %edx
	addl	$1, %edi
	leaq	(%r14,%rax,4), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %edx
	subq	$4, %rcx
	cmpl	%edx, %edi
	je	.L11
.L12:
	movslq	-4(%rcx), %rax
	subq	%rax, %rbx
	leaq	(%rbx,%rbx), %rsi
	cmpq	%rsi, %rax
	jle	.L24
.L11:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L14:
	xorl	%ebx, %ebx
	jmp	.L9
.L15:
	movl	$1, %edx
	jmp	.L11
.L25:
	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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L22
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L23
.L8:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L14
	movq	%r14, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	(%r12), %rax
	addq	$4, %r12
	addq	%rax, %rbx
	movl	-60(%rbp), %eax
	cmpl	%r13d, %eax
	jg	.L10
	movslq	%eax, %rsi
.L9:
	movq	%r14, %rdi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	-60(%rbp), %edi
	testl	%edi, %edi
	jle	.L15
	movslq	%edi, %rax
	movl	$1, %edx
	addl	$1, %edi
	leaq	(%r14,%rax,4), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %edx
	subq	$4, %rcx
	cmpl	%edx, %edi
	je	.L11
.L12:
	movslq	-4(%rcx), %rax
	subq	%rax, %rbx
	leaq	(%rbx,%rbx), %rsi
	cmpq	%rsi, %rax
	jle	.L24
.L11:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L14:
	xorl	%ebx, %ebx
	jmp	.L9
.L15:
	movl	$1, %edx
	jmp	.L11
.L25:
	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:
```