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 <stdlib.h>
#include <math.h>
#include <string.h>
#define M 1000000007
int main(void){
    char s[100001];
    int i,ans=0;
    scanf("%s",s);
    int len=strlen(s);
    for(i=0;i<len-1;i++){
        if(s[i]!=s[i+1])ans++;
    }
    printf("%d\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC2:
	.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	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L24
	subl	$2, %eax
	cmpl	$14, %eax
	jbe	.L25
	movl	%ecx, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	shrl	$4, %edx
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm4, %xmm4
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	1(%rax), %xmm0
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm3
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm3, %xmm2
	punpckhbw	%xmm3, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtw	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm3, %xmm7
	punpckhwd	%xmm3, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm3
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L4
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$15, %cl
	je	.L2
.L3:
	leal	1(%rax), %esi
	movslq	%eax, %r8
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, (%rsp,%r8)
	je	.L7
	addl	$1, %edx
.L7:
	cmpl	%ecx, %esi
	jge	.L2
	leal	2(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%dil, %r8b
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L2
	leal	3(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L9
	addl	$1, %edx
.L9:
	cmpl	%esi, %ecx
	jle	.L2
	leal	4(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L10
	addl	$1, %edx
.L10:
	cmpl	%esi, %ecx
	jle	.L2
	leal	5(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L11
	addl	$1, %edx
.L11:
	cmpl	%esi, %ecx
	jle	.L2
	leal	6(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L12
	addl	$1, %edx
.L12:
	cmpl	%esi, %ecx
	jle	.L2
	leal	7(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%esi, %ecx
	jle	.L2
	leal	8(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%esi, %ecx
	jle	.L2
	leal	9(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L15
	addl	$1, %edx
.L15:
	cmpl	%esi, %ecx
	jle	.L2
	leal	10(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L16
	addl	$1, %edx
.L16:
	cmpl	%esi, %ecx
	jle	.L2
	leal	11(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L17
	addl	$1, %edx
.L17:
	cmpl	%esi, %ecx
	jle	.L2
	leal	12(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L18
	addl	$1, %edx
.L18:
	cmpl	%esi, %ecx
	jle	.L2
	leal	13(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L19
	addl	$1, %edx
.L19:
	cmpl	%esi, %ecx
	jle	.L2
	leal	14(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L20
	addl	$1, %edx
.L20:
	cmpl	%esi, %ecx
	jle	.L2
	addl	$15, %eax
	cltq
	cmpb	%r8b, (%rsp,%rax)
	je	.L2
	addl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L2
.L25:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.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:
```

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	"%s"
.LC2:
	.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	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L24
	subl	$2, %eax
	cmpl	$14, %eax
	jbe	.L25
	movl	%ecx, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	shrl	$4, %edx
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm4, %xmm4
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	1(%rax), %xmm0
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm3
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm3, %xmm2
	punpckhbw	%xmm3, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtw	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm3, %xmm7
	punpckhwd	%xmm3, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm3
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L4
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$15, %cl
	je	.L2
.L3:
	leal	1(%rax), %esi
	movslq	%eax, %r8
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, (%rsp,%r8)
	je	.L7
	addl	$1, %edx
.L7:
	cmpl	%ecx, %esi
	jge	.L2
	leal	2(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%dil, %r8b
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L2
	leal	3(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L9
	addl	$1, %edx
.L9:
	cmpl	%esi, %ecx
	jle	.L2
	leal	4(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L10
	addl	$1, %edx
.L10:
	cmpl	%esi, %ecx
	jle	.L2
	leal	5(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L11
	addl	$1, %edx
.L11:
	cmpl	%esi, %ecx
	jle	.L2
	leal	6(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L12
	addl	$1, %edx
.L12:
	cmpl	%esi, %ecx
	jle	.L2
	leal	7(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%esi, %ecx
	jle	.L2
	leal	8(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%esi, %ecx
	jle	.L2
	leal	9(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L15
	addl	$1, %edx
.L15:
	cmpl	%esi, %ecx
	jle	.L2
	leal	10(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L16
	addl	$1, %edx
.L16:
	cmpl	%esi, %ecx
	jle	.L2
	leal	11(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L17
	addl	$1, %edx
.L17:
	cmpl	%esi, %ecx
	jle	.L2
	leal	12(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L18
	addl	$1, %edx
.L18:
	cmpl	%esi, %ecx
	jle	.L2
	leal	13(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L19
	addl	$1, %edx
.L19:
	cmpl	%esi, %ecx
	jle	.L2
	leal	14(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L20
	addl	$1, %edx
.L20:
	cmpl	%esi, %ecx
	jle	.L2
	addl	$15, %eax
	cltq
	cmpb	%r8b, (%rsp,%rax)
	je	.L2
	addl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L2
.L25:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC2:
	.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	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L24
	subl	$2, %eax
	cmpl	$14, %eax
	jbe	.L25
	movl	%ecx, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	shrl	$4, %edx
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm4, %xmm4
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	1(%rax), %xmm0
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm3
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm3, %xmm2
	punpckhbw	%xmm3, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtw	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm3, %xmm7
	punpckhwd	%xmm3, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm3
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L4
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$15, %cl
	je	.L2
.L3:
	leal	1(%rax), %esi
	movslq	%eax, %r8
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, (%rsp,%r8)
	je	.L7
	addl	$1, %edx
.L7:
	cmpl	%ecx, %esi
	jge	.L2
	leal	2(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%dil, %r8b
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L2
	leal	3(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L9
	addl	$1, %edx
.L9:
	cmpl	%esi, %ecx
	jle	.L2
	leal	4(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L10
	addl	$1, %edx
.L10:
	cmpl	%esi, %ecx
	jle	.L2
	leal	5(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L11
	addl	$1, %edx
.L11:
	cmpl	%esi, %ecx
	jle	.L2
	leal	6(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L12
	addl	$1, %edx
.L12:
	cmpl	%esi, %ecx
	jle	.L2
	leal	7(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%esi, %ecx
	jle	.L2
	leal	8(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%esi, %ecx
	jle	.L2
	leal	9(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L15
	addl	$1, %edx
.L15:
	cmpl	%esi, %ecx
	jle	.L2
	leal	10(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L16
	addl	$1, %edx
.L16:
	cmpl	%esi, %ecx
	jle	.L2
	leal	11(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L17
	addl	$1, %edx
.L17:
	cmpl	%esi, %ecx
	jle	.L2
	leal	12(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L18
	addl	$1, %edx
.L18:
	cmpl	%esi, %ecx
	jle	.L2
	leal	13(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L19
	addl	$1, %edx
.L19:
	cmpl	%esi, %ecx
	jle	.L2
	leal	14(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L20
	addl	$1, %edx
.L20:
	cmpl	%esi, %ecx
	jle	.L2
	addl	$15, %eax
	cltq
	cmpb	%r8b, (%rsp,%rax)
	je	.L2
	addl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L2
.L25:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define M 1000000007
int main(void){
    char s[100001];
    int i,ans=0;
    scanf("%s",s);
    int len=strlen(s);
    for(i=0;i<len-1;i++){
        if(s[i]!=s[i+1])ans++;
    }
    printf("%d\n",ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define M 1000000007
int main(void){
    char s[100001];
    int i,ans=0;
    scanf("%s",s);
    int len=strlen(s);
    for(i=0;i<len-1;i++){
        if(s[i]!=s[i+1])ans++;
    }
    printf("%d\n",ans);
}```

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:

BBBWW

1

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 <stdlib.h>
#include <math.h>
#include <string.h>
#define M 1000000007
int main(void){
    char s[100001];
    int i,ans=0;
    scanf("%s",s);
    int len=strlen(s);
    for(i=0;i<len-1;i++){
        if(s[i]!=s[i+1])ans++;
    }
    printf("%d\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC2:
	.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	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L24
	subl	$2, %eax
	cmpl	$14, %eax
	jbe	.L25
	movl	%ecx, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	shrl	$4, %edx
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm4, %xmm4
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	1(%rax), %xmm0
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm3
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm3, %xmm2
	punpckhbw	%xmm3, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtw	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm3, %xmm7
	punpckhwd	%xmm3, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm3
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L4
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$15, %cl
	je	.L2
.L3:
	leal	1(%rax), %esi
	movslq	%eax, %r8
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, (%rsp,%r8)
	je	.L7
	addl	$1, %edx
.L7:
	cmpl	%ecx, %esi
	jge	.L2
	leal	2(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%dil, %r8b
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L2
	leal	3(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L9
	addl	$1, %edx
.L9:
	cmpl	%esi, %ecx
	jle	.L2
	leal	4(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L10
	addl	$1, %edx
.L10:
	cmpl	%esi, %ecx
	jle	.L2
	leal	5(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L11
	addl	$1, %edx
.L11:
	cmpl	%esi, %ecx
	jle	.L2
	leal	6(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L12
	addl	$1, %edx
.L12:
	cmpl	%esi, %ecx
	jle	.L2
	leal	7(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%esi, %ecx
	jle	.L2
	leal	8(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%esi, %ecx
	jle	.L2
	leal	9(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L15
	addl	$1, %edx
.L15:
	cmpl	%esi, %ecx
	jle	.L2
	leal	10(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L16
	addl	$1, %edx
.L16:
	cmpl	%esi, %ecx
	jle	.L2
	leal	11(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L17
	addl	$1, %edx
.L17:
	cmpl	%esi, %ecx
	jle	.L2
	leal	12(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L18
	addl	$1, %edx
.L18:
	cmpl	%esi, %ecx
	jle	.L2
	leal	13(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L19
	addl	$1, %edx
.L19:
	cmpl	%esi, %ecx
	jle	.L2
	leal	14(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L20
	addl	$1, %edx
.L20:
	cmpl	%esi, %ecx
	jle	.L2
	addl	$15, %eax
	cltq
	cmpb	%r8b, (%rsp,%rax)
	je	.L2
	addl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L2
.L25:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.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:
```

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	"%s"
.LC2:
	.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	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L24
	subl	$2, %eax
	cmpl	$14, %eax
	jbe	.L25
	movl	%ecx, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	shrl	$4, %edx
	movdqa	.LC1(%rip), %xmm6
	pxor	%xmm4, %xmm4
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	1(%rax), %xmm0
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm3
	movdqa	%xmm0, %xmm2
	punpcklbw	%xmm3, %xmm2
	punpckhbw	%xmm3, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtw	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklwd	%xmm3, %xmm7
	punpckhwd	%xmm3, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm1
	paddd	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	punpcklwd	%xmm2, %xmm3
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L4
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$15, %cl
	je	.L2
.L3:
	leal	1(%rax), %esi
	movslq	%eax, %r8
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, (%rsp,%r8)
	je	.L7
	addl	$1, %edx
.L7:
	cmpl	%ecx, %esi
	jge	.L2
	leal	2(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%dil, %r8b
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L2
	leal	3(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L9
	addl	$1, %edx
.L9:
	cmpl	%esi, %ecx
	jle	.L2
	leal	4(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L10
	addl	$1, %edx
.L10:
	cmpl	%esi, %ecx
	jle	.L2
	leal	5(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L11
	addl	$1, %edx
.L11:
	cmpl	%esi, %ecx
	jle	.L2
	leal	6(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L12
	addl	$1, %edx
.L12:
	cmpl	%esi, %ecx
	jle	.L2
	leal	7(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%esi, %ecx
	jle	.L2
	leal	8(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%esi, %ecx
	jle	.L2
	leal	9(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L15
	addl	$1, %edx
.L15:
	cmpl	%esi, %ecx
	jle	.L2
	leal	10(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L16
	addl	$1, %edx
.L16:
	cmpl	%esi, %ecx
	jle	.L2
	leal	11(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L17
	addl	$1, %edx
.L17:
	cmpl	%esi, %ecx
	jle	.L2
	leal	12(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L18
	addl	$1, %edx
.L18:
	cmpl	%esi, %ecx
	jle	.L2
	leal	13(%rax), %esi
	movslq	%esi, %rdi
	movzbl	(%rsp,%rdi), %edi
	cmpb	%dil, %r8b
	je	.L19
	addl	$1, %edx
.L19:
	cmpl	%esi, %ecx
	jle	.L2
	leal	14(%rax), %esi
	movslq	%esi, %r8
	movzbl	(%rsp,%r8), %r8d
	cmpb	%r8b, %dil
	je	.L20
	addl	$1, %edx
.L20:
	cmpl	%esi, %ecx
	jle	.L2
	addl	$15, %eax
	cltq
	cmpb	%r8b, (%rsp,%rax)
	je	.L2
	addl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L2
.L25:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.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:
```