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>

int main(void) {
	char input[1000];
	char v[3];
	char n[3];
	char* ptr;
	int i;
	int ok;
	while(1) {
		scanf("%s",input);
		if(input[0]=='#' && input[1]==0)break;
		for(ptr=input,ok=0;*ptr && !ok;) {
			ptr++;
			for(i=0;i<3;i++) {
				if(*ptr!='~') {
					v[i]=*ptr;
					n[i]=0;
				} else {
					v[i]=*(++ptr);
					n[i]=1;
				}
				ptr+=2;
			}
			if(*ptr)ptr++;
			ok=1;
			if(v[0]==v[1] && n[0]!=n[1])ok=0;
			if(v[1]==v[2] && n[1]!=n[2])ok=0;
			if(v[2]==v[0] && n[2]!=n[0])ok=0;
		}
		puts(ok?"yes":"no");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1008(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-1008(%rbp), %eax
	cmpb	$35, %al
	jne	.L2
	movzbl	-1007(%rbp), %eax
	testb	%al, %al
	je	.L20
.L2:
	leaq	-1008(%rbp), %rax
	movq	%rax, -1024(%rbp)
	movl	$0, -1028(%rbp)
	jmp	.L4
.L13:
	addq	$1, -1024(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L5
.L8:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$126, %al
	je	.L6
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$0, -1011(%rbp,%rax)
	jmp	.L7
.L6:
	addq	$1, -1024(%rbp)
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$1, -1011(%rbp,%rax)
.L7:
	addq	$2, -1024(%rbp)
	addl	$1, -1032(%rbp)
.L5:
	cmpl	$2, -1032(%rbp)
	jle	.L8
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	addq	$1, -1024(%rbp)
.L9:
	movl	$1, -1028(%rbp)
	movzbl	-1014(%rbp), %edx
	movzbl	-1013(%rbp), %eax
	cmpb	%al, %dl
	jne	.L10
	movzbl	-1011(%rbp), %edx
	movzbl	-1010(%rbp), %eax
	cmpb	%al, %dl
	je	.L10
	movl	$0, -1028(%rbp)
.L10:
	movzbl	-1013(%rbp), %edx
	movzbl	-1012(%rbp), %eax
	cmpb	%al, %dl
	jne	.L11
	movzbl	-1010(%rbp), %edx
	movzbl	-1009(%rbp), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -1028(%rbp)
.L11:
	movzbl	-1012(%rbp), %edx
	movzbl	-1014(%rbp), %eax
	cmpb	%al, %dl
	jne	.L4
	movzbl	-1009(%rbp), %edx
	movzbl	-1011(%rbp), %eax
	cmpb	%al, %dl
	je	.L4
	movl	$0, -1028(%rbp)
.L4:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L12
	cmpl	$0, -1028(%rbp)
	je	.L13
.L12:
	cmpl	$0, -1028(%rbp)
	je	.L14
	leaq	.LC1(%rip), %rax
	jmp	.L15
.L14:
	leaq	.LC2(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"yes"
.LC1:
	.string	"no"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %eax
	movzbl	1(%rsp), %edx
	cmpb	$35, %al
	je	.L34
	testb	%al, %al
	je	.L16
.L4:
	movq	%rbx, %r9
	xorl	%r11d, %r11d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	movzbl	3(%r9), %esi
	leaq	1(%r9), %rcx
	xorl	%edi, %edi
	movl	$1, %eax
	xorl	%r10d, %r10d
	cmpb	$126, %sil
	je	.L7
.L37:
	leaq	2(%rcx), %r8
	xorl	%r14d, %r14d
	movzbl	2(%r8), %ecx
	cmpb	$126, %cl
	je	.L9
.L38:
	leaq	2(%r8), %rdi
	xorl	%r15d, %r15d
.L10:
	movzbl	2(%rdi), %r8d
	leaq	2(%rdi), %r9
	testb	%r8b, %r8b
	je	.L12
	movzbl	3(%rdi), %r8d
	leaq	3(%rdi), %r9
.L12:
	cmpb	%dl, %sil
	cmovne	%r13d, %eax
	cmpb	%cl, %sil
	jne	.L14
	cmpb	%r14b, %r15b
	cmovne	%r11d, %eax
.L14:
	cmpb	%dl, %cl
	je	.L35
.L15:
	testb	%r8b, %r8b
	je	.L19
	testl	%eax, %eax
	jne	.L27
.L32:
	movzbl	1(%r9), %edx
.L17:
	cmpb	$126, %dl
	jne	.L36
	movzbl	4(%r9), %esi
	leaq	2(%r9), %rcx
	movzbl	2(%r9), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	movl	$1, %r10d
	cmpb	$126, %sil
	jne	.L37
.L7:
	leaq	3(%rcx), %r8
	movzbl	3(%rcx), %esi
	movl	%edi, %eax
	movl	$1, %r14d
	movzbl	2(%r8), %ecx
	cmpb	$126, %cl
	jne	.L38
.L9:
	movzbl	3(%r8), %ecx
	leaq	3(%r8), %rdi
	movl	$1, %r15d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L35:
	cmpb	%r15b, %r10b
	je	.L15
	testb	%r8b, %r8b
	jne	.L32
.L16:
	movq	%r12, %rdi
.L20:
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L19:
	testl	%eax, %eax
	je	.L16
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	.LC0(%rip), %rdi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L34:
	testb	%dl, %dl
	jne	.L4
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L39:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"yes"
.LC1:
	.string	"no"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %eax
	movzbl	1(%rsp), %edx
	cmpb	$35, %al
	je	.L34
	testb	%al, %al
	je	.L16
.L4:
	movq	%rbx, %r9
	xorl	%r11d, %r11d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L36:
	movzbl	3(%r9), %esi
	leaq	1(%r9), %rcx
	xorl	%edi, %edi
	movl	$1, %eax
	xorl	%r10d, %r10d
	cmpb	$126, %sil
	je	.L7
.L37:
	leaq	2(%rcx), %r8
	xorl	%r14d, %r14d
	movzbl	2(%r8), %ecx
	cmpb	$126, %cl
	je	.L9
.L38:
	leaq	2(%r8), %rdi
	xorl	%r15d, %r15d
.L10:
	movzbl	2(%rdi), %r8d
	leaq	2(%rdi), %r9
	testb	%r8b, %r8b
	je	.L12
	movzbl	3(%rdi), %r8d
	leaq	3(%rdi), %r9
.L12:
	cmpb	%dl, %sil
	cmovne	%r13d, %eax
	cmpb	%cl, %sil
	jne	.L14
	cmpb	%r14b, %r15b
	cmovne	%r11d, %eax
.L14:
	cmpb	%dl, %cl
	je	.L35
.L15:
	testb	%r8b, %r8b
	je	.L19
	testl	%eax, %eax
	jne	.L27
.L32:
	movzbl	1(%r9), %edx
.L17:
	cmpb	$126, %dl
	jne	.L36
	movzbl	4(%r9), %esi
	leaq	2(%r9), %rcx
	movzbl	2(%r9), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	movl	$1, %r10d
	cmpb	$126, %sil
	jne	.L37
.L7:
	leaq	3(%rcx), %r8
	movzbl	3(%rcx), %esi
	movl	%edi, %eax
	movl	$1, %r14d
	movzbl	2(%r8), %ecx
	cmpb	$126, %cl
	jne	.L38
.L9:
	movzbl	3(%r8), %ecx
	leaq	3(%r8), %rdi
	movl	$1, %r15d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L35:
	cmpb	%r15b, %r10b
	je	.L15
	testb	%r8b, %r8b
	jne	.L32
.L16:
	movq	%r12, %rdi
.L20:
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L19:
	testl	%eax, %eax
	je	.L16
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	.LC0(%rip), %rdi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L34:
	testb	%dl, %dl
	jne	.L4
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L39:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void) {
	char input[1000];
	char v[3];
	char n[3];
	char* ptr;
	int i;
	int ok;
	while(1) {
		scanf("%s",input);
		if(input[0]=='#' && input[1]==0)break;
		for(ptr=input,ok=0;*ptr && !ok;) {
			ptr++;
			for(i=0;i<3;i++) {
				if(*ptr!='~') {
					v[i]=*ptr;
					n[i]=0;
				} else {
					v[i]=*(++ptr);
					n[i]=1;
				}
				ptr+=2;
			}
			if(*ptr)ptr++;
			ok=1;
			if(v[0]==v[1] && n[0]!=n[1])ok=0;
			if(v[1]==v[2] && n[1]!=n[2])ok=0;
			if(v[2]==v[0] && n[2]!=n[0])ok=0;
		}
		puts(ok?"yes":"no");
	}
	return 0;
}
(B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(S&X&~W)
#
 (B&B&f)|(~d&~i&i)|(~u&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i|i)|(~v&i&~V)|(~g&~e&o)&(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i&~V)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i|i)|(~v&i&~V)|(~g&~e&o)&(~f&d&~v)}(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i&~V)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(T&X&~X)
#
 (B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(T&X&~W)
#
 (B&B&f)|(~d&~i&i)|(~v&i&~V)|(~g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)V(e&~i&~|)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i&i)|(~u&i&~V)|(&g&~e&o)|(}f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(S&X&~X)
#
 (B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&j&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)
(S&X&~W)
#

yes
no
 yes
yes
 yes
no
 yes
no
 yes
no
 yes
no
 yes
yes
 yes
no
 yes
no
 yes
yes

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>

int main(void) {
	char input[1000];
	char v[3];
	char n[3];
	char* ptr;
	int i;
	int ok;
	while(1) {
		scanf("%s",input);
		if(input[0]=='#' && input[1]==0)break;
		for(ptr=input,ok=0;*ptr && !ok;) {
			ptr++;
			for(i=0;i<3;i++) {
				if(*ptr!='~') {
					v[i]=*ptr;
					n[i]=0;
				} else {
					v[i]=*(++ptr);
					n[i]=1;
				}
				ptr+=2;
			}
			if(*ptr)ptr++;
			ok=1;
			if(v[0]==v[1] && n[0]!=n[1])ok=0;
			if(v[1]==v[2] && n[1]!=n[2])ok=0;
			if(v[2]==v[0] && n[2]!=n[0])ok=0;
		}
		puts(ok?"yes":"no");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1008(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-1008(%rbp), %eax
	cmpb	$35, %al
	jne	.L2
	movzbl	-1007(%rbp), %eax
	testb	%al, %al
	je	.L20
.L2:
	leaq	-1008(%rbp), %rax
	movq	%rax, -1024(%rbp)
	movl	$0, -1028(%rbp)
	jmp	.L4
.L13:
	addq	$1, -1024(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L5
.L8:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$126, %al
	je	.L6
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$0, -1011(%rbp,%rax)
	jmp	.L7
.L6:
	addq	$1, -1024(%rbp)
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$1, -1011(%rbp,%rax)
.L7:
	addq	$2, -1024(%rbp)
	addl	$1, -1032(%rbp)
.L5:
	cmpl	$2, -1032(%rbp)
	jle	.L8
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	addq	$1, -1024(%rbp)
.L9:
	movl	$1, -1028(%rbp)
	movzbl	-1014(%rbp), %edx
	movzbl	-1013(%rbp), %eax
	cmpb	%al, %dl
	jne	.L10
	movzbl	-1011(%rbp), %edx
	movzbl	-1010(%rbp), %eax
	cmpb	%al, %dl
	je	.L10
	movl	$0, -1028(%rbp)
.L10:
	movzbl	-1013(%rbp), %edx
	movzbl	-1012(%rbp), %eax
	cmpb	%al, %dl
	jne	.L11
	movzbl	-1010(%rbp), %edx
	movzbl	-1009(%rbp), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -1028(%rbp)
.L11:
	movzbl	-1012(%rbp), %edx
	movzbl	-1014(%rbp), %eax
	cmpb	%al, %dl
	jne	.L4
	movzbl	-1009(%rbp), %edx
	movzbl	-1011(%rbp), %eax
	cmpb	%al, %dl
	je	.L4
	movl	$0, -1028(%rbp)
.L4:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L12
	cmpl	$0, -1028(%rbp)
	je	.L13
.L12:
	cmpl	$0, -1028(%rbp)
	je	.L14
	leaq	.LC1(%rip), %rax
	jmp	.L15
.L14:
	leaq	.LC2(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1008(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-1008(%rbp), %eax
	cmpb	$35, %al
	jne	.L2
	movzbl	-1007(%rbp), %eax
	testb	%al, %al
	je	.L20
.L2:
	leaq	-1008(%rbp), %rax
	movq	%rax, -1024(%rbp)
	movl	$0, -1028(%rbp)
	jmp	.L4
.L13:
	addq	$1, -1024(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L5
.L8:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$126, %al
	je	.L6
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$0, -1011(%rbp,%rax)
	jmp	.L7
.L6:
	addq	$1, -1024(%rbp)
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1014(%rbp,%rax)
	movl	-1032(%rbp), %eax
	cltq
	movb	$1, -1011(%rbp,%rax)
.L7:
	addq	$2, -1024(%rbp)
	addl	$1, -1032(%rbp)
.L5:
	cmpl	$2, -1032(%rbp)
	jle	.L8
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	addq	$1, -1024(%rbp)
.L9:
	movl	$1, -1028(%rbp)
	movzbl	-1014(%rbp), %edx
	movzbl	-1013(%rbp), %eax
	cmpb	%al, %dl
	jne	.L10
	movzbl	-1011(%rbp), %edx
	movzbl	-1010(%rbp), %eax
	cmpb	%al, %dl
	je	.L10
	movl	$0, -1028(%rbp)
.L10:
	movzbl	-1013(%rbp), %edx
	movzbl	-1012(%rbp), %eax
	cmpb	%al, %dl
	jne	.L11
	movzbl	-1010(%rbp), %edx
	movzbl	-1009(%rbp), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -1028(%rbp)
.L11:
	movzbl	-1012(%rbp), %edx
	movzbl	-1014(%rbp), %eax
	cmpb	%al, %dl
	jne	.L4
	movzbl	-1009(%rbp), %edx
	movzbl	-1011(%rbp), %eax
	cmpb	%al, %dl
	je	.L4
	movl	$0, -1028(%rbp)
.L4:
	movq	-1024(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L12
	cmpl	$0, -1028(%rbp)
	je	.L13
.L12:
	cmpl	$0, -1028(%rbp)
	je	.L14
	leaq	.LC1(%rip), %rax
	jmp	.L15
.L14:
	leaq	.LC2(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
