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 <string.h>

int main (void) {
    char    s[100001];
    int     s_len;
    int     even_n, odd_n;
    int     even_white=0, odd_white=0;
    int     i;

    scanf("%s", s);
    s_len = strlen(s);
    even_n = s_len/2;
    odd_n = s_len-even_n;
    for ( i=0; i<s_len; i++ ) {
        if ( i%2 )
            even_white += s[i]-'0';
        else
            odd_white += s[i]-'0';
    }
    //printf("even_white: %d, odd_white: %d\n", even_white, odd_white);

    if ( (odd_n-odd_white)+even_white > (even_n-even_white)+odd_white ) {
        /* even->white, odd->black */
        printf("%d\n", (even_n-even_white)+odd_white);
    } else {
        /* even->black, odd->white */
        printf("%d\n", (odd_n-odd_white)+even_white);
    }
    return EXIT_SUCCESS;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\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
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -100040(%rbp)
	movl	$0, -100036(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100028(%rbp)
	movl	-100028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -100024(%rbp)
	movl	-100028(%rbp), %eax
	subl	-100024(%rbp), %eax
	movl	%eax, -100020(%rbp)
	movl	$0, -100032(%rbp)
	jmp	.L2
.L5:
	movl	-100032(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100040(%rbp)
	jmp	.L4
.L3:
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100036(%rbp)
.L4:
	addl	$1, -100032(%rbp)
.L2:
	movl	-100032(%rbp), %eax
	cmpl	-100028(%rbp), %eax
	jl	.L5
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%eax, %edx
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %ecx
	movl	-100036(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %edx
	movl	-100036(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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
.LC1:
	.string	"%s"
.LC8:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$1760, %rsp
	.cfi_def_cfa_offset 100080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100056(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	movl	%eax, %r8d
	sarl	%edi
	subl	%edi, %r8d
	testq	%rax, %rax
	je	.L40
	movq	%rax, %rdx
	leal	-1(%rax), %eax
	cmpl	$14, %eax
	jbe	.L3
	movl	%edx, %ecx
	pxor	%xmm15, %xmm15
	movq	%rbx, %rax
	movdqa	.LC0(%rip), %xmm14
	shrl	$4, %ecx
	movdqa	%xmm15, %xmm11
	movdqa	%xmm15, %xmm6
	movdqa	.LC3(%rip), %xmm10
	movdqa	.LC4(%rip), %xmm9
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	64(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rax), %xmm3
	pxor	%xmm1, %xmm1
	movdqa	%xmm14, %xmm0
	movdqa	.LC5(%rip), %xmm2
	movdqa	%xmm0, %xmm4
	addq	$16, %rax
	paddd	.LC2(%rip), %xmm14
	pcmpgtb	%xmm3, %xmm1
	movdqa	%xmm3, %xmm5
	paddd	%xmm0, %xmm2
	pand	%xmm9, %xmm2
	pand	%xmm9, %xmm4
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm6, %xmm4
	punpcklbw	%xmm1, %xmm5
	punpckhbw	%xmm1, %xmm3
	pxor	%xmm1, %xmm1
	pcmpgtw	%xmm5, %xmm1
	movdqa	%xmm5, %xmm8
	movdqa	%xmm3, %xmm7
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm6, %xmm4
	punpcklwd	%xmm1, %xmm8
	punpckhwd	%xmm1, %xmm5
	pxor	%xmm1, %xmm1
	pcmpgtw	%xmm3, %xmm1
	paddd	%xmm10, %xmm5
	movdqa	%xmm2, %xmm12
	pand	%xmm5, %xmm12
	paddd	%xmm10, %xmm8
	movdqa	%xmm4, %xmm13
	movaps	%xmm12, (%rsp)
	pandn	%xmm8, %xmm4
	pandn	%xmm5, %xmm2
	pand	%xmm8, %xmm13
	punpcklwd	%xmm1, %xmm7
	punpckhwd	%xmm1, %xmm3
	paddd	%xmm15, %xmm4
	movdqa	.LC6(%rip), %xmm1
	paddd	%xmm10, %xmm7
	paddd	%xmm10, %xmm3
	paddd	%xmm0, %xmm1
	paddd	.LC7(%rip), %xmm0
	pand	%xmm9, %xmm1
	paddd	%xmm4, %xmm2
	paddd	%xmm11, %xmm13
	pcmpeqd	%xmm6, %xmm1
	pand	%xmm9, %xmm0
	pcmpeqd	%xmm6, %xmm0
	pcmpeqd	%xmm6, %xmm1
	pcmpeqd	%xmm6, %xmm0
	movdqa	%xmm1, %xmm12
	pandn	%xmm7, %xmm1
	pand	%xmm7, %xmm12
	paddd	%xmm2, %xmm1
	movaps	%xmm12, 16(%rsp)
	movdqa	%xmm0, %xmm12
	movdqa	16(%rsp), %xmm11
	pandn	%xmm3, %xmm0
	pand	%xmm3, %xmm12
	paddd	%xmm1, %xmm0
	movaps	%xmm12, 32(%rsp)
	movdqa	(%rsp), %xmm12
	movdqa	%xmm0, %xmm15
	paddd	%xmm13, %xmm12
	paddd	%xmm12, %xmm11
	paddd	32(%rsp), %xmm11
	cmpq	%rcx, %rax
	jne	.L4
	psrldq	$8, %xmm0
	movl	%edx, %esi
	paddd	%xmm15, %xmm0
	andl	$-16, %esi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	movdqa	%xmm11, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm11, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	testb	$15, %dl
	je	.L2
	movslq	%esi, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
.L38:
	addl	%r9d, %eax
	leal	1(%rsi), %r9d
	cmpl	%edx, %r9d
	jge	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andl	$1, %r9d
	jne	.L45
	addl	%r10d, %eax
.L8:
	leal	2(%rsi), %r9d
	cmpl	%edx, %r9d
	jge	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	3(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L11
	addl	%r10d, %ecx
.L12:
	leal	4(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	5(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L15
	addl	%r10d, %ecx
.L16:
	leal	6(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	7(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	jne	.L46
	addl	%r10d, %eax
.L20:
	leal	8(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	9(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L23
	addl	%r10d, %ecx
.L24:
	leal	10(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	11(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L27
	addl	%r10d, %ecx
.L28:
	leal	12(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	13(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L31
	addl	%r10d, %ecx
.L32:
	addl	$14, %esi
	cmpl	%esi, %edx
	jle	.L2
	movslq	%esi, %rsi
	movsbl	48(%rsp,%rsi), %edx
	subl	$48, %edx
	addl	%edx, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	subl	%eax, %r8d
	subl	%ecx, %edi
	leal	(%r8,%rcx), %edx
	leal	(%rdi,%rax), %r8d
	cmpl	%r8d, %edx
	jle	.L36
	movl	%r8d, %edx
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L37:
	movq	100056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$100064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L37
.L45:
	addl	%r10d, %ecx
	jmp	.L8
.L11:
	addl	%r10d, %eax
	jmp	.L12
.L15:
	addl	%r10d, %eax
	jmp	.L16
.L46:
	addl	%r10d, %ecx
	jmp	.L20
.L23:
	addl	%r10d, %eax
	jmp	.L24
.L27:
	addl	%r10d, %eax
	jmp	.L28
.L40:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L2
.L31:
	addl	%r10d, %eax
	jmp	.L32
.L3:
	movsbl	48(%rsp), %r9d
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	subl	$48, %r9d
	jmp	.L38
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	-48
	.long	-48
	.long	-48
	.long	-48
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC5:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC6:
	.long	8
	.long	8
	.long	8
	.long	8
	.align 16
.LC7:
	.long	12
	.long	12
	.long	12
	.long	12
	.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"
.LC8:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$1760, %rsp
	.cfi_def_cfa_offset 100080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100056(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	movl	%eax, %r8d
	sarl	%edi
	subl	%edi, %r8d
	testq	%rax, %rax
	je	.L40
	movq	%rax, %rdx
	leal	-1(%rax), %eax
	cmpl	$14, %eax
	jbe	.L3
	movl	%edx, %ecx
	pxor	%xmm15, %xmm15
	movq	%rbx, %rax
	movdqa	.LC0(%rip), %xmm14
	shrl	$4, %ecx
	movdqa	%xmm15, %xmm11
	movdqa	%xmm15, %xmm6
	movdqa	.LC3(%rip), %xmm10
	movdqa	.LC4(%rip), %xmm9
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	64(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rax), %xmm3
	pxor	%xmm1, %xmm1
	movdqa	%xmm14, %xmm0
	movdqa	.LC5(%rip), %xmm2
	movdqa	%xmm0, %xmm4
	addq	$16, %rax
	paddd	.LC2(%rip), %xmm14
	pcmpgtb	%xmm3, %xmm1
	movdqa	%xmm3, %xmm5
	paddd	%xmm0, %xmm2
	pand	%xmm9, %xmm2
	pand	%xmm9, %xmm4
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm6, %xmm4
	punpcklbw	%xmm1, %xmm5
	punpckhbw	%xmm1, %xmm3
	pxor	%xmm1, %xmm1
	pcmpgtw	%xmm5, %xmm1
	movdqa	%xmm5, %xmm8
	movdqa	%xmm3, %xmm7
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm6, %xmm4
	punpcklwd	%xmm1, %xmm8
	punpckhwd	%xmm1, %xmm5
	pxor	%xmm1, %xmm1
	pcmpgtw	%xmm3, %xmm1
	paddd	%xmm10, %xmm5
	movdqa	%xmm2, %xmm12
	pand	%xmm5, %xmm12
	paddd	%xmm10, %xmm8
	movdqa	%xmm4, %xmm13
	movaps	%xmm12, (%rsp)
	pandn	%xmm8, %xmm4
	pandn	%xmm5, %xmm2
	pand	%xmm8, %xmm13
	punpcklwd	%xmm1, %xmm7
	punpckhwd	%xmm1, %xmm3
	paddd	%xmm15, %xmm4
	movdqa	.LC6(%rip), %xmm1
	paddd	%xmm10, %xmm7
	paddd	%xmm10, %xmm3
	paddd	%xmm0, %xmm1
	paddd	.LC7(%rip), %xmm0
	pand	%xmm9, %xmm1
	paddd	%xmm4, %xmm2
	paddd	%xmm11, %xmm13
	pcmpeqd	%xmm6, %xmm1
	pand	%xmm9, %xmm0
	pcmpeqd	%xmm6, %xmm0
	pcmpeqd	%xmm6, %xmm1
	pcmpeqd	%xmm6, %xmm0
	movdqa	%xmm1, %xmm12
	pandn	%xmm7, %xmm1
	pand	%xmm7, %xmm12
	paddd	%xmm2, %xmm1
	movaps	%xmm12, 16(%rsp)
	movdqa	%xmm0, %xmm12
	movdqa	16(%rsp), %xmm11
	pandn	%xmm3, %xmm0
	pand	%xmm3, %xmm12
	paddd	%xmm1, %xmm0
	movaps	%xmm12, 32(%rsp)
	movdqa	(%rsp), %xmm12
	movdqa	%xmm0, %xmm15
	paddd	%xmm13, %xmm12
	paddd	%xmm12, %xmm11
	paddd	32(%rsp), %xmm11
	cmpq	%rcx, %rax
	jne	.L4
	psrldq	$8, %xmm0
	movl	%edx, %esi
	paddd	%xmm15, %xmm0
	andl	$-16, %esi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	movdqa	%xmm11, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm11, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	testb	$15, %dl
	je	.L2
	movslq	%esi, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
.L38:
	addl	%r9d, %eax
	leal	1(%rsi), %r9d
	cmpl	%edx, %r9d
	jge	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andl	$1, %r9d
	jne	.L45
	addl	%r10d, %eax
.L8:
	leal	2(%rsi), %r9d
	cmpl	%edx, %r9d
	jge	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	3(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L11
	addl	%r10d, %ecx
.L12:
	leal	4(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	5(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L15
	addl	%r10d, %ecx
.L16:
	leal	6(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	7(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	jne	.L46
	addl	%r10d, %eax
.L20:
	leal	8(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	9(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L23
	addl	%r10d, %ecx
.L24:
	leal	10(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	11(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L27
	addl	%r10d, %ecx
.L28:
	leal	12(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r9
	movsbl	48(%rsp,%r9), %r9d
	subl	$48, %r9d
	addl	%r9d, %eax
	leal	13(%rsi), %r9d
	cmpl	%r9d, %edx
	jle	.L2
	movslq	%r9d, %r10
	movsbl	48(%rsp,%r10), %r10d
	subl	$48, %r10d
	andb	$1, %r9b
	je	.L31
	addl	%r10d, %ecx
.L32:
	addl	$14, %esi
	cmpl	%esi, %edx
	jle	.L2
	movslq	%esi, %rsi
	movsbl	48(%rsp,%rsi), %edx
	subl	$48, %edx
	addl	%edx, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	subl	%eax, %r8d
	subl	%ecx, %edi
	leal	(%r8,%rcx), %edx
	leal	(%rdi,%rax), %r8d
	cmpl	%r8d, %edx
	jle	.L36
	movl	%r8d, %edx
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L37:
	movq	100056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$100064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	leaq	.LC8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L37
.L45:
	addl	%r10d, %ecx
	jmp	.L8
.L11:
	addl	%r10d, %eax
	jmp	.L12
.L15:
	addl	%r10d, %eax
	jmp	.L16
.L46:
	addl	%r10d, %ecx
	jmp	.L20
.L23:
	addl	%r10d, %eax
	jmp	.L24
.L27:
	addl	%r10d, %eax
	jmp	.L28
.L40:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L2
.L31:
	addl	%r10d, %eax
	jmp	.L32
.L3:
	movsbl	48(%rsp), %r9d
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	subl	$48, %r9d
	jmp	.L38
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	-48
	.long	-48
	.long	-48
	.long	-48
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC5:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC6:
	.long	8
	.long	8
	.long	8
	.long	8
	.align 16
.LC7:
	.long	12
	.long	12
	.long	12
	.long	12
	.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 <string.h>

int main (void) {
    char    s[100001];
    int     s_len;
    int     even_n, odd_n;
    int     even_white=0, odd_white=0;
    int     i;

    scanf("%s", s);
    s_len = strlen(s);
    even_n = s_len/2;
    odd_n = s_len-even_n;
    for ( i=0; i<s_len; i++ ) {
        if ( i%2 )
            even_white += s[i]-'0';
        else
            odd_white += s[i]-'0';
    }
    //printf("even_white: %d, odd_white: %d\n", even_white, odd_white);

    if ( (odd_n-odd_white)+even_white > (even_n-even_white)+odd_white ) {
        /* even->white, odd->black */
        printf("%d\n", (even_n-even_white)+odd_white);
    } else {
        /* even->black, odd->white */
        printf("%d\n", (odd_n-odd_white)+even_white);
    }
    return EXIT_SUCCESS;
}

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

int main (void) {
    char    s[100001];
    int     s_len;
    int     even_n, odd_n;
    int     even_white=0, odd_white=0;
    int     i;

    scanf("%s", s);
    s_len = strlen(s);
    even_n = s_len/2;
    odd_n = s_len-even_n;
    for ( i=0; i<s_len; i++ ) {
        if ( i%2 )
            even_white += s[i]-'0';
        else
            odd_white += s[i]-'0';
    }
    //printf("even_white: %d, odd_white: %d\n", even_white, odd_white);

    if ( (odd_n-odd_white)+even_white > (even_n-even_white)+odd_white ) {
        /* even->white, odd->black */
        printf("%d\n", (even_n-even_white)+odd_white);
    } else {
        /* even->black, odd->white */
        printf("%d\n", (odd_n-odd_white)+even_white);
    }
    return EXIT_SUCCESS;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\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
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -100040(%rbp)
	movl	$0, -100036(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100028(%rbp)
	movl	-100028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -100024(%rbp)
	movl	-100028(%rbp), %eax
	subl	-100024(%rbp), %eax
	movl	%eax, -100020(%rbp)
	movl	$0, -100032(%rbp)
	jmp	.L2
.L5:
	movl	-100032(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100040(%rbp)
	jmp	.L4
.L3:
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100036(%rbp)
.L4:
	addl	$1, -100032(%rbp)
.L2:
	movl	-100032(%rbp), %eax
	cmpl	-100028(%rbp), %eax
	jl	.L5
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%eax, %edx
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %ecx
	movl	-100036(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %edx
	movl	-100036(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"%s"
.LC1:
	.string	"%d\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
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -100040(%rbp)
	movl	$0, -100036(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100028(%rbp)
	movl	-100028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -100024(%rbp)
	movl	-100028(%rbp), %eax
	subl	-100024(%rbp), %eax
	movl	%eax, -100020(%rbp)
	movl	$0, -100032(%rbp)
	jmp	.L2
.L5:
	movl	-100032(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100040(%rbp)
	jmp	.L4
.L3:
	movl	-100032(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -100036(%rbp)
.L4:
	addl	$1, -100032(%rbp)
.L2:
	movl	-100032(%rbp), %eax
	cmpl	-100028(%rbp), %eax
	jl	.L5
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%eax, %edx
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %ecx
	movl	-100036(%rbp), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-100024(%rbp), %eax
	subl	-100040(%rbp), %eax
	movl	%eax, %edx
	movl	-100036(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-100020(%rbp), %eax
	subl	-100036(%rbp), %eax
	movl	%eax, %edx
	movl	-100040(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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:
