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 <string.h>
int main() {
 int A=0,B=0;
 char s[100001]={};
 scanf("%s",s);
 for (int i=0;i<strlen(s);i++)
  if((i%2==0&&s[i]=='1')||(i%2==1&&s[i]=='0'))
   A++;
  else
   B++;
 printf("%d\n",A>B?B:A);
 return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1736, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -100044(%rbp)
	movl	$0, -100040(%rbp)
	movq	$0, -100032(%rbp)
	movq	$0, -100024(%rbp)
	leaq	-100016(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -100036(%rbp)
	jmp	.L2
.L7:
	movl	-100036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$49, %al
	je	.L4
.L3:
	movl	-100036(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L5
.L4:
	addl	$1, -100044(%rbp)
	jmp	.L6
.L5:
	addl	$1, -100040(%rbp)
.L6:
	addl	$1, -100036(%rbp)
.L2:
	movl	-100036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L7
	movl	-100044(%rbp), %edx
	movl	-100040(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %esi
	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	.L9
	call	__stack_chk_fail@PLT
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
.LC1:
	.string	"%s"
.LC10:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	movl	$99985, %edx
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movq	%rsp, %rbx
	movaps	%xmm0, (%rsp)
	call	memset@PLT
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L13
	leaq	-1(%rax), %rdx
	cmpq	$14, %rdx
	jbe	.L14
	movq	%rax, %rcx
	pxor	%xmm2, %xmm2
	pxor	%xmm13, %xmm13
	movq	%rbx, %rdx
	andq	$-16, %rcx
	movdqa	%xmm2, %xmm3
	movdqa	.LC0(%rip), %xmm11
	movdqa	.LC6(%rip), %xmm9
	movdqa	.LC7(%rip), %xmm10
	addq	%rbx, %rcx
	movdqa	%xmm2, %xmm8
	movdqa	.LC8(%rip), %xmm15
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	.LC3(%rip), %xmm6
	movdqa	%xmm11, %xmm0
	addq	$16, %rdx
	movdqa	.LC4(%rip), %xmm1
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm11
	paddd	%xmm0, %xmm6
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm5
	pand	%xmm9, %xmm0
	pand	%xmm9, %xmm6
	pcmpeqd	%xmm8, %xmm0
	pcmpeqd	%xmm8, %xmm6
	pand	%xmm9, %xmm1
	pcmpeqd	%xmm8, %xmm1
	pand	%xmm9, %xmm5
	pcmpeqd	%xmm8, %xmm5
	movdqa	%xmm0, %xmm4
	movdqa	%xmm0, %xmm7
	punpcklwd	%xmm6, %xmm4
	pcmpeqd	%xmm8, %xmm0
	punpckhwd	%xmm6, %xmm7
	movdqa	%xmm4, %xmm12
	pcmpeqd	%xmm8, %xmm6
	punpcklwd	%xmm7, %xmm4
	punpckhwd	%xmm7, %xmm12
	movdqa	%xmm1, %xmm7
	punpcklwd	%xmm5, %xmm7
	punpcklwd	%xmm12, %xmm4
	movdqa	%xmm1, %xmm12
	punpckhwd	%xmm5, %xmm12
	movdqa	%xmm7, %xmm14
	pand	%xmm10, %xmm4
	punpckhwd	%xmm12, %xmm14
	pcmpeqd	%xmm8, %xmm5
	punpcklwd	%xmm12, %xmm7
	punpcklwd	%xmm14, %xmm7
	pcmpeqd	%xmm8, %xmm1
	pand	%xmm10, %xmm7
	packuswb	%xmm7, %xmm4
	movdqa	%xmm0, %xmm7
	punpcklwd	%xmm6, %xmm0
	punpckhwd	%xmm6, %xmm7
	movdqa	%xmm0, %xmm6
	punpckhwd	%xmm7, %xmm6
	punpcklwd	%xmm7, %xmm0
	punpcklwd	%xmm6, %xmm0
	movdqa	%xmm1, %xmm6
	punpcklwd	%xmm5, %xmm1
	punpckhwd	%xmm5, %xmm6
	movdqa	%xmm1, %xmm5
	pand	%xmm10, %xmm0
	punpckhwd	%xmm6, %xmm5
	punpcklwd	%xmm6, %xmm1
	movdqa	%xmm13, %xmm6
	punpcklwd	%xmm5, %xmm1
	movdqa	%xmm15, %xmm5
	pand	%xmm10, %xmm1
	pcmpeqb	-16(%rdx), %xmm5
	packuswb	%xmm1, %xmm0
	movdqa	-16(%rdx), %xmm1
	pcmpeqb	.LC9(%rip), %xmm1
	pand	%xmm5, %xmm0
	pand	%xmm4, %xmm1
	por	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	pcmpgtb	%xmm0, %xmm1
	movdqa	%xmm0, %xmm4
	punpcklbw	%xmm1, %xmm4
	punpckhbw	%xmm1, %xmm0
	movdqa	%xmm13, %xmm1
	pcmpgtw	%xmm4, %xmm1
	pcmpgtw	%xmm0, %xmm6
	movdqa	%xmm4, %xmm5
	punpcklwd	%xmm1, %xmm5
	punpckhwd	%xmm1, %xmm4
	movdqa	%xmm0, %xmm1
	psubd	%xmm5, %xmm3
	punpcklwd	%xmm6, %xmm1
	pandn	%xmm9, %xmm5
	psubd	%xmm4, %xmm3
	punpckhwd	%xmm6, %xmm0
	pandn	%xmm9, %xmm4
	psubd	%xmm1, %xmm3
	paddd	%xmm5, %xmm2
	pandn	%xmm9, %xmm1
	paddd	%xmm4, %xmm2
	psubd	%xmm0, %xmm3
	pandn	%xmm9, %xmm0
	paddd	%xmm2, %xmm1
	movdqa	%xmm0, %xmm2
	paddd	%xmm1, %xmm2
	cmpq	%rcx, %rdx
	jne	.L4
	movdqa	%xmm2, %xmm0
	movq	%rax, %rdi
	psrldq	$8, %xmm0
	andq	$-16, %rdi
	paddd	%xmm0, %xmm2
	movslq	%edi, %rcx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %edx
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %esi
	cmpq	%rdi, %rax
	jne	.L8
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rcx
	addl	$1, %edx
	cmpq	%rcx, %rax
	jbe	.L2
.L8:
	movl	%ecx, %edi
	testb	$1, %cl
	jne	.L7
	cmpb	$49, (%rbx,%rcx)
	je	.L11
.L7:
	andl	$1, %edi
	je	.L10
	cmpb	$48, (%rbx,%rcx)
	jne	.L10
.L11:
	addq	$1, %rcx
	addl	$1, %esi
	cmpq	%rcx, %rax
	ja	.L8
.L2:
	cmpl	%esi, %edx
	movl	$1, %edi
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC10(%rip), %rsi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L2
.L14:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	16
	.long	16
	.long	16
	.long	16
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	8
	.long	8
	.long	8
	.long	8
	.align 16
.LC5:
	.long	12
	.long	12
	.long	12
	.long	12
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC7:
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.align 16
.LC8:
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.align 16
.LC9:
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.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
.LC1:
	.string	"%s"
.LC10:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	movl	$99985, %edx
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movq	%rsp, %rbx
	movaps	%xmm0, (%rsp)
	call	memset@PLT
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L13
	leaq	-1(%rax), %rdx
	cmpq	$14, %rdx
	jbe	.L14
	movq	%rax, %rcx
	pxor	%xmm2, %xmm2
	pxor	%xmm13, %xmm13
	movq	%rbx, %rdx
	andq	$-16, %rcx
	movdqa	%xmm2, %xmm3
	movdqa	.LC0(%rip), %xmm11
	movdqa	.LC6(%rip), %xmm9
	movdqa	.LC7(%rip), %xmm10
	addq	%rbx, %rcx
	movdqa	%xmm2, %xmm8
	movdqa	.LC8(%rip), %xmm15
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	.LC3(%rip), %xmm6
	movdqa	%xmm11, %xmm0
	addq	$16, %rdx
	movdqa	.LC4(%rip), %xmm1
	movdqa	.LC5(%rip), %xmm5
	paddd	.LC2(%rip), %xmm11
	paddd	%xmm0, %xmm6
	paddd	%xmm0, %xmm1
	paddd	%xmm0, %xmm5
	pand	%xmm9, %xmm0
	pand	%xmm9, %xmm6
	pcmpeqd	%xmm8, %xmm0
	pcmpeqd	%xmm8, %xmm6
	pand	%xmm9, %xmm1
	pcmpeqd	%xmm8, %xmm1
	pand	%xmm9, %xmm5
	pcmpeqd	%xmm8, %xmm5
	movdqa	%xmm0, %xmm4
	movdqa	%xmm0, %xmm7
	punpcklwd	%xmm6, %xmm4
	pcmpeqd	%xmm8, %xmm0
	punpckhwd	%xmm6, %xmm7
	movdqa	%xmm4, %xmm12
	pcmpeqd	%xmm8, %xmm6
	punpcklwd	%xmm7, %xmm4
	punpckhwd	%xmm7, %xmm12
	movdqa	%xmm1, %xmm7
	punpcklwd	%xmm5, %xmm7
	punpcklwd	%xmm12, %xmm4
	movdqa	%xmm1, %xmm12
	punpckhwd	%xmm5, %xmm12
	movdqa	%xmm7, %xmm14
	pand	%xmm10, %xmm4
	punpckhwd	%xmm12, %xmm14
	pcmpeqd	%xmm8, %xmm5
	punpcklwd	%xmm12, %xmm7
	punpcklwd	%xmm14, %xmm7
	pcmpeqd	%xmm8, %xmm1
	pand	%xmm10, %xmm7
	packuswb	%xmm7, %xmm4
	movdqa	%xmm0, %xmm7
	punpcklwd	%xmm6, %xmm0
	punpckhwd	%xmm6, %xmm7
	movdqa	%xmm0, %xmm6
	punpckhwd	%xmm7, %xmm6
	punpcklwd	%xmm7, %xmm0
	punpcklwd	%xmm6, %xmm0
	movdqa	%xmm1, %xmm6
	punpcklwd	%xmm5, %xmm1
	punpckhwd	%xmm5, %xmm6
	movdqa	%xmm1, %xmm5
	pand	%xmm10, %xmm0
	punpckhwd	%xmm6, %xmm5
	punpcklwd	%xmm6, %xmm1
	movdqa	%xmm13, %xmm6
	punpcklwd	%xmm5, %xmm1
	movdqa	%xmm15, %xmm5
	pand	%xmm10, %xmm1
	pcmpeqb	-16(%rdx), %xmm5
	packuswb	%xmm1, %xmm0
	movdqa	-16(%rdx), %xmm1
	pcmpeqb	.LC9(%rip), %xmm1
	pand	%xmm5, %xmm0
	pand	%xmm4, %xmm1
	por	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	pcmpgtb	%xmm0, %xmm1
	movdqa	%xmm0, %xmm4
	punpcklbw	%xmm1, %xmm4
	punpckhbw	%xmm1, %xmm0
	movdqa	%xmm13, %xmm1
	pcmpgtw	%xmm4, %xmm1
	pcmpgtw	%xmm0, %xmm6
	movdqa	%xmm4, %xmm5
	punpcklwd	%xmm1, %xmm5
	punpckhwd	%xmm1, %xmm4
	movdqa	%xmm0, %xmm1
	psubd	%xmm5, %xmm3
	punpcklwd	%xmm6, %xmm1
	pandn	%xmm9, %xmm5
	psubd	%xmm4, %xmm3
	punpckhwd	%xmm6, %xmm0
	pandn	%xmm9, %xmm4
	psubd	%xmm1, %xmm3
	paddd	%xmm5, %xmm2
	pandn	%xmm9, %xmm1
	paddd	%xmm4, %xmm2
	psubd	%xmm0, %xmm3
	pandn	%xmm9, %xmm0
	paddd	%xmm2, %xmm1
	movdqa	%xmm0, %xmm2
	paddd	%xmm1, %xmm2
	cmpq	%rcx, %rdx
	jne	.L4
	movdqa	%xmm2, %xmm0
	movq	%rax, %rdi
	psrldq	$8, %xmm0
	andq	$-16, %rdi
	paddd	%xmm0, %xmm2
	movslq	%edi, %rcx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %edx
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %esi
	cmpq	%rdi, %rax
	jne	.L8
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rcx
	addl	$1, %edx
	cmpq	%rcx, %rax
	jbe	.L2
.L8:
	movl	%ecx, %edi
	testb	$1, %cl
	jne	.L7
	cmpb	$49, (%rbx,%rcx)
	je	.L11
.L7:
	andl	$1, %edi
	je	.L10
	cmpb	$48, (%rbx,%rcx)
	jne	.L10
.L11:
	addq	$1, %rcx
	addl	$1, %esi
	cmpq	%rcx, %rax
	ja	.L8
.L2:
	cmpl	%esi, %edx
	movl	$1, %edi
	cmovg	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC10(%rip), %rsi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L2
.L14:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	16
	.long	16
	.long	16
	.long	16
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	8
	.long	8
	.long	8
	.long	8
	.align 16
.LC5:
	.long	12
	.long	12
	.long	12
	.long	12
	.align 16
.LC6:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC7:
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.value	255
	.align 16
.LC8:
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.byte	48
	.align 16
.LC9:
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.byte	49
	.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 <string.h>
int main() {
 int A=0,B=0;
 char s[100001]={};
 scanf("%s",s);
 for (int i=0;i<strlen(s);i++)
  if((i%2==0&&s[i]=='1')||(i%2==1&&s[i]=='0'))
   A++;
  else
   B++;
 printf("%d\n",A>B?B:A);
 return 0;
}

10110010
 010
 10110110
 00110110
 100
 10100110
 01110110
 01110111
 10011010
 1

2
 0
 3
 4
 1
 2
 3
 2
 2
 0

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 <string.h>
int main() {
 int A=0,B=0;
 char s[100001]={};
 scanf("%s",s);
 for (int i=0;i<strlen(s);i++)
  if((i%2==0&&s[i]=='1')||(i%2==1&&s[i]=='0'))
   A++;
  else
   B++;
 printf("%d\n",A>B?B:A);
 return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1736, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -100044(%rbp)
	movl	$0, -100040(%rbp)
	movq	$0, -100032(%rbp)
	movq	$0, -100024(%rbp)
	leaq	-100016(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -100036(%rbp)
	jmp	.L2
.L7:
	movl	-100036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$49, %al
	je	.L4
.L3:
	movl	-100036(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L5
.L4:
	addl	$1, -100044(%rbp)
	jmp	.L6
.L5:
	addl	$1, -100040(%rbp)
.L6:
	addl	$1, -100036(%rbp)
.L2:
	movl	-100036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L7
	movl	-100044(%rbp), %edx
	movl	-100040(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %esi
	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	.L9
	call	__stack_chk_fail@PLT
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1736, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -100044(%rbp)
	movl	$0, -100040(%rbp)
	movq	$0, -100032(%rbp)
	movq	$0, -100024(%rbp)
	leaq	-100016(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -100036(%rbp)
	jmp	.L2
.L7:
	movl	-100036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$49, %al
	je	.L4
.L3:
	movl	-100036(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-100036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L5
.L4:
	addl	$1, -100044(%rbp)
	jmp	.L6
.L5:
	addl	$1, -100040(%rbp)
.L6:
	addl	$1, -100036(%rbp)
.L2:
	movl	-100036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L7
	movl	-100044(%rbp), %edx
	movl	-100040(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %esi
	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	.L9
	call	__stack_chk_fail@PLT
.L9:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
