Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char s[100001], c;
	s[0]=0;
	int p=0;
	while((c=getchar())!=10) s[++p]=c;
	while(p>0){
		if(s[p]=='m'){
			if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
				p--;
			}else break;
		}else if(s[p]=='e'){
			if(s[--p]=='s' && s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
				p--;
			}else break;
		}else if(s[p]=='r'){
			if(s[--p]=='e'){
				p--;
				if(s[p]=='m'){
					if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
						p--;
					}else break;
				}else if(s[p]=='s'){
					if(s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
						p--;
					}else break;
				}else break;
			}else break;
		}else break;
	}
	puts(p==0?"YES":"NO");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"YES"
.LC1:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1728, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movb	$0, -100016(%rbp)
	movl	$0, -100020(%rbp)
	jmp	.L2
.L3:
	addl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100021(%rbp), %edx
	movb	%dl, -100016(%rbp,%rax)
.L2:
	call	getchar@PLT
	movb	%al, -100021(%rbp)
	cmpb	$10, -100021(%rbp)
	jne	.L3
	jmp	.L4
.L12:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L5
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L7
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L7:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L17
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L18
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L10
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L10:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L19
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
.L4:
	cmpl	$0, -100020(%rbp)
	jg	.L12
	jmp	.L6
.L17:
	nop
	jmp	.L6
.L18:
	nop
	jmp	.L6
.L19:
	nop
.L6:
	cmpl	$0, -100020(%rbp)
	jne	.L13
	leaq	.LC0(%rip), %rax
	jmp	.L14
.L13:
	leaq	.LC1(%rip), %rax
.L14:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98328
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100048
	xorl	%ebp, %ebp
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movb	$0, (%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movb	%al, (%rsp,%rbp)
.L2:
	movq	stdin(%rip), %rdi
	movl	%ebp, %ebx
	addq	$1, %rbp
	call	getc@PLT
	cmpb	$10, %al
	jne	.L3
	testl	%ebx, %ebx
	jne	.L10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$101, %al
	je	.L36
	cmpb	$114, %al
	jne	.L21
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %edx
	movslq	%edx, %rax
	movzbl	(%rsp,%rax), %eax
	cmpb	$109, %al
	je	.L37
	cmpb	$115, %al
	jne	.L27
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-5(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	subl	$6, %ebx
.L7:
	testl	%ebx, %ebx
	jle	.L6
.L10:
	movslq	%ebx, %rax
	movzbl	(%rsp,%rax), %eax
	cmpb	$109, %al
	jne	.L5
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L30
.L34:
	subl	$5, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L36:
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	je	.L34
	.p2align 4,,10
	.p2align 3
.L30:
	movl	%eax, %ebx
.L6:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rdi
	leaq	.LC0(%rip), %rax
	cmove	%rax, %rdi
.L4:
	call	puts@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-5(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-6(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L30
	subl	$7, %ebx
	jmp	.L7
.L21:
	leaq	.LC1(%rip), %rdi
	jmp	.L4
.L27:
	movl	%edx, %ebx
	jmp	.L6
.L12:
	leaq	.LC0(%rip), %rdi
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98328
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1720, %rsp
	.cfi_def_cfa_offset 100048
	xorl	%ebp, %ebp
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movb	$0, (%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movb	%al, (%rsp,%rbp)
.L2:
	movq	stdin(%rip), %rdi
	movl	%ebp, %ebx
	addq	$1, %rbp
	call	getc@PLT
	cmpb	$10, %al
	jne	.L3
	testl	%ebx, %ebx
	jne	.L10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$101, %al
	je	.L36
	cmpb	$114, %al
	jne	.L21
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %edx
	movslq	%edx, %rax
	movzbl	(%rsp,%rax), %eax
	cmpb	$109, %al
	je	.L37
	cmpb	$115, %al
	jne	.L27
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-5(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	subl	$6, %ebx
.L7:
	testl	%ebx, %ebx
	jle	.L6
.L10:
	movslq	%ebx, %rax
	movzbl	(%rsp,%rax), %eax
	cmpb	$109, %al
	jne	.L5
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L30
.L34:
	subl	$5, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L36:
	leal	-1(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$115, (%rsp,%rdx)
	jne	.L30
	leal	-2(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	je	.L34
	.p2align 4,,10
	.p2align 3
.L30:
	movl	%eax, %ebx
.L6:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rdi
	leaq	.LC0(%rip), %rax
	cmove	%rax, %rdi
.L4:
	call	puts@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$100024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	leal	-3(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L30
	leal	-4(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L30
	leal	-5(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L30
	leal	-6(%rbx), %eax
	movslq	%eax, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L30
	subl	$7, %ebx
	jmp	.L7
.L21:
	leaq	.LC1(%rip), %rdi
	jmp	.L4
.L27:
	movl	%edx, %ebx
	jmp	.L6
.L12:
	leaq	.LC0(%rip), %rdi
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char s[100001], c;
	s[0]=0;
	int p=0;
	while((c=getchar())!=10) s[++p]=c;
	while(p>0){
		if(s[p]=='m'){
			if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
				p--;
			}else break;
		}else if(s[p]=='e'){
			if(s[--p]=='s' && s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
				p--;
			}else break;
		}else if(s[p]=='r'){
			if(s[--p]=='e'){
				p--;
				if(s[p]=='m'){
					if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
						p--;
					}else break;
				}else if(s[p]=='s'){
					if(s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
						p--;
					}else break;
				}else break;
			}else break;
		}else break;
	}
	puts(p==0?"YES":"NO");
}

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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char s[100001], c;
	s[0]=0;
	int p=0;
	while((c=getchar())!=10) s[++p]=c;
	while(p>0){
		if(s[p]=='m'){
			if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
				p--;
			}else break;
		}else if(s[p]=='e'){
			if(s[--p]=='s' && s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
				p--;
			}else break;
		}else if(s[p]=='r'){
			if(s[--p]=='e'){
				p--;
				if(s[p]=='m'){
					if(s[--p]=='a' && s[--p]=='e' && s[--p]=='r' && s[--p]=='d'){
						p--;
					}else break;
				}else if(s[p]=='s'){
					if(s[--p]=='a' && s[--p]=='r' && s[--p]=='e'){
						p--;
					}else break;
				}else break;
			}else break;
		}else break;
	}
	puts(p==0?"YES":"NO");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"YES"
.LC1:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1728, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movb	$0, -100016(%rbp)
	movl	$0, -100020(%rbp)
	jmp	.L2
.L3:
	addl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100021(%rbp), %edx
	movb	%dl, -100016(%rbp,%rax)
.L2:
	call	getchar@PLT
	movb	%al, -100021(%rbp)
	cmpb	$10, -100021(%rbp)
	jne	.L3
	jmp	.L4
.L12:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L5
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L7
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L7:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L17
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L18
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L10
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L10:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L19
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
.L4:
	cmpl	$0, -100020(%rbp)
	jg	.L12
	jmp	.L6
.L17:
	nop
	jmp	.L6
.L18:
	nop
	jmp	.L6
.L19:
	nop
.L6:
	cmpl	$0, -100020(%rbp)
	jne	.L13
	leaq	.LC0(%rip), %rax
	jmp	.L14
.L13:
	leaq	.LC1(%rip), %rax
.L14:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"YES"
.LC1:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1728, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movb	$0, -100016(%rbp)
	movl	$0, -100020(%rbp)
	jmp	.L2
.L3:
	addl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100021(%rbp), %edx
	movb	%dl, -100016(%rbp,%rax)
.L2:
	call	getchar@PLT
	movb	%al, -100021(%rbp)
	cmpb	$10, -100021(%rbp)
	jne	.L3
	jmp	.L4
.L12:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L5
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L7
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L7:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L17
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L18
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L10
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	jmp	.L4
.L10:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L19
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	subl	$1, -100020(%rbp)
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$1, -100020(%rbp)
.L4:
	cmpl	$0, -100020(%rbp)
	jg	.L12
	jmp	.L6
.L17:
	nop
	jmp	.L6
.L18:
	nop
	jmp	.L6
.L19:
	nop
.L6:
	cmpl	$0, -100020(%rbp)
	jne	.L13
	leaq	.LC0(%rip), %rax
	jmp	.L14
.L13:
	leaq	.LC1(%rip), %rax
.L14:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
