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 cmp(const void *a, const void *b)
{ return *(int *)b - *(int *)a ;}

int main()
{
  int n,i,j,k,count=0;
  int l[2002];

  scanf("%d", &n);

  for(i=0; i<n; i++)
    scanf("%d",&l[i]);

  qsort(l,n,sizeof(int),cmp);

  for(i=0; i<n-2; i++){
    for(k=i+1; k<n-1; k++){
      for(j=k+1; j<n; j++){
        if(l[i]+l[k]>l[j] && l[k]+l[j]>l[i] && l[j]+l[i]>l[k])
        count++;
      }
    }
  }

  printf("%d", count);
  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	-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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -8020(%rbp)
	leaq	-8036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8032(%rbp)
	jmp	.L4
.L5:
	leaq	-8016(%rbp), %rdx
	movl	-8032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L5
	movl	-8036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8032(%rbp)
	jmp	.L6
.L12:
	movl	-8032(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8024(%rbp)
	jmp	.L7
.L11:
	movl	-8024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8028(%rbp)
	jmp	.L8
.L10:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -8020(%rbp)
.L9:
	addl	$1, -8028(%rbp)
.L8:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8028(%rbp)
	jl	.L10
	addl	$1, -8024(%rbp)
.L7:
	movl	-8036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L11
	addl	$1, -8032(%rbp)
.L6:
	movl	-8036(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L12
	movl	-8020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC0(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %r13
	movq	%r13, %r12
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	28(%rsp), %ebx
	leal	-2(%rbx), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L20
	leal	-1(%rbx), %r13d
	leaq	40(%rsp), %r12
	xorl	%r11d, %r11d
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %r14d
	cmpl	%r14d, %r13d
	jle	.L7
	movl	%r13d, %esi
	movq	%r12, %rcx
	movl	%r14d, %edx
	subl	%r14d, %esi
	.p2align 4,,10
	.p2align 3
.L17:
	addl	$1, %edx
	leal	-1(%rsi), %r10d
	cmpl	%ebx, %edx
	jge	.L8
	movl	-8(%r12), %edi
	movl	-4(%rcx), %r8d
	leal	-1(%rsi), %r10d
	leal	(%rdi,%r8), %r9d
	cmpl	$2, %r10d
	jbe	.L21
	movl	%esi, %eax
	movd	%r8d, %xmm7
	pxor	%xmm3, %xmm3
	shrl	$2, %eax
	pshufd	$0, %xmm7, %xmm5
	movd	%edi, %xmm7
	subl	$1, %eax
	pshufd	$0, %xmm7, %xmm4
	movd	%r9d, %xmm7
	salq	$4, %rax
	pshufd	$0, %xmm7, %xmm6
	leaq	16(%rcx,%rax), %r15
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm2
	pcmpgtd	%xmm5, %xmm2
	pcmpgtd	%xmm4, %xmm0
	pand	%xmm2, %xmm0
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %r15
	jne	.L10
	movdqa	%xmm3, %xmm0
	movl	%esi, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r11d
	leal	(%r15,%rdx), %eax
	cmpl	%r15d, %esi
	je	.L8
.L9:
	movslq	%eax, %rsi
	movl	32(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	jle	.L13
	leal	(%r8,%rsi), %r15d
	cmpl	%r15d, %edi
	jge	.L13
	addl	%edi, %esi
	cmpl	%esi, %r8d
	setl	%sil
	movzbl	%sil, %esi
	addl	%esi, %r11d
.L13:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jge	.L8
	movslq	%esi, %rsi
	movl	32(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	jle	.L14
	leal	(%r8,%rsi), %r15d
	cmpl	%r15d, %edi
	jge	.L14
	addl	%edi, %esi
	cmpl	%esi, %r8d
	setl	%sil
	movzbl	%sil, %esi
	addl	%esi, %r11d
.L14:
	addl	$2, %eax
	cmpl	%eax, %ebx
	jle	.L8
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %r9d
	jle	.L8
	leal	(%r8,%rax), %esi
	cmpl	%esi, %edi
	jge	.L8
	addl	%eax, %edi
	xorl	%eax, %eax
	cmpl	%edi, %r8d
	setl	%al
	addl	%eax, %r11d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r10d, %esi
	addq	$4, %rcx
	cmpl	%edx, %r13d
	jne	.L17
.L7:
	addq	$4, %r12
	cmpl	%r14d, 12(%rsp)
	jne	.L18
.L6:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L9
.L20:
	xorl	%r11d, %r11d
	jmp	.L6
.L31:
	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
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC0(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %r13
	movq	%r13, %r12
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	28(%rsp), %ebx
	leal	-2(%rbx), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L20
	leal	-1(%rbx), %r13d
	leaq	40(%rsp), %r12
	xorl	%r11d, %r11d
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %r14d
	cmpl	%r14d, %r13d
	jle	.L7
	movl	%r13d, %esi
	movq	%r12, %rcx
	movl	%r14d, %edx
	subl	%r14d, %esi
	.p2align 4,,10
	.p2align 3
.L17:
	addl	$1, %edx
	leal	-1(%rsi), %r10d
	cmpl	%ebx, %edx
	jge	.L8
	movl	-8(%r12), %edi
	movl	-4(%rcx), %r8d
	leal	-1(%rsi), %r10d
	leal	(%rdi,%r8), %r9d
	cmpl	$2, %r10d
	jbe	.L21
	movl	%esi, %eax
	movd	%r8d, %xmm7
	pxor	%xmm3, %xmm3
	shrl	$2, %eax
	pshufd	$0, %xmm7, %xmm5
	movd	%edi, %xmm7
	subl	$1, %eax
	pshufd	$0, %xmm7, %xmm4
	movd	%r9d, %xmm7
	salq	$4, %rax
	pshufd	$0, %xmm7, %xmm6
	leaq	16(%rcx,%rax), %r15
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm2
	pcmpgtd	%xmm5, %xmm2
	pcmpgtd	%xmm4, %xmm0
	pand	%xmm2, %xmm0
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %r15
	jne	.L10
	movdqa	%xmm3, %xmm0
	movl	%esi, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r11d
	leal	(%r15,%rdx), %eax
	cmpl	%r15d, %esi
	je	.L8
.L9:
	movslq	%eax, %rsi
	movl	32(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	jle	.L13
	leal	(%r8,%rsi), %r15d
	cmpl	%r15d, %edi
	jge	.L13
	addl	%edi, %esi
	cmpl	%esi, %r8d
	setl	%sil
	movzbl	%sil, %esi
	addl	%esi, %r11d
.L13:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jge	.L8
	movslq	%esi, %rsi
	movl	32(%rsp,%rsi,4), %esi
	cmpl	%esi, %r9d
	jle	.L14
	leal	(%r8,%rsi), %r15d
	cmpl	%r15d, %edi
	jge	.L14
	addl	%edi, %esi
	cmpl	%esi, %r8d
	setl	%sil
	movzbl	%sil, %esi
	addl	%esi, %r11d
.L14:
	addl	$2, %eax
	cmpl	%eax, %ebx
	jle	.L8
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %r9d
	jle	.L8
	leal	(%r8,%rax), %esi
	cmpl	%esi, %edi
	jge	.L8
	addl	%eax, %edi
	xorl	%eax, %eax
	cmpl	%edi, %r8d
	setl	%al
	addl	%eax, %r11d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r10d, %esi
	addq	$4, %rcx
	cmpl	%edx, %r13d
	jne	.L17
.L7:
	addq	$4, %r12
	cmpl	%r14d, 12(%rsp)
	jne	.L18
.L6:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L9
.L20:
	xorl	%r11d, %r11d
	jmp	.L6
.L31:
	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>

int cmp(const void *a, const void *b)
{ return *(int *)b - *(int *)a ;}

int main()
{
  int n,i,j,k,count=0;
  int l[2002];

  scanf("%d", &n);

  for(i=0; i<n; i++)
    scanf("%d",&l[i]);

  qsort(l,n,sizeof(int),cmp);

  for(i=0; i<n-2; i++){
    for(k=i+1; k<n-1; k++){
      for(j=k+1; j<n; j++){
        if(l[i]+l[k]>l[j] && l[k]+l[j]>l[i] && l[j]+l[i]>l[k])
        count++;
      }
    }
  }

  printf("%d", count);
  return 0;
}

4
5 4 2 1
 7
218 1140 704 233 645 728 389
 3
1 1000 2
 7
218 1140 704 233 645 890 389
 7
218 1140 1051 233 449 890 389
 7
218 1140 1051 16 636 890 389
 7
218 1140 551 40 636 890 487
 7
218 1140 551 40 660 890 487
 7
116 1499 551 40 806 890 487
 7
116 1499 551 40 297 890 487

1 14 0 13 15 10 11 12 7 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>

int cmp(const void *a, const void *b)
{ return *(int *)b - *(int *)a ;}

int main()
{
  int n,i,j,k,count=0;
  int l[2002];

  scanf("%d", &n);

  for(i=0; i<n; i++)
    scanf("%d",&l[i]);

  qsort(l,n,sizeof(int),cmp);

  for(i=0; i<n-2; i++){
    for(k=i+1; k<n-1; k++){
      for(j=k+1; j<n; j++){
        if(l[i]+l[k]>l[j] && l[k]+l[j]>l[i] && l[j]+l[i]>l[k])
        count++;
      }
    }
  }

  printf("%d", count);
  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	-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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -8020(%rbp)
	leaq	-8036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8032(%rbp)
	jmp	.L4
.L5:
	leaq	-8016(%rbp), %rdx
	movl	-8032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L5
	movl	-8036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8032(%rbp)
	jmp	.L6
.L12:
	movl	-8032(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8024(%rbp)
	jmp	.L7
.L11:
	movl	-8024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8028(%rbp)
	jmp	.L8
.L10:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -8020(%rbp)
.L9:
	addl	$1, -8028(%rbp)
.L8:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8028(%rbp)
	jl	.L10
	addl	$1, -8024(%rbp)
.L7:
	movl	-8036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L11
	addl	$1, -8032(%rbp)
.L6:
	movl	-8036(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L12
	movl	-8020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	-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	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -8020(%rbp)
	leaq	-8036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8032(%rbp)
	jmp	.L4
.L5:
	leaq	-8016(%rbp), %rdx
	movl	-8032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8032(%rbp)
.L4:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L5
	movl	-8036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-8016(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8032(%rbp)
	jmp	.L6
.L12:
	movl	-8032(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8024(%rbp)
	jmp	.L7
.L11:
	movl	-8024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8028(%rbp)
	jmp	.L8
.L10:
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8028(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-8024(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -8020(%rbp)
.L9:
	addl	$1, -8028(%rbp)
.L8:
	movl	-8036(%rbp), %eax
	cmpl	%eax, -8028(%rbp)
	jl	.L10
	addl	$1, -8024(%rbp)
.L7:
	movl	-8036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L11
	addl	$1, -8032(%rbp)
.L6:
	movl	-8036(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L12
	movl	-8020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
