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>

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;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s1
	.bss
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.globl	s2
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.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
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	leaq	s1(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %eax
	movb	%al, s2(%rip)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	s2(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	s2(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
.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
	.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:

#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;
}
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 unoptimized 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;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s1
	.bss
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.globl	s2
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.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
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	leaq	s1(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %eax
	movb	%al, s2(%rip)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	s2(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	s2(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
	.globl	s1
	.bss
	.align 32
	.type	s1, @object
	.size	s1, 100000
s1:
	.zero	100000
	.globl	s2
	.align 32
	.type	s2, @object
	.size	s2, 100000
s2:
	.zero	100000
	.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
	subq	$16, %rsp
	movl	$1, -4(%rbp)
	leaq	s1(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	s1(%rip), %eax
	movb	%al, s2(%rip)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	s2(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	s2(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	s1(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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:
