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

```c
#include <stdio.h>
#define N_MAX 9
#define S_MAX 1000
#define V_MAX 100

int main(void)
{
    int n, s, v, v_max;

    static long int dp[N_MAX + 1][S_MAX + 1][V_MAX + 1];

    /* n = 1 */
    for(v_max = 0; v_max <= V_MAX; v_max++)
        for(s = 0; s <= v_max; s++)
            dp[1][s][v_max] = s <= v_max;

    /* n >= 2 */
    for(n = 2; n <= N_MAX; n++)
        for(s = 0; s <= S_MAX; s++)
            for(v_max = 0; v_max <= V_MAX; v_max++)
            {
                long int sum = 0;
                for(v = 1; v <= s && v <= v_max; v++)
                    sum += dp[n - 1][s - v][v - 1];
                dp[n][s][v_max] = sum;
            }

    while(scanf("%d %d", &n, &s), n + s)
        printf("%ld\n", dp[n][s][V_MAX]);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -20(%rbp)
	jmp	.L2
.L5:
	movl	$0, -28(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	setge	%dl
	movl	-28(%rbp), %eax
	movzbl	%dl, %ecx
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	$101101, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L4
	addl	$1, -20(%rbp)
.L2:
	cmpl	$100, -20(%rbp)
	jle	.L5
	movl	$2, -32(%rbp)
	jmp	.L6
.L14:
	movl	$0, -28(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movq	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rcx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -16(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L10
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L11
.L10:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp.0(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L8:
	cmpl	$100, -20(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	$1000, %eax
	jle	.L13
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$808, %rdx, %rdx
	imulq	$808808, %rax, %rax
	addq	%rax, %rdx
	leaq	800+dp.0(%rip), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,8088080,32
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld\n"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	dp.0(%rip), %rbx
	leaq	808(%rbx), %rdx
	movq	%rbx, %rcx
	leaq	82416(%rdx), %rsi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
.L3:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	$1, 808808(%rax)
	addq	$808, %rax
	cmpq	%rdx, %rax
	jne	.L2
	leaq	816(%rax), %rdx
	addq	$8, %rcx
	cmpq	%rsi, %rdx
	jne	.L3
	movl	$808808, %r11d
	leaq	808808(%rbx), %r13
	leaq	-808(%rbx), %r12
.L11:
	leaq	0(%r13,%r11), %r9
	leaq	(%r12,%r11), %r10
	xorl	%ebp, %ebp
.L4:
	movq	$0, (%r9)
	movl	%ebp, %r8d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %r8d
	movl	%edi, %esi
	cmovle	%r8d, %esi
	xorl	%ecx, %ecx
	testl	%esi, %esi
	je	.L8
	addl	$1, %esi
	movq	%r10, %rdx
	xorl	%ecx, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %eax
	addq	(%rdx), %rcx
	subq	$800, %rdx
	cmpl	%eax, %esi
	jne	.L5
.L8:
	movq	%rcx, (%r9,%rdi,8)
	addq	$1, %rdi
	cmpq	$101, %rdi
	jne	.L10
	addq	$1, %rbp
	addq	$808, %r9
	addq	$808, %r10
	cmpq	$1001, %rbp
	jne	.L4
	addq	$808808, %r11
	cmpq	$7279272, %r11
	jne	.L11
	movl	$1001, 4(%rsp)
	leaq	4(%rsp), %r14
	movq	%rsp, %r13
	leaq	.LC1(%rip), %r12
	movl	$10, (%rsp)
	leaq	.LC0(%rip), %rbp
	jmp	.L12
.L13:
	imulq	$808808, %rdx, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	imulq	$808, %rax, %rax
	addq	%rdx, %rax
	movq	800(%rbx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L12:
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdx
	movslq	4(%rsp), %rax
	movl	%edx, %edi
	addl	%eax, %edi
	jne	.L13
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,8088080,32
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld\n"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	dp.0(%rip), %rbx
	leaq	808(%rbx), %rdx
	movq	%rbx, %rcx
	leaq	82416(%rdx), %rsi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
.L3:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	$1, 808808(%rax)
	addq	$808, %rax
	cmpq	%rdx, %rax
	jne	.L2
	leaq	816(%rax), %rdx
	addq	$8, %rcx
	cmpq	%rsi, %rdx
	jne	.L3
	movl	$808808, %r11d
	leaq	808808(%rbx), %r13
	leaq	-808(%rbx), %r12
.L11:
	leaq	0(%r13,%r11), %r9
	leaq	(%r12,%r11), %r10
	xorl	%ebp, %ebp
.L4:
	movq	$0, (%r9)
	movl	%ebp, %r8d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %r8d
	movl	%edi, %esi
	cmovle	%r8d, %esi
	xorl	%ecx, %ecx
	testl	%esi, %esi
	je	.L8
	addl	$1, %esi
	movq	%r10, %rdx
	xorl	%ecx, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %eax
	addq	(%rdx), %rcx
	subq	$800, %rdx
	cmpl	%eax, %esi
	jne	.L5
.L8:
	movq	%rcx, (%r9,%rdi,8)
	addq	$1, %rdi
	cmpq	$101, %rdi
	jne	.L10
	addq	$1, %rbp
	addq	$808, %r9
	addq	$808, %r10
	cmpq	$1001, %rbp
	jne	.L4
	addq	$808808, %r11
	cmpq	$7279272, %r11
	jne	.L11
	movl	$1001, 4(%rsp)
	leaq	4(%rsp), %r14
	movq	%rsp, %r13
	leaq	.LC1(%rip), %r12
	movl	$10, (%rsp)
	leaq	.LC0(%rip), %rbp
	jmp	.L12
.L13:
	imulq	$808808, %rdx, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	imulq	$808, %rax, %rax
	addq	%rdx, %rax
	movq	800(%rbx,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L12:
	movq	%r14, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdx
	movslq	4(%rsp), %rax
	movl	%edx, %edi
	addl	%eax, %edi
	jne	.L13
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,8088080,32
	.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:

#include <stdio.h>
#define N_MAX 9
#define S_MAX 1000
#define V_MAX 100

int main(void)
{
    int n, s, v, v_max;

    static long int dp[N_MAX + 1][S_MAX + 1][V_MAX + 1];

    /* n = 1 */
    for(v_max = 0; v_max <= V_MAX; v_max++)
        for(s = 0; s <= v_max; s++)
            dp[1][s][v_max] = s <= v_max;

    /* n >= 2 */
    for(n = 2; n <= N_MAX; n++)
        for(s = 0; s <= S_MAX; s++)
            for(v_max = 0; v_max <= V_MAX; v_max++)
            {
                long int sum = 0;
                for(v = 1; v <= s && v <= v_max; v++)
                    sum += dp[n - 1][s - v][v - 1];
                dp[n][s][v_max] = sum;
            }

    while(scanf("%d %d", &n, &s), n + s)
        printf("%ld\n", dp[n][s][V_MAX]);

    return 0;
}
3 12
3 1
0 0
 5 12
3 0
0 0
 5 23
3 0
0 0
 5 28
3 0
0 0
 6 6
3 1
0 0
 3 12
3 3
0 0
 6 23
3 0
0 0
 3 11
3 3
0 0
 3 19
3 -1
0 0
 6 19
3 0
0 0

12
0
 2
0
 57
0
 141
0
 0
0
 12
1
 20
0
 10
1
 30
0
 5
0

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

```c
#include <stdio.h>
#define N_MAX 9
#define S_MAX 1000
#define V_MAX 100

int main(void)
{
    int n, s, v, v_max;

    static long int dp[N_MAX + 1][S_MAX + 1][V_MAX + 1];

    /* n = 1 */
    for(v_max = 0; v_max <= V_MAX; v_max++)
        for(s = 0; s <= v_max; s++)
            dp[1][s][v_max] = s <= v_max;

    /* n >= 2 */
    for(n = 2; n <= N_MAX; n++)
        for(s = 0; s <= S_MAX; s++)
            for(v_max = 0; v_max <= V_MAX; v_max++)
            {
                long int sum = 0;
                for(v = 1; v <= s && v <= v_max; v++)
                    sum += dp[n - 1][s - v][v - 1];
                dp[n][s][v_max] = sum;
            }

    while(scanf("%d %d", &n, &s), n + s)
        printf("%ld\n", dp[n][s][V_MAX]);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -20(%rbp)
	jmp	.L2
.L5:
	movl	$0, -28(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	setge	%dl
	movl	-28(%rbp), %eax
	movzbl	%dl, %ecx
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	$101101, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L4
	addl	$1, -20(%rbp)
.L2:
	cmpl	$100, -20(%rbp)
	jle	.L5
	movl	$2, -32(%rbp)
	jmp	.L6
.L14:
	movl	$0, -28(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movq	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rcx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -16(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L10
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L11
.L10:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp.0(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L8:
	cmpl	$100, -20(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	$1000, %eax
	jle	.L13
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$808, %rdx, %rdx
	imulq	$808808, %rax, %rax
	addq	%rax, %rdx
	leaq	800+dp.0(%rip), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,8088080,32
	.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
	.section	.rodata
.LC0:
	.string	"%ld\n"
.LC1:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -20(%rbp)
	jmp	.L2
.L5:
	movl	$0, -28(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	setge	%dl
	movl	-28(%rbp), %eax
	movzbl	%dl, %ecx
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	$101101, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L4
	addl	$1, -20(%rbp)
.L2:
	cmpl	$100, -20(%rbp)
	jle	.L5
	movl	$2, -32(%rbp)
	jmp	.L6
.L14:
	movl	$0, -28(%rbp)
	jmp	.L7
.L13:
	movl	$0, -20(%rbp)
	jmp	.L8
.L12:
	movq	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L11:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rcx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -16(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L10
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L11
.L10:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	imulq	$101101, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp.0(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L8:
	cmpl	$100, -20(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	$1000, %eax
	jle	.L13
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	$9, %eax
	jle	.L14
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$808, %rdx, %rdx
	imulq	$808808, %rax, %rax
	addq	%rax, %rdx
	leaq	800+dp.0(%rip), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,8088080,32
	.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:
