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

```c
// Aizu Vol-5 0595: Schedule
// 2017.8.31 bal4u@uu

#include <stdio.h>

#define J 1
#define O 2
#define I 4
#define JOI 7

int p[2][8];
char a[1003];

int main()
{
	int n, i, j, x, x2, k1, k2, ans;

	scanf("%d%s", &n, a + 1);
	for (i = 1; i <= n; i++) {
		if      (a[i] == 'J') a[i] = J;
		else if (a[i] == 'O') a[i] = O;
		else                  a[i] = I;
	}
	if (a[1] == J) p[0][J] = p[0][J|O] = p[0][J|I] = p[0][JOI] = 1;
	else           p[0][J|a[1]] = p[0][JOI] = 1;
	for (k1 = 0, k2 = 1, i = 2; i <= n; i++, k1 = k2, k2 = !k2) {
		for (j = 0; j < 8; j++) p[k2][j] = 0;
		x = a[i], x2 = a[i-1];
		if (x2 == x) {
			int t = p[k1][x|J] + p[k1][x|O] + p[k1][x|I] + p[k1][JOI];
			p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
		} else {
			int t, x3;
			t = p[k1][x2], p[k2][x|x2] += t, p[k2][JOI] += t;
			t = p[k1][x|x2], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t,	p[k2][JOI] += t;
			t = p[k1][JOI], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
			x3 = ((JOI & ~x) & ~x2) & JOI;
			t = p[k1][x2|x3]; p[k2][x|x2] += t, p[k2][x|x3] += t, p[k2][JOI] += t;
		}
		for (j = 0; j < 8; j++) p[k2][j] %= 10007;
	}
	for (ans = 0, j = 0; j < 8; j++) ans += p[k1][j];
	printf("%d\n", ans % 10007);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 64
p:
	.zero	64
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1003
a:
	.zero	1003
	.section	.rodata
.LC0:
	.string	"%d%s"
.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	1+a(%rip), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -48(%rbp)
	jmp	.L2
.L6:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$74, %al
	jne	.L3
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	jmp	.L4
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$79, %al
	jne	.L5
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$2, (%rax,%rdx)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$4, (%rax,%rdx)
.L4:
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L6
	movzbl	1+a(%rip), %eax
	cmpb	$1, %al
	jne	.L7
	movl	$1, 28+p(%rip)
	movl	28+p(%rip), %eax
	movl	%eax, 20+p(%rip)
	movl	20+p(%rip), %eax
	movl	%eax, 12+p(%rip)
	movl	12+p(%rip), %eax
	movl	%eax, 4+p(%rip)
	jmp	.L8
.L7:
	movl	$1, 28+p(%rip)
	movzbl	1+a(%rip), %eax
	orl	$1, %eax
	movsbl	%al, %edx
	movl	28+p(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$2, -48(%rbp)
	jmp	.L9
.L16:
	movl	$0, -44(%rbp)
	jmp	.L10
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -44(%rbp)
.L10:
	cmpl	$7, -44(%rbp)
	jle	.L11
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jne	.L12
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	notl	%eax
	andl	$7, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	notl	%eax
	andl	%edx, %eax
	andl	$7, %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L13:
	movl	$0, -44(%rbp)
	jmp	.L14
.L15:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%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	-44(%rbp), %edx
	movslq	%edx, %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -44(%rbp)
.L14:
	cmpl	$7, -44(%rbp)
	jle	.L15
	addl	$1, -48(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -36(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -36(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	movl	$0, -44(%rbp)
	jmp	.L17
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -32(%rbp)
	addl	$1, -44(%rbp)
.L17:
	cmpl	$7, -44(%rbp)
	jle	.L18
	movl	-32(%rbp), %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	%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	.L20
	call	__stack_chk_fail@PLT
.L20:
	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%s"
.LC7:
	.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
	leaq	.LC0(%rip), %rdi
	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	1+a(%rip), %rbx
	movq	%rbx, %rdx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %esi
	testl	%esi, %esi
	jle	.L8
	leal	-1(%rsi), %eax
	cmpl	$14, %eax
	jbe	.L21
	movl	%esi, %edx
	leaq	16(%rbx), %rcx
	movq	%rbx, %rax
	movdqa	.LC1(%rip), %xmm9
	shrl	$4, %edx
	movdqa	.LC3(%rip), %xmm4
	pcmpeqd	%xmm5, %xmm5
	movdqa	.LC2(%rip), %xmm8
	subl	$1, %edx
	movdqa	.LC4(%rip), %xmm7
	movdqa	.LC5(%rip), %xmm6
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm2
	movdqa	%xmm8, %xmm0
	movdqa	%xmm4, %xmm10
	addq	$16, %rax
	pcmpeqb	%xmm9, %xmm2
	movdqa	%xmm2, %xmm3
	pand	%xmm2, %xmm0
	pandn	%xmm4, %xmm3
	por	%xmm0, %xmm3
	movdqu	-16(%rax), %xmm0
	pcmpeqb	%xmm7, %xmm0
	movdqa	%xmm0, %xmm1
	pand	%xmm0, %xmm10
	por	%xmm2, %xmm0
	pandn	%xmm3, %xmm1
	pxor	%xmm5, %xmm0
	movdqa	%xmm6, %xmm2
	por	%xmm10, %xmm1
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L6
	movl	%esi, %edx
	andl	$-16, %edx
	leal	1(%rdx), %eax
	cmpl	%esi, %edx
	je	.L8
.L5:
	cltq
	leaq	a(%rip), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$79, %dl
	setne	%dl
	leal	2(%rdx,%rdx), %edx
	movb	%dl, (%rcx,%rax)
	addq	$1, %rax
	cmpl	%eax, %esi
	jl	.L8
.L11:
	movzbl	(%rcx,%rax), %edx
	cmpb	$74, %dl
	jne	.L10
	movl	$1, %edx
	movb	%dl, (%rcx,%rax)
	addq	$1, %rax
	cmpl	%eax, %esi
	jge	.L11
.L8:
	movzbl	1+a(%rip), %r11d
	cmpb	$1, %r11b
	je	.L30
	movl	%r11d, %edx
	leaq	p(%rip), %rax
	movl	$1, 28+p(%rip)
	orl	$1, %edx
	movsbq	%dl, %rdx
	movl	$1, (%rax,%rdx,4)
.L15:
	xorl	%ebp, %ebp
	cmpl	$1, %esi
	jle	.L14
	leal	-2(%rsi), %edx
	pxor	%xmm4, %xmm4
	movl	$1, %r15d
	xorl	%r10d, %r10d
	leaq	2+a(%rip), %r13
	movdqa	.LC6(%rip), %xmm3
	movdqa	%xmm4, %xmm5
	leaq	1(%r13), %rcx
	leaq	(%rcx,%rdx), %rbx
	pcmpgtd	%xmm3, %xmm5
	movq	%rbx, 24(%rsp)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%r10d, %r14
	movslq	%edi, %r9
	orl	%r11d, %r8d
	leaq	0(,%r14,8), %r10
	movq	%r14, 16(%rsp)
	movsbq	%r8b, %r8
	addq	%r10, %r9
	movl	(%rax,%r9,4), %r14d
	leaq	0(,%rbp,8), %r9
	leaq	(%r9,%r8), %r12
	addq	%r9, %rsi
	addq	%r9, %rcx
	addq	%r10, %r8
	addl	%r14d, (%rax,%r12,4)
	addl	%r14d, 28(%rdx)
	movslq	12(%rsp), %r14
	movl	(%rax,%r8,4), %r8d
	addl	%r8d, (%rax,%rsi,4)
	addq	%r9, %r14
	addl	%r8d, (%rax,%rcx,4)
	addl	%r8d, (%rax,%r14,4)
	addl	%r8d, 28(%rdx)
	movq	16(%rsp), %r8
	salq	$5, %r8
	movl	28(%rax,%r8), %r8d
	addl	%r8d, (%rax,%rsi,4)
	addl	%r8d, (%rax,%rcx,4)
	addl	%r8d, (%rax,%r14,4)
	addl	%r8d, 28(%rdx)
	movl	%ebx, %r8d
	notl	%r8d
	andl	$7, %r8d
	movl	%r8d, %ecx
	orl	%edi, %ecx
	notl	%edi
	movl	%edi, %esi
	movslq	%ecx, %rcx
	andl	%r8d, %esi
	addq	%rcx, %r10
	orl	%ebx, %esi
	movl	(%rax,%r10,4), %ecx
	addl	%ecx, (%rax,%r12,4)
	movslq	%esi, %rsi
	addq	%rsi, %r9
	addl	%ecx, (%rax,%r9,4)
	addl	28(%rdx), %ecx
.L17:
	movdqa	(%rdx), %xmm2
	movdqa	%xmm4, %xmm6
	movdqa	%xmm5, %xmm7
	addq	$1, %r13
	movslq	%r15d, %r10
	movdqa	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm0
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm0, %xmm7
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm3, %xmm1
	movdqa	%xmm2, %xmm0
	punpckhdq	%xmm2, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	movdqa	%xmm5, %xmm7
	psllq	$32, %xmm6
	pmuludq	%xmm0, %xmm7
	paddq	%xmm6, %xmm1
	movdqa	%xmm4, %xmm6
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	psllq	$32, %xmm6
	paddq	%xmm6, %xmm0
	shufps	$221, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrad	$12, %xmm1
	psrad	$31, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$2, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	movaps	%xmm2, (%rdx)
	movq	%rbp, %rdx
	salq	$5, %rdx
	addq	%rax, %rdx
	movslq	16(%rdx), %rsi
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	20(%rdx), %rsi
	movl	%edi, 16(%rdx)
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	24(%rdx), %rsi
	movl	%edi, 20(%rdx)
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	%ecx, %rsi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, 24(%rdx)
	movl	%ecx, %edi
	sarl	$31, %edi
	sarq	$44, %rsi
	subl	%edi, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %ecx
	movl	%ecx, 28(%rdx)
	movl	%r15d, %edx
	xorl	$1, %edx
	cmpq	%r13, 24(%rsp)
	je	.L14
	movl	%edx, %r15d
.L16:
	movslq	%r15d, %rbp
	movsbl	%r11b, %edi
	movq	%rbp, %rdx
	movl	%edi, %r8d
	salq	$5, %rdx
	addq	%rax, %rdx
	movaps	%xmm4, (%rdx)
	movaps	%xmm4, 16(%rdx)
	movsbl	0(%r13), %ebx
	movl	%ebx, %r9d
	movl	%ebx, %esi
	movl	%ebx, %ecx
	movl	%ebx, %r11d
	orl	$4, %r9d
	orl	$1, %esi
	orl	$2, %ecx
	movsbl	%r9b, %r14d
	movsbq	%sil, %rsi
	movsbq	%cl, %rcx
	movl	%r14d, 12(%rsp)
	cmpl	%edi, %ebx
	jne	.L27
	leaq	0(,%r10,8), %r8
	movslq	%ecx, %rdi
	salq	$5, %r10
	leaq	(%r8,%rsi), %r9
	leaq	(%r8,%rdi), %rcx
	movl	(%rax,%rcx,4), %ecx
	addl	(%rax,%r9,4), %ecx
	movslq	12(%rsp), %r9
	addq	%r9, %r8
	addl	(%rax,%r8,4), %ecx
	leaq	0(,%rbp,8), %r8
	addl	28(%rax,%r10), %ecx
	addq	%r8, %rsi
	addq	%r8, %rdi
	addq	%r9, %r8
	addl	%ecx, (%rax,%rsi,4)
	addl	%ecx, (%rax,%rdi,4)
	addl	%ecx, (%rax,%r8,4)
	addl	28(%rdx), %ecx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	salq	$5, %rbp
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	addq	%rbp, %rax
	movdqa	16(%rax), %xmm0
	paddd	(%rax), %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	movd	%xmm0, %ecx
	movslq	%edx, %rax
	sarl	$31, %ecx
	imulq	$1757988013, %rax, %rax
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10007, %eax, %eax
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$56, %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
.L30:
	.cfi_restore_state
	movl	$1, 28+p(%rip)
	leaq	p(%rip), %rax
	movl	$1, 20+p(%rip)
	movl	$1, 12+p(%rip)
	movl	$1, 4+p(%rip)
	jmp	.L15
.L21:
	movl	$1, %eax
	jmp	.L5
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1003
a:
	.zero	1003
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 64
p:
	.zero	64
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC3:
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.align 16
.LC4:
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.align 16
.LC5:
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.align 16
.LC6:
	.long	1757988013
	.long	1757988013
	.long	1757988013
	.long	1757988013
	.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%s"
.LC7:
	.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
	leaq	.LC0(%rip), %rdi
	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	1+a(%rip), %rbx
	movq	%rbx, %rdx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %esi
	testl	%esi, %esi
	jle	.L8
	leal	-1(%rsi), %eax
	cmpl	$14, %eax
	jbe	.L21
	movl	%esi, %edx
	leaq	16(%rbx), %rcx
	movq	%rbx, %rax
	movdqa	.LC1(%rip), %xmm9
	shrl	$4, %edx
	movdqa	.LC3(%rip), %xmm4
	pcmpeqd	%xmm5, %xmm5
	movdqa	.LC2(%rip), %xmm8
	subl	$1, %edx
	movdqa	.LC4(%rip), %xmm7
	movdqa	.LC5(%rip), %xmm6
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm2
	movdqa	%xmm8, %xmm0
	movdqa	%xmm4, %xmm10
	addq	$16, %rax
	pcmpeqb	%xmm9, %xmm2
	movdqa	%xmm2, %xmm3
	pand	%xmm2, %xmm0
	pandn	%xmm4, %xmm3
	por	%xmm0, %xmm3
	movdqu	-16(%rax), %xmm0
	pcmpeqb	%xmm7, %xmm0
	movdqa	%xmm0, %xmm1
	pand	%xmm0, %xmm10
	por	%xmm2, %xmm0
	pandn	%xmm3, %xmm1
	pxor	%xmm5, %xmm0
	movdqa	%xmm6, %xmm2
	por	%xmm10, %xmm1
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L6
	movl	%esi, %edx
	andl	$-16, %edx
	leal	1(%rdx), %eax
	cmpl	%esi, %edx
	je	.L8
.L5:
	cltq
	leaq	a(%rip), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$79, %dl
	setne	%dl
	leal	2(%rdx,%rdx), %edx
	movb	%dl, (%rcx,%rax)
	addq	$1, %rax
	cmpl	%eax, %esi
	jl	.L8
.L11:
	movzbl	(%rcx,%rax), %edx
	cmpb	$74, %dl
	jne	.L10
	movl	$1, %edx
	movb	%dl, (%rcx,%rax)
	addq	$1, %rax
	cmpl	%eax, %esi
	jge	.L11
.L8:
	movzbl	1+a(%rip), %r11d
	cmpb	$1, %r11b
	je	.L30
	movl	%r11d, %edx
	leaq	p(%rip), %rax
	movl	$1, 28+p(%rip)
	orl	$1, %edx
	movsbq	%dl, %rdx
	movl	$1, (%rax,%rdx,4)
.L15:
	xorl	%ebp, %ebp
	cmpl	$1, %esi
	jle	.L14
	leal	-2(%rsi), %edx
	pxor	%xmm4, %xmm4
	movl	$1, %r15d
	xorl	%r10d, %r10d
	leaq	2+a(%rip), %r13
	movdqa	.LC6(%rip), %xmm3
	movdqa	%xmm4, %xmm5
	leaq	1(%r13), %rcx
	leaq	(%rcx,%rdx), %rbx
	pcmpgtd	%xmm3, %xmm5
	movq	%rbx, 24(%rsp)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%r10d, %r14
	movslq	%edi, %r9
	orl	%r11d, %r8d
	leaq	0(,%r14,8), %r10
	movq	%r14, 16(%rsp)
	movsbq	%r8b, %r8
	addq	%r10, %r9
	movl	(%rax,%r9,4), %r14d
	leaq	0(,%rbp,8), %r9
	leaq	(%r9,%r8), %r12
	addq	%r9, %rsi
	addq	%r9, %rcx
	addq	%r10, %r8
	addl	%r14d, (%rax,%r12,4)
	addl	%r14d, 28(%rdx)
	movslq	12(%rsp), %r14
	movl	(%rax,%r8,4), %r8d
	addl	%r8d, (%rax,%rsi,4)
	addq	%r9, %r14
	addl	%r8d, (%rax,%rcx,4)
	addl	%r8d, (%rax,%r14,4)
	addl	%r8d, 28(%rdx)
	movq	16(%rsp), %r8
	salq	$5, %r8
	movl	28(%rax,%r8), %r8d
	addl	%r8d, (%rax,%rsi,4)
	addl	%r8d, (%rax,%rcx,4)
	addl	%r8d, (%rax,%r14,4)
	addl	%r8d, 28(%rdx)
	movl	%ebx, %r8d
	notl	%r8d
	andl	$7, %r8d
	movl	%r8d, %ecx
	orl	%edi, %ecx
	notl	%edi
	movl	%edi, %esi
	movslq	%ecx, %rcx
	andl	%r8d, %esi
	addq	%rcx, %r10
	orl	%ebx, %esi
	movl	(%rax,%r10,4), %ecx
	addl	%ecx, (%rax,%r12,4)
	movslq	%esi, %rsi
	addq	%rsi, %r9
	addl	%ecx, (%rax,%r9,4)
	addl	28(%rdx), %ecx
.L17:
	movdqa	(%rdx), %xmm2
	movdqa	%xmm4, %xmm6
	movdqa	%xmm5, %xmm7
	addq	$1, %r13
	movslq	%r15d, %r10
	movdqa	%xmm2, %xmm0
	punpckldq	%xmm2, %xmm0
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm0, %xmm7
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm3, %xmm1
	movdqa	%xmm2, %xmm0
	punpckhdq	%xmm2, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	movdqa	%xmm5, %xmm7
	psllq	$32, %xmm6
	pmuludq	%xmm0, %xmm7
	paddq	%xmm6, %xmm1
	movdqa	%xmm4, %xmm6
	pcmpgtd	%xmm0, %xmm6
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm3, %xmm6
	paddq	%xmm7, %xmm6
	psllq	$32, %xmm6
	paddq	%xmm6, %xmm0
	shufps	$221, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	psrad	$12, %xmm1
	psrad	$31, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$2, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$2, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	movaps	%xmm2, (%rdx)
	movq	%rbp, %rdx
	salq	$5, %rdx
	addq	%rax, %rdx
	movslq	16(%rdx), %rsi
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	20(%rdx), %rsi
	movl	%edi, 16(%rdx)
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	24(%rdx), %rsi
	movl	%edi, 20(%rdx)
	movq	%rsi, %rdi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, %r8d
	sarl	$31, %r8d
	sarq	$44, %rsi
	subl	%r8d, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %edi
	movslq	%ecx, %rsi
	imulq	$1757988013, %rsi, %rsi
	movl	%edi, 24(%rdx)
	movl	%ecx, %edi
	sarl	$31, %edi
	sarq	$44, %rsi
	subl	%edi, %esi
	imull	$10007, %esi, %esi
	subl	%esi, %ecx
	movl	%ecx, 28(%rdx)
	movl	%r15d, %edx
	xorl	$1, %edx
	cmpq	%r13, 24(%rsp)
	je	.L14
	movl	%edx, %r15d
.L16:
	movslq	%r15d, %rbp
	movsbl	%r11b, %edi
	movq	%rbp, %rdx
	movl	%edi, %r8d
	salq	$5, %rdx
	addq	%rax, %rdx
	movaps	%xmm4, (%rdx)
	movaps	%xmm4, 16(%rdx)
	movsbl	0(%r13), %ebx
	movl	%ebx, %r9d
	movl	%ebx, %esi
	movl	%ebx, %ecx
	movl	%ebx, %r11d
	orl	$4, %r9d
	orl	$1, %esi
	orl	$2, %ecx
	movsbl	%r9b, %r14d
	movsbq	%sil, %rsi
	movsbq	%cl, %rcx
	movl	%r14d, 12(%rsp)
	cmpl	%edi, %ebx
	jne	.L27
	leaq	0(,%r10,8), %r8
	movslq	%ecx, %rdi
	salq	$5, %r10
	leaq	(%r8,%rsi), %r9
	leaq	(%r8,%rdi), %rcx
	movl	(%rax,%rcx,4), %ecx
	addl	(%rax,%r9,4), %ecx
	movslq	12(%rsp), %r9
	addq	%r9, %r8
	addl	(%rax,%r8,4), %ecx
	leaq	0(,%rbp,8), %r8
	addl	28(%rax,%r10), %ecx
	addq	%r8, %rsi
	addq	%r8, %rdi
	addq	%r9, %r8
	addl	%ecx, (%rax,%rsi,4)
	addl	%ecx, (%rax,%rdi,4)
	addl	%ecx, (%rax,%r8,4)
	addl	28(%rdx), %ecx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	salq	$5, %rbp
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	addq	%rbp, %rax
	movdqa	16(%rax), %xmm0
	paddd	(%rax), %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	movd	%xmm0, %ecx
	movslq	%edx, %rax
	sarl	$31, %ecx
	imulq	$1757988013, %rax, %rax
	sarq	$44, %rax
	subl	%ecx, %eax
	imull	$10007, %eax, %eax
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$56, %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
.L30:
	.cfi_restore_state
	movl	$1, 28+p(%rip)
	leaq	p(%rip), %rax
	movl	$1, 20+p(%rip)
	movl	$1, 12+p(%rip)
	movl	$1, 4+p(%rip)
	jmp	.L15
.L21:
	movl	$1, %eax
	jmp	.L5
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1003
a:
	.zero	1003
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 64
p:
	.zero	64
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.byte	74
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC3:
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.byte	2
	.align 16
.LC4:
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.byte	79
	.align 16
.LC5:
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.byte	4
	.align 16
.LC6:
	.long	1757988013
	.long	1757988013
	.long	1757988013
	.long	1757988013
	.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:

// Aizu Vol-5 0595: Schedule
// 2017.8.31 bal4u@uu

#include <stdio.h>

#define J 1
#define O 2
#define I 4
#define JOI 7

int p[2][8];
char a[1003];

int main()
{
	int n, i, j, x, x2, k1, k2, ans;

	scanf("%d%s", &n, a + 1);
	for (i = 1; i <= n; i++) {
		if      (a[i] == 'J') a[i] = J;
		else if (a[i] == 'O') a[i] = O;
		else                  a[i] = I;
	}
	if (a[1] == J) p[0][J] = p[0][J|O] = p[0][J|I] = p[0][JOI] = 1;
	else           p[0][J|a[1]] = p[0][JOI] = 1;
	for (k1 = 0, k2 = 1, i = 2; i <= n; i++, k1 = k2, k2 = !k2) {
		for (j = 0; j < 8; j++) p[k2][j] = 0;
		x = a[i], x2 = a[i-1];
		if (x2 == x) {
			int t = p[k1][x|J] + p[k1][x|O] + p[k1][x|I] + p[k1][JOI];
			p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
		} else {
			int t, x3;
			t = p[k1][x2], p[k2][x|x2] += t, p[k2][JOI] += t;
			t = p[k1][x|x2], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t,	p[k2][JOI] += t;
			t = p[k1][JOI], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
			x3 = ((JOI & ~x) & ~x2) & JOI;
			t = p[k1][x2|x3]; p[k2][x|x2] += t, p[k2][x|x3] += t, p[k2][JOI] += t;
		}
		for (j = 0; j < 8; j++) p[k2][j] %= 10007;
	}
	for (ans = 0, j = 0; j < 8; j++) ans += p[k1][j];
	printf("%d\n", ans % 10007);
	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
// Aizu Vol-5 0595: Schedule
// 2017.8.31 bal4u@uu

#include <stdio.h>

#define J 1
#define O 2
#define I 4
#define JOI 7

int p[2][8];
char a[1003];

int main()
{
	int n, i, j, x, x2, k1, k2, ans;

	scanf("%d%s", &n, a + 1);
	for (i = 1; i <= n; i++) {
		if      (a[i] == 'J') a[i] = J;
		else if (a[i] == 'O') a[i] = O;
		else                  a[i] = I;
	}
	if (a[1] == J) p[0][J] = p[0][J|O] = p[0][J|I] = p[0][JOI] = 1;
	else           p[0][J|a[1]] = p[0][JOI] = 1;
	for (k1 = 0, k2 = 1, i = 2; i <= n; i++, k1 = k2, k2 = !k2) {
		for (j = 0; j < 8; j++) p[k2][j] = 0;
		x = a[i], x2 = a[i-1];
		if (x2 == x) {
			int t = p[k1][x|J] + p[k1][x|O] + p[k1][x|I] + p[k1][JOI];
			p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
		} else {
			int t, x3;
			t = p[k1][x2], p[k2][x|x2] += t, p[k2][JOI] += t;
			t = p[k1][x|x2], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t,	p[k2][JOI] += t;
			t = p[k1][JOI], p[k2][x|J] += t, p[k2][x|O] += t, p[k2][x|I] += t, p[k2][JOI] += t;
			x3 = ((JOI & ~x) & ~x2) & JOI;
			t = p[k1][x2|x3]; p[k2][x|x2] += t, p[k2][x|x3] += t, p[k2][JOI] += t;
		}
		for (j = 0; j < 8; j++) p[k2][j] %= 10007;
	}
	for (ans = 0, j = 0; j < 8; j++) ans += p[k1][j];
	printf("%d\n", ans % 10007);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 64
p:
	.zero	64
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1003
a:
	.zero	1003
	.section	.rodata
.LC0:
	.string	"%d%s"
.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	1+a(%rip), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -48(%rbp)
	jmp	.L2
.L6:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$74, %al
	jne	.L3
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	jmp	.L4
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$79, %al
	jne	.L5
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$2, (%rax,%rdx)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$4, (%rax,%rdx)
.L4:
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L6
	movzbl	1+a(%rip), %eax
	cmpb	$1, %al
	jne	.L7
	movl	$1, 28+p(%rip)
	movl	28+p(%rip), %eax
	movl	%eax, 20+p(%rip)
	movl	20+p(%rip), %eax
	movl	%eax, 12+p(%rip)
	movl	12+p(%rip), %eax
	movl	%eax, 4+p(%rip)
	jmp	.L8
.L7:
	movl	$1, 28+p(%rip)
	movzbl	1+a(%rip), %eax
	orl	$1, %eax
	movsbl	%al, %edx
	movl	28+p(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$2, -48(%rbp)
	jmp	.L9
.L16:
	movl	$0, -44(%rbp)
	jmp	.L10
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -44(%rbp)
.L10:
	cmpl	$7, -44(%rbp)
	jle	.L11
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jne	.L12
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	notl	%eax
	andl	$7, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	notl	%eax
	andl	%edx, %eax
	andl	$7, %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L13:
	movl	$0, -44(%rbp)
	jmp	.L14
.L15:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%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	-44(%rbp), %edx
	movslq	%edx, %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -44(%rbp)
.L14:
	cmpl	$7, -44(%rbp)
	jle	.L15
	addl	$1, -48(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -36(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -36(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	movl	$0, -44(%rbp)
	jmp	.L17
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -32(%rbp)
	addl	$1, -44(%rbp)
.L17:
	cmpl	$7, -44(%rbp)
	jle	.L18
	movl	-32(%rbp), %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	%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	.L20
	call	__stack_chk_fail@PLT
.L20:
	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
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 64
p:
	.zero	64
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1003
a:
	.zero	1003
	.section	.rodata
.LC0:
	.string	"%d%s"
.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	1+a(%rip), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -48(%rbp)
	jmp	.L2
.L6:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$74, %al
	jne	.L3
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	jmp	.L4
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$79, %al
	jne	.L5
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$2, (%rax,%rdx)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$4, (%rax,%rdx)
.L4:
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L6
	movzbl	1+a(%rip), %eax
	cmpb	$1, %al
	jne	.L7
	movl	$1, 28+p(%rip)
	movl	28+p(%rip), %eax
	movl	%eax, 20+p(%rip)
	movl	20+p(%rip), %eax
	movl	%eax, 12+p(%rip)
	movl	12+p(%rip), %eax
	movl	%eax, 4+p(%rip)
	jmp	.L8
.L7:
	movl	$1, 28+p(%rip)
	movzbl	1+a(%rip), %eax
	orl	$1, %eax
	movsbl	%al, %edx
	movl	28+p(%rip), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L8:
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$2, -48(%rbp)
	jmp	.L9
.L16:
	movl	$0, -44(%rbp)
	jmp	.L10
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -44(%rbp)
.L10:
	cmpl	$7, -44(%rbp)
	jle	.L11
	movl	-48(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -28(%rbp)
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jne	.L12
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-12(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$1, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$2, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	$4, %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	notl	%eax
	andl	$7, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	notl	%eax
	andl	%edx, %eax
	andl	$7, %eax
	movl	%eax, -16(%rbp)
	movl	-24(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	orl	-16(%rbp), %eax
	movl	-20(%rbp), %edx
	addl	%edx, %ecx
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	28+p(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L13:
	movl	$0, -44(%rbp)
	jmp	.L14
.L15:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%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	-44(%rbp), %edx
	movslq	%edx, %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -44(%rbp)
.L14:
	cmpl	$7, -44(%rbp)
	jle	.L15
	addl	$1, -48(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	cmpl	$0, -36(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -36(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	movl	$0, -44(%rbp)
	jmp	.L17
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -32(%rbp)
	addl	$1, -44(%rbp)
.L17:
	cmpl	$7, -44(%rbp)
	jle	.L18
	movl	-32(%rbp), %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	%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	.L20
	call	__stack_chk_fail@PLT
.L20:
	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:
