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 compare(const void *n1, const void *n2){
	if(*(int *)n1 > *(int *)n2)
		return 1;
	else if(*(int *)n1 < *(int *)n2)
		return -1;
	else
		return 0;
}

int main(void){
	int min = 1 << 29;
	int n, temp;
	int num[100] = {0};

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

	qsort(num, n, sizeof(num[0]), compare);

	if(num[0] == num[n-1]) {
		printf("0");
		return 0;
	}

	for(int i=num[0]; i < num[n-1]; i++) {
		temp = 0;
		for(int j=0; j < n; j++) {
			temp += (i - num[j])*(i - num[j]);
		}
		if(min > temp)
			min = temp;
	}
	printf("%d", min);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.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	$536870912, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -428(%rbp)
	jmp	.L6
.L7:
	leaq	-416(%rbp), %rdx
	movl	-428(%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, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	movl	-440(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-416(%rbp), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L15
.L8:
	movl	-416(%rbp), %eax
	movl	%eax, -424(%rbp)
	jmp	.L10
.L14:
	movl	$0, -432(%rbp)
	movl	$0, -420(%rbp)
	jmp	.L11
.L12:
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	addl	%eax, -432(%rbp)
	addl	$1, -420(%rbp)
.L11:
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L12
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jle	.L13
	movl	-432(%rbp), %eax
	movl	%eax, -436(%rbp)
.L13:
	addl	$1, -424(%rbp)
.L10:
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L14
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$50, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	rep stosq
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r13
	cmpl	%ebx, %eax
	jg	.L7
.L6:
	movslq	%eax, %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %edi
	movl	16(%rsp), %edx
	leal	-1(%rdi), %ebx
	movslq	%ebx, %rax
	movl	16(%rsp,%rax,4), %r11d
	cmpl	%r11d, %edx
	je	.L8
	jge	.L18
	movl	%edi, %eax
	movl	%edi, %r10d
	movl	$536870912, %r9d
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	testl	%edi, %edi
	jle	.L16
	cmpl	$2, %ebx
	jbe	.L19
	movd	%edx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L13:
	movdqa	%xmm3, %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L13
	movdqa	%xmm2, %xmm0
	movl	%r10d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%edi, %r10d
	je	.L16
.L12:
	movslq	%ecx, %r8
	movl	%edx, %r13d
	subl	16(%rsp,%r8,4), %r13d
	movl	%r13d, %r8d
	imull	%r13d, %r8d
	addl	%r8d, %eax
	leal	1(%rcx), %r8d
	cmpl	%r8d, %edi
	jle	.L16
	movslq	%r8d, %r8
	movl	%edx, %r13d
	addl	$2, %ecx
	subl	16(%rsp,%r8,4), %r13d
	movl	%r13d, %r8d
	imull	%r13d, %r8d
	addl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L16
	movslq	%ecx, %rcx
	movl	%edx, %r8d
	subl	16(%rsp,%rcx,4), %r8d
	movl	%r8d, %ecx
	imull	%r8d, %ecx
	addl	%ecx, %eax
.L16:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %edx
	cmpl	%edx, %r11d
	jne	.L10
.L9:
	movl	%r9d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L12
.L8:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L11
.L18:
	movl	$536870912, %r9d
	jmp	.L9
.L23:
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$50, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	rep stosq
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r13
	cmpl	%ebx, %eax
	jg	.L7
.L6:
	movslq	%eax, %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movl	12(%rsp), %edi
	movl	16(%rsp), %edx
	leal	-1(%rdi), %ebx
	movslq	%ebx, %rax
	movl	16(%rsp,%rax,4), %r11d
	cmpl	%r11d, %edx
	je	.L8
	jge	.L18
	movl	%edi, %eax
	movl	%edi, %r10d
	movl	$536870912, %r9d
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	testl	%edi, %edi
	jle	.L16
	cmpl	$2, %ebx
	jbe	.L19
	movd	%edx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L13:
	movdqa	%xmm3, %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L13
	movdqa	%xmm2, %xmm0
	movl	%r10d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%edi, %r10d
	je	.L16
.L12:
	movslq	%ecx, %r8
	movl	%edx, %r13d
	subl	16(%rsp,%r8,4), %r13d
	movl	%r13d, %r8d
	imull	%r13d, %r8d
	addl	%r8d, %eax
	leal	1(%rcx), %r8d
	cmpl	%r8d, %edi
	jle	.L16
	movslq	%r8d, %r8
	movl	%edx, %r13d
	addl	$2, %ecx
	subl	16(%rsp,%r8,4), %r13d
	movl	%r13d, %r8d
	imull	%r13d, %r8d
	addl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L16
	movslq	%ecx, %rcx
	movl	%edx, %r8d
	subl	16(%rsp,%rcx,4), %r8d
	movl	%r8d, %ecx
	imull	%r8d, %ecx
	addl	%ecx, %eax
.L16:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %edx
	cmpl	%edx, %r11d
	jne	.L10
.L9:
	movl	%r9d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L12
.L8:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L11
.L18:
	movl	$536870912, %r9d
	jmp	.L9
.L23:
	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 compare(const void *n1, const void *n2){
	if(*(int *)n1 > *(int *)n2)
		return 1;
	else if(*(int *)n1 < *(int *)n2)
		return -1;
	else
		return 0;
}

int main(void){
	int min = 1 << 29;
	int n, temp;
	int num[100] = {0};

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

	qsort(num, n, sizeof(num[0]), compare);

	if(num[0] == num[n-1]) {
		printf("0");
		return 0;
	}

	for(int i=num[0]; i < num[n-1]; i++) {
		temp = 0;
		for(int j=0; j < n; j++) {
			temp += (i - num[j])*(i - num[j]);
		}
		if(min > temp)
			min = temp;
	}
	printf("%d", min);

	return 0;
}

2
5 8
 3
1 1 6
 3
4 3 5
 4
-100 -45 -100 -100
 2
5 11
 3
1 1 8
 3
3 3 5
 3
0 1 8
 3
3 0 5
 2
10 6

5 17 2 2269 18 33 3 38 13 8
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 compare(const void *n1, const void *n2){
	if(*(int *)n1 > *(int *)n2)
		return 1;
	else if(*(int *)n1 < *(int *)n2)
		return -1;
	else
		return 0;
}

int main(void){
	int min = 1 << 29;
	int n, temp;
	int num[100] = {0};

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

	qsort(num, n, sizeof(num[0]), compare);

	if(num[0] == num[n-1]) {
		printf("0");
		return 0;
	}

	for(int i=num[0]; i < num[n-1]; i++) {
		temp = 0;
		for(int j=0; j < n; j++) {
			temp += (i - num[j])*(i - num[j]);
		}
		if(min > temp)
			min = temp;
	}
	printf("%d", min);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.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	$536870912, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -428(%rbp)
	jmp	.L6
.L7:
	leaq	-416(%rbp), %rdx
	movl	-428(%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, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	movl	-440(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-416(%rbp), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L15
.L8:
	movl	-416(%rbp), %eax
	movl	%eax, -424(%rbp)
	jmp	.L10
.L14:
	movl	$0, -432(%rbp)
	movl	$0, -420(%rbp)
	jmp	.L11
.L12:
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	addl	%eax, -432(%rbp)
	addl	$1, -420(%rbp)
.L11:
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L12
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jle	.L13
	movl	-432(%rbp), %eax
	movl	%eax, -436(%rbp)
.L13:
	addl	$1, -424(%rbp)
.L10:
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L14
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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	compare
	.type	compare, @function
compare:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.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	$536870912, -436(%rbp)
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -428(%rbp)
	jmp	.L6
.L7:
	leaq	-416(%rbp), %rdx
	movl	-428(%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, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L7
	movl	-440(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-416(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-416(%rbp), %edx
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L15
.L8:
	movl	-416(%rbp), %eax
	movl	%eax, -424(%rbp)
	jmp	.L10
.L14:
	movl	$0, -432(%rbp)
	movl	$0, -420(%rbp)
	jmp	.L11
.L12:
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-420(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %ecx
	movl	-424(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	addl	%eax, -432(%rbp)
	addl	$1, -420(%rbp)
.L11:
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L12
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jle	.L13
	movl	-432(%rbp), %eax
	movl	%eax, -436(%rbp)
.L13:
	addl	$1, -424(%rbp)
.L10:
	movl	-440(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L14
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
