Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
int main(void)
{
    int n=1, i, j;
    
    while (n != 0)
    {
        double a[1000], goukei = 0, heikin = 0, siguma = 0, hensa = 0;

        scanf("%d", &n);

        if (n == 0)
        {
            return 0;
        }
        else
        {
            for (i = 1;i <= n;i++)
            {
                scanf("%lf", &a[i]);
                goukei = goukei + a[i];
            }

            heikin = goukei / n;

            for (j = 1;j <= n;j++)
            {
                siguma = siguma + pow((a[j] - heikin), 2);
            }

            hensa = sqrt(siguma / n);

            printf("%.8f\n", hensa);
        }
    }
    return 0;

}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%.8f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	movl	$1, 28(%rsp)
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L5
	jle	.L25
	leaq	40(%rsp), %r13
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movq	$0x000000000, 8(%rsp)
	movq	%r13, %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movsd	%xmm2, (%rsp)
	call	scanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r15d
	movsd	(%rsp), %xmm2
	addq	$8, %r14
	addsd	-8(%r14), %xmm2
	cmpl	%r15d, %eax
	jge	.L6
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	divsd	%xmm5, %xmm2
	testl	%eax, %eax
	jle	.L17
	movl	%eax, %esi
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %ecx
	movapd	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	shrl	%ecx
	unpcklpd	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	56(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movupd	0(%r13), %xmm1
	addq	$16, %r13
	subpd	%xmm4, %xmm1
	mulpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%r13, %rcx
	jne	.L9
	andl	$-2, %eax
	movl	%eax, %edx
	leal	1(%rax), %eax
	cmpl	%edx, %esi
	je	.L7
.L8:
	cltq
	movsd	32(%rsp,%rax,8), %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
.L7:
	divsd	%xmm5, %xmm0
	movsd	8(%rsp), %xmm6
	ucomisd	%xmm0, %xmm6
	ja	.L26
	sqrtsd	%xmm0, %xmm0
.L29:
	leaq	.LC3(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L15
.L5:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	pxor	%xmm5, %xmm5
	pxor	%xmm0, %xmm0
	movq	$0x000000000, 8(%rsp)
	cvtsi2sdl	%eax, %xmm5
	jmp	.L7
.L18:
	pxor	%xmm0, %xmm0
	jmp	.L8
.L26:
	call	sqrt@PLT
	jmp	.L29
.L17:
	pxor	%xmm0, %xmm0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%.8f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	movl	$1, 28(%rsp)
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L5
	jle	.L25
	leaq	40(%rsp), %r13
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movq	$0x000000000, 8(%rsp)
	movq	%r13, %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movsd	%xmm2, (%rsp)
	call	scanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r15d
	movsd	(%rsp), %xmm2
	addq	$8, %r14
	addsd	-8(%r14), %xmm2
	cmpl	%r15d, %eax
	jge	.L6
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	divsd	%xmm5, %xmm2
	testl	%eax, %eax
	jle	.L17
	movl	%eax, %esi
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %ecx
	movapd	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	shrl	%ecx
	unpcklpd	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	56(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movupd	0(%r13), %xmm1
	addq	$16, %r13
	subpd	%xmm4, %xmm1
	mulpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%r13, %rcx
	jne	.L9
	andl	$-2, %eax
	movl	%eax, %edx
	leal	1(%rax), %eax
	cmpl	%edx, %esi
	je	.L7
.L8:
	cltq
	movsd	32(%rsp,%rax,8), %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
.L7:
	divsd	%xmm5, %xmm0
	movsd	8(%rsp), %xmm6
	ucomisd	%xmm0, %xmm6
	ja	.L26
	sqrtsd	%xmm0, %xmm0
.L29:
	leaq	.LC3(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L15
.L5:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	pxor	%xmm5, %xmm5
	pxor	%xmm0, %xmm0
	movq	$0x000000000, 8(%rsp)
	cvtsi2sdl	%eax, %xmm5
	jmp	.L7
.L18:
	pxor	%xmm0, %xmm0
	jmp	.L8
.L26:
	call	sqrt@PLT
	jmp	.L29
.L17:
	pxor	%xmm0, %xmm0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%.8f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	movl	$1, 28(%rsp)
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L5
	jle	.L25
	leaq	40(%rsp), %r13
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movq	$0x000000000, 8(%rsp)
	movq	%r13, %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movsd	%xmm2, (%rsp)
	call	scanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r15d
	movsd	(%rsp), %xmm2
	addq	$8, %r14
	addsd	-8(%r14), %xmm2
	cmpl	%r15d, %eax
	jge	.L6
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	divsd	%xmm5, %xmm2
	testl	%eax, %eax
	jle	.L17
	movl	%eax, %esi
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %ecx
	movapd	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	shrl	%ecx
	unpcklpd	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	56(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movupd	0(%r13), %xmm1
	addq	$16, %r13
	subpd	%xmm4, %xmm1
	mulpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%r13, %rcx
	jne	.L9
	andl	$-2, %eax
	movl	%eax, %edx
	leal	1(%rax), %eax
	cmpl	%edx, %esi
	je	.L7
.L8:
	cltq
	movsd	32(%rsp,%rax,8), %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
.L7:
	divsd	%xmm5, %xmm0
	movsd	8(%rsp), %xmm6
	ucomisd	%xmm0, %xmm6
	ja	.L26
	sqrtsd	%xmm0, %xmm0
.L29:
	leaq	.LC3(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L15
.L5:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	pxor	%xmm5, %xmm5
	pxor	%xmm0, %xmm0
	movq	$0x000000000, 8(%rsp)
	cvtsi2sdl	%eax, %xmm5
	jmp	.L7
.L18:
	pxor	%xmm0, %xmm0
	jmp	.L8
.L26:
	call	sqrt@PLT
	jmp	.L29
.L17:
	pxor	%xmm0, %xmm0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.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:
```
```c
int main(void)
{
    int n=1, i, j;
    
    while (n != 0)
    {
        double a[1000], goukei = 0, heikin = 0, siguma = 0, hensa = 0;

        scanf("%d", &n);

        if (n == 0)
        {
            return 0;
        }
        else
        {
            for (i = 1;i <= n;i++)
            {
                scanf("%lf", &a[i]);
                goukei = goukei + a[i];
            }

            heikin = goukei / n;

            for (j = 1;j <= n;j++)
            {
                siguma = siguma + pow((a[j] - heikin), 2);
            }

            hensa = sqrt(siguma / n);

            printf("%.8f\n", hensa);
        }
    }
    return 0;

}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
int main(void)
{
    int n=1, i, j;
    
    while (n != 0)
    {
        double a[1000], goukei = 0, heikin = 0, siguma = 0, hensa = 0;

        scanf("%d", &n);

        if (n == 0)
        {
            return 0;
        }
        else
        {
            for (i = 1;i <= n;i++)
            {
                scanf("%lf", &a[i]);
                goukei = goukei + a[i];
            }

            heikin = goukei / n;

            for (j = 1;j <= n;j++)
            {
                siguma = siguma + pow((a[j] - heikin), 2);
            }

            hensa = sqrt(siguma / n);

            printf("%.8f\n", hensa);
        }
    }
    return 0;

}
```

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.
Optimized Assembly Code:

5
70 80 100 107 20
3
80 80 80
0
 5
70 80 100 107 20
0
80 80 80
0
 5
70 80 101 107 20
0
80 80 80
0
 5
70 80 101 123 20
0
80 80 80
0
 5
70 80 111 123 20
0
80 80 80
0
 5
70 80 100 90 20
3
74 80 80
0
 5
70 80 100 99 20
3
80 80 80
0
 5
70 80 100 107 1
0
80 80 80
0
 5
70 75 111 123 20
0
80 80 80
0
 5
70 80 100 107 0
0
54 80 80
0

30.73499634
0.00000000
 30.73499634
 30.89724907
 34.59132839
 36.07436763
 27.85677655
2.82842712
 29.21917179
0.00000000
 37.72850381
 36.15190175
 38.10301825

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
int main(void)
{
    int n=1, i, j;
    
    while (n != 0)
    {
        double a[1000], goukei = 0, heikin = 0, siguma = 0, hensa = 0;

        scanf("%d", &n);

        if (n == 0)
        {
            return 0;
        }
        else
        {
            for (i = 1;i <= n;i++)
            {
                scanf("%lf", &a[i]);
                goukei = goukei + a[i];
            }

            heikin = goukei / n;

            for (j = 1;j <= n;j++)
            {
                siguma = siguma + pow((a[j] - heikin), 2);
            }

            hensa = sqrt(siguma / n);

            printf("%.8f\n", hensa);
        }
    }
    return 0;

}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%.8f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	movl	$1, 28(%rsp)
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L5
	jle	.L25
	leaq	40(%rsp), %r13
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movq	$0x000000000, 8(%rsp)
	movq	%r13, %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movsd	%xmm2, (%rsp)
	call	scanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r15d
	movsd	(%rsp), %xmm2
	addq	$8, %r14
	addsd	-8(%r14), %xmm2
	cmpl	%r15d, %eax
	jge	.L6
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	divsd	%xmm5, %xmm2
	testl	%eax, %eax
	jle	.L17
	movl	%eax, %esi
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %ecx
	movapd	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	shrl	%ecx
	unpcklpd	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	56(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movupd	0(%r13), %xmm1
	addq	$16, %r13
	subpd	%xmm4, %xmm1
	mulpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%r13, %rcx
	jne	.L9
	andl	$-2, %eax
	movl	%eax, %edx
	leal	1(%rax), %eax
	cmpl	%edx, %esi
	je	.L7
.L8:
	cltq
	movsd	32(%rsp,%rax,8), %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
.L7:
	divsd	%xmm5, %xmm0
	movsd	8(%rsp), %xmm6
	ucomisd	%xmm0, %xmm6
	ja	.L26
	sqrtsd	%xmm0, %xmm0
.L29:
	leaq	.LC3(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L15
.L5:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	pxor	%xmm5, %xmm5
	pxor	%xmm0, %xmm0
	movq	$0x000000000, 8(%rsp)
	cvtsi2sdl	%eax, %xmm5
	jmp	.L7
.L18:
	pxor	%xmm0, %xmm0
	jmp	.L8
.L26:
	call	sqrt@PLT
	jmp	.L29
.L17:
	pxor	%xmm0, %xmm0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%.8f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8112
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	movl	$1, 28(%rsp)
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L5
	jle	.L25
	leaq	40(%rsp), %r13
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movq	$0x000000000, 8(%rsp)
	movq	%r13, %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movsd	%xmm2, (%rsp)
	call	scanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r15d
	movsd	(%rsp), %xmm2
	addq	$8, %r14
	addsd	-8(%r14), %xmm2
	cmpl	%r15d, %eax
	jge	.L6
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	divsd	%xmm5, %xmm2
	testl	%eax, %eax
	jle	.L17
	movl	%eax, %esi
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %ecx
	movapd	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	shrl	%ecx
	unpcklpd	%xmm4, %xmm4
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	56(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movupd	0(%r13), %xmm1
	addq	$16, %r13
	subpd	%xmm4, %xmm1
	mulpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%r13, %rcx
	jne	.L9
	andl	$-2, %eax
	movl	%eax, %edx
	leal	1(%rax), %eax
	cmpl	%edx, %esi
	je	.L7
.L8:
	cltq
	movsd	32(%rsp,%rax,8), %xmm1
	subsd	%xmm2, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
.L7:
	divsd	%xmm5, %xmm0
	movsd	8(%rsp), %xmm6
	ucomisd	%xmm0, %xmm6
	ja	.L26
	sqrtsd	%xmm0, %xmm0
.L29:
	leaq	.LC3(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L15
.L5:
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$8056, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	pxor	%xmm5, %xmm5
	pxor	%xmm0, %xmm0
	movq	$0x000000000, 8(%rsp)
	cvtsi2sdl	%eax, %xmm5
	jmp	.L7
.L18:
	pxor	%xmm0, %xmm0
	jmp	.L8
.L26:
	call	sqrt@PLT
	jmp	.L29
.L17:
	pxor	%xmm0, %xmm0
	jmp	.L7
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.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:
```