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

```c
#include <stdio.h>

#define N 100000
#define A 100000
#define MD 1000000007

int main() {
	static int kk[N];
	int n, i, a;
	long long ans;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		kk[a]++;
		if (a % 2 == n % 2 || kk[a] > 2) {
			printf("0\n");
			return 0;
		}
	}
	if ((n % 2 == 0 && kk[0] != 0) || (n % 2 && kk[0] != 1)) {
		printf("0\n");
		return 0;
	}
	ans = 1;
	for (a = 1; a < n; a++)
		if (kk[a] > 0)
			ans = (ans * 2) % MD;
	printf("%lld\n", ans);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%r12d, %r12d
	leaq	4(%rsp), %rbp
	leaq	kk.0(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %ecx
	jg	.L8
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L2
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %esi
	movl	0(%r13,%rdx,4), %ecx
	movq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	$1, %ecx
	movl	%ecx, 0(%r13,%rdx,4)
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	(%rsi,%rdi), %edx
	andl	$1, %edx
	subl	%edi, %edx
	cmpl	%edx, %eax
	jne	.L19
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	kk.0(%rip), %eax
	testb	$1, %sil
	jne	.L7
	testl	%eax, %eax
	jne	.L8
.L9:
	movl	$1, 4(%rsp)
	cmpl	$1, %esi
	jle	.L14
	leaq	4+kk.0(%rip), %rcx
	leal	-2(%rsi), %eax
	movabsq	$-8543223828751151131, %r9
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	(%rdx,%rdx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
.L11:
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L12
	movl	%esi, 4(%rsp)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L7:
	subl	$1, %eax
	jne	.L8
	jmp	.L9
.L14:
	movl	$1, %edx
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%r12d, %r12d
	leaq	4(%rsp), %rbp
	leaq	kk.0(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %ecx
	jg	.L8
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L2
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %esi
	movl	0(%r13,%rdx,4), %ecx
	movq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	$1, %ecx
	movl	%ecx, 0(%r13,%rdx,4)
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	(%rsi,%rdi), %edx
	andl	$1, %edx
	subl	%edi, %edx
	cmpl	%edx, %eax
	jne	.L19
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	kk.0(%rip), %eax
	testb	$1, %sil
	jne	.L7
	testl	%eax, %eax
	jne	.L8
.L9:
	movl	$1, 4(%rsp)
	cmpl	$1, %esi
	jle	.L14
	leaq	4+kk.0(%rip), %rcx
	leal	-2(%rsi), %eax
	movabsq	$-8543223828751151131, %r9
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	(%rdx,%rdx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
.L11:
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L12
	movl	%esi, 4(%rsp)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L7:
	subl	$1, %eax
	jne	.L8
	jmp	.L9
.L14:
	movl	$1, %edx
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%r12d, %r12d
	leaq	4(%rsp), %rbp
	leaq	kk.0(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %ecx
	jg	.L8
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L2
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %esi
	movl	0(%r13,%rdx,4), %ecx
	movq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	$1, %ecx
	movl	%ecx, 0(%r13,%rdx,4)
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	(%rsi,%rdi), %edx
	andl	$1, %edx
	subl	%edi, %edx
	cmpl	%edx, %eax
	jne	.L19
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	kk.0(%rip), %eax
	testb	$1, %sil
	jne	.L7
	testl	%eax, %eax
	jne	.L8
.L9:
	movl	$1, 4(%rsp)
	cmpl	$1, %esi
	jle	.L14
	leaq	4+kk.0(%rip), %rcx
	leal	-2(%rsi), %eax
	movabsq	$-8543223828751151131, %r9
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	(%rdx,%rdx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
.L11:
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L12
	movl	%esi, 4(%rsp)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L7:
	subl	$1, %eax
	jne	.L8
	jmp	.L9
.L14:
	movl	$1, %edx
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>

#define N 100000
#define A 100000
#define MD 1000000007

int main() {
	static int kk[N];
	int n, i, a;
	long long ans;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		kk[a]++;
		if (a % 2 == n % 2 || kk[a] > 2) {
			printf("0\n");
			return 0;
		}
	}
	if ((n % 2 == 0 && kk[0] != 0) || (n % 2 && kk[0] != 1)) {
		printf("0\n");
		return 0;
	}
	ans = 1;
	for (a = 1; a < n; a++)
		if (kk[a] > 0)
			ans = (ans * 2) % MD;
	printf("%lld\n", ans);
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define N 100000
#define A 100000
#define MD 1000000007

int main() {
	static int kk[N];
	int n, i, a;
	long long ans;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		kk[a]++;
		if (a % 2 == n % 2 || kk[a] > 2) {
			printf("0\n");
			return 0;
		}
	}
	if ((n % 2 == 0 && kk[0] != 0) || (n % 2 && kk[0] != 1)) {
		printf("0\n");
		return 0;
	}
	ans = 1;
	for (a = 1; a < n; a++)
		if (kk[a] > 0)
			ans = (ans * 2) % MD;
	printf("%lld\n", ans);
	return 0;
}
```

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.
Optimized Assembly Code:

8
7 5 1 2 7 3 5 3
 7
6 4 0 2 4 0 4
 5
0 4 4 0 2
 7
6 4 0 2 4 -1 4
 5
0 4 4 0 1
 7
6 4 0 2 8 -1 4
 5
0 4 1 0 1
 7
6 4 0 2 8 0 4
 5
0 4 0 0 1
 7
6 4 1 2 8 0 4

0
 0
 0
 0
 0
 8
 0
 0
 0
 0

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

```c
#include <stdio.h>

#define N 100000
#define A 100000
#define MD 1000000007

int main() {
	static int kk[N];
	int n, i, a;
	long long ans;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		kk[a]++;
		if (a % 2 == n % 2 || kk[a] > 2) {
			printf("0\n");
			return 0;
		}
	}
	if ((n % 2 == 0 && kk[0] != 0) || (n % 2 && kk[0] != 1)) {
		printf("0\n");
		return 0;
	}
	ans = 1;
	for (a = 1; a < n; a++)
		if (kk[a] > 0)
			ans = (ans * 2) % MD;
	printf("%lld\n", ans);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%r12d, %r12d
	leaq	4(%rsp), %rbp
	leaq	kk.0(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %ecx
	jg	.L8
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L2
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %esi
	movl	0(%r13,%rdx,4), %ecx
	movq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	$1, %ecx
	movl	%ecx, 0(%r13,%rdx,4)
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	(%rsi,%rdi), %edx
	andl	$1, %edx
	subl	%edi, %edx
	cmpl	%edx, %eax
	jne	.L19
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	kk.0(%rip), %eax
	testb	$1, %sil
	jne	.L7
	testl	%eax, %eax
	jne	.L8
.L9:
	movl	$1, 4(%rsp)
	cmpl	$1, %esi
	jle	.L14
	leaq	4+kk.0(%rip), %rcx
	leal	-2(%rsi), %eax
	movabsq	$-8543223828751151131, %r9
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	(%rdx,%rdx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
.L11:
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L12
	movl	%esi, 4(%rsp)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L7:
	subl	$1, %eax
	jne	.L8
	jmp	.L9
.L14:
	movl	$1, %edx
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%r12d, %r12d
	leaq	4(%rsp), %rbp
	leaq	kk.0(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %ecx
	jg	.L8
	addl	$1, %r12d
	cmpl	%r12d, %esi
	jle	.L2
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %esi
	movl	0(%r13,%rdx,4), %ecx
	movq	%rdx, %rax
	movl	%esi, %edi
	shrl	$31, %edi
	addl	$1, %ecx
	movl	%ecx, 0(%r13,%rdx,4)
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	leal	(%rsi,%rdi), %edx
	andl	$1, %edx
	subl	%edi, %edx
	cmpl	%edx, %eax
	jne	.L19
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	kk.0(%rip), %eax
	testb	$1, %sil
	jne	.L7
	testl	%eax, %eax
	jne	.L8
.L9:
	movl	$1, 4(%rsp)
	cmpl	$1, %esi
	jle	.L14
	leaq	4+kk.0(%rip), %rcx
	leal	-2(%rsi), %eax
	movabsq	$-8543223828751151131, %r9
	leaq	4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	(%rdx,%rdx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rdx
.L11:
	addq	$4, %rcx
	cmpq	%r8, %rcx
	jne	.L12
	movl	%esi, 4(%rsp)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L7:
	subl	$1, %eax
	jne	.L8
	jmp	.L9
.L14:
	movl	$1, %edx
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	kk.0
	.comm	kk.0,400000,32
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```