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 <string.h>
#include <stdlib.h>

typedef long long ll;
typedef double keytype;

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int main(){
    int n;
    double a[1005];

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

    double sum = 0;
    for(int i = 0; i < n; ++i){
        sum += (1 / a[i]);
    }

    printf("%f\n", 1 / sum);

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quicksort
	.type	quicksort, @function
quicksort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L2
.L3:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	ja	.L3
	jmp	.L4
.L5:
	subl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	comisd	-16(%rbp), %xmm0
	ja	.L5
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L12
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movsd	(%rdx), %xmm0
	movsd	%xmm0, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rax)
	addl	$1, -24(%rbp)
	subl	$1, -20(%rbp)
	jmp	.L2
.L12:
	nop
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -44(%rbp)
	jge	.L9
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L9:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -48(%rbp)
	jle	.L13
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lf"
.LC4:
	.string	"%f\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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8064(%rbp)
	jmp	.L15
.L16:
	leaq	-8048(%rbp), %rdx
	movl	-8064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8064(%rbp)
.L15:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8064(%rbp)
	jl	.L16
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L17
.L18:
	movl	-8060(%rbp), %eax
	cltq
	movsd	-8048(%rbp,%rax,8), %xmm1
	movsd	.LC3(%rip), %xmm0
	divsd	%xmm1, %xmm0
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8060(%rbp)
.L17:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L18
	movsd	.LC3(%rip), %xmm0
	divsd	-8056(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %rax
	movq	%rdi, %r11
	movl	%esi, %r10d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movl	%eax, 40(%rsp)
	movq	%rax, 72(%rsp)
.L9:
	movl	40(%rsp), %edi
	movslq	%r10d, %rbx
	movl	%r10d, %esi
	leaq	(%r11,%rbx,8), %rcx
	leal	(%r10,%rdi), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	72(%rsp), %rax
.L2:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdi
	movsd	(%rdi), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L3
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rax, %rdi
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %edx
	comisd	%xmm1, %xmm0
	ja	.L6
.L4:
	cmpl	%edx, %esi
	jge	.L7
	subl	$1, %edx
	movsd	%xmm0, (%rcx)
	movslq	%edx, %rax
	movsd	%xmm2, (%rdi)
.L3:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L2
.L7:
	leal	-1(%rsi), %eax
	movl	%edx, 44(%rsp)
	movl	%eax, 12(%rsp)
	cmpl	%r10d, %eax
	jg	.L130
.L18:
	movl	44(%rsp), %r10d
	addl	$1, %r10d
	cmpl	40(%rsp), %r10d
	jl	.L9
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L130:
	.cfi_restore_state
	cltq
	movq	%rax, 64(%rsp)
.L8:
	movl	12(%rsp), %edi
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%rdi,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	64(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdi
	movsd	(%rdi), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L12
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, %rdi
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %edx
	comisd	%xmm1, %xmm0
	ja	.L15
.L13:
	cmpl	%edx, %esi
	jge	.L16
	subl	$1, %edx
	movsd	%xmm0, (%rcx)
	movslq	%edx, %rax
	movsd	%xmm2, (%rdi)
.L12:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L11
.L16:
	leal	-1(%rsi), %eax
	movl	%edx, 80(%rsp)
	movl	%eax, 16(%rsp)
	cmpl	%eax, %r10d
	jl	.L131
.L26:
	movl	80(%rsp), %r10d
	addl	$1, %r10d
	cmpl	%r10d, 12(%rsp)
	jle	.L18
	movslq	%r10d, %rbx
	jmp	.L8
.L131:
	cltq
	movq	%rax, 56(%rsp)
.L17:
	movl	16(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	56(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L20
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L23
.L21:
	cmpl	%r9d, %esi
	jge	.L24
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L20:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L19
.L24:
	leal	-1(%rsi), %eax
	movl	%eax, 20(%rsp)
	cmpl	%eax, %r10d
	jl	.L132
.L34:
	leal	1(%r9), %r10d
	cmpl	%r10d, 16(%rsp)
	jle	.L26
	movslq	%r10d, %rbx
	jmp	.L17
.L132:
	cltq
	movl	%r9d, 84(%rsp)
	movq	%rax, 48(%rsp)
.L25:
	movl	20(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	48(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L27:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L28
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L31
.L29:
	cmpl	%r9d, %esi
	jge	.L32
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L28:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L27
.L32:
	leal	-1(%rsi), %eax
	movl	%eax, 8(%rsp)
	cmpl	%eax, %r10d
	jl	.L133
	leal	1(%r9), %r10d
	cmpl	%r10d, 20(%rsp)
	jle	.L122
.L141:
	movslq	%r10d, %rbx
	jmp	.L25
.L133:
	cltq
	movl	%r9d, 88(%rsp)
	movq	%rax, 32(%rsp)
.L33:
	movl	8(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	32(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L35:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L36
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L37
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L39
.L37:
	cmpl	%r9d, %esi
	jge	.L40
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L36:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L35
.L40:
	leal	-1(%rsi), %r8d
	cmpl	%r8d, %r10d
	jl	.L134
	leal	1(%r9), %r10d
	cmpl	%r10d, 8(%rsp)
	jle	.L123
.L140:
	movslq	%r10d, %rbx
	jmp	.L33
.L134:
	movslq	%r8d, %rax
	movl	%r9d, 92(%rsp)
	movq	%r11, %r13
	movl	%r8d, %r11d
	movq	%rax, 24(%rsp)
.L41:
	leal	(%r11,%r10), %edx
	leaq	0(%r13,%rbx,8), %rcx
	movl	%r10d, %r8d
	movl	%r11d, %r14d
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	24(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L43:
	movsd	(%rcx), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L44
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L45
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r14d
	comisd	%xmm1, %xmm0
	ja	.L47
.L45:
	cmpl	%r14d, %r8d
	jge	.L48
	subl	$1, %r14d
	movsd	%xmm0, (%rcx)
	movslq	%r14d, %rax
	movsd	%xmm2, (%rdx)
.L44:
	addq	$8, %rcx
	addl	$1, %r8d
	jmp	.L43
.L48:
	subl	$1, %r8d
	cmpl	%r8d, %r10d
	jl	.L135
	leal	1(%r14), %r10d
	cmpl	%r10d, %r11d
	jle	.L124
.L139:
	movslq	%r10d, %rbx
	jmp	.L41
.L135:
	movl	%r14d, 100(%rsp)
	movslq	%r8d, %rax
	movl	%r11d, 96(%rsp)
	movq	%rax, %r11
.L49:
	leal	(%r8,%r10), %edx
	leaq	0(%r13,%rbx,8), %rcx
	movl	%r10d, %r14d
	movl	%r8d, %r12d
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r11, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movsd	(%rcx), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L52
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L53
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r12d
	comisd	%xmm1, %xmm0
	ja	.L55
.L53:
	cmpl	%r12d, %r14d
	jge	.L56
	subl	$1, %r12d
	movsd	%xmm0, (%rcx)
	movslq	%r12d, %rax
	movsd	%xmm2, (%rdx)
.L52:
	addq	$8, %rcx
	addl	$1, %r14d
	jmp	.L51
.L56:
	subl	$1, %r14d
	cmpl	%r14d, %r10d
	jl	.L136
	leal	1(%r12), %r10d
	cmpl	%r10d, %r8d
	jle	.L125
.L138:
	movslq	%r10d, %rbx
	jmp	.L49
.L136:
	movslq	%r14d, %r9
	movl	%r12d, %ecx
	movq	%r9, %r12
.L57:
	leal	(%r14,%r10), %edx
	leaq	0(%r13,%rbx,8), %rsi
	movl	%r10d, %r15d
	movl	%r14d, %ebp
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r12, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movsd	(%rsi), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L60
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L61
	.p2align 4,,10
	.p2align 3
.L63:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %ebp
	comisd	%xmm1, %xmm0
	ja	.L63
.L61:
	cmpl	%ebp, %r15d
	jge	.L64
	subl	$1, %ebp
	movsd	%xmm0, (%rsi)
	movslq	%ebp, %rax
	movsd	%xmm2, (%rdx)
.L60:
	addq	$8, %rsi
	addl	$1, %r15d
	jmp	.L59
.L64:
	subl	$1, %r15d
	movslq	%r15d, %r9
	cmpl	%r15d, %r10d
	jl	.L65
.L74:
	leal	1(%rbp), %r10d
	cmpl	%r10d, %r14d
	jle	.L126
	movslq	%r10d, %rbx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L72:
	leal	-1(%rdi), %edx
	cmpl	%edx, %r10d
	jl	.L137
.L73:
	leal	1(%rbx), %r10d
	cmpl	%r10d, %r15d
	jle	.L74
	movslq	%r10d, %rbx
.L65:
	leal	(%r15,%r10), %edx
	leaq	0(%r13,%rbx,8), %rsi
	movl	%r10d, %edi
	movl	%r15d, %ebx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L67:
	movsd	(%rsi), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L68
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L69
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %ebx
	comisd	%xmm1, %xmm0
	ja	.L71
.L69:
	cmpl	%ebx, %edi
	jge	.L72
	subl	$1, %ebx
	movsd	%xmm0, (%rsi)
	movslq	%ebx, %rax
	movsd	%xmm2, (%rdx)
.L68:
	addq	$8, %rsi
	addl	$1, %edi
	jmp	.L67
.L126:
	movl	%ecx, %r12d
	leal	1(%r12), %r10d
	cmpl	%r10d, %r8d
	jg	.L138
.L125:
	movl	100(%rsp), %r14d
	movl	96(%rsp), %r11d
	leal	1(%r14), %r10d
	cmpl	%r10d, %r11d
	jg	.L139
.L124:
	movl	92(%rsp), %r9d
	movq	%r13, %r11
	leal	1(%r9), %r10d
	cmpl	%r10d, 8(%rsp)
	jg	.L140
.L123:
	movl	88(%rsp), %r9d
	leal	1(%r9), %r10d
	cmpl	%r10d, 20(%rsp)
	jg	.L141
.L122:
	movl	84(%rsp), %r9d
	jmp	.L34
.L137:
	movl	%r10d, %esi
	movq	%r13, %rdi
	movq	%r11, 120(%rsp)
	movq	%r9, 112(%rsp)
	movl	%ecx, 108(%rsp)
	movl	%r8d, 104(%rsp)
	call	quicksort
	movq	120(%rsp), %r11
	movq	112(%rsp), %r9
	movl	108(%rsp), %ecx
	movl	104(%rsp), %r8d
	jmp	.L73
	.cfi_endproc
.LFE51:
	.size	quicksort, .-quicksort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3976, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L143
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L144:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L144
	testl	%eax, %eax
	jle	.L143
	cmpl	$1, %eax
	je	.L151
	movl	%eax, %edx
	movapd	.LC3(%rip), %xmm3
	pxor	%xmm1, %xmm1
	shrl	%edx
	leal	-1(%rdx), %ecx
	leaq	16(%r12), %rdx
	salq	$4, %rcx
	addq	%rdx, %rcx
	jmp	.L146
	.p2align 4,,10
	.p2align 3
.L157:
	addq	$16, %rdx
.L146:
	movapd	%xmm3, %xmm0
	divpd	(%r12), %xmm0
	addsd	%xmm0, %xmm1
	unpckhpd	%xmm0, %xmm0
	movq	%rdx, %r12
	addsd	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L157
	movl	%eax, %edx
	movsd	.LC4(%rip), %xmm0
	andl	$-2, %edx
	testb	$1, %al
	je	.L148
.L145:
	movsd	.LC4(%rip), %xmm0
	movslq	%edx, %rax
	movapd	%xmm0, %xmm2
	divsd	16(%rsp,%rax,8), %xmm2
	addsd	%xmm2, %xmm1
.L148:
	divsd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	8056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L158
	addq	$8072, %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
.L143:
	.cfi_restore_state
	movsd	.LC4(%rip), %xmm0
	pxor	%xmm1, %xmm1
	jmp	.L148
.L151:
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	jmp	.L145
.L158:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	1072693248
	.long	0
	.long	1072693248
	.set	.LC4,.LC3
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edx, %rax
	movq	%rdi, %r11
	movl	%esi, %r10d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movl	%eax, 40(%rsp)
	movq	%rax, 72(%rsp)
.L9:
	movl	40(%rsp), %edi
	movslq	%r10d, %rbx
	movl	%r10d, %esi
	leaq	(%r11,%rbx,8), %rcx
	leal	(%r10,%rdi), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	72(%rsp), %rax
.L2:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdi
	movsd	(%rdi), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L3
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rax, %rdi
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %edx
	comisd	%xmm1, %xmm0
	ja	.L6
.L4:
	cmpl	%edx, %esi
	jge	.L7
	subl	$1, %edx
	movsd	%xmm0, (%rcx)
	movslq	%edx, %rax
	movsd	%xmm2, (%rdi)
.L3:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L2
.L7:
	leal	-1(%rsi), %eax
	movl	%edx, 44(%rsp)
	movl	%eax, 12(%rsp)
	cmpl	%r10d, %eax
	jg	.L130
.L18:
	movl	44(%rsp), %r10d
	addl	$1, %r10d
	cmpl	40(%rsp), %r10d
	jl	.L9
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L130:
	.cfi_restore_state
	cltq
	movq	%rax, 64(%rsp)
.L8:
	movl	12(%rsp), %edi
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%rdi,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	64(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdi
	movsd	(%rdi), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L12
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, %rdi
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %edx
	comisd	%xmm1, %xmm0
	ja	.L15
.L13:
	cmpl	%edx, %esi
	jge	.L16
	subl	$1, %edx
	movsd	%xmm0, (%rcx)
	movslq	%edx, %rax
	movsd	%xmm2, (%rdi)
.L12:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L11
.L16:
	leal	-1(%rsi), %eax
	movl	%edx, 80(%rsp)
	movl	%eax, 16(%rsp)
	cmpl	%eax, %r10d
	jl	.L131
.L26:
	movl	80(%rsp), %r10d
	addl	$1, %r10d
	cmpl	%r10d, 12(%rsp)
	jle	.L18
	movslq	%r10d, %rbx
	jmp	.L8
.L131:
	cltq
	movq	%rax, 56(%rsp)
.L17:
	movl	16(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	56(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L20
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L23
.L21:
	cmpl	%r9d, %esi
	jge	.L24
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L20:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L19
.L24:
	leal	-1(%rsi), %eax
	movl	%eax, 20(%rsp)
	cmpl	%eax, %r10d
	jl	.L132
.L34:
	leal	1(%r9), %r10d
	cmpl	%r10d, 16(%rsp)
	jle	.L26
	movslq	%r10d, %rbx
	jmp	.L17
.L132:
	cltq
	movl	%r9d, 84(%rsp)
	movq	%rax, 48(%rsp)
.L25:
	movl	20(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	48(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L27:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L28
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L31
.L29:
	cmpl	%r9d, %esi
	jge	.L32
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L28:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L27
.L32:
	leal	-1(%rsi), %eax
	movl	%eax, 8(%rsp)
	cmpl	%eax, %r10d
	jl	.L133
	leal	1(%r9), %r10d
	cmpl	%r10d, 20(%rsp)
	jle	.L122
.L141:
	movslq	%r10d, %rbx
	jmp	.L25
.L133:
	cltq
	movl	%r9d, 88(%rsp)
	movq	%rax, 32(%rsp)
.L33:
	movl	8(%rsp), %r9d
	leaq	(%r11,%rbx,8), %rcx
	movl	%r10d, %esi
	leal	(%r9,%r10), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	(%r11,%rax,8), %xmm1
	movq	32(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L35:
	movsd	(%rcx), %xmm2
	leaq	(%r11,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L36
	comisd	%xmm1, %xmm0
	leaq	-8(%r11,%rax,8), %rax
	jbe	.L37
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r9d
	comisd	%xmm1, %xmm0
	ja	.L39
.L37:
	cmpl	%r9d, %esi
	jge	.L40
	subl	$1, %r9d
	movsd	%xmm0, (%rcx)
	movslq	%r9d, %rax
	movsd	%xmm2, (%rdx)
.L36:
	addq	$8, %rcx
	addl	$1, %esi
	jmp	.L35
.L40:
	leal	-1(%rsi), %r8d
	cmpl	%r8d, %r10d
	jl	.L134
	leal	1(%r9), %r10d
	cmpl	%r10d, 8(%rsp)
	jle	.L123
.L140:
	movslq	%r10d, %rbx
	jmp	.L33
.L134:
	movslq	%r8d, %rax
	movl	%r9d, 92(%rsp)
	movq	%r11, %r13
	movl	%r8d, %r11d
	movq	%rax, 24(%rsp)
.L41:
	leal	(%r11,%r10), %edx
	leaq	0(%r13,%rbx,8), %rcx
	movl	%r10d, %r8d
	movl	%r11d, %r14d
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	24(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L43:
	movsd	(%rcx), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L44
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L45
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r14d
	comisd	%xmm1, %xmm0
	ja	.L47
.L45:
	cmpl	%r14d, %r8d
	jge	.L48
	subl	$1, %r14d
	movsd	%xmm0, (%rcx)
	movslq	%r14d, %rax
	movsd	%xmm2, (%rdx)
.L44:
	addq	$8, %rcx
	addl	$1, %r8d
	jmp	.L43
.L48:
	subl	$1, %r8d
	cmpl	%r8d, %r10d
	jl	.L135
	leal	1(%r14), %r10d
	cmpl	%r10d, %r11d
	jle	.L124
.L139:
	movslq	%r10d, %rbx
	jmp	.L41
.L135:
	movl	%r14d, 100(%rsp)
	movslq	%r8d, %rax
	movl	%r11d, 96(%rsp)
	movq	%rax, %r11
.L49:
	leal	(%r8,%r10), %edx
	leaq	0(%r13,%rbx,8), %rcx
	movl	%r10d, %r14d
	movl	%r8d, %r12d
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r11, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movsd	(%rcx), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L52
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L53
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %r12d
	comisd	%xmm1, %xmm0
	ja	.L55
.L53:
	cmpl	%r12d, %r14d
	jge	.L56
	subl	$1, %r12d
	movsd	%xmm0, (%rcx)
	movslq	%r12d, %rax
	movsd	%xmm2, (%rdx)
.L52:
	addq	$8, %rcx
	addl	$1, %r14d
	jmp	.L51
.L56:
	subl	$1, %r14d
	cmpl	%r14d, %r10d
	jl	.L136
	leal	1(%r12), %r10d
	cmpl	%r10d, %r8d
	jle	.L125
.L138:
	movslq	%r10d, %rbx
	jmp	.L49
.L136:
	movslq	%r14d, %r9
	movl	%r12d, %ecx
	movq	%r9, %r12
.L57:
	leal	(%r14,%r10), %edx
	leaq	0(%r13,%rbx,8), %rsi
	movl	%r10d, %r15d
	movl	%r14d, %ebp
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r12, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movsd	(%rsi), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L60
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L61
	.p2align 4,,10
	.p2align 3
.L63:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %ebp
	comisd	%xmm1, %xmm0
	ja	.L63
.L61:
	cmpl	%ebp, %r15d
	jge	.L64
	subl	$1, %ebp
	movsd	%xmm0, (%rsi)
	movslq	%ebp, %rax
	movsd	%xmm2, (%rdx)
.L60:
	addq	$8, %rsi
	addl	$1, %r15d
	jmp	.L59
.L64:
	subl	$1, %r15d
	movslq	%r15d, %r9
	cmpl	%r15d, %r10d
	jl	.L65
.L74:
	leal	1(%rbp), %r10d
	cmpl	%r10d, %r14d
	jle	.L126
	movslq	%r10d, %rbx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L72:
	leal	-1(%rdi), %edx
	cmpl	%edx, %r10d
	jl	.L137
.L73:
	leal	1(%rbx), %r10d
	cmpl	%r10d, %r15d
	jle	.L74
	movslq	%r10d, %rbx
.L65:
	leal	(%r15,%r10), %edx
	leaq	0(%r13,%rbx,8), %rsi
	movl	%r10d, %edi
	movl	%r15d, %ebx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movsd	0(%r13,%rax,8), %xmm1
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L67:
	movsd	(%rsi), %xmm2
	leaq	0(%r13,%rax,8), %rdx
	movsd	(%rdx), %xmm0
	comisd	%xmm2, %xmm1
	ja	.L68
	comisd	%xmm1, %xmm0
	leaq	-8(%r13,%rax,8), %rax
	jbe	.L69
	.p2align 4,,10
	.p2align 3
.L71:
	movq	%rax, %rdx
	movsd	(%rax), %xmm0
	subq	$8, %rax
	subl	$1, %ebx
	comisd	%xmm1, %xmm0
	ja	.L71
.L69:
	cmpl	%ebx, %edi
	jge	.L72
	subl	$1, %ebx
	movsd	%xmm0, (%rsi)
	movslq	%ebx, %rax
	movsd	%xmm2, (%rdx)
.L68:
	addq	$8, %rsi
	addl	$1, %edi
	jmp	.L67
.L126:
	movl	%ecx, %r12d
	leal	1(%r12), %r10d
	cmpl	%r10d, %r8d
	jg	.L138
.L125:
	movl	100(%rsp), %r14d
	movl	96(%rsp), %r11d
	leal	1(%r14), %r10d
	cmpl	%r10d, %r11d
	jg	.L139
.L124:
	movl	92(%rsp), %r9d
	movq	%r13, %r11
	leal	1(%r9), %r10d
	cmpl	%r10d, 8(%rsp)
	jg	.L140
.L123:
	movl	88(%rsp), %r9d
	leal	1(%r9), %r10d
	cmpl	%r10d, 20(%rsp)
	jg	.L141
.L122:
	movl	84(%rsp), %r9d
	jmp	.L34
.L137:
	movl	%r10d, %esi
	movq	%r13, %rdi
	movq	%r11, 120(%rsp)
	movq	%r9, 112(%rsp)
	movl	%ecx, 108(%rsp)
	movl	%r8d, 104(%rsp)
	call	quicksort
	movq	120(%rsp), %r11
	movq	112(%rsp), %r9
	movl	108(%rsp), %ecx
	movl	104(%rsp), %r8d
	jmp	.L73
	.cfi_endproc
.LFE51:
	.size	quicksort, .-quicksort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3976, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L143
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L144:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L144
	testl	%eax, %eax
	jle	.L143
	cmpl	$1, %eax
	je	.L151
	movl	%eax, %edx
	movapd	.LC3(%rip), %xmm3
	pxor	%xmm1, %xmm1
	shrl	%edx
	leal	-1(%rdx), %ecx
	leaq	16(%r12), %rdx
	salq	$4, %rcx
	addq	%rdx, %rcx
	jmp	.L146
	.p2align 4,,10
	.p2align 3
.L157:
	addq	$16, %rdx
.L146:
	movapd	%xmm3, %xmm0
	divpd	(%r12), %xmm0
	addsd	%xmm0, %xmm1
	unpckhpd	%xmm0, %xmm0
	movq	%rdx, %r12
	addsd	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L157
	movl	%eax, %edx
	movsd	.LC4(%rip), %xmm0
	andl	$-2, %edx
	testb	$1, %al
	je	.L148
.L145:
	movsd	.LC4(%rip), %xmm0
	movslq	%edx, %rax
	movapd	%xmm0, %xmm2
	divsd	16(%rsp,%rax,8), %xmm2
	addsd	%xmm2, %xmm1
.L148:
	divsd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	8056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L158
	addq	$8072, %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
.L143:
	.cfi_restore_state
	movsd	.LC4(%rip), %xmm0
	pxor	%xmm1, %xmm1
	jmp	.L148
.L151:
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	jmp	.L145
.L158:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	1072693248
	.long	0
	.long	1072693248
	.set	.LC4,.LC3
	.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 <string.h>
#include <stdlib.h>

typedef long long ll;
typedef double keytype;

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int main(){
    int n;
    double a[1005];

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

    double sum = 0;
    for(int i = 0; i < n; ++i){
        sum += (1 / a[i]);
    }

    printf("%f\n", 1 / sum);

    return 0;
}

2
14 30
 1
1001
 3
283 200 200
 2
14 38
 1
1100
 3
99 200 200
 2
17 38
 1
1110
 3
77 200 200
 2
17 24

9.545455
 1001.000000
 73.890339
 10.230769
 1100.000000
 49.748744
 11.745455
 1110.000000
 43.502825
 9.951220

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 <string.h>
#include <stdlib.h>

typedef long long ll;
typedef double keytype;

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int main(){
    int n;
    double a[1005];

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

    double sum = 0;
    for(int i = 0; i < n; ++i){
        sum += (1 / a[i]);
    }

    printf("%f\n", 1 / sum);

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quicksort
	.type	quicksort, @function
quicksort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L2
.L3:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	ja	.L3
	jmp	.L4
.L5:
	subl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	comisd	-16(%rbp), %xmm0
	ja	.L5
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L12
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movsd	(%rdx), %xmm0
	movsd	%xmm0, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rax)
	addl	$1, -24(%rbp)
	subl	$1, -20(%rbp)
	jmp	.L2
.L12:
	nop
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -44(%rbp)
	jge	.L9
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L9:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -48(%rbp)
	jle	.L13
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lf"
.LC4:
	.string	"%f\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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8064(%rbp)
	jmp	.L15
.L16:
	leaq	-8048(%rbp), %rdx
	movl	-8064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8064(%rbp)
.L15:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8064(%rbp)
	jl	.L16
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L17
.L18:
	movl	-8060(%rbp), %eax
	cltq
	movsd	-8048(%rbp,%rax,8), %xmm1
	movsd	.LC3(%rip), %xmm0
	divsd	%xmm1, %xmm0
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8060(%rbp)
.L17:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L18
	movsd	.LC3(%rip), %xmm0
	divsd	-8056(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L2
.L3:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	ja	.L3
	jmp	.L4
.L5:
	subl	$1, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	comisd	-16(%rbp), %xmm0
	ja	.L5
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L12
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movsd	(%rdx), %xmm0
	movsd	%xmm0, (%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rax)
	addl	$1, -24(%rbp)
	subl	$1, -20(%rbp)
	jmp	.L2
.L12:
	nop
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -44(%rbp)
	jge	.L9
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L9:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -48(%rbp)
	jle	.L13
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lf"
.LC4:
	.string	"%f\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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8064(%rbp)
	jmp	.L15
.L16:
	leaq	-8048(%rbp), %rdx
	movl	-8064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8064(%rbp)
.L15:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8064(%rbp)
	jl	.L16
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movl	$0, -8060(%rbp)
	jmp	.L17
.L18:
	movl	-8060(%rbp), %eax
	cltq
	movsd	-8048(%rbp,%rax,8), %xmm1
	movsd	.LC3(%rip), %xmm0
	divsd	%xmm1, %xmm0
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8060(%rbp)
.L17:
	movl	-8068(%rbp), %eax
	cmpl	%eax, -8060(%rbp)
	jl	.L18
	movsd	.LC3(%rip), %xmm0
	divsd	-8056(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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:
