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>
#include <string.h>

const char *table[] = {
    "abcde", "fghij", "klmno",
    "pqrst", "uvwxy", "z.?! ",
};

int main(void)
{
    char msg[256];

    while (~scanf("%s", msg)){
        int i;
        char decode[256] = {0};
        int len = strlen(msg);

        if (len % 2){
            puts("NA");
            continue;
        }
        for (i = 0; i < len / 2; i++){
            int a = msg[i * 2] - '0';
            int b = msg[i * 2 + 1] - '0';

            if (a < 1 || a > 6 || b < 1 || b > 5){
                puts("NA");
                i = len + 1;
                break;
            }
            decode[i] = table[a - 1][b - 1];
        }
        if (i < len){
            puts(decode);
        }
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.section	.rodata
.LC0:
	.string	"abcde"
.LC1:
	.string	"fghij"
.LC2:
	.string	"klmno"
.LC3:
	.string	"pqrst"
.LC4:
	.string	"uvwxy"
.LC5:
	.string	"z.?! "
	.section	.data.rel.local,"aw"
	.align 32
	.type	table, @object
	.size	table, 48
table:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"NA"
.LC7:
	.string	"%s"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L10:
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	$0, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	$0, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-528(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -540(%rbp)
	movl	-540(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movl	$0, -544(%rbp)
	jmp	.L4
.L8:
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -536(%rbp)
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -532(%rbp)
	cmpl	$0, -536(%rbp)
	jle	.L5
	cmpl	$6, -536(%rbp)
	jg	.L5
	cmpl	$0, -532(%rbp)
	jle	.L5
	cmpl	$5, -532(%rbp)
	jle	.L6
.L5:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-540(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -544(%rbp)
	jmp	.L7
.L6:
	movl	-536(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	table(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-532(%rbp), %eax
	cltq
	subq	$1, %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-544(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
	addl	$1, -544(%rbp)
.L4:
	movl	-540(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -544(%rbp)
	jl	.L8
.L7:
	movl	-544(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jge	.L2
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"NA"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	table(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$536, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r14
	leaq	255(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L17
	pxor	%xmm0, %xmm0
	movq	%r14, %rdi
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm0, 336(%rsp)
	movaps	%xmm0, 352(%rsp)
	movaps	%xmm0, 368(%rsp)
	movaps	%xmm0, 384(%rsp)
	movaps	%xmm0, 400(%rsp)
	movaps	%xmm0, 416(%rsp)
	movaps	%xmm0, 432(%rsp)
	movaps	%xmm0, 448(%rsp)
	movaps	%xmm0, 464(%rsp)
	movaps	%xmm0, 480(%rsp)
	movaps	%xmm0, 496(%rsp)
	call	strlen@PLT
	movq	%rax, %r15
	testb	$1, %al
	jne	.L3
	sarl	%eax
	movl	$1, %edx
	leal	1(%rax), %edi
	jne	.L9
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	movsbl	%cl, %esi
	subl	$49, %esi
	cmpl	$4, %esi
	ja	.L7
	cltq
	movq	0(%rbp,%rax,8), %rax
	movzbl	-49(%rax,%rcx), %eax
	movb	%al, (%rbx,%rdx)
	movl	%edx, %eax
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	je	.L5
.L9:
	movsbl	-2(%r14,%rdx,2), %eax
	movsbq	-1(%r14,%rdx,2), %rcx
	subl	$49, %eax
	cmpl	$5, %eax
	jbe	.L18
.L7:
	movq	%r13, %rdi
	call	puts@PLT
	leal	1(%r15), %eax
.L5:
	cmpl	%r15d, %eax
	jge	.L2
	leaq	256(%rsp), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$536, %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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	table
	.section	.rodata.str1.1
.LC2:
	.string	"abcde"
.LC3:
	.string	"fghij"
.LC4:
	.string	"klmno"
.LC5:
	.string	"pqrst"
.LC6:
	.string	"uvwxy"
.LC7:
	.string	"z.?! "
	.section	.data.rel.local,"aw"
	.align 32
	.type	table, @object
	.size	table, 48
table:
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.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	"NA"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	table(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$536, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r14
	leaq	255(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L17
	pxor	%xmm0, %xmm0
	movq	%r14, %rdi
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm0, 336(%rsp)
	movaps	%xmm0, 352(%rsp)
	movaps	%xmm0, 368(%rsp)
	movaps	%xmm0, 384(%rsp)
	movaps	%xmm0, 400(%rsp)
	movaps	%xmm0, 416(%rsp)
	movaps	%xmm0, 432(%rsp)
	movaps	%xmm0, 448(%rsp)
	movaps	%xmm0, 464(%rsp)
	movaps	%xmm0, 480(%rsp)
	movaps	%xmm0, 496(%rsp)
	call	strlen@PLT
	movq	%rax, %r15
	testb	$1, %al
	jne	.L3
	sarl	%eax
	movl	$1, %edx
	leal	1(%rax), %edi
	jne	.L9
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	movsbl	%cl, %esi
	subl	$49, %esi
	cmpl	$4, %esi
	ja	.L7
	cltq
	movq	0(%rbp,%rax,8), %rax
	movzbl	-49(%rax,%rcx), %eax
	movb	%al, (%rbx,%rdx)
	movl	%edx, %eax
	addq	$1, %rdx
	cmpq	%rdx, %rdi
	je	.L5
.L9:
	movsbl	-2(%r14,%rdx,2), %eax
	movsbq	-1(%r14,%rdx,2), %rcx
	subl	$49, %eax
	cmpl	$5, %eax
	jbe	.L18
.L7:
	movq	%r13, %rdi
	call	puts@PLT
	leal	1(%r15), %eax
.L5:
	cmpl	%r15d, %eax
	jge	.L2
	leaq	256(%rsp), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$536, %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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	table
	.section	.rodata.str1.1
.LC2:
	.string	"abcde"
.LC3:
	.string	"fghij"
.LC4:
	.string	"klmno"
.LC5:
	.string	"pqrst"
.LC6:
	.string	"uvwxy"
.LC7:
	.string	"z.?! "
	.section	.data.rel.local,"aw"
	.align 32
	.type	table, @object
	.size	table, 48
table:
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.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>
#include <string.h>

const char *table[] = {
    "abcde", "fghij", "klmno",
    "pqrst", "uvwxy", "z.?! ",
};

int main(void)
{
    char msg[256];

    while (~scanf("%s", msg)){
        int i;
        char decode[256] = {0};
        int len = strlen(msg);

        if (len % 2){
            puts("NA");
            continue;
        }
        for (i = 0; i < len / 2; i++){
            int a = msg[i * 2] - '0';
            int b = msg[i * 2 + 1] - '0';

            if (a < 1 || a > 6 || b < 1 || b > 5){
                puts("NA");
                i = len + 1;
                break;
            }
            decode[i] = table[a - 1][b - 1];
        }
        if (i < len){
            puts(decode);
        }
    }

    return 0;
}
341143514535
158
143565553551655311343411652235654535651124615163
551544654451431564
4
3411
6363636363
153414
 341143514535
314
10141283183115209195186599000583233654691126402
551544654451431564
4
3411
6363636363
153414
 341143514535
158
143565553551655311343411652235654535651124615163
551544654451431564
4
2934
6363636363
153414
 341143514535
315
143565553551655311343411652235654535651124615163
551544654451431564
4
3411
6363636363
286878
 341143514535
314
10141283183115209195186599000583233654691126402
551544654451431564
4
5438
6363636363
153414
 341143514535
315
134434432068311350616294587682501914319399594776
551544654451431564
4
3411
6363636363
286878
 341143514535
314
10141283183115209195186599000583233654691126402
551544654451431564
4
2886
6363636363
187636
 341143514535
181
143565553551655311343411652235654535651124615163
551544654451431564
4
2566
944133637
153414
 341143514535
314
10141283183115209195186599000583233654691126402
282179687988515070
8
2886
6363636363
187636
 341143514535
181
143565553551655311343411652235654535651124615163
115800800717045334
4
3636
944133637
153414

naruto
NA
do you wanna go to aizu?
yes sure!
NA
na
?????
end
 naruto
NA
NA
yes sure!
NA
na
?????
end
 naruto
NA
do you wanna go to aizu?
yes sure!
NA
NA
?????
end
 naruto
NA
do you wanna go to aizu?
yes sure!
NA
na
?????
NA
 naruto
NA
NA
yes sure!
NA
NA
?????
end
 naruto
NA
NA
yes sure!
NA
na
?????
NA
 naruto
NA
NA
yes sure!
NA
NA
?????
NA
 naruto
NA
do you wanna go to aizu?
yes sure!
NA
NA
NA
end
 naruto
NA
NA
NA
NA
NA
?????
NA
 naruto
NA
do you wanna go to aizu?
NA
NA
NA
NA
end

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>
#include <string.h>

const char *table[] = {
    "abcde", "fghij", "klmno",
    "pqrst", "uvwxy", "z.?! ",
};

int main(void)
{
    char msg[256];

    while (~scanf("%s", msg)){
        int i;
        char decode[256] = {0};
        int len = strlen(msg);

        if (len % 2){
            puts("NA");
            continue;
        }
        for (i = 0; i < len / 2; i++){
            int a = msg[i * 2] - '0';
            int b = msg[i * 2 + 1] - '0';

            if (a < 1 || a > 6 || b < 1 || b > 5){
                puts("NA");
                i = len + 1;
                break;
            }
            decode[i] = table[a - 1][b - 1];
        }
        if (i < len){
            puts(decode);
        }
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.section	.rodata
.LC0:
	.string	"abcde"
.LC1:
	.string	"fghij"
.LC2:
	.string	"klmno"
.LC3:
	.string	"pqrst"
.LC4:
	.string	"uvwxy"
.LC5:
	.string	"z.?! "
	.section	.data.rel.local,"aw"
	.align 32
	.type	table, @object
	.size	table, 48
table:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"NA"
.LC7:
	.string	"%s"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L10:
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	$0, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	$0, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-528(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -540(%rbp)
	movl	-540(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movl	$0, -544(%rbp)
	jmp	.L4
.L8:
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -536(%rbp)
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -532(%rbp)
	cmpl	$0, -536(%rbp)
	jle	.L5
	cmpl	$6, -536(%rbp)
	jg	.L5
	cmpl	$0, -532(%rbp)
	jle	.L5
	cmpl	$5, -532(%rbp)
	jle	.L6
.L5:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-540(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -544(%rbp)
	jmp	.L7
.L6:
	movl	-536(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	table(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-532(%rbp), %eax
	cltq
	subq	$1, %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-544(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
	addl	$1, -544(%rbp)
.L4:
	movl	-540(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -544(%rbp)
	jl	.L8
.L7:
	movl	-544(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jge	.L2
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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.
train
	.file	"temp.c"
	.text
	.globl	table
	.section	.rodata
.LC0:
	.string	"abcde"
.LC1:
	.string	"fghij"
.LC2:
	.string	"klmno"
.LC3:
	.string	"pqrst"
.LC4:
	.string	"uvwxy"
.LC5:
	.string	"z.?! "
	.section	.data.rel.local,"aw"
	.align 32
	.type	table, @object
	.size	table, 48
table:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"NA"
.LC7:
	.string	"%s"
	.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	$544, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L10:
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	$0, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	$0, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-528(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -540(%rbp)
	movl	-540(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movl	$0, -544(%rbp)
	jmp	.L4
.L8:
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -536(%rbp)
	movl	-544(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movzbl	-528(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -532(%rbp)
	cmpl	$0, -536(%rbp)
	jle	.L5
	cmpl	$6, -536(%rbp)
	jg	.L5
	cmpl	$0, -532(%rbp)
	jle	.L5
	cmpl	$5, -532(%rbp)
	jle	.L6
.L5:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-540(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -544(%rbp)
	jmp	.L7
.L6:
	movl	-536(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	table(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-532(%rbp), %eax
	cltq
	subq	$1, %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-544(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
	addl	$1, -544(%rbp)
.L4:
	movl	-540(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -544(%rbp)
	jl	.L8
.L7:
	movl	-544(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jge	.L2
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-528(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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:
