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 <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
typedef struct{
	int data,num;
}Data;
int comp(const void* a,const void* b){
	return ((Data*)a)->data - ((Data*)b)->data;
}
Data a[100000];
int main(void)
{
	int n,res=0,i;
	scanf("%d",&n);
	FOR(i,0,n){
		scanf("%d",&a[i].data);
		a[i].num=i;
	}
	qsort(a,n,sizeof(Data),comp);
	for(i=0;i<n;i+=2){
		if(a[i].num%2) res++;
	}
	printf("%d\n",res);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fill, .-fill
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.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
.LFE7:
	.size	comp, .-comp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+a(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -16(%rbp)
.L11:
	addl	$2, -12(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%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
.LFE8:
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB51:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE51:
	.size	fill, .-fill
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	leaq	a(%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	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	movl	%ebx, -4(%rbp)
	addl	$1, %ebx
	cmpl	%ebx, %esi
	jg	.L13
.L12:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L26
	shrl	$3, %eax
	pxor	%xmm2, %xmm2
	movdqa	.LC1(%rip), %xmm4
	movl	%eax, %ecx
	leaq	4+a(%rip), %rax
	movdqa	%xmm2, %xmm3
	leal	-1(%rcx), %edx
	leaq	64(%rax), %rdi
	salq	$6, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm5
	addq	$64, %rax
	movdqu	-32(%rax), %xmm1
	movdqu	-16(%rax), %xmm6
	shufps	$136, %xmm5, %xmm0
	shufps	$136, %xmm6, %xmm1
	shufps	$136, %xmm1, %xmm0
	pand	%xmm4, %xmm0
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L16
	movdqa	%xmm2, %xmm0
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
.L15:
	movslq	%eax, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	2(%rax), %ecx
	sbbl	$-1, %edx
	cmpl	%ecx, %esi
	jle	.L14
	movslq	%ecx, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	4(%rax), %ecx
	sbbl	$-1, %edx
	cmpl	%ecx, %esi
	jle	.L14
	movslq	%ecx, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %edx
	addl	$6, %eax
	cmpl	%esi, %eax
	jge	.L14
	cltq
	movl	4(%r12,%rax,8), %eax
	andl	$1, %eax
	cmpl	$1, %eax
	sbbl	$-1, %edx
.L14:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L25:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L14
.L26:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L15
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	comp, .-comp
	.p2align 4
	.globl	fill
	.type	fill, @function
fill:
.LFB51:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	testl	%esi, %esi
	jle	.L3
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L8
	shrl	$2, %esi
	movd	%edx, %xmm1
	movq	%rdi, %rax
	subl	$1, %esi
	pshufd	$0, %xmm1, %xmm0
	salq	$4, %rsi
	leaq	16(%rdi,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L10
.L5:
	movslq	%eax, %rsi
	movl	%edx, (%rdi,%rsi,4)
	leaq	0(,%rsi,4), %r8
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	jle	.L3
	addl	$2, %eax
	movl	%edx, 4(%rdi,%r8)
	cmpl	%eax, %ecx
	jle	.L3
	movl	%edx, 8(%rdi,%r8)
.L3:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.cfi_endproc
.LFE51:
	.size	fill, .-fill
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	leaq	a(%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	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jle	.L12
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rbp
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	movl	%ebx, -4(%rbp)
	addl	$1, %ebx
	cmpl	%ebx, %esi
	jg	.L13
.L12:
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jbe	.L26
	shrl	$3, %eax
	pxor	%xmm2, %xmm2
	movdqa	.LC1(%rip), %xmm4
	movl	%eax, %ecx
	leaq	4+a(%rip), %rax
	movdqa	%xmm2, %xmm3
	leal	-1(%rcx), %edx
	leaq	64(%rax), %rdi
	salq	$6, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm5
	addq	$64, %rax
	movdqu	-32(%rax), %xmm1
	movdqu	-16(%rax), %xmm6
	shufps	$136, %xmm5, %xmm0
	shufps	$136, %xmm6, %xmm1
	shufps	$136, %xmm1, %xmm0
	pand	%xmm4, %xmm0
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L16
	movdqa	%xmm2, %xmm0
	leal	0(,%rcx,8), %eax
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
.L15:
	movslq	%eax, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	2(%rax), %ecx
	sbbl	$-1, %edx
	cmpl	%ecx, %esi
	jle	.L14
	movslq	%ecx, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	4(%rax), %ecx
	sbbl	$-1, %edx
	cmpl	%ecx, %esi
	jle	.L14
	movslq	%ecx, %rcx
	movl	4(%r12,%rcx,8), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %edx
	addl	$6, %eax
	cmpl	%esi, %eax
	jge	.L14
	cltq
	movl	4(%r12,%rax,8), %eax
	andl	$1, %eax
	cmpl	$1, %eax
	sbbl	$-1, %edx
.L14:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L25:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L14
.L26:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L15
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
typedef struct{
	int data,num;
}Data;
int comp(const void* a,const void* b){
	return ((Data*)a)->data - ((Data*)b)->data;
}
Data a[100000];
int main(void)
{
	int n,res=0,i;
	scanf("%d",&n);
	FOR(i,0,n){
		scanf("%d",&a[i].data);
		a[i].num=i;
	}
	qsort(a,n,sizeof(Data),comp);
	for(i=0;i<n;i+=2){
		if(a[i].num%2) res++;
	}
	printf("%d\n",res);
	return 0;
}
4
2
4
2
1
 4
2
4
6
1
 4
0
13
10
1
 4
2
4
2
0
 4
2
4
8
1
 4
2
4
10
1
 4
2
4
13
1
 5
10
8
5
6
2
 4
2
4
11
1
 4
2
5
10
1

1
 2
 0
 1
 2
 2
 2
 1
 2
 2

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 <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define FOR(i,a,n) for(i=(a);i<(n);i++)
void fill(int a[],int b,int c){
	int i;
	FOR(i,0,b) a[i]=c;
	return;
}
typedef struct{
	int data,num;
}Data;
int comp(const void* a,const void* b){
	return ((Data*)a)->data - ((Data*)b)->data;
}
Data a[100000];
int main(void)
{
	int n,res=0,i;
	scanf("%d",&n);
	FOR(i,0,n){
		scanf("%d",&a[i].data);
		a[i].num=i;
	}
	qsort(a,n,sizeof(Data),comp);
	for(i=0;i<n;i+=2){
		if(a[i].num%2) res++;
	}
	printf("%d\n",res);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fill, .-fill
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.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
.LFE7:
	.size	comp, .-comp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+a(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -16(%rbp)
.L11:
	addl	$2, -12(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%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
.LFE8:
	.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	fill
	.type	fill, @function
fill:
.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, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fill, .-fill
	.globl	comp
	.type	comp, @function
comp:
.LFB7:
	.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
.LFE7:
	.size	comp, .-comp
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800000
a:
	.zero	800000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+a(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L11
	addl	$1, -16(%rbp)
.L11:
	addl	$2, -12(%rbp)
.L10:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%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
.LFE8:
	.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:
