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

```c
#include<stdio.h>
int main(void)
{
	double n,n2;
	int nn,ama,i;
	int data[12];
	
	while(1)	{
		scanf("%lf",&n);
		if(n<0.0)	{
			break;
		}
		n=n*16.0;
		nn=n;
		if((double)nn!=n)	{
			printf("NA\n");
		}
		else {
			for(i=11;i>=0;i--)	{
				data[i]=nn%2;
				nn=nn/2;
			}
			for(i=0;i<8;i++)	{
				printf("%d",data[i]);
			}
			printf(".");
			for(i=8;i<12;i++)	{
				printf("%d",data[i]);
			}
			printf("\n");
		}
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
.LC4:
	.string	"%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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	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
	leaq	.LC4(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r15
	leaq	48(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 8(%rsp)
	cvtsi2sdl	%eax, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L4
	je	.L15
.L4:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ecx
	leaq	16(%rsp), %rbx
	shrl	$31, %ecx
	movq	%rbx, %r13
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	andl	$1, %edx
	subl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	movl	%edx, 60(%rsp)
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 56(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 52(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 48(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 44(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%edx, 40(%rsp)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	movl	%edx, %edi
	shrl	$31, %edx
	sarl	%eax
	shrl	$31, %edi
	addl	%eax, %edi
	addl	%edx, %eax
	movl	%edi, %esi
	shrl	$31, %edi
	andl	$1, %eax
	sarl	%esi
	subl	%edx, %eax
	leal	(%rsi,%rdi), %ecx
	movd	%eax, %xmm3
	andl	$1, %ecx
	subl	%edi, %ecx
	movl	%esi, %edi
	shrl	$31, %edi
	movd	%ecx, %xmm0
	addl	%esi, %edi
	punpckldq	%xmm3, %xmm0
	movl	%edi, %esi
	movl	%edi, %r8d
	movq	%xmm0, 32(%rsp)
	sarl	%esi
	shrl	$31, %r8d
	addl	%esi, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%r9d, %ecx
	movl	%r9d, %r10d
	shrl	$31, %r9d
	sarl	%ecx
	shrl	$31, %r10d
	addl	%ecx, %r10d
	addl	%r9d, %ecx
	movl	%r10d, %eax
	shrl	$31, %r10d
	andl	$1, %ecx
	sarl	%eax
	addl	%r10d, %eax
	andl	$1, %eax
	subl	%r10d, %eax
	subl	%r9d, %ecx
	shrl	$31, %r8d
	shrl	$31, %edi
	movd	%eax, %xmm0
	movd	%ecx, %xmm5
	addl	%r8d, %edx
	addl	%edi, %esi
	andl	$1, %edx
	punpckldq	%xmm5, %xmm0
	andl	$1, %esi
	subl	%r8d, %edx
	subl	%edi, %esi
	movd	%edx, %xmm1
	movd	%esi, %xmm4
	punpckldq	%xmm4, %xmm1
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	%r13, %r12
	jne	.L6
	movl	$46, %edi
	leaq	16(%rbx), %r13
	call	putchar@PLT
.L8:
	movl	32(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r13
	jne	.L8
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$88, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1076887552
	.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
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
.LC4:
	.string	"%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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	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
	leaq	.LC4(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r15
	leaq	48(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 8(%rsp)
	cvtsi2sdl	%eax, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L4
	je	.L15
.L4:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ecx
	leaq	16(%rsp), %rbx
	shrl	$31, %ecx
	movq	%rbx, %r13
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	andl	$1, %edx
	subl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	movl	%edx, 60(%rsp)
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 56(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 52(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 48(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 44(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%edx, 40(%rsp)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	movl	%edx, %edi
	shrl	$31, %edx
	sarl	%eax
	shrl	$31, %edi
	addl	%eax, %edi
	addl	%edx, %eax
	movl	%edi, %esi
	shrl	$31, %edi
	andl	$1, %eax
	sarl	%esi
	subl	%edx, %eax
	leal	(%rsi,%rdi), %ecx
	movd	%eax, %xmm3
	andl	$1, %ecx
	subl	%edi, %ecx
	movl	%esi, %edi
	shrl	$31, %edi
	movd	%ecx, %xmm0
	addl	%esi, %edi
	punpckldq	%xmm3, %xmm0
	movl	%edi, %esi
	movl	%edi, %r8d
	movq	%xmm0, 32(%rsp)
	sarl	%esi
	shrl	$31, %r8d
	addl	%esi, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%r9d, %ecx
	movl	%r9d, %r10d
	shrl	$31, %r9d
	sarl	%ecx
	shrl	$31, %r10d
	addl	%ecx, %r10d
	addl	%r9d, %ecx
	movl	%r10d, %eax
	shrl	$31, %r10d
	andl	$1, %ecx
	sarl	%eax
	addl	%r10d, %eax
	andl	$1, %eax
	subl	%r10d, %eax
	subl	%r9d, %ecx
	shrl	$31, %r8d
	shrl	$31, %edi
	movd	%eax, %xmm0
	movd	%ecx, %xmm5
	addl	%r8d, %edx
	addl	%edi, %esi
	andl	$1, %edx
	punpckldq	%xmm5, %xmm0
	andl	$1, %esi
	subl	%r8d, %edx
	subl	%edi, %esi
	movd	%edx, %xmm1
	movd	%esi, %xmm4
	punpckldq	%xmm4, %xmm1
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	%r13, %r12
	jne	.L6
	movl	$46, %edi
	leaq	16(%rbx), %r13
	call	putchar@PLT
.L8:
	movl	32(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r13
	jne	.L8
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$88, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1076887552
	.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
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
.LC4:
	.string	"%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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	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
	leaq	.LC4(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r15
	leaq	48(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 8(%rsp)
	cvtsi2sdl	%eax, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L4
	je	.L15
.L4:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ecx
	leaq	16(%rsp), %rbx
	shrl	$31, %ecx
	movq	%rbx, %r13
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	andl	$1, %edx
	subl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	movl	%edx, 60(%rsp)
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 56(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 52(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 48(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 44(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%edx, 40(%rsp)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	movl	%edx, %edi
	shrl	$31, %edx
	sarl	%eax
	shrl	$31, %edi
	addl	%eax, %edi
	addl	%edx, %eax
	movl	%edi, %esi
	shrl	$31, %edi
	andl	$1, %eax
	sarl	%esi
	subl	%edx, %eax
	leal	(%rsi,%rdi), %ecx
	movd	%eax, %xmm3
	andl	$1, %ecx
	subl	%edi, %ecx
	movl	%esi, %edi
	shrl	$31, %edi
	movd	%ecx, %xmm0
	addl	%esi, %edi
	punpckldq	%xmm3, %xmm0
	movl	%edi, %esi
	movl	%edi, %r8d
	movq	%xmm0, 32(%rsp)
	sarl	%esi
	shrl	$31, %r8d
	addl	%esi, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%r9d, %ecx
	movl	%r9d, %r10d
	shrl	$31, %r9d
	sarl	%ecx
	shrl	$31, %r10d
	addl	%ecx, %r10d
	addl	%r9d, %ecx
	movl	%r10d, %eax
	shrl	$31, %r10d
	andl	$1, %ecx
	sarl	%eax
	addl	%r10d, %eax
	andl	$1, %eax
	subl	%r10d, %eax
	subl	%r9d, %ecx
	shrl	$31, %r8d
	shrl	$31, %edi
	movd	%eax, %xmm0
	movd	%ecx, %xmm5
	addl	%r8d, %edx
	addl	%edi, %esi
	andl	$1, %edx
	punpckldq	%xmm5, %xmm0
	andl	$1, %esi
	subl	%r8d, %edx
	subl	%edi, %esi
	movd	%edx, %xmm1
	movd	%esi, %xmm4
	punpckldq	%xmm4, %xmm1
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	%r13, %r12
	jne	.L6
	movl	$46, %edi
	leaq	16(%rbx), %r13
	call	putchar@PLT
.L8:
	movl	32(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r13
	jne	.L8
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$88, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1076887552
	.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
#include<stdio.h>
int main(void)
{
	double n,n2;
	int nn,ama,i;
	int data[12];
	
	while(1)	{
		scanf("%lf",&n);
		if(n<0.0)	{
			break;
		}
		n=n*16.0;
		nn=n;
		if((double)nn!=n)	{
			printf("NA\n");
		}
		else {
			for(i=11;i>=0;i--)	{
				data[i]=nn%2;
				nn=nn/2;
			}
			for(i=0;i<8;i++)	{
				printf("%d",data[i]);
			}
			printf(".");
			for(i=8;i<12;i++)	{
				printf("%d",data[i]);
			}
			printf("\n");
		}
	}
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(void)
{
	double n,n2;
	int nn,ama,i;
	int data[12];
	
	while(1)	{
		scanf("%lf",&n);
		if(n<0.0)	{
			break;
		}
		n=n*16.0;
		nn=n;
		if((double)nn!=n)	{
			printf("NA\n");
		}
		else {
			for(i=11;i>=0;i--)	{
				data[i]=nn%2;
				nn=nn/2;
			}
			for(i=0;i<8;i++)	{
				printf("%d",data[i]);
			}
			printf(".");
			for(i=8;i<12;i++)	{
				printf("%d",data[i]);
			}
			printf("\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
#include<stdio.h>
int main(void)
{
	double n,n2;
	int nn,ama,i;
	int data[12];
	
	while(1)	{
		scanf("%lf",&n);
		if(n<0.0)	{
			break;
		}
		n=n*16.0;
		nn=n;
		if((double)nn!=n)	{
			printf("NA\n");
		}
		else {
			for(i=11;i>=0;i--)	{
				data[i]=nn%2;
				nn=nn/2;
			}
			for(i=0;i<8;i++)	{
				printf("%d",data[i]);
			}
			printf(".");
			for(i=8;i<12;i++)	{
				printf("%d",data[i]);
			}
			printf("\n");
		}
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
.LC4:
	.string	"%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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	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
	leaq	.LC4(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r15
	leaq	48(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 8(%rsp)
	cvtsi2sdl	%eax, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L4
	je	.L15
.L4:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ecx
	leaq	16(%rsp), %rbx
	shrl	$31, %ecx
	movq	%rbx, %r13
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	andl	$1, %edx
	subl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	movl	%edx, 60(%rsp)
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 56(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 52(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 48(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 44(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%edx, 40(%rsp)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	movl	%edx, %edi
	shrl	$31, %edx
	sarl	%eax
	shrl	$31, %edi
	addl	%eax, %edi
	addl	%edx, %eax
	movl	%edi, %esi
	shrl	$31, %edi
	andl	$1, %eax
	sarl	%esi
	subl	%edx, %eax
	leal	(%rsi,%rdi), %ecx
	movd	%eax, %xmm3
	andl	$1, %ecx
	subl	%edi, %ecx
	movl	%esi, %edi
	shrl	$31, %edi
	movd	%ecx, %xmm0
	addl	%esi, %edi
	punpckldq	%xmm3, %xmm0
	movl	%edi, %esi
	movl	%edi, %r8d
	movq	%xmm0, 32(%rsp)
	sarl	%esi
	shrl	$31, %r8d
	addl	%esi, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%r9d, %ecx
	movl	%r9d, %r10d
	shrl	$31, %r9d
	sarl	%ecx
	shrl	$31, %r10d
	addl	%ecx, %r10d
	addl	%r9d, %ecx
	movl	%r10d, %eax
	shrl	$31, %r10d
	andl	$1, %ecx
	sarl	%eax
	addl	%r10d, %eax
	andl	$1, %eax
	subl	%r10d, %eax
	subl	%r9d, %ecx
	shrl	$31, %r8d
	shrl	$31, %edi
	movd	%eax, %xmm0
	movd	%ecx, %xmm5
	addl	%r8d, %edx
	addl	%edi, %esi
	andl	$1, %edx
	punpckldq	%xmm5, %xmm0
	andl	$1, %esi
	subl	%r8d, %edx
	subl	%edi, %esi
	movd	%edx, %xmm1
	movd	%esi, %xmm4
	punpckldq	%xmm4, %xmm1
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	%r13, %r12
	jne	.L6
	movl	$46, %edi
	leaq	16(%rbx), %r13
	call	putchar@PLT
.L8:
	movl	32(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r13
	jne	.L8
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$88, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1076887552
	.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
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
.LC4:
	.string	"%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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	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
	leaq	.LC4(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r15
	leaq	48(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 8(%rsp)
	cvtsi2sdl	%eax, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L4
	je	.L15
.L4:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ecx
	leaq	16(%rsp), %rbx
	shrl	$31, %ecx
	movq	%rbx, %r13
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	andl	$1, %edx
	subl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	movl	%edx, 60(%rsp)
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 56(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 52(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 48(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%edx, 44(%rsp)
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %eax
	sarl	%ecx
	leal	(%rcx,%rax), %edx
	andl	$1, %edx
	subl	%eax, %edx
	movl	%edx, 40(%rsp)
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	movl	%edx, %edi
	shrl	$31, %edx
	sarl	%eax
	shrl	$31, %edi
	addl	%eax, %edi
	addl	%edx, %eax
	movl	%edi, %esi
	shrl	$31, %edi
	andl	$1, %eax
	sarl	%esi
	subl	%edx, %eax
	leal	(%rsi,%rdi), %ecx
	movd	%eax, %xmm3
	andl	$1, %ecx
	subl	%edi, %ecx
	movl	%esi, %edi
	shrl	$31, %edi
	movd	%ecx, %xmm0
	addl	%esi, %edi
	punpckldq	%xmm3, %xmm0
	movl	%edi, %esi
	movl	%edi, %r8d
	movq	%xmm0, 32(%rsp)
	sarl	%esi
	shrl	$31, %r8d
	addl	%esi, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%r9d, %ecx
	movl	%r9d, %r10d
	shrl	$31, %r9d
	sarl	%ecx
	shrl	$31, %r10d
	addl	%ecx, %r10d
	addl	%r9d, %ecx
	movl	%r10d, %eax
	shrl	$31, %r10d
	andl	$1, %ecx
	sarl	%eax
	addl	%r10d, %eax
	andl	$1, %eax
	subl	%r10d, %eax
	subl	%r9d, %ecx
	shrl	$31, %r8d
	shrl	$31, %edi
	movd	%eax, %xmm0
	movd	%ecx, %xmm5
	addl	%r8d, %edx
	addl	%edi, %esi
	andl	$1, %edx
	punpckldq	%xmm5, %xmm0
	andl	$1, %esi
	subl	%r8d, %edx
	subl	%edi, %esi
	movd	%edx, %xmm1
	movd	%esi, %xmm4
	punpckldq	%xmm4, %xmm1
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	%r13, %r12
	jne	.L6
	movl	$46, %edi
	leaq	16(%rbx), %r13
	call	putchar@PLT
.L8:
	movl	32(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r13
	jne	.L8
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$88, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1076887552
	.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:
```