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>
#include <string.h>

#define MOD 10000

int main(void)
{
    int dp[101][4][2];
    int i, j, k;
    int sch[101];
    int n, m;
    int ans;
    
    memset(sch, 0, sizeof(sch));
    
    scanf("%d%d", &n, &m);
    
    for (i = 0; i < m; i++){
        scanf("%d%d", &j, &k);
        sch[j] = k;
    }
    
    memset(dp, 0, sizeof(dp));
    
    for (i = 1; i <= 3; i++){
        if (sch[1]){
            dp[1][sch[1]][0] = 1;
        }
        else {
            dp[1][i][0] = 1;
        }
    }
    
    for (i = 2; i <= n; i++){
        for (j = 1; j <= 3; j++){
            if (sch[i]){
                dp[i][sch[i]][0] = (dp[i - 1][(sch[i] + 1) % 3 + 1][0] + dp[i - 1][(sch[i] + 1) % 3 + 1][1] + dp[i - 1][sch[i] % 3 + 1][0] + dp[i - 1][sch[i] % 3 + 1][1]) % MOD;
                dp[i][sch[i]][1] = dp[i - 1][sch[i]][0] % MOD;
            }
            else {
                dp[i][j][0] = (dp[i - 1][(j + 1) % 3 + 1][0] + dp[i - 1][(j + 1) % 3 + 1][1] + dp[i - 1][j % 3 + 1][0] + dp[i - 1][j % 3 + 1][1]) % MOD;
                dp[i][j][1] = dp[i - 1][j][0] % MOD;
            }
        }
    }
    
    ans = 0;
    for (i = 1; i <= 3; i++){
        ans += dp[n][i][0] + dp[n][i][1];
        ans %= MOD;
    }
    
    printf("%d\n", ans);
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.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	$3696, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3664(%rbp), %rax
	movl	$404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-3676(%rbp), %rdx
	leaq	-3680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3672(%rbp)
	jmp	.L2
.L3:
	leaq	-3684(%rbp), %rdx
	leaq	-3688(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3688(%rbp), %eax
	movl	-3684(%rbp), %edx
	cltq
	movl	%edx, -3664(%rbp,%rax,4)
	addl	$1, -3672(%rbp)
.L2:
	movl	-3676(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jl	.L3
	leaq	-3248(%rbp), %rax
	movl	$3232, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -3672(%rbp)
	jmp	.L4
.L7:
	movl	-3660(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movl	-3660(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
	jmp	.L6
.L5:
	movl	-3672(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
.L6:
	addl	$1, -3672(%rbp)
.L4:
	cmpl	$3, -3672(%rbp)
	jle	.L7
	movl	$2, -3672(%rbp)
	jmp	.L8
.L13:
	movl	$1, -3688(%rbp)
	jmp	.L9
.L12:
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
	jmp	.L11
.L10:
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3688(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
.L11:
	movl	-3688(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3688(%rbp)
.L9:
	movl	-3688(%rbp), %eax
	cmpl	$3, %eax
	jle	.L12
	addl	$1, -3672(%rbp)
.L8:
	movl	-3680(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jle	.L13
	movl	$0, -3668(%rbp)
	movl	$1, -3672(%rbp)
	jmp	.L14
.L15:
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %ecx
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	addl	%eax, -3668(%rbp)
	movl	-3668(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1759218605, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -3668(%rbp)
	addl	$1, -3672(%rbp)
.L14:
	cmpl	$3, -3672(%rbp)
	jle	.L15
	movl	-3668(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$50, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3680, %rsp
	.cfi_def_cfa_offset 3728
	movq	%fs:40, %rax
	movq	%rax, 3672(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rdx
	movq	%rsp, %r13
	movq	%rbx, %rdi
	leaq	8(%rsp), %rsi
	leaq	4(%rsp), %r14
	rep stosq
	movl	$0, (%rdi)
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rax
	movl	4(%rsp), %edx
	addl	$1, %ebp
	movl	%edx, 16(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L2
.L5:
	leaq	432(%rsp), %rdx
	xorl	%eax, %eax
	movl	$404, %ecx
	movq	%rdx, %rdi
	rep stosq
	movslq	20(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movl	$1, 464(%rsp,%rax,8)
.L4:
	movslq	8(%rsp), %rsi
	cmpl	$1, %esi
	jle	.L6
	leaq	472(%rsp), %rdx
	leal	1(%rsi), %edi
	movl	$2, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L19:
	movl	16(%rdx), %r8d
	movl	20(%rdx), %eax
	movl	8(%rdx), %r10d
	addl	%r8d, %eax
	addl	%r10d, %eax
	addl	12(%rdx), %eax
	movslq	%eax, %r9
	movl	%eax, %r11d
	imulq	$1759218605, %r9, %r9
	sarl	$31, %r11d
	sarq	$44, %r9
	subl	%r11d, %r9d
	imull	$10000, %r9d, %r9d
	subl	%r9d, %eax
	movl	%eax, 32(%rdx)
	movslq	(%rdx), %rax
	movq	%rax, %r9
	imulq	$1759218605, %rax, %rax
	movl	%r9d, %r11d
	sarl	$31, %r11d
	sarq	$44, %rax
	subl	%r11d, %eax
	movl	%r9d, %r11d
	imull	$10000, %eax, %eax
	subl	%eax, %r11d
	movl	4(%rdx), %eax
	movl	%r11d, 36(%rdx)
	addl	%r9d, %eax
	addl	%r8d, %eax
	addl	20(%rdx), %eax
	movslq	%eax, %r11
	movl	%eax, %ebp
	imulq	$1759218605, %r11, %r11
	sarl	$31, %ebp
	sarq	$44, %r11
	subl	%ebp, %r11d
	imull	$10000, %r11d, %r11d
	subl	%r11d, %eax
	movl	%r10d, %r11d
	movl	%eax, 40(%rdx)
	movslq	%r10d, %rax
	sarl	$31, %r11d
	imulq	$1759218605, %rax, %rax
	sarq	$44, %rax
	subl	%r11d, %eax
	movl	%r10d, %r11d
	imull	$10000, %eax, %eax
	subl	%eax, %r11d
	movl	12(%rdx), %eax
	movl	%r11d, 44(%rdx)
	addl	%r10d, %eax
	addl	%r9d, %eax
	addl	4(%rdx), %eax
	addq	$1, %rcx
	addq	$32, %rdx
	movslq	%eax, %r9
	movl	%eax, %r10d
	imulq	$1759218605, %r9, %r9
	sarl	$31, %r10d
	sarq	$44, %r9
	subl	%r10d, %r9d
	imull	$10000, %r9d, %r9d
	subl	%r9d, %eax
	movl	%r8d, %r9d
	movl	%eax, 16(%rdx)
	movslq	%r8d, %rax
	sarl	$31, %r9d
	imulq	$1759218605, %rax, %rax
	sarq	$44, %rax
	subl	%r9d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %r8d
	movl	%r8d, 20(%rdx)
	cmpq	%rcx, %rdi
	je	.L18
.L9:
	movslq	(%rbx,%rcx,4), %rbp
	leal	-1(%rcx), %r11d
	leal	1(%rbp), %r8d
	movl	%ebp, %r12d
	movslq	%r8d, %rax
	movl	%r8d, %r10d
	imulq	$1431655766, %rax, %rax
	sarl	$31, %r10d
	shrq	$32, %rax
	subl	%r10d, %eax
	movl	%ebp, %r10d
	leal	(%rax,%rax,2), %eax
	sarl	$31, %r10d
	subl	%eax, %r8d
	imulq	$1431655766, %rbp, %rax
	addl	$1, %r8d
	shrq	$32, %rax
	subl	%r10d, %eax
	leal	(%rax,%rax,2), %eax
	subl	%eax, %r12d
	addl	$1, %r12d
	testl	%ebp, %ebp
	je	.L19
	movslq	%r11d, %r11
	movslq	%r12d, %r9
	movslq	%r8d, %r8
	movslq	%ecx, %rax
	salq	$2, %r11
	leaq	0(%rbp,%rax,4), %r10
	addq	%r11, %r8
	addq	%r11, %r9
	addq	%rbp, %r11
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %r12
	movl	%eax, %r13d
	imulq	$1759218605, %r12, %r12
	sarl	$31, %r13d
	sarq	$44, %r12
	subl	%r13d, %r12d
	imull	$10000, %r12d, %r12d
	subl	%r12d, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %rbp
	imulq	$1759218605, %rax, %rax
	movl	%ebp, %r12d
	sarl	$31, %r12d
	sarq	$44, %rax
	subl	%r12d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %ebp
	movl	%ebp, 436(%rsp,%r10,8)
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %rbp
	movl	%eax, %r12d
	imulq	$1759218605, %rbp, %rbp
	sarl	$31, %r12d
	sarq	$44, %rbp
	subl	%r12d, %ebp
	imull	$10000, %ebp, %ebp
	subl	%ebp, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %rbp
	imulq	$1759218605, %rax, %rax
	movl	%ebp, %r12d
	sarl	$31, %r12d
	sarq	$44, %rax
	subl	%r12d, %eax
	imull	$10000, %eax, %eax
	addq	$1, %rcx
	addq	$32, %rdx
	subl	%eax, %ebp
	movl	%ebp, 436(%rsp,%r10,8)
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %r8
	movl	%eax, %r9d
	imulq	$1759218605, %r8, %r8
	sarl	$31, %r9d
	sarq	$44, %r8
	subl	%r9d, %r8d
	imull	$10000, %r8d, %r8d
	subl	%r8d, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %r8
	imulq	$1759218605, %rax, %rax
	movl	%r8d, %r9d
	sarl	$31, %r9d
	sarq	$44, %rax
	subl	%r9d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %r8d
	movl	%r8d, 436(%rsp,%r10,8)
	cmpq	%rcx, %rdi
	jne	.L9
.L18:
	movl	$4, (%rsp)
.L6:
	salq	$5, %rsi
	movl	$1, %edi
	movl	444(%rsp,%rsi), %edx
	addl	440(%rsp,%rsi), %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %ecx
	movl	%edx, %eax
	movl	448(%rsp,%rsi), %edx
	addl	452(%rsp,%rsi), %edx
	subl	%ecx, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %ecx
	movl	%edx, %eax
	movl	460(%rsp,%rsi), %edx
	addl	456(%rsp,%rsi), %edx
	leaq	.LC1(%rip), %rsi
	subl	%ecx, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	3672(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$3680, %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
.L3:
	.cfi_restore_state
	movl	$1, 472(%rsp)
	movl	$1, 480(%rsp)
	movl	$1, 488(%rsp)
	jmp	.L4
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$50, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$3680, %rsp
	.cfi_def_cfa_offset 3728
	movq	%fs:40, %rax
	movq	%rax, 3672(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rdx
	movq	%rsp, %r13
	movq	%rbx, %rdi
	leaq	8(%rsp), %rsi
	leaq	4(%rsp), %r14
	rep stosq
	movl	$0, (%rdi)
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rax
	movl	4(%rsp), %edx
	addl	$1, %ebp
	movl	%edx, 16(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L2
.L5:
	leaq	432(%rsp), %rdx
	xorl	%eax, %eax
	movl	$404, %ecx
	movq	%rdx, %rdi
	rep stosq
	movslq	20(%rsp), %rax
	testl	%eax, %eax
	je	.L3
	movl	$1, 464(%rsp,%rax,8)
.L4:
	movslq	8(%rsp), %rsi
	cmpl	$1, %esi
	jle	.L6
	leaq	472(%rsp), %rdx
	leal	1(%rsi), %edi
	movl	$2, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L19:
	movl	16(%rdx), %r8d
	movl	20(%rdx), %eax
	movl	8(%rdx), %r10d
	addl	%r8d, %eax
	addl	%r10d, %eax
	addl	12(%rdx), %eax
	movslq	%eax, %r9
	movl	%eax, %r11d
	imulq	$1759218605, %r9, %r9
	sarl	$31, %r11d
	sarq	$44, %r9
	subl	%r11d, %r9d
	imull	$10000, %r9d, %r9d
	subl	%r9d, %eax
	movl	%eax, 32(%rdx)
	movslq	(%rdx), %rax
	movq	%rax, %r9
	imulq	$1759218605, %rax, %rax
	movl	%r9d, %r11d
	sarl	$31, %r11d
	sarq	$44, %rax
	subl	%r11d, %eax
	movl	%r9d, %r11d
	imull	$10000, %eax, %eax
	subl	%eax, %r11d
	movl	4(%rdx), %eax
	movl	%r11d, 36(%rdx)
	addl	%r9d, %eax
	addl	%r8d, %eax
	addl	20(%rdx), %eax
	movslq	%eax, %r11
	movl	%eax, %ebp
	imulq	$1759218605, %r11, %r11
	sarl	$31, %ebp
	sarq	$44, %r11
	subl	%ebp, %r11d
	imull	$10000, %r11d, %r11d
	subl	%r11d, %eax
	movl	%r10d, %r11d
	movl	%eax, 40(%rdx)
	movslq	%r10d, %rax
	sarl	$31, %r11d
	imulq	$1759218605, %rax, %rax
	sarq	$44, %rax
	subl	%r11d, %eax
	movl	%r10d, %r11d
	imull	$10000, %eax, %eax
	subl	%eax, %r11d
	movl	12(%rdx), %eax
	movl	%r11d, 44(%rdx)
	addl	%r10d, %eax
	addl	%r9d, %eax
	addl	4(%rdx), %eax
	addq	$1, %rcx
	addq	$32, %rdx
	movslq	%eax, %r9
	movl	%eax, %r10d
	imulq	$1759218605, %r9, %r9
	sarl	$31, %r10d
	sarq	$44, %r9
	subl	%r10d, %r9d
	imull	$10000, %r9d, %r9d
	subl	%r9d, %eax
	movl	%r8d, %r9d
	movl	%eax, 16(%rdx)
	movslq	%r8d, %rax
	sarl	$31, %r9d
	imulq	$1759218605, %rax, %rax
	sarq	$44, %rax
	subl	%r9d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %r8d
	movl	%r8d, 20(%rdx)
	cmpq	%rcx, %rdi
	je	.L18
.L9:
	movslq	(%rbx,%rcx,4), %rbp
	leal	-1(%rcx), %r11d
	leal	1(%rbp), %r8d
	movl	%ebp, %r12d
	movslq	%r8d, %rax
	movl	%r8d, %r10d
	imulq	$1431655766, %rax, %rax
	sarl	$31, %r10d
	shrq	$32, %rax
	subl	%r10d, %eax
	movl	%ebp, %r10d
	leal	(%rax,%rax,2), %eax
	sarl	$31, %r10d
	subl	%eax, %r8d
	imulq	$1431655766, %rbp, %rax
	addl	$1, %r8d
	shrq	$32, %rax
	subl	%r10d, %eax
	leal	(%rax,%rax,2), %eax
	subl	%eax, %r12d
	addl	$1, %r12d
	testl	%ebp, %ebp
	je	.L19
	movslq	%r11d, %r11
	movslq	%r12d, %r9
	movslq	%r8d, %r8
	movslq	%ecx, %rax
	salq	$2, %r11
	leaq	0(%rbp,%rax,4), %r10
	addq	%r11, %r8
	addq	%r11, %r9
	addq	%rbp, %r11
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %r12
	movl	%eax, %r13d
	imulq	$1759218605, %r12, %r12
	sarl	$31, %r13d
	sarq	$44, %r12
	subl	%r13d, %r12d
	imull	$10000, %r12d, %r12d
	subl	%r12d, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %rbp
	imulq	$1759218605, %rax, %rax
	movl	%ebp, %r12d
	sarl	$31, %r12d
	sarq	$44, %rax
	subl	%r12d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %ebp
	movl	%ebp, 436(%rsp,%r10,8)
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %rbp
	movl	%eax, %r12d
	imulq	$1759218605, %rbp, %rbp
	sarl	$31, %r12d
	sarq	$44, %rbp
	subl	%r12d, %ebp
	imull	$10000, %ebp, %ebp
	subl	%ebp, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %rbp
	imulq	$1759218605, %rax, %rax
	movl	%ebp, %r12d
	sarl	$31, %r12d
	sarq	$44, %rax
	subl	%r12d, %eax
	imull	$10000, %eax, %eax
	addq	$1, %rcx
	addq	$32, %rdx
	subl	%eax, %ebp
	movl	%ebp, 436(%rsp,%r10,8)
	movl	436(%rsp,%r8,8), %eax
	addl	432(%rsp,%r8,8), %eax
	addl	432(%rsp,%r9,8), %eax
	addl	436(%rsp,%r9,8), %eax
	movslq	%eax, %r8
	movl	%eax, %r9d
	imulq	$1759218605, %r8, %r8
	sarl	$31, %r9d
	sarq	$44, %r8
	subl	%r9d, %r8d
	imull	$10000, %r8d, %r8d
	subl	%r8d, %eax
	movl	%eax, 432(%rsp,%r10,8)
	movslq	432(%rsp,%r11,8), %rax
	movq	%rax, %r8
	imulq	$1759218605, %rax, %rax
	movl	%r8d, %r9d
	sarl	$31, %r9d
	sarq	$44, %rax
	subl	%r9d, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %r8d
	movl	%r8d, 436(%rsp,%r10,8)
	cmpq	%rcx, %rdi
	jne	.L9
.L18:
	movl	$4, (%rsp)
.L6:
	salq	$5, %rsi
	movl	$1, %edi
	movl	444(%rsp,%rsi), %edx
	addl	440(%rsp,%rsi), %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %ecx
	movl	%edx, %eax
	movl	448(%rsp,%rsi), %edx
	addl	452(%rsp,%rsi), %edx
	subl	%ecx, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %ecx
	movl	%edx, %eax
	movl	460(%rsp,%rsi), %edx
	addl	456(%rsp,%rsi), %edx
	leaq	.LC1(%rip), %rsi
	subl	%ecx, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1759218605, %rax, %rax
	sarl	$31, %ecx
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10000, %eax, %eax
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	3672(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$3680, %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
.L3:
	.cfi_restore_state
	movl	$1, 472(%rsp)
	movl	$1, 480(%rsp)
	movl	$1, 488(%rsp)
	jmp	.L4
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:

#include <stdio.h>
#include <string.h>

#define MOD 10000

int main(void)
{
    int dp[101][4][2];
    int i, j, k;
    int sch[101];
    int n, m;
    int ans;
    
    memset(sch, 0, sizeof(sch));
    
    scanf("%d%d", &n, &m);
    
    for (i = 0; i < m; i++){
        scanf("%d%d", &j, &k);
        sch[j] = k;
    }
    
    memset(dp, 0, sizeof(dp));
    
    for (i = 1; i <= 3; i++){
        if (sch[1]){
            dp[1][sch[1]][0] = 1;
        }
        else {
            dp[1][i][0] = 1;
        }
    }
    
    for (i = 2; i <= n; i++){
        for (j = 1; j <= 3; j++){
            if (sch[i]){
                dp[i][sch[i]][0] = (dp[i - 1][(sch[i] + 1) % 3 + 1][0] + dp[i - 1][(sch[i] + 1) % 3 + 1][1] + dp[i - 1][sch[i] % 3 + 1][0] + dp[i - 1][sch[i] % 3 + 1][1]) % MOD;
                dp[i][sch[i]][1] = dp[i - 1][sch[i]][0] % MOD;
            }
            else {
                dp[i][j][0] = (dp[i - 1][(j + 1) % 3 + 1][0] + dp[i - 1][(j + 1) % 3 + 1][1] + dp[i - 1][j % 3 + 1][0] + dp[i - 1][j % 3 + 1][1]) % MOD;
                dp[i][j][1] = dp[i - 1][j][0] % MOD;
            }
        }
    }
    
    ans = 0;
    for (i = 1; i <= 3; i++){
        ans += dp[n][i][0] + dp[n][i][1];
        ans %= MOD;
    }
    
    printf("%d\n", ans);
    
    return (0);
}
5 3
3 1
1 1
4 1
 5 3
5 1
1 1
4 1
 5 3
3 2
1 1
4 1
 5 2
3 1
1 1
4 1
 9 3
5 1
1 1
4 1
 5 1
3 1
1 1
4 1
 9 3
5 1
1 1
4 2
 5 3
4 1
1 1
4 1
 9 3
5 1
1 2
4 2
 5 3
5 2
1 1
4 2

4
 6
 9
 16
 264
 60
 420
 22
 480
 5

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>
#include <string.h>

#define MOD 10000

int main(void)
{
    int dp[101][4][2];
    int i, j, k;
    int sch[101];
    int n, m;
    int ans;
    
    memset(sch, 0, sizeof(sch));
    
    scanf("%d%d", &n, &m);
    
    for (i = 0; i < m; i++){
        scanf("%d%d", &j, &k);
        sch[j] = k;
    }
    
    memset(dp, 0, sizeof(dp));
    
    for (i = 1; i <= 3; i++){
        if (sch[1]){
            dp[1][sch[1]][0] = 1;
        }
        else {
            dp[1][i][0] = 1;
        }
    }
    
    for (i = 2; i <= n; i++){
        for (j = 1; j <= 3; j++){
            if (sch[i]){
                dp[i][sch[i]][0] = (dp[i - 1][(sch[i] + 1) % 3 + 1][0] + dp[i - 1][(sch[i] + 1) % 3 + 1][1] + dp[i - 1][sch[i] % 3 + 1][0] + dp[i - 1][sch[i] % 3 + 1][1]) % MOD;
                dp[i][sch[i]][1] = dp[i - 1][sch[i]][0] % MOD;
            }
            else {
                dp[i][j][0] = (dp[i - 1][(j + 1) % 3 + 1][0] + dp[i - 1][(j + 1) % 3 + 1][1] + dp[i - 1][j % 3 + 1][0] + dp[i - 1][j % 3 + 1][1]) % MOD;
                dp[i][j][1] = dp[i - 1][j][0] % MOD;
            }
        }
    }
    
    ans = 0;
    for (i = 1; i <= 3; i++){
        ans += dp[n][i][0] + dp[n][i][1];
        ans %= MOD;
    }
    
    printf("%d\n", ans);
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.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	$3696, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3664(%rbp), %rax
	movl	$404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-3676(%rbp), %rdx
	leaq	-3680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3672(%rbp)
	jmp	.L2
.L3:
	leaq	-3684(%rbp), %rdx
	leaq	-3688(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3688(%rbp), %eax
	movl	-3684(%rbp), %edx
	cltq
	movl	%edx, -3664(%rbp,%rax,4)
	addl	$1, -3672(%rbp)
.L2:
	movl	-3676(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jl	.L3
	leaq	-3248(%rbp), %rax
	movl	$3232, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -3672(%rbp)
	jmp	.L4
.L7:
	movl	-3660(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movl	-3660(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
	jmp	.L6
.L5:
	movl	-3672(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
.L6:
	addl	$1, -3672(%rbp)
.L4:
	cmpl	$3, -3672(%rbp)
	jle	.L7
	movl	$2, -3672(%rbp)
	jmp	.L8
.L13:
	movl	$1, -3688(%rbp)
	jmp	.L9
.L12:
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
	jmp	.L11
.L10:
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3688(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
.L11:
	movl	-3688(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3688(%rbp)
.L9:
	movl	-3688(%rbp), %eax
	cmpl	$3, %eax
	jle	.L12
	addl	$1, -3672(%rbp)
.L8:
	movl	-3680(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jle	.L13
	movl	$0, -3668(%rbp)
	movl	$1, -3672(%rbp)
	jmp	.L14
.L15:
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %ecx
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	addl	%eax, -3668(%rbp)
	movl	-3668(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1759218605, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -3668(%rbp)
	addl	$1, -3672(%rbp)
.L14:
	cmpl	$3, -3672(%rbp)
	jle	.L15
	movl	-3668(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.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	$3696, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-3664(%rbp), %rax
	movl	$404, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-3676(%rbp), %rdx
	leaq	-3680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3672(%rbp)
	jmp	.L2
.L3:
	leaq	-3684(%rbp), %rdx
	leaq	-3688(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3688(%rbp), %eax
	movl	-3684(%rbp), %edx
	cltq
	movl	%edx, -3664(%rbp,%rax,4)
	addl	$1, -3672(%rbp)
.L2:
	movl	-3676(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jl	.L3
	leaq	-3248(%rbp), %rax
	movl	$3232, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -3672(%rbp)
	jmp	.L4
.L7:
	movl	-3660(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movl	-3660(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
	jmp	.L6
.L5:
	movl	-3672(%rbp), %eax
	cltq
	addq	$4, %rax
	movl	$1, -3248(%rbp,%rax,8)
.L6:
	addl	$1, -3672(%rbp)
.L4:
	cmpl	$3, -3672(%rbp)
	jle	.L7
	movl	$2, -3672(%rbp)
	jmp	.L8
.L13:
	movl	$1, -3688(%rbp)
	jmp	.L9
.L12:
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L10
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3672(%rbp), %eax
	cltq
	movl	-3664(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
	jmp	.L11
.L10:
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %eax
	addl	%eax, %edi
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-3688(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movslq	%esi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	leal	(%rdi,%rax), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3248(%rbp,%rdx,8)
	movl	-3672(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-3688(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-3248(%rbp,%rax,8), %edx
	movl	-3688(%rbp), %ecx
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	imull	$10000, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movslq	%ecx, %rcx
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	%eax, -3244(%rbp,%rdx,8)
.L11:
	movl	-3688(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -3688(%rbp)
.L9:
	movl	-3688(%rbp), %eax
	cmpl	$3, %eax
	jle	.L12
	addl	$1, -3672(%rbp)
.L8:
	movl	-3680(%rbp), %eax
	cmpl	%eax, -3672(%rbp)
	jle	.L13
	movl	$0, -3668(%rbp)
	movl	$1, -3672(%rbp)
	jmp	.L14
.L15:
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3248(%rbp,%rax,8), %ecx
	movl	-3680(%rbp), %eax
	movl	-3672(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-3244(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	addl	%eax, -3668(%rbp)
	movl	-3668(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1759218605, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10000, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -3668(%rbp)
	addl	$1, -3672(%rbp)
.L14:
	cmpl	$3, -3672(%rbp)
	jle	.L15
	movl	-3668(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
