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>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 10000

typedef struct customer_tbl
{
	int use;
	int latency;
} customer_t;

int
cmp_func(const void *l_, const void *r_)
{
	const customer_t *l = (const customer_t*) l_;
	const customer_t *r = (const customer_t*) r_;

	if (l->use < r->use)
		return -1;

	if (l->use > r->use)
		return 1;

	return 0;
}

int
main(int argc, char **argv)
{
	customer_t customers[MAX_N];
	int n, i;

	while (true)
	{
		scanf("%d", &n);
		if (n == 0)
			break;

		for (i = 0; i < n; ++i)
			scanf("%d", &customers[i].use);

		qsort(customers, n, sizeof(customer_t), cmp_func);

		customers[0].latency = 0;
		long total = 0;
		for (i = 1; i < n; ++i)
		{
			customers[i].latency = customers[i - 1].latency + customers[i - 1].use;
			total += customers[i].latency;
		}

		printf("%ld\n", total);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld\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	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movl	%edi, -80036(%rbp)
	movq	%rsi, -80048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	$0, -80028(%rbp)
	jmp	.L8
.L9:
	leaq	-80016(%rbp), %rdx
	movl	-80028(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80028(%rbp)
.L8:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L9
	movl	-80032(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-80016(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -80012(%rbp)
	movq	$0, -80024(%rbp)
	movl	$1, -80028(%rbp)
	jmp	.L10
.L11:
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80012(%rbp,%rax,8), %edx
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80016(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-80028(%rbp), %eax
	cltq
	movl	%edx, -80012(%rbp,%rax,8)
	movl	-80028(%rbp), %eax
	cltq
	movl	-80012(%rbp,%rax,8), %eax
	cltq
	addq	%rax, -80024(%rbp)
	addl	$1, -80028(%rbp)
.L10:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L11
	movq	-80024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L16:
	nop
	movl	$0, %eax
	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	cmp_func
	.type	cmp_func, @function
cmp_func:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_func, .-cmp_func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC0(%rip), %rbx
	leaq	cmp_func(%rip), %r14
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	28(%rsp), %r12
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rsi
	testl	%esi, %esi
	je	.L6
	jle	.L7
	movq	%rbp, %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rsi
	addq	$8, %r13
	cmpl	%r15d, %esi
	jg	.L8
.L7:
	movl	$8, %edx
	movq	%r14, %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	28(%rsp), %edx
	movl	$0, 36(%rsp)
	cmpl	$1, %edx
	jle	.L13
	movq	8(%rsp), %rdi
	subl	$2, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	(%rdi,%rdx,8), %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L10:
	addl	(%rax), %edx
	addq	$8, %rax
	movslq	%edx, %rcx
	movl	%edx, 4(%rax)
	addq	%rcx, %r8
	cmpq	%rsi, %rax
	jne	.L10
.L9:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$80056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L9
.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	cmp_func
	.type	cmp_func, @function
cmp_func:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp_func, .-cmp_func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC0(%rip), %rbx
	leaq	cmp_func(%rip), %r14
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	28(%rsp), %r12
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rsi
	testl	%esi, %esi
	je	.L6
	jle	.L7
	movq	%rbp, %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rsi
	addq	$8, %r13
	cmpl	%r15d, %esi
	jg	.L8
.L7:
	movl	$8, %edx
	movq	%r14, %rcx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	28(%rsp), %edx
	movl	$0, 36(%rsp)
	cmpl	$1, %edx
	jle	.L13
	movq	8(%rsp), %rdi
	subl	$2, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	(%rdi,%rdx,8), %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L10:
	addl	(%rax), %edx
	addq	$8, %rax
	movslq	%edx, %rcx
	movl	%edx, 4(%rax)
	addq	%rcx, %r8
	cmpq	%rsi, %rax
	jne	.L10
.L9:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$80056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L9
.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>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 10000

typedef struct customer_tbl
{
	int use;
	int latency;
} customer_t;

int
cmp_func(const void *l_, const void *r_)
{
	const customer_t *l = (const customer_t*) l_;
	const customer_t *r = (const customer_t*) r_;

	if (l->use < r->use)
		return -1;

	if (l->use > r->use)
		return 1;

	return 0;
}

int
main(int argc, char **argv)
{
	customer_t customers[MAX_N];
	int n, i;

	while (true)
	{
		scanf("%d", &n);
		if (n == 0)
			break;

		for (i = 0; i < n; ++i)
			scanf("%d", &customers[i].use);

		qsort(customers, n, sizeof(customer_t), cmp_func);

		customers[0].latency = 0;
		long total = 0;
		for (i = 1; i < n; ++i)
		{
			customers[i].latency = customers[i - 1].latency + customers[i - 1].use;
			total += customers[i].latency;
		}

		printf("%ld\n", total);
	}

	return 0;
}
5
2
6
4
6
9
0
 5
2
10
4
6
9
0
 5
2
6
4
7
9
0
 5
2
10
4
7
9
0
 5
2
17
8
7
9
0
 5
4
6
4
7
14
0
 5
2
17
8
7
12
0
 5
4
6
5
7
14
0
 5
1
17
8
7
12
0
 5
0
17
8
7
12
0

38
 41
 39
 43
 54
 47
 57
 50
 53
 49

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>          // printf(), scanf()
#include <stdlib.h>         // qsort()
#include <stdbool.h>

#define MAX_N 10000

typedef struct customer_tbl
{
	int use;
	int latency;
} customer_t;

int
cmp_func(const void *l_, const void *r_)
{
	const customer_t *l = (const customer_t*) l_;
	const customer_t *r = (const customer_t*) r_;

	if (l->use < r->use)
		return -1;

	if (l->use > r->use)
		return 1;

	return 0;
}

int
main(int argc, char **argv)
{
	customer_t customers[MAX_N];
	int n, i;

	while (true)
	{
		scanf("%d", &n);
		if (n == 0)
			break;

		for (i = 0; i < n; ++i)
			scanf("%d", &customers[i].use);

		qsort(customers, n, sizeof(customer_t), cmp_func);

		customers[0].latency = 0;
		long total = 0;
		for (i = 1; i < n; ++i)
		{
			customers[i].latency = customers[i - 1].latency + customers[i - 1].use;
			total += customers[i].latency;
		}

		printf("%ld\n", total);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld\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	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movl	%edi, -80036(%rbp)
	movq	%rsi, -80048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	$0, -80028(%rbp)
	jmp	.L8
.L9:
	leaq	-80016(%rbp), %rdx
	movl	-80028(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80028(%rbp)
.L8:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L9
	movl	-80032(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-80016(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -80012(%rbp)
	movq	$0, -80024(%rbp)
	movl	$1, -80028(%rbp)
	jmp	.L10
.L11:
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80012(%rbp,%rax,8), %edx
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80016(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-80028(%rbp), %eax
	cltq
	movl	%edx, -80012(%rbp,%rax,8)
	movl	-80028(%rbp), %eax
	cltq
	movl	-80012(%rbp,%rax,8), %eax
	cltq
	addq	%rax, -80024(%rbp)
	addl	$1, -80028(%rbp)
.L10:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L11
	movq	-80024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L16:
	nop
	movl	$0, %eax
	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.
train
	.file	"temp.c"
	.text
	.globl	cmp_func
	.type	cmp_func, @function
cmp_func:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp_func, .-cmp_func
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld\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	-77824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2224, %rsp
	movl	%edi, -80036(%rbp)
	movq	%rsi, -80048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-80032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	$0, -80028(%rbp)
	jmp	.L8
.L9:
	leaq	-80016(%rbp), %rdx
	movl	-80028(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80028(%rbp)
.L8:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L9
	movl	-80032(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-80016(%rbp), %rax
	leaq	cmp_func(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -80012(%rbp)
	movq	$0, -80024(%rbp)
	movl	$1, -80028(%rbp)
	jmp	.L10
.L11:
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80012(%rbp,%rax,8), %edx
	movl	-80028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-80016(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-80028(%rbp), %eax
	cltq
	movl	%edx, -80012(%rbp,%rax,8)
	movl	-80028(%rbp), %eax
	cltq
	movl	-80012(%rbp,%rax,8), %eax
	cltq
	addq	%rax, -80024(%rbp)
	addl	$1, -80028(%rbp)
.L10:
	movl	-80032(%rbp), %eax
	cmpl	%eax, -80028(%rbp)
	jl	.L11
	movq	-80024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L16:
	nop
	movl	$0, %eax
	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:
