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 cmpnum(const void * n1, const void * n2) {
	if (*(long *)n1 > *(long *)n2)
	{
		return -1;
	}
	else if (*(long *)n1 < *(long *)n2)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
long Combination(long n, long r) {
  long answer = 1;
  if (n-r < r) {
    r = n-r;
  }
  for (long i = 1; i <= r; i++) {
    answer *= n+1-i;
    answer /= i;
  }
  return answer;
}

int main(void) {

  long n;
  scanf("%ld", &n);
  long a[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }
  qsort(a, n, sizeof(long), cmpnum);
  long r;
  long max_r;
  long max = -1;
  for (long i = 1; i < n; i++) {
    r = a[i];
    if (r*2 > a[0]) {
      r = a[0]-r;
    }
    if (r > max) {
      max_r = i;
      max = r;
    }
  }
  printf("%ld %ld\n", a[0], a[max_r]);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpnum
	.type	cmpnum, @function
cmpnum:
.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), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpnum, .-cmpnum
	.globl	Combination
	.type	Combination, @function
Combination:
.LFB7:
	.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	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L6
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$1, -8(%rbp)
	jmp	.L7
.L8:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L7:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L8
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Combination, .-Combination
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L14
.L15:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L14:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L15
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpnum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$-1, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L16
.L19:
	movq	-64(%rbp), %rax
	movq	-80(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -104(%rbp)
	movq	-104(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L17
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	subq	-104(%rbp), %rax
	movq	%rax, -104(%rbp)
.L17:
	movq	-104(%rbp), %rax
	cmpq	-88(%rbp), %rax
	jle	.L18
	movq	-80(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-104(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	-64(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.p2align 4
	.globl	Combination
	.type	Combination, @function
Combination:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	movq	%rdi, %rsi
	subq	%r8, %rsi
	cmpq	%r8, %rsi
	cmovg	%r8, %rsi
	testq	%rsi, %rsi
	jle	.L8
	addq	$1, %rsi
	movl	$1, %ecx
	movl	$1, %eax
	addq	$1, %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdi, %rdx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%rcx
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	jne	.L7
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	Combination, .-Combination
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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
	movq	-64(%rbp), %rsi
	movq	%rsp, %rcx
	leaq	15(,%rsi,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L12
.L29:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L29
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L30
.L13:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	testq	%rsi, %rsi
	jle	.L14
	movq	%r12, %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$8, %r15
	cmpq	%rbx, %rsi
	jg	.L15
.L14:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %r9
	movq	0(,%rax,8), %r8
	cmpq	$1, %r9
	jle	.L20
	movl	$1, %edx
	movq	$-1, %rdi
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12,%rdx,8), %rax
	movq	%r8, %rcx
	leaq	(%rax,%rax), %rsi
	subq	%rax, %rcx
	cmpq	%rsi, %r8
	cmovl	%rcx, %rax
	cmpq	%rax, %rdi
	jge	.L18
	movq	%rax, %rdi
	movq	%rdx, %r13
.L18:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L19
.L20:
	movq	(%r12,%r13,8), %rcx
	xorl	%eax, %eax
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L30:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L13
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.p2align 4
	.globl	Combination
	.type	Combination, @function
Combination:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	movq	%rdi, %rsi
	subq	%r8, %rsi
	cmpq	%r8, %rsi
	cmovg	%r8, %rsi
	testq	%rsi, %rsi
	jle	.L8
	addq	$1, %rsi
	movl	$1, %ecx
	movl	$1, %eax
	addq	$1, %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdi, %rdx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%rcx
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	jne	.L7
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	Combination, .-Combination
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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
	movq	-64(%rbp), %rsi
	movq	%rsp, %rcx
	leaq	15(,%rsi,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L12
.L29:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L29
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L30
.L13:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	testq	%rsi, %rsi
	jle	.L14
	movq	%r12, %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$8, %r15
	cmpq	%rbx, %rsi
	jg	.L15
.L14:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %r9
	movq	0(,%rax,8), %r8
	cmpq	$1, %r9
	jle	.L20
	movl	$1, %edx
	movq	$-1, %rdi
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12,%rdx,8), %rax
	movq	%r8, %rcx
	leaq	(%rax,%rax), %rsi
	subq	%rax, %rcx
	cmpq	%rsi, %r8
	cmovl	%rcx, %rax
	cmpq	%rax, %rdi
	jge	.L18
	movq	%rax, %rdi
	movq	%rdx, %r13
.L18:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L19
.L20:
	movq	(%r12,%r13,8), %rcx
	xorl	%eax, %eax
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L30:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L13
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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 cmpnum(const void * n1, const void * n2) {
	if (*(long *)n1 > *(long *)n2)
	{
		return -1;
	}
	else if (*(long *)n1 < *(long *)n2)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
long Combination(long n, long r) {
  long answer = 1;
  if (n-r < r) {
    r = n-r;
  }
  for (long i = 1; i <= r; i++) {
    answer *= n+1-i;
    answer /= i;
  }
  return answer;
}

int main(void) {

  long n;
  scanf("%ld", &n);
  long a[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }
  qsort(a, n, sizeof(long), cmpnum);
  long r;
  long max_r;
  long max = -1;
  for (long i = 1; i < n; i++) {
    r = a[i];
    if (r*2 > a[0]) {
      r = a[0]-r;
    }
    if (r > max) {
      max_r = i;
      max = r;
    }
  }
  printf("%ld %ld\n", a[0], a[max_r]);

  return 0;
}
5
6 9 1 2 11
 5
6 9 1 2 20
 5
3 9 4 2 11
 2
010 0
 5
6 9 1 2 16
 5
10 9 1 4 20
 2
001 0
 5
6 9 1 2 0
 5
3 9 4 0 9
 2
101 0

11 6
 20 9
 11 4
 10 0
 16 9
 20 10
 1 0
 9 6
 9 4
 101 0

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 cmpnum(const void * n1, const void * n2) {
	if (*(long *)n1 > *(long *)n2)
	{
		return -1;
	}
	else if (*(long *)n1 < *(long *)n2)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
long Combination(long n, long r) {
  long answer = 1;
  if (n-r < r) {
    r = n-r;
  }
  for (long i = 1; i <= r; i++) {
    answer *= n+1-i;
    answer /= i;
  }
  return answer;
}

int main(void) {

  long n;
  scanf("%ld", &n);
  long a[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }
  qsort(a, n, sizeof(long), cmpnum);
  long r;
  long max_r;
  long max = -1;
  for (long i = 1; i < n; i++) {
    r = a[i];
    if (r*2 > a[0]) {
      r = a[0]-r;
    }
    if (r > max) {
      max_r = i;
      max = r;
    }
  }
  printf("%ld %ld\n", a[0], a[max_r]);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpnum
	.type	cmpnum, @function
cmpnum:
.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), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpnum, .-cmpnum
	.globl	Combination
	.type	Combination, @function
Combination:
.LFB7:
	.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	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L6
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$1, -8(%rbp)
	jmp	.L7
.L8:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L7:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L8
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Combination, .-Combination
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L14
.L15:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L14:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L15
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpnum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$-1, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L16
.L19:
	movq	-64(%rbp), %rax
	movq	-80(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -104(%rbp)
	movq	-104(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L17
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	subq	-104(%rbp), %rax
	movq	%rax, -104(%rbp)
.L17:
	movq	-104(%rbp), %rax
	cmpq	-88(%rbp), %rax
	jle	.L18
	movq	-80(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-104(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	-64(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	cmpnum
	.type	cmpnum, @function
cmpnum:
.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), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpnum, .-cmpnum
	.globl	Combination
	.type	Combination, @function
Combination:
.LFB7:
	.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	$1, -16(%rbp)
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L6
	movq	-24(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$1, -8(%rbp)
	jmp	.L7
.L8:
	movq	-24(%rbp), %rax
	addq	$1, %rax
	subq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L7:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L8
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Combination, .-Combination
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L14
.L15:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L14:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L15
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpnum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$-1, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L16
.L19:
	movq	-64(%rbp), %rax
	movq	-80(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -104(%rbp)
	movq	-104(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L17
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	subq	-104(%rbp), %rax
	movq	%rax, -104(%rbp)
.L17:
	movq	-104(%rbp), %rax
	cmpq	-88(%rbp), %rax
	jle	.L18
	movq	-80(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-104(%rbp), %rax
	movq	%rax, -88(%rbp)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	-64(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
