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

```c
//パソコン甲子園2010 問題番号05 博士の愛した2進数
#include<stdio.h>

int main(void){

	int i1;
	double n, n1, s1, s2, s3;

	scanf("%lf",&n);
	while(n >= 0.0){

	s1 = 1.0;
	s2 = 0.0;
	s3 = 0.5;

	i1 = (int)n;
	n1 = n - (double)i1;

	while(i1 != 0){
		if(i1 % 2 !=0)	s2 += s1;
		s1 *= 10;
		i1 /= 2;
	}

	s1 = 0.1;

	while(n1 != 0.0 && s1 >= 0.0001){
		if(n1 - s3 >= 0.0){
			s2 += s1;
			n1 -= s3;
		}
		s1 /= 10;
		s3 /= 2;
	}

	if(i1 >= 256 || n1 != 0.0)
		printf("NA\n");
	else
		printf("%013.4f\n",s2);

	scanf("%lf",&n);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%lf"
.LC12:
	.string	"NA"
.LC13:
	.string	"%013.4f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	movq	%rbx, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm4
	jb	.L21
	movsd	.LC3(%rip), %xmm3
	leaq	.LC13(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	cvttsd2sil	%xmm4, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm1, %xmm4
	movapd	%xmm2, %xmm1
	testl	%eax, %eax
	je	.L3
	movsd	.LC1(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	testb	$1, %al
	je	.L4
	addsd	%xmm0, %xmm1
.L4:
	mulsd	%xmm3, %xmm0
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	jne	.L5
.L3:
	ucomisd	%xmm2, %xmm4
	jp	.L28
	je	.L6
.L28:
	movapd	%xmm4, %xmm0
	subsd	.LC4(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L40
	ucomisd	%xmm2, %xmm0
	addsd	.LC5(%rip), %xmm1
	jp	.L8
	je	.L6
.L8:
	movapd	%xmm0, %xmm4
	subsd	.LC6(%rip), %xmm4
	comisd	%xmm2, %xmm4
	jb	.L41
	ucomisd	%xmm2, %xmm4
	addsd	.LC7(%rip), %xmm1
	jp	.L12
	je	.L6
.L12:
	movapd	%xmm4, %xmm0
	subsd	.LC8(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L42
	ucomisd	%xmm2, %xmm0
	addsd	.LC9(%rip), %xmm1
	jp	.L15
	je	.L6
.L15:
	subsd	.LC10(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L18
	ucomisd	%xmm2, %xmm0
	addsd	.LC11(%rip), %xmm1
	jp	.L18
	je	.L6
.L18:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L22:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	movq	.LC3(%rip), %rax
	comisd	%xmm2, %xmm4
	movq	%rax, %xmm3
	jnb	.L2
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movq	%r12, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L40:
	movapd	%xmm4, %xmm0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	movapd	%xmm0, %xmm4
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movapd	%xmm4, %xmm0
	jmp	.L15
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1076101120
	.align 8
.LC4:
	.long	0
	.long	1071644672
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	1202590843
	.long	1065646817
	.align 8
.LC8:
	.long	0
	.long	1069547520
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1068498944
	.align 8
.LC11:
	.long	-350469331
	.long	1058682594
	.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
.LC2:
	.string	"%lf"
.LC12:
	.string	"NA"
.LC13:
	.string	"%013.4f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	movq	%rbx, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm4
	jb	.L21
	movsd	.LC3(%rip), %xmm3
	leaq	.LC13(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	cvttsd2sil	%xmm4, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm1, %xmm4
	movapd	%xmm2, %xmm1
	testl	%eax, %eax
	je	.L3
	movsd	.LC1(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	testb	$1, %al
	je	.L4
	addsd	%xmm0, %xmm1
.L4:
	mulsd	%xmm3, %xmm0
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	jne	.L5
.L3:
	ucomisd	%xmm2, %xmm4
	jp	.L28
	je	.L6
.L28:
	movapd	%xmm4, %xmm0
	subsd	.LC4(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L40
	ucomisd	%xmm2, %xmm0
	addsd	.LC5(%rip), %xmm1
	jp	.L8
	je	.L6
.L8:
	movapd	%xmm0, %xmm4
	subsd	.LC6(%rip), %xmm4
	comisd	%xmm2, %xmm4
	jb	.L41
	ucomisd	%xmm2, %xmm4
	addsd	.LC7(%rip), %xmm1
	jp	.L12
	je	.L6
.L12:
	movapd	%xmm4, %xmm0
	subsd	.LC8(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L42
	ucomisd	%xmm2, %xmm0
	addsd	.LC9(%rip), %xmm1
	jp	.L15
	je	.L6
.L15:
	subsd	.LC10(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L18
	ucomisd	%xmm2, %xmm0
	addsd	.LC11(%rip), %xmm1
	jp	.L18
	je	.L6
.L18:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L22:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	movq	.LC3(%rip), %rax
	comisd	%xmm2, %xmm4
	movq	%rax, %xmm3
	jnb	.L2
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movq	%r12, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L40:
	movapd	%xmm4, %xmm0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	movapd	%xmm0, %xmm4
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movapd	%xmm4, %xmm0
	jmp	.L15
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1076101120
	.align 8
.LC4:
	.long	0
	.long	1071644672
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	1202590843
	.long	1065646817
	.align 8
.LC8:
	.long	0
	.long	1069547520
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1068498944
	.align 8
.LC11:
	.long	-350469331
	.long	1058682594
	.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
.LC2:
	.string	"%lf"
.LC12:
	.string	"NA"
.LC13:
	.string	"%013.4f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	movq	%rbx, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm4
	jb	.L21
	movsd	.LC3(%rip), %xmm3
	leaq	.LC13(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	cvttsd2sil	%xmm4, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm1, %xmm4
	movapd	%xmm2, %xmm1
	testl	%eax, %eax
	je	.L3
	movsd	.LC1(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	testb	$1, %al
	je	.L4
	addsd	%xmm0, %xmm1
.L4:
	mulsd	%xmm3, %xmm0
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	jne	.L5
.L3:
	ucomisd	%xmm2, %xmm4
	jp	.L28
	je	.L6
.L28:
	movapd	%xmm4, %xmm0
	subsd	.LC4(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L40
	ucomisd	%xmm2, %xmm0
	addsd	.LC5(%rip), %xmm1
	jp	.L8
	je	.L6
.L8:
	movapd	%xmm0, %xmm4
	subsd	.LC6(%rip), %xmm4
	comisd	%xmm2, %xmm4
	jb	.L41
	ucomisd	%xmm2, %xmm4
	addsd	.LC7(%rip), %xmm1
	jp	.L12
	je	.L6
.L12:
	movapd	%xmm4, %xmm0
	subsd	.LC8(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L42
	ucomisd	%xmm2, %xmm0
	addsd	.LC9(%rip), %xmm1
	jp	.L15
	je	.L6
.L15:
	subsd	.LC10(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L18
	ucomisd	%xmm2, %xmm0
	addsd	.LC11(%rip), %xmm1
	jp	.L18
	je	.L6
.L18:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L22:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	movq	.LC3(%rip), %rax
	comisd	%xmm2, %xmm4
	movq	%rax, %xmm3
	jnb	.L2
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movq	%r12, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L40:
	movapd	%xmm4, %xmm0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	movapd	%xmm0, %xmm4
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movapd	%xmm4, %xmm0
	jmp	.L15
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1076101120
	.align 8
.LC4:
	.long	0
	.long	1071644672
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	1202590843
	.long	1065646817
	.align 8
.LC8:
	.long	0
	.long	1069547520
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1068498944
	.align 8
.LC11:
	.long	-350469331
	.long	1058682594
	.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
//パソコン甲子園2010 問題番号05 博士の愛した2進数
#include<stdio.h>

int main(void){

	int i1;
	double n, n1, s1, s2, s3;

	scanf("%lf",&n);
	while(n >= 0.0){

	s1 = 1.0;
	s2 = 0.0;
	s3 = 0.5;

	i1 = (int)n;
	n1 = n - (double)i1;

	while(i1 != 0){
		if(i1 % 2 !=0)	s2 += s1;
		s1 *= 10;
		i1 /= 2;
	}

	s1 = 0.1;

	while(n1 != 0.0 && s1 >= 0.0001){
		if(n1 - s3 >= 0.0){
			s2 += s1;
			n1 -= s3;
		}
		s1 /= 10;
		s3 /= 2;
	}

	if(i1 >= 256 || n1 != 0.0)
		printf("NA\n");
	else
		printf("%013.4f\n",s2);

	scanf("%lf",&n);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//パソコン甲子園2010 問題番号05 博士の愛した2進数
#include<stdio.h>

int main(void){

	int i1;
	double n, n1, s1, s2, s3;

	scanf("%lf",&n);
	while(n >= 0.0){

	s1 = 1.0;
	s2 = 0.0;
	s3 = 0.5;

	i1 = (int)n;
	n1 = n - (double)i1;

	while(i1 != 0){
		if(i1 % 2 !=0)	s2 += s1;
		s1 *= 10;
		i1 /= 2;
	}

	s1 = 0.1;

	while(n1 != 0.0 && s1 >= 0.0001){
		if(n1 - s3 >= 0.0){
			s2 += s1;
			n1 -= s3;
		}
		s1 /= 10;
		s3 /= 2;
	}

	if(i1 >= 256 || n1 != 0.0)
		printf("NA\n");
	else
		printf("%013.4f\n",s2);

	scanf("%lf",&n);
	}
	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:

23.72975180461117
158.1
-1.0
 23.5
158.1
-0.5246083014985048
 23.72975180461117
158.1
-0.5449258499657357
 24.206542817215936
158.1
-1.0
 24.615346202775605
158.1
-1.0
 23.72975180461117
158.6852941341954
-0.5449258499657357
 25.190547978615548
158.1
-1.0
 24.615346202775605
158.4968814800713
-1.0
 23.860711200353357
158.6852941341954
-0.5449258499657357
 25.190547978615548
158.1
-0.8023788931052966

NA
NA
 00010111.1000
NA
 NA
NA
 NA
NA
 NA
NA
 NA
NA
 NA
NA
 NA
NA
 NA
NA
 NA
NA

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

```c
//パソコン甲子園2010 問題番号05 博士の愛した2進数
#include<stdio.h>

int main(void){

	int i1;
	double n, n1, s1, s2, s3;

	scanf("%lf",&n);
	while(n >= 0.0){

	s1 = 1.0;
	s2 = 0.0;
	s3 = 0.5;

	i1 = (int)n;
	n1 = n - (double)i1;

	while(i1 != 0){
		if(i1 % 2 !=0)	s2 += s1;
		s1 *= 10;
		i1 /= 2;
	}

	s1 = 0.1;

	while(n1 != 0.0 && s1 >= 0.0001){
		if(n1 - s3 >= 0.0){
			s2 += s1;
			n1 -= s3;
		}
		s1 /= 10;
		s3 /= 2;
	}

	if(i1 >= 256 || n1 != 0.0)
		printf("NA\n");
	else
		printf("%013.4f\n",s2);

	scanf("%lf",&n);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%lf"
.LC12:
	.string	"NA"
.LC13:
	.string	"%013.4f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	movq	%rbx, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm4
	jb	.L21
	movsd	.LC3(%rip), %xmm3
	leaq	.LC13(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	cvttsd2sil	%xmm4, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm1, %xmm4
	movapd	%xmm2, %xmm1
	testl	%eax, %eax
	je	.L3
	movsd	.LC1(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	testb	$1, %al
	je	.L4
	addsd	%xmm0, %xmm1
.L4:
	mulsd	%xmm3, %xmm0
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	jne	.L5
.L3:
	ucomisd	%xmm2, %xmm4
	jp	.L28
	je	.L6
.L28:
	movapd	%xmm4, %xmm0
	subsd	.LC4(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L40
	ucomisd	%xmm2, %xmm0
	addsd	.LC5(%rip), %xmm1
	jp	.L8
	je	.L6
.L8:
	movapd	%xmm0, %xmm4
	subsd	.LC6(%rip), %xmm4
	comisd	%xmm2, %xmm4
	jb	.L41
	ucomisd	%xmm2, %xmm4
	addsd	.LC7(%rip), %xmm1
	jp	.L12
	je	.L6
.L12:
	movapd	%xmm4, %xmm0
	subsd	.LC8(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L42
	ucomisd	%xmm2, %xmm0
	addsd	.LC9(%rip), %xmm1
	jp	.L15
	je	.L6
.L15:
	subsd	.LC10(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L18
	ucomisd	%xmm2, %xmm0
	addsd	.LC11(%rip), %xmm1
	jp	.L18
	je	.L6
.L18:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L22:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	movq	.LC3(%rip), %rax
	comisd	%xmm2, %xmm4
	movq	%rax, %xmm3
	jnb	.L2
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movq	%r12, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L40:
	movapd	%xmm4, %xmm0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	movapd	%xmm0, %xmm4
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movapd	%xmm4, %xmm0
	jmp	.L15
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1076101120
	.align 8
.LC4:
	.long	0
	.long	1071644672
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	1202590843
	.long	1065646817
	.align 8
.LC8:
	.long	0
	.long	1069547520
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1068498944
	.align 8
.LC11:
	.long	-350469331
	.long	1058682594
	.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
.LC2:
	.string	"%lf"
.LC12:
	.string	"NA"
.LC13:
	.string	"%013.4f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	movq	%rbx, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm4
	jb	.L21
	movsd	.LC3(%rip), %xmm3
	leaq	.LC13(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	cvttsd2sil	%xmm4, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm1, %xmm4
	movapd	%xmm2, %xmm1
	testl	%eax, %eax
	je	.L3
	movsd	.LC1(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	testb	$1, %al
	je	.L4
	addsd	%xmm0, %xmm1
.L4:
	mulsd	%xmm3, %xmm0
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	jne	.L5
.L3:
	ucomisd	%xmm2, %xmm4
	jp	.L28
	je	.L6
.L28:
	movapd	%xmm4, %xmm0
	subsd	.LC4(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L40
	ucomisd	%xmm2, %xmm0
	addsd	.LC5(%rip), %xmm1
	jp	.L8
	je	.L6
.L8:
	movapd	%xmm0, %xmm4
	subsd	.LC6(%rip), %xmm4
	comisd	%xmm2, %xmm4
	jb	.L41
	ucomisd	%xmm2, %xmm4
	addsd	.LC7(%rip), %xmm1
	jp	.L12
	je	.L6
.L12:
	movapd	%xmm4, %xmm0
	subsd	.LC8(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L42
	ucomisd	%xmm2, %xmm0
	addsd	.LC9(%rip), %xmm1
	jp	.L15
	je	.L6
.L15:
	subsd	.LC10(%rip), %xmm0
	comisd	%xmm2, %xmm0
	jb	.L18
	ucomisd	%xmm2, %xmm0
	addsd	.LC11(%rip), %xmm1
	jp	.L18
	je	.L6
.L18:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L22:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm4
	pxor	%xmm2, %xmm2
	movq	.LC3(%rip), %rax
	comisd	%xmm2, %xmm4
	movq	%rax, %xmm3
	jnb	.L2
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movq	%r12, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L40:
	movapd	%xmm4, %xmm0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L41:
	movapd	%xmm0, %xmm4
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movapd	%xmm4, %xmm0
	jmp	.L15
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1076101120
	.align 8
.LC4:
	.long	0
	.long	1071644672
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1070596096
	.align 8
.LC7:
	.long	1202590843
	.long	1065646817
	.align 8
.LC8:
	.long	0
	.long	1069547520
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1068498944
	.align 8
.LC11:
	.long	-350469331
	.long	1058682594
	.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:
```