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>
//#include <string.h>
//#include <stdbool.h>
//#include <limits.h>
//#include <math.h>

#define MIN(a, b) ((a<b) ? a : b)

//降順
int des(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}

int main() {
  int n;
  scanf("%d", &n);
  int a[n], l, r, s=1000000000;
  for (int i=0; i<n; i++) scanf("%d", a+i);
  qsort(a, n, sizeof(int), des);
  l=a[0];
  if (l%2 == 1) {
    for (int i=1; i<n; i++) {
      int sub = MIN(abs(a[i]-l/2), abs(a[i]-l/2-1));
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  } else {
    for (int i=1; i<n; i++) {
      int sub = abs(a[i]-l/2);
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  }
  printf("%d %d\n", l, r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	des
	.type	des, @function
des:
.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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	des, .-des
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1000000000, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L7
.L8:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -96(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L8
	movl	-108(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	des(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-64(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$1, -92(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	negl	%eax
	addl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -76(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-76(%rbp), %eax
	jle	.L11
	movl	-76(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L11:
	addl	$1, -92(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L12
	jmp	.L13
.L9:
	movl	$1, -88(%rbp)
	jmp	.L14
.L16:
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -80(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L15
	movl	-80(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L15:
	addl	$1, -88(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L16
.L13:
	movl	-104(%rbp), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	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	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	des
	.type	des, @function
des:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	des, .-des
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\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	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$40, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L6:
	leaq	3(%rsp), %r14
	movq	%r14, %rbx
	andq	$-4, %r14
	shrq	$2, %rbx
	movq	%rbx, -72(%rbp)
	testl	%eax, %eax
	jle	.L7
	movq	%r14, %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r15
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	movl	$4, %edx
	leaq	des(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %r8d
	movl	%r8d, %edx
	shrl	$31, %edx
	leal	(%r8,%rdx), %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	je	.L9
	movl	-60(%rbp), %esi
	cmpl	$1, %esi
	jle	.L11
	movl	%r8d, %eax
	movl	$2, %ecx
	movl	$1000000000, %r9d
	cltd
	idivl	%ecx
	leal	-2(%rsi), %edx
	leaq	4(%r14), %rcx
	leaq	8(%r14,%rdx,4), %r10
	negl	%eax
	.p2align 4,,10
	.p2align 3
.L15:
	movl	(%rcx), %edi
	leal	(%rax,%rdi), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	cmpl	%edx, %r9d
	jle	.L14
	movl	%edx, %r9d
	movl	%edi, %r13d
.L14:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	jne	.L15
.L11:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L26
	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
.L9:
	.cfi_restore_state
	movl	-60(%rbp), %ecx
	cmpl	$1, %ecx
	jle	.L11
	movl	%r8d, %eax
	movl	$2, %esi
	leaq	4(%r14), %rdi
	movl	$1000000000, %r10d
	cltd
	idivl	%esi
	leal	-2(%rcx), %edx
	leaq	8(%r14,%rdx,4), %r11
	negl	%eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdi), %r9d
	leal	(%rax,%r9), %esi
	leal	-1(%rsi), %ecx
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%r10d, %edx
	jge	.L12
	movl	%edx, %r10d
	movl	%r9d, %r13d
.L12:
	addq	$4, %rdi
	cmpq	%r11, %rdi
	jne	.L13
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L6
.L26:
	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	des
	.type	des, @function
des:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	des, .-des
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\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	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$40, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L5
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L6:
	leaq	3(%rsp), %r14
	movq	%r14, %rbx
	andq	$-4, %r14
	shrq	$2, %rbx
	movq	%rbx, -72(%rbp)
	testl	%eax, %eax
	jle	.L7
	movq	%r14, %r15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r15
	cmpl	%ebx, %eax
	jg	.L8
	movslq	%eax, %rsi
.L7:
	movl	$4, %edx
	leaq	des(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %r8d
	movl	%r8d, %edx
	shrl	$31, %edx
	leal	(%r8,%rdx), %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	je	.L9
	movl	-60(%rbp), %esi
	cmpl	$1, %esi
	jle	.L11
	movl	%r8d, %eax
	movl	$2, %ecx
	movl	$1000000000, %r9d
	cltd
	idivl	%ecx
	leal	-2(%rsi), %edx
	leaq	4(%r14), %rcx
	leaq	8(%r14,%rdx,4), %r10
	negl	%eax
	.p2align 4,,10
	.p2align 3
.L15:
	movl	(%rcx), %edi
	leal	(%rax,%rdi), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	cmpl	%edx, %r9d
	jle	.L14
	movl	%edx, %r9d
	movl	%edi, %r13d
.L14:
	addq	$4, %rcx
	cmpq	%r10, %rcx
	jne	.L15
.L11:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L26
	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
.L9:
	.cfi_restore_state
	movl	-60(%rbp), %ecx
	cmpl	$1, %ecx
	jle	.L11
	movl	%r8d, %eax
	movl	$2, %esi
	leaq	4(%r14), %rdi
	movl	$1000000000, %r10d
	cltd
	idivl	%esi
	leal	-2(%rcx), %edx
	leaq	8(%r14,%rdx,4), %r11
	negl	%eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdi), %r9d
	leal	(%rax,%r9), %esi
	leal	-1(%rsi), %ecx
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%r10d, %edx
	jge	.L12
	movl	%edx, %r10d
	movl	%r9d, %r13d
.L12:
	addq	$4, %rdi
	cmpq	%r11, %rdi
	jne	.L13
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L6
.L26:
	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>
//#include <string.h>
//#include <stdbool.h>
//#include <limits.h>
//#include <math.h>

#define MIN(a, b) ((a<b) ? a : b)

//降順
int des(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}

int main() {
  int n;
  scanf("%d", &n);
  int a[n], l, r, s=1000000000;
  for (int i=0; i<n; i++) scanf("%d", a+i);
  qsort(a, n, sizeof(int), des);
  l=a[0];
  if (l%2 == 1) {
    for (int i=1; i<n; i++) {
      int sub = MIN(abs(a[i]-l/2), abs(a[i]-l/2-1));
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  } else {
    for (int i=1; i<n; i++) {
      int sub = abs(a[i]-l/2);
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  }
  printf("%d %d\n", l, 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>
//#include <string.h>
//#include <stdbool.h>
//#include <limits.h>
//#include <math.h>

#define MIN(a, b) ((a<b) ? a : b)

//降順
int des(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}

int main() {
  int n;
  scanf("%d", &n);
  int a[n], l, r, s=1000000000;
  for (int i=0; i<n; i++) scanf("%d", a+i);
  qsort(a, n, sizeof(int), des);
  l=a[0];
  if (l%2 == 1) {
    for (int i=1; i<n; i++) {
      int sub = MIN(abs(a[i]-l/2), abs(a[i]-l/2-1));
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  } else {
    for (int i=1; i<n; i++) {
      int sub = abs(a[i]-l/2);
      if (s>sub) {
        s=sub;
        r=a[i];
      }
    }
  }
  printf("%d %d\n", l, r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	des
	.type	des, @function
des:
.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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	des, .-des
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1000000000, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L7
.L8:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -96(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L8
	movl	-108(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	des(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-64(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$1, -92(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	negl	%eax
	addl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -76(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-76(%rbp), %eax
	jle	.L11
	movl	-76(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L11:
	addl	$1, -92(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L12
	jmp	.L13
.L9:
	movl	$1, -88(%rbp)
	jmp	.L14
.L16:
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -80(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L15
	movl	-80(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L15:
	addl	$1, -88(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L16
.L13:
	movl	-104(%rbp), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	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	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	des
	.type	des, @function
des:
.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	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	des, .-des
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %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
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1000000000, -100(%rbp)
	movl	$0, -96(%rbp)
	jmp	.L7
.L8:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -96(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L8
	movl	-108(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	des(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	-64(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$1, -92(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	negl	%eax
	addl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -76(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-76(%rbp), %eax
	jle	.L11
	movl	-76(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L11:
	addl	$1, -92(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L12
	jmp	.L13
.L9:
	movl	$1, -88(%rbp)
	jmp	.L14
.L16:
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	negl	%eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -80(%rbp)
	movl	-100(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L15
	movl	-80(%rbp), %eax
	movl	%eax, -100(%rbp)
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -104(%rbp)
.L15:
	addl	$1, -88(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L16
.L13:
	movl	-104(%rbp), %edx
	movl	-84(%rbp), %eax
	movl	%eax, %esi
	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	.L18
	call	__stack_chk_fail@PLT
.L18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
