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

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define mod 100000000L

int main() {
	int N, P;
	int *A;
	int i;
	int count = 0;
	long ans1 = 1, ans2 = 0;
	scanf("%d %d", &N, &P);
	A = (int*)malloc(sizeof(int)*N);
	for (i = 0; i < N; i++) {
		scanf("%d", &A[i]);
		if (A[i] % 2) {
			count++;
			break;
		}
	}
	if (count == 0 && P == 1) {
		printf("0\n");
		return 0;
	}
	P = N - 1;
	if (count == 0)P++;
	for (i = 0; i < P; i++) {
		ans1 *= 2;
		ans2 *= 2;
		ans2 += ans1 / mod;
		ans1 %= mod;
	}
	if(ans2)printf("%ld%07ld\n", ans2, ans1);
	else printf("%ld\n", ans1);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%ld%07ld\n"
.LC4:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	movq	$1, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L5:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	addl	$1, -36(%rbp)
	jmp	.L4
.L3:
	addl	$1, -40(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L5
.L4:
	cmpl	$0, -36(%rbp)
	jne	.L6
	movl	-44(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-48(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L8
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
.L8:
	movl	$0, -40(%rbp)
	jmp	.L9
.L10:
	salq	-32(%rbp)
	salq	-24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$100000000, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -40(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L10
	cmpq	$0, -24(%rbp)
	je	.L11
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%ld%07ld\n"
.LC4:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L2
.L4:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testb	$1, (%rbx)
	je	.L22
	movl	(%rsp), %eax
	leal	-1(%rax), %edi
.L8:
	movl	%edi, 4(%rsp)
	testl	%edi, %edi
	jle	.L12
	xorl	%r8d, %r8d
	movl	$1, %ecx
	xorl	%esi, %esi
	movabsq	$6189700196426901375, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	%rcx, %rcx
	addl	$1, %esi
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$25, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%r8,2), %r8
	imulq	$100000000, %rdx, %rdx
	subq	%rdx, %rcx
	cmpl	%edi, %esi
	jne	.L7
	testq	%r8, %r8
	je	.L6
	movq	%r8, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	cmpl	$1, 4(%rsp)
	movl	(%rsp), %edi
	jne	.L8
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	movl	$1, %ecx
.L6:
	movq	%rcx, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%ld%07ld\n"
.LC4:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, (%rsp)
	jle	.L2
.L4:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testb	$1, (%rbx)
	je	.L22
	movl	(%rsp), %eax
	leal	-1(%rax), %edi
.L8:
	movl	%edi, 4(%rsp)
	testl	%edi, %edi
	jle	.L12
	xorl	%r8d, %r8d
	movl	$1, %ecx
	xorl	%esi, %esi
	movabsq	$6189700196426901375, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	%rcx, %rcx
	addl	$1, %esi
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$25, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%r8,2), %r8
	imulq	$100000000, %rdx, %rdx
	subq	%rdx, %rcx
	cmpl	%edi, %esi
	jne	.L7
	testq	%r8, %r8
	je	.L6
	movq	%r8, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	cmpl	$1, 4(%rsp)
	movl	(%rsp), %edi
	jne	.L8
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	movl	$1, %ecx
.L6:
	movq	%rcx, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define mod 100000000L

int main() {
	int N, P;
	int *A;
	int i;
	int count = 0;
	long ans1 = 1, ans2 = 0;
	scanf("%d %d", &N, &P);
	A = (int*)malloc(sizeof(int)*N);
	for (i = 0; i < N; i++) {
		scanf("%d", &A[i]);
		if (A[i] % 2) {
			count++;
			break;
		}
	}
	if (count == 0 && P == 1) {
		printf("0\n");
		return 0;
	}
	P = N - 1;
	if (count == 0)P++;
	for (i = 0; i < P; i++) {
		ans1 *= 2;
		ans2 *= 2;
		ans2 += ans1 / mod;
		ans1 %= mod;
	}
	if(ans2)printf("%ld%07ld\n", ans2, ans1);
	else printf("%ld\n", ans1);
	return 0;
}
1 1
67
 45 1
17 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 68 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 25 26
 3 1
1 1 1
 2 0
1 1
 1 1
42
 45 1
17 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 25 26
 45 1
17 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26
 45 1
17 55 85 55 74 20 90 67 40 121 39 89 91 50 16 24 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26
 45 1
17 55 85 55 74 20 90 67 40 121 39 89 91 50 16 38 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26
 45 1
17 55 85 55 74 20 90 67 40 121 39 178 91 50 16 38 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26

1
 17592186044416
 4
 2
 0
 17592186044416
 17592186044416
 17592186044416
 17592186044416
 17592186044416

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

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define mod 100000000L

int main() {
	int N, P;
	int *A;
	int i;
	int count = 0;
	long ans1 = 1, ans2 = 0;
	scanf("%d %d", &N, &P);
	A = (int*)malloc(sizeof(int)*N);
	for (i = 0; i < N; i++) {
		scanf("%d", &A[i]);
		if (A[i] % 2) {
			count++;
			break;
		}
	}
	if (count == 0 && P == 1) {
		printf("0\n");
		return 0;
	}
	P = N - 1;
	if (count == 0)P++;
	for (i = 0; i < P; i++) {
		ans1 *= 2;
		ans2 *= 2;
		ans2 += ans1 / mod;
		ans1 %= mod;
	}
	if(ans2)printf("%ld%07ld\n", ans2, ans1);
	else printf("%ld\n", ans1);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%ld%07ld\n"
.LC4:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	movq	$1, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L5:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	addl	$1, -36(%rbp)
	jmp	.L4
.L3:
	addl	$1, -40(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L5
.L4:
	cmpl	$0, -36(%rbp)
	jne	.L6
	movl	-44(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-48(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L8
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
.L8:
	movl	$0, -40(%rbp)
	jmp	.L9
.L10:
	salq	-32(%rbp)
	salq	-24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$100000000, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -40(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L10
	cmpq	$0, -24(%rbp)
	je	.L11
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%ld%07ld\n"
.LC4:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	movq	$1, -32(%rbp)
	movq	$0, -24(%rbp)
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -40(%rbp)
	jmp	.L2
.L5:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	addl	$1, -36(%rbp)
	jmp	.L4
.L3:
	addl	$1, -40(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L5
.L4:
	cmpl	$0, -36(%rbp)
	jne	.L6
	movl	-44(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L6:
	movl	-48(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	cmpl	$0, -36(%rbp)
	jne	.L8
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
.L8:
	movl	$0, -40(%rbp)
	jmp	.L9
.L10:
	salq	-32(%rbp)
	salq	-24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6189700196426901375, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$25, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$100000000, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -40(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jl	.L10
	cmpq	$0, -24(%rbp)
	je	.L11
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L13:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
