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

```c
C[51];
#define min(a,b) ((a)<(b)?(a):(b))
D(c,m,u,p){
	int i;
	for(i=u;i<=u;i++)
		if(m-i>=0&&m-i!=1)c=min(c,C[m-i]+p);
	return c;
}
main(i,c){
	for(i=2;i<=50;i++){
		c=9999;
		c=D(c,i,2,380);
		c=D(c,i,3,550);
		c=D(c,i,5,850);
		c=D(c,i,2*5,380*5*(100-20)/100);
		c=D(c,i,3*4,550*4*(100-15)/100);
		c=D(c,i,5*3,850*3*(100-12)/100);
		C[i]=c;
	}
	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	%edi, %eax
	subl	%edx, %esi
	js	.L2
	cmpl	$1, %esi
	je	.L2
	movslq	%esi, %rsi
	leaq	C(%rip), %rdx
	addl	(%rdx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	cmovg	%ecx, %eax
.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, %r11d
	movl	$-3, %r10d
	xorl	%esi, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-8, %r9d
	movl	$-10, %r8d
	movl	$-13, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	C(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	movl	-52(%rdx), %ebx
	leal	2244(%rbx), %ecx
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	movl	%ecx, 8(%rdx)
.L39:
	addl	$1, %esi
	addq	$4, %rdx
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	addl	$1, %r10d
	addl	$1, %r11d
	cmpl	$49, %esi
	je	.L40
.L8:
	movl	$9999, %eax
	cmpl	$1, %esi
	je	.L12
	movl	(%rdx), %eax
	movl	$9999, %ecx
	addl	$380, %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L12:
	testl	%r11d, %r11d
	js	.L11
	cmpl	$1, %r11d
	je	.L11
	movl	-4(%rdx), %ebx
	leal	550(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L11:
	testl	%r10d, %r10d
	js	.L15
	cmpl	$1, %r10d
	je	.L15
	movl	-12(%rdx), %ebx
	leal	850(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L15:
	testl	%r9d, %r9d
	js	.L18
	cmpl	$1, %r9d
	je	.L18
	movl	-32(%rdx), %ebx
	leal	1520(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L18:
	testl	%r8d, %r8d
	js	.L21
	cmpl	$1, %r8d
	je	.L21
	movl	-40(%rdx), %ebx
	leal	1870(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L21:
	cmpl	$1, %edi
	je	.L24
	testl	%edi, %edi
	jns	.L22
.L24:
	movl	%eax, 8(%rdx)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r13
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L41
.L28:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L29
	addq	$24, %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
.L41:
	.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	0(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	C
	.bss
	.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	%edi, %eax
	subl	%edx, %esi
	js	.L2
	cmpl	$1, %esi
	je	.L2
	movslq	%esi, %rsi
	leaq	C(%rip), %rdx
	addl	(%rdx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	cmovg	%ecx, %eax
.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, %r11d
	movl	$-3, %r10d
	xorl	%esi, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-8, %r9d
	movl	$-10, %r8d
	movl	$-13, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	C(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	movl	-52(%rdx), %ebx
	leal	2244(%rbx), %ecx
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	movl	%ecx, 8(%rdx)
.L39:
	addl	$1, %esi
	addq	$4, %rdx
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	addl	$1, %r10d
	addl	$1, %r11d
	cmpl	$49, %esi
	je	.L40
.L8:
	movl	$9999, %eax
	cmpl	$1, %esi
	je	.L12
	movl	(%rdx), %eax
	movl	$9999, %ecx
	addl	$380, %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L12:
	testl	%r11d, %r11d
	js	.L11
	cmpl	$1, %r11d
	je	.L11
	movl	-4(%rdx), %ebx
	leal	550(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L11:
	testl	%r10d, %r10d
	js	.L15
	cmpl	$1, %r10d
	je	.L15
	movl	-12(%rdx), %ebx
	leal	850(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L15:
	testl	%r9d, %r9d
	js	.L18
	cmpl	$1, %r9d
	je	.L18
	movl	-32(%rdx), %ebx
	leal	1520(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L18:
	testl	%r8d, %r8d
	js	.L21
	cmpl	$1, %r8d
	je	.L21
	movl	-40(%rdx), %ebx
	leal	1870(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L21:
	cmpl	$1, %edi
	je	.L24
	testl	%edi, %edi
	jns	.L22
.L24:
	movl	%eax, 8(%rdx)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r13
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L41
.L28:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L29
	addq	$24, %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
.L41:
	.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	0(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	C
	.bss
	.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	%edi, %eax
	subl	%edx, %esi
	js	.L2
	cmpl	$1, %esi
	je	.L2
	movslq	%esi, %rsi
	leaq	C(%rip), %rdx
	addl	(%rdx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	cmovg	%ecx, %eax
.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, %r11d
	movl	$-3, %r10d
	xorl	%esi, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-8, %r9d
	movl	$-10, %r8d
	movl	$-13, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	C(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	movl	-52(%rdx), %ebx
	leal	2244(%rbx), %ecx
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	movl	%ecx, 8(%rdx)
.L39:
	addl	$1, %esi
	addq	$4, %rdx
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	addl	$1, %r10d
	addl	$1, %r11d
	cmpl	$49, %esi
	je	.L40
.L8:
	movl	$9999, %eax
	cmpl	$1, %esi
	je	.L12
	movl	(%rdx), %eax
	movl	$9999, %ecx
	addl	$380, %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L12:
	testl	%r11d, %r11d
	js	.L11
	cmpl	$1, %r11d
	je	.L11
	movl	-4(%rdx), %ebx
	leal	550(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L11:
	testl	%r10d, %r10d
	js	.L15
	cmpl	$1, %r10d
	je	.L15
	movl	-12(%rdx), %ebx
	leal	850(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L15:
	testl	%r9d, %r9d
	js	.L18
	cmpl	$1, %r9d
	je	.L18
	movl	-32(%rdx), %ebx
	leal	1520(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L18:
	testl	%r8d, %r8d
	js	.L21
	cmpl	$1, %r8d
	je	.L21
	movl	-40(%rdx), %ebx
	leal	1870(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L21:
	cmpl	$1, %edi
	je	.L24
	testl	%edi, %edi
	jns	.L22
.L24:
	movl	%eax, 8(%rdx)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r13
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L41
.L28:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L29
	addq	$24, %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
.L41:
	.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	0(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	C
	.bss
	.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];
#define min(a,b) ((a)<(b)?(a):(b))
D(c,m,u,p){
	int i;
	for(i=u;i<=u;i++)
		if(m-i>=0&&m-i!=1)c=min(c,C[m-i]+p);
	return c;
}
main(i,c){
	for(i=2;i<=50;i++){
		c=9999;
		c=D(c,i,2,380);
		c=D(c,i,3,550);
		c=D(c,i,5,850);
		c=D(c,i,2*5,380*5*(100-20)/100);
		c=D(c,i,3*4,550*4*(100-15)/100);
		c=D(c,i,5*3,850*3*(100-12)/100);
		C[i]=c;
	}
	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];
#define min(a,b) ((a)<(b)?(a):(b))
D(c,m,u,p){
	int i;
	for(i=u;i<=u;i++)
		if(m-i>=0&&m-i!=1)c=min(c,C[m-i]+p);
	return c;
}
main(i,c){
	for(i=2;i<=50;i++){
		c=9999;
		c=D(c,i,2,380);
		c=D(c,i,3,550);
		c=D(c,i,5,850);
		c=D(c,i,2*5,380*5*(100-20)/100);
		c=D(c,i,3*4,550*4*(100-15)/100);
		c=D(c,i,5*3,850*3*(100-12)/100);
		C[i]=c;
	}
	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];
#define min(a,b) ((a)<(b)?(a):(b))
D(c,m,u,p){
	int i;
	for(i=u;i<=u;i++)
		if(m-i>=0&&m-i!=1)c=min(c,C[m-i]+p);
	return c;
}
main(i,c){
	for(i=2;i<=50;i++){
		c=9999;
		c=D(c,i,2,380);
		c=D(c,i,3,550);
		c=D(c,i,5,850);
		c=D(c,i,2*5,380*5*(100-20)/100);
		c=D(c,i,3*4,550*4*(100-15)/100);
		c=D(c,i,5*3,850*3*(100-12)/100);
		C[i]=c;
	}
	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	%edi, %eax
	subl	%edx, %esi
	js	.L2
	cmpl	$1, %esi
	je	.L2
	movslq	%esi, %rsi
	leaq	C(%rip), %rdx
	addl	(%rdx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	cmovg	%ecx, %eax
.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, %r11d
	movl	$-3, %r10d
	xorl	%esi, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-8, %r9d
	movl	$-10, %r8d
	movl	$-13, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	C(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	movl	-52(%rdx), %ebx
	leal	2244(%rbx), %ecx
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	movl	%ecx, 8(%rdx)
.L39:
	addl	$1, %esi
	addq	$4, %rdx
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	addl	$1, %r10d
	addl	$1, %r11d
	cmpl	$49, %esi
	je	.L40
.L8:
	movl	$9999, %eax
	cmpl	$1, %esi
	je	.L12
	movl	(%rdx), %eax
	movl	$9999, %ecx
	addl	$380, %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L12:
	testl	%r11d, %r11d
	js	.L11
	cmpl	$1, %r11d
	je	.L11
	movl	-4(%rdx), %ebx
	leal	550(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L11:
	testl	%r10d, %r10d
	js	.L15
	cmpl	$1, %r10d
	je	.L15
	movl	-12(%rdx), %ebx
	leal	850(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L15:
	testl	%r9d, %r9d
	js	.L18
	cmpl	$1, %r9d
	je	.L18
	movl	-32(%rdx), %ebx
	leal	1520(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L18:
	testl	%r8d, %r8d
	js	.L21
	cmpl	$1, %r8d
	je	.L21
	movl	-40(%rdx), %ebx
	leal	1870(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L21:
	cmpl	$1, %edi
	je	.L24
	testl	%edi, %edi
	jns	.L22
.L24:
	movl	%eax, 8(%rdx)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r13
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L41
.L28:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L29
	addq	$24, %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
.L41:
	.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	0(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	C
	.bss
	.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	%edi, %eax
	subl	%edx, %esi
	js	.L2
	cmpl	$1, %esi
	je	.L2
	movslq	%esi, %rsi
	leaq	C(%rip), %rdx
	addl	(%rdx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	cmovg	%ecx, %eax
.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, %r11d
	movl	$-3, %r10d
	xorl	%esi, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$-8, %r9d
	movl	$-10, %r8d
	movl	$-13, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	C(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	movl	-52(%rdx), %ebx
	leal	2244(%rbx), %ecx
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	movl	%ecx, 8(%rdx)
.L39:
	addl	$1, %esi
	addq	$4, %rdx
	addl	$1, %edi
	addl	$1, %r8d
	addl	$1, %r9d
	addl	$1, %r10d
	addl	$1, %r11d
	cmpl	$49, %esi
	je	.L40
.L8:
	movl	$9999, %eax
	cmpl	$1, %esi
	je	.L12
	movl	(%rdx), %eax
	movl	$9999, %ecx
	addl	$380, %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L12:
	testl	%r11d, %r11d
	js	.L11
	cmpl	$1, %r11d
	je	.L11
	movl	-4(%rdx), %ebx
	leal	550(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L11:
	testl	%r10d, %r10d
	js	.L15
	cmpl	$1, %r10d
	je	.L15
	movl	-12(%rdx), %ebx
	leal	850(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L15:
	testl	%r9d, %r9d
	js	.L18
	cmpl	$1, %r9d
	je	.L18
	movl	-32(%rdx), %ebx
	leal	1520(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L18:
	testl	%r8d, %r8d
	js	.L21
	cmpl	$1, %r8d
	je	.L21
	movl	-40(%rdx), %ebx
	leal	1870(%rbx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
.L21:
	cmpl	$1, %edi
	je	.L24
	testl	%edi, %edi
	jns	.L22
.L24:
	movl	%eax, 8(%rdx)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r13
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L41
.L28:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L29
	addq	$24, %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
.L41:
	.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	0(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L28
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	C
	.bss
	.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:
```