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(void)
{
        int v1 = 0,v2 = 0;
        int i = 0, j = 0;
        int line[10]={0,0,0,0,0,0,0,0,0,0};
        int sum = 0;
        double x = 0, y = 0;
        int ans=0;

        while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
                , &line[0], &line[1], &line[2], &line[3], &line[4],
                  &line[5], &line[6], &line[7], &line[8], &line[9], &v1, &v2) != EOF)
        {

                for(i = 0;i < 10; i++)
                {
                        sum += line[i];
                }
                y = (double)sum / ((double)v2 / (double)v1 + 1);
                x = (double)v2 / (double)v1 * y;
/*
                printf("y=%f\n",y);
                printf("x=%f\n",x);
*/
                sum = 0;
                for(i = 0; i < 10; i++)
                {
                        sum = sum +  line[i];
                        if(sum >= y)
                        {
                                printf("%d\n",i+1);
                                break;
                        }
                }
                sum = 0;
                x = 0;
                y = 0;
        }
        return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC2:
	.string	"%d\n"
	.align 8
.LC3:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
	.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
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -72(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L2
.L10:
	movl	$0, -80(%rbp)
	jmp	.L3
.L4:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L3:
	cmpl	$9, -80(%rbp)
	jle	.L4
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	movl	-84(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-88(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	movsd	.LC1(%rip), %xmm1
	addsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	-84(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-88(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-56(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -64(%rbp)
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L5
.L9:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	comisd	-56(%rbp), %xmm0
	jb	.L14
	movl	-80(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L14:
	addl	$1, -80(%rbp)
.L5:
	cmpl	$9, -80(%rbp)
	jle	.L9
.L8:
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
.L2:
	leaq	-48(%rbp), %rax
	leaq	16(%rax), %r8
	leaq	-48(%rbp), %rax
	leaq	12(%rax), %rdi
	leaq	-48(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-48(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-48(%rbp), %rax
	subq	$8, %rsp
	leaq	-84(%rbp), %rsi
	pushq	%rsi
	leaq	-88(%rbp), %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$36, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$32, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$28, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$24, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$20, %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$64, %rsp
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm0, %xmm0
	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
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	76(%rsp), %rax
	movaps	%xmm0, 80(%rsp)
	leaq	80(%rsp), %r14
	movq	%rax, 8(%rsp)
	leaq	72(%rsp), %rax
	leaq	96(%rsp), %r13
	movq	%rax, 56(%rsp)
	leaq	116(%rsp), %rax
	leaq	92(%rsp), %r12
	movq	%rax, 48(%rsp)
	leaq	112(%rsp), %rax
	leaq	88(%rsp), %rbp
	movq	%rax, 40(%rsp)
	leaq	108(%rsp), %rax
	leaq	84(%rsp), %rbx
	movq	%rax, 32(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	100(%rsp), %rax
	movl	$0, 72(%rsp)
	movl	$0, 76(%rsp)
	movq	$0, 112(%rsp)
	movq	%rax, 16(%rsp)
	movaps	%xmm0, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$8, %rsp
	.cfi_def_cfa_offset 200
	movq	%r13, %r9
	movq	%r12, %r8
	movq	%rbp, %rcx
	pushq	16(%rsp)
	.cfi_def_cfa_offset 208
	movq	%rbx, %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	pushq	72(%rsp)
	.cfi_def_cfa_offset 216
	leaq	.LC1(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 224
	pushq	72(%rsp)
	.cfi_def_cfa_offset 232
	pushq	72(%rsp)
	.cfi_def_cfa_offset 240
	pushq	72(%rsp)
	.cfi_def_cfa_offset 248
	pushq	72(%rsp)
	.cfi_def_cfa_offset 256
	call	__isoc99_scanf@PLT
	addq	$64, %rsp
	.cfi_def_cfa_offset 192
	cmpl	$-1, %eax
	je	.L6
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	movl	80(%rsp), %eax
	movl	84(%rsp), %edx
	cvtsi2sdl	72(%rsp), %xmm0
	movl	88(%rsp), %ecx
	movl	92(%rsp), %esi
	pxor	%xmm2, %xmm2
	cvtsi2sdl	76(%rsp), %xmm1
	addl	%eax, %edx
	movl	96(%rsp), %edi
	movl	100(%rsp), %r8d
	addl	%edx, %ecx
	movl	104(%rsp), %r9d
	movl	108(%rsp), %r10d
	addl	%ecx, %esi
	movl	112(%rsp), %r11d
	movl	116(%rsp), %r15d
	addl	%esi, %edi
	divsd	%xmm0, %xmm1
	addl	%edi, %r8d
	addl	%r8d, %r9d
	addl	%r9d, %r10d
	addl	%r10d, %r11d
	addl	%r11d, %r15d
	cvtsi2sdl	%r15d, %xmm2
	movapd	%xmm2, %xmm0
	addsd	.LC2(%rip), %xmm1
	divsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L22
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edx, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L9
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ecx, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L10
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L11
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L12
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r8d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L13
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L14
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r10d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L15
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r11d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L16
	comisd	%xmm0, %xmm2
	movl	$10, %edx
	jb	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L6:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L22:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L3
.L9:
	movl	$2, %edx
	jmp	.L3
.L10:
	movl	$3, %edx
	jmp	.L3
.L11:
	movl	$4, %edx
	jmp	.L3
.L12:
	movl	$5, %edx
	jmp	.L3
.L13:
	movl	$6, %edx
	jmp	.L3
.L14:
	movl	$7, %edx
	jmp	.L3
.L15:
	movl	$8, %edx
	jmp	.L3
.L16:
	movl	$9, %edx
	jmp	.L3
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm0, %xmm0
	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
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	76(%rsp), %rax
	movaps	%xmm0, 80(%rsp)
	leaq	80(%rsp), %r14
	movq	%rax, 8(%rsp)
	leaq	72(%rsp), %rax
	leaq	96(%rsp), %r13
	movq	%rax, 56(%rsp)
	leaq	116(%rsp), %rax
	leaq	92(%rsp), %r12
	movq	%rax, 48(%rsp)
	leaq	112(%rsp), %rax
	leaq	88(%rsp), %rbp
	movq	%rax, 40(%rsp)
	leaq	108(%rsp), %rax
	leaq	84(%rsp), %rbx
	movq	%rax, 32(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	100(%rsp), %rax
	movl	$0, 72(%rsp)
	movl	$0, 76(%rsp)
	movq	$0, 112(%rsp)
	movq	%rax, 16(%rsp)
	movaps	%xmm0, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$8, %rsp
	.cfi_def_cfa_offset 200
	movq	%r13, %r9
	movq	%r12, %r8
	movq	%rbp, %rcx
	pushq	16(%rsp)
	.cfi_def_cfa_offset 208
	movq	%rbx, %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	pushq	72(%rsp)
	.cfi_def_cfa_offset 216
	leaq	.LC1(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 224
	pushq	72(%rsp)
	.cfi_def_cfa_offset 232
	pushq	72(%rsp)
	.cfi_def_cfa_offset 240
	pushq	72(%rsp)
	.cfi_def_cfa_offset 248
	pushq	72(%rsp)
	.cfi_def_cfa_offset 256
	call	__isoc99_scanf@PLT
	addq	$64, %rsp
	.cfi_def_cfa_offset 192
	cmpl	$-1, %eax
	je	.L6
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	movl	80(%rsp), %eax
	movl	84(%rsp), %edx
	cvtsi2sdl	72(%rsp), %xmm0
	movl	88(%rsp), %ecx
	movl	92(%rsp), %esi
	pxor	%xmm2, %xmm2
	cvtsi2sdl	76(%rsp), %xmm1
	addl	%eax, %edx
	movl	96(%rsp), %edi
	movl	100(%rsp), %r8d
	addl	%edx, %ecx
	movl	104(%rsp), %r9d
	movl	108(%rsp), %r10d
	addl	%ecx, %esi
	movl	112(%rsp), %r11d
	movl	116(%rsp), %r15d
	addl	%esi, %edi
	divsd	%xmm0, %xmm1
	addl	%edi, %r8d
	addl	%r8d, %r9d
	addl	%r9d, %r10d
	addl	%r10d, %r11d
	addl	%r11d, %r15d
	cvtsi2sdl	%r15d, %xmm2
	movapd	%xmm2, %xmm0
	addsd	.LC2(%rip), %xmm1
	divsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L22
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edx, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L9
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ecx, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L10
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L11
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L12
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r8d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L13
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r9d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L14
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r10d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L15
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r11d, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L16
	comisd	%xmm0, %xmm2
	movl	$10, %edx
	jb	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L6:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L22:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L3
.L9:
	movl	$2, %edx
	jmp	.L3
.L10:
	movl	$3, %edx
	jmp	.L3
.L11:
	movl	$4, %edx
	jmp	.L3
.L12:
	movl	$5, %edx
	jmp	.L3
.L13:
	movl	$6, %edx
	jmp	.L3
.L14:
	movl	$7, %edx
	jmp	.L3
.L15:
	movl	$8, %edx
	jmp	.L3
.L16:
	movl	$9, %edx
	jmp	.L3
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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:

#include<stdio.h>

int main(void)
{
        int v1 = 0,v2 = 0;
        int i = 0, j = 0;
        int line[10]={0,0,0,0,0,0,0,0,0,0};
        int sum = 0;
        double x = 0, y = 0;
        int ans=0;

        while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
                , &line[0], &line[1], &line[2], &line[3], &line[4],
                  &line[5], &line[6], &line[7], &line[8], &line[9], &v1, &v2) != EOF)
        {

                for(i = 0;i < 10; i++)
                {
                        sum += line[i];
                }
                y = (double)sum / ((double)v2 / (double)v1 + 1);
                x = (double)v2 / (double)v1 * y;
/*
                printf("y=%f\n",y);
                printf("x=%f\n",x);
*/
                sum = 0;
                for(i = 0; i < 10; i++)
                {
                        sum = sum +  line[i];
                        if(sum >= y)
                        {
                                printf("%d\n",i+1);
                                break;
                        }
                }
                sum = 0;
                x = 0;
                y = 0;
        }
        return 0;
}
06,04,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,3,3,3,3,3,50,50
10,10,10,10,10,10,10,10,10,10,50,49
 1,1,1,1,1,1,1,1,1,0,40,60
1,1,1,1,1,3,3,3,3,3,50,50
10,10,10,10,10,10,10,10,10,10,50,49
 06,04,1,1,0,1,1,1,1,1,1,1
1,1,1,1,1,3,3,3,3,3,50,50
94,05,01,01,01,01,01,01,01,01,01,01
 1,1,1,1,1,1,1,1,1,0,40,60
05,05,3,3,3,3,3,1,1,1,1,1
10,10,10,10,10,10,10,10,10,10,50,49
 06,04,1,1,1,1,1,1,2,1,1,1
05,05,3,3,3,3,4,1,1,1,1,1
10,10,10,10,10,10,10,10,10,10,50,49
 1,1,1,1,1,1,1,1,2,1,40,60
1,1,1,1,1,4,3,3,3,3,50,50
10,10,10,10,10,10,10,10,10,10,50,49
 06,04,1,1,1,1,1,1,0,1,1,2
1,1,1,1,1,3,3,3,3,3,50,50
94,05,01,01,01,01,01,01,01,01,01,01
 06,04,1,2,1,1,1,1,1,1,1,2
1,1,1,1,1,4,3,3,3,3,505,0
10,10,10,10,10,10,10,10,10,10,50,49
 06,04,1,1,0,1,1,1,1,1,1,1
1,1,1,1,1,3,3,3,3,3,50,50
04,95,01,01,01,01,01,01,01,01,01,01
 1,0,1,1,2,1,1,1,1,1,40,60
05,05,3,3,3,3,3,1,1,1,1,1
10,10,10,10,10,10,10,10,10,10,50,49

2
7
6
 4
7
6
 2
7
1
 4
4
6
 2
4
6
 5
7
6
 1
7
1
 2
10
6
 2
7
2
 5
4
6

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(void)
{
        int v1 = 0,v2 = 0;
        int i = 0, j = 0;
        int line[10]={0,0,0,0,0,0,0,0,0,0};
        int sum = 0;
        double x = 0, y = 0;
        int ans=0;

        while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
                , &line[0], &line[1], &line[2], &line[3], &line[4],
                  &line[5], &line[6], &line[7], &line[8], &line[9], &v1, &v2) != EOF)
        {

                for(i = 0;i < 10; i++)
                {
                        sum += line[i];
                }
                y = (double)sum / ((double)v2 / (double)v1 + 1);
                x = (double)v2 / (double)v1 * y;
/*
                printf("y=%f\n",y);
                printf("x=%f\n",x);
*/
                sum = 0;
                for(i = 0; i < 10; i++)
                {
                        sum = sum +  line[i];
                        if(sum >= y)
                        {
                                printf("%d\n",i+1);
                                break;
                        }
                }
                sum = 0;
                x = 0;
                y = 0;
        }
        return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC2:
	.string	"%d\n"
	.align 8
.LC3:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
	.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
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -72(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L2
.L10:
	movl	$0, -80(%rbp)
	jmp	.L3
.L4:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L3:
	cmpl	$9, -80(%rbp)
	jle	.L4
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	movl	-84(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-88(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	movsd	.LC1(%rip), %xmm1
	addsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	-84(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-88(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-56(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -64(%rbp)
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L5
.L9:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	comisd	-56(%rbp), %xmm0
	jb	.L14
	movl	-80(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L14:
	addl	$1, -80(%rbp)
.L5:
	cmpl	$9, -80(%rbp)
	jle	.L9
.L8:
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
.L2:
	leaq	-48(%rbp), %rax
	leaq	16(%rax), %r8
	leaq	-48(%rbp), %rax
	leaq	12(%rax), %rdi
	leaq	-48(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-48(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-48(%rbp), %rax
	subq	$8, %rsp
	leaq	-84(%rbp), %rsi
	pushq	%rsi
	leaq	-88(%rbp), %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$36, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$32, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$28, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$24, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$20, %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$64, %rsp
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.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
	.section	.rodata
.LC2:
	.string	"%d\n"
	.align 8
.LC3:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
	.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
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -72(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L2
.L10:
	movl	$0, -80(%rbp)
	jmp	.L3
.L4:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L3:
	cmpl	$9, -80(%rbp)
	jle	.L4
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	movl	-84(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-88(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	movsd	.LC1(%rip), %xmm1
	addsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -56(%rbp)
	movl	-84(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-88(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-56(%rbp), %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -64(%rbp)
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L5
.L9:
	movl	-80(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, -76(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-76(%rbp), %xmm0
	comisd	-56(%rbp), %xmm0
	jb	.L14
	movl	-80(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L14:
	addl	$1, -80(%rbp)
.L5:
	cmpl	$9, -80(%rbp)
	jle	.L9
.L8:
	movl	$0, -76(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -64(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)
.L2:
	leaq	-48(%rbp), %rax
	leaq	16(%rax), %r8
	leaq	-48(%rbp), %rax
	leaq	12(%rax), %rdi
	leaq	-48(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-48(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-48(%rbp), %rax
	subq	$8, %rsp
	leaq	-84(%rbp), %rsi
	pushq	%rsi
	leaq	-88(%rbp), %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$36, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$32, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$28, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$24, %rsi
	pushq	%rsi
	leaq	-48(%rbp), %rsi
	addq	$20, %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$64, %rsp
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.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:
