Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

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

int main(void){
	int n, i;
	int a[200000], b[200000];
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", a+i);
		b[i]=a[i];
	}
	qsort(b, n, sizeof(int), comp);
	int m1=b[n/2-1], m2=b[n/2];

	if(m1==m2){
		char buf[11];
		sprintf(buf, "%d\n", m1);
		for(i=0; i<n; i++){
			fputs(buf, stdout);
		}
	}else{
		char buf[2][11];
		sprintf(buf[0], "%d\n", m1);
		sprintf(buf[1], "%d\n", m2);
		for(i=0; i<n; i++){
			if(a[i]<=m1){
				fputs(buf[1], stdout);
			}else{
				fputs(buf[0], stdout);
			}
		}
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L4
.L5:
	movl	-1600076(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1600032(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %edx
	movl	-1600076(%rbp), %eax
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -1600076(%rbp)
.L4:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L5
	movl	-1600080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600072(%rbp)
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600068(%rbp)
	movl	-1600072(%rbp), %eax
	cmpl	-1600068(%rbp), %eax
	jne	.L6
	movl	-1600072(%rbp), %edx
	leaq	-19(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L7
.L8:
	movq	stdout(%rip), %rdx
	leaq	-19(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	addl	$1, -1600076(%rbp)
.L7:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L8
	jmp	.L9
.L6:
	movl	-1600072(%rbp), %edx
	leaq	-1600064(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	-1600068(%rbp), %eax
	leaq	-1600064(%rbp), %rdx
	leaq	11(%rdx), %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L10
.L13:
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %eax
	cmpl	%eax, -1600072(%rbp)
	jl	.L11
	movq	stdout(%rip), %rax
	leaq	-1600064(%rbp), %rdx
	addq	$11, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	fputs@PLT
	jmp	.L12
.L11:
	movq	stdout(%rip), %rdx
	leaq	-1600064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
.L12:
	addl	$1, -1600076(%rbp)
.L10:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L13
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB64:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2640, %rsp
	.cfi_def_cfa_offset 1600128
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600072(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	800048(%rsp), %r12
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	800048(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movslq	12(%rsp), %rsi
	movl	%eax, (%r12,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movl	$4, %edx
	leaq	comp(%rip), %rcx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	leal	-1(%rax), %edx
	cltq
	movslq	%edx, %rdx
	movl	800048(%rsp,%rax,4), %ebx
	movl	800048(%rsp,%rdx,4), %ebp
	cmpl	%ebx, %ebp
	je	.L24
	leaq	16(%rsp), %r14
	movl	%ebp, %r8d
	movl	$22, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %r12
	movl	$1, %esi
	movq	%r14, %rdi
	movq	%r12, %rcx
	leaq	27(%rsp), %r13
	call	__sprintf_chk@PLT
	movl	%ebx, %r8d
	movq	%r12, %rcx
	xorl	%eax, %eax
	movl	$11, %edx
	movl	$1, %esi
	movq	%r13, %rdi
	xorl	%ebx, %ebx
	call	__sprintf_chk@PLT
	cmpl	$0, 12(%rsp)
	leaq	48(%rsp), %r12
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	cmpl	%ebp, (%r12,%rbx,4)
	jg	.L11
	movq	%r13, %rdi
	addq	$1, %rbx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L10
.L8:
	movq	1600072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$1600080, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	movq	%r14, %rdi
	addq	$1, %rbx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L10
	jmp	.L8
.L24:
	leaq	1600061(%rsp), %r12
	xorl	%eax, %eax
	movl	%ebp, %r8d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rcx
	movl	$11, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	__sprintf_chk@PLT
	cmpl	$0, 12(%rsp)
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	stdout(%rip), %rsi
	movq	%r12, %rdi
	addl	$1, %ebx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	jmp	.L8
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE64:
	.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	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB64:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597488
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2640, %rsp
	.cfi_def_cfa_offset 1600128
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600072(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	800048(%rsp), %r12
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	800048(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	movslq	12(%rsp), %rsi
	movl	%eax, (%r12,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	movl	$4, %edx
	leaq	comp(%rip), %rcx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	leal	-1(%rax), %edx
	cltq
	movslq	%edx, %rdx
	movl	800048(%rsp,%rax,4), %ebx
	movl	800048(%rsp,%rdx,4), %ebp
	cmpl	%ebx, %ebp
	je	.L24
	leaq	16(%rsp), %r14
	movl	%ebp, %r8d
	movl	$22, %edx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %r12
	movl	$1, %esi
	movq	%r14, %rdi
	movq	%r12, %rcx
	leaq	27(%rsp), %r13
	call	__sprintf_chk@PLT
	movl	%ebx, %r8d
	movq	%r12, %rcx
	xorl	%eax, %eax
	movl	$11, %edx
	movl	$1, %esi
	movq	%r13, %rdi
	xorl	%ebx, %ebx
	call	__sprintf_chk@PLT
	cmpl	$0, 12(%rsp)
	leaq	48(%rsp), %r12
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	cmpl	%ebp, (%r12,%rbx,4)
	jg	.L11
	movq	%r13, %rdi
	addq	$1, %rbx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L10
.L8:
	movq	1600072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$1600080, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	movq	%r14, %rdi
	addq	$1, %rbx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L10
	jmp	.L8
.L24:
	leaq	1600061(%rsp), %r12
	xorl	%eax, %eax
	movl	%ebp, %r8d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rcx
	movl	$11, %edx
	movl	$1, %esi
	movq	%r12, %rdi
	call	__sprintf_chk@PLT
	cmpl	$0, 12(%rsp)
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	stdout(%rip), %rsi
	movq	%r12, %rdi
	addl	$1, %ebx
	call	fputs@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	jmp	.L8
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE64:
	.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 <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

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

int main(void){
	int n, i;
	int a[200000], b[200000];
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", a+i);
		b[i]=a[i];
	}
	qsort(b, n, sizeof(int), comp);
	int m1=b[n/2-1], m2=b[n/2];

	if(m1==m2){
		char buf[11];
		sprintf(buf, "%d\n", m1);
		for(i=0; i<n; i++){
			fputs(buf, stdout);
		}
	}else{
		char buf[2][11];
		sprintf(buf[0], "%d\n", m1);
		sprintf(buf[1], "%d\n", m2);
		for(i=0; i<n; i++){
			if(a[i]<=m1){
				fputs(buf[1], stdout);
			}else{
				fputs(buf[0], stdout);
			}
		}
	}
}

4
2 4 4 3

4
3
3
4

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

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

int main(void){
	int n, i;
	int a[200000], b[200000];
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", a+i);
		b[i]=a[i];
	}
	qsort(b, n, sizeof(int), comp);
	int m1=b[n/2-1], m2=b[n/2];

	if(m1==m2){
		char buf[11];
		sprintf(buf, "%d\n", m1);
		for(i=0; i<n; i++){
			fputs(buf, stdout);
		}
	}else{
		char buf[2][11];
		sprintf(buf[0], "%d\n", m1);
		sprintf(buf[1], "%d\n", m2);
		for(i=0; i<n; i++){
			if(a[i]<=m1){
				fputs(buf[1], stdout);
			}else{
				fputs(buf[0], stdout);
			}
		}
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L4
.L5:
	movl	-1600076(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1600032(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %edx
	movl	-1600076(%rbp), %eax
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -1600076(%rbp)
.L4:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L5
	movl	-1600080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600072(%rbp)
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600068(%rbp)
	movl	-1600072(%rbp), %eax
	cmpl	-1600068(%rbp), %eax
	jne	.L6
	movl	-1600072(%rbp), %edx
	leaq	-19(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L7
.L8:
	movq	stdout(%rip), %rdx
	leaq	-19(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	addl	$1, -1600076(%rbp)
.L7:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L8
	jmp	.L9
.L6:
	movl	-1600072(%rbp), %edx
	leaq	-1600064(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	-1600068(%rbp), %eax
	leaq	-1600064(%rbp), %rdx
	leaq	11(%rdx), %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L10
.L13:
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %eax
	cmpl	%eax, -1600072(%rbp)
	jl	.L11
	movq	stdout(%rip), %rax
	leaq	-1600064(%rbp), %rdx
	addq	$11, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	fputs@PLT
	jmp	.L12
.L11:
	movq	stdout(%rip), %rdx
	leaq	-1600064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
.L12:
	addl	$1, -1600076(%rbp)
.L10:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L13
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	comp
	.type	comp, @function
comp:
.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), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L4
.L5:
	movl	-1600076(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1600032(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %edx
	movl	-1600076(%rbp), %eax
	cltq
	movl	%edx, -800032(%rbp,%rax,4)
	addl	$1, -1600076(%rbp)
.L4:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L5
	movl	-1600080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800032(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600072(%rbp)
	movl	-1600080(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-800032(%rbp,%rax,4), %eax
	movl	%eax, -1600068(%rbp)
	movl	-1600072(%rbp), %eax
	cmpl	-1600068(%rbp), %eax
	jne	.L6
	movl	-1600072(%rbp), %edx
	leaq	-19(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L7
.L8:
	movq	stdout(%rip), %rdx
	leaq	-19(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
	addl	$1, -1600076(%rbp)
.L7:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L8
	jmp	.L9
.L6:
	movl	-1600072(%rbp), %edx
	leaq	-1600064(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	-1600068(%rbp), %eax
	leaq	-1600064(%rbp), %rdx
	leaq	11(%rdx), %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -1600076(%rbp)
	jmp	.L10
.L13:
	movl	-1600076(%rbp), %eax
	cltq
	movl	-1600032(%rbp,%rax,4), %eax
	cmpl	%eax, -1600072(%rbp)
	jl	.L11
	movq	stdout(%rip), %rax
	leaq	-1600064(%rbp), %rdx
	addq	$11, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	fputs@PLT
	jmp	.L12
.L11:
	movq	stdout(%rip), %rdx
	leaq	-1600064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fputs@PLT
.L12:
	addl	$1, -1600076(%rbp)
.L10:
	movl	-1600080(%rbp), %eax
	cmpl	%eax, -1600076(%rbp)
	jl	.L13
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
