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>

int main(){
	int N;
	scanf("%d",&N);
	float a[N];
	float alt[N];
	for (int i = 0; i < N; ++i)
	{
		scanf("%f",&a[i]);
	}
	float total=0;
	float average;
	for (int i = 0; i < N; ++i)
	{
		total += a[i];
	}
	average = total/N;
	for (int i = 0; i < N; ++i)
	{
		if(a[i]-average<0){
			a[i] = (a[i]-average)*(-1);
		}
		else{
			a[i] -= average;
		}
		alt[i] = a[i];
	}
	for (int i = N; i > 0; --i)
	{
		for (int j = 0; j < i; ++j)
		{
			if(a[j] < a[j-1]){
				float tmp = a[j];
				a[j] = a[j-1];
				a[j-1] = tmp;
			}
		}
	}
	int answer;
	for (int i = 0; i < N; ++i)
	{
		if(alt[i]==a[0]){
			answer = i;
			break;
		}	
	}
	printf("%d",answer);	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -128(%rbp)
	jmp	.L8
.L9:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L8:
	movl	-132(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L9
	pxor	%xmm0, %xmm0
	movss	%xmm0, -124(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L10
.L11:
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	-124(%rbp), %xmm1
	addss	%xmm1, %xmm0
	movss	%xmm0, -124(%rbp)
	addl	$1, -120(%rbp)
.L10:
	movl	-132(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L11
	movl	-132(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-124(%rbp), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, -96(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L12
.L16:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movaps	%xmm0, %xmm1
	subss	-96(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L33
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movss	.LC3(%rip), %xmm1
	xorps	%xmm1, %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	jmp	.L15
.L33:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
.L15:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L16
	movl	-132(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L17
.L22:
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm1
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L19
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, -92(%rbp)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	-92(%rbp), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
.L19:
	addl	$1, -108(%rbp)
.L18:
	movl	-108(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jl	.L21
	subl	$1, -112(%rbp)
.L17:
	cmpl	$0, -112(%rbp)
	jg	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L27:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movss	(%rax), %xmm1
	ucomiss	%xmm1, %xmm0
	jp	.L24
	ucomiss	%xmm1, %xmm0
	jne	.L24
	movl	-100(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L26
.L24:
	addl	$1, -100(%rbp)
.L23:
	movl	-132(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L27
.L26:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L57:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L57
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L58
.L4:
	leaq	3(%rsp), %rdx
	movq	%rax, %rsi
	movq	%rsp, %rdi
	andq	$-4096, %rax
	movq	%rdx, %rbx
	andq	$-4, %rdx
	andq	$-16, %rsi
	subq	%rax, %rdi
	shrq	$2, %rbx
	movq	%rdx, %r13
	movq	%rbx, -80(%rbp)
.L5:
	cmpq	%rdi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L58:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L59
.L7:
	movq	%rsp, %rbx
	testl	%ecx, %ecx
	jle	.L27
	movq	%r13, %r12
	movq	%r13, %r15
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r15
	cmpl	%r14d, %ecx
	jg	.L9
	testl	%ecx, %ecx
	jle	.L27
	leal	-1(%rcx), %esi
	movl	%ecx, %edi
	cmpl	$2, %esi
	jbe	.L34
	movl	%ecx, %eax
	pxor	%xmm4, %xmm4
	shrl	$2, %eax
	movaps	%xmm4, %xmm1
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movups	(%r12), %xmm0
	addq	$16, %r12
	addss	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	shufps	$85, %xmm0, %xmm2
	addss	%xmm2, %xmm1
	movaps	%xmm0, %xmm2
	unpckhps	%xmm0, %xmm2
	shufps	$255, %xmm0, %xmm0
	addss	%xmm2, %xmm1
	addss	%xmm0, %xmm1
	cmpq	%rax, %r12
	jne	.L11
	movl	%ecx, %eax
	andl	$-4, %eax
	cmpl	%eax, %ecx
	je	.L60
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %r9d
	leaq	0(%r13,%r8,4), %r8
	addss	(%r8), %xmm1
	cmpl	%r9d, %ecx
	jle	.L13
	addl	$2, %eax
	addss	4(%r8), %xmm1
	cmpl	%eax, %ecx
	jle	.L13
	addss	8(%r8), %xmm1
.L13:
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%ecx, %xmm0
	divss	%xmm0, %xmm1
	cmpl	$2, %esi
	jbe	.L61
.L32:
	movl	%ecx, %r8d
	movaps	.LC4(%rip), %xmm6
	movaps	%xmm1, %xmm7
	xorl	%eax, %eax
	shrl	$2, %r8d
	pxor	%xmm5, %xmm5
	shufps	$0, %xmm7, %xmm7
	salq	$4, %r8
	.p2align 4,,10
	.p2align 3
.L21:
	movups	0(%r13,%rax), %xmm2
	subps	%xmm7, %xmm2
	movaps	%xmm2, %xmm0
	movaps	%xmm2, %xmm3
	cmpltps	%xmm5, %xmm0
	xorps	%xmm6, %xmm3
	andps	%xmm0, %xmm3
	andnps	%xmm2, %xmm0
	orps	%xmm3, %xmm0
	movups	%xmm0, 0(%r13,%rax)
	movups	%xmm0, (%rbx,%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L21
	movl	%ecx, %r9d
	andl	$-4, %r9d
	testb	$3, %cl
	je	.L26
.L31:
	movslq	%r9d, %rax
	salq	$2, %rax
	leaq	0(%r13,%rax), %r8
	movss	(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L15
	xorps	.LC3(%rip), %xmm0
.L15:
	addq	%rbx, %rax
	leal	1(%r9), %r10d
	movss	%xmm0, (%r8)
	movss	%xmm0, (%rax)
	cmpl	%r10d, %ecx
	jle	.L26
	movss	4(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L17
	xorps	.LC3(%rip), %xmm0
.L17:
	addl	$2, %r9d
	movss	%xmm0, 4(%r8)
	movss	%xmm0, 4(%rax)
	cmpl	%r9d, %ecx
	jle	.L26
	movss	8(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L20
	xorps	.LC3(%rip), %xmm0
.L20:
	movss	%xmm0, 8(%r8)
	movss	%xmm0, 8(%rax)
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L25:
	movq	-4(%r13,%rax,4), %xmm0
	movaps	%xmm0, %xmm4
	movaps	%xmm0, %xmm2
	shufps	$0xe5, %xmm4, %xmm4
	comiss	%xmm4, %xmm0
	shufps	$0xe1, %xmm2, %xmm2
	jbe	.L23
	movlps	%xmm2, -4(%r13,%rax,4)
.L23:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L25
	movl	%esi, %ecx
	testl	%esi, %esi
	je	.L53
	subl	$1, %esi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L53:
	movq	-80(%rbp), %rax
	movl	%edi, %edi
	movss	0(,%rax,4), %xmm0
	xorl	%eax, %eax
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$1, %rax
	cmpq	%rax, %rdi
	je	.L27
.L29:
	ucomiss	(%rbx,%rax,4), %xmm0
	movl	%eax, -68(%rbp)
	jp	.L39
	jne	.L39
.L27:
	movl	-68(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L60:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%ecx, %xmm0
	divss	%xmm0, %xmm1
	jmp	.L32
.L34:
	pxor	%xmm4, %xmm4
	xorl	%eax, %eax
	movaps	%xmm4, %xmm1
	jmp	.L10
.L61:
	xorl	%r9d, %r9d
	jmp	.L31
.L59:
	orq	$0, -8(%rsp,%rsi)
	jmp	.L7
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.align 16
.LC4:
	.long	-2147483648
	.long	-2147483648
	.long	-2147483648
	.long	-2147483648
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L57:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L57
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L58
.L4:
	leaq	3(%rsp), %rdx
	movq	%rax, %rsi
	movq	%rsp, %rdi
	andq	$-4096, %rax
	movq	%rdx, %rbx
	andq	$-4, %rdx
	andq	$-16, %rsi
	subq	%rax, %rdi
	shrq	$2, %rbx
	movq	%rdx, %r13
	movq	%rbx, -80(%rbp)
.L5:
	cmpq	%rdi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L58:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L59
.L7:
	movq	%rsp, %rbx
	testl	%ecx, %ecx
	jle	.L27
	movq	%r13, %r12
	movq	%r13, %r15
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r15
	cmpl	%r14d, %ecx
	jg	.L9
	testl	%ecx, %ecx
	jle	.L27
	leal	-1(%rcx), %esi
	movl	%ecx, %edi
	cmpl	$2, %esi
	jbe	.L34
	movl	%ecx, %eax
	pxor	%xmm4, %xmm4
	shrl	$2, %eax
	movaps	%xmm4, %xmm1
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movups	(%r12), %xmm0
	addq	$16, %r12
	addss	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	shufps	$85, %xmm0, %xmm2
	addss	%xmm2, %xmm1
	movaps	%xmm0, %xmm2
	unpckhps	%xmm0, %xmm2
	shufps	$255, %xmm0, %xmm0
	addss	%xmm2, %xmm1
	addss	%xmm0, %xmm1
	cmpq	%rax, %r12
	jne	.L11
	movl	%ecx, %eax
	andl	$-4, %eax
	cmpl	%eax, %ecx
	je	.L60
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %r9d
	leaq	0(%r13,%r8,4), %r8
	addss	(%r8), %xmm1
	cmpl	%r9d, %ecx
	jle	.L13
	addl	$2, %eax
	addss	4(%r8), %xmm1
	cmpl	%eax, %ecx
	jle	.L13
	addss	8(%r8), %xmm1
.L13:
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%ecx, %xmm0
	divss	%xmm0, %xmm1
	cmpl	$2, %esi
	jbe	.L61
.L32:
	movl	%ecx, %r8d
	movaps	.LC4(%rip), %xmm6
	movaps	%xmm1, %xmm7
	xorl	%eax, %eax
	shrl	$2, %r8d
	pxor	%xmm5, %xmm5
	shufps	$0, %xmm7, %xmm7
	salq	$4, %r8
	.p2align 4,,10
	.p2align 3
.L21:
	movups	0(%r13,%rax), %xmm2
	subps	%xmm7, %xmm2
	movaps	%xmm2, %xmm0
	movaps	%xmm2, %xmm3
	cmpltps	%xmm5, %xmm0
	xorps	%xmm6, %xmm3
	andps	%xmm0, %xmm3
	andnps	%xmm2, %xmm0
	orps	%xmm3, %xmm0
	movups	%xmm0, 0(%r13,%rax)
	movups	%xmm0, (%rbx,%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L21
	movl	%ecx, %r9d
	andl	$-4, %r9d
	testb	$3, %cl
	je	.L26
.L31:
	movslq	%r9d, %rax
	salq	$2, %rax
	leaq	0(%r13,%rax), %r8
	movss	(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L15
	xorps	.LC3(%rip), %xmm0
.L15:
	addq	%rbx, %rax
	leal	1(%r9), %r10d
	movss	%xmm0, (%r8)
	movss	%xmm0, (%rax)
	cmpl	%r10d, %ecx
	jle	.L26
	movss	4(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L17
	xorps	.LC3(%rip), %xmm0
.L17:
	addl	$2, %r9d
	movss	%xmm0, 4(%r8)
	movss	%xmm0, 4(%rax)
	cmpl	%r9d, %ecx
	jle	.L26
	movss	8(%r8), %xmm0
	subss	%xmm1, %xmm0
	comiss	%xmm0, %xmm4
	jbe	.L20
	xorps	.LC3(%rip), %xmm0
.L20:
	movss	%xmm0, 8(%r8)
	movss	%xmm0, 8(%rax)
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L25:
	movq	-4(%r13,%rax,4), %xmm0
	movaps	%xmm0, %xmm4
	movaps	%xmm0, %xmm2
	shufps	$0xe5, %xmm4, %xmm4
	comiss	%xmm4, %xmm0
	shufps	$0xe1, %xmm2, %xmm2
	jbe	.L23
	movlps	%xmm2, -4(%r13,%rax,4)
.L23:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L25
	movl	%esi, %ecx
	testl	%esi, %esi
	je	.L53
	subl	$1, %esi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L53:
	movq	-80(%rbp), %rax
	movl	%edi, %edi
	movss	0(,%rax,4), %xmm0
	xorl	%eax, %eax
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$1, %rax
	cmpq	%rax, %rdi
	je	.L27
.L29:
	ucomiss	(%rbx,%rax,4), %xmm0
	movl	%eax, -68(%rbp)
	jp	.L39
	jne	.L39
.L27:
	movl	-68(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L60:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%ecx, %xmm0
	divss	%xmm0, %xmm1
	jmp	.L32
.L34:
	pxor	%xmm4, %xmm4
	xorl	%eax, %eax
	movaps	%xmm4, %xmm1
	jmp	.L10
.L61:
	xorl	%r9d, %r9d
	jmp	.L31
.L59:
	orq	$0, -8(%rsp,%rsi)
	jmp	.L7
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.align 16
.LC4:
	.long	-2147483648
	.long	-2147483648
	.long	-2147483648
	.long	-2147483648
	.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>

int main(){
	int N;
	scanf("%d",&N);
	float a[N];
	float alt[N];
	for (int i = 0; i < N; ++i)
	{
		scanf("%f",&a[i]);
	}
	float total=0;
	float average;
	for (int i = 0; i < N; ++i)
	{
		total += a[i];
	}
	average = total/N;
	for (int i = 0; i < N; ++i)
	{
		if(a[i]-average<0){
			a[i] = (a[i]-average)*(-1);
		}
		else{
			a[i] -= average;
		}
		alt[i] = a[i];
	}
	for (int i = N; i > 0; --i)
	{
		for (int j = 0; j < i; ++j)
		{
			if(a[j] < a[j-1]){
				float tmp = a[j];
				a[j] = a[j-1];
				a[j-1] = tmp;
			}
		}
	}
	int answer;
	for (int i = 0; i < N; ++i)
	{
		if(alt[i]==a[0]){
			answer = i;
			break;
		}	
	}
	printf("%d",answer);	
	return 0;
}

3
0 2 3
 4
2 5 3 5
 3
0 0 3
 4
3 9 3 5
 4
3 5 3 5
 3
0 0 1
 4
5 9 3 5
 4
5 14 3 5
 4
5 14 6 5
 4
0 14 6 5

1 1 0 3 0 0 0 0 0 1
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>

int main(){
	int N;
	scanf("%d",&N);
	float a[N];
	float alt[N];
	for (int i = 0; i < N; ++i)
	{
		scanf("%f",&a[i]);
	}
	float total=0;
	float average;
	for (int i = 0; i < N; ++i)
	{
		total += a[i];
	}
	average = total/N;
	for (int i = 0; i < N; ++i)
	{
		if(a[i]-average<0){
			a[i] = (a[i]-average)*(-1);
		}
		else{
			a[i] -= average;
		}
		alt[i] = a[i];
	}
	for (int i = N; i > 0; --i)
	{
		for (int j = 0; j < i; ++j)
		{
			if(a[j] < a[j-1]){
				float tmp = a[j];
				a[j] = a[j-1];
				a[j-1] = tmp;
			}
		}
	}
	int answer;
	for (int i = 0; i < N; ++i)
	{
		if(alt[i]==a[0]){
			answer = i;
			break;
		}	
	}
	printf("%d",answer);	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -128(%rbp)
	jmp	.L8
.L9:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L8:
	movl	-132(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L9
	pxor	%xmm0, %xmm0
	movss	%xmm0, -124(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L10
.L11:
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	-124(%rbp), %xmm1
	addss	%xmm1, %xmm0
	movss	%xmm0, -124(%rbp)
	addl	$1, -120(%rbp)
.L10:
	movl	-132(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L11
	movl	-132(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-124(%rbp), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, -96(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L12
.L16:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movaps	%xmm0, %xmm1
	subss	-96(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L33
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movss	.LC3(%rip), %xmm1
	xorps	%xmm1, %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	jmp	.L15
.L33:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
.L15:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L16
	movl	-132(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L17
.L22:
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm1
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L19
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, -92(%rbp)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	-92(%rbp), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
.L19:
	addl	$1, -108(%rbp)
.L18:
	movl	-108(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jl	.L21
	subl	$1, -112(%rbp)
.L17:
	cmpl	$0, -112(%rbp)
	jg	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L27:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movss	(%rax), %xmm1
	ucomiss	%xmm1, %xmm0
	jp	.L24
	ucomiss	%xmm1, %xmm0
	jne	.L24
	movl	-100(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L26
.L24:
	addl	$1, -100(%rbp)
.L23:
	movl	-132(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L27
.L26:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -128(%rbp)
	jmp	.L8
.L9:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L8:
	movl	-132(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L9
	pxor	%xmm0, %xmm0
	movss	%xmm0, -124(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L10
.L11:
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	-124(%rbp), %xmm1
	addss	%xmm1, %xmm0
	movss	%xmm0, -124(%rbp)
	addl	$1, -120(%rbp)
.L10:
	movl	-132(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L11
	movl	-132(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-124(%rbp), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, -96(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L12
.L16:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movaps	%xmm0, %xmm1
	subss	-96(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L33
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movss	.LC3(%rip), %xmm1
	xorps	%xmm1, %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	jmp	.L15
.L33:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	subss	-96(%rbp), %xmm0
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
.L15:
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L16
	movl	-132(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L17
.L22:
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm1
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	comiss	%xmm1, %xmm0
	jbe	.L19
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movss	%xmm0, -92(%rbp)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movss	%xmm0, (%rax,%rdx,4)
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movss	-92(%rbp), %xmm0
	movss	%xmm0, (%rax,%rdx,4)
.L19:
	addl	$1, -108(%rbp)
.L18:
	movl	-108(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jl	.L21
	subl	$1, -112(%rbp)
.L17:
	cmpl	$0, -112(%rbp)
	jg	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L27:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movss	(%rax,%rdx,4), %xmm0
	movq	-80(%rbp), %rax
	movss	(%rax), %xmm1
	ucomiss	%xmm1, %xmm0
	jp	.L24
	ucomiss	%xmm1, %xmm0
	jne	.L24
	movl	-100(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L26
.L24:
	addl	$1, -100(%rbp)
.L23:
	movl	-132(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L27
.L26:
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.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:
