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

int i,j,n;
char abacus[10][8];

int main(){
	for(i=0;i<10;i++){
		for(j=0;j<8;j++){
			abacus[i][j]='*';
		}
	}
	for(i=0;i<10;i++){
		abacus[i][1-i/5]=' ';
		abacus[i][2]='=';
		abacus[i][3+i%5]=' ';
	}
	while(scanf("%d",&n)!=EOF){
		if(i!=10)printf("\n");
		for(i=0;i<8;i++){
			printf("%c%c%c%c%c\n",abacus[n/10000][i],abacus[(n/1000)%10][i],abacus[(n/100)%10][i],abacus[(n/10)%10][i],abacus[n%10][i]);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	abacus
	.align 32
	.type	abacus, @object
	.size	abacus, 80
abacus:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%c%c%c%c%c\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$7, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L5
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	%ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	2+abacus(%rip), %rax
	movb	$61, (%rdx,%rax)
	movl	i(%rip), %esi
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$3, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L7
	jmp	.L8
.L12:
	movl	i(%rip), %eax
	cmpl	$10, %eax
	je	.L9
	movl	$10, %edi
	call	putchar@PLT
.L9:
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %r8d
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %esi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %r9d
	sarl	$31, %r9d
	subl	%r9d, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movl	n(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1759218605, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$12, %ecx
	sarl	$31, %eax
	subl	%eax, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %r9
	movslq	%ecx, %rax
	salq	$3, %rax
	leaq	(%rax,%r9), %rcx
	leaq	abacus(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%esi, %ecx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %eax
	cmpl	$7, %eax
	jle	.L11
.L8:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%c%c%c%c%c\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	movdqa	.LC2(%rip), %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$10794, %esi
	movabsq	$3038287259199220266, %rax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	$8253, %edi
	movl	$15648, %r8d
	movl	$15648, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	$15648, %r10d
	movl	$15648, %r11d
	leaq	n(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	$8253, %ebp
	leaq	abacus(%rip), %r13
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	$8224, %ebx
	movaps	%xmm0, 48+abacus(%rip)
	movaps	%xmm0, abacus(%rip)
	movaps	%xmm0, 16+abacus(%rip)
	movaps	%xmm0, 32+abacus(%rip)
	movq	%rax, 64+abacus(%rip)
	movw	%bx, 39+abacus(%rip)
	leaq	.LC0(%rip), %rbx
	movw	%bp, 42+abacus(%rip)
	leaq	.LC1(%rip), %rbp
	movl	$707406378, 72+abacus(%rip)
	movw	%si, 76+abacus(%rip)
	movb	$42, 78+abacus(%rip)
	movl	$8, j(%rip)
	movl	$10, i(%rip)
	movb	$32, 1+abacus(%rip)
	movw	%di, 2+abacus(%rip)
	movw	%r8w, 9+abacus(%rip)
	movb	$32, 12+abacus(%rip)
	movw	%r9w, 17+abacus(%rip)
	movb	$32, 21+abacus(%rip)
	movw	%r10w, 25+abacus(%rip)
	movb	$32, 30+abacus(%rip)
	movw	%r11w, 33+abacus(%rip)
	movb	$32, 48+abacus(%rip)
	movb	$61, 50+abacus(%rip)
	movb	$32, 52+abacus(%rip)
	movb	$32, 56+abacus(%rip)
	movb	$61, 58+abacus(%rip)
	movb	$32, 61+abacus(%rip)
	movb	$32, 64+abacus(%rip)
	movb	$61, 66+abacus(%rip)
	movb	$32, 70+abacus(%rip)
	movb	$32, 72+abacus(%rip)
	movb	$61, 74+abacus(%rip)
	movb	$32, 79+abacus(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L9
	cmpl	$10, i(%rip)
	je	.L3
	movl	$10, %edi
	call	putchar@PLT
.L3:
	movl	$0, i(%rip)
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	n(%rip), %rax
	movslq	%edx, %rdx
	subq	$8, %rsp
	.cfi_def_cfa_offset 56
	imulq	$1717986919, %rax, %rcx
	movl	%eax, %r9d
	movq	%rax, %rsi
	sarl	$31, %r9d
	sarq	$34, %rcx
	subl	%r9d, %ecx
	movslq	%ecx, %rdi
	movl	%ecx, %r8d
	imulq	$1717986919, %rdi, %rdi
	sarl	$31, %r8d
	sarq	$34, %rdi
	subl	%r8d, %edi
	leal	(%rdi,%rdi,4), %r8d
	movl	%ecx, %edi
	addl	%r8d, %r8d
	subl	%r8d, %edi
	movslq	%edi, %rdi
	leaq	0(%r13,%rdi,8), %r8
	imulq	$1374389535, %rax, %rdi
	sarq	$37, %rdi
	subl	%r9d, %edi
	movslq	%edi, %r10
	movl	%edi, %r11d
	imulq	$1717986919, %r10, %r10
	sarl	$31, %r11d
	sarq	$34, %r10
	subl	%r11d, %r10d
	leal	(%r10,%r10,4), %r10d
	addl	%r10d, %r10d
	subl	%r10d, %edi
	imulq	$274877907, %rax, %r10
	imulq	$1759218605, %rax, %rax
	movslq	%edi, %rdi
	leaq	0(%r13,%rdi,8), %rdi
	sarq	$38, %r10
	subl	%r9d, %r10d
	sarq	$44, %rax
	movslq	%r10d, %r11
	movl	%r10d, %r14d
	subl	%r9d, %eax
	imulq	$1717986919, %r11, %r11
	sarl	$31, %r14d
	cltq
	leaq	0(%r13,%rax,8), %rax
	sarq	$34, %r11
	subl	%r14d, %r11d
	leal	(%r11,%r11,4), %r11d
	addl	%r11d, %r11d
	subl	%r11d, %r10d
	movsbl	(%rax,%rdx), %r11d
	leal	(%rcx,%rcx,4), %eax
	addl	%eax, %eax
	movslq	%r10d, %r10
	subl	%eax, %esi
	leaq	0(%r13,%r10,8), %r10
	movslq	%esi, %rsi
	movsbl	(%r10,%rdx), %r10d
	leaq	0(%r13,%rsi,8), %rax
	movq	%rbx, %rsi
	movsbl	(%rax,%rdx), %eax
	movl	%r10d, %ecx
	pushq	%rax
	.cfi_def_cfa_offset 64
	movsbl	(%r8,%rdx), %r9d
	xorl	%eax, %eax
	movsbl	(%rdi,%rdx), %r8d
	movl	%r11d, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rcx
	.cfi_def_cfa_offset 48
	movl	%edx, i(%rip)
	cmpl	$7, %edx
	jle	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	abacus
	.bss
	.align 32
	.type	abacus, @object
	.size	abacus, 80
abacus:
	.zero	80
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	3038287259199220266
	.quad	3038287259199220266
	.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	"%c%c%c%c%c\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	movdqa	.LC2(%rip), %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$10794, %esi
	movabsq	$3038287259199220266, %rax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	$8253, %edi
	movl	$15648, %r8d
	movl	$15648, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	$15648, %r10d
	movl	$15648, %r11d
	leaq	n(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	$8253, %ebp
	leaq	abacus(%rip), %r13
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	$8224, %ebx
	movaps	%xmm0, 48+abacus(%rip)
	movaps	%xmm0, abacus(%rip)
	movaps	%xmm0, 16+abacus(%rip)
	movaps	%xmm0, 32+abacus(%rip)
	movq	%rax, 64+abacus(%rip)
	movw	%bx, 39+abacus(%rip)
	leaq	.LC0(%rip), %rbx
	movw	%bp, 42+abacus(%rip)
	leaq	.LC1(%rip), %rbp
	movl	$707406378, 72+abacus(%rip)
	movw	%si, 76+abacus(%rip)
	movb	$42, 78+abacus(%rip)
	movl	$8, j(%rip)
	movl	$10, i(%rip)
	movb	$32, 1+abacus(%rip)
	movw	%di, 2+abacus(%rip)
	movw	%r8w, 9+abacus(%rip)
	movb	$32, 12+abacus(%rip)
	movw	%r9w, 17+abacus(%rip)
	movb	$32, 21+abacus(%rip)
	movw	%r10w, 25+abacus(%rip)
	movb	$32, 30+abacus(%rip)
	movw	%r11w, 33+abacus(%rip)
	movb	$32, 48+abacus(%rip)
	movb	$61, 50+abacus(%rip)
	movb	$32, 52+abacus(%rip)
	movb	$32, 56+abacus(%rip)
	movb	$61, 58+abacus(%rip)
	movb	$32, 61+abacus(%rip)
	movb	$32, 64+abacus(%rip)
	movb	$61, 66+abacus(%rip)
	movb	$32, 70+abacus(%rip)
	movb	$32, 72+abacus(%rip)
	movb	$61, 74+abacus(%rip)
	movb	$32, 79+abacus(%rip)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L9
	cmpl	$10, i(%rip)
	je	.L3
	movl	$10, %edi
	call	putchar@PLT
.L3:
	movl	$0, i(%rip)
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	n(%rip), %rax
	movslq	%edx, %rdx
	subq	$8, %rsp
	.cfi_def_cfa_offset 56
	imulq	$1717986919, %rax, %rcx
	movl	%eax, %r9d
	movq	%rax, %rsi
	sarl	$31, %r9d
	sarq	$34, %rcx
	subl	%r9d, %ecx
	movslq	%ecx, %rdi
	movl	%ecx, %r8d
	imulq	$1717986919, %rdi, %rdi
	sarl	$31, %r8d
	sarq	$34, %rdi
	subl	%r8d, %edi
	leal	(%rdi,%rdi,4), %r8d
	movl	%ecx, %edi
	addl	%r8d, %r8d
	subl	%r8d, %edi
	movslq	%edi, %rdi
	leaq	0(%r13,%rdi,8), %r8
	imulq	$1374389535, %rax, %rdi
	sarq	$37, %rdi
	subl	%r9d, %edi
	movslq	%edi, %r10
	movl	%edi, %r11d
	imulq	$1717986919, %r10, %r10
	sarl	$31, %r11d
	sarq	$34, %r10
	subl	%r11d, %r10d
	leal	(%r10,%r10,4), %r10d
	addl	%r10d, %r10d
	subl	%r10d, %edi
	imulq	$274877907, %rax, %r10
	imulq	$1759218605, %rax, %rax
	movslq	%edi, %rdi
	leaq	0(%r13,%rdi,8), %rdi
	sarq	$38, %r10
	subl	%r9d, %r10d
	sarq	$44, %rax
	movslq	%r10d, %r11
	movl	%r10d, %r14d
	subl	%r9d, %eax
	imulq	$1717986919, %r11, %r11
	sarl	$31, %r14d
	cltq
	leaq	0(%r13,%rax,8), %rax
	sarq	$34, %r11
	subl	%r14d, %r11d
	leal	(%r11,%r11,4), %r11d
	addl	%r11d, %r11d
	subl	%r11d, %r10d
	movsbl	(%rax,%rdx), %r11d
	leal	(%rcx,%rcx,4), %eax
	addl	%eax, %eax
	movslq	%r10d, %r10
	subl	%eax, %esi
	leaq	0(%r13,%r10,8), %r10
	movslq	%esi, %rsi
	movsbl	(%r10,%rdx), %r10d
	leaq	0(%r13,%rsi,8), %rax
	movq	%rbx, %rsi
	movsbl	(%rax,%rdx), %eax
	movl	%r10d, %ecx
	pushq	%rax
	.cfi_def_cfa_offset 64
	movsbl	(%r8,%rdx), %r9d
	xorl	%eax, %eax
	movsbl	(%rdi,%rdx), %r8d
	movl	%r11d, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rcx
	.cfi_def_cfa_offset 48
	movl	%edx, i(%rip)
	cmpl	$7, %edx
	jle	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	abacus
	.bss
	.align 32
	.type	abacus, @object
	.size	abacus, 80
abacus:
	.zero	80
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	3038287259199220266
	.quad	3038287259199220266
	.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>
#include <stdlib.h>

int i,j,n;
char abacus[10][8];

int main(){
	for(i=0;i<10;i++){
		for(j=0;j<8;j++){
			abacus[i][j]='*';
		}
	}
	for(i=0;i<10;i++){
		abacus[i][1-i/5]=' ';
		abacus[i][2]='=';
		abacus[i][3+i%5]=' ';
	}
	while(scanf("%d",&n)!=EOF){
		if(i!=10)printf("\n");
		for(i=0;i<8;i++){
			printf("%c%c%c%c%c\n",abacus[n/10000][i],abacus[(n/1000)%10][i],abacus[(n/100)%10][i],abacus[(n/10)%10][i],abacus[n%10][i]);
		}
	}
	return 0;
}
2006
1101
 2006
0101
 2006
0100
 2006
1100
 2006
1000
 2006
1001
 2006
1011
 2006
1010
 2006
0010
 2006
0011

**** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 ** *
*  * 
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
  * *
** * 
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
  *  
** **
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 **  
*  **
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 *   
* ***
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 *  *
* ** 
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 * **
* *  
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
 * * 
* * *
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
   * 
*** *
*****
*****
*****
 **** 
    *
=====
 *  *
**** 
* ***
*****
*****

*****
     
=====
   **
***  
*****
*****
*****

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

int i,j,n;
char abacus[10][8];

int main(){
	for(i=0;i<10;i++){
		for(j=0;j<8;j++){
			abacus[i][j]='*';
		}
	}
	for(i=0;i<10;i++){
		abacus[i][1-i/5]=' ';
		abacus[i][2]='=';
		abacus[i][3+i%5]=' ';
	}
	while(scanf("%d",&n)!=EOF){
		if(i!=10)printf("\n");
		for(i=0;i<8;i++){
			printf("%c%c%c%c%c\n",abacus[n/10000][i],abacus[(n/1000)%10][i],abacus[(n/100)%10][i],abacus[(n/10)%10][i],abacus[n%10][i]);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	abacus
	.align 32
	.type	abacus, @object
	.size	abacus, 80
abacus:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%c%c%c%c%c\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$7, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L5
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	%ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	2+abacus(%rip), %rax
	movb	$61, (%rdx,%rax)
	movl	i(%rip), %esi
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$3, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L7
	jmp	.L8
.L12:
	movl	i(%rip), %eax
	cmpl	$10, %eax
	je	.L9
	movl	$10, %edi
	call	putchar@PLT
.L9:
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %r8d
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %esi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %r9d
	sarl	$31, %r9d
	subl	%r9d, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movl	n(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1759218605, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$12, %ecx
	sarl	$31, %eax
	subl	%eax, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %r9
	movslq	%ecx, %rax
	salq	$3, %rax
	leaq	(%rax,%r9), %rcx
	leaq	abacus(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%esi, %ecx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %eax
	cmpl	$7, %eax
	jle	.L11
.L8:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	abacus
	.align 32
	.type	abacus, @object
	.size	abacus, 80
abacus:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%c%c%c%c%c\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, i(%rip)
	jmp	.L2
.L5:
	movl	$0, j(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L3:
	movl	j(%rip), %eax
	cmpl	$7, %eax
	jle	.L4
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L5
	movl	$0, i(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	%ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	2+abacus(%rip), %rax
	movb	$61, (%rdx,%rax)
	movl	i(%rip), %esi
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$3, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movb	$32, (%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %eax
	cmpl	$9, %eax
	jle	.L7
	jmp	.L8
.L12:
	movl	i(%rip), %eax
	cmpl	$10, %eax
	je	.L9
	movl	$10, %edi
	call	putchar@PLT
.L9:
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %r8d
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %esi
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %r9d
	sarl	$31, %r9d
	subl	%r9d, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	i(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	abacus(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movl	n(%rip), %eax
	movslq	%eax, %rcx
	imulq	$1759218605, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$12, %ecx
	sarl	$31, %eax
	subl	%eax, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %r9
	movslq	%ecx, %rax
	salq	$3, %rax
	leaq	(%rax,%r9), %rcx
	leaq	abacus(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%esi, %ecx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %eax
	cmpl	$7, %eax
	jle	.L11
.L8:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
