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

```c
#include <stdio.h>

int main(void) {
  int decimal_number,remainder;
  int stack[20];
  int i,j;
	
	while (1) {
		scanf("%d", &decimal_number);
		if (decimal_number == -1)break;
		i=0;
		while (1) {
		  remainder = decimal_number % 4;  
		  stack[i++] = remainder;          
		  if(decimal_number < 4) break;
		  decimal_number = decimal_number / 4; 
		}
		for(j=i-1; j>=0; j--)
		  printf("%d",stack[j]);
		printf("\n");
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	16(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	cmpl	$-1, %ecx
	je	.L2
	movl	%ecx, %eax
	sarl	$31, %eax
	shrl	$30, %eax
	leal	(%rcx,%rax), %edx
	andl	$3, %edx
	subl	%eax, %edx
	movl	%edx, 16(%rsp)
	cmpl	$3, %ecx
	jle	.L3
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	sarl	$2, %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	andl	$3, %esi
	movl	%esi, (%r12,%rax,4)
	movq	%rax, %rsi
	addq	$1, %rax
	cmpl	$3, %ecx
	jg	.L4
	movslq	%edx, %r14
	movl	%ecx, 12(%rsp)
	salq	$2, %rsi
	salq	$2, %r14
	leaq	(%r12,%r14), %rbx
	addq	%r13, %r14
	subq	%rsi, %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L5
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$112, %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
.L3:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
.L14:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	16(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	cmpl	$-1, %ecx
	je	.L2
	movl	%ecx, %eax
	sarl	$31, %eax
	shrl	$30, %eax
	leal	(%rcx,%rax), %edx
	andl	$3, %edx
	subl	%eax, %edx
	movl	%edx, 16(%rsp)
	cmpl	$3, %ecx
	jle	.L3
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	sarl	$2, %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	andl	$3, %esi
	movl	%esi, (%r12,%rax,4)
	movq	%rax, %rsi
	addq	$1, %rax
	cmpl	$3, %ecx
	jg	.L4
	movslq	%edx, %r14
	movl	%ecx, 12(%rsp)
	salq	$2, %rsi
	salq	$2, %r14
	leaq	(%r12,%r14), %rbx
	addq	%r13, %r14
	subq	%rsi, %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L5
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$112, %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
.L3:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
.L14:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	16(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	cmpl	$-1, %ecx
	je	.L2
	movl	%ecx, %eax
	sarl	$31, %eax
	shrl	$30, %eax
	leal	(%rcx,%rax), %edx
	andl	$3, %edx
	subl	%eax, %edx
	movl	%edx, 16(%rsp)
	cmpl	$3, %ecx
	jle	.L3
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	sarl	$2, %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	andl	$3, %esi
	movl	%esi, (%r12,%rax,4)
	movq	%rax, %rsi
	addq	$1, %rax
	cmpl	$3, %ecx
	jg	.L4
	movslq	%edx, %r14
	movl	%ecx, 12(%rsp)
	salq	$2, %rsi
	salq	$2, %r14
	leaq	(%r12,%r14), %rbx
	addq	%r13, %r14
	subq	%rsi, %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L5
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$112, %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
.L3:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
.L14:
	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:
```
```c
#include <stdio.h>

int main(void) {
  int decimal_number,remainder;
  int stack[20];
  int i,j;
	
	while (1) {
		scanf("%d", &decimal_number);
		if (decimal_number == -1)break;
		i=0;
		while (1) {
		  remainder = decimal_number % 4;  
		  stack[i++] = remainder;          
		  if(decimal_number < 4) break;
		  decimal_number = decimal_number / 4; 
		}
		for(j=i-1; j>=0; j--)
		  printf("%d",stack[j]);
		printf("\n");
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void) {
  int decimal_number,remainder;
  int stack[20];
  int i,j;
	
	while (1) {
		scanf("%d", &decimal_number);
		if (decimal_number == -1)break;
		i=0;
		while (1) {
		  remainder = decimal_number % 4;  
		  stack[i++] = remainder;          
		  if(decimal_number < 4) break;
		  decimal_number = decimal_number / 4; 
		}
		for(j=i-1; j>=0; j--)
		  printf("%d",stack[j]);
		printf("\n");
	}
	return 0;
}```

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.
Optimized Assembly Code:

7
4
0
12
10
10010
-1
 7
4
0
12
4
10000
-1
 7
4
0
13
10
10010
-1
 7
4
0
12
6
10000
-1
 7
4
0
24
10
10010
-1
 7
4
1
12
6
10000
-1
 7
4
1
24
10
10010
-1
 7
6
1
12
6
10000
-1
 7
1
1
24
10
10010
-1
 7
6
1
12
11
10000
-1

13
10
0
30
22
2130122
 13
10
0
30
10
2130100
 13
10
0
31
22
2130122
 13
10
0
30
12
2130100
 13
10
0
120
22
2130122
 13
10
1
30
12
2130100
 13
10
1
120
22
2130122
 13
12
1
30
12
2130100
 13
1
1
120
22
2130122
 13
12
1
30
23
2130100

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

```c
#include <stdio.h>

int main(void) {
  int decimal_number,remainder;
  int stack[20];
  int i,j;
	
	while (1) {
		scanf("%d", &decimal_number);
		if (decimal_number == -1)break;
		i=0;
		while (1) {
		  remainder = decimal_number % 4;  
		  stack[i++] = remainder;          
		  if(decimal_number < 4) break;
		  decimal_number = decimal_number / 4; 
		}
		for(j=i-1; j>=0; j--)
		  printf("%d",stack[j]);
		printf("\n");
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	16(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	cmpl	$-1, %ecx
	je	.L2
	movl	%ecx, %eax
	sarl	$31, %eax
	shrl	$30, %eax
	leal	(%rcx,%rax), %edx
	andl	$3, %edx
	subl	%eax, %edx
	movl	%edx, 16(%rsp)
	cmpl	$3, %ecx
	jle	.L3
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	sarl	$2, %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	andl	$3, %esi
	movl	%esi, (%r12,%rax,4)
	movq	%rax, %rsi
	addq	$1, %rax
	cmpl	$3, %ecx
	jg	.L4
	movslq	%edx, %r14
	movl	%ecx, 12(%rsp)
	salq	$2, %rsi
	salq	$2, %r14
	leaq	(%r12,%r14), %rbx
	addq	%r13, %r14
	subq	%rsi, %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L5
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$112, %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
.L3:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
.L14:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	16(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	cmpl	$-1, %ecx
	je	.L2
	movl	%ecx, %eax
	sarl	$31, %eax
	shrl	$30, %eax
	leal	(%rcx,%rax), %edx
	andl	$3, %edx
	subl	%eax, %edx
	movl	%edx, 16(%rsp)
	cmpl	$3, %ecx
	jle	.L3
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	sarl	$2, %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	andl	$3, %esi
	movl	%esi, (%r12,%rax,4)
	movq	%rax, %rsi
	addq	$1, %rax
	cmpl	$3, %ecx
	jg	.L4
	movslq	%edx, %r14
	movl	%ecx, 12(%rsp)
	salq	$2, %rsi
	salq	$2, %r14
	leaq	(%r12,%r14), %rbx
	addq	%r13, %r14
	subq	%rsi, %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L5
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$112, %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
.L3:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L6
.L14:
	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:
```