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

```c
main(){
	int t[9] = {6,7,8,36,56,77,96,98,99};
	int a[9] = {14,9,4,34,42,59,83,73,71};
	int c,i;
	while(~scanf("%d",&c)){
		for(i=0;i<9;i++){
			if(c == t[i]){
				printf("%d\n",a[i]);
				break;
			}
		}
	}
	for(i=0;i<5000000;i++){
		t[i%9] = i;
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$6, -96(%rbp)
	movl	$7, -92(%rbp)
	movl	$8, -88(%rbp)
	movl	$36, -84(%rbp)
	movl	$56, -80(%rbp)
	movl	$77, -76(%rbp)
	movl	$96, -72(%rbp)
	movl	$98, -68(%rbp)
	movl	$99, -64(%rbp)
	movl	$14, -48(%rbp)
	movl	$9, -44(%rbp)
	movl	$4, -40(%rbp)
	movl	$34, -36(%rbp)
	movl	$42, -32(%rbp)
	movl	$59, -28(%rbp)
	movl	$83, -24(%rbp)
	movl	$73, -20(%rbp)
	movl	$71, -16(%rbp)
	jmp	.L2
.L6:
	movl	$0, -100(%rbp)
	jmp	.L3
.L5:
	movl	-100(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-104(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	addl	$1, -100(%rbp)
.L3:
	cmpl	$8, -100(%rbp)
	jle	.L5
.L2:
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %edx
	movslq	%edx, %rax
	imulq	$954437177, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$3, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	movl	-100(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -100(%rbp)
.L7:
	cmpl	$4999999, -100(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L3
	movl	4(%rsp), %eax
	cmpl	$6, %eax
	je	.L7
	cmpl	$7, %eax
	je	.L8
	cmpl	$8, %eax
	je	.L9
	cmpl	$36, %eax
	je	.L10
	cmpl	$56, %eax
	je	.L11
	cmpl	$77, %eax
	je	.L12
	cmpl	$96, %eax
	je	.L13
	cmpl	$98, %eax
	je	.L14
	cmpl	$99, %eax
	jne	.L5
	movl	$71, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	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
.L7:
	.cfi_restore_state
	movl	$14, %esi
	jmp	.L4
.L8:
	movl	$9, %esi
	jmp	.L4
.L9:
	movl	$4, %esi
	jmp	.L4
.L10:
	movl	$34, %esi
	jmp	.L4
.L11:
	movl	$42, %esi
	jmp	.L4
.L12:
	movl	$59, %esi
	jmp	.L4
.L13:
	movl	$83, %esi
	jmp	.L4
.L14:
	movl	$73, %esi
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L3
	movl	4(%rsp), %eax
	cmpl	$6, %eax
	je	.L7
	cmpl	$7, %eax
	je	.L8
	cmpl	$8, %eax
	je	.L9
	cmpl	$36, %eax
	je	.L10
	cmpl	$56, %eax
	je	.L11
	cmpl	$77, %eax
	je	.L12
	cmpl	$96, %eax
	je	.L13
	cmpl	$98, %eax
	je	.L14
	cmpl	$99, %eax
	jne	.L5
	movl	$71, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L5
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	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
.L7:
	.cfi_restore_state
	movl	$14, %esi
	jmp	.L4
.L8:
	movl	$9, %esi
	jmp	.L4
.L9:
	movl	$4, %esi
	jmp	.L4
.L10:
	movl	$34, %esi
	jmp	.L4
.L11:
	movl	$42, %esi
	jmp	.L4
.L12:
	movl	$59, %esi
	jmp	.L4
.L13:
	movl	$83, %esi
	jmp	.L4
.L14:
	movl	$73, %esi
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.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:

main(){
	int t[9] = {6,7,8,36,56,77,96,98,99};
	int a[9] = {14,9,4,34,42,59,83,73,71};
	int c,i;
	while(~scanf("%d",&c)){
		for(i=0;i<9;i++){
			if(c == t[i]){
				printf("%d\n",a[i]);
				break;
			}
		}
	}
	for(i=0;i<5000000;i++){
		t[i%9] = i;
	}
	return 0;
}
5
12
7
8
 5
12
12
8
 5
12
12
13
 5
24
12
13
 5
24
18
13
 5
24
34
13
 5
25
34
13
 5
25
23
13
 5
25
27
13
 5
24
27
13

9
4
 4

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

```c
main(){
	int t[9] = {6,7,8,36,56,77,96,98,99};
	int a[9] = {14,9,4,34,42,59,83,73,71};
	int c,i;
	while(~scanf("%d",&c)){
		for(i=0;i<9;i++){
			if(c == t[i]){
				printf("%d\n",a[i]);
				break;
			}
		}
	}
	for(i=0;i<5000000;i++){
		t[i%9] = i;
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$6, -96(%rbp)
	movl	$7, -92(%rbp)
	movl	$8, -88(%rbp)
	movl	$36, -84(%rbp)
	movl	$56, -80(%rbp)
	movl	$77, -76(%rbp)
	movl	$96, -72(%rbp)
	movl	$98, -68(%rbp)
	movl	$99, -64(%rbp)
	movl	$14, -48(%rbp)
	movl	$9, -44(%rbp)
	movl	$4, -40(%rbp)
	movl	$34, -36(%rbp)
	movl	$42, -32(%rbp)
	movl	$59, -28(%rbp)
	movl	$83, -24(%rbp)
	movl	$73, -20(%rbp)
	movl	$71, -16(%rbp)
	jmp	.L2
.L6:
	movl	$0, -100(%rbp)
	jmp	.L3
.L5:
	movl	-100(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-104(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	addl	$1, -100(%rbp)
.L3:
	cmpl	$8, -100(%rbp)
	jle	.L5
.L2:
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %edx
	movslq	%edx, %rax
	imulq	$954437177, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$3, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	movl	-100(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -100(%rbp)
.L7:
	cmpl	$4999999, -100(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$6, -96(%rbp)
	movl	$7, -92(%rbp)
	movl	$8, -88(%rbp)
	movl	$36, -84(%rbp)
	movl	$56, -80(%rbp)
	movl	$77, -76(%rbp)
	movl	$96, -72(%rbp)
	movl	$98, -68(%rbp)
	movl	$99, -64(%rbp)
	movl	$14, -48(%rbp)
	movl	$9, -44(%rbp)
	movl	$4, -40(%rbp)
	movl	$34, -36(%rbp)
	movl	$42, -32(%rbp)
	movl	$59, -28(%rbp)
	movl	$83, -24(%rbp)
	movl	$73, -20(%rbp)
	movl	$71, -16(%rbp)
	jmp	.L2
.L6:
	movl	$0, -100(%rbp)
	jmp	.L3
.L5:
	movl	-100(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-104(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L4
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	addl	$1, -100(%rbp)
.L3:
	cmpl	$8, -100(%rbp)
	jle	.L5
.L2:
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L6
	movl	$0, -100(%rbp)
	jmp	.L7
.L8:
	movl	-100(%rbp), %edx
	movslq	%edx, %rax
	imulq	$954437177, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$3, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	movl	-100(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -100(%rbp)
.L7:
	cmpl	$4999999, -100(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
