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

```c
/*
AizuOnline A0527
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N;
char ban[100001];
//
void show()
{
  int i;
  char c;
  for(i=1;i<=N;i++)
    {
      if(ban[i]==1)
	c='o';
      else if(ban[i]==0)
	c='*';
      else
	c='.';
      printf("%c",c);
    }
  printf("\n");
}
main()
{
  int i,j,cnt,isi;

  while(EOF!=scanf("%d ",&N) && N)
    {
      memset(ban,-1,sizeof(ban));
      for(i=1;i<=N;i++)
	{
	  scanf("%d",&isi);
	  ban[i]=isi;
	  
	  if((i&1)==0)
	    {  j=i-1;
	      while(j>0 && ban[j]+isi==1)
		{
		  ban[j]=isi;
		  j--;
		}
	    }
	  //show();
	}
      cnt=0;
      for(i=1;i<=N;i++)
	cnt += (ban[i]==0);
      
      printf("%d\n",cnt);
    }
return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	ban
	.align 32
	.type	ban, @object
	.size	ban, 100001
ban:
	.zero	100001
	.text
	.globl	show
	.type	show, @function
show:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$1, %al
	jne	.L3
	movb	$111, -5(%rbp)
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L5
	movb	$42, -5(%rbp)
	jmp	.L4
.L5:
	movb	$46, -5(%rbp)
.L4:
	movsbl	-5(%rbp), %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	show, .-show
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L17:
	movl	$100001, %edx
	movl	$-1, %esi
	leaq	ban(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -20(%rbp)
	jmp	.L9
.L13:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	subl	$1, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$1, %eax
	je	.L12
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L13
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L14
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L15
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L17
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	show
	.type	show, @function
show:
.LFB35:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L16
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	ban(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	$1, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L2:
	cmpb	$1, 0(%rbp,%rbx)
	movl	$111, %edi
	je	.L3
	sbbl	%edi, %edi
	andl	$-4, %edi
	addl	$46, %edi
.L3:
	call	putchar@PLT
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L2
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$10, %edi
	jmp	putchar@PLT
	.cfi_endproc
.LFE35:
	.size	show, .-show
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	ban(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	-1(%r12), %r13
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	movl	N(%rip), %ebx
	testl	%ebx, %ebx
	je	.L31
	movl	$100001, %edx
	movl	$-1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L20
	leaq	4(%rsp), %rbp
	leaq	.LC0(%rip), %rbx
	xorl	%eax, %eax
	movl	$2, %r14d
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	leaq	1+ban(%rip), %r15
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movb	%al, 1+ban(%rip)
	movl	N(%rip), %eax
	cmpl	$1, %eax
	jg	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L21:
	movl	N(%rip), %eax
	addq	$1, %r14
	addq	$1, %r15
	cmpl	%r14d, %eax
	jl	.L24
.L23:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	leaq	1(%r13), %rdi
	movq	%r15, %rax
	movb	%cl, 1(%r15)
	movl	%ecx, %esi
	testb	$1, %r14b
	jne	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L25:
	movb	%sil, (%rax)
	subq	$1, %rax
	cmpq	%rdi, %rax
	je	.L21
.L22:
	movsbl	(%rax), %edx
	addl	%ecx, %edx
	cmpl	$1, %edx
	je	.L25
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	testl	%eax, %eax
	jle	.L20
	leal	-1(%rax), %edx
	cmpl	$14, %edx
	jbe	.L35
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	pxor	%xmm3, %xmm3
	movl	%eax, %ecx
	shrl	$4, %ecx
	leaq	1+ban(%rip), %rdx
	subl	$1, %ecx
	leaq	16(%rdx), %rsi
	salq	$4, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L27:
	movdqu	(%rdx), %xmm0
	addq	$16, %rdx
	pcmpeqb	%xmm4, %xmm0
	pand	.LC1(%rip), %xmm0
	movdqa	%xmm0, %xmm2
	punpckhbw	%xmm4, %xmm0
	punpcklbw	%xmm4, %xmm2
	movdqa	%xmm2, %xmm5
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm5
	paddd	%xmm5, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm0, %xmm2
	punpckhwd	%xmm3, %xmm0
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L27
	movdqa	%xmm1, %xmm0
	movl	%eax, %esi
	psrldq	$8, %xmm0
	andl	$-16, %esi
	paddd	%xmm0, %xmm1
	leal	1(%rsi), %ecx
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %eax
	je	.L29
.L26:
	movslq	%ecx, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	1(%rcx), %esi
	adcl	$0, %edx
	cmpl	%eax, %esi
	jg	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	2(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	3(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	4(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	5(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	6(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	7(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	8(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	9(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	10(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	11(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	12(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	13(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	adcl	$0, %edx
	addl	$14, %ecx
	cmpl	%ecx, %eax
	jl	.L29
	movslq	%ecx, %rcx
	cmpb	$1, (%r12,%rcx)
	adcl	$0, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
.L31:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$24, %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
.L20:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L29
.L35:
	xorl	%edx, %edx
	movl	$1, %ecx
	jmp	.L26
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	ban
	.bss
	.align 32
	.type	ban, @object
	.size	ban, 100001
ban:
	.zero	100001
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
	.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	show
	.type	show, @function
show:
.LFB35:
	.cfi_startproc
	endbr64
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L16
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	ban(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	$1, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L2:
	cmpb	$1, 0(%rbp,%rbx)
	movl	$111, %edi
	je	.L3
	sbbl	%edi, %edi
	andl	$-4, %edi
	addl	$46, %edi
.L3:
	call	putchar@PLT
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L2
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$10, %edi
	jmp	putchar@PLT
	.cfi_endproc
.LFE35:
	.size	show, .-show
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	ban(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	-1(%r12), %r13
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	movl	N(%rip), %ebx
	testl	%ebx, %ebx
	je	.L31
	movl	$100001, %edx
	movl	$-1, %esi
	movq	%r12, %rdi
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L20
	leaq	4(%rsp), %rbp
	leaq	.LC0(%rip), %rbx
	xorl	%eax, %eax
	movl	$2, %r14d
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	leaq	1+ban(%rip), %r15
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movb	%al, 1+ban(%rip)
	movl	N(%rip), %eax
	cmpl	$1, %eax
	jg	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L21:
	movl	N(%rip), %eax
	addq	$1, %r14
	addq	$1, %r15
	cmpl	%r14d, %eax
	jl	.L24
.L23:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	leaq	1(%r13), %rdi
	movq	%r15, %rax
	movb	%cl, 1(%r15)
	movl	%ecx, %esi
	testb	$1, %r14b
	jne	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L25:
	movb	%sil, (%rax)
	subq	$1, %rax
	cmpq	%rdi, %rax
	je	.L21
.L22:
	movsbl	(%rax), %edx
	addl	%ecx, %edx
	cmpl	$1, %edx
	je	.L25
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	testl	%eax, %eax
	jle	.L20
	leal	-1(%rax), %edx
	cmpl	$14, %edx
	jbe	.L35
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	pxor	%xmm3, %xmm3
	movl	%eax, %ecx
	shrl	$4, %ecx
	leaq	1+ban(%rip), %rdx
	subl	$1, %ecx
	leaq	16(%rdx), %rsi
	salq	$4, %rcx
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L27:
	movdqu	(%rdx), %xmm0
	addq	$16, %rdx
	pcmpeqb	%xmm4, %xmm0
	pand	.LC1(%rip), %xmm0
	movdqa	%xmm0, %xmm2
	punpckhbw	%xmm4, %xmm0
	punpcklbw	%xmm4, %xmm2
	movdqa	%xmm2, %xmm5
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm5
	paddd	%xmm5, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm0, %xmm2
	punpckhwd	%xmm3, %xmm0
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L27
	movdqa	%xmm1, %xmm0
	movl	%eax, %esi
	psrldq	$8, %xmm0
	andl	$-16, %esi
	paddd	%xmm0, %xmm1
	leal	1(%rsi), %ecx
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %eax
	je	.L29
.L26:
	movslq	%ecx, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	1(%rcx), %esi
	adcl	$0, %edx
	cmpl	%eax, %esi
	jg	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	2(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	3(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	4(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	5(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	6(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	7(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	8(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	9(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	10(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	11(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	12(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	leal	13(%rcx), %esi
	adcl	$0, %edx
	cmpl	%esi, %eax
	jl	.L29
	movslq	%esi, %rsi
	cmpb	$1, (%r12,%rsi)
	adcl	$0, %edx
	addl	$14, %ecx
	cmpl	%ecx, %eax
	jl	.L29
	movslq	%ecx, %rcx
	cmpb	$1, (%r12,%rcx)
	adcl	$0, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
.L31:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$24, %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
.L20:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L29
.L35:
	xorl	%edx, %edx
	movl	$1, %ecx
	jmp	.L26
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	ban
	.bss
	.align 32
	.type	ban, @object
	.size	ban, 100001
ban:
	.zero	100001
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
	.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:

/*
AizuOnline A0527
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N;
char ban[100001];
//
void show()
{
  int i;
  char c;
  for(i=1;i<=N;i++)
    {
      if(ban[i]==1)
	c='o';
      else if(ban[i]==0)
	c='*';
      else
	c='.';
      printf("%c",c);
    }
  printf("\n");
}
main()
{
  int i,j,cnt,isi;

  while(EOF!=scanf("%d ",&N) && N)
    {
      memset(ban,-1,sizeof(ban));
      for(i=1;i<=N;i++)
	{
	  scanf("%d",&isi);
	  ban[i]=isi;
	  
	  if((i&1)==0)
	    {  j=i-1;
	      while(j>0 && ban[j]+isi==1)
		{
		  ban[j]=isi;
		  j--;
		}
	    }
	  //show();
	}
      cnt=0;
      for(i=1;i<=N;i++)
	cnt += (ban[i]==0);
      
      printf("%d\n",cnt);
    }
return(0);
}
8
1
1
1
1
0
0
0
0
8
1
0
1
1
0
0
0
1
0
 8
1
1
1
1
0
0
0
0
8
1
0
0
1
0
0
0
1
0
 8
1
0
1
1
0
0
0
0
4
1
0
1
1
0
0
0
1
0
 8
1
0
1
1
0
0
0
0
2
1
0
1
1
0
0
-1
1
0
 8
0
0
1
1
0
0
0
0
2
1
0
2
1
0
0
-1
1
0
 8
1
1
1
1
0
0
0
0
8
1
0
1
1
0
0
1
1
0
 8
1
0
1
1
0
0
-1
0
8
1
0
0
1
0
0
0
1
0
 8
1
1
2
1
0
0
0
0
1
0
0
1
1
0
0
0
1
0
 8
0
0
1
1
0
0
0
0
3
1
0
1
1
0
0
-1
1
0
 8
1
1
1
1
1
0
0
0
8
1
0
1
1
0
0
1
1
0

4
2
 4
0
 6
2
 6
2
0
 6
2
2
 4
4
 5
0
 4
1
 6
2
1
 8
4

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

```c
/*
AizuOnline A0527
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N;
char ban[100001];
//
void show()
{
  int i;
  char c;
  for(i=1;i<=N;i++)
    {
      if(ban[i]==1)
	c='o';
      else if(ban[i]==0)
	c='*';
      else
	c='.';
      printf("%c",c);
    }
  printf("\n");
}
main()
{
  int i,j,cnt,isi;

  while(EOF!=scanf("%d ",&N) && N)
    {
      memset(ban,-1,sizeof(ban));
      for(i=1;i<=N;i++)
	{
	  scanf("%d",&isi);
	  ban[i]=isi;
	  
	  if((i&1)==0)
	    {  j=i-1;
	      while(j>0 && ban[j]+isi==1)
		{
		  ban[j]=isi;
		  j--;
		}
	    }
	  //show();
	}
      cnt=0;
      for(i=1;i<=N;i++)
	cnt += (ban[i]==0);
      
      printf("%d\n",cnt);
    }
return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	ban
	.align 32
	.type	ban, @object
	.size	ban, 100001
ban:
	.zero	100001
	.text
	.globl	show
	.type	show, @function
show:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$1, %al
	jne	.L3
	movb	$111, -5(%rbp)
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L5
	movb	$42, -5(%rbp)
	jmp	.L4
.L5:
	movb	$46, -5(%rbp)
.L4:
	movsbl	-5(%rbp), %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	show, .-show
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L17:
	movl	$100001, %edx
	movl	$-1, %esi
	leaq	ban(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -20(%rbp)
	jmp	.L9
.L13:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	subl	$1, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$1, %eax
	je	.L12
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L13
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L14
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L15
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L17
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	ban
	.align 32
	.type	ban, @object
	.size	ban, 100001
ban:
	.zero	100001
	.text
	.globl	show
	.type	show, @function
show:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	jmp	.L2
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$1, %al
	jne	.L3
	movb	$111, -5(%rbp)
	jmp	.L4
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L5
	movb	$42, -5(%rbp)
	jmp	.L4
.L5:
	movb	$46, -5(%rbp)
.L4:
	movsbl	-5(%rbp), %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	show, .-show
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L17:
	movl	$100001, %edx
	movl	$-1, %esi
	leaq	ban(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -20(%rbp)
	jmp	.L9
.L13:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	subl	$1, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$1, %eax
	je	.L12
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L13
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L14
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	ban(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L14:
	movl	N(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L15
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L17
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
