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 s[100001];

int main(void)
{
	int n;
	char a, b, c;

	a = 0;
	b = 1;
	c = 2;

	scanf("%s", s);
	for (n = 0; s[n]; ++n)
	{
		a = s[n];
		if (a == b || a == c || b == c)
		{
			if (n < 2)
			{
				printf("1 2\n");
			}
			else
			{
				printf("%d %d\n", n - 1, n + 1);
			}
			return 0;
		}
		c = b;
		b = a;
	}

	printf("-1 -1\n");

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100001
s:
	.zero	100001
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"1 2"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1 -1"
	.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
	movb	$0, -5(%rbp)
	movb	$1, -7(%rbp)
	movb	$2, -6(%rbp)
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -5(%rbp)
	movzbl	-5(%rbp), %eax
	cmpb	-7(%rbp), %al
	je	.L3
	movzbl	-5(%rbp), %eax
	cmpb	-6(%rbp), %al
	je	.L3
	movzbl	-7(%rbp), %eax
	cmpb	-6(%rbp), %al
	jne	.L4
.L3:
	cmpl	$1, -4(%rbp)
	jg	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	jmp	.L7
.L4:
	movzbl	-7(%rbp), %eax
	movb	%al, -6(%rbp)
	movzbl	-5(%rbp), %eax
	movb	%al, -7(%rbp)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L7:
	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	"1 2"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1 -1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s(%rip), %ecx
	testb	%cl, %cl
	je	.L2
	leal	-1(%rcx), %eax
	leaq	1+s(%rip), %rdi
	movl	$1, %r8d
	xorl	%esi, %esi
	cmpb	$1, %al
	ja	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %ecx
.L5:
	movzbl	(%rdi), %eax
	movl	%esi, %r10d
	addl	$1, %esi
	testb	%al, %al
	je	.L2
	cmpb	%cl, %al
	sete	%dl
	cmpb	%r8b, %al
	sete	%r9b
	orl	%r9d, %edx
	cmpb	%r8b, %cl
	movl	%ecx, %r8d
	sete	%r9b
	addq	$1, %rdi
	orb	%r9b, %dl
	je	.L9
	subl	$1, %esi
	je	.L3
	leal	2(%r10), %ecx
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L2:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100001
s:
	.zero	100001
	.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	"1 2"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1 -1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	s(%rip), %ecx
	testb	%cl, %cl
	je	.L2
	leal	-1(%rcx), %eax
	leaq	1+s(%rip), %rdi
	movl	$1, %r8d
	xorl	%esi, %esi
	cmpb	$1, %al
	ja	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %ecx
.L5:
	movzbl	(%rdi), %eax
	movl	%esi, %r10d
	addl	$1, %esi
	testb	%al, %al
	je	.L2
	cmpb	%cl, %al
	sete	%dl
	cmpb	%r8b, %al
	sete	%r9b
	orl	%r9d, %edx
	cmpb	%r8b, %cl
	movl	%ecx, %r8d
	sete	%r9b
	addq	$1, %rdi
	orb	%r9b, %dl
	je	.L9
	subl	$1, %esi
	je	.L3
	leal	2(%r10), %ecx
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L2:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100001
s:
	.zero	100001
	.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 s[100001];

int main(void)
{
	int n;
	char a, b, c;

	a = 0;
	b = 1;
	c = 2;

	scanf("%s", s);
	for (n = 0; s[n]; ++n)
	{
		a = s[n];
		if (a == b || a == c || b == c)
		{
			if (n < 2)
			{
				printf("1 2\n");
			}
			else
			{
				printf("%d %d\n", n - 1, n + 1);
			}
			return 0;
		}
		c = b;
		b = a;
	}

	printf("-1 -1\n");

	return 0;
}
needed

1 3

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 s[100001];

int main(void)
{
	int n;
	char a, b, c;

	a = 0;
	b = 1;
	c = 2;

	scanf("%s", s);
	for (n = 0; s[n]; ++n)
	{
		a = s[n];
		if (a == b || a == c || b == c)
		{
			if (n < 2)
			{
				printf("1 2\n");
			}
			else
			{
				printf("%d %d\n", n - 1, n + 1);
			}
			return 0;
		}
		c = b;
		b = a;
	}

	printf("-1 -1\n");

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100001
s:
	.zero	100001
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"1 2"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1 -1"
	.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
	movb	$0, -5(%rbp)
	movb	$1, -7(%rbp)
	movb	$2, -6(%rbp)
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -5(%rbp)
	movzbl	-5(%rbp), %eax
	cmpb	-7(%rbp), %al
	je	.L3
	movzbl	-5(%rbp), %eax
	cmpb	-6(%rbp), %al
	je	.L3
	movzbl	-7(%rbp), %eax
	cmpb	-6(%rbp), %al
	jne	.L4
.L3:
	cmpl	$1, -4(%rbp)
	jg	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	jmp	.L7
.L4:
	movzbl	-7(%rbp), %eax
	movb	%al, -6(%rbp)
	movzbl	-5(%rbp), %eax
	movb	%al, -7(%rbp)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L7:
	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.
train
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100001
s:
	.zero	100001
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"1 2"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1 -1"
	.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
	movb	$0, -5(%rbp)
	movb	$1, -7(%rbp)
	movb	$2, -6(%rbp)
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L2
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -5(%rbp)
	movzbl	-5(%rbp), %eax
	cmpb	-7(%rbp), %al
	je	.L3
	movzbl	-5(%rbp), %eax
	cmpb	-6(%rbp), %al
	je	.L3
	movzbl	-7(%rbp), %eax
	cmpb	-6(%rbp), %al
	jne	.L4
.L3:
	cmpl	$1, -4(%rbp)
	jg	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	jmp	.L7
.L4:
	movzbl	-7(%rbp), %eax
	movb	%al, -6(%rbp)
	movzbl	-5(%rbp), %eax
	movb	%al, -7(%rbp)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L7:
	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:
