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

```c
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string.h>

int main() {
	int n;
	char N[10000],x[2];
	int i;
	while (~fscanf(stdin, "%d", &n),n!=-1) {
		memset(x, '\0', sizeof(x));
		memset(N, '\0', sizeof(N));
		if(n==0) N[0]='0';
		while (n) {
			sprintf(x, "%d", n % 4);
			strcat(N, x);
			n /= 4;
		}
		for (i = strlen(N)-1; i >= 0; --i)fprintf(stdout, "%c", N[i]);
		puts("");
	}
	return 0;
}```

Assembly Code:

```assembly
	.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:
.LFB35:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1848, %rsp
	.cfi_def_cfa_offset 10096
	leaq	.LC0(%rip), %r13
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	8(%rsp), %ebx
	cmpl	$-1, %ebx
	je	.L17
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%esi, %esi
	movl	$10000, %edx
	movq	%rbp, %rdi
	movw	%ax, 14(%rsp)
	leaq	14(%rsp), %r12
	call	memset@PLT
	testl	%ebx, %ebx
	jne	.L3
	movb	$48, 16(%rsp)
.L4:
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ebx
	testl	%eax, %eax
	je	.L5
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	subq	$1, %rbx
	call	fputc@PLT
	cmpl	$-1, %ebx
	jne	.L6
.L5:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%ebx, %eax
	movq	%r13, %rcx
	movl	$2, %edx
	movl	$1, %esi
	sarl	$31, %eax
	movq	%r12, %rdi
	shrl	$30, %eax
	leal	(%rbx,%rax), %r8d
	andl	$3, %r8d
	subl	%eax, %r8d
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	$10000, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__strcat_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	leal	3(%rax), %ebx
	cmovns	%eax, %ebx
	sarl	$2, %ebx
	movl	%ebx, 8(%rsp)
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$10040, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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"
.LC1:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1848, %rsp
	.cfi_def_cfa_offset 10096
	leaq	.LC0(%rip), %r13
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	8(%rsp), %ebx
	cmpl	$-1, %ebx
	je	.L17
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%esi, %esi
	movl	$10000, %edx
	movq	%rbp, %rdi
	movw	%ax, 14(%rsp)
	leaq	14(%rsp), %r12
	call	memset@PLT
	testl	%ebx, %ebx
	jne	.L3
	movb	$48, 16(%rsp)
.L4:
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ebx
	testl	%eax, %eax
	je	.L5
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	subq	$1, %rbx
	call	fputc@PLT
	cmpl	$-1, %ebx
	jne	.L6
.L5:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%ebx, %eax
	movq	%r13, %rcx
	movl	$2, %edx
	movl	$1, %esi
	sarl	$31, %eax
	movq	%r12, %rdi
	shrl	$30, %eax
	leal	(%rbx,%rax), %r8d
	andl	$3, %r8d
	subl	%eax, %r8d
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	$10000, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__strcat_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	leal	3(%rax), %ebx
	cmovns	%eax, %ebx
	sarl	$2, %ebx
	movl	%ebx, 8(%rsp)
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$10040, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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"
.LC1:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1848, %rsp
	.cfi_def_cfa_offset 10096
	leaq	.LC0(%rip), %r13
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	8(%rsp), %ebx
	cmpl	$-1, %ebx
	je	.L17
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%esi, %esi
	movl	$10000, %edx
	movq	%rbp, %rdi
	movw	%ax, 14(%rsp)
	leaq	14(%rsp), %r12
	call	memset@PLT
	testl	%ebx, %ebx
	jne	.L3
	movb	$48, 16(%rsp)
.L4:
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ebx
	testl	%eax, %eax
	je	.L5
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	subq	$1, %rbx
	call	fputc@PLT
	cmpl	$-1, %ebx
	jne	.L6
.L5:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%ebx, %eax
	movq	%r13, %rcx
	movl	$2, %edx
	movl	$1, %esi
	sarl	$31, %eax
	movq	%r12, %rdi
	shrl	$30, %eax
	leal	(%rbx,%rax), %r8d
	andl	$3, %r8d
	subl	%eax, %r8d
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	$10000, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__strcat_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	leal	3(%rax), %ebx
	cmovns	%eax, %ebx
	sarl	$2, %ebx
	movl	%ebx, 8(%rsp)
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$10040, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string.h>

int main() {
	int n;
	char N[10000],x[2];
	int i;
	while (~fscanf(stdin, "%d", &n),n!=-1) {
		memset(x, '\0', sizeof(x));
		memset(N, '\0', sizeof(N));
		if(n==0) N[0]='0';
		while (n) {
			sprintf(x, "%d", n % 4);
			strcat(N, x);
			n /= 4;
		}
		for (i = strlen(N)-1; i >= 0; --i)fprintf(stdout, "%c", N[i]);
		puts("");
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string.h>

int main() {
	int n;
	char N[10000],x[2];
	int i;
	while (~fscanf(stdin, "%d", &n),n!=-1) {
		memset(x, '\0', sizeof(x));
		memset(N, '\0', sizeof(N));
		if(n==0) N[0]='0';
		while (n) {
			sprintf(x, "%d", n % 4);
			strcat(N, x);
			n /= 4;
		}
		for (i = strlen(N)-1; i >= 0; --i)fprintf(stdout, "%c", N[i]);
		puts("");
	}
	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
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string.h>

int main() {
	int n;
	char N[10000],x[2];
	int i;
	while (~fscanf(stdin, "%d", &n),n!=-1) {
		memset(x, '\0', sizeof(x));
		memset(N, '\0', sizeof(N));
		if(n==0) N[0]='0';
		while (n) {
			sprintf(x, "%d", n % 4);
			strcat(N, x);
			n /= 4;
		}
		for (i = strlen(N)-1; i >= 0; --i)fprintf(stdout, "%c", N[i]);
		puts("");
	}
	return 0;
}```

Assembly Code:

```assembly
	.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:
.LFB35:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1848, %rsp
	.cfi_def_cfa_offset 10096
	leaq	.LC0(%rip), %r13
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	8(%rsp), %ebx
	cmpl	$-1, %ebx
	je	.L17
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%esi, %esi
	movl	$10000, %edx
	movq	%rbp, %rdi
	movw	%ax, 14(%rsp)
	leaq	14(%rsp), %r12
	call	memset@PLT
	testl	%ebx, %ebx
	jne	.L3
	movb	$48, 16(%rsp)
.L4:
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ebx
	testl	%eax, %eax
	je	.L5
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	subq	$1, %rbx
	call	fputc@PLT
	cmpl	$-1, %ebx
	jne	.L6
.L5:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%ebx, %eax
	movq	%r13, %rcx
	movl	$2, %edx
	movl	$1, %esi
	sarl	$31, %eax
	movq	%r12, %rdi
	shrl	$30, %eax
	leal	(%rbx,%rax), %r8d
	andl	$3, %r8d
	subl	%eax, %r8d
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	$10000, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__strcat_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	leal	3(%rax), %ebx
	cmovns	%eax, %ebx
	sarl	$2, %ebx
	movl	%ebx, 8(%rsp)
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$10040, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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"
.LC1:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1848, %rsp
	.cfi_def_cfa_offset 10096
	leaq	.LC0(%rip), %r13
	leaq	.LC1(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	8(%rsp), %ebx
	cmpl	$-1, %ebx
	je	.L17
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%esi, %esi
	movl	$10000, %edx
	movq	%rbp, %rdi
	movw	%ax, 14(%rsp)
	leaq	14(%rsp), %r12
	call	memset@PLT
	testl	%ebx, %ebx
	jne	.L3
	movb	$48, 16(%rsp)
.L4:
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ebx
	testl	%eax, %eax
	je	.L5
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	subq	$1, %rbx
	call	fputc@PLT
	cmpl	$-1, %ebx
	jne	.L6
.L5:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%ebx, %eax
	movq	%r13, %rcx
	movl	$2, %edx
	movl	$1, %esi
	sarl	$31, %eax
	movq	%r12, %rdi
	shrl	$30, %eax
	leal	(%rbx,%rax), %r8d
	andl	$3, %r8d
	subl	%eax, %r8d
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	movl	$10000, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__strcat_chk@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	leal	3(%rax), %ebx
	cmovns	%eax, %ebx
	sarl	$2, %ebx
	movl	%ebx, 8(%rsp)
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movq	10024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$10040, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```