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(int argc, char const* argv[])
{
	int n;
	char s[256];
	int i;

	while (1){

		scanf("%d", &n);
		if (n == 0){
			break;
		}

		sprintf(s, "%o", n);

		for (i = 0; s[i] != '\0'; i++){
			if (s[i] >= '4'){
				s[i]++;
			}
			if (s[i] >= '6'){
				s[i]++;
			}
			printf("%c", s[i]);
		}
		puts("");
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%o"
.LC2:
	.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
	subq	$304, %rsp
	movl	%edi, -292(%rbp)
	movq	%rsi, -304(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L8:
	leaq	-280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-280(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	movl	-280(%rbp), %edx
	leaq	-272(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -276(%rbp)
	jmp	.L4
.L7:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$51, %al
	jle	.L5
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L5:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$53, %al
	jle	.L6
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L6:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -276(%rbp)
.L4:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L12:
	nop
	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"
.LC1:
	.string	"%o"
.LC2:
	.string	""
	.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
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$296, %rsp
	.cfi_def_cfa_offset 352
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	leaq	16(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L2
	movq	%rbx, %rdi
	movq	%r14, %rcx
	movl	$256, %edx
	movl	$1, %esi
	xorl	%eax, %eax
	movq	%rbx, %r15
	call	__sprintf_chk@PLT
	movzbl	16(%rsp), %edi
	testb	%dil, %dil
	je	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$51, %dil
	jle	.L5
	movl	%edi, %eax
	addl	$1, %edi
	movb	%dil, (%r15)
	cmpb	$53, %dil
	jle	.L5
	leal	2(%rax), %edi
	movb	%dil, (%r15)
.L5:
	movsbl	%dil, %edi
	addq	$1, %r15
	call	putchar@PLT
	movzbl	(%r15), %edi
	testb	%dil, %dil
	jne	.L8
.L7:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$296, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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"
.LC1:
	.string	"%o"
.LC2:
	.string	""
	.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
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$296, %rsp
	.cfi_def_cfa_offset 352
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	leaq	16(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L2
	movq	%rbx, %rdi
	movq	%r14, %rcx
	movl	$256, %edx
	movl	$1, %esi
	xorl	%eax, %eax
	movq	%rbx, %r15
	call	__sprintf_chk@PLT
	movzbl	16(%rsp), %edi
	testb	%dil, %dil
	je	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$51, %dil
	jle	.L5
	movl	%edi, %eax
	addl	$1, %edi
	movb	%dil, (%r15)
	cmpb	$53, %dil
	jle	.L5
	leal	2(%rax), %edi
	movb	%dil, (%r15)
.L5:
	movsbl	%dil, %edi
	addq	$1, %r15
	call	putchar@PLT
	movzbl	(%r15), %edi
	testb	%dil, %dil
	jne	.L8
.L7:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$296, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(int argc, char const* argv[])
{
	int n;
	char s[256];
	int i;

	while (1){

		scanf("%d", &n);
		if (n == 0){
			break;
		}

		sprintf(s, "%o", n);

		for (i = 0; s[i] != '\0'; i++){
			if (s[i] >= '4'){
				s[i]++;
			}
			if (s[i] >= '6'){
				s[i]++;
			}
			printf("%c", s[i]);
		}
		puts("");
	}

	return 0;
}
15
100
1000000000
1
0
 15
110
1000000000
1
0
 15
101
1000000000
3
0
 15
110
1000000000
0
0
 15
101
1001000000
3
0
 15
100
1000000000
0
0
 15
111
1001000000
3
0
 15
000
1000000000
0
0
 15
111
1001000000
2
0
 15
111
1001000001
2
0

19
155
9358757000
1
 19
178
9358757000
1
 19
157
9358757000
3
 19
178
9358757000
 19
157
9372508100
3
 19
155
9358757000
 19
179
9372508100
3
 19
 19
179
9372508100
2
 19
179
9372508101
2

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(int argc, char const* argv[])
{
	int n;
	char s[256];
	int i;

	while (1){

		scanf("%d", &n);
		if (n == 0){
			break;
		}

		sprintf(s, "%o", n);

		for (i = 0; s[i] != '\0'; i++){
			if (s[i] >= '4'){
				s[i]++;
			}
			if (s[i] >= '6'){
				s[i]++;
			}
			printf("%c", s[i]);
		}
		puts("");
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%o"
.LC2:
	.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
	subq	$304, %rsp
	movl	%edi, -292(%rbp)
	movq	%rsi, -304(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L8:
	leaq	-280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-280(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	movl	-280(%rbp), %edx
	leaq	-272(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -276(%rbp)
	jmp	.L4
.L7:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$51, %al
	jle	.L5
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L5:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$53, %al
	jle	.L6
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L6:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -276(%rbp)
.L4:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L12:
	nop
	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"
.LC1:
	.string	"%o"
.LC2:
	.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
	subq	$304, %rsp
	movl	%edi, -292(%rbp)
	movq	%rsi, -304(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L8:
	leaq	-280(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-280(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	movl	-280(%rbp), %edx
	leaq	-272(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	movl	$0, -276(%rbp)
	jmp	.L4
.L7:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$51, %al
	jle	.L5
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L5:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$53, %al
	jle	.L6
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	addl	$1, %eax
	movl	%eax, %edx
	movl	-276(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L6:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -276(%rbp)
.L4:
	movl	-276(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L12:
	nop
	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:
