Given the following C code and unoptimized 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;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC8:
	.string	"NA"
.LC9:
	.string	"%013.4f\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L16:
	movsd	.LC1(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -52(%rbp)
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-52(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -40(%rbp)
	jmp	.L3
.L5:
	movl	-52(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-32(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -52(%rbp)
.L3:
	cmpl	$0, -52(%rbp)
	jne	.L5
	movsd	.LC5(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	jmp	.L6
.L11:
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L7
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L7:
	movsd	-32(%rbp), %xmm0
	movsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	.LC6(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
.L6:
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L20
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L9
.L20:
	movsd	-32(%rbp), %xmm0
	comisd	.LC7(%rip), %xmm0
	jnb	.L11
.L9:
	cmpl	$255, -52(%rbp)
	jg	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L13
.L12:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L13:
	movq	-24(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jnb	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.align 8
.LC4:
	.long	0
	.long	1076101120
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1073741824
	.align 8
.LC7:
	.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.
user
	.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
	.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:

//パソコン甲子園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;
}
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 unoptimized 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;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC8:
	.string	"NA"
.LC9:
	.string	"%013.4f\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L16:
	movsd	.LC1(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -52(%rbp)
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-52(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -40(%rbp)
	jmp	.L3
.L5:
	movl	-52(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-32(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -52(%rbp)
.L3:
	cmpl	$0, -52(%rbp)
	jne	.L5
	movsd	.LC5(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	jmp	.L6
.L11:
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L7
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L7:
	movsd	-32(%rbp), %xmm0
	movsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	.LC6(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
.L6:
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L20
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L9
.L20:
	movsd	-32(%rbp), %xmm0
	comisd	.LC7(%rip), %xmm0
	jnb	.L11
.L9:
	cmpl	$255, -52(%rbp)
	jg	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L13
.L12:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L13:
	movq	-24(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jnb	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.align 8
.LC4:
	.long	0
	.long	1076101120
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1073741824
	.align 8
.LC7:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC8:
	.string	"NA"
.LC9:
	.string	"%013.4f\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L16:
	movsd	.LC1(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	.LC3(%rip), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -52(%rbp)
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-52(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -40(%rbp)
	jmp	.L3
.L5:
	movl	-52(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-32(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -52(%rbp)
.L3:
	cmpl	$0, -52(%rbp)
	jne	.L5
	movsd	.LC5(%rip), %xmm0
	movsd	%xmm0, -32(%rbp)
	jmp	.L6
.L11:
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L7
	movsd	-24(%rbp), %xmm0
	addsd	-32(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-40(%rbp), %xmm0
	subsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L7:
	movsd	-32(%rbp), %xmm0
	movsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	.LC6(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
.L6:
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L20
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L9
.L20:
	movsd	-32(%rbp), %xmm0
	comisd	.LC7(%rip), %xmm0
	jnb	.L11
.L9:
	cmpl	$255, -52(%rbp)
	jg	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	jp	.L12
	pxor	%xmm0, %xmm0
	ucomisd	-40(%rbp), %xmm0
	je	.L13
.L12:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L13:
	movq	-24(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movsd	-48(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jnb	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.align 8
.LC4:
	.long	0
	.long	1076101120
	.align 8
.LC5:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC6:
	.long	0
	.long	1073741824
	.align 8
.LC7:
	.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:
