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>
int main(void)
{
	int a[100],b,c=0,x,y,z,price;
	for(b=0;;b++)
	{
		price=10000;
		scanf("%d",&a[b]);
		if(a[b]==0)
			break;
		for(x=0;x<=a[b]/200;x++)
			for(y=0;y<=(a[b]-200*x)/300;y++)
				for(z=0;z<=(a[b]-200*x-300*y)/500;z++)
					if(a[b]==200*x+300*y+500*z&&x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100<price)
						price=x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100;
		printf("%d\n",price);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	movl	$0, -440(%rbp)
.L11:
	movl	$10000, -424(%rbp)
	leaq	-416(%rbp), %rdx
	movl	-440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L15
	movl	$0, -436(%rbp)
	jmp	.L4
.L10:
	movl	$0, -432(%rbp)
	jmp	.L5
.L9:
	movl	$0, -428(%rbp)
	jmp	.L6
.L8:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-436(%rbp), %edx
	imull	$200, %edx, %ecx
	movl	-432(%rbp), %edx
	imull	$300, %edx, %edx
	addl	%edx, %ecx
	movl	-428(%rbp), %edx
	imull	$500, %edx, %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jne	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	cmpl	%eax, -424(%rbp)
	jle	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	movl	%eax, -424(%rbp)
.L7:
	addl	$1, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	imull	$-300, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -428(%rbp)
	jle	.L8
	addl	$1, -432(%rbp)
.L5:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$458129845, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -432(%rbp)
	jle	.L9
	addl	$1, -436(%rbp)
.L4:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -440(%rbp)
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2863311531, %r15d
	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	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	movq	%rax, 24(%rsp)
.L11:
	movq	24(%rsp), %rbx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %r10d
	testl	%r10d, %r10d
	je	.L2
	movslq	%r10d, %rax
	movl	%r10d, %edx
	imulq	$1374389535, %rax, %rax
	sarl	$31, %edx
	sarq	$38, %rax
	subl	%edx, %eax
	movl	%eax, 20(%rsp)
	cmpl	$-199, %r10d
	jl	.L13
	movl	%r10d, 16(%rsp)
	movl	$10000, %r9d
	movl	$0, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	16(%rsp), %r13
	movq	%r13, %rbx
	imulq	$458129845, %r13, %r13
	movl	%ebx, %eax
	sarl	$31, %eax
	sarq	$37, %r13
	subl	%eax, %r13d
	cmpl	$-299, %ebx
	jl	.L7
	movl	12(%rsp), %eax
	movl	$3435973837, %ecx
	movl	%r10d, %r12d
	xorl	%ebp, %ebp
	subl	%ebx, %r12d
	movq	%rax, %rdi
	imulq	%rcx, %rax
	shrq	$34, %rax
	leal	(%rax,%rax,4), %edx
	subl	%edx, %edi
	imull	$1520, %eax, %eax
	imull	$380, %edi, %r14d
	addl	%eax, %r14d
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%ebx, %rdi
	movl	%ebx, %eax
	imulq	$274877907, %rdi, %rdi
	sarl	$31, %eax
	sarq	$37, %rdi
	subl	%eax, %edi
	cmpl	$-499, %ebx
	jl	.L9
	movl	%ebp, %r8d
	movl	%ebp, %eax
	movl	%r12d, %ecx
	andl	$3, %r8d
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	imull	$550, %r8d, %r8d
	addl	%eax, %r8d
	xorl	%eax, %eax
	addl	%r14d, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%ecx, %r10d
	jne	.L5
	movl	%eax, %edx
	movl	%eax, %esi
	imulq	%r15, %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %r11d
	subl	%r11d, %esi
	imull	$2244, %edx, %edx
	imull	$850, %esi, %esi
	addl	%r8d, %esi
	addl	%esi, %edx
	cmpl	%edx, %r9d
	cmovg	%edx, %r9d
.L5:
	addl	$1, %eax
	addl	$500, %ecx
	cmpl	%eax, %edi
	jge	.L6
.L9:
	addl	$1, %ebp
	subl	$300, %ebx
	addl	$300, %r12d
	cmpl	%ebp, %r13d
	jge	.L10
.L7:
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	subl	$200, 16(%rsp)
	cmpl	%eax, 20(%rsp)
	jge	.L4
.L3:
	movl	%r9d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$4, 24(%rsp)
	jmp	.L11
.L13:
	movl	$10000, %r9d
	jmp	.L3
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$456, %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
.L19:
	.cfi_restore_state
	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
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2863311531, %r15d
	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	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	movq	%rax, 24(%rsp)
.L11:
	movq	24(%rsp), %rbx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %r10d
	testl	%r10d, %r10d
	je	.L2
	movslq	%r10d, %rax
	movl	%r10d, %edx
	imulq	$1374389535, %rax, %rax
	sarl	$31, %edx
	sarq	$38, %rax
	subl	%edx, %eax
	movl	%eax, 20(%rsp)
	cmpl	$-199, %r10d
	jl	.L13
	movl	%r10d, 16(%rsp)
	movl	$10000, %r9d
	movl	$0, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	16(%rsp), %r13
	movq	%r13, %rbx
	imulq	$458129845, %r13, %r13
	movl	%ebx, %eax
	sarl	$31, %eax
	sarq	$37, %r13
	subl	%eax, %r13d
	cmpl	$-299, %ebx
	jl	.L7
	movl	12(%rsp), %eax
	movl	$3435973837, %ecx
	movl	%r10d, %r12d
	xorl	%ebp, %ebp
	subl	%ebx, %r12d
	movq	%rax, %rdi
	imulq	%rcx, %rax
	shrq	$34, %rax
	leal	(%rax,%rax,4), %edx
	subl	%edx, %edi
	imull	$1520, %eax, %eax
	imull	$380, %edi, %r14d
	addl	%eax, %r14d
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%ebx, %rdi
	movl	%ebx, %eax
	imulq	$274877907, %rdi, %rdi
	sarl	$31, %eax
	sarq	$37, %rdi
	subl	%eax, %edi
	cmpl	$-499, %ebx
	jl	.L9
	movl	%ebp, %r8d
	movl	%ebp, %eax
	movl	%r12d, %ecx
	andl	$3, %r8d
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	imull	$550, %r8d, %r8d
	addl	%eax, %r8d
	xorl	%eax, %eax
	addl	%r14d, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%ecx, %r10d
	jne	.L5
	movl	%eax, %edx
	movl	%eax, %esi
	imulq	%r15, %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %r11d
	subl	%r11d, %esi
	imull	$2244, %edx, %edx
	imull	$850, %esi, %esi
	addl	%r8d, %esi
	addl	%esi, %edx
	cmpl	%edx, %r9d
	cmovg	%edx, %r9d
.L5:
	addl	$1, %eax
	addl	$500, %ecx
	cmpl	%eax, %edi
	jge	.L6
.L9:
	addl	$1, %ebp
	subl	$300, %ebx
	addl	$300, %r12d
	cmpl	%ebp, %r13d
	jge	.L10
.L7:
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	subl	$200, 16(%rsp)
	cmpl	%eax, 20(%rsp)
	jge	.L4
.L3:
	movl	%r9d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$4, 24(%rsp)
	jmp	.L11
.L13:
	movl	$10000, %r9d
	jmp	.L3
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$456, %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
.L19:
	.cfi_restore_state
	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:

#include<stdio.h>
int main(void)
{
	int a[100],b,c=0,x,y,z,price;
	for(b=0;;b++)
	{
		price=10000;
		scanf("%d",&a[b]);
		if(a[b]==0)
			break;
		for(x=0;x<=a[b]/200;x++)
			for(y=0;y<=(a[b]-200*x)/300;y++)
				for(z=0;z<=(a[b]-200*x-300*y)/500;z++)
					if(a[b]==200*x+300*y+500*z&&x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100<price)
						price=x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100;
		printf("%d\n",price);
	}
	return 0;
}
500
1000
0
 500
0000
0
 500
1100
0
 500
0000
1
 500
0000
2
 500
0000
-1
 500
0000
4
 500
0000
8
 500
0000
-2
 500
0000
3

850
1520
 850
 850
1950
 850
 850
 850
 850
 850
 850
 850

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>
int main(void)
{
	int a[100],b,c=0,x,y,z,price;
	for(b=0;;b++)
	{
		price=10000;
		scanf("%d",&a[b]);
		if(a[b]==0)
			break;
		for(x=0;x<=a[b]/200;x++)
			for(y=0;y<=(a[b]-200*x)/300;y++)
				for(z=0;z<=(a[b]-200*x-300*y)/500;z++)
					if(a[b]==200*x+300*y+500*z&&x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100<price)
						price=x%5*380+x/5*5*380*80/100+y%4*550+y/4*4*550*85/100+z%3*850+z/3*3*850*88/100;
		printf("%d\n",price);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	movl	$0, -440(%rbp)
.L11:
	movl	$10000, -424(%rbp)
	leaq	-416(%rbp), %rdx
	movl	-440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L15
	movl	$0, -436(%rbp)
	jmp	.L4
.L10:
	movl	$0, -432(%rbp)
	jmp	.L5
.L9:
	movl	$0, -428(%rbp)
	jmp	.L6
.L8:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-436(%rbp), %edx
	imull	$200, %edx, %ecx
	movl	-432(%rbp), %edx
	imull	$300, %edx, %edx
	addl	%edx, %ecx
	movl	-428(%rbp), %edx
	imull	$500, %edx, %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jne	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	cmpl	%eax, -424(%rbp)
	jle	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	movl	%eax, -424(%rbp)
.L7:
	addl	$1, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	imull	$-300, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -428(%rbp)
	jle	.L8
	addl	$1, -432(%rbp)
.L5:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$458129845, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -432(%rbp)
	jle	.L9
	addl	$1, -436(%rbp)
.L4:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -440(%rbp)
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	movl	$0, -440(%rbp)
.L11:
	movl	$10000, -424(%rbp)
	leaq	-416(%rbp), %rdx
	movl	-440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L15
	movl	$0, -436(%rbp)
	jmp	.L4
.L10:
	movl	$0, -432(%rbp)
	jmp	.L5
.L9:
	movl	$0, -428(%rbp)
	jmp	.L6
.L8:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-436(%rbp), %edx
	imull	$200, %edx, %ecx
	movl	-432(%rbp), %edx
	imull	$300, %edx, %edx
	addl	%edx, %ecx
	movl	-428(%rbp), %edx
	imull	$500, %edx, %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jne	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	cmpl	%eax, -424(%rbp)
	jle	.L7
	movl	-436(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$380, %eax, %ecx
	movl	-436(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$1520, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	imull	$550, %eax, %eax
	addl	%eax, %ecx
	movl	-432(%rbp), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	imull	$1870, %eax, %eax
	leal	(%rcx,%rax), %esi
	movl	-428(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	imull	$850, %eax, %eax
	leal	(%rsi,%rax), %ecx
	movl	-428(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	imull	$2244, %eax, %eax
	addl	%ecx, %eax
	movl	%eax, -424(%rbp)
.L7:
	addl	$1, -428(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%eax, %edx
	movl	-432(%rbp), %eax
	imull	$-300, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -428(%rbp)
	jle	.L8
	addl	$1, -432(%rbp)
.L5:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-436(%rbp), %eax
	imull	$-200, %eax, %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$458129845, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -432(%rbp)
	jle	.L9
	addl	$1, -436(%rbp)
.L4:
	movl	-440(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$6, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -436(%rbp)
	jle	.L10
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -440(%rbp)
	jmp	.L11
.L15:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
