Given the following C code and unoptimized 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]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	C
	.bss
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	testl	%eax, %eax
	js	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cmpl	$1, %eax
	je	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L4
	movl	-20(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	$2, -4(%rbp)
	jmp	.L7
.L8:
	movl	$9999, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$380, %ecx
	movl	$2, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$550, %ecx
	movl	$3, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$850, %ecx
	movl	$5, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1520, %ecx
	movl	$10, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1870, %ecx
	movl	$12, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$2244, %ecx
	movl	$15, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	C(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L8
	jmp	.L9
.L11:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	je	.L9
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L9:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.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
	.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[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]);
}
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 unoptimized 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]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	C
	.bss
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	testl	%eax, %eax
	js	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cmpl	$1, %eax
	je	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L4
	movl	-20(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	$2, -4(%rbp)
	jmp	.L7
.L8:
	movl	$9999, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$380, %ecx
	movl	$2, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$550, %ecx
	movl	$3, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$850, %ecx
	movl	$5, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1520, %ecx
	movl	$10, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1870, %ecx
	movl	$12, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$2244, %ecx
	movl	$15, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	C(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L8
	jmp	.L9
.L11:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	je	.L9
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L9:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	C
	.bss
	.align 32
	.type	C, @object
	.size	C, 204
C:
	.zero	204
	.text
	.globl	D
	.type	D, @function
D:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	testl	%eax, %eax
	js	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cmpl	$1, %eax
	je	.L3
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L4
	movl	-20(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	D, .-D
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	$2, -4(%rbp)
	jmp	.L7
.L8:
	movl	$9999, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$380, %ecx
	movl	$2, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$550, %ecx
	movl	$3, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$850, %ecx
	movl	$5, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1520, %ecx
	movl	$10, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$1870, %ecx
	movl	$12, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	$2244, %ecx
	movl	$15, %edx
	movl	%eax, %edi
	movl	$0, %eax
	call	D
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	C(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L8
	jmp	.L9
.L11:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	je	.L9
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L9:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
