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>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main(){
  int N;
  scanf("%d",&N);
  int n;
  int A[N];
  int odd_count=0;
  int even_count=0;
  for(n=0;n<N;n++){
    scanf("%d",&A[n]);
  }
  for(n=0;n<N;n++){
    if(A[n] % 2 ==0){
      even_count++;
    }
    else{
      odd_count++;
    }
  }
  printf("%d",(int)(pow(3,N)-pow(2,even_count)));


}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L17
	movq	%r14, %r13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L17
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L18
	movl	%eax, %edx
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %edx
	movdqa	%xmm1, %xmm2
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	0(%r13), %xmm0
	addq	$16, %r13
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r13, %rdx
	jne	.L8
	movdqa	%xmm1, %xmm0
	movl	%eax, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	testb	$3, %al
	je	.L5
.L7:
	movslq	%edx, %rcx
	leaq	(%r14,%rcx,4), %rsi
	movl	(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %ebx
	cmpl	%ecx, %eax
	jle	.L5
	movl	4(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %ebx
	addl	$2, %edx
	cmpl	%eax, %edx
	jge	.L5
	movl	8(%rsi), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %ebx
.L5:
	pxor	%xmm1, %xmm1
	movsd	.LC2(%rip), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	pow@PLT
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm1
	movq	%xmm0, %r12
	movsd	.LC3(%rip), %xmm0
	call	pow@PLT
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	movapd	%xmm0, %xmm1
	movq	%r12, %xmm0
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L17:
	xorl	%ebx, %ebx
	jmp	.L5
.L18:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L17
	movq	%r14, %r13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L17
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L18
	movl	%eax, %edx
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %edx
	movdqa	%xmm1, %xmm2
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	0(%r13), %xmm0
	addq	$16, %r13
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r13, %rdx
	jne	.L8
	movdqa	%xmm1, %xmm0
	movl	%eax, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	testb	$3, %al
	je	.L5
.L7:
	movslq	%edx, %rcx
	leaq	(%r14,%rcx,4), %rsi
	movl	(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %ebx
	cmpl	%ecx, %eax
	jle	.L5
	movl	4(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %ebx
	addl	$2, %edx
	cmpl	%eax, %edx
	jge	.L5
	movl	8(%rsi), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %ebx
.L5:
	pxor	%xmm1, %xmm1
	movsd	.LC2(%rip), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	pow@PLT
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm1
	movq	%xmm0, %r12
	movsd	.LC3(%rip), %xmm0
	call	pow@PLT
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	movapd	%xmm0, %xmm1
	movq	%r12, %xmm0
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L17:
	xorl	%ebx, %ebx
	jmp	.L5
.L18:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L17
	movq	%r14, %r13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L17
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L18
	movl	%eax, %edx
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %edx
	movdqa	%xmm1, %xmm2
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	0(%r13), %xmm0
	addq	$16, %r13
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r13, %rdx
	jne	.L8
	movdqa	%xmm1, %xmm0
	movl	%eax, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	testb	$3, %al
	je	.L5
.L7:
	movslq	%edx, %rcx
	leaq	(%r14,%rcx,4), %rsi
	movl	(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %ebx
	cmpl	%ecx, %eax
	jle	.L5
	movl	4(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %ebx
	addl	$2, %edx
	cmpl	%eax, %edx
	jge	.L5
	movl	8(%rsi), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %ebx
.L5:
	pxor	%xmm1, %xmm1
	movsd	.LC2(%rip), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	pow@PLT
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm1
	movq	%xmm0, %r12
	movsd	.LC3(%rip), %xmm0
	call	pow@PLT
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	movapd	%xmm0, %xmm1
	movq	%r12, %xmm0
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L17:
	xorl	%ebx, %ebx
	jmp	.L5
.L18:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main(){
  int N;
  scanf("%d",&N);
  int n;
  int A[N];
  int odd_count=0;
  int even_count=0;
  for(n=0;n<N;n++){
    scanf("%d",&A[n]);
  }
  for(n=0;n<N;n++){
    if(A[n] % 2 ==0){
      even_count++;
    }
    else{
      odd_count++;
    }
  }
  printf("%d",(int)(pow(3,N)-pow(2,even_count)));


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

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main(){
  int N;
  scanf("%d",&N);
  int n;
  int A[N];
  int odd_count=0;
  int even_count=0;
  for(n=0;n<N;n++){
    scanf("%d",&A[n]);
  }
  for(n=0;n<N;n++){
    if(A[n] % 2 ==0){
      even_count++;
    }
    else{
      odd_count++;
    }
  }
  printf("%d",(int)(pow(3,N)-pow(2,even_count)));


}
```

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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main(){
  int N;
  scanf("%d",&N);
  int n;
  int A[N];
  int odd_count=0;
  int even_count=0;
  for(n=0;n<N;n++){
    scanf("%d",&A[n]);
  }
  for(n=0;n<N;n++){
    if(A[n] % 2 ==0){
      even_count++;
    }
    else{
      odd_count++;
    }
  }
  printf("%d",(int)(pow(3,N)-pow(2,even_count)));


}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L17
	movq	%r14, %r13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L17
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L18
	movl	%eax, %edx
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %edx
	movdqa	%xmm1, %xmm2
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	0(%r13), %xmm0
	addq	$16, %r13
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r13, %rdx
	jne	.L8
	movdqa	%xmm1, %xmm0
	movl	%eax, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	testb	$3, %al
	je	.L5
.L7:
	movslq	%edx, %rcx
	leaq	(%r14,%rcx,4), %rsi
	movl	(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %ebx
	cmpl	%ecx, %eax
	jle	.L5
	movl	4(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %ebx
	addl	$2, %edx
	cmpl	%eax, %edx
	jge	.L5
	movl	8(%rsi), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %ebx
.L5:
	pxor	%xmm1, %xmm1
	movsd	.LC2(%rip), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	pow@PLT
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm1
	movq	%xmm0, %r12
	movsd	.LC3(%rip), %xmm0
	call	pow@PLT
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	movapd	%xmm0, %xmm1
	movq	%r12, %xmm0
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L17:
	xorl	%ebx, %ebx
	jmp	.L5
.L18:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	movq	%rsp, %r14
	testl	%eax, %eax
	jle	.L17
	movq	%r14, %r13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L17
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L18
	movl	%eax, %edx
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm3
	shrl	$2, %edx
	movdqa	%xmm1, %xmm2
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	0(%r13), %xmm0
	addq	$16, %r13
	pand	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%r13, %rdx
	jne	.L8
	movdqa	%xmm1, %xmm0
	movl	%eax, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	testb	$3, %al
	je	.L5
.L7:
	movslq	%edx, %rcx
	leaq	(%r14,%rcx,4), %rsi
	movl	(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	leal	1(%rdx), %ecx
	adcl	$0, %ebx
	cmpl	%ecx, %eax
	jle	.L5
	movl	4(%rsi), %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	adcl	$0, %ebx
	addl	$2, %edx
	cmpl	%eax, %edx
	jge	.L5
	movl	8(%rsi), %edx
	andl	$1, %edx
	cmpl	$1, %edx
	adcl	$0, %ebx
.L5:
	pxor	%xmm1, %xmm1
	movsd	.LC2(%rip), %xmm0
	cvtsi2sdl	%eax, %xmm1
	call	pow@PLT
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm1
	movq	%xmm0, %r12
	movsd	.LC3(%rip), %xmm0
	call	pow@PLT
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	movapd	%xmm0, %xmm1
	movq	%r12, %xmm0
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L17:
	xorl	%ebx, %ebx
	jmp	.L5
.L18:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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:
```