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




int main(void){
int x;
scanf("%d",&x);
//分類
if(x>=2000){printf("1");return 0;}

//総当たり
int a=0,b=0,c=0,d=0,e=0,f=0;
const int TIME=20;
    for(a=0;a<TIME;a++){
        for(b=0;b<TIME;b++){
            for(c=0;c<TIME;c++){
                for(d=0;d<TIME;d++){
                    for(e=0;e<TIME;e++){
                        for(f=0;f<TIME;f++){
                            if(a*100+b*101+c*102+d*103+e*104+f*105==x){printf("1");return 0;}
                        }
                    }
                }
            }
        }
    }

printf("0");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cmpl	$1999, %eax
	jle	.L2
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L2:
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$20, -12(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L4
.L16:
	movl	$0, -32(%rbp)
	jmp	.L5
.L15:
	movl	$0, -28(%rbp)
	jmp	.L6
.L14:
	movl	$0, -24(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-32(%rbp), %eax
	imull	$101, %eax, %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	$102, %eax, %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	$103, %eax, %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	$104, %eax, %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	imull	$105, %eax, %eax
	addl	%eax, %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	addl	$1, -20(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L12
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L14
	addl	$1, -32(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L15
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.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	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$1999, %eax
	jg	.L2
	imull	$654471207, %eax, %ecx
	movl	$8200, %r11d
.L3:
	leal	-2020(%r11), %r10d
	movl	%ecx, %ebx
.L14:
	leal	-2040(%r10), %r9d
	movl	%ebx, %ebp
.L12:
	leal	-2060(%r9), %edi
	movl	%ebp, %r8d
.L10:
	leal	-2080(%rdi), %esi
	movl	%r8d, %edx
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	subl	$1, %eax
	cmpl	$-20, %eax
	je	.L19
.L5:
	cmpl	%edx, %eax
	jne	.L20
.L2:
	movl	$49, %edi
	call	putchar@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	addl	$104, %esi
	addl	$654471208, %edx
	cmpl	%edi, %esi
	jne	.L8
	leal	103(%rsi), %edi
	addl	$1308942415, %r8d
	cmpl	%r9d, %edi
	jne	.L10
	leal	205(%rsi), %r9d
	addl	$1963413622, %ebp
	cmpl	%r10d, %r9d
	jne	.L12
	leal	306(%rsi), %r10d
	subl	$1677082467, %ebx
	cmpl	%r11d, %r10d
	jne	.L14
	leal	406(%rsi), %r11d
	subl	$1022611260, %ecx
	cmpl	$9794, %esi
	jne	.L3
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L4
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$1999, %eax
	jg	.L2
	imull	$654471207, %eax, %ecx
	movl	$8200, %r11d
.L3:
	leal	-2020(%r11), %r10d
	movl	%ecx, %ebx
.L14:
	leal	-2040(%r10), %r9d
	movl	%ebx, %ebp
.L12:
	leal	-2060(%r9), %edi
	movl	%ebp, %r8d
.L10:
	leal	-2080(%rdi), %esi
	movl	%r8d, %edx
.L8:
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	subl	$1, %eax
	cmpl	$-20, %eax
	je	.L19
.L5:
	cmpl	%edx, %eax
	jne	.L20
.L2:
	movl	$49, %edi
	call	putchar@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	addl	$104, %esi
	addl	$654471208, %edx
	cmpl	%edi, %esi
	jne	.L8
	leal	103(%rsi), %edi
	addl	$1308942415, %r8d
	cmpl	%r9d, %edi
	jne	.L10
	leal	205(%rsi), %r9d
	addl	$1963413622, %ebp
	cmpl	%r10d, %r9d
	jne	.L12
	leal	306(%rsi), %r10d
	subl	$1677082467, %ebx
	cmpl	%r11d, %r10d
	jne	.L14
	leal	406(%rsi), %r11d
	subl	$1022611260, %ecx
	cmpl	$9794, %esi
	jne	.L3
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L4
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include <stdlib.h>
#include <string.h>
#include <math.h>




int main(void){
int x;
scanf("%d",&x);
//分類
if(x>=2000){printf("1");return 0;}

//総当たり
int a=0,b=0,c=0,d=0,e=0,f=0;
const int TIME=20;
    for(a=0;a<TIME;a++){
        for(b=0;b<TIME;b++){
            for(c=0;c<TIME;c++){
                for(d=0;d<TIME;d++){
                    for(e=0;e<TIME;e++){
                        for(f=0;f<TIME;f++){
                            if(a*100+b*101+c*102+d*103+e*104+f*105==x){printf("1");return 0;}
                        }
                    }
                }
            }
        }
    }

printf("0");
}

386
 0
 59
 115
 10
 53
 3
 84
 4
 97

0 1 0 0 0 0 0 0 0 0
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 <stdlib.h>
#include <string.h>
#include <math.h>




int main(void){
int x;
scanf("%d",&x);
//分類
if(x>=2000){printf("1");return 0;}

//総当たり
int a=0,b=0,c=0,d=0,e=0,f=0;
const int TIME=20;
    for(a=0;a<TIME;a++){
        for(b=0;b<TIME;b++){
            for(c=0;c<TIME;c++){
                for(d=0;d<TIME;d++){
                    for(e=0;e<TIME;e++){
                        for(f=0;f<TIME;f++){
                            if(a*100+b*101+c*102+d*103+e*104+f*105==x){printf("1");return 0;}
                        }
                    }
                }
            }
        }
    }

printf("0");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cmpl	$1999, %eax
	jle	.L2
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L2:
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$20, -12(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L4
.L16:
	movl	$0, -32(%rbp)
	jmp	.L5
.L15:
	movl	$0, -28(%rbp)
	jmp	.L6
.L14:
	movl	$0, -24(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-32(%rbp), %eax
	imull	$101, %eax, %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	$102, %eax, %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	$103, %eax, %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	$104, %eax, %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	imull	$105, %eax, %eax
	addl	%eax, %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	addl	$1, -20(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L12
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L14
	addl	$1, -32(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L15
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.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
	.section	.rodata
.LC0:
	.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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cmpl	$1999, %eax
	jle	.L2
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L2:
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$20, -12(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L4
.L16:
	movl	$0, -32(%rbp)
	jmp	.L5
.L15:
	movl	$0, -28(%rbp)
	jmp	.L6
.L14:
	movl	$0, -24(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-32(%rbp), %eax
	imull	$101, %eax, %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	imull	$102, %eax, %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	imull	$103, %eax, %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	$104, %eax, %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	imull	$105, %eax, %eax
	addl	%eax, %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	$49, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L17
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	addl	$1, -20(%rbp)
.L8:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L12
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	addl	$1, -28(%rbp)
.L6:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L14
	addl	$1, -32(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L15
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.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:
