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(void)
{
    int n, i, j, k;
    int ans=0;
    int a[100];

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

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

    for(i=0; i<n; i++){
        for(j=i+1; j<n; j++){
            for(k=j+1; k<n; k++){
                if(a[i]!=a[j] && a[j]!=a[k] && a[k]+a[j]>a[i]){
                    ans++;
                    
                }
            }
        }
    }

    printf("%d", ans);

}```

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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -432(%rbp)
	jmp	.L6
.L12:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -424(%rbp)
	jmp	.L8
.L10:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -420(%rbp)
.L9:
	addl	$1, -424(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L10
	addl	$1, -428(%rbp)
.L7:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	addl	$1, -432(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L12
	movl	-420(%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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	leaq	32(%rsp), %rax
	xorl	%ebx, %ebx
	movq	%rax, 8(%rsp)
	movq	%rax, %r12
	.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:
	movq	8(%rsp), %r14
	movslq	%eax, %rsi
	movl	$4, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L23
	movl	$2, %r12d
	xorl	%r9d, %r9d
	leal	-1(%rdi), %r11d
	xorl	%r13d, %r13d
	movl	$1, %ebx
	pxor	%xmm5, %xmm5
.L21:
	addl	$1, %r13d
	cmpl	%edi, %r13d
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%r12d, %edx
	cmpl	%edi, %r12d
	jge	.L20
	movl	(%r14), %r8d
	movq	8(%rsp), %rsi
	movslq	%r12d, %rax
	movd	%r8d, %xmm7
	leaq	(%rsi,%rax,4), %rsi
	pshufd	$0, %xmm7, %xmm4
	.p2align 4,,10
	.p2align 3
.L19:
	movl	-4(%rsi), %ecx
	cmpl	%ecx, %r8d
	je	.L10
	movl	%edi, %r10d
	movl	%r11d, %eax
	subl	%edx, %r10d
	cmpl	%edi, %edx
	cmovge	%ebx, %r10d
	subl	%edx, %eax
	cmpl	$2, %eax
	jbe	.L24
	cmpl	%edi, %edx
	jge	.L24
	movl	%r10d, %eax
	movd	%ecx, %xmm6
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm6, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rsi,%rax), %r15
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	movdqu	-16(%rax), %xmm0
	pcmpgtd	%xmm4, %xmm1
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %r15
	jne	.L12
	movdqa	%xmm2, %xmm0
	movl	%r10d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r9d
	leal	(%r15,%rdx), %eax
	cmpl	%r15d, %r10d
	je	.L10
.L11:
	movslq	%eax, %r10
	movl	32(%rsp,%r10,4), %r10d
	cmpl	%r10d, %ecx
	je	.L15
	addl	%ecx, %r10d
	cmpl	%r10d, %r8d
	setl	%r10b
	movzbl	%r10b, %r10d
	addl	%r10d, %r9d
.L15:
	leal	1(%rax), %r10d
	cmpl	%r10d, %edi
	jle	.L10
	movslq	%r10d, %r10
	movl	32(%rsp,%r10,4), %r10d
	cmpl	%r10d, %ecx
	je	.L16
	addl	%ecx, %r10d
	cmpl	%r10d, %r8d
	setl	%r10b
	movzbl	%r10b, %r10d
	addl	%r10d, %r9d
.L16:
	addl	$2, %eax
	cmpl	%eax, %edi
	jle	.L10
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %ecx
	je	.L10
	addl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %r8d
	setl	%al
	addl	%eax, %r9d
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$4, %rsi
	cmpl	%edi, %edx
	jne	.L19
.L20:
	addl	$1, %r13d
	addl	$1, %r12d
	addq	$4, %r14
	cmpl	%edi, %r13d
	jl	.L33
.L7:
	addl	$1, %r12d
	addq	$4, %r14
	cmpl	%edi, %r13d
	jne	.L21
.L6:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$456, %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
.L24:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L11
.L32:
	leaq	32(%rsp), %rbx
	movq	%rbx, 8(%rsp)
	jmp	.L4
.L23:
	xorl	%r9d, %r9d
	jmp	.L6
.L34:
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	leaq	32(%rsp), %rax
	xorl	%ebx, %ebx
	movq	%rax, 8(%rsp)
	movq	%rax, %r12
	.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:
	movq	8(%rsp), %r14
	movslq	%eax, %rsi
	movl	$4, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L23
	movl	$2, %r12d
	xorl	%r9d, %r9d
	leal	-1(%rdi), %r11d
	xorl	%r13d, %r13d
	movl	$1, %ebx
	pxor	%xmm5, %xmm5
.L21:
	addl	$1, %r13d
	cmpl	%edi, %r13d
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%r12d, %edx
	cmpl	%edi, %r12d
	jge	.L20
	movl	(%r14), %r8d
	movq	8(%rsp), %rsi
	movslq	%r12d, %rax
	movd	%r8d, %xmm7
	leaq	(%rsi,%rax,4), %rsi
	pshufd	$0, %xmm7, %xmm4
	.p2align 4,,10
	.p2align 3
.L19:
	movl	-4(%rsi), %ecx
	cmpl	%ecx, %r8d
	je	.L10
	movl	%edi, %r10d
	movl	%r11d, %eax
	subl	%edx, %r10d
	cmpl	%edi, %edx
	cmovge	%ebx, %r10d
	subl	%edx, %eax
	cmpl	$2, %eax
	jbe	.L24
	cmpl	%edi, %edx
	jge	.L24
	movl	%r10d, %eax
	movd	%ecx, %xmm6
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm6, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rsi,%rax), %r15
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	movdqu	-16(%rax), %xmm0
	pcmpgtd	%xmm4, %xmm1
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %r15
	jne	.L12
	movdqa	%xmm2, %xmm0
	movl	%r10d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r9d
	leal	(%r15,%rdx), %eax
	cmpl	%r15d, %r10d
	je	.L10
.L11:
	movslq	%eax, %r10
	movl	32(%rsp,%r10,4), %r10d
	cmpl	%r10d, %ecx
	je	.L15
	addl	%ecx, %r10d
	cmpl	%r10d, %r8d
	setl	%r10b
	movzbl	%r10b, %r10d
	addl	%r10d, %r9d
.L15:
	leal	1(%rax), %r10d
	cmpl	%r10d, %edi
	jle	.L10
	movslq	%r10d, %r10
	movl	32(%rsp,%r10,4), %r10d
	cmpl	%r10d, %ecx
	je	.L16
	addl	%ecx, %r10d
	cmpl	%r10d, %r8d
	setl	%r10b
	movzbl	%r10b, %r10d
	addl	%r10d, %r9d
.L16:
	addl	$2, %eax
	cmpl	%eax, %edi
	jle	.L10
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %ecx
	je	.L10
	addl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %r8d
	setl	%al
	addl	%eax, %r9d
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$4, %rsi
	cmpl	%edi, %edx
	jne	.L19
.L20:
	addl	$1, %r13d
	addl	$1, %r12d
	addq	$4, %r14
	cmpl	%edi, %r13d
	jl	.L33
.L7:
	addl	$1, %r12d
	addq	$4, %r14
	cmpl	%edi, %r13d
	jne	.L21
.L6:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$456, %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
.L24:
	.cfi_restore_state
	movl	%edx, %eax
	jmp	.L11
.L32:
	leaq	32(%rsp), %rbx
	movq	%rbx, 8(%rsp)
	jmp	.L4
.L23:
	xorl	%r9d, %r9d
	jmp	.L6
.L34:
	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(void)
{
    int n, i, j, k;
    int ans=0;
    int a[100];

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

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

    for(i=0; i<n; i++){
        for(j=i+1; j<n; j++){
            for(k=j+1; k<n; k++){
                if(a[i]!=a[j] && a[j]!=a[k] && a[k]+a[j]>a[i]){
                    ans++;
                    
                }
            }
        }
    }

    printf("%d", ans);

}
2
1 0
 10
9 4 8 1 9 6 10 6 6 8
 6
4 5 8 3 3 5
 5
4 4 3 7 5
 10
9 4 16 1 9 6 10 6 6 8
 6
4 5 6 3 3 5
 5
4 0 3 7 5
 10
9 7 16 1 9 6 10 6 6 8
 5
4 -1 0 7 5
 10
9 7 13 2 9 6 10 6 6 8

0 48 6 5 36 12 3 40 1 63
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(void)
{
    int n, i, j, k;
    int ans=0;
    int a[100];

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

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

    for(i=0; i<n; i++){
        for(j=i+1; j<n; j++){
            for(k=j+1; k<n; k++){
                if(a[i]!=a[j] && a[j]!=a[k] && a[k]+a[j]>a[i]){
                    ans++;
                    
                }
            }
        }
    }

    printf("%d", ans);

}```

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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -432(%rbp)
	jmp	.L6
.L12:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -424(%rbp)
	jmp	.L8
.L10:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -420(%rbp)
.L9:
	addl	$1, -424(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L10
	addl	$1, -428(%rbp)
.L7:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	addl	$1, -432(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L12
	movl	-420(%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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-436(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%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, -432(%rbp)
.L4:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
	movl	-436(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -432(%rbp)
	jmp	.L6
.L12:
	movl	-432(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -424(%rbp)
	jmp	.L8
.L10:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	addl	$1, -420(%rbp)
.L9:
	addl	$1, -424(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L10
	addl	$1, -428(%rbp)
.L7:
	movl	-436(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	addl	$1, -432(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L12
	movl	-420(%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:
