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

```c
C[51];c,i;D(u,p){i>=u&&i-u-1&&(p+=C[i-u])<c?c=p:0;}main(){for(i=1;++i<51;C[i]=c){c=9999;D(2,380);D(3,550);D(5,850);D(10,1520);D(12,1870);D(15,2244);}for(;~scanf("%d",&i);)i&&printf("%d\n",C[i/100]);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	movl	i(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	subl	%edi, %eax
	cmpl	$1, %eax
	je	.L2
	cltq
	leaq	C(%rip), %rdx
	addl	(%rdx,%rax,4), %esi
	cmpl	%esi, c(%rip)
	jle	.L2
	movl	%esi, c(%rip)
.L2:
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.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:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$-1, %r9d
	movl	$-3, %r8d
	movl	$-8, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-10, %esi
	movl	$-13, %ecx
	movl	$2, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	-8(%rbx), %r11
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%r11,%rax,4), %edx
	movl	$9999, %r10d
	addl	$380, %edx
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
	cmpq	$2, %rax
	je	.L10
	cmpl	$1, %r9d
	je	.L36
.L11:
	movslq	%r9d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$550, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L10:
	cmpq	$4, %rax
	jbe	.L12
	cmpl	$1, %r8d
	je	.L37
.L13:
	movslq	%r8d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$850, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L12:
	cmpq	$9, %rax
	jbe	.L14
	cmpl	$1, %edi
	je	.L38
.L15:
	movslq	%edi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1520, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L14:
	cmpq	$11, %rax
	jbe	.L16
	cmpl	$1, %esi
	je	.L39
.L17:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1870, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L16:
	cmpq	$14, %rax
	jbe	.L18
	cmpl	$1, %ecx
	je	.L18
.L19:
	movslq	%ecx, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$2244, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L18:
	movl	%edx, (%rbx,%rax,4)
	addq	$1, %rax
	addl	$1, %ecx
	addl	$1, %esi
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	cmpq	$51, %rax
	je	.L40
.L20:
	cmpq	$3, %rax
	jne	.L41
	movl	$9999, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	cmpl	$14, %eax
	jle	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	cmpl	$11, %eax
	jle	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	cmpl	$4, %eax
	jle	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%edx, c(%rip)
	leaq	i(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movl	$51, i(%rip)
	leaq	.LC0(%rip), %r13
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L42
.L22:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	movslq	%eax, %rdx
	sarl	$31, %eax
	movq	%r13, %rdi
	imulq	$1374389535, %rdx, %rdx
	sarq	$37, %rdx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L22
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.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
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	movl	i(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	subl	%edi, %eax
	cmpl	$1, %eax
	je	.L2
	cltq
	leaq	C(%rip), %rdx
	addl	(%rdx,%rax,4), %esi
	cmpl	%esi, c(%rip)
	jle	.L2
	movl	%esi, c(%rip)
.L2:
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.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:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$-1, %r9d
	movl	$-3, %r8d
	movl	$-8, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-10, %esi
	movl	$-13, %ecx
	movl	$2, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	-8(%rbx), %r11
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%r11,%rax,4), %edx
	movl	$9999, %r10d
	addl	$380, %edx
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
	cmpq	$2, %rax
	je	.L10
	cmpl	$1, %r9d
	je	.L36
.L11:
	movslq	%r9d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$550, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L10:
	cmpq	$4, %rax
	jbe	.L12
	cmpl	$1, %r8d
	je	.L37
.L13:
	movslq	%r8d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$850, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L12:
	cmpq	$9, %rax
	jbe	.L14
	cmpl	$1, %edi
	je	.L38
.L15:
	movslq	%edi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1520, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L14:
	cmpq	$11, %rax
	jbe	.L16
	cmpl	$1, %esi
	je	.L39
.L17:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1870, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L16:
	cmpq	$14, %rax
	jbe	.L18
	cmpl	$1, %ecx
	je	.L18
.L19:
	movslq	%ecx, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$2244, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L18:
	movl	%edx, (%rbx,%rax,4)
	addq	$1, %rax
	addl	$1, %ecx
	addl	$1, %esi
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	cmpq	$51, %rax
	je	.L40
.L20:
	cmpq	$3, %rax
	jne	.L41
	movl	$9999, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	cmpl	$14, %eax
	jle	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	cmpl	$11, %eax
	jle	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	cmpl	$4, %eax
	jle	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%edx, c(%rip)
	leaq	i(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movl	$51, i(%rip)
	leaq	.LC0(%rip), %r13
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L42
.L22:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	movslq	%eax, %rdx
	sarl	$31, %eax
	movq	%r13, %rdi
	imulq	$1374389535, %rdx, %rdx
	sarq	$37, %rdx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L22
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.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
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	movl	i(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	subl	%edi, %eax
	cmpl	$1, %eax
	je	.L2
	cltq
	leaq	C(%rip), %rdx
	addl	(%rdx,%rax,4), %esi
	cmpl	%esi, c(%rip)
	jle	.L2
	movl	%esi, c(%rip)
.L2:
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.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:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$-1, %r9d
	movl	$-3, %r8d
	movl	$-8, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-10, %esi
	movl	$-13, %ecx
	movl	$2, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	-8(%rbx), %r11
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%r11,%rax,4), %edx
	movl	$9999, %r10d
	addl	$380, %edx
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
	cmpq	$2, %rax
	je	.L10
	cmpl	$1, %r9d
	je	.L36
.L11:
	movslq	%r9d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$550, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L10:
	cmpq	$4, %rax
	jbe	.L12
	cmpl	$1, %r8d
	je	.L37
.L13:
	movslq	%r8d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$850, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L12:
	cmpq	$9, %rax
	jbe	.L14
	cmpl	$1, %edi
	je	.L38
.L15:
	movslq	%edi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1520, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L14:
	cmpq	$11, %rax
	jbe	.L16
	cmpl	$1, %esi
	je	.L39
.L17:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1870, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L16:
	cmpq	$14, %rax
	jbe	.L18
	cmpl	$1, %ecx
	je	.L18
.L19:
	movslq	%ecx, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$2244, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L18:
	movl	%edx, (%rbx,%rax,4)
	addq	$1, %rax
	addl	$1, %ecx
	addl	$1, %esi
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	cmpq	$51, %rax
	je	.L40
.L20:
	cmpq	$3, %rax
	jne	.L41
	movl	$9999, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	cmpl	$14, %eax
	jle	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	cmpl	$11, %eax
	jle	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	cmpl	$4, %eax
	jle	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%edx, c(%rip)
	leaq	i(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movl	$51, i(%rip)
	leaq	.LC0(%rip), %r13
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L42
.L22:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	movslq	%eax, %rdx
	sarl	$31, %eax
	movq	%r13, %rdi
	imulq	$1374389535, %rdx, %rdx
	sarq	$37, %rdx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L22
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.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
C[51];c,i;D(u,p){i>=u&&i-u-1&&(p+=C[i-u])<c?c=p:0;}main(){for(i=1;++i<51;C[i]=c){c=9999;D(2,380);D(3,550);D(5,850);D(10,1520);D(12,1870);D(15,2244);}for(;~scanf("%d",&i);)i&&printf("%d\n",C[i/100]);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
C[51];c,i;D(u,p){i>=u&&i-u-1&&(p+=C[i-u])<c?c=p:0;}main(){for(i=1;++i<51;C[i]=c){c=9999;D(2,380);D(3,550);D(5,850);D(10,1520);D(12,1870);D(15,2244);}for(;~scanf("%d",&i);)i&&printf("%d\n",C[i/100]);}```

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
0
 850
0
 850
0
 850
0
 850
0
 850
0
 850
0

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

```c
C[51];c,i;D(u,p){i>=u&&i-u-1&&(p+=C[i-u])<c?c=p:0;}main(){for(i=1;++i<51;C[i]=c){c=9999;D(2,380);D(3,550);D(5,850);D(10,1520);D(12,1870);D(15,2244);}for(;~scanf("%d",&i);)i&&printf("%d\n",C[i/100]);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	movl	i(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	subl	%edi, %eax
	cmpl	$1, %eax
	je	.L2
	cltq
	leaq	C(%rip), %rdx
	addl	(%rdx,%rax,4), %esi
	cmpl	%esi, c(%rip)
	jle	.L2
	movl	%esi, c(%rip)
.L2:
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.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:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$-1, %r9d
	movl	$-3, %r8d
	movl	$-8, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-10, %esi
	movl	$-13, %ecx
	movl	$2, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	-8(%rbx), %r11
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%r11,%rax,4), %edx
	movl	$9999, %r10d
	addl	$380, %edx
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
	cmpq	$2, %rax
	je	.L10
	cmpl	$1, %r9d
	je	.L36
.L11:
	movslq	%r9d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$550, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L10:
	cmpq	$4, %rax
	jbe	.L12
	cmpl	$1, %r8d
	je	.L37
.L13:
	movslq	%r8d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$850, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L12:
	cmpq	$9, %rax
	jbe	.L14
	cmpl	$1, %edi
	je	.L38
.L15:
	movslq	%edi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1520, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L14:
	cmpq	$11, %rax
	jbe	.L16
	cmpl	$1, %esi
	je	.L39
.L17:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1870, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L16:
	cmpq	$14, %rax
	jbe	.L18
	cmpl	$1, %ecx
	je	.L18
.L19:
	movslq	%ecx, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$2244, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L18:
	movl	%edx, (%rbx,%rax,4)
	addq	$1, %rax
	addl	$1, %ecx
	addl	$1, %esi
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	cmpq	$51, %rax
	je	.L40
.L20:
	cmpq	$3, %rax
	jne	.L41
	movl	$9999, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	cmpl	$14, %eax
	jle	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	cmpl	$11, %eax
	jle	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	cmpl	$4, %eax
	jle	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%edx, c(%rip)
	leaq	i(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movl	$51, i(%rip)
	leaq	.LC0(%rip), %r13
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L42
.L22:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	movslq	%eax, %rdx
	sarl	$31, %eax
	movq	%r13, %rdi
	imulq	$1374389535, %rdx, %rdx
	sarq	$37, %rdx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L22
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.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
	.p2align 4
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	movl	i(%rip), %eax
	cmpl	%edi, %eax
	jl	.L2
	subl	%edi, %eax
	cmpl	$1, %eax
	je	.L2
	cltq
	leaq	C(%rip), %rdx
	addl	(%rdx,%rax,4), %esi
	cmpl	%esi, c(%rip)
	jle	.L2
	movl	%esi, c(%rip)
.L2:
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.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:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$-1, %r9d
	movl	$-3, %r8d
	movl	$-8, %edi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-10, %esi
	movl	$-13, %ecx
	movl	$2, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	C(%rip), %rbx
	leaq	-8(%rbx), %r11
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%r11,%rax,4), %edx
	movl	$9999, %r10d
	addl	$380, %edx
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
	cmpq	$2, %rax
	je	.L10
	cmpl	$1, %r9d
	je	.L36
.L11:
	movslq	%r9d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$550, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L10:
	cmpq	$4, %rax
	jbe	.L12
	cmpl	$1, %r8d
	je	.L37
.L13:
	movslq	%r8d, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$850, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L12:
	cmpq	$9, %rax
	jbe	.L14
	cmpl	$1, %edi
	je	.L38
.L15:
	movslq	%edi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1520, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L14:
	cmpq	$11, %rax
	jbe	.L16
	cmpl	$1, %esi
	je	.L39
.L17:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$1870, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L16:
	cmpq	$14, %rax
	jbe	.L18
	cmpl	$1, %ecx
	je	.L18
.L19:
	movslq	%ecx, %r10
	movl	(%rbx,%r10,4), %r10d
	addl	$2244, %r10d
	cmpl	%r10d, %edx
	cmovg	%r10d, %edx
.L18:
	movl	%edx, (%rbx,%rax,4)
	addq	$1, %rax
	addl	$1, %ecx
	addl	$1, %esi
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	cmpq	$51, %rax
	je	.L40
.L20:
	cmpq	$3, %rax
	jne	.L41
	movl	$9999, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	cmpl	$14, %eax
	jle	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	cmpl	$11, %eax
	jle	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	cmpl	$4, %eax
	jle	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%edx, c(%rip)
	leaq	i(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movl	$51, i(%rip)
	leaq	.LC0(%rip), %r13
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L42
.L22:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L23
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	movslq	%eax, %rdx
	sarl	$31, %eax
	movq	%r13, %rdi
	imulq	$1374389535, %rdx, %rdx
	sarq	$37, %rdx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L22
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.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:
```