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

```c
a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;n<51;n++)for(m[n]=9999,d=5;~d;d--)if((T=n-a[d])>=0&&m[n]>(T=m[T]+b[d]))m[n]=T;for(;scanf("%d",&n),n;)printf("%d\n",m[n/100]);exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %edx
	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
	movl	$1, %ebx
	movl	%ebx, %r13d
	movl	%ebx, %r15d
	movl	%ebx, %r14d
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	20+b(%rip), %eax
	movl	a(%rip), %edi
	movl	8+a(%rip), %r9d
	movl	16+a(%rip), %r11d
	movl	%eax, (%rsp)
	movl	16+b(%rip), %eax
	subl	%edi, %edx
	movl	%edi, %ebp
	movl	12+a(%rip), %r10d
	movl	%edx, 40(%rsp)
	movl	%edx, %ecx
	subl	%r9d, %r13d
	movl	%eax, 4(%rsp)
	movl	12+b(%rip), %eax
	movl	%ebx, %edx
	subl	%r11d, %r15d
	subl	20+a(%rip), %edx
	subl	%r10d, %r14d
	movslq	%r13d, %r13
	movslq	%r15d, %r15
	movl	%eax, 8(%rsp)
	movl	8+b(%rip), %eax
	movslq	%edx, %rsi
	movslq	%r14d, %r14
	movq	%rsi, 24(%rsp)
	movl	4+a(%rip), %r8d
	movl	%eax, 12(%rsp)
	movl	4+b(%rip), %eax
	movq	%r13, 32(%rsp)
	subl	20+a(%rip), %ebp
	movl	%eax, 16(%rsp)
	movl	b(%rip), %eax
	movl	%eax, 20(%rsp)
	leaq	4+m(%rip), %rax
	leaq	200(%rax), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%esi, (%rax)
.L2:
	movl	%edi, %edx
	subl	%r11d, %edx
	addl	%ecx, %edx
	js	.L3
	movl	4(%rsp), %edx
	addl	-4(%rax,%r15,4), %edx
	cmpl	%edx, %esi
	jle	.L3
	movl	%edx, (%rax)
	movl	%edx, %esi
.L3:
	movl	%edi, %edx
	subl	%r10d, %edx
	addl	%ecx, %edx
	js	.L4
	movl	8(%rsp), %edx
	addl	-4(%rax,%r14,4), %edx
	cmpl	%edx, %esi
	jle	.L4
	movl	%edx, (%rax)
	movl	%edx, %esi
.L4:
	movl	%edi, %edx
	subl	%r9d, %edx
	addl	%ecx, %edx
	js	.L5
	movq	32(%rsp), %r13
	movl	12(%rsp), %edx
	addl	-4(%rax,%r13,4), %edx
	cmpl	%edx, %esi
	jle	.L5
	movl	%edx, (%rax)
	movl	%edx, %esi
.L5:
	movl	%edi, %edx
	subl	%r8d, %edx
	addl	%ecx, %edx
	js	.L6
	movl	%ebx, %edx
	movl	16(%rsp), %r13d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L6
	movl	%r13d, (%rax)
	movl	%r13d, %esi
.L6:
	testl	%ecx, %ecx
	js	.L7
	movslq	40(%rsp), %rdx
	movl	20(%rsp), %r13d
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L7
	movl	%r13d, (%rax)
.L7:
	addq	$4, %rax
	addl	$1, %ecx
	cmpq	%rax, %r12
	je	.L16
.L8:
	movl	%ebp, %edx
	movl	$9999, (%rax)
	movl	$9999, %esi
	addl	%ecx, %edx
	js	.L2
	movq	24(%rsp), %rdx
	movl	(%rsp), %esi
	addl	-4(%rax,%rdx,4), %esi
	cmpl	$9998, %esi
	jle	.L17
	movl	$9999, %esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$51, 44(%rsp)
	leaq	44(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	m(%rip), %r13
	leaq	.LC0(%rip), %r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	sarl	$31, %edx
	movq	%r12, %rdi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	cltq
	movl	0(%r13,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jne	.L10
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	b
	.data
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	a
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %edx
	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
	movl	$1, %ebx
	movl	%ebx, %r13d
	movl	%ebx, %r15d
	movl	%ebx, %r14d
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	20+b(%rip), %eax
	movl	a(%rip), %edi
	movl	8+a(%rip), %r9d
	movl	16+a(%rip), %r11d
	movl	%eax, (%rsp)
	movl	16+b(%rip), %eax
	subl	%edi, %edx
	movl	%edi, %ebp
	movl	12+a(%rip), %r10d
	movl	%edx, 40(%rsp)
	movl	%edx, %ecx
	subl	%r9d, %r13d
	movl	%eax, 4(%rsp)
	movl	12+b(%rip), %eax
	movl	%ebx, %edx
	subl	%r11d, %r15d
	subl	20+a(%rip), %edx
	subl	%r10d, %r14d
	movslq	%r13d, %r13
	movslq	%r15d, %r15
	movl	%eax, 8(%rsp)
	movl	8+b(%rip), %eax
	movslq	%edx, %rsi
	movslq	%r14d, %r14
	movq	%rsi, 24(%rsp)
	movl	4+a(%rip), %r8d
	movl	%eax, 12(%rsp)
	movl	4+b(%rip), %eax
	movq	%r13, 32(%rsp)
	subl	20+a(%rip), %ebp
	movl	%eax, 16(%rsp)
	movl	b(%rip), %eax
	movl	%eax, 20(%rsp)
	leaq	4+m(%rip), %rax
	leaq	200(%rax), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%esi, (%rax)
.L2:
	movl	%edi, %edx
	subl	%r11d, %edx
	addl	%ecx, %edx
	js	.L3
	movl	4(%rsp), %edx
	addl	-4(%rax,%r15,4), %edx
	cmpl	%edx, %esi
	jle	.L3
	movl	%edx, (%rax)
	movl	%edx, %esi
.L3:
	movl	%edi, %edx
	subl	%r10d, %edx
	addl	%ecx, %edx
	js	.L4
	movl	8(%rsp), %edx
	addl	-4(%rax,%r14,4), %edx
	cmpl	%edx, %esi
	jle	.L4
	movl	%edx, (%rax)
	movl	%edx, %esi
.L4:
	movl	%edi, %edx
	subl	%r9d, %edx
	addl	%ecx, %edx
	js	.L5
	movq	32(%rsp), %r13
	movl	12(%rsp), %edx
	addl	-4(%rax,%r13,4), %edx
	cmpl	%edx, %esi
	jle	.L5
	movl	%edx, (%rax)
	movl	%edx, %esi
.L5:
	movl	%edi, %edx
	subl	%r8d, %edx
	addl	%ecx, %edx
	js	.L6
	movl	%ebx, %edx
	movl	16(%rsp), %r13d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L6
	movl	%r13d, (%rax)
	movl	%r13d, %esi
.L6:
	testl	%ecx, %ecx
	js	.L7
	movslq	40(%rsp), %rdx
	movl	20(%rsp), %r13d
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L7
	movl	%r13d, (%rax)
.L7:
	addq	$4, %rax
	addl	$1, %ecx
	cmpq	%rax, %r12
	je	.L16
.L8:
	movl	%ebp, %edx
	movl	$9999, (%rax)
	movl	$9999, %esi
	addl	%ecx, %edx
	js	.L2
	movq	24(%rsp), %rdx
	movl	(%rsp), %esi
	addl	-4(%rax,%rdx,4), %esi
	cmpl	$9998, %esi
	jle	.L17
	movl	$9999, %esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$51, 44(%rsp)
	leaq	44(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	m(%rip), %r13
	leaq	.LC0(%rip), %r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	sarl	$31, %edx
	movq	%r12, %rdi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	cltq
	movl	0(%r13,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jne	.L10
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	b
	.data
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	a
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %edx
	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
	movl	$1, %ebx
	movl	%ebx, %r13d
	movl	%ebx, %r15d
	movl	%ebx, %r14d
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	20+b(%rip), %eax
	movl	a(%rip), %edi
	movl	8+a(%rip), %r9d
	movl	16+a(%rip), %r11d
	movl	%eax, (%rsp)
	movl	16+b(%rip), %eax
	subl	%edi, %edx
	movl	%edi, %ebp
	movl	12+a(%rip), %r10d
	movl	%edx, 40(%rsp)
	movl	%edx, %ecx
	subl	%r9d, %r13d
	movl	%eax, 4(%rsp)
	movl	12+b(%rip), %eax
	movl	%ebx, %edx
	subl	%r11d, %r15d
	subl	20+a(%rip), %edx
	subl	%r10d, %r14d
	movslq	%r13d, %r13
	movslq	%r15d, %r15
	movl	%eax, 8(%rsp)
	movl	8+b(%rip), %eax
	movslq	%edx, %rsi
	movslq	%r14d, %r14
	movq	%rsi, 24(%rsp)
	movl	4+a(%rip), %r8d
	movl	%eax, 12(%rsp)
	movl	4+b(%rip), %eax
	movq	%r13, 32(%rsp)
	subl	20+a(%rip), %ebp
	movl	%eax, 16(%rsp)
	movl	b(%rip), %eax
	movl	%eax, 20(%rsp)
	leaq	4+m(%rip), %rax
	leaq	200(%rax), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%esi, (%rax)
.L2:
	movl	%edi, %edx
	subl	%r11d, %edx
	addl	%ecx, %edx
	js	.L3
	movl	4(%rsp), %edx
	addl	-4(%rax,%r15,4), %edx
	cmpl	%edx, %esi
	jle	.L3
	movl	%edx, (%rax)
	movl	%edx, %esi
.L3:
	movl	%edi, %edx
	subl	%r10d, %edx
	addl	%ecx, %edx
	js	.L4
	movl	8(%rsp), %edx
	addl	-4(%rax,%r14,4), %edx
	cmpl	%edx, %esi
	jle	.L4
	movl	%edx, (%rax)
	movl	%edx, %esi
.L4:
	movl	%edi, %edx
	subl	%r9d, %edx
	addl	%ecx, %edx
	js	.L5
	movq	32(%rsp), %r13
	movl	12(%rsp), %edx
	addl	-4(%rax,%r13,4), %edx
	cmpl	%edx, %esi
	jle	.L5
	movl	%edx, (%rax)
	movl	%edx, %esi
.L5:
	movl	%edi, %edx
	subl	%r8d, %edx
	addl	%ecx, %edx
	js	.L6
	movl	%ebx, %edx
	movl	16(%rsp), %r13d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L6
	movl	%r13d, (%rax)
	movl	%r13d, %esi
.L6:
	testl	%ecx, %ecx
	js	.L7
	movslq	40(%rsp), %rdx
	movl	20(%rsp), %r13d
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L7
	movl	%r13d, (%rax)
.L7:
	addq	$4, %rax
	addl	$1, %ecx
	cmpq	%rax, %r12
	je	.L16
.L8:
	movl	%ebp, %edx
	movl	$9999, (%rax)
	movl	$9999, %esi
	addl	%ecx, %edx
	js	.L2
	movq	24(%rsp), %rdx
	movl	(%rsp), %esi
	addl	-4(%rax,%rdx,4), %esi
	cmpl	$9998, %esi
	jle	.L17
	movl	$9999, %esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$51, 44(%rsp)
	leaq	44(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	m(%rip), %r13
	leaq	.LC0(%rip), %r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	sarl	$31, %edx
	movq	%r12, %rdi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	cltq
	movl	0(%r13,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jne	.L10
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	b
	.data
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	a
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.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
a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;n<51;n++)for(m[n]=9999,d=5;~d;d--)if((T=n-a[d])>=0&&m[n]>(T=m[T]+b[d]))m[n]=T;for(;scanf("%d",&n),n;)printf("%d\n",m[n/100]);exit(0);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;n<51;n++)for(m[n]=9999,d=5;~d;d--)if((T=n-a[d])>=0&&m[n]>(T=m[T]+b[d]))m[n]=T;for(;scanf("%d",&n),n;)printf("%d\n",m[n/100]);exit(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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;n<51;n++)for(m[n]=9999,d=5;~d;d--)if((T=n-a[d])>=0&&m[n]>(T=m[T]+b[d]))m[n]=T;for(;scanf("%d",&n),n;)printf("%d\n",m[n/100]);exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %edx
	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
	movl	$1, %ebx
	movl	%ebx, %r13d
	movl	%ebx, %r15d
	movl	%ebx, %r14d
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	20+b(%rip), %eax
	movl	a(%rip), %edi
	movl	8+a(%rip), %r9d
	movl	16+a(%rip), %r11d
	movl	%eax, (%rsp)
	movl	16+b(%rip), %eax
	subl	%edi, %edx
	movl	%edi, %ebp
	movl	12+a(%rip), %r10d
	movl	%edx, 40(%rsp)
	movl	%edx, %ecx
	subl	%r9d, %r13d
	movl	%eax, 4(%rsp)
	movl	12+b(%rip), %eax
	movl	%ebx, %edx
	subl	%r11d, %r15d
	subl	20+a(%rip), %edx
	subl	%r10d, %r14d
	movslq	%r13d, %r13
	movslq	%r15d, %r15
	movl	%eax, 8(%rsp)
	movl	8+b(%rip), %eax
	movslq	%edx, %rsi
	movslq	%r14d, %r14
	movq	%rsi, 24(%rsp)
	movl	4+a(%rip), %r8d
	movl	%eax, 12(%rsp)
	movl	4+b(%rip), %eax
	movq	%r13, 32(%rsp)
	subl	20+a(%rip), %ebp
	movl	%eax, 16(%rsp)
	movl	b(%rip), %eax
	movl	%eax, 20(%rsp)
	leaq	4+m(%rip), %rax
	leaq	200(%rax), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%esi, (%rax)
.L2:
	movl	%edi, %edx
	subl	%r11d, %edx
	addl	%ecx, %edx
	js	.L3
	movl	4(%rsp), %edx
	addl	-4(%rax,%r15,4), %edx
	cmpl	%edx, %esi
	jle	.L3
	movl	%edx, (%rax)
	movl	%edx, %esi
.L3:
	movl	%edi, %edx
	subl	%r10d, %edx
	addl	%ecx, %edx
	js	.L4
	movl	8(%rsp), %edx
	addl	-4(%rax,%r14,4), %edx
	cmpl	%edx, %esi
	jle	.L4
	movl	%edx, (%rax)
	movl	%edx, %esi
.L4:
	movl	%edi, %edx
	subl	%r9d, %edx
	addl	%ecx, %edx
	js	.L5
	movq	32(%rsp), %r13
	movl	12(%rsp), %edx
	addl	-4(%rax,%r13,4), %edx
	cmpl	%edx, %esi
	jle	.L5
	movl	%edx, (%rax)
	movl	%edx, %esi
.L5:
	movl	%edi, %edx
	subl	%r8d, %edx
	addl	%ecx, %edx
	js	.L6
	movl	%ebx, %edx
	movl	16(%rsp), %r13d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L6
	movl	%r13d, (%rax)
	movl	%r13d, %esi
.L6:
	testl	%ecx, %ecx
	js	.L7
	movslq	40(%rsp), %rdx
	movl	20(%rsp), %r13d
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L7
	movl	%r13d, (%rax)
.L7:
	addq	$4, %rax
	addl	$1, %ecx
	cmpq	%rax, %r12
	je	.L16
.L8:
	movl	%ebp, %edx
	movl	$9999, (%rax)
	movl	$9999, %esi
	addl	%ecx, %edx
	js	.L2
	movq	24(%rsp), %rdx
	movl	(%rsp), %esi
	addl	-4(%rax,%rdx,4), %esi
	cmpl	$9998, %esi
	jle	.L17
	movl	$9999, %esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$51, 44(%rsp)
	leaq	44(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	m(%rip), %r13
	leaq	.LC0(%rip), %r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	sarl	$31, %edx
	movq	%r12, %rdi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	cltq
	movl	0(%r13,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jne	.L10
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	b
	.data
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	a
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1, %edx
	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
	movl	$1, %ebx
	movl	%ebx, %r13d
	movl	%ebx, %r15d
	movl	%ebx, %r14d
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	20+b(%rip), %eax
	movl	a(%rip), %edi
	movl	8+a(%rip), %r9d
	movl	16+a(%rip), %r11d
	movl	%eax, (%rsp)
	movl	16+b(%rip), %eax
	subl	%edi, %edx
	movl	%edi, %ebp
	movl	12+a(%rip), %r10d
	movl	%edx, 40(%rsp)
	movl	%edx, %ecx
	subl	%r9d, %r13d
	movl	%eax, 4(%rsp)
	movl	12+b(%rip), %eax
	movl	%ebx, %edx
	subl	%r11d, %r15d
	subl	20+a(%rip), %edx
	subl	%r10d, %r14d
	movslq	%r13d, %r13
	movslq	%r15d, %r15
	movl	%eax, 8(%rsp)
	movl	8+b(%rip), %eax
	movslq	%edx, %rsi
	movslq	%r14d, %r14
	movq	%rsi, 24(%rsp)
	movl	4+a(%rip), %r8d
	movl	%eax, 12(%rsp)
	movl	4+b(%rip), %eax
	movq	%r13, 32(%rsp)
	subl	20+a(%rip), %ebp
	movl	%eax, 16(%rsp)
	movl	b(%rip), %eax
	movl	%eax, 20(%rsp)
	leaq	4+m(%rip), %rax
	leaq	200(%rax), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%esi, (%rax)
.L2:
	movl	%edi, %edx
	subl	%r11d, %edx
	addl	%ecx, %edx
	js	.L3
	movl	4(%rsp), %edx
	addl	-4(%rax,%r15,4), %edx
	cmpl	%edx, %esi
	jle	.L3
	movl	%edx, (%rax)
	movl	%edx, %esi
.L3:
	movl	%edi, %edx
	subl	%r10d, %edx
	addl	%ecx, %edx
	js	.L4
	movl	8(%rsp), %edx
	addl	-4(%rax,%r14,4), %edx
	cmpl	%edx, %esi
	jle	.L4
	movl	%edx, (%rax)
	movl	%edx, %esi
.L4:
	movl	%edi, %edx
	subl	%r9d, %edx
	addl	%ecx, %edx
	js	.L5
	movq	32(%rsp), %r13
	movl	12(%rsp), %edx
	addl	-4(%rax,%r13,4), %edx
	cmpl	%edx, %esi
	jle	.L5
	movl	%edx, (%rax)
	movl	%edx, %esi
.L5:
	movl	%edi, %edx
	subl	%r8d, %edx
	addl	%ecx, %edx
	js	.L6
	movl	%ebx, %edx
	movl	16(%rsp), %r13d
	subl	%r8d, %edx
	movslq	%edx, %rdx
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L6
	movl	%r13d, (%rax)
	movl	%r13d, %esi
.L6:
	testl	%ecx, %ecx
	js	.L7
	movslq	40(%rsp), %rdx
	movl	20(%rsp), %r13d
	addl	-4(%rax,%rdx,4), %r13d
	cmpl	%r13d, %esi
	jle	.L7
	movl	%r13d, (%rax)
.L7:
	addq	$4, %rax
	addl	$1, %ecx
	cmpq	%rax, %r12
	je	.L16
.L8:
	movl	%ebp, %edx
	movl	$9999, (%rax)
	movl	$9999, %esi
	addl	%ecx, %edx
	js	.L2
	movq	24(%rsp), %rdx
	movl	(%rsp), %esi
	addl	-4(%rax,%rdx,4), %esi
	cmpl	$9998, %esi
	jle	.L17
	movl	$9999, %esi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$51, 44(%rsp)
	leaq	44(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	m(%rip), %r13
	leaq	.LC0(%rip), %r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edx, %rax
	sarl	$31, %edx
	movq	%r12, %rdi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	cltq
	movl	0(%r13,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %edx
	testl	%edx, %edx
	jne	.L10
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	b
	.data
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	a
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.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:
```