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>

typedef int wint[2];

int compar(wint *a, wint *b)
{
  if ((double)((*a)[0])/(*a)[1] < (double)((*b)[0])/(*b)[1]) return 1;
  if ((double)((*a)[0])/(*a)[1] > (double)((*b)[0])/(*b)[1]) return -1;
  else return 0;
}

int main()
{
    int i, n, w;
    char buf[32];
    scanf("%d %d\n", &n, &w);

    int val[n][2];
    char *p;
    for (i=0; i<n; i++) {
      fgets(buf, 32, stdin);
      for (val[i][0]=0,p=buf; *p!=' ';  val[i][0] = val[i][0] * 10 + *(p++) - '0');
      for (val[i][1]=0,p++;   *p!='\n'; val[i][1] = val[i][1] * 10 + *(p++) - '0'); 
    }
    
    double total=0;
    qsort(val, n, sizeof(int)*2, (int(*)(const void*, const void*))compar);
    for (i=0; i<n; i++) {
       if (w>=val[i][1]) {
        w -= val[i][1];
        total += val[i][0];
      }	else {
	 total += (double)w*val[i][0]/val[i][1];
	 break;
      }
    }
    printf("%.12f\n", total);
    
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compar
	.type	compar, @function
compar:
.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), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L9
	movl	$1, %eax
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L10
	movl	$-1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compar, .-compar
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC2:
	.string	"%.12f\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -112(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L15
.L20:
	movq	stdin(%rip), %rdx
	leaq	-96(%rbp), %rax
	movl	$32, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,8)
	leaq	-96(%rbp), %rax
	movq	%rax, -128(%rbp)
	jmp	.L16
.L17:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
.L16:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jne	.L17
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, 4(%rax,%rdx,8)
	addq	$1, -128(%rbp)
	jmp	.L18
.L19:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
.L18:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
	addl	$1, -132(%rbp)
.L15:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L20
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -120(%rbp)
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movq	-104(%rbp), %rax
	leaq	compar(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -132(%rbp)
	jmp	.L21
.L25:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	movl	-136(%rbp), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -136(%rbp)
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L28
.L22:
	movl	-136(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L24
.L28:
	addl	$1, -132(%rbp)
.L21:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L25
.L24:
	movq	-120(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	$1, %eax
	cvtsi2sdl	4(%rdi), %xmm0
	cvtsi2sdl	(%rdi), %xmm1
	cvtsi2sdl	4(%rsi), %xmm2
	divsd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	(%rsi), %xmm0
	divsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	ja	.L1
	xorl	%eax, %eax
	comisd	%xmm0, %xmm1
	seta	%al
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%.12f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	%r13
	pushq	%r12
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rsi
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-88(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L36
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L37
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	xorl	%r12d, %r12d
	leaq	-80(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdx
	movl	$32, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movsbl	-80(%rbp), %eax
	movl	$0, (%rbx,%r12,8)
	cmpb	$32, %al
	je	.L20
	xorl	%ecx, %ecx
	movq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rdx
	leal	(%rcx,%rcx,4), %ecx
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%rdx), %eax
	cmpb	$32, %al
	jne	.L11
	movl	%ecx, (%rbx,%r12,8)
.L10:
	movsbl	1(%rdx), %eax
	leaq	1(%rdx), %rcx
	movl	$0, 4(%rbx,%r12,8)
	cmpb	$10, %al
	je	.L12
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$1, %rcx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %edx
	movsbl	(%rcx), %eax
	cmpb	$10, %al
	jne	.L13
	movl	%edx, 4(%rbx,%r12,8)
.L12:
	movl	-88(%rbp), %eax
	addq	$1, %r12
	cmpl	%r12d, %eax
	jg	.L14
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	compar(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-88(%rbp), %edx
	testl	%edx, %edx
	jle	.L21
	movl	-84(%rbp), %eax
	leaq	(%rbx,%rdx,8), %rsi
	xorl	%ecx, %ecx
	pxor	%xmm0, %xmm0
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$8, %rbx
	addsd	%xmm1, %xmm0
	subl	%edx, %eax
	movl	$1, %ecx
	cmpq	%rbx, %rsi
	je	.L38
.L17:
	movl	4(%rbx), %edx
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%rbx), %xmm1
	cmpl	%eax, %edx
	jle	.L39
	testb	%cl, %cl
	je	.L18
	movl	%eax, -84(%rbp)
.L18:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	mulsd	%xmm2, %xmm1
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%edx, %xmm2
	divsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	leaq	-24(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	movq	%r13, %rdx
	jmp	.L10
.L38:
	movl	%eax, -84(%rbp)
	jmp	.L15
.L37:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L21:
	pxor	%xmm0, %xmm0
	jmp	.L15
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	$1, %eax
	cvtsi2sdl	4(%rdi), %xmm0
	cvtsi2sdl	(%rdi), %xmm1
	cvtsi2sdl	4(%rsi), %xmm2
	divsd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	(%rsi), %xmm0
	divsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	ja	.L1
	xorl	%eax, %eax
	comisd	%xmm0, %xmm1
	seta	%al
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%.12f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	%r13
	pushq	%r12
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rsi
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-88(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,8), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L7
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L36
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L37
.L8:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jle	.L9
	xorl	%r12d, %r12d
	leaq	-80(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdx
	movl	$32, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movsbl	-80(%rbp), %eax
	movl	$0, (%rbx,%r12,8)
	cmpb	$32, %al
	je	.L20
	xorl	%ecx, %ecx
	movq	%r13, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rdx
	leal	(%rcx,%rcx,4), %ecx
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%rdx), %eax
	cmpb	$32, %al
	jne	.L11
	movl	%ecx, (%rbx,%r12,8)
.L10:
	movsbl	1(%rdx), %eax
	leaq	1(%rdx), %rcx
	movl	$0, 4(%rbx,%r12,8)
	cmpb	$10, %al
	je	.L12
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$1, %rcx
	leal	(%rdx,%rdx,4), %edx
	leal	-48(%rax,%rdx,2), %edx
	movsbl	(%rcx), %eax
	cmpb	$10, %al
	jne	.L13
	movl	%edx, 4(%rbx,%r12,8)
.L12:
	movl	-88(%rbp), %eax
	addq	$1, %r12
	cmpl	%r12d, %eax
	jg	.L14
	movslq	%eax, %rsi
.L9:
	movl	$8, %edx
	leaq	compar(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-88(%rbp), %edx
	testl	%edx, %edx
	jle	.L21
	movl	-84(%rbp), %eax
	leaq	(%rbx,%rdx,8), %rsi
	xorl	%ecx, %ecx
	pxor	%xmm0, %xmm0
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L39:
	addq	$8, %rbx
	addsd	%xmm1, %xmm0
	subl	%edx, %eax
	movl	$1, %ecx
	cmpq	%rbx, %rsi
	je	.L38
.L17:
	movl	4(%rbx), %edx
	pxor	%xmm1, %xmm1
	cvtsi2sdl	(%rbx), %xmm1
	cmpl	%eax, %edx
	jle	.L39
	testb	%cl, %cl
	je	.L18
	movl	%eax, -84(%rbp)
.L18:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	mulsd	%xmm2, %xmm1
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%edx, %xmm2
	divsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	leaq	-24(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	movq	%r13, %rdx
	jmp	.L10
.L38:
	movl	%eax, -84(%rbp)
	jmp	.L15
.L37:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L8
.L21:
	pxor	%xmm0, %xmm0
	jmp	.L15
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>

typedef int wint[2];

int compar(wint *a, wint *b)
{
  if ((double)((*a)[0])/(*a)[1] < (double)((*b)[0])/(*b)[1]) return 1;
  if ((double)((*a)[0])/(*a)[1] > (double)((*b)[0])/(*b)[1]) return -1;
  else return 0;
}

int main()
{
    int i, n, w;
    char buf[32];
    scanf("%d %d\n", &n, &w);

    int val[n][2];
    char *p;
    for (i=0; i<n; i++) {
      fgets(buf, 32, stdin);
      for (val[i][0]=0,p=buf; *p!=' ';  val[i][0] = val[i][0] * 10 + *(p++) - '0');
      for (val[i][1]=0,p++;   *p!='\n'; val[i][1] = val[i][1] * 10 + *(p++) - '0'); 
    }
    
    double total=0;
    qsort(val, n, sizeof(int)*2, (int(*)(const void*, const void*))compar);
    for (i=0; i<n; i++) {
       if (w>=val[i][1]) {
        w -= val[i][1];
        total += val[i][0];
      }	else {
	 total += (double)w*val[i][0]/val[i][1];
	 break;
      }
    }
    printf("%.12f\n", total);
    
    return 0;
}


3 50
60 10
110 20
120 30
 0 50
60 10
110 20
120 30
 3 14
60 10
100 20
120 30
 1 50
60 13
100 23
120 33
 3 50
59 10
110 20
120 30
 1 100
100001 100000
 3 8
60 10
100 20
120 30
 3 50
59 10
010 20
120 30
 1 38
118 1
010 20
26 20
 1 100
100001 101000

250.000000000000
 0.000000000000
 80.000000000000
 60.000000000000
 249.000000000000
 100.001000000000
 48.000000000000
 184.000000000000
 118.000000000000
 99.010891089109

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>

typedef int wint[2];

int compar(wint *a, wint *b)
{
  if ((double)((*a)[0])/(*a)[1] < (double)((*b)[0])/(*b)[1]) return 1;
  if ((double)((*a)[0])/(*a)[1] > (double)((*b)[0])/(*b)[1]) return -1;
  else return 0;
}

int main()
{
    int i, n, w;
    char buf[32];
    scanf("%d %d\n", &n, &w);

    int val[n][2];
    char *p;
    for (i=0; i<n; i++) {
      fgets(buf, 32, stdin);
      for (val[i][0]=0,p=buf; *p!=' ';  val[i][0] = val[i][0] * 10 + *(p++) - '0');
      for (val[i][1]=0,p++;   *p!='\n'; val[i][1] = val[i][1] * 10 + *(p++) - '0'); 
    }
    
    double total=0;
    qsort(val, n, sizeof(int)*2, (int(*)(const void*, const void*))compar);
    for (i=0; i<n; i++) {
       if (w>=val[i][1]) {
        w -= val[i][1];
        total += val[i][0];
      }	else {
	 total += (double)w*val[i][0]/val[i][1];
	 break;
      }
    }
    printf("%.12f\n", total);
    
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compar
	.type	compar, @function
compar:
.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), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L9
	movl	$1, %eax
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L10
	movl	$-1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compar, .-compar
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC2:
	.string	"%.12f\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -112(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L15
.L20:
	movq	stdin(%rip), %rdx
	leaq	-96(%rbp), %rax
	movl	$32, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,8)
	leaq	-96(%rbp), %rax
	movq	%rax, -128(%rbp)
	jmp	.L16
.L17:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
.L16:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jne	.L17
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, 4(%rax,%rdx,8)
	addq	$1, -128(%rbp)
	jmp	.L18
.L19:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
.L18:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
	addl	$1, -132(%rbp)
.L15:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L20
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -120(%rbp)
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movq	-104(%rbp), %rax
	leaq	compar(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -132(%rbp)
	jmp	.L21
.L25:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	movl	-136(%rbp), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -136(%rbp)
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L28
.L22:
	movl	-136(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L24
.L28:
	addl	$1, -132(%rbp)
.L21:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L25
.L24:
	movq	-120(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	compar
	.type	compar, @function
compar:
.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), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L9
	movl	$1, %eax
	jmp	.L4
.L9:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	divsd	%xmm2, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L10
	movl	$-1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compar, .-compar
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC2:
	.string	"%.12f\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %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	-136(%rbp), %rdx
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -112(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L15
.L20:
	movq	stdin(%rip), %rdx
	leaq	-96(%rbp), %rax
	movl	$32, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,8)
	leaq	-96(%rbp), %rax
	movq	%rax, -128(%rbp)
	jmp	.L16
.L17:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,8)
.L16:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jne	.L17
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, 4(%rax,%rdx,8)
	addq	$1, -128(%rbp)
	jmp	.L18
.L19:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	-128(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	-48(%rax), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, 4(%rax,%rdx,8)
.L18:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
	addl	$1, -132(%rbp)
.L15:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L20
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -120(%rbp)
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movq	-104(%rbp), %rax
	leaq	compar(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -132(%rbp)
	jmp	.L21
.L25:
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	movl	-136(%rbp), %ecx
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, -136(%rbp)
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L28
.L22:
	movl	-136(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,8), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movq	-104(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rdx
	movl	4(%rax,%rdx,8), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-120(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -120(%rbp)
	jmp	.L24
.L28:
	addl	$1, -132(%rbp)
.L21:
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L25
.L24:
	movq	-120(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
