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(){
  double n;
  char a[12];
  int m,i;
  while(1){
    scanf("%lf",&n);
    if(n<0)break;
    n*=16;
    m=n;
    if(m-n){
      printf("NA\n");
      continue;
    }
    for(i=12;i;i--){
      a[i-1]=m%2+'0';
      m/=2;
    }
    if(m){
      printf("NA\n");
      continue;
    }
    for(i=0;i<12;i++){
      if(i==8)printf(".");
      printf("%c",a[i]);
    }
    printf("\n");
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L14:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	ja	.L18
	movsd	-32(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-32(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -40(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L17
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L5
.L17:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	movl	$12, -36(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	48(%rax), %edx
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	%dl, -20(%rbp,%rax)
	movl	-40(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -40(%rbp)
	subl	$1, -36(%rbp)
.L8:
	cmpl	$0, -36(%rbp)
	jne	.L9
	cmpl	$0, -40(%rbp)
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L10:
	movl	$0, -36(%rbp)
	jmp	.L11
.L13:
	cmpl	$8, -36(%rbp)
	jne	.L12
	movl	$46, %edi
	call	putchar@PLT
.L12:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-20(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -36(%rbp)
.L11:
	cmpl	$11, -36(%rbp)
	jle	.L13
	movl	$10, %edi
	call	putchar@PLT
.L7:
	jmp	.L14
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lf"
.LC4:
	.string	"NA"
	.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
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsd	16(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 16(%rsp)
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm0, %xmm1
	ucomisd	%xmm2, %xmm1
	jp	.L4
	jne	.L4
	movq	.LC3(%rip), %xmm4
	movl	%eax, %r8d
	xorl	%edi, %edi
	shrl	$31, %r8d
	addl	%eax, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	shrl	$31, %r8d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%edx, %r14d
	movl	%r9d, %esi
	movl	%r9d, %r11d
	shrl	$31, %r9d
	sarl	%esi
	shrl	$31, %r11d
	addl	%esi, %r11d
	leal	(%rsi,%r9), %ebx
	movl	%eax, %esi
	movl	%r11d, %ecx
	shrl	$31, %r11d
	andl	$1, %ebx
	sarl	%ecx
	subl	%r9d, %ebx
	shrl	$31, %esi
	leal	(%rcx,%r11), %r10d
	addl	$48, %ebx
	addl	%esi, %eax
	andl	$1, %r10d
	andl	$1, %eax
	subl	%r11d, %r10d
	subl	%esi, %eax
	addl	$48, %r10d
	addl	$48, %eax
	movb	%r10b, %dil
	sall	$24, %eax
	movl	%edi, %edx
	movb	%bl, %dh
	movl	%edx, %edi
	leal	(%r14,%r8), %edx
	andl	$1, %edx
	movzwl	%di, %edi
	subl	%r8d, %edx
	movl	%ecx, %r8d
	addl	$48, %edx
	shrl	$31, %r8d
	movzbl	%dl, %edx
	sall	$16, %edx
	orl	%edx, %edi
	orl	%eax, %edi
	addl	%ecx, %r8d
	movl	%r8d, %ecx
	movl	%r8d, %r9d
	movl	%edi, 32(%rsp)
	sarl	%ecx
	shrl	$31, %r9d
	addl	%ecx, %r9d
	movl	%r9d, %eax
	movl	%r9d, %r10d
	sarl	%eax
	shrl	$31, %r10d
	addl	%eax, %r10d
	movl	%eax, (%rsp)
	movl	%r10d, %edi
	movl	%r10d, %r11d
	sarl	%edi
	shrl	$31, %r11d
	addl	%edi, %r11d
	movl	%r11d, %edx
	movl	%r11d, %esi
	shrl	$31, %edx
	sarl	%esi
	movl	%edx, %ebx
	addl	%esi, %ebx
	movl	%ebx, %edx
	movl	%ebx, %ebp
	sarl	%edx
	shrl	$31, %ebp
	addl	%edx, %ebp
	movl	%edx, 4(%rsp)
	movl	%ebp, %r12d
	movl	%ebp, %edx
	shrl	$31, %ebp
	sarl	%edx
	shrl	$31, %r12d
	addl	%edx, %r12d
	addl	%ebp, %edx
	movl	%r12d, %eax
	movl	%r12d, %r13d
	shrl	$31, %r12d
	sarl	%eax
	shrl	$31, %r13d
	addl	%eax, %r13d
	addl	%r12d, %eax
	movl	%r13d, %r14d
	shrl	$31, %r13d
	andl	$1, %eax
	sarl	%r14d
	subl	%r12d, %eax
	leal	(%r14,%r13), %r15d
	andl	$1, %r15d
	subl	%r13d, %r15d
	andl	$1, %edx
	shrl	$31, %ebx
	shrl	$31, %r10d
	subl	%ebp, %edx
	movl	4(%rsp), %ebp
	shrl	$31, %r8d
	addl	%r10d, %edi
	shrl	$31, %r9d
	addl	%r8d, %ecx
	movzbl	%r15b, %r15d
	addl	%ebx, %ebp
	andl	$1, %edi
	andl	$1, %ecx
	shrl	$31, %r11d
	andl	$1, %ebp
	subl	%r10d, %edi
	subl	%r8d, %ecx
	addl	%r11d, %esi
	subl	%ebx, %ebp
	movl	(%rsp), %ebx
	movzbl	%cl, %ecx
	andl	$1, %esi
	salq	$8, %rcx
	movzbl	%dil, %edi
	subl	%r11d, %esi
	movzbl	%bpl, %ebp
	leal	(%rbx,%r9), %r10d
	movzbl	%sil, %esi
	andl	$1, %r10d
	subl	%r9d, %r10d
	movzbl	%r10b, %r10d
	orq	%r10, %rcx
	salq	$8, %rcx
	orq	%rdi, %rcx
	salq	$8, %rcx
	orq	%rsi, %rcx
	movzbl	%dl, %esi
	salq	$8, %rcx
	orq	%rbp, %rcx
	salq	$8, %rcx
	movq	%rcx, %rdx
	movzbl	%al, %ecx
	orq	%rsi, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	orq	%rcx, %rax
	addl	$1, %r14d
	salq	$8, %rax
	orq	%r15, %rax
	movq	%rax, %xmm0
	paddb	%xmm4, %xmm0
	movq	%xmm0, 24(%rsp)
	cmpl	$2, %r14d
	ja	.L4
	leaq	24(%rsp), %rbp
	xorl	%ebx, %ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	movsbl	0(%rbp), %edi
	call	putchar@PLT
	cmpl	$12, %ebx
	je	.L10
.L9:
	addq	$1, %rbp
.L6:
	addl	$1, %ebx
	cmpl	$9, %ebx
	jne	.L8
	movl	$46, %edi
	call	putchar@PLT
	movsbl	0(%rbp), %edi
	call	putchar@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$56, %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
.L15:
	.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
	.align 8
.LC3:
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.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	"%lf"
.LC4:
	.string	"NA"
	.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
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsd	16(%rsp), %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm0, %xmm2
	ja	.L3
	mulsd	.LC2(%rip), %xmm0
	pxor	%xmm1, %xmm1
	cvttsd2sil	%xmm0, %eax
	movsd	%xmm0, 16(%rsp)
	cvtsi2sdl	%eax, %xmm1
	subsd	%xmm0, %xmm1
	ucomisd	%xmm2, %xmm1
	jp	.L4
	jne	.L4
	movq	.LC3(%rip), %xmm4
	movl	%eax, %r8d
	xorl	%edi, %edi
	shrl	$31, %r8d
	addl	%eax, %r8d
	movl	%r8d, %edx
	movl	%r8d, %r9d
	shrl	$31, %r8d
	sarl	%edx
	shrl	$31, %r9d
	addl	%edx, %r9d
	movl	%edx, %r14d
	movl	%r9d, %esi
	movl	%r9d, %r11d
	shrl	$31, %r9d
	sarl	%esi
	shrl	$31, %r11d
	addl	%esi, %r11d
	leal	(%rsi,%r9), %ebx
	movl	%eax, %esi
	movl	%r11d, %ecx
	shrl	$31, %r11d
	andl	$1, %ebx
	sarl	%ecx
	subl	%r9d, %ebx
	shrl	$31, %esi
	leal	(%rcx,%r11), %r10d
	addl	$48, %ebx
	addl	%esi, %eax
	andl	$1, %r10d
	andl	$1, %eax
	subl	%r11d, %r10d
	subl	%esi, %eax
	addl	$48, %r10d
	addl	$48, %eax
	movb	%r10b, %dil
	sall	$24, %eax
	movl	%edi, %edx
	movb	%bl, %dh
	movl	%edx, %edi
	leal	(%r14,%r8), %edx
	andl	$1, %edx
	movzwl	%di, %edi
	subl	%r8d, %edx
	movl	%ecx, %r8d
	addl	$48, %edx
	shrl	$31, %r8d
	movzbl	%dl, %edx
	sall	$16, %edx
	orl	%edx, %edi
	orl	%eax, %edi
	addl	%ecx, %r8d
	movl	%r8d, %ecx
	movl	%r8d, %r9d
	movl	%edi, 32(%rsp)
	sarl	%ecx
	shrl	$31, %r9d
	addl	%ecx, %r9d
	movl	%r9d, %eax
	movl	%r9d, %r10d
	sarl	%eax
	shrl	$31, %r10d
	addl	%eax, %r10d
	movl	%eax, (%rsp)
	movl	%r10d, %edi
	movl	%r10d, %r11d
	sarl	%edi
	shrl	$31, %r11d
	addl	%edi, %r11d
	movl	%r11d, %edx
	movl	%r11d, %esi
	shrl	$31, %edx
	sarl	%esi
	movl	%edx, %ebx
	addl	%esi, %ebx
	movl	%ebx, %edx
	movl	%ebx, %ebp
	sarl	%edx
	shrl	$31, %ebp
	addl	%edx, %ebp
	movl	%edx, 4(%rsp)
	movl	%ebp, %r12d
	movl	%ebp, %edx
	shrl	$31, %ebp
	sarl	%edx
	shrl	$31, %r12d
	addl	%edx, %r12d
	addl	%ebp, %edx
	movl	%r12d, %eax
	movl	%r12d, %r13d
	shrl	$31, %r12d
	sarl	%eax
	shrl	$31, %r13d
	addl	%eax, %r13d
	addl	%r12d, %eax
	movl	%r13d, %r14d
	shrl	$31, %r13d
	andl	$1, %eax
	sarl	%r14d
	subl	%r12d, %eax
	leal	(%r14,%r13), %r15d
	andl	$1, %r15d
	subl	%r13d, %r15d
	andl	$1, %edx
	shrl	$31, %ebx
	shrl	$31, %r10d
	subl	%ebp, %edx
	movl	4(%rsp), %ebp
	shrl	$31, %r8d
	addl	%r10d, %edi
	shrl	$31, %r9d
	addl	%r8d, %ecx
	movzbl	%r15b, %r15d
	addl	%ebx, %ebp
	andl	$1, %edi
	andl	$1, %ecx
	shrl	$31, %r11d
	andl	$1, %ebp
	subl	%r10d, %edi
	subl	%r8d, %ecx
	addl	%r11d, %esi
	subl	%ebx, %ebp
	movl	(%rsp), %ebx
	movzbl	%cl, %ecx
	andl	$1, %esi
	salq	$8, %rcx
	movzbl	%dil, %edi
	subl	%r11d, %esi
	movzbl	%bpl, %ebp
	leal	(%rbx,%r9), %r10d
	movzbl	%sil, %esi
	andl	$1, %r10d
	subl	%r9d, %r10d
	movzbl	%r10b, %r10d
	orq	%r10, %rcx
	salq	$8, %rcx
	orq	%rdi, %rcx
	salq	$8, %rcx
	orq	%rsi, %rcx
	movzbl	%dl, %esi
	salq	$8, %rcx
	orq	%rbp, %rcx
	salq	$8, %rcx
	movq	%rcx, %rdx
	movzbl	%al, %ecx
	orq	%rsi, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	orq	%rcx, %rax
	addl	$1, %r14d
	salq	$8, %rax
	orq	%r15, %rax
	movq	%rax, %xmm0
	paddb	%xmm4, %xmm0
	movq	%xmm0, 24(%rsp)
	cmpl	$2, %r14d
	ja	.L4
	leaq	24(%rsp), %rbp
	xorl	%ebx, %ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	movsbl	0(%rbp), %edi
	call	putchar@PLT
	cmpl	$12, %ebx
	je	.L10
.L9:
	addq	$1, %rbp
.L6:
	addl	$1, %ebx
	cmpl	$9, %ebx
	jne	.L8
	movl	$46, %edi
	call	putchar@PLT
	movsbl	0(%rbp), %edi
	call	putchar@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$56, %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
.L15:
	.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
	.align 8
.LC3:
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.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(){
  double n;
  char a[12];
  int m,i;
  while(1){
    scanf("%lf",&n);
    if(n<0)break;
    n*=16;
    m=n;
    if(m-n){
      printf("NA\n");
      continue;
    }
    for(i=12;i;i--){
      a[i-1]=m%2+'0';
      m/=2;
    }
    if(m){
      printf("NA\n");
      continue;
    }
    for(i=0;i<12;i++){
      if(i==8)printf(".");
      printf("%c",a[i]);
    }
    printf("\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
#include<stdio.h>
int main(){
  double n;
  char a[12];
  int m,i;
  while(1){
    scanf("%lf",&n);
    if(n<0)break;
    n*=16;
    m=n;
    if(m-n){
      printf("NA\n");
      continue;
    }
    for(i=12;i;i--){
      a[i-1]=m%2+'0';
      m/=2;
    }
    if(m){
      printf("NA\n");
      continue;
    }
    for(i=0;i<12;i++){
      if(i==8)printf(".");
      printf("%c",a[i]);
    }
    printf("\n");
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L14:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	ja	.L18
	movsd	-32(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-32(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -40(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L17
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L5
.L17:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	movl	$12, -36(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	48(%rax), %edx
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	%dl, -20(%rbp,%rax)
	movl	-40(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -40(%rbp)
	subl	$1, -36(%rbp)
.L8:
	cmpl	$0, -36(%rbp)
	jne	.L9
	cmpl	$0, -40(%rbp)
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L10:
	movl	$0, -36(%rbp)
	jmp	.L11
.L13:
	cmpl	$8, -36(%rbp)
	jne	.L12
	movl	$46, %edi
	call	putchar@PLT
.L12:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-20(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -36(%rbp)
.L11:
	cmpl	$11, -36(%rbp)
	jle	.L13
	movl	$10, %edi
	call	putchar@PLT
.L7:
	jmp	.L14
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC3:
	.string	"NA"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L14:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	ja	.L18
	movsd	-32(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-32(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -40(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L17
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L5
.L17:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	movl	$12, -36(%rbp)
	jmp	.L8
.L9:
	movl	-40(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	48(%rax), %edx
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	%dl, -20(%rbp,%rax)
	movl	-40(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -40(%rbp)
	subl	$1, -36(%rbp)
.L8:
	cmpl	$0, -36(%rbp)
	jne	.L9
	cmpl	$0, -40(%rbp)
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L10:
	movl	$0, -36(%rbp)
	jmp	.L11
.L13:
	cmpl	$8, -36(%rbp)
	jne	.L12
	movl	$46, %edi
	call	putchar@PLT
.L12:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-20(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -36(%rbp)
.L11:
	cmpl	$11, -36(%rbp)
	jle	.L13
	movl	$10, %edi
	call	putchar@PLT
.L7:
	jmp	.L14
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.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:
