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 n;
    scanf("%d",&n);
    long long a[20],b[20];
    a[0]=1;b[0]=1;
    for(int i=1;i<20;i++){
        a[i]=a[i-1]*4;
    }
    for(int i=1;i<20;i++){
        b[i]=b[i-1]+a[i];
    }
    int x=0;
    for(int i=17;i>0;i--){
        if(n>b[i-1]&&b[i]>=n){
            printf("1");
            x=1;
            n-=a[i];
        }
        else if(x)printf("0");
        if(n>=0-(b[i]-1)/2&&0-(b[i-1]+1)/2>=n){
            printf("1");
            x=1;
            n+=a[i]/2;
        }
        else if(x)printf("0");
    }
    printf("%d\n",n);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$352, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	176(%rsp), %r12
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rax
	movl	$1, %edx
	movq	$1, 16(%rsp)
	movq	$1, 176(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	salq	$2, %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	cmpq	%r12, %rax
	jne	.L2
	movl	$8, %eax
	movl	$1, %edx
	leaq	16(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	addq	(%rcx,%rax), %rdx
	movq	%rdx, (%r12,%rax)
	addq	$8, %rax
	cmpq	$160, %rax
	jne	.L3
	movl	12(%rsp), %r8d
	leaq	152(%rsp), %r14
	leaq	312(%rsp), %rbx
	xorl	%esi, %esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L7
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L7:
	subq	$8, %rbx
	subq	$8, %r14
	cmpq	%rbx, %r12
	je	.L20
.L9:
	movq	-8(%rbx), %rbp
	movslq	%r8d, %rdx
	cmpq	%rbp, %rdx
	jle	.L4
	movq	(%rbx), %r13
	cmpq	%r13, %rdx
	jle	.L21
.L4:
	testl	%esi, %esi
	je	.L6
	movl	$48, %edi
	call	putchar@PLT
	movq	(%rbx), %r13
	movl	12(%rsp), %edx
.L5:
	subq	$1, %r13
	movslq	%edx, %rdx
	movq	%r13, %rax
	shrq	$63, %rax
	addq	%r13, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L11
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L11:
	movl	$48, %edi
	subq	$8, %rbx
	subq	$8, %r14
	call	putchar@PLT
	movl	12(%rsp), %r8d
	movl	$1, %esi
	cmpq	%rbx, %r12
	jne	.L9
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$352, %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
.L21:
	.cfi_restore_state
	movl	$49, %edi
	call	putchar@PLT
	movl	12(%rsp), %edx
	subl	(%r14), %edx
	movl	%edx, 12(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$49, %edi
	call	putchar@PLT
	movq	(%r14), %rax
	movl	$1, %esi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	addl	12(%rsp), %r8d
	movl	%r8d, 12(%rsp)
	jmp	.L7
.L22:
	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"
.LC1:
	.string	"%d\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$352, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	176(%rsp), %r12
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rax
	movl	$1, %edx
	movq	$1, 16(%rsp)
	movq	$1, 176(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	salq	$2, %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	cmpq	%r12, %rax
	jne	.L2
	movl	$8, %eax
	movl	$1, %edx
	leaq	16(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	addq	(%rcx,%rax), %rdx
	movq	%rdx, (%r12,%rax)
	addq	$8, %rax
	cmpq	$160, %rax
	jne	.L3
	movl	12(%rsp), %r8d
	leaq	152(%rsp), %r14
	leaq	312(%rsp), %rbx
	xorl	%esi, %esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L7
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L7:
	subq	$8, %rbx
	subq	$8, %r14
	cmpq	%rbx, %r12
	je	.L20
.L9:
	movq	-8(%rbx), %rbp
	movslq	%r8d, %rdx
	cmpq	%rbp, %rdx
	jle	.L4
	movq	(%rbx), %r13
	cmpq	%r13, %rdx
	jle	.L21
.L4:
	testl	%esi, %esi
	je	.L6
	movl	$48, %edi
	call	putchar@PLT
	movq	(%rbx), %r13
	movl	12(%rsp), %edx
.L5:
	subq	$1, %r13
	movslq	%edx, %rdx
	movq	%r13, %rax
	shrq	$63, %rax
	addq	%r13, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L11
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L11:
	movl	$48, %edi
	subq	$8, %rbx
	subq	$8, %r14
	call	putchar@PLT
	movl	12(%rsp), %r8d
	movl	$1, %esi
	cmpq	%rbx, %r12
	jne	.L9
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$352, %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
.L21:
	.cfi_restore_state
	movl	$49, %edi
	call	putchar@PLT
	movl	12(%rsp), %edx
	subl	(%r14), %edx
	movl	%edx, 12(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$49, %edi
	call	putchar@PLT
	movq	(%r14), %rax
	movl	$1, %esi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	addl	12(%rsp), %r8d
	movl	%r8d, 12(%rsp)
	jmp	.L7
.L22:
	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"
.LC1:
	.string	"%d\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$352, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	176(%rsp), %r12
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rax
	movl	$1, %edx
	movq	$1, 16(%rsp)
	movq	$1, 176(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	salq	$2, %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	cmpq	%r12, %rax
	jne	.L2
	movl	$8, %eax
	movl	$1, %edx
	leaq	16(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	addq	(%rcx,%rax), %rdx
	movq	%rdx, (%r12,%rax)
	addq	$8, %rax
	cmpq	$160, %rax
	jne	.L3
	movl	12(%rsp), %r8d
	leaq	152(%rsp), %r14
	leaq	312(%rsp), %rbx
	xorl	%esi, %esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L7
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L7:
	subq	$8, %rbx
	subq	$8, %r14
	cmpq	%rbx, %r12
	je	.L20
.L9:
	movq	-8(%rbx), %rbp
	movslq	%r8d, %rdx
	cmpq	%rbp, %rdx
	jle	.L4
	movq	(%rbx), %r13
	cmpq	%r13, %rdx
	jle	.L21
.L4:
	testl	%esi, %esi
	je	.L6
	movl	$48, %edi
	call	putchar@PLT
	movq	(%rbx), %r13
	movl	12(%rsp), %edx
.L5:
	subq	$1, %r13
	movslq	%edx, %rdx
	movq	%r13, %rax
	shrq	$63, %rax
	addq	%r13, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L11
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L11:
	movl	$48, %edi
	subq	$8, %rbx
	subq	$8, %r14
	call	putchar@PLT
	movl	12(%rsp), %r8d
	movl	$1, %esi
	cmpq	%rbx, %r12
	jne	.L9
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$352, %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
.L21:
	.cfi_restore_state
	movl	$49, %edi
	call	putchar@PLT
	movl	12(%rsp), %edx
	subl	(%r14), %edx
	movl	%edx, 12(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$49, %edi
	call	putchar@PLT
	movq	(%r14), %rax
	movl	$1, %esi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	addl	12(%rsp), %r8d
	movl	%r8d, 12(%rsp)
	jmp	.L7
.L22:
	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 n;
    scanf("%d",&n);
    long long a[20],b[20];
    a[0]=1;b[0]=1;
    for(int i=1;i<20;i++){
        a[i]=a[i-1]*4;
    }
    for(int i=1;i<20;i++){
        b[i]=b[i-1]+a[i];
    }
    int x=0;
    for(int i=17;i>0;i--){
        if(n>b[i-1]&&b[i]>=n){
            printf("1");
            x=1;
            n-=a[i];
        }
        else if(x)printf("0");
        if(n>=0-(b[i]-1)/2&&0-(b[i-1]+1)/2>=n){
            printf("1");
            x=1;
            n+=a[i]/2;
        }
        else if(x)printf("0");
    }
    printf("%d\n",n);
}```
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 n;
    scanf("%d",&n);
    long long a[20],b[20];
    a[0]=1;b[0]=1;
    for(int i=1;i<20;i++){
        a[i]=a[i-1]*4;
    }
    for(int i=1;i<20;i++){
        b[i]=b[i-1]+a[i];
    }
    int x=0;
    for(int i=17;i>0;i--){
        if(n>b[i-1]&&b[i]>=n){
            printf("1");
            x=1;
            n-=a[i];
        }
        else if(x)printf("0");
        if(n>=0-(b[i]-1)/2&&0-(b[i-1]+1)/2>=n){
            printf("1");
            x=1;
            n+=a[i]/2;
        }
        else if(x)printf("0");
    }
    printf("%d\n",n);
}```

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:

-1
 208967441
 -6
 -2
 180276081
 -3
 1
 175198680
 -4
 2

11
 11101101101011110101100010001
 1110
 10
 11111110000111101110010110001
 1101
 1
 11111101100010101011000101000
 1100
 110

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 n;
    scanf("%d",&n);
    long long a[20],b[20];
    a[0]=1;b[0]=1;
    for(int i=1;i<20;i++){
        a[i]=a[i-1]*4;
    }
    for(int i=1;i<20;i++){
        b[i]=b[i-1]+a[i];
    }
    int x=0;
    for(int i=17;i>0;i--){
        if(n>b[i-1]&&b[i]>=n){
            printf("1");
            x=1;
            n-=a[i];
        }
        else if(x)printf("0");
        if(n>=0-(b[i]-1)/2&&0-(b[i-1]+1)/2>=n){
            printf("1");
            x=1;
            n+=a[i]/2;
        }
        else if(x)printf("0");
    }
    printf("%d\n",n);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$352, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	176(%rsp), %r12
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rax
	movl	$1, %edx
	movq	$1, 16(%rsp)
	movq	$1, 176(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	salq	$2, %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	cmpq	%r12, %rax
	jne	.L2
	movl	$8, %eax
	movl	$1, %edx
	leaq	16(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	addq	(%rcx,%rax), %rdx
	movq	%rdx, (%r12,%rax)
	addq	$8, %rax
	cmpq	$160, %rax
	jne	.L3
	movl	12(%rsp), %r8d
	leaq	152(%rsp), %r14
	leaq	312(%rsp), %rbx
	xorl	%esi, %esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L7
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L7:
	subq	$8, %rbx
	subq	$8, %r14
	cmpq	%rbx, %r12
	je	.L20
.L9:
	movq	-8(%rbx), %rbp
	movslq	%r8d, %rdx
	cmpq	%rbp, %rdx
	jle	.L4
	movq	(%rbx), %r13
	cmpq	%r13, %rdx
	jle	.L21
.L4:
	testl	%esi, %esi
	je	.L6
	movl	$48, %edi
	call	putchar@PLT
	movq	(%rbx), %r13
	movl	12(%rsp), %edx
.L5:
	subq	$1, %r13
	movslq	%edx, %rdx
	movq	%r13, %rax
	shrq	$63, %rax
	addq	%r13, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L11
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L11:
	movl	$48, %edi
	subq	$8, %rbx
	subq	$8, %r14
	call	putchar@PLT
	movl	12(%rsp), %r8d
	movl	$1, %esi
	cmpq	%rbx, %r12
	jne	.L9
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$352, %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
.L21:
	.cfi_restore_state
	movl	$49, %edi
	call	putchar@PLT
	movl	12(%rsp), %edx
	subl	(%r14), %edx
	movl	%edx, 12(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$49, %edi
	call	putchar@PLT
	movq	(%r14), %rax
	movl	$1, %esi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	addl	12(%rsp), %r8d
	movl	%r8d, 12(%rsp)
	jmp	.L7
.L22:
	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"
.LC1:
	.string	"%d\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$352, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	176(%rsp), %r12
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rax
	movl	$1, %edx
	movq	$1, 16(%rsp)
	movq	$1, 176(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	salq	$2, %rdx
	addq	$8, %rax
	movq	%rdx, -8(%rax)
	cmpq	%r12, %rax
	jne	.L2
	movl	$8, %eax
	movl	$1, %edx
	leaq	16(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	addq	(%rcx,%rax), %rdx
	movq	%rdx, (%r12,%rax)
	addq	$8, %rax
	cmpq	$160, %rax
	jne	.L3
	movl	12(%rsp), %r8d
	leaq	152(%rsp), %r14
	leaq	312(%rsp), %rbx
	xorl	%esi, %esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L7
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L7:
	subq	$8, %rbx
	subq	$8, %r14
	cmpq	%rbx, %r12
	je	.L20
.L9:
	movq	-8(%rbx), %rbp
	movslq	%r8d, %rdx
	cmpq	%rbp, %rdx
	jle	.L4
	movq	(%rbx), %r13
	cmpq	%r13, %rdx
	jle	.L21
.L4:
	testl	%esi, %esi
	je	.L6
	movl	$48, %edi
	call	putchar@PLT
	movq	(%rbx), %r13
	movl	12(%rsp), %edx
.L5:
	subq	$1, %r13
	movslq	%edx, %rdx
	movq	%r13, %rax
	shrq	$63, %rax
	addq	%r13, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jl	.L11
	addq	$1, %rbp
	movq	%rbp, %rax
	shrq	$63, %rax
	addq	%rbp, %rax
	sarq	%rax
	negq	%rax
	cmpq	%rax, %rdx
	jle	.L8
.L11:
	movl	$48, %edi
	subq	$8, %rbx
	subq	$8, %r14
	call	putchar@PLT
	movl	12(%rsp), %r8d
	movl	$1, %esi
	cmpq	%rbx, %r12
	jne	.L9
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$352, %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
.L21:
	.cfi_restore_state
	movl	$49, %edi
	call	putchar@PLT
	movl	12(%rsp), %edx
	subl	(%r14), %edx
	movl	%edx, 12(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$49, %edi
	call	putchar@PLT
	movq	(%r14), %rax
	movl	$1, %esi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	addl	12(%rsp), %r8d
	movl	%r8d, 12(%rsp)
	jmp	.L7
.L22:
	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:
```