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>

long long ru(int a,int b){
		long long r=1;
		for(int i=0;i<b;i++)r=r*a;
		return r;
}

int main(){
		int n,i,a[100],m=0;
		long long ans;
		scanf("%d",&n);
		for(i=0;i<n;i++)scanf("%d",&a[i]);
		for(i=0;i<n;i++){
				if(a[i]%2==0)m++;
		}
		ans=ru(3,n)-ru(2,m);
		printf("%lld\n",ans);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ru
	.type	ru, @function
ru:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ru, .-ru
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$456, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -444(%rbp)
	leaq	-452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -448(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-448(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -448(%rbp)
.L6:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L7
	movl	$0, -448(%rbp)
	jmp	.L8
.L10:
	movl	-448(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	addl	$1, -444(%rbp)
.L9:
	addl	$1, -448(%rbp)
.L8:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L10
	movl	-452(%rbp), %eax
	movl	%eax, %esi
	movl	$3, %edi
	call	ru
	movq	%rax, %rbx
	movl	-444(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	call	ru
	movq	%rax, %rdx
	movq	%rbx, %rax
	subq	%rdx, %rax
	movq	%rax, -440(%rbp)
	movq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	ru
	.type	ru, @function
ru:
.LFB23:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L4
	movslq	%edi, %rdi
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %eax
	imulq	%rdi, %r8
	cmpl	%eax, %esi
	jne	.L3
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ru, .-ru
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L9
	testl	%esi, %esi
	jle	.L8
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L21
	movl	%esi, %eax
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%r12), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rax
.L11:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L29
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	testb	$3, %sil
	je	.L12
.L10:
	movslq	%edx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %eax
	cmpl	%ecx, %esi
	jle	.L12
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %eax
	addl	$2, %edx
	cmpl	%edx, %esi
	jle	.L12
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %eax
.L12:
	xorl	%ecx, %ecx
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %ecx
	leaq	(%rdx,%rdx,2), %rdx
	cmpl	%ecx, %esi
	jne	.L18
	testl	%eax, %eax
	jle	.L22
	xorl	%ecx, %ecx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L19:
	addl	$1, %ecx
	addq	%rsi, %rsi
	cmpl	%eax, %ecx
	jne	.L19
.L17:
	subq	%rsi, %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$440, %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
.L8:
	.cfi_restore_state
	movl	$1, %edx
	movl	$1, %esi
	jmp	.L17
.L22:
	movl	$1, %esi
	jmp	.L17
.L21:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
	.p2align 4
	.globl	ru
	.type	ru, @function
ru:
.LFB23:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L4
	movslq	%edi, %rdi
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %eax
	imulq	%rdi, %r8
	cmpl	%eax, %esi
	jne	.L3
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ru, .-ru
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L9
	testl	%esi, %esi
	jle	.L8
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L21
	movl	%esi, %eax
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	leal	-1(%rax), %edx
	leaq	16(%r12), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rax
.L11:
	movdqa	(%r12), %xmm0
	movq	%rax, %r12
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L29
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	testb	$3, %sil
	je	.L12
.L10:
	movslq	%edx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %eax
	cmpl	%ecx, %esi
	jle	.L12
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %eax
	addl	$2, %edx
	cmpl	%edx, %esi
	jle	.L12
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %eax
.L12:
	xorl	%ecx, %ecx
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %ecx
	leaq	(%rdx,%rdx,2), %rdx
	cmpl	%ecx, %esi
	jne	.L18
	testl	%eax, %eax
	jle	.L22
	xorl	%ecx, %ecx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L19:
	addl	$1, %ecx
	addq	%rsi, %rsi
	cmpl	%eax, %ecx
	jne	.L19
.L17:
	subq	%rsi, %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$440, %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
.L8:
	.cfi_restore_state
	movl	$1, %edx
	movl	$1, %esi
	jmp	.L17
.L22:
	movl	$1, %esi
	jmp	.L17
.L21:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>

long long ru(int a,int b){
		long long r=1;
		for(int i=0;i<b;i++)r=r*a;
		return r;
}

int main(){
		int n,i,a[100],m=0;
		long long ans;
		scanf("%d",&n);
		for(i=0;i<n;i++)scanf("%d",&a[i]);
		for(i=0;i<n;i++){
				if(a[i]%2==0)m++;
		}
		ans=ru(3,n)-ru(2,m);
		printf("%lld\n",ans);
		return 0;
}

10
90 101 56 71 44 8 13 30 57 84
 2
2 4
 1
000
 3
3 3 2
 10
41 101 56 71 44 8 13 30 57 84
 2
3 6
 1
011
 3
3 2 0
 10
60 101 56 71 44 8 13 30 114 84
 3
1 1 -1

58985
 5
 1
 25
 59017
 7
 2
 23
 58921
 26

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>

long long ru(int a,int b){
		long long r=1;
		for(int i=0;i<b;i++)r=r*a;
		return r;
}

int main(){
		int n,i,a[100],m=0;
		long long ans;
		scanf("%d",&n);
		for(i=0;i<n;i++)scanf("%d",&a[i]);
		for(i=0;i<n;i++){
				if(a[i]%2==0)m++;
		}
		ans=ru(3,n)-ru(2,m);
		printf("%lld\n",ans);
		return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ru
	.type	ru, @function
ru:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ru, .-ru
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$456, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -444(%rbp)
	leaq	-452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -448(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-448(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -448(%rbp)
.L6:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L7
	movl	$0, -448(%rbp)
	jmp	.L8
.L10:
	movl	-448(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	addl	$1, -444(%rbp)
.L9:
	addl	$1, -448(%rbp)
.L8:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L10
	movl	-452(%rbp), %eax
	movl	%eax, %esi
	movl	$3, %edi
	call	ru
	movq	%rax, %rbx
	movl	-444(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	call	ru
	movq	%rax, %rdx
	movq	%rbx, %rax
	subq	%rdx, %rax
	movq	%rax, -440(%rbp)
	movq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	ru
	.type	ru, @function
ru:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	movq	-8(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -8(%rbp)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L3
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ru, .-ru
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$456, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -444(%rbp)
	leaq	-452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -448(%rbp)
	jmp	.L6
.L7:
	leaq	-432(%rbp), %rdx
	movl	-448(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -448(%rbp)
.L6:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L7
	movl	$0, -448(%rbp)
	jmp	.L8
.L10:
	movl	-448(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	addl	$1, -444(%rbp)
.L9:
	addl	$1, -448(%rbp)
.L8:
	movl	-452(%rbp), %eax
	cmpl	%eax, -448(%rbp)
	jl	.L10
	movl	-452(%rbp), %eax
	movl	%eax, %esi
	movl	$3, %edi
	call	ru
	movq	%rax, %rbx
	movl	-444(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	call	ru
	movq	%rax, %rdx
	movq	%rbx, %rax
	subq	%rdx, %rax
	movq	%rax, -440(%rbp)
	movq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
