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>
int main(void){
    int dp[1000][8],n,i,j,k,ans=0;
    char res[1001];
    scanf("%d",&n);
    scanf("%s",res);
    for(i=0; i<n; i++){
        switch(res[i]){
            case 'J':
                res[i]=4;
                break;
            case 'O':
                res[i]=2;
                break;
            case 'I':
                res[i]=1;
                break;
        }
    }
    for(i=0; i<8; i++){
        if((i&4) != 0 && (i&res[0]) != 0){
            dp[0][i]=1;
        }else{
            dp[0][i]=0;
        }
        for(j=1; j<n; j++){
            dp[j][i]=0;
        }
    }
    for(i=1; i<n; i++){
        for(j=0; j<8; j++){
            for(k=0; k<8; k++){
                if((j&k)!=0 && (res[i]&k)!=0){
                    dp[i][k] = (dp[i][k] + dp[i-1][j])%10007;
                }
            }
        }
    }
    n--;
    for(i=0; i<8; i++){
        ans += dp[n][i];
        ans %= 10007;
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -33028(%rbp)
	leaq	-33044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -33040(%rbp)
	jmp	.L2
.L6:
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	cmpl	$79, %eax
	je	.L3
	cmpl	$79, %eax
	jg	.L4
	cmpl	$73, %eax
	je	.L5
	cmpl	$74, %eax
	jne	.L4
	movl	-33040(%rbp), %eax
	cltq
	movb	$4, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-33040(%rbp), %eax
	cltq
	movb	$2, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-33040(%rbp), %eax
	cltq
	movb	$1, -1024(%rbp,%rax)
	nop
.L4:
	addl	$1, -33040(%rbp)
.L2:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L6
	movl	$0, -33040(%rbp)
	jmp	.L7
.L12:
	movl	-33040(%rbp), %eax
	andl	$4, %eax
	testl	%eax, %eax
	je	.L8
	movzbl	-1024(%rbp), %eax
	movsbl	%al, %eax
	andl	-33040(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	-33040(%rbp), %eax
	cltq
	movl	$1, -33024(%rbp,%rax,4)
	jmp	.L9
.L8:
	movl	-33040(%rbp), %eax
	cltq
	movl	$0, -33024(%rbp,%rax,4)
.L9:
	movl	$1, -33036(%rbp)
	jmp	.L10
.L11:
	movl	-33040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33036(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	$0, -33024(%rbp,%rax,4)
	addl	$1, -33036(%rbp)
.L10:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33036(%rbp)
	jl	.L11
	addl	$1, -33040(%rbp)
.L7:
	cmpl	$7, -33040(%rbp)
	jle	.L12
	movl	$1, -33040(%rbp)
	jmp	.L13
.L19:
	movl	$0, -33036(%rbp)
	jmp	.L14
.L18:
	movl	$0, -33032(%rbp)
	jmp	.L15
.L17:
	movl	-33036(%rbp), %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33032(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33040(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %ecx
	movl	-33040(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-33036(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	-33024(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1757988013, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$10007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-33032(%rbp), %edx
	movslq	%edx, %rcx
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movl	%eax, -33024(%rbp,%rdx,4)
.L16:
	addl	$1, -33032(%rbp)
.L15:
	cmpl	$7, -33032(%rbp)
	jle	.L17
	addl	$1, -33036(%rbp)
.L14:
	cmpl	$7, -33036(%rbp)
	jle	.L18
	addl	$1, -33040(%rbp)
.L13:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L19
	movl	-33044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -33044(%rbp)
	movl	$0, -33040(%rbp)
	jmp	.L20
.L21:
	movl	-33044(%rbp), %eax
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %eax
	addl	%eax, -33028(%rbp)
	movl	-33028(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1757988013, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -33028(%rbp)
	addl	$1, -33040(%rbp)
.L20:
	cmpl	$7, -33040(%rbp)
	jle	.L21
	movl	-33028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$296, %rsp
	.cfi_def_cfa_offset 33120
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 33048(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32032(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L74
	leal	-1(%r8), %edx
	movq	%rbx, %rax
	movl	%edx, 12(%rsp)
	leaq	32033(%rsp,%rdx), %rcx
	jmp	.L8
.L76:
	cmpb	$73, %dl
	je	.L75
.L7:
	addq	$1, %rax
	cmpq	%rcx, %rax
	je	.L9
.L8:
	movzbl	(%rax), %edx
	cmpb	$74, %dl
	je	.L4
	cmpb	$79, %dl
	jne	.L76
	movb	$2, (%rax)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L8
.L9:
	leal	-2(%r8), %eax
	leaq	32(%rsp), %rdx
	xorl	%esi, %esi
	movsbl	32032(%rsp), %r9d
	salq	$5, %rax
	movq	%rdx, %rdi
	leaq	64(%rsp,%rax), %r15
	movq	%r15, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%esi, %eax
	andl	$4, %eax
	je	.L10
	xorl	%eax, %eax
	testl	%esi, %r9d
	setne	%al
.L10:
	movl	%eax, (%rdi)
	movq	%rdi, %rax
	cmpl	$1, %r8d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$0, 32(%rax)
	addq	$32, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L13:
	addl	$1, %esi
	addq	$4, %rdi
	addq	$4, %rcx
	cmpl	$8, %esi
	jne	.L3
	leaq	32033(%rsp), %r14
	cmpl	$1, %r8d
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movzbl	(%r14), %r8d
	movq	%rdx, %rcx
	xorl	%eax, %eax
	movl	%r8d, %r12d
	movl	%r8d, %ebp
	movl	%r8d, %ebx
	movl	%r8d, %r11d
	movl	%r8d, %r10d
	movl	%r8d, %r9d
	andl	$7, %r12d
	andl	$2, %ebp
	andl	$3, %ebx
	andl	$4, %r11d
	andl	$5, %r10d
	andl	$6, %r9d
	andl	$1, %r8d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L78:
	testb	%r10b, %r10b
	je	.L21
	movl	(%rcx), %edi
	addl	52(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 52(%rdx)
.L21:
	movl	%eax, %esi
	addl	$1, %eax
	andl	$6, %esi
	testl	%esi, %esi
	je	.L23
.L30:
	testb	%r9b, %r9b
	je	.L23
	movl	(%rcx), %edi
	addl	56(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 56(%rdx)
.L23:
	testb	%r12b, %r12b
	je	.L29
	movl	(%rcx), %edi
	addl	60(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 60(%rdx)
.L29:
	cmpl	$8, %eax
	je	.L77
	testb	$1, %al
	jne	.L24
.L16:
	addq	$4, %rcx
.L15:
	testb	$2, %al
	je	.L17
	testb	%bpl, %bpl
	je	.L17
	movl	(%rcx), %edi
	addl	40(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 40(%rdx)
.L17:
	testb	$3, %al
	je	.L18
	testb	%bl, %bl
	je	.L18
	movl	(%rcx), %edi
	addl	44(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 44(%rdx)
.L18:
	testb	$4, %al
	je	.L19
	testb	%r11b, %r11b
	je	.L19
	movl	(%rcx), %edi
	addl	48(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 48(%rdx)
.L19:
	testb	$5, %al
	jne	.L78
	movl	%eax, %esi
	addl	$1, %eax
	andl	$6, %esi
	testl	%esi, %esi
	jne	.L30
	cmpl	$1, %eax
	jne	.L23
.L24:
	testb	%r8b, %r8b
	je	.L16
	movl	4(%rcx), %edi
	addl	36(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 36(%rdx)
	jmp	.L16
.L4:
	movb	$4, (%rax)
	jmp	.L7
.L75:
	movb	$1, (%rax)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L77:
	addq	$32, %rdx
	addq	$1, %r14
	cmpq	%r15, %rdx
	jne	.L26
.L27:
	movslq	12(%rsp), %rcx
	movl	$1, %edi
	movl	%ecx, 28(%rsp)
	salq	$5, %rcx
	movslq	32(%rsp,%rcx), %rax
	movq	%rax, %rdx
	imulq	$1757988013, %rax, %rax
	movl	%edx, %esi
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	36(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	40(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	44(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	48(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	52(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	56(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	60(%rsp,%rcx), %eax
	leaq	.LC2(%rip), %rsi
	movslq	%eax, %rcx
	cltd
	imulq	$1757988013, %rcx, %rcx
	sarq	$44, %rcx
	subl	%edx, %ecx
	imull	$10007, %ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	33048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$33064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L74:
	.cfi_restore_state
	leal	-1(%r8), %eax
	movl	%eax, 12(%rsp)
	jmp	.L9
.L79:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$296, %rsp
	.cfi_def_cfa_offset 33120
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 33048(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32032(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L74
	leal	-1(%r8), %edx
	movq	%rbx, %rax
	movl	%edx, 12(%rsp)
	leaq	32033(%rsp,%rdx), %rcx
	jmp	.L8
.L76:
	cmpb	$73, %dl
	je	.L75
.L7:
	addq	$1, %rax
	cmpq	%rcx, %rax
	je	.L9
.L8:
	movzbl	(%rax), %edx
	cmpb	$74, %dl
	je	.L4
	cmpb	$79, %dl
	jne	.L76
	movb	$2, (%rax)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L8
.L9:
	leal	-2(%r8), %eax
	leaq	32(%rsp), %rdx
	xorl	%esi, %esi
	movsbl	32032(%rsp), %r9d
	salq	$5, %rax
	movq	%rdx, %rdi
	leaq	64(%rsp,%rax), %r15
	movq	%r15, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%esi, %eax
	andl	$4, %eax
	je	.L10
	xorl	%eax, %eax
	testl	%esi, %r9d
	setne	%al
.L10:
	movl	%eax, (%rdi)
	movq	%rdi, %rax
	cmpl	$1, %r8d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$0, 32(%rax)
	addq	$32, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L13:
	addl	$1, %esi
	addq	$4, %rdi
	addq	$4, %rcx
	cmpl	$8, %esi
	jne	.L3
	leaq	32033(%rsp), %r14
	cmpl	$1, %r8d
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movzbl	(%r14), %r8d
	movq	%rdx, %rcx
	xorl	%eax, %eax
	movl	%r8d, %r12d
	movl	%r8d, %ebp
	movl	%r8d, %ebx
	movl	%r8d, %r11d
	movl	%r8d, %r10d
	movl	%r8d, %r9d
	andl	$7, %r12d
	andl	$2, %ebp
	andl	$3, %ebx
	andl	$4, %r11d
	andl	$5, %r10d
	andl	$6, %r9d
	andl	$1, %r8d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L78:
	testb	%r10b, %r10b
	je	.L21
	movl	(%rcx), %edi
	addl	52(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 52(%rdx)
.L21:
	movl	%eax, %esi
	addl	$1, %eax
	andl	$6, %esi
	testl	%esi, %esi
	je	.L23
.L30:
	testb	%r9b, %r9b
	je	.L23
	movl	(%rcx), %edi
	addl	56(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 56(%rdx)
.L23:
	testb	%r12b, %r12b
	je	.L29
	movl	(%rcx), %edi
	addl	60(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 60(%rdx)
.L29:
	cmpl	$8, %eax
	je	.L77
	testb	$1, %al
	jne	.L24
.L16:
	addq	$4, %rcx
.L15:
	testb	$2, %al
	je	.L17
	testb	%bpl, %bpl
	je	.L17
	movl	(%rcx), %edi
	addl	40(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 40(%rdx)
.L17:
	testb	$3, %al
	je	.L18
	testb	%bl, %bl
	je	.L18
	movl	(%rcx), %edi
	addl	44(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 44(%rdx)
.L18:
	testb	$4, %al
	je	.L19
	testb	%r11b, %r11b
	je	.L19
	movl	(%rcx), %edi
	addl	48(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 48(%rdx)
.L19:
	testb	$5, %al
	jne	.L78
	movl	%eax, %esi
	addl	$1, %eax
	andl	$6, %esi
	testl	%esi, %esi
	jne	.L30
	cmpl	$1, %eax
	jne	.L23
.L24:
	testb	%r8b, %r8b
	je	.L16
	movl	4(%rcx), %edi
	addl	36(%rdx), %edi
	movslq	%edi, %rsi
	movl	%edi, %r13d
	imulq	$1757988013, %rsi, %rsi
	sarl	$31, %r13d
	sarq	$44, %rsi
	subl	%r13d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movl	%edi, 36(%rdx)
	jmp	.L16
.L4:
	movb	$4, (%rax)
	jmp	.L7
.L75:
	movb	$1, (%rax)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L77:
	addq	$32, %rdx
	addq	$1, %r14
	cmpq	%r15, %rdx
	jne	.L26
.L27:
	movslq	12(%rsp), %rcx
	movl	$1, %edi
	movl	%ecx, 28(%rsp)
	salq	$5, %rcx
	movslq	32(%rsp,%rcx), %rax
	movq	%rax, %rdx
	imulq	$1757988013, %rax, %rax
	movl	%edx, %esi
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	36(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	40(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	44(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	48(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	52(%rsp,%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %esi
	imulq	$1757988013, %rdx, %rdx
	sarl	$31, %esi
	sarq	$44, %rdx
	subl	%esi, %edx
	imull	$10007, %edx, %esi
	movl	56(%rsp,%rcx), %edx
	subl	%esi, %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %esi
	imulq	$1757988013, %rax, %rax
	sarl	$31, %esi
	sarq	$44, %rax
	subl	%esi, %eax
	imull	$10007, %eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	addl	60(%rsp,%rcx), %eax
	leaq	.LC2(%rip), %rsi
	movslq	%eax, %rcx
	cltd
	imulq	$1757988013, %rcx, %rcx
	sarq	$44, %rcx
	subl	%edx, %ecx
	imull	$10007, %ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	33048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	addq	$33064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L74:
	.cfi_restore_state
	leal	-1(%r8), %eax
	movl	%eax, 12(%rsp)
	jmp	.L9
.L79:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>
int main(void){
    int dp[1000][8],n,i,j,k,ans=0;
    char res[1001];
    scanf("%d",&n);
    scanf("%s",res);
    for(i=0; i<n; i++){
        switch(res[i]){
            case 'J':
                res[i]=4;
                break;
            case 'O':
                res[i]=2;
                break;
            case 'I':
                res[i]=1;
                break;
        }
    }
    for(i=0; i<8; i++){
        if((i&4) != 0 && (i&res[0]) != 0){
            dp[0][i]=1;
        }else{
            dp[0][i]=0;
        }
        for(j=1; j<n; j++){
            dp[j][i]=0;
        }
    }
    for(i=1; i<n; i++){
        for(j=0; j<8; j++){
            for(k=0; k<8; k++){
                if((j&k)!=0 && (res[i]&k)!=0){
                    dp[i][k] = (dp[i][k] + dp[i-1][j])%10007;
                }
            }
        }
    }
    n--;
    for(i=0; i<8; i++){
        ans += dp[n][i];
        ans %= 10007;
    }
    printf("%d\n",ans);
    return 0;
}
2
OI

7

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>
int main(void){
    int dp[1000][8],n,i,j,k,ans=0;
    char res[1001];
    scanf("%d",&n);
    scanf("%s",res);
    for(i=0; i<n; i++){
        switch(res[i]){
            case 'J':
                res[i]=4;
                break;
            case 'O':
                res[i]=2;
                break;
            case 'I':
                res[i]=1;
                break;
        }
    }
    for(i=0; i<8; i++){
        if((i&4) != 0 && (i&res[0]) != 0){
            dp[0][i]=1;
        }else{
            dp[0][i]=0;
        }
        for(j=1; j<n; j++){
            dp[j][i]=0;
        }
    }
    for(i=1; i<n; i++){
        for(j=0; j<8; j++){
            for(k=0; k<8; k++){
                if((j&k)!=0 && (res[i]&k)!=0){
                    dp[i][k] = (dp[i][k] + dp[i-1][j])%10007;
                }
            }
        }
    }
    n--;
    for(i=0; i<8; i++){
        ans += dp[n][i];
        ans %= 10007;
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -33028(%rbp)
	leaq	-33044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -33040(%rbp)
	jmp	.L2
.L6:
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	cmpl	$79, %eax
	je	.L3
	cmpl	$79, %eax
	jg	.L4
	cmpl	$73, %eax
	je	.L5
	cmpl	$74, %eax
	jne	.L4
	movl	-33040(%rbp), %eax
	cltq
	movb	$4, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-33040(%rbp), %eax
	cltq
	movb	$2, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-33040(%rbp), %eax
	cltq
	movb	$1, -1024(%rbp,%rax)
	nop
.L4:
	addl	$1, -33040(%rbp)
.L2:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L6
	movl	$0, -33040(%rbp)
	jmp	.L7
.L12:
	movl	-33040(%rbp), %eax
	andl	$4, %eax
	testl	%eax, %eax
	je	.L8
	movzbl	-1024(%rbp), %eax
	movsbl	%al, %eax
	andl	-33040(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	-33040(%rbp), %eax
	cltq
	movl	$1, -33024(%rbp,%rax,4)
	jmp	.L9
.L8:
	movl	-33040(%rbp), %eax
	cltq
	movl	$0, -33024(%rbp,%rax,4)
.L9:
	movl	$1, -33036(%rbp)
	jmp	.L10
.L11:
	movl	-33040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33036(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	$0, -33024(%rbp,%rax,4)
	addl	$1, -33036(%rbp)
.L10:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33036(%rbp)
	jl	.L11
	addl	$1, -33040(%rbp)
.L7:
	cmpl	$7, -33040(%rbp)
	jle	.L12
	movl	$1, -33040(%rbp)
	jmp	.L13
.L19:
	movl	$0, -33036(%rbp)
	jmp	.L14
.L18:
	movl	$0, -33032(%rbp)
	jmp	.L15
.L17:
	movl	-33036(%rbp), %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33032(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33040(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %ecx
	movl	-33040(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-33036(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	-33024(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1757988013, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$10007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-33032(%rbp), %edx
	movslq	%edx, %rcx
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movl	%eax, -33024(%rbp,%rdx,4)
.L16:
	addl	$1, -33032(%rbp)
.L15:
	cmpl	$7, -33032(%rbp)
	jle	.L17
	addl	$1, -33036(%rbp)
.L14:
	cmpl	$7, -33036(%rbp)
	jle	.L18
	addl	$1, -33040(%rbp)
.L13:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L19
	movl	-33044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -33044(%rbp)
	movl	$0, -33040(%rbp)
	jmp	.L20
.L21:
	movl	-33044(%rbp), %eax
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %eax
	addl	%eax, -33028(%rbp)
	movl	-33028(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1757988013, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -33028(%rbp)
	addl	$1, -33040(%rbp)
.L20:
	cmpl	$7, -33040(%rbp)
	jle	.L21
	movl	-33028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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"
.LC1:
	.string	"%s"
.LC2:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$288, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -33028(%rbp)
	leaq	-33044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -33040(%rbp)
	jmp	.L2
.L6:
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	cmpl	$79, %eax
	je	.L3
	cmpl	$79, %eax
	jg	.L4
	cmpl	$73, %eax
	je	.L5
	cmpl	$74, %eax
	jne	.L4
	movl	-33040(%rbp), %eax
	cltq
	movb	$4, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-33040(%rbp), %eax
	cltq
	movb	$2, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-33040(%rbp), %eax
	cltq
	movb	$1, -1024(%rbp,%rax)
	nop
.L4:
	addl	$1, -33040(%rbp)
.L2:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L6
	movl	$0, -33040(%rbp)
	jmp	.L7
.L12:
	movl	-33040(%rbp), %eax
	andl	$4, %eax
	testl	%eax, %eax
	je	.L8
	movzbl	-1024(%rbp), %eax
	movsbl	%al, %eax
	andl	-33040(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	-33040(%rbp), %eax
	cltq
	movl	$1, -33024(%rbp,%rax,4)
	jmp	.L9
.L8:
	movl	-33040(%rbp), %eax
	cltq
	movl	$0, -33024(%rbp,%rax,4)
.L9:
	movl	$1, -33036(%rbp)
	jmp	.L10
.L11:
	movl	-33040(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33036(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	$0, -33024(%rbp,%rax,4)
	addl	$1, -33036(%rbp)
.L10:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33036(%rbp)
	jl	.L11
	addl	$1, -33040(%rbp)
.L7:
	cmpl	$7, -33040(%rbp)
	jle	.L12
	movl	$1, -33040(%rbp)
	jmp	.L13
.L19:
	movl	$0, -33036(%rbp)
	jmp	.L14
.L18:
	movl	$0, -33032(%rbp)
	jmp	.L15
.L17:
	movl	-33036(%rbp), %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33040(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	movsbl	%al, %eax
	andl	-33032(%rbp), %eax
	testl	%eax, %eax
	je	.L16
	movl	-33032(%rbp), %eax
	movslq	%eax, %rdx
	movl	-33040(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %ecx
	movl	-33040(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-33036(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	-33024(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1757988013, %rax, %rax
	shrq	$32, %rax
	sarl	$12, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$10007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-33032(%rbp), %edx
	movslq	%edx, %rcx
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movl	%eax, -33024(%rbp,%rdx,4)
.L16:
	addl	$1, -33032(%rbp)
.L15:
	cmpl	$7, -33032(%rbp)
	jle	.L17
	addl	$1, -33036(%rbp)
.L14:
	cmpl	$7, -33036(%rbp)
	jle	.L18
	addl	$1, -33040(%rbp)
.L13:
	movl	-33044(%rbp), %eax
	cmpl	%eax, -33040(%rbp)
	jl	.L19
	movl	-33044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -33044(%rbp)
	movl	$0, -33040(%rbp)
	jmp	.L20
.L21:
	movl	-33044(%rbp), %eax
	movl	-33040(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-33024(%rbp,%rax,4), %eax
	addl	%eax, -33028(%rbp)
	movl	-33028(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1757988013, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$12, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$10007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -33028(%rbp)
	addl	$1, -33040(%rbp)
.L20:
	cmpl	$7, -33040(%rbp)
	jle	.L21
	movl	-33028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	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:
