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>
#include <string.h>

int main(void) {
	char s[100000];
	int last;

	scanf("%s", s);
	last = (int)strlen(s) - 1;
	while (last > -1)
	{
		// dream
		if (s[last] == 'm' && s[last - 1] == 'a' && s[last - 2] == 'e' && s[last - 3] == 'r' && s[last - 4] == 'd')
		{
			last -= 5;
		}
		// dreamer
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 'm' && s[last - 3] == 'a' && s[last - 4] == 'e' &&
			s[last - 5] == 'r' && s[last - 6] == 'd')
		{
			last -= 7;
		}
		// erase
		else if (s[last] == 'e' && s[last - 1] == 's' && s[last - 2] == 'a' && s[last - 3] == 'r' && s[last - 4] == 'e')
		{
			last -= 5;
		}
		// eraser
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 's' && s[last - 3] == 'a' && s[last - 4] == 'r' &&
			s[last - 5] == 'e')
		{
			last -= 6;
		}
		else
		{
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.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
	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
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -100020(%rbp)
	jmp	.L2
.L8:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L3
	subl	$5, -100020(%rbp)
	jmp	.L2
.L3:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$6, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L4
	subl	$7, -100020(%rbp)
	jmp	.L2
.L4:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	subl	$5, -100020(%rbp)
	jmp	.L2
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$6, -100020(%rbp)
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L2:
	cmpl	$0, -100020(%rbp)
	jns	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testl	%eax, %eax
	je	.L2
	subl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$109, %dl
	je	.L20
	cmpb	$114, %dl
	jne	.L6
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	je	.L21
.L4:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	-2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	-3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	-4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L4
.L18:
	subl	$5, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$101, %dl
	jne	.L4
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%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	$114, (%rsp,%rdx)
	jne	.L4
	leal	-4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L21:
	leal	-2(%rax), %edx
	movslq	%edx, %rcx
	cmpb	$109, (%rsp,%rcx)
	je	.L23
.L7:
	movslq	%edx, %rdx
	cmpb	$115, (%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	$114, (%rsp,%rdx)
	jne	.L4
	leal	-5(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	subl	$6, %eax
.L5:
	testl	%eax, %eax
	jns	.L9
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L23:
	leal	-3(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$97, (%rsp,%rcx)
	jne	.L7
	leal	-4(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$101, (%rsp,%rcx)
	jne	.L7
	leal	-5(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$114, (%rsp,%rcx)
	jne	.L7
	leal	-6(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$100, (%rsp,%rcx)
	jne	.L7
	subl	$7, %eax
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testl	%eax, %eax
	je	.L2
	subl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%eax, %rdx
	movzbl	(%rsp,%rdx), %edx
	cmpb	$109, %dl
	je	.L20
	cmpb	$114, %dl
	jne	.L6
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	je	.L21
.L4:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$97, (%rsp,%rdx)
	jne	.L4
	leal	-2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	leal	-3(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$114, (%rsp,%rdx)
	jne	.L4
	leal	-4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$100, (%rsp,%rdx)
	jne	.L4
.L18:
	subl	$5, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$101, %dl
	jne	.L4
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$115, (%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	$114, (%rsp,%rdx)
	jne	.L4
	leal	-4(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L21:
	leal	-2(%rax), %edx
	movslq	%edx, %rcx
	cmpb	$109, (%rsp,%rcx)
	je	.L23
.L7:
	movslq	%edx, %rdx
	cmpb	$115, (%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	$114, (%rsp,%rdx)
	jne	.L4
	leal	-5(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$101, (%rsp,%rdx)
	jne	.L4
	subl	$6, %eax
.L5:
	testl	%eax, %eax
	jns	.L9
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L23:
	leal	-3(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$97, (%rsp,%rcx)
	jne	.L7
	leal	-4(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$101, (%rsp,%rcx)
	jne	.L7
	leal	-5(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$114, (%rsp,%rcx)
	jne	.L7
	leal	-6(%rax), %ecx
	movslq	%ecx, %rcx
	cmpb	$100, (%rsp,%rcx)
	jne	.L7
	subl	$7, %eax
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include <string.h>

int main(void) {
	char s[100000];
	int last;

	scanf("%s", s);
	last = (int)strlen(s) - 1;
	while (last > -1)
	{
		// dream
		if (s[last] == 'm' && s[last - 1] == 'a' && s[last - 2] == 'e' && s[last - 3] == 'r' && s[last - 4] == 'd')
		{
			last -= 5;
		}
		// dreamer
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 'm' && s[last - 3] == 'a' && s[last - 4] == 'e' &&
			s[last - 5] == 'r' && s[last - 6] == 'd')
		{
			last -= 7;
		}
		// erase
		else if (s[last] == 'e' && s[last - 1] == 's' && s[last - 2] == 'a' && s[last - 3] == 'r' && s[last - 4] == 'e')
		{
			last -= 5;
		}
		// eraser
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 's' && s[last - 3] == 'a' && s[last - 4] == 'r' &&
			s[last - 5] == 'e')
		{
			last -= 6;
		}
		else
		{
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}

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 <stdio.h>
#include <string.h>

int main(void) {
	char s[100000];
	int last;

	scanf("%s", s);
	last = (int)strlen(s) - 1;
	while (last > -1)
	{
		// dream
		if (s[last] == 'm' && s[last - 1] == 'a' && s[last - 2] == 'e' && s[last - 3] == 'r' && s[last - 4] == 'd')
		{
			last -= 5;
		}
		// dreamer
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 'm' && s[last - 3] == 'a' && s[last - 4] == 'e' &&
			s[last - 5] == 'r' && s[last - 6] == 'd')
		{
			last -= 7;
		}
		// erase
		else if (s[last] == 'e' && s[last - 1] == 's' && s[last - 2] == 'a' && s[last - 3] == 'r' && s[last - 4] == 'e')
		{
			last -= 5;
		}
		// eraser
		else if (s[last] == 'r' && s[last - 1] == 'e' && s[last - 2] == 's' && s[last - 3] == 'a' && s[last - 4] == 'r' &&
			s[last - 5] == 'e')
		{
			last -= 6;
		}
		else
		{
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.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
	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
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -100020(%rbp)
	jmp	.L2
.L8:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L3
	subl	$5, -100020(%rbp)
	jmp	.L2
.L3:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$6, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L4
	subl	$7, -100020(%rbp)
	jmp	.L2
.L4:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	subl	$5, -100020(%rbp)
	jmp	.L2
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$6, -100020(%rbp)
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L2:
	cmpl	$0, -100020(%rbp)
	jns	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"NO"
.LC2:
	.string	"YES"
	.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
	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
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -100020(%rbp)
	jmp	.L2
.L8:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L3
	subl	$5, -100020(%rbp)
	jmp	.L2
.L3:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$109, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L4
	movl	-100020(%rbp), %eax
	subl	$6, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$100, %al
	jne	.L4
	subl	$7, -100020(%rbp)
	jmp	.L2
.L4:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L5
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L5
	subl	$5, -100020(%rbp)
	jmp	.L2
.L5:
	movl	-100020(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$3, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$4, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L6
	movl	-100020(%rbp), %eax
	subl	$5, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$101, %al
	jne	.L6
	subl	$6, -100020(%rbp)
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L2:
	cmpl	$0, -100020(%rbp)
	jns	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
