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>

char s1[100000] = {'\0'};
char s2[100000] = {'\0'};

int main()
{
    int i;
    int j = 1;
    char tmp;

    scanf("%s", s1);

    s2[0] = s1[0];

    for(i = 1; s1[i]; i++){
        if(s1[i] != s2[j - 1]){
            s2[j] = s1[i];
            j++;
        }
    }
  
    printf("%d\n", j - 1);


    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	.LC0(%rip), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s1(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %edi
	movzbl	1+s1(%rip), %eax
	movb	%dil, s2(%rip)
	testb	%al, %al
	je	.L6
	leaq	2+s1(%rip), %rdx
	movl	$1, %esi
	leaq	s2(%rip), %r9
	cmpb	%al, %dil
	je	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%esi, %rcx
	addq	$1, %rdx
	leal	1(%rsi), %r8d
	movb	%al, (%r9,%rcx)
	movzbl	-1(%rdx), %ecx
	testb	%cl, %cl
	je	.L7
	movl	%eax, %edi
	movl	%r8d, %esi
.L4:
	movl	%ecx, %eax
	cmpb	%al, %dil
	jne	.L3
.L10:
	movzbl	(%rdx), %ecx
	addq	$1, %rdx
	leal	-1(%rsi), %r8d
	testb	%cl, %cl
	jne	.L4
.L2:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	%esi, %r8d
	jmp	.L2
.L6:
	xorl	%r8d, %r8d
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s2
	.bss
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.globl	s1
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	.LC0(%rip), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s1(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %edi
	movzbl	1+s1(%rip), %eax
	movb	%dil, s2(%rip)
	testb	%al, %al
	je	.L6
	leaq	2+s1(%rip), %rdx
	movl	$1, %esi
	leaq	s2(%rip), %r9
	cmpb	%al, %dil
	je	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%esi, %rcx
	addq	$1, %rdx
	leal	1(%rsi), %r8d
	movb	%al, (%r9,%rcx)
	movzbl	-1(%rdx), %ecx
	testb	%cl, %cl
	je	.L7
	movl	%eax, %edi
	movl	%r8d, %esi
.L4:
	movl	%ecx, %eax
	cmpb	%al, %dil
	jne	.L3
.L10:
	movzbl	(%rdx), %ecx
	addq	$1, %rdx
	leal	-1(%rsi), %r8d
	testb	%cl, %cl
	jne	.L4
.L2:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	%esi, %r8d
	jmp	.L2
.L6:
	xorl	%r8d, %r8d
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s2
	.bss
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.globl	s1
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	.LC0(%rip), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s1(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %edi
	movzbl	1+s1(%rip), %eax
	movb	%dil, s2(%rip)
	testb	%al, %al
	je	.L6
	leaq	2+s1(%rip), %rdx
	movl	$1, %esi
	leaq	s2(%rip), %r9
	cmpb	%al, %dil
	je	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%esi, %rcx
	addq	$1, %rdx
	leal	1(%rsi), %r8d
	movb	%al, (%r9,%rcx)
	movzbl	-1(%rdx), %ecx
	testb	%cl, %cl
	je	.L7
	movl	%eax, %edi
	movl	%r8d, %esi
.L4:
	movl	%ecx, %eax
	cmpb	%al, %dil
	jne	.L3
.L10:
	movzbl	(%rdx), %ecx
	addq	$1, %rdx
	leal	-1(%rsi), %r8d
	testb	%cl, %cl
	jne	.L4
.L2:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	%esi, %r8d
	jmp	.L2
.L6:
	xorl	%r8d, %r8d
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s2
	.bss
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.globl	s1
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.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>

char s1[100000] = {'\0'};
char s2[100000] = {'\0'};

int main()
{
    int i;
    int j = 1;
    char tmp;

    scanf("%s", s1);

    s2[0] = s1[0];

    for(i = 1; s1[i]; i++){
        if(s1[i] != s2[j - 1]){
            s2[j] = s1[i];
            j++;
        }
    }
  
    printf("%d\n", j - 1);


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

```c
#include<stdio.h>

char s1[100000] = {'\0'};
char s2[100000] = {'\0'};

int main()
{
    int i;
    int j = 1;
    char tmp;

    scanf("%s", s1);

    s2[0] = s1[0];

    for(i = 1; s1[i]; i++){
        if(s1[i] != s2[j - 1]){
            s2[j] = s1[i];
            j++;
        }
    }
  
    printf("%d\n", j - 1);


    return 0;
}```

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:

WWWXWW
 WBWBWBBBWW
 BWBBW
 WXWXWW
 WWBBCWBWBV
 XWBBCWBWBV
 XWVBCWBWCB
 WWBBB
 XWVWVX
 WWBBBWBWBW

2
 6
 3
 4
 7
 8
 9
 1
 5
 6

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>

char s1[100000] = {'\0'};
char s2[100000] = {'\0'};

int main()
{
    int i;
    int j = 1;
    char tmp;

    scanf("%s", s1);

    s2[0] = s1[0];

    for(i = 1; s1[i]; i++){
        if(s1[i] != s2[j - 1]){
            s2[j] = s1[i];
            j++;
        }
    }
  
    printf("%d\n", j - 1);


    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	.LC0(%rip), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s1(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %edi
	movzbl	1+s1(%rip), %eax
	movb	%dil, s2(%rip)
	testb	%al, %al
	je	.L6
	leaq	2+s1(%rip), %rdx
	movl	$1, %esi
	leaq	s2(%rip), %r9
	cmpb	%al, %dil
	je	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%esi, %rcx
	addq	$1, %rdx
	leal	1(%rsi), %r8d
	movb	%al, (%r9,%rcx)
	movzbl	-1(%rdx), %ecx
	testb	%cl, %cl
	je	.L7
	movl	%eax, %edi
	movl	%r8d, %esi
.L4:
	movl	%ecx, %eax
	cmpb	%al, %dil
	jne	.L3
.L10:
	movzbl	(%rdx), %ecx
	addq	$1, %rdx
	leal	-1(%rsi), %r8d
	testb	%cl, %cl
	jne	.L4
.L2:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	%esi, %r8d
	jmp	.L2
.L6:
	xorl	%r8d, %r8d
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s2
	.bss
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.globl	s1
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	.LC0(%rip), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s1(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %edi
	movzbl	1+s1(%rip), %eax
	movb	%dil, s2(%rip)
	testb	%al, %al
	je	.L6
	leaq	2+s1(%rip), %rdx
	movl	$1, %esi
	leaq	s2(%rip), %r9
	cmpb	%al, %dil
	je	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%esi, %rcx
	addq	$1, %rdx
	leal	1(%rsi), %r8d
	movb	%al, (%r9,%rcx)
	movzbl	-1(%rdx), %ecx
	testb	%cl, %cl
	je	.L7
	movl	%eax, %edi
	movl	%r8d, %esi
.L4:
	movl	%ecx, %eax
	cmpb	%al, %dil
	jne	.L3
.L10:
	movzbl	(%rdx), %ecx
	addq	$1, %rdx
	leal	-1(%rsi), %r8d
	testb	%cl, %cl
	jne	.L4
.L2:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	%esi, %r8d
	jmp	.L2
.L6:
	xorl	%r8d, %r8d
	jmp	.L2
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s2
	.bss
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.globl	s1
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.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:
```