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

```c
char *t[]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};main(n,s,x,c){for(scanf("%d",&n),getchar();x=-1,n;puts(""),n--)while((c=getchar())!='\n'&&~c)if(c-=48)s=c-1,x++;else if(~x)putchar(t[s][x%strlen(t[s])]),x=-1;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.section	.rodata
.LC0:
	.string	".,!? "
.LC1:
	.string	"abc"
.LC2:
	.string	"def"
.LC3:
	.string	"ghi"
.LC4:
	.string	"jkl"
.LC5:
	.string	"mno"
.LC6:
	.string	"pqrs"
.LC7:
	.string	"tuv"
.LC8:
	.string	"wxyz"
	.section	.data.rel.local,"aw"
	.align 32
	.type	t, @object
	.size	t, 72
t:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.quad	.LC8
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	""
	.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
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, %eax
	call	getchar@PLT
	jmp	.L2
.L6:
	subl	$48, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L4
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
	jmp	.L3
.L4:
	cmpl	$-1, -28(%rbp)
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %r12
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, %rsi
	movq	%rbx, %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rdx, %rcx
	movq	%rcx, %rax
	addq	%r12, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$-1, -28(%rbp)
.L3:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, -32(%rbp)
	cmpl	$10, -32(%rbp)
	je	.L5
	cmpl	$-1, -32(%rbp)
	jne	.L6
.L5:
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
.L2:
	movl	$-1, -28(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.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	"%d"
.LC1:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	t(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	xorl	%eax, %eax
	call	getchar@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$-1, %ebx
.L8:
	xorl	%eax, %eax
	call	getchar@PLT
	cmpl	$10, %eax
	je	.L9
.L25:
	cmpl	$-1, %eax
	je	.L9
	cmpl	$48, %eax
	je	.L4
	leal	-49(%rax), %ebp
	xorl	%eax, %eax
	addl	$1, %ebx
	call	getchar@PLT
	cmpl	$10, %eax
	jne	.L25
.L9:
	movq	%r13, %rdi
	call	puts@PLT
	subl	$1, 12(%rsp)
	jne	.L23
.L3:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmpl	$-1, %ebx
	je	.L8
	movslq	%ebp, %rax
	movq	(%r12,%rax,8), %r14
	movq	%r14, %rdi
	call	strlen@PLT
	xorl	%edx, %edx
	movq	%rax, %r8
	movslq	%ebx, %rax
	divq	%r8
	movsbl	(%r14,%rdx), %edi
	call	putchar@PLT
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	t
	.section	.rodata.str1.1
.LC2:
	.string	".,!? "
.LC3:
	.string	"abc"
.LC4:
	.string	"def"
.LC5:
	.string	"ghi"
.LC6:
	.string	"jkl"
.LC7:
	.string	"mno"
.LC8:
	.string	"pqrs"
.LC9:
	.string	"tuv"
.LC10:
	.string	"wxyz"
	.section	.data.rel.local,"aw"
	.align 32
	.type	t, @object
	.size	t, 72
t:
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.quad	.LC8
	.quad	.LC9
	.quad	.LC10
	.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	"%d"
.LC1:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	t(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	xorl	%eax, %eax
	call	getchar@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$-1, %ebx
.L8:
	xorl	%eax, %eax
	call	getchar@PLT
	cmpl	$10, %eax
	je	.L9
.L25:
	cmpl	$-1, %eax
	je	.L9
	cmpl	$48, %eax
	je	.L4
	leal	-49(%rax), %ebp
	xorl	%eax, %eax
	addl	$1, %ebx
	call	getchar@PLT
	cmpl	$10, %eax
	jne	.L25
.L9:
	movq	%r13, %rdi
	call	puts@PLT
	subl	$1, 12(%rsp)
	jne	.L23
.L3:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmpl	$-1, %ebx
	je	.L8
	movslq	%ebp, %rax
	movq	(%r12,%rax,8), %r14
	movq	%r14, %rdi
	call	strlen@PLT
	xorl	%edx, %edx
	movq	%rax, %r8
	movslq	%ebx, %rax
	divq	%r8
	movsbl	(%r14,%rdx), %edi
	call	putchar@PLT
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	t
	.section	.rodata.str1.1
.LC2:
	.string	".,!? "
.LC3:
	.string	"abc"
.LC4:
	.string	"def"
.LC5:
	.string	"ghi"
.LC6:
	.string	"jkl"
.LC7:
	.string	"mno"
.LC8:
	.string	"pqrs"
.LC9:
	.string	"tuv"
.LC10:
	.string	"wxyz"
	.section	.data.rel.local,"aw"
	.align 32
	.type	t, @object
	.size	t, 72
t:
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.quad	.LC8
	.quad	.LC9
	.quad	.LC10
	.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:

char *t[]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};main(n,s,x,c){for(scanf("%d",&n),getchar();x=-1,n;puts(""),n--)while((c=getchar())!='\n'&&~c)if(c-=48)s=c-1,x++;else if(~x)putchar(t[s][x%strlen(t[s])]),x=-1;}
5
40
220
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
40
30
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
10
220
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
40
40
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
20
40
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
40
50
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
0
220
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
20
300
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
20
10
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000
 5
0
300
222220
44033055505550666011011111090666077705550301110
000555555550000330000444000080000200004440000

g
b
b
hello, world!
keitai
 g
d
b
hello, world!
keitai
 .
b
b
hello, world!
keitai
 g
g
b
hello, world!
keitai
 a
g
b
hello, world!
keitai
 g
j
b
hello, world!
keitai
 
b
b
hello, world!
keitai
 a
d
b
hello, world!
keitai
 a
.
b
hello, world!
keitai
 
d
b
hello, world!
keitai

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

```c
char *t[]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};main(n,s,x,c){for(scanf("%d",&n),getchar();x=-1,n;puts(""),n--)while((c=getchar())!='\n'&&~c)if(c-=48)s=c-1,x++;else if(~x)putchar(t[s][x%strlen(t[s])]),x=-1;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.section	.rodata
.LC0:
	.string	".,!? "
.LC1:
	.string	"abc"
.LC2:
	.string	"def"
.LC3:
	.string	"ghi"
.LC4:
	.string	"jkl"
.LC5:
	.string	"mno"
.LC6:
	.string	"pqrs"
.LC7:
	.string	"tuv"
.LC8:
	.string	"wxyz"
	.section	.data.rel.local,"aw"
	.align 32
	.type	t, @object
	.size	t, 72
t:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.quad	.LC8
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	""
	.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
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, %eax
	call	getchar@PLT
	jmp	.L2
.L6:
	subl	$48, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L4
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
	jmp	.L3
.L4:
	cmpl	$-1, -28(%rbp)
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %r12
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, %rsi
	movq	%rbx, %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rdx, %rcx
	movq	%rcx, %rax
	addq	%r12, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$-1, -28(%rbp)
.L3:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, -32(%rbp)
	cmpl	$10, -32(%rbp)
	je	.L5
	cmpl	$-1, -32(%rbp)
	jne	.L6
.L5:
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
.L2:
	movl	$-1, -28(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.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	t
	.section	.rodata
.LC0:
	.string	".,!? "
.LC1:
	.string	"abc"
.LC2:
	.string	"def"
.LC3:
	.string	"ghi"
.LC4:
	.string	"jkl"
.LC5:
	.string	"mno"
.LC6:
	.string	"pqrs"
.LC7:
	.string	"tuv"
.LC8:
	.string	"wxyz"
	.section	.data.rel.local,"aw"
	.align 32
	.type	t, @object
	.size	t, 72
t:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.quad	.LC8
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	""
	.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
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, %eax
	call	getchar@PLT
	jmp	.L2
.L6:
	subl	$48, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L4
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
	jmp	.L3
.L4:
	cmpl	$-1, -28(%rbp)
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %r12
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	t(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, %rsi
	movq	%rbx, %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rdx, %rcx
	movq	%rcx, %rax
	addq	%r12, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$-1, -28(%rbp)
.L3:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, -32(%rbp)
	cmpl	$10, -32(%rbp)
	je	.L5
	cmpl	$-1, -32(%rbp)
	jne	.L6
.L5:
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
.L2:
	movl	$-1, -28(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.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:
