Given the following C code and unoptimized 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],T;
int s(p,n){
	int d=5;
	if(m[n]>9998)for(;~d;d--)if(a[d]<=n){
		T=s(p,n-a[d])+b[d];
		if(m[n]>T)m[n]=T;
	}
	return m[n];
}

main(n){
	for(n=1;n<51;n++)m[n]=9999;
	for(;scanf("%d",&n),n;)printf("%d\n",s(m,n/100));
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.globl	b
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	s
	.type	s, @function
s:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$5, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$9998, %eax
	jle	.L2
	jmp	.L3
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	s
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, T(%rip)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	T(%rip), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L4:
	subl	$1, -4(%rbp)
.L3:
	cmpl	$-1, -4(%rbp)
	jne	.L5
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	s, .-s
	.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	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$9999, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L9
	jmp	.L10
.L11:
	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
	movl	%eax, %esi
	leaq	m(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	s
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %edi
	call	exit@PLT
	.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	s
	.type	s, @function
s:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	leaq	m(%rip), %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %rcx
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%rax, 24(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L1
	movl	%ecx, 4(%rsp)
	movl	$20, %r8d
	leaq	a(%rip), %r9
	leaq	b(%rip), %r10
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L70
.L58:
	movl	(%r9,%r8), %eax
	cmpl	4(%rsp), %eax
	jg	.L4
	movl	4(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rax
	movq	%rax, 32(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L5
	movl	$20, %ecx
	movq	%r8, 72(%rsp)
	movl	%edx, 8(%rsp)
	movq	%rcx, %r8
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L7:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L71
.L56:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 8(%rsp)
	jl	.L7
	movl	8(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rax
	movq	%rax, 40(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L8
	movl	$20, %ecx
	movl	%edx, 12(%rsp)
	movq	%r8, 80(%rsp)
	movq	%rcx, %r14
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L10:
	subq	$4, %r14
	cmpq	$-4, %r14
	je	.L72
.L54:
	movl	(%r9,%r14), %eax
	cmpl	%eax, 12(%rsp)
	jl	.L10
	movl	12(%rsp), %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	movq	%rax, 48(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L11
	movl	%ecx, 16(%rsp)
	movl	$20, %r8d
	movq	%r14, 88(%rsp)
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L13:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L73
.L52:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 16(%rsp)
	jl	.L13
	movl	16(%rsp), %r13d
	subl	%eax, %r13d
	movslq	%r13d, %rax
	movq	%rax, 56(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L14
	movl	$20, %ecx
	movq	%r8, 96(%rsp)
	movl	%r13d, 20(%rsp)
	movq	%rcx, %r8
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L16:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L74
.L50:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 20(%rsp)
	jl	.L16
	movl	20(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rcx
	movl	(%r11,%rcx,4), %eax
	cmpl	$9998, %eax
	jle	.L17
	movq	%r8, 104(%rsp)
	movl	$20, %ebx
	movl	%edx, %r8d
	movq	%rcx, 64(%rsp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L19:
	subq	$4, %rbx
	cmpq	$-4, %rbx
	je	.L75
.L48:
	movl	(%r9,%rbx), %eax
	cmpl	%eax, %r8d
	jl	.L19
	movl	%r8d, %r14d
	subl	%eax, %r14d
	movslq	%r14d, %rdx
	movl	(%r11,%rdx,4), %eax
	cmpl	$9998, %eax
	jle	.L20
	movq	%rbx, 112(%rsp)
	movl	$20, %ebp
	movl	%edi, %ebx
	movl	%r8d, 120(%rsp)
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$4, %rbp
	cmpq	$-4, %rbp
	je	.L76
.L46:
	movl	(%r9,%rbp), %eax
	cmpl	%eax, %r14d
	jl	.L22
	movl	%r14d, %r15d
	subl	%eax, %r15d
	movslq	%r15d, %rcx
	movl	(%r11,%rcx,4), %eax
	cmpl	$9998, %eax
	jle	.L23
	movl	%r14d, 124(%rsp)
	movl	$20, %r12d
	movq	%rcx, %r14
	movq	%rbp, 128(%rsp)
	movl	%ebx, %ebp
	movl	%r15d, %ebx
	movq	%rdx, 136(%rsp)
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L25:
	subq	$4, %r12
	cmpq	$-4, %r12
	je	.L77
.L44:
	movl	(%r9,%r12), %eax
	cmpl	%eax, %ebx
	jl	.L25
	movl	%ebx, %r13d
	subl	%eax, %r13d
	movslq	%r13d, %r15
	movl	(%r11,%r15,4), %edx
	cmpl	$9998, %edx
	jle	.L26
	movl	20+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L78
.L28:
	movl	16+a(%rip), %eax
	cmpl	%r13d, %eax
	jle	.L79
.L31:
	movl	12+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L80
.L34:
	movl	8+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L81
.L37:
	movl	4+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L82
.L40:
	movl	(%r9), %eax
	cmpl	%eax, %r13d
	jge	.L42
	movl	(%r11,%r15,4), %edx
.L26:
	addl	(%r10,%r12), %edx
	movl	%edx, T(%rip)
	cmpl	(%r11,%r14,4), %edx
	jge	.L25
	subq	$4, %r12
	movl	%edx, (%r11,%r14,4)
	cmpq	$-4, %r12
	jne	.L44
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%r14, %rcx
	movl	%ebp, %ebx
	movq	136(%rsp), %rdx
	movq	128(%rsp), %rbp
	movl	124(%rsp), %r14d
	movl	(%r11,%rcx,4), %eax
.L23:
	addl	(%r10,%rbp), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rdx,4), %eax
	jge	.L22
	subq	$4, %rbp
	movl	%eax, (%r11,%rdx,4)
	cmpq	$-4, %rbp
	jne	.L46
	.p2align 4,,10
	.p2align 3
.L76:
	movl	%ebx, %edi
	movl	120(%rsp), %r8d
	movq	112(%rsp), %rbx
	movl	(%r11,%rdx,4), %eax
.L20:
	movq	64(%rsp), %rdx
	addl	(%r10,%rbx), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rdx,4), %eax
	jge	.L19
	subq	$4, %rbx
	movl	%eax, (%r11,%rdx,4)
	cmpq	$-4, %rbx
	jne	.L48
	.p2align 4,,10
	.p2align 3
.L75:
	movq	64(%rsp), %rcx
	movq	104(%rsp), %r8
	movl	(%r11,%rcx,4), %eax
.L17:
	movq	56(%rsp), %rsi
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rsi,4), %eax
	jge	.L16
	subq	$4, %r8
	movl	%eax, (%r11,%rsi,4)
	cmpq	$-4, %r8
	jne	.L50
	.p2align 4,,10
	.p2align 3
.L74:
	movq	56(%rsp), %rax
	movq	96(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L14:
	movq	48(%rsp), %rcx
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rcx,4), %eax
	jge	.L13
	subq	$4, %r8
	movl	%eax, (%r11,%rcx,4)
	cmpq	$-4, %r8
	jne	.L52
	.p2align 4,,10
	.p2align 3
.L73:
	movq	48(%rsp), %rax
	movq	88(%rsp), %r14
	movl	(%r11,%rax,4), %eax
.L11:
	movq	40(%rsp), %rbx
	addl	(%r10,%r14), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rbx,4), %eax
	jge	.L10
	subq	$4, %r14
	movl	%eax, (%r11,%rbx,4)
	cmpq	$-4, %r14
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L72:
	movq	40(%rsp), %rax
	movq	80(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L8:
	movq	32(%rsp), %rsi
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rsi,4), %eax
	jge	.L7
	subq	$4, %r8
	movl	%eax, (%r11,%rsi,4)
	cmpq	$-4, %r8
	jne	.L56
	.p2align 4,,10
	.p2align 3
.L71:
	movq	32(%rsp), %rax
	movq	72(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L5:
	movq	24(%rsp), %rcx
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rcx,4), %eax
	jge	.L4
	subq	$4, %r8
	movl	%eax, (%r11,%rcx,4)
	cmpq	$-4, %r8
	jne	.L58
	.p2align 4,,10
	.p2align 3
.L70:
	movq	24(%rsp), %rax
	movl	(%r11,%rax,4), %eax
.L1:
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L78:
	.cfi_restore_state
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	20+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	%eax, (%r11,%r15,4)
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jle	.L28
	movl	%eax, (%r11,%r15,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	leaq	b(%rip), %r10
	movl	(%r11,%r15,4), %edx
	addl	(%r10), %eax
	leaq	a(%rip), %r9
	cmpl	%edx, %eax
	jge	.L26
	movl	%eax, (%r11,%r15,4)
	movl	%eax, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L82:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	4+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L40
	movl	%eax, (%r11,%r15,4)
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L81:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	8+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L37
	movl	%eax, (%r11,%r15,4)
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	12+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L34
	movl	%eax, (%r11,%r15,4)
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L79:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	16+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L31
	movl	%eax, (%r11,%r15,4)
	jmp	.L31
	.cfi_endproc
.LFE0:
	.size	s, .-s
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	m(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movdqa	.LC0(%rip), %xmm0
	movq	.LC1(%rip), %rax
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r13
	movq	%rax, 196+m(%rip)
	movups	%xmm0, 4+m(%rip)
	movups	%xmm0, 20+m(%rip)
	movups	%xmm0, 36+m(%rip)
	movups	%xmm0, 52+m(%rip)
	movups	%xmm0, 68+m(%rip)
	movups	%xmm0, 84+m(%rip)
	movups	%xmm0, 100+m(%rip)
	movups	%xmm0, 116+m(%rip)
	movups	%xmm0, 132+m(%rip)
	movups	%xmm0, 148+m(%rip)
	movups	%xmm0, 164+m(%rip)
	movups	%xmm0, 180+m(%rip)
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L87:
	movl	16+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L104
.L90:
	movl	12+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L105
.L93:
	movl	8+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L106
.L96:
	movl	4+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L107
.L99:
	movl	a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L101
.L109:
	movl	0(%rbp,%r15,4), %esi
.L85:
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	printf@PLT
.L84:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L108
	movslq	%eax, %rbx
	sarl	$31, %eax
	imulq	$1374389535, %rbx, %rbx
	sarq	$37, %rbx
	subl	%eax, %ebx
	movslq	%ebx, %r15
	movl	0(%rbp,%r15,4), %esi
	cmpl	$9998, %esi
	jle	.L85
	leaq	m(%rip), %rax
	leal	(%rax), %edi
	movl	20+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L87
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	20+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L87
	movl	%eax, 0(%rbp,%r15,4)
	movl	16+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L90
	.p2align 4,,10
	.p2align 3
.L104:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	16+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L90
	movl	%eax, 0(%rbp,%r15,4)
	movl	12+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L93
	.p2align 4,,10
	.p2align 3
.L105:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	12+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L93
	movl	%eax, 0(%rbp,%r15,4)
	movl	8+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L96
	.p2align 4,,10
	.p2align 3
.L106:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	8+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L96
	movl	%eax, 0(%rbp,%r15,4)
	movl	4+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L99
	.p2align 4,,10
	.p2align 3
.L107:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	4+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L99
	movl	%eax, 0(%rbp,%r15,4)
	movl	a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L109
	.p2align 4,,10
	.p2align 3
.L101:
	movl	%ebx, %esi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	movl	0(%rbp,%r15,4), %esi
	addl	b(%rip), %eax
	movl	%eax, T(%rip)
	cmpl	%esi, %eax
	jge	.L85
	movl	%eax, 0(%rbp,%r15,4)
	movl	%eax, %esi
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L108:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	T
	.bss
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	m
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	9999
	.long	9999
	.long	9999
	.long	9999
	.set	.LC1,.LC0
	.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	s
	.type	s, @function
s:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	leaq	m(%rip), %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %rcx
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%rax, 24(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L1
	movl	%ecx, 4(%rsp)
	movl	$20, %r8d
	leaq	a(%rip), %r9
	leaq	b(%rip), %r10
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L70
.L58:
	movl	(%r9,%r8), %eax
	cmpl	4(%rsp), %eax
	jg	.L4
	movl	4(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rax
	movq	%rax, 32(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L5
	movl	$20, %ecx
	movq	%r8, 72(%rsp)
	movl	%edx, 8(%rsp)
	movq	%rcx, %r8
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L7:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L71
.L56:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 8(%rsp)
	jl	.L7
	movl	8(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rax
	movq	%rax, 40(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L8
	movl	$20, %ecx
	movl	%edx, 12(%rsp)
	movq	%r8, 80(%rsp)
	movq	%rcx, %r14
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L10:
	subq	$4, %r14
	cmpq	$-4, %r14
	je	.L72
.L54:
	movl	(%r9,%r14), %eax
	cmpl	%eax, 12(%rsp)
	jl	.L10
	movl	12(%rsp), %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	movq	%rax, 48(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L11
	movl	%ecx, 16(%rsp)
	movl	$20, %r8d
	movq	%r14, 88(%rsp)
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L13:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L73
.L52:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 16(%rsp)
	jl	.L13
	movl	16(%rsp), %r13d
	subl	%eax, %r13d
	movslq	%r13d, %rax
	movq	%rax, 56(%rsp)
	movl	(%r11,%rax,4), %eax
	cmpl	$9998, %eax
	jle	.L14
	movl	$20, %ecx
	movq	%r8, 96(%rsp)
	movl	%r13d, 20(%rsp)
	movq	%rcx, %r8
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L16:
	subq	$4, %r8
	cmpq	$-4, %r8
	je	.L74
.L50:
	movl	(%r9,%r8), %eax
	cmpl	%eax, 20(%rsp)
	jl	.L16
	movl	20(%rsp), %edx
	subl	%eax, %edx
	movslq	%edx, %rcx
	movl	(%r11,%rcx,4), %eax
	cmpl	$9998, %eax
	jle	.L17
	movq	%r8, 104(%rsp)
	movl	$20, %ebx
	movl	%edx, %r8d
	movq	%rcx, 64(%rsp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L19:
	subq	$4, %rbx
	cmpq	$-4, %rbx
	je	.L75
.L48:
	movl	(%r9,%rbx), %eax
	cmpl	%eax, %r8d
	jl	.L19
	movl	%r8d, %r14d
	subl	%eax, %r14d
	movslq	%r14d, %rdx
	movl	(%r11,%rdx,4), %eax
	cmpl	$9998, %eax
	jle	.L20
	movq	%rbx, 112(%rsp)
	movl	$20, %ebp
	movl	%edi, %ebx
	movl	%r8d, 120(%rsp)
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L22:
	subq	$4, %rbp
	cmpq	$-4, %rbp
	je	.L76
.L46:
	movl	(%r9,%rbp), %eax
	cmpl	%eax, %r14d
	jl	.L22
	movl	%r14d, %r15d
	subl	%eax, %r15d
	movslq	%r15d, %rcx
	movl	(%r11,%rcx,4), %eax
	cmpl	$9998, %eax
	jle	.L23
	movl	%r14d, 124(%rsp)
	movl	$20, %r12d
	movq	%rcx, %r14
	movq	%rbp, 128(%rsp)
	movl	%ebx, %ebp
	movl	%r15d, %ebx
	movq	%rdx, 136(%rsp)
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L25:
	subq	$4, %r12
	cmpq	$-4, %r12
	je	.L77
.L44:
	movl	(%r9,%r12), %eax
	cmpl	%eax, %ebx
	jl	.L25
	movl	%ebx, %r13d
	subl	%eax, %r13d
	movslq	%r13d, %r15
	movl	(%r11,%r15,4), %edx
	cmpl	$9998, %edx
	jle	.L26
	movl	20+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L78
.L28:
	movl	16+a(%rip), %eax
	cmpl	%r13d, %eax
	jle	.L79
.L31:
	movl	12+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L80
.L34:
	movl	8+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L81
.L37:
	movl	4+a(%rip), %eax
	cmpl	%eax, %r13d
	jge	.L82
.L40:
	movl	(%r9), %eax
	cmpl	%eax, %r13d
	jge	.L42
	movl	(%r11,%r15,4), %edx
.L26:
	addl	(%r10,%r12), %edx
	movl	%edx, T(%rip)
	cmpl	(%r11,%r14,4), %edx
	jge	.L25
	subq	$4, %r12
	movl	%edx, (%r11,%r14,4)
	cmpq	$-4, %r12
	jne	.L44
	.p2align 4,,10
	.p2align 3
.L77:
	movq	%r14, %rcx
	movl	%ebp, %ebx
	movq	136(%rsp), %rdx
	movq	128(%rsp), %rbp
	movl	124(%rsp), %r14d
	movl	(%r11,%rcx,4), %eax
.L23:
	addl	(%r10,%rbp), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rdx,4), %eax
	jge	.L22
	subq	$4, %rbp
	movl	%eax, (%r11,%rdx,4)
	cmpq	$-4, %rbp
	jne	.L46
	.p2align 4,,10
	.p2align 3
.L76:
	movl	%ebx, %edi
	movl	120(%rsp), %r8d
	movq	112(%rsp), %rbx
	movl	(%r11,%rdx,4), %eax
.L20:
	movq	64(%rsp), %rdx
	addl	(%r10,%rbx), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rdx,4), %eax
	jge	.L19
	subq	$4, %rbx
	movl	%eax, (%r11,%rdx,4)
	cmpq	$-4, %rbx
	jne	.L48
	.p2align 4,,10
	.p2align 3
.L75:
	movq	64(%rsp), %rcx
	movq	104(%rsp), %r8
	movl	(%r11,%rcx,4), %eax
.L17:
	movq	56(%rsp), %rsi
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rsi,4), %eax
	jge	.L16
	subq	$4, %r8
	movl	%eax, (%r11,%rsi,4)
	cmpq	$-4, %r8
	jne	.L50
	.p2align 4,,10
	.p2align 3
.L74:
	movq	56(%rsp), %rax
	movq	96(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L14:
	movq	48(%rsp), %rcx
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rcx,4), %eax
	jge	.L13
	subq	$4, %r8
	movl	%eax, (%r11,%rcx,4)
	cmpq	$-4, %r8
	jne	.L52
	.p2align 4,,10
	.p2align 3
.L73:
	movq	48(%rsp), %rax
	movq	88(%rsp), %r14
	movl	(%r11,%rax,4), %eax
.L11:
	movq	40(%rsp), %rbx
	addl	(%r10,%r14), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rbx,4), %eax
	jge	.L10
	subq	$4, %r14
	movl	%eax, (%r11,%rbx,4)
	cmpq	$-4, %r14
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L72:
	movq	40(%rsp), %rax
	movq	80(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L8:
	movq	32(%rsp), %rsi
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rsi,4), %eax
	jge	.L7
	subq	$4, %r8
	movl	%eax, (%r11,%rsi,4)
	cmpq	$-4, %r8
	jne	.L56
	.p2align 4,,10
	.p2align 3
.L71:
	movq	32(%rsp), %rax
	movq	72(%rsp), %r8
	movl	(%r11,%rax,4), %eax
.L5:
	movq	24(%rsp), %rcx
	addl	(%r10,%r8), %eax
	movl	%eax, T(%rip)
	cmpl	(%r11,%rcx,4), %eax
	jge	.L4
	subq	$4, %r8
	movl	%eax, (%r11,%rcx,4)
	cmpq	$-4, %r8
	jne	.L58
	.p2align 4,,10
	.p2align 3
.L70:
	movq	24(%rsp), %rax
	movl	(%r11,%rax,4), %eax
.L1:
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L78:
	.cfi_restore_state
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	20+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	%eax, (%r11,%r15,4)
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jle	.L28
	movl	%eax, (%r11,%r15,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L42:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	leaq	b(%rip), %r10
	movl	(%r11,%r15,4), %edx
	addl	(%r10), %eax
	leaq	a(%rip), %r9
	cmpl	%edx, %eax
	jge	.L26
	movl	%eax, (%r11,%r15,4)
	movl	%eax, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L82:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	4+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L40
	movl	%eax, (%r11,%r15,4)
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L81:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	8+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L37
	movl	%eax, (%r11,%r15,4)
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	12+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L34
	movl	%eax, (%r11,%r15,4)
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L79:
	movl	%r13d, %esi
	movl	%ebp, %edi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	leaq	m(%rip), %r11
	addl	16+b(%rip), %eax
	leaq	a(%rip), %r9
	cmpl	(%r11,%r15,4), %eax
	movl	%eax, T(%rip)
	leaq	b(%rip), %r10
	jge	.L31
	movl	%eax, (%r11,%r15,4)
	jmp	.L31
	.cfi_endproc
.LFE0:
	.size	s, .-s
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	m(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movdqa	.LC0(%rip), %xmm0
	movq	.LC1(%rip), %rax
	movl	$51, 12(%rsp)
	leaq	12(%rsp), %r13
	movq	%rax, 196+m(%rip)
	movups	%xmm0, 4+m(%rip)
	movups	%xmm0, 20+m(%rip)
	movups	%xmm0, 36+m(%rip)
	movups	%xmm0, 52+m(%rip)
	movups	%xmm0, 68+m(%rip)
	movups	%xmm0, 84+m(%rip)
	movups	%xmm0, 100+m(%rip)
	movups	%xmm0, 116+m(%rip)
	movups	%xmm0, 132+m(%rip)
	movups	%xmm0, 148+m(%rip)
	movups	%xmm0, 164+m(%rip)
	movups	%xmm0, 180+m(%rip)
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L87:
	movl	16+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L104
.L90:
	movl	12+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L105
.L93:
	movl	8+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L106
.L96:
	movl	4+a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L107
.L99:
	movl	a(%rip), %eax
	cmpl	%eax, %ebx
	jge	.L101
.L109:
	movl	0(%rbp,%r15,4), %esi
.L85:
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	printf@PLT
.L84:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L108
	movslq	%eax, %rbx
	sarl	$31, %eax
	imulq	$1374389535, %rbx, %rbx
	sarq	$37, %rbx
	subl	%eax, %ebx
	movslq	%ebx, %r15
	movl	0(%rbp,%r15,4), %esi
	cmpl	$9998, %esi
	jle	.L85
	leaq	m(%rip), %rax
	leal	(%rax), %edi
	movl	20+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L87
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	20+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L87
	movl	%eax, 0(%rbp,%r15,4)
	movl	16+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L90
	.p2align 4,,10
	.p2align 3
.L104:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	16+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L90
	movl	%eax, 0(%rbp,%r15,4)
	movl	12+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L93
	.p2align 4,,10
	.p2align 3
.L105:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	12+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L93
	movl	%eax, 0(%rbp,%r15,4)
	movl	8+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L96
	.p2align 4,,10
	.p2align 3
.L106:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	8+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L96
	movl	%eax, 0(%rbp,%r15,4)
	movl	4+a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L99
	.p2align 4,,10
	.p2align 3
.L107:
	movl	%ebx, %esi
	movl	%edi, 8(%rsp)
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	addl	4+b(%rip), %eax
	cmpl	0(%rbp,%r15,4), %eax
	movl	%eax, T(%rip)
	movl	8(%rsp), %edi
	jge	.L99
	movl	%eax, 0(%rbp,%r15,4)
	movl	a(%rip), %eax
	cmpl	%eax, %ebx
	jl	.L109
	.p2align 4,,10
	.p2align 3
.L101:
	movl	%ebx, %esi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	s
	movl	0(%rbp,%r15,4), %esi
	addl	b(%rip), %eax
	movl	%eax, T(%rip)
	cmpl	%esi, %eax
	jge	.L85
	movl	%eax, 0(%rbp,%r15,4)
	movl	%eax, %esi
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L108:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	T
	.bss
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	m
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	9999
	.long	9999
	.long	9999
	.long	9999
	.set	.LC1,.LC0
	.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:

a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51],T;
int s(p,n){
	int d=5;
	if(m[n]>9998)for(;~d;d--)if(a[d]<=n){
		T=s(p,n-a[d])+b[d];
		if(m[n]>T)m[n]=T;
	}
	return m[n];
}

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

main(n){
	for(n=1;n<51;n++)m[n]=9999;
	for(;scanf("%d",&n),n;)printf("%d\n",s(m,n/100));
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.globl	b
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	s
	.type	s, @function
s:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$5, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$9998, %eax
	jle	.L2
	jmp	.L3
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	s
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, T(%rip)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	T(%rip), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L4:
	subl	$1, -4(%rbp)
.L3:
	cmpl	$-1, -4(%rbp)
	jne	.L5
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	s, .-s
	.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	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$9999, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L9
	jmp	.L10
.L11:
	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
	movl	%eax, %esi
	leaq	m(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	s
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %edi
	call	exit@PLT
	.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	a
	.data
	.align 16
	.type	a, @object
	.size	a, 24
a:
	.long	2
	.long	3
	.long	5
	.long	10
	.long	12
	.long	15
	.globl	b
	.align 16
	.type	b, @object
	.size	b, 24
b:
	.long	380
	.long	550
	.long	850
	.long	1520
	.long	1870
	.long	2244
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 204
m:
	.zero	204
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	s
	.type	s, @function
s:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$5, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$9998, %eax
	jle	.L2
	jmp	.L3
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	s
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, T(%rip)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	T(%rip), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L4:
	subl	$1, -4(%rbp)
.L3:
	cmpl	$-1, -4(%rbp)
	jne	.L5
.L2:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	s, .-s
	.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	$1, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	$9999, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	$50, %eax
	jle	.L9
	jmp	.L10
.L11:
	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
	movl	%eax, %esi
	leaq	m(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	s
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L10:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %edi
	call	exit@PLT
	.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:
