Given the following C code and 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;
	}
}

int main(void){

  long n;
  scanf("%ld", &n);
  long d[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &d[i]);
  }
  qsort(d, n, sizeof(long), cmpnum);

  long answer = 0;
  long abc_last;
  long arc_first;

  if (n%2 == 0) {
    abc_last = n/2-1;
    arc_first = n/2;
    if (d[abc_last] != d[arc_first]) {
      answer = d[arc_first] - d[abc_last];
    }
  }

  printf("%ld\n", answer);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
	.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	%r14
	pushq	%r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	leaq	-48(%rbp), %rsi
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%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	.L7
.L20:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L20
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L21
.L8:
	movq	%rsp, %r14
	testq	%rsi, %rsi
	jle	.L9
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rsi
	addq	$8, %r12
	cmpq	%rbx, %rsi
	jg	.L10
.L9:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-48(%rbp), %rax
	xorl	%r8d, %r8d
	testb	$1, %al
	jne	.L11
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	-8(%r14,%rax,8), %rdx
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L11
	subq	%rdx, %rax
	movq	%rax, %r8
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L22
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L22:
	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	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
	.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	%r14
	pushq	%r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	leaq	-48(%rbp), %rsi
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%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	.L7
.L20:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L20
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L21
.L8:
	movq	%rsp, %r14
	testq	%rsi, %rsi
	jle	.L9
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rsi
	addq	$8, %r12
	cmpq	%rbx, %rsi
	jg	.L10
.L9:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-48(%rbp), %rax
	xorl	%r8d, %r8d
	testb	$1, %al
	jne	.L11
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	-8(%r14,%rax,8), %rdx
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L11
	subq	%rdx, %rax
	movq	%rax, %r8
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L22
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L22:
	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	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
	.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	%r14
	pushq	%r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	leaq	-48(%rbp), %rsi
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%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	.L7
.L20:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L20
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L21
.L8:
	movq	%rsp, %r14
	testq	%rsi, %rsi
	jle	.L9
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rsi
	addq	$8, %r12
	cmpq	%rbx, %rsi
	jg	.L10
.L9:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-48(%rbp), %rax
	xorl	%r8d, %r8d
	testb	$1, %al
	jne	.L11
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	-8(%r14,%rax,8), %rdx
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L11
	subq	%rdx, %rax
	movq	%rax, %r8
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L22
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L22:
	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 <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;
	}
}

int main(void){

  long n;
  scanf("%ld", &n);
  long d[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &d[i]);
  }
  qsort(d, n, sizeof(long), cmpnum);

  long answer = 0;
  long abc_last;
  long arc_first;

  if (n%2 == 0) {
    abc_last = n/2-1;
    arc_first = n/2;
    if (d[abc_last] != d[arc_first]) {
      answer = d[arc_first] - d[abc_last];
    }
  }

  printf("%ld\n", answer);

  return 0;
}```
Given the following C 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;
	}
}

int main(void){

  long n;
  scanf("%ld", &n);
  long d[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &d[i]);
  }
  qsort(d, n, sizeof(long), cmpnum);

  long answer = 0;
  long abc_last;
  long arc_first;

  if (n%2 == 0) {
    abc_last = n/2-1;
    arc_first = n/2;
    if (d[abc_last] != d[arc_first]) {
      answer = d[arc_first] - d[abc_last];
    }
  }

  printf("%ld\n", answer);

  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:

8
9 1 14 5 3 4 4 14
 6
9 0 4 4 6 7
 14
99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 0
 8
0 1 14 5 3 4 4 14
 14
99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 51211 80835 100000 0
 14
99592 10342 29105 78532 83018 11639 92015 127350 30914 21912 51211 93284 100000 0
 8
0 1 26 5 0 4 4 0
 14
99592 10342 29105 78532 83018 11639 57149 127350 30914 39830 51211 93284 100000 0
 14
99592 15139 4240 78532 83018 5810 57149 127350 30914 39830 51211 47114 101000 -1
 14
99592 15139 530 106285 83018 8967 57149 127350 30914 67320 51211 82530 101010 -1

1
 2
 42685
 0
 25993
 27321
 3
 5938
 4097
 10171

Given the following C code and 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;
	}
}

int main(void){

  long n;
  scanf("%ld", &n);
  long d[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &d[i]);
  }
  qsort(d, n, sizeof(long), cmpnum);

  long answer = 0;
  long abc_last;
  long arc_first;

  if (n%2 == 0) {
    abc_last = n/2-1;
    arc_first = n/2;
    if (d[abc_last] != d[arc_first]) {
      answer = d[arc_first] - d[abc_last];
    }
  }

  printf("%ld\n", answer);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
	.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	%r14
	pushq	%r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	leaq	-48(%rbp), %rsi
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%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	.L7
.L20:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L20
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L21
.L8:
	movq	%rsp, %r14
	testq	%rsi, %rsi
	jle	.L9
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rsi
	addq	$8, %r12
	cmpq	%rbx, %rsi
	jg	.L10
.L9:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-48(%rbp), %rax
	xorl	%r8d, %r8d
	testb	$1, %al
	jne	.L11
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	-8(%r14,%rax,8), %rdx
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L11
	subq	%rdx, %rax
	movq	%rax, %r8
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L22
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L22:
	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	cmpnum
	.type	cmpnum, @function
cmpnum:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpnum, .-cmpnum
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
	.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	%r14
	pushq	%r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	leaq	-48(%rbp), %rsi
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%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	.L7
.L20:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L20
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L21
.L8:
	movq	%rsp, %r14
	testq	%rsi, %rsi
	jle	.L9
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rsi
	addq	$8, %r12
	cmpq	%rbx, %rsi
	jg	.L10
.L9:
	leaq	cmpnum(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-48(%rbp), %rax
	xorl	%r8d, %r8d
	testb	$1, %al
	jne	.L11
	movl	$2, %ecx
	cqto
	idivq	%rcx
	movq	-8(%r14,%rax,8), %rdx
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L11
	subq	%rdx, %rax
	movq	%rax, %r8
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L22
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L22:
	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:
```