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<string.h>
#include<stdlib.h>
#include<math.h>

int comp(const void *a, const void *b) {
	return *(long int*)a - *(long int*)b;
}
int Min(int a, int b) {
	if (a < b)return a;
	else return b;
}

int main(void) {
	long int n, c, k, t[100000], limit, s, bus = 0;
	scanf("%ld %ld %ld", &n, &c, &k);
	for (int i = 0; i < n; i++) {
		scanf("%ld", &t[i]);
	}
	qsort(t, n, sizeof(long int), comp);

	for (int i = 0;i < n;i = s) {
		limit = t[i] + k;
		s = i;
		while (limit >= t[s] && s < n)s++;
		s = i + Min(s - i, c);
		bus++;
	}
	printf("%d\n", bus);
	
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	Min
	.type	Min, @function
Min:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L4
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	leaq	-800048(%rbp), %rcx
	leaq	-800056(%rbp), %rdx
	leaq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L7
.L8:
	leaq	-800016(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L7:
	movl	-800072(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L9
.L13:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800048(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -800024(%rbp)
	movl	-800068(%rbp), %eax
	cltq
	movq	%rax, -800040(%rbp)
	jmp	.L10
.L12:
	addq	$1, -800040(%rbp)
.L10:
	movq	-800040(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, -800024(%rbp)
	jl	.L11
	movq	-800064(%rbp), %rax
	cmpq	%rax, -800040(%rbp)
	jl	.L12
.L11:
	movq	-800056(%rbp), %rax
	movl	%eax, %edx
	movq	-800040(%rbp), %rax
	movl	-800068(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	Min
	movl	-800068(%rbp), %edx
	addl	%edx, %eax
	cltq
	movq	%rax, -800040(%rbp)
	addq	$1, -800032(%rbp)
	movq	-800040(%rbp), %rax
	movl	%eax, -800068(%rbp)
.L9:
	movl	-800068(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movq	-800032(%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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	Min
	.type	Min, @function
Min:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	Min, .-Min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	32(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	$8, %r12
	cmpq	%rbp, %rsi
	jg	.L6
.L5:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rcx
	testq	%rcx, %rcx
	jle	.L13
	movq	24(%rsp), %r9
	movl	16(%rsp), %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	32(%rsp,%rdx,8), %r10
	addq	%r9, %r10
	movq	%r10, %rdx
	cmpq	32(%rsp,%rax,8), %r10
	jl	.L8
	cmpq	%rax, %rcx
	jg	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	cmpq	%rcx, %rax
	jge	.L8
.L9:
	addq	$1, %rax
	cmpq	%rdx, (%rbx,%rax,8)
	jle	.L29
.L8:
	subl	%esi, %eax
	cmpl	%edi, %eax
	cmovg	%edi, %eax
	addq	$1, %r8
	addl	%eax, %esi
	movslq	%esi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rax
	jl	.L11
.L7:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %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
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.p2align 4
	.globl	Min
	.type	Min, @function
Min:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	Min, .-Min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	32(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	addq	$8, %r12
	cmpq	%rbp, %rsi
	jg	.L6
.L5:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movq	8(%rsp), %rcx
	testq	%rcx, %rcx
	jle	.L13
	movq	24(%rsp), %r9
	movl	16(%rsp), %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	32(%rsp,%rdx,8), %r10
	addq	%r9, %r10
	movq	%r10, %rdx
	cmpq	32(%rsp,%rax,8), %r10
	jl	.L8
	cmpq	%rax, %rcx
	jg	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	cmpq	%rcx, %rax
	jge	.L8
.L9:
	addq	$1, %rax
	cmpq	%rdx, (%rbx,%rax,8)
	jle	.L29
.L8:
	subl	%esi, %eax
	cmpl	%edi, %eax
	cmovg	%edi, %eax
	addq	$1, %r8
	addl	%eax, %esi
	movslq	%esi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rax
	jl	.L11
.L7:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %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
.L13:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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<string.h>
#include<stdlib.h>
#include<math.h>

int comp(const void *a, const void *b) {
	return *(long int*)a - *(long int*)b;
}
int Min(int a, int b) {
	if (a < b)return a;
	else return b;
}

int main(void) {
	long int n, c, k, t[100000], limit, s, bus = 0;
	scanf("%ld %ld %ld", &n, &c, &k);
	for (int i = 0; i < n; i++) {
		scanf("%ld", &t[i]);
	}
	qsort(t, n, sizeof(long int), comp);

	for (int i = 0;i < n;i = s) {
		limit = t[i] + k;
		s = i;
		while (limit >= t[s] && s < n)s++;
		s = i + Min(s - i, c);
		bus++;
	}
	printf("%d\n", bus);
	
}
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<string.h>
#include<stdlib.h>
#include<math.h>

int comp(const void *a, const void *b) {
	return *(long int*)a - *(long int*)b;
}
int Min(int a, int b) {
	if (a < b)return a;
	else return b;
}

int main(void) {
	long int n, c, k, t[100000], limit, s, bus = 0;
	scanf("%ld %ld %ld", &n, &c, &k);
	for (int i = 0; i < n; i++) {
		scanf("%ld", &t[i]);
	}
	qsort(t, n, sizeof(long int), comp);

	for (int i = 0;i < n;i = s) {
		limit = t[i] + k;
		s = i;
		while (limit >= t[s] && s < n)s++;
		s = i + Min(s - i, c);
		bus++;
	}
	printf("%d\n", bus);
	
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	Min
	.type	Min, @function
Min:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L4
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	leaq	-800048(%rbp), %rcx
	leaq	-800056(%rbp), %rdx
	leaq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L7
.L8:
	leaq	-800016(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L7:
	movl	-800072(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L9
.L13:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800048(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -800024(%rbp)
	movl	-800068(%rbp), %eax
	cltq
	movq	%rax, -800040(%rbp)
	jmp	.L10
.L12:
	addq	$1, -800040(%rbp)
.L10:
	movq	-800040(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, -800024(%rbp)
	jl	.L11
	movq	-800064(%rbp), %rax
	cmpq	%rax, -800040(%rbp)
	jl	.L12
.L11:
	movq	-800056(%rbp), %rax
	movl	%eax, %edx
	movq	-800040(%rbp), %rax
	movl	-800068(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	Min
	movl	-800068(%rbp), %edx
	addl	%edx, %eax
	cltq
	movq	%rax, -800040(%rbp)
	addq	$1, -800032(%rbp)
	movq	-800040(%rbp), %rax
	movl	%eax, -800068(%rbp)
.L9:
	movl	-800068(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movq	-800032(%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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	comp
	.type	comp, @function
comp:
.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	comp, .-comp
	.globl	Min
	.type	Min, @function
Min:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L4
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -800032(%rbp)
	leaq	-800048(%rbp), %rcx
	leaq	-800056(%rbp), %rdx
	leaq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L7
.L8:
	leaq	-800016(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L7:
	movl	-800072(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L8
	movq	-800064(%rbp), %rax
	movq	%rax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L9
.L13:
	movl	-800068(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rdx
	movq	-800048(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -800024(%rbp)
	movl	-800068(%rbp), %eax
	cltq
	movq	%rax, -800040(%rbp)
	jmp	.L10
.L12:
	addq	$1, -800040(%rbp)
.L10:
	movq	-800040(%rbp), %rax
	movq	-800016(%rbp,%rax,8), %rax
	cmpq	%rax, -800024(%rbp)
	jl	.L11
	movq	-800064(%rbp), %rax
	cmpq	%rax, -800040(%rbp)
	jl	.L12
.L11:
	movq	-800056(%rbp), %rax
	movl	%eax, %edx
	movq	-800040(%rbp), %rax
	movl	-800068(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	Min
	movl	-800068(%rbp), %edx
	addl	%edx, %eax
	cltq
	movq	%rax, -800040(%rbp)
	addq	$1, -800032(%rbp)
	movq	-800040(%rbp), %rax
	movl	%eax, -800068(%rbp)
.L9:
	movl	-800068(%rbp), %eax
	movslq	%eax, %rdx
	movq	-800064(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	movq	-800032(%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	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
