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>

#define TYPE long long
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }

int main() {
	long long N, C, K;
	long long b, c = 0, ans = 0;
	scanf("%lld%lld%lld", &N, &C, &K);
	long long *T = (long long *)malloc(sizeof(long long)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%lld", &T[i]);
		//printf("%lld ", T[i]);
	}

	qsort(T, N, sizeof(TYPE), cmp);
	//for (int i = 0; i < N; i++)
	//{
	//	printf("%lld ", T[i]);
	//}

	b = 1;//便
	int j = 0;//客の配列のイテレータ
	int dep = 0;//探索用この便の出発時間
	while (j < N)//便のシミュレーション（出発時間）
	{
		//if (T[j] <= T[dep] + K) {//時間的に乗れる
		//	if (c < C) {//定員的に乗れる
		if (T[j] <= T[dep] + K && c < C) {//時間的に乗れるまたは定員的に乗れる
			c++;//この便に乗れるので乗せる
		}
		else//この便に乗れないので次の便を設定し乗せる作業に取り掛かる
		{
			b++;//便を追加する
			dep = j;//追加した便の出発時間に変更
			c = 1;//追加した便の定員にカウントする
		}
		j++;//この客の処理は完了したので次の客の配列のイテレータへ移動する
	}
	ans = b;
	printf("%lld\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L4:
	movl	-76(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L5
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	-16(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -40(%rbp)
	movl	$0, -72(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-68(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L7
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jge	.L7
	addq	$1, -32(%rbp)
	jmp	.L8
.L7:
	addq	$1, -40(%rbp)
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	movq	$1, -32(%rbp)
.L8:
	addl	$1, -72(%rbp)
.L6:
	movl	-72(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	leaq	0(,%r13,8), %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testq	%r13, %r13
	jle	.L4
	movq	%rax, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	addq	$8, %r12
	cmpq	%rbp, %r13
	jg	.L5
.L4:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	(%rsp), %rdx
	testq	%rdx, %rdx
	jle	.L11
	movq	16(%rsp), %r10
	movq	8(%rsp), %r11
	movq	%rbx, %rax
	xorl	%edi, %edi
	movq	(%rbx), %rsi
	leaq	(%rbx,%rdx,8), %r9
	movl	$1, %r8d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	cmpq	%rdi, %r11
	jle	.L7
	addq	$8, %rax
	addq	$1, %rdi
	cmpq	%rax, %r9
	je	.L6
.L9:
	movq	(%rax), %rdx
	leaq	(%r10,%rsi), %rcx
	cmpq	%rcx, %rdx
	jle	.L15
.L7:
	addq	$8, %rax
	addq	$1, %r8
	movq	%rdx, %rsi
	movl	$1, %edi
	cmpq	%rax, %r9
	jne	.L9
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$32, %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
.L11:
	.cfi_restore_state
	movl	$1, %r8d
	jmp	.L6
.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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	leaq	0(,%r13,8), %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testq	%r13, %r13
	jle	.L4
	movq	%rax, %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r13
	addq	$8, %r12
	cmpq	%rbp, %r13
	jg	.L5
.L4:
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	(%rsp), %rdx
	testq	%rdx, %rdx
	jle	.L11
	movq	16(%rsp), %r10
	movq	8(%rsp), %r11
	movq	%rbx, %rax
	xorl	%edi, %edi
	movq	(%rbx), %rsi
	leaq	(%rbx,%rdx,8), %r9
	movl	$1, %r8d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	cmpq	%rdi, %r11
	jle	.L7
	addq	$8, %rax
	addq	$1, %rdi
	cmpq	%rax, %r9
	je	.L6
.L9:
	movq	(%rax), %rdx
	leaq	(%r10,%rsi), %rcx
	cmpq	%rcx, %rdx
	jle	.L15
.L7:
	addq	$8, %rax
	addq	$1, %r8
	movq	%rdx, %rsi
	movl	$1, %edi
	cmpq	%rax, %r9
	jne	.L9
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$32, %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
.L11:
	.cfi_restore_state
	movl	$1, %r8d
	jmp	.L6
.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:

#include<stdio.h>
#include<stdlib.h>

#define TYPE long long
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }

int main() {
	long long N, C, K;
	long long b, c = 0, ans = 0;
	scanf("%lld%lld%lld", &N, &C, &K);
	long long *T = (long long *)malloc(sizeof(long long)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%lld", &T[i]);
		//printf("%lld ", T[i]);
	}

	qsort(T, N, sizeof(TYPE), cmp);
	//for (int i = 0; i < N; i++)
	//{
	//	printf("%lld ", T[i]);
	//}

	b = 1;//便
	int j = 0;//客の配列のイテレータ
	int dep = 0;//探索用この便の出発時間
	while (j < N)//便のシミュレーション（出発時間）
	{
		//if (T[j] <= T[dep] + K) {//時間的に乗れる
		//	if (c < C) {//定員的に乗れる
		if (T[j] <= T[dep] + K && c < C) {//時間的に乗れるまたは定員的に乗れる
			c++;//この便に乗れるので乗せる
		}
		else//この便に乗れないので次の便を設定し乗せる作業に取り掛かる
		{
			b++;//便を追加する
			dep = j;//追加した便の出発時間に変更
			c = 1;//追加した便の定員にカウントする
		}
		j++;//この客の処理は完了したので次の客の配列のイテレータへ移動する
	}
	ans = b;
	printf("%lld\n", ans);

	return 0;
}
5 3 5
1
4
3
6
12
 5 5 5
1
4
3
6
12
 6 3 3
7
6
2
13
17
5
 6 6 0
7
9
8
9
19
5
 6 6 0
7
3
8
9
19
5
 5 5 5
1
1
4
6
4
 6 3 3
7
6
2
13
10
6
 6 3 6
7
6
2
13
10
6
 5 5 5
1
1
3
6
12
 6 3 6
7
6
2
22
10
6

3
 2
 4
 5
 6
 1
 3
 2
 2
 3

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>

#define TYPE long long
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }

int main() {
	long long N, C, K;
	long long b, c = 0, ans = 0;
	scanf("%lld%lld%lld", &N, &C, &K);
	long long *T = (long long *)malloc(sizeof(long long)*N);
	for (int i = 0; i < N; i++)
	{
		scanf("%lld", &T[i]);
		//printf("%lld ", T[i]);
	}

	qsort(T, N, sizeof(TYPE), cmp);
	//for (int i = 0; i < N; i++)
	//{
	//	printf("%lld ", T[i]);
	//}

	b = 1;//便
	int j = 0;//客の配列のイテレータ
	int dep = 0;//探索用この便の出発時間
	while (j < N)//便のシミュレーション（出発時間）
	{
		//if (T[j] <= T[dep] + K) {//時間的に乗れる
		//	if (c < C) {//定員的に乗れる
		if (T[j] <= T[dep] + K && c < C) {//時間的に乗れるまたは定員的に乗れる
			c++;//この便に乗れるので乗せる
		}
		else//この便に乗れないので次の便を設定し乗せる作業に取り掛かる
		{
			b++;//便を追加する
			dep = j;//追加した便の出発時間に変更
			c = 1;//追加した便の定員にカウントする
		}
		j++;//この客の処理は完了したので次の客の配列のイテレータへ移動する
	}
	ans = b;
	printf("%lld\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L4:
	movl	-76(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L5
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	-16(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -40(%rbp)
	movl	$0, -72(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-68(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L7
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jge	.L7
	addq	$1, -32(%rbp)
	jmp	.L8
.L7:
	addq	$1, -40(%rbp)
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	movq	$1, -32(%rbp)
.L8:
	addl	$1, -72(%rbp)
.L6:
	movl	-72(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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
	.type	cmp, @function
cmp:
.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
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L4:
	movl	-76(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L5
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	-16(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -40(%rbp)
	movl	$0, -72(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-68(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L7
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jge	.L7
	addq	$1, -32(%rbp)
	jmp	.L8
.L7:
	addq	$1, -40(%rbp)
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	movq	$1, -32(%rbp)
.L8:
	addl	$1, -72(%rbp)
.L6:
	movl	-72(%rbp), %eax
	movslq	%eax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
