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>

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

Assembly Code:

```assembly
	.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:
```

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	"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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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:

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

Assembly Code:

```assembly
	.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:
```

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	"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:
```