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){
	while(1){
	int a,t=0;
	scanf("%d",&a);
		if(a==0){
			return 0;
		}
	a=1000-a;
	if(a>=500){
		a=a-500;
		t++;
	}
	while(1){
		if(a<100){
			break;
		}
		a=a-100;
		t++;
	}
	if(a>=50){
		a=a-50;
		t++;
	}
	while(1){
		if(a<10){
			break;
		}
		a=a-10;
		t++;
	}
	if(a>=5){
		a=a-5;
		t++;
	}
	while(1){
		if(a<1){
			break;
		}
		a=a-1;
		t++;
	}
	printf("%d\n",t);
	}
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC7:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	movl	$1000, %ecx
	subl	%eax, %ecx
	cmpl	$499, %ecx
	jg	.L3
	movl	%ecx, 4(%rsp)
	xorl	%edi, %edi
	cmpl	$99, %ecx
	jle	.L18
.L30:
	leal	-100(%rcx), %esi
	movq	%rsi, %rax
	imulq	$1374389535, %rsi, %rsi
	shrq	$37, %rsi
	addl	$1, %esi
	cmpl	$399, %eax
	jbe	.L6
	movd	%ecx, %xmm6
	movd	%edi, %xmm7
	movl	%esi, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	pshufd	$0, %xmm7, %xmm2
	paddd	.LC1(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm2
	movdqa	.LC6(%rip), %xmm4
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm1
	movdqa	%xmm3, %xmm0
	addl	$1, %eax
	paddd	.LC3(%rip), %xmm2
	paddd	.LC4(%rip), %xmm3
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm1
	cmpl	%eax, %edx
	jne	.L7
	movl	%esi, %r8d
	pshufd	$255, %xmm1, %xmm1
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r8d
	movd	%xmm1, %edx
	movd	%xmm0, %eax
	imull	$-100, %r8d, %r9d
	addl	%r8d, %edi
	addl	%r9d, %ecx
	cmpl	%r8d, %esi
	je	.L8
	leal	-100(%rcx), %eax
.L6:
	leal	1(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-200(%rcx), %eax
	leal	2(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-300(%rcx), %eax
	leal	3(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-400(%rcx), %eax
	leal	4(%rdi), %edx
.L8:
	movl	%eax, 4(%rsp)
.L5:
	cmpl	$49, %eax
	jle	.L9
	subl	$50, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L9:
	cmpl	$9, %eax
	jg	.L29
.L15:
	cmpl	$4, %eax
	jle	.L11
	subl	$5, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L11:
	testl	%eax, %eax
	jle	.L12
	movl	$0, 4(%rsp)
	addl	%eax, %edx
.L12:
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L29:
	leal	-10(%rax), %ecx
	leal	1(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-20(%rax), %ecx
	leal	2(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-30(%rax), %ecx
	leal	3(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	subl	$40, %eax
	addl	$4, %edx
.L10:
	movl	%eax, 4(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$500, %ecx
	movl	$1, %edi
	subl	%eax, %ecx
	movl	%ecx, 4(%rsp)
	cmpl	$99, %ecx
	jg	.L30
.L18:
	movl	%edi, %edx
	movl	%ecx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%esi, %edx
	movl	%ecx, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-100
	.long	-200
	.long	-300
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	-400
	.long	-400
	.long	-400
	.long	-400
	.align 16
.LC5:
	.long	-100
	.long	-100
	.long	-100
	.long	-100
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
.LC7:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	movl	$1000, %ecx
	subl	%eax, %ecx
	cmpl	$499, %ecx
	jg	.L3
	movl	%ecx, 4(%rsp)
	xorl	%edi, %edi
	cmpl	$99, %ecx
	jle	.L18
.L30:
	leal	-100(%rcx), %esi
	movq	%rsi, %rax
	imulq	$1374389535, %rsi, %rsi
	shrq	$37, %rsi
	addl	$1, %esi
	cmpl	$399, %eax
	jbe	.L6
	movd	%ecx, %xmm6
	movd	%edi, %xmm7
	movl	%esi, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	pshufd	$0, %xmm7, %xmm2
	paddd	.LC1(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm2
	movdqa	.LC6(%rip), %xmm4
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm1
	movdqa	%xmm3, %xmm0
	addl	$1, %eax
	paddd	.LC3(%rip), %xmm2
	paddd	.LC4(%rip), %xmm3
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm1
	cmpl	%eax, %edx
	jne	.L7
	movl	%esi, %r8d
	pshufd	$255, %xmm1, %xmm1
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r8d
	movd	%xmm1, %edx
	movd	%xmm0, %eax
	imull	$-100, %r8d, %r9d
	addl	%r8d, %edi
	addl	%r9d, %ecx
	cmpl	%r8d, %esi
	je	.L8
	leal	-100(%rcx), %eax
.L6:
	leal	1(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-200(%rcx), %eax
	leal	2(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-300(%rcx), %eax
	leal	3(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-400(%rcx), %eax
	leal	4(%rdi), %edx
.L8:
	movl	%eax, 4(%rsp)
.L5:
	cmpl	$49, %eax
	jle	.L9
	subl	$50, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L9:
	cmpl	$9, %eax
	jg	.L29
.L15:
	cmpl	$4, %eax
	jle	.L11
	subl	$5, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L11:
	testl	%eax, %eax
	jle	.L12
	movl	$0, 4(%rsp)
	addl	%eax, %edx
.L12:
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L29:
	leal	-10(%rax), %ecx
	leal	1(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-20(%rax), %ecx
	leal	2(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-30(%rax), %ecx
	leal	3(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	subl	$40, %eax
	addl	$4, %edx
.L10:
	movl	%eax, 4(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$500, %ecx
	movl	$1, %edi
	subl	%eax, %ecx
	movl	%ecx, 4(%rsp)
	cmpl	$99, %ecx
	jg	.L30
.L18:
	movl	%edi, %edx
	movl	%ecx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%esi, %edx
	movl	%ecx, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-100
	.long	-200
	.long	-300
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	-400
	.long	-400
	.long	-400
	.long	-400
	.align 16
.LC5:
	.long	-100
	.long	-100
	.long	-100
	.long	-100
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
.LC7:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	movl	$1000, %ecx
	subl	%eax, %ecx
	cmpl	$499, %ecx
	jg	.L3
	movl	%ecx, 4(%rsp)
	xorl	%edi, %edi
	cmpl	$99, %ecx
	jle	.L18
.L30:
	leal	-100(%rcx), %esi
	movq	%rsi, %rax
	imulq	$1374389535, %rsi, %rsi
	shrq	$37, %rsi
	addl	$1, %esi
	cmpl	$399, %eax
	jbe	.L6
	movd	%ecx, %xmm6
	movd	%edi, %xmm7
	movl	%esi, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	pshufd	$0, %xmm7, %xmm2
	paddd	.LC1(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm2
	movdqa	.LC6(%rip), %xmm4
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm1
	movdqa	%xmm3, %xmm0
	addl	$1, %eax
	paddd	.LC3(%rip), %xmm2
	paddd	.LC4(%rip), %xmm3
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm1
	cmpl	%eax, %edx
	jne	.L7
	movl	%esi, %r8d
	pshufd	$255, %xmm1, %xmm1
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r8d
	movd	%xmm1, %edx
	movd	%xmm0, %eax
	imull	$-100, %r8d, %r9d
	addl	%r8d, %edi
	addl	%r9d, %ecx
	cmpl	%r8d, %esi
	je	.L8
	leal	-100(%rcx), %eax
.L6:
	leal	1(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-200(%rcx), %eax
	leal	2(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-300(%rcx), %eax
	leal	3(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-400(%rcx), %eax
	leal	4(%rdi), %edx
.L8:
	movl	%eax, 4(%rsp)
.L5:
	cmpl	$49, %eax
	jle	.L9
	subl	$50, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L9:
	cmpl	$9, %eax
	jg	.L29
.L15:
	cmpl	$4, %eax
	jle	.L11
	subl	$5, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L11:
	testl	%eax, %eax
	jle	.L12
	movl	$0, 4(%rsp)
	addl	%eax, %edx
.L12:
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L29:
	leal	-10(%rax), %ecx
	leal	1(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-20(%rax), %ecx
	leal	2(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-30(%rax), %ecx
	leal	3(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	subl	$40, %eax
	addl	$4, %edx
.L10:
	movl	%eax, 4(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$500, %ecx
	movl	$1, %edi
	subl	%eax, %ecx
	movl	%ecx, 4(%rsp)
	cmpl	$99, %ecx
	jg	.L30
.L18:
	movl	%edi, %edx
	movl	%ecx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%esi, %edx
	movl	%ecx, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-100
	.long	-200
	.long	-300
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	-400
	.long	-400
	.long	-400
	.long	-400
	.align 16
.LC5:
	.long	-100
	.long	-100
	.long	-100
	.long	-100
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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){
	while(1){
	int a,t=0;
	scanf("%d",&a);
		if(a==0){
			return 0;
		}
	a=1000-a;
	if(a>=500){
		a=a-500;
		t++;
	}
	while(1){
		if(a<100){
			break;
		}
		a=a-100;
		t++;
	}
	if(a>=50){
		a=a-50;
		t++;
	}
	while(1){
		if(a<10){
			break;
		}
		a=a-10;
		t++;
	}
	if(a>=5){
		a=a-5;
		t++;
	}
	while(1){
		if(a<1){
			break;
		}
		a=a-1;
		t++;
	}
	printf("%d\n",t);
	}
}```
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){
	while(1){
	int a,t=0;
	scanf("%d",&a);
		if(a==0){
			return 0;
		}
	a=1000-a;
	if(a>=500){
		a=a-500;
		t++;
	}
	while(1){
		if(a<100){
			break;
		}
		a=a-100;
		t++;
	}
	if(a>=50){
		a=a-50;
		t++;
	}
	while(1){
		if(a<10){
			break;
		}
		a=a-10;
		t++;
	}
	if(a>=5){
		a=a-5;
		t++;
	}
	while(1){
		if(a<1){
			break;
		}
		a=a-1;
		t++;
	}
	printf("%d\n",t);
	}
}```

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:

380
0
0
 380
2
0
 380
-1
0
 380
-2
0
 380
3
0
 380
4
0
 380
-4
0
 380
5
0
 380
-7
0
 380
10
0

4
 4
14
 4
7
 4
8
 4
13
 4
12
 4
10
 4
11
 4
9
 4
10

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){
	while(1){
	int a,t=0;
	scanf("%d",&a);
		if(a==0){
			return 0;
		}
	a=1000-a;
	if(a>=500){
		a=a-500;
		t++;
	}
	while(1){
		if(a<100){
			break;
		}
		a=a-100;
		t++;
	}
	if(a>=50){
		a=a-50;
		t++;
	}
	while(1){
		if(a<10){
			break;
		}
		a=a-10;
		t++;
	}
	if(a>=5){
		a=a-5;
		t++;
	}
	while(1){
		if(a<1){
			break;
		}
		a=a-1;
		t++;
	}
	printf("%d\n",t);
	}
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC7:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	movl	$1000, %ecx
	subl	%eax, %ecx
	cmpl	$499, %ecx
	jg	.L3
	movl	%ecx, 4(%rsp)
	xorl	%edi, %edi
	cmpl	$99, %ecx
	jle	.L18
.L30:
	leal	-100(%rcx), %esi
	movq	%rsi, %rax
	imulq	$1374389535, %rsi, %rsi
	shrq	$37, %rsi
	addl	$1, %esi
	cmpl	$399, %eax
	jbe	.L6
	movd	%ecx, %xmm6
	movd	%edi, %xmm7
	movl	%esi, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	pshufd	$0, %xmm7, %xmm2
	paddd	.LC1(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm2
	movdqa	.LC6(%rip), %xmm4
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm1
	movdqa	%xmm3, %xmm0
	addl	$1, %eax
	paddd	.LC3(%rip), %xmm2
	paddd	.LC4(%rip), %xmm3
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm1
	cmpl	%eax, %edx
	jne	.L7
	movl	%esi, %r8d
	pshufd	$255, %xmm1, %xmm1
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r8d
	movd	%xmm1, %edx
	movd	%xmm0, %eax
	imull	$-100, %r8d, %r9d
	addl	%r8d, %edi
	addl	%r9d, %ecx
	cmpl	%r8d, %esi
	je	.L8
	leal	-100(%rcx), %eax
.L6:
	leal	1(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-200(%rcx), %eax
	leal	2(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-300(%rcx), %eax
	leal	3(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-400(%rcx), %eax
	leal	4(%rdi), %edx
.L8:
	movl	%eax, 4(%rsp)
.L5:
	cmpl	$49, %eax
	jle	.L9
	subl	$50, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L9:
	cmpl	$9, %eax
	jg	.L29
.L15:
	cmpl	$4, %eax
	jle	.L11
	subl	$5, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L11:
	testl	%eax, %eax
	jle	.L12
	movl	$0, 4(%rsp)
	addl	%eax, %edx
.L12:
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L29:
	leal	-10(%rax), %ecx
	leal	1(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-20(%rax), %ecx
	leal	2(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-30(%rax), %ecx
	leal	3(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	subl	$40, %eax
	addl	$4, %edx
.L10:
	movl	%eax, 4(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$500, %ecx
	movl	$1, %edi
	subl	%eax, %ecx
	movl	%ecx, 4(%rsp)
	cmpl	$99, %ecx
	jg	.L30
.L18:
	movl	%edi, %edx
	movl	%ecx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%esi, %edx
	movl	%ecx, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-100
	.long	-200
	.long	-300
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	-400
	.long	-400
	.long	-400
	.long	-400
	.align 16
.LC5:
	.long	-100
	.long	-100
	.long	-100
	.long	-100
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
.LC7:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	movl	$1000, %ecx
	subl	%eax, %ecx
	cmpl	$499, %ecx
	jg	.L3
	movl	%ecx, 4(%rsp)
	xorl	%edi, %edi
	cmpl	$99, %ecx
	jle	.L18
.L30:
	leal	-100(%rcx), %esi
	movq	%rsi, %rax
	imulq	$1374389535, %rsi, %rsi
	shrq	$37, %rsi
	addl	$1, %esi
	cmpl	$399, %eax
	jbe	.L6
	movd	%ecx, %xmm6
	movd	%edi, %xmm7
	movl	%esi, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	pshufd	$0, %xmm7, %xmm2
	paddd	.LC1(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm2
	movdqa	.LC6(%rip), %xmm4
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm1
	movdqa	%xmm3, %xmm0
	addl	$1, %eax
	paddd	.LC3(%rip), %xmm2
	paddd	.LC4(%rip), %xmm3
	paddd	%xmm5, %xmm0
	paddd	%xmm4, %xmm1
	cmpl	%eax, %edx
	jne	.L7
	movl	%esi, %r8d
	pshufd	$255, %xmm1, %xmm1
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r8d
	movd	%xmm1, %edx
	movd	%xmm0, %eax
	imull	$-100, %r8d, %r9d
	addl	%r8d, %edi
	addl	%r9d, %ecx
	cmpl	%r8d, %esi
	je	.L8
	leal	-100(%rcx), %eax
.L6:
	leal	1(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-200(%rcx), %eax
	leal	2(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-300(%rcx), %eax
	leal	3(%rdi), %edx
	cmpl	$99, %eax
	jle	.L8
	leal	-400(%rcx), %eax
	leal	4(%rdi), %edx
.L8:
	movl	%eax, 4(%rsp)
.L5:
	cmpl	$49, %eax
	jle	.L9
	subl	$50, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L9:
	cmpl	$9, %eax
	jg	.L29
.L15:
	cmpl	$4, %eax
	jle	.L11
	subl	$5, %eax
	addl	$1, %edx
	movl	%eax, 4(%rsp)
.L11:
	testl	%eax, %eax
	jle	.L12
	movl	$0, 4(%rsp)
	addl	%eax, %edx
.L12:
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L29:
	leal	-10(%rax), %ecx
	leal	1(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-20(%rax), %ecx
	leal	2(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	leal	-30(%rax), %ecx
	leal	3(%rdx), %esi
	cmpl	$9, %ecx
	jle	.L21
	subl	$40, %eax
	addl	$4, %edx
.L10:
	movl	%eax, 4(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$500, %ecx
	movl	$1, %edi
	subl	%eax, %ecx
	movl	%ecx, 4(%rsp)
	cmpl	$99, %ecx
	jg	.L30
.L18:
	movl	%edi, %edx
	movl	%ecx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%esi, %edx
	movl	%ecx, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	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
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-100
	.long	-200
	.long	-300
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	-400
	.long	-400
	.long	-400
	.long	-400
	.align 16
.LC5:
	.long	-100
	.long	-100
	.long	-100
	.long	-100
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
```