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(){
	char S[100000];
	scanf("%s",S);
	int i,frag = 0;
	for(i = 0; S[i] != '\0'; i++){
		if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){
			if(S[i + 5] == 'e' && S[i + 6] == 'r'){
				if(S[i + 7] == 'a' && S[i + 8] == 's' && S[i + 9] == 'e'){
					i+=4;
				} else {
					i+=6;
				}
			} else {
				i += 4;
			}
		} else if(S[i] == 'e' && S[i + 1] == 'r' && S[i + 2] == 'a' && S[i + 3] == 's' && S[i + 4] == 'e'){
			if(S[i + 5] == 'r'){
				i += 5;
			} else {
				i += 4;
			}
		} else /*if(S[i] == '\0' || S[i + 1] == '\0' || S[i + 2] == '\0' || S[i + 3] == '\0' || S[i + 4] == '\0'){
			break;
		} else */{
			frag++;
			break;
		}
	}
	if(frag == 0){
		printf("YES");
	} else {
		printf("NO");
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98312
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpb	$100, %dl
	je	.L22
	cmpb	$101, %dl
	jne	.L4
.L6:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$114, %dl
	je	.L23
.L14:
	movl	%ecx, %eax
.L5:
	testb	%dl, %dl
	jne	.L7
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	xorl	%eax, %eax
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$6, %eax
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L25
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$109, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$101, %dl
	jne	.L14
	leal	6(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L26
	movl	%ecx, %eax
	jmp	.L6
.L26:
	leal	7(%rax), %esi
	movslq	%esi, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$97, %dl
	je	.L27
	movl	%esi, %eax
	jmp	.L5
.L27:
	leal	8(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	addl	$9, %eax
	cltq
	cmpb	$101, (%rsp,%rax)
	jne	.L4
	movl	%ecx, %eax
	jmp	.L6
.L24:
	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	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98312
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpb	$100, %dl
	je	.L22
	cmpb	$101, %dl
	jne	.L4
.L6:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$114, %dl
	je	.L23
.L14:
	movl	%ecx, %eax
.L5:
	testb	%dl, %dl
	jne	.L7
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	xorl	%eax, %eax
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$6, %eax
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L25
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$109, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$101, %dl
	jne	.L14
	leal	6(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L26
	movl	%ecx, %eax
	jmp	.L6
.L26:
	leal	7(%rax), %esi
	movslq	%esi, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$97, %dl
	je	.L27
	movl	%esi, %eax
	jmp	.L5
.L27:
	leal	8(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	addl	$9, %eax
	cltq
	cmpb	$101, (%rsp,%rax)
	jne	.L4
	movl	%ecx, %eax
	jmp	.L6
.L24:
	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	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98312
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpb	$100, %dl
	je	.L22
	cmpb	$101, %dl
	jne	.L4
.L6:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$114, %dl
	je	.L23
.L14:
	movl	%ecx, %eax
.L5:
	testb	%dl, %dl
	jne	.L7
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	xorl	%eax, %eax
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$6, %eax
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L25
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$109, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$101, %dl
	jne	.L14
	leal	6(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L26
	movl	%ecx, %eax
	jmp	.L6
.L26:
	leal	7(%rax), %esi
	movslq	%esi, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$97, %dl
	je	.L27
	movl	%esi, %eax
	jmp	.L5
.L27:
	leal	8(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	addl	$9, %eax
	cltq
	cmpb	$101, (%rsp,%rax)
	jne	.L4
	movl	%ecx, %eax
	jmp	.L6
.L24:
	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(){
	char S[100000];
	scanf("%s",S);
	int i,frag = 0;
	for(i = 0; S[i] != '\0'; i++){
		if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){
			if(S[i + 5] == 'e' && S[i + 6] == 'r'){
				if(S[i + 7] == 'a' && S[i + 8] == 's' && S[i + 9] == 'e'){
					i+=4;
				} else {
					i+=6;
				}
			} else {
				i += 4;
			}
		} else if(S[i] == 'e' && S[i + 1] == 'r' && S[i + 2] == 'a' && S[i + 3] == 's' && S[i + 4] == 'e'){
			if(S[i + 5] == 'r'){
				i += 5;
			} else {
				i += 4;
			}
		} else /*if(S[i] == '\0' || S[i + 1] == '\0' || S[i + 2] == '\0' || S[i + 3] == '\0' || S[i + 4] == '\0'){
			break;
		} else */{
			frag++;
			break;
		}
	}
	if(frag == 0){
		printf("YES");
	} else {
		printf("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(){
	char S[100000];
	scanf("%s",S);
	int i,frag = 0;
	for(i = 0; S[i] != '\0'; i++){
		if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){
			if(S[i + 5] == 'e' && S[i + 6] == 'r'){
				if(S[i + 7] == 'a' && S[i + 8] == 's' && S[i + 9] == 'e'){
					i+=4;
				} else {
					i+=6;
				}
			} else {
				i += 4;
			}
		} else if(S[i] == 'e' && S[i + 1] == 'r' && S[i + 2] == 'a' && S[i + 3] == 's' && S[i + 4] == 'e'){
			if(S[i + 5] == 'r'){
				i += 5;
			} else {
				i += 4;
			}
		} else /*if(S[i] == '\0' || S[i + 1] == '\0' || S[i + 2] == '\0' || S[i + 3] == '\0' || S[i + 4] == '\0'){
			break;
		} else */{
			frag++;
			break;
		}
	}
	if(frag == 0){
		printf("YES");
	} else {
		printf("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:

dre`merer
 maerdesare
 resaremaerd
 dre`meqer
 er`sedream
 ersaremaerd
 reqem`erd
 eq`sedream
 ersaremadrd
 reqem`erc

NO NO NO NO NO NO NO NO NO NO
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(){
	char S[100000];
	scanf("%s",S);
	int i,frag = 0;
	for(i = 0; S[i] != '\0'; i++){
		if(S[i] == 'd' && S[i + 1] == 'r' && S[i + 2] == 'e' && S[i + 3] == 'a' && S[i + 4] == 'm'){
			if(S[i + 5] == 'e' && S[i + 6] == 'r'){
				if(S[i + 7] == 'a' && S[i + 8] == 's' && S[i + 9] == 'e'){
					i+=4;
				} else {
					i+=6;
				}
			} else {
				i += 4;
			}
		} else if(S[i] == 'e' && S[i + 1] == 'r' && S[i + 2] == 'a' && S[i + 3] == 's' && S[i + 4] == 'e'){
			if(S[i + 5] == 'r'){
				i += 5;
			} else {
				i += 4;
			}
		} else /*if(S[i] == '\0' || S[i + 1] == '\0' || S[i + 2] == '\0' || S[i + 3] == '\0' || S[i + 4] == '\0'){
			break;
		} else */{
			frag++;
			break;
		}
	}
	if(frag == 0){
		printf("YES");
	} else {
		printf("NO");
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98312
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpb	$100, %dl
	je	.L22
	cmpb	$101, %dl
	jne	.L4
.L6:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$114, %dl
	je	.L23
.L14:
	movl	%ecx, %eax
.L5:
	testb	%dl, %dl
	jne	.L7
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	xorl	%eax, %eax
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$6, %eax
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L25
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$109, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$101, %dl
	jne	.L14
	leal	6(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L26
	movl	%ecx, %eax
	jmp	.L6
.L26:
	leal	7(%rax), %esi
	movslq	%esi, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$97, %dl
	je	.L27
	movl	%esi, %eax
	jmp	.L5
.L27:
	leal	8(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	addl	$9, %eax
	cltq
	cmpb	$101, (%rsp,%rax)
	jne	.L4
	movl	%ecx, %eax
	jmp	.L6
.L24:
	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	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98312
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpb	$100, %dl
	je	.L22
	cmpb	$101, %dl
	jne	.L4
.L6:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$114, %dl
	je	.L23
.L14:
	movl	%ecx, %eax
.L5:
	testb	%dl, %dl
	jne	.L7
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	xorl	%eax, %eax
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	addl	$6, %eax
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L25
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$109, (%rsp,%rdx)
	jne	.L4
	leal	5(%rax), %ecx
	movslq	%ecx, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$101, %dl
	jne	.L14
	leal	6(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	je	.L26
	movl	%ecx, %eax
	jmp	.L6
.L26:
	leal	7(%rax), %esi
	movslq	%esi, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$97, %dl
	je	.L27
	movl	%esi, %eax
	jmp	.L5
.L27:
	leal	8(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L4
	addl	$9, %eax
	cltq
	cmpb	$101, (%rsp,%rax)
	jne	.L4
	movl	%ecx, %eax
	jmp	.L6
.L24:
	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:
```