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

int main(void) {
	int len;
	char S[100010], T[10], U[10];
	scanf("%s", &S);

	while (1) {
//		printf("%s\n", S);
		len = strlen(S);
		if (!len) break;
		memset(T, 0, 10);
		memset(U, 0, 10);
		memmove(T, S, 7);
		if (!strcmp(T,"dreamer")) { // dreamerase(d,e,r) or dreamer(d,e)
			memmove(U, S+5, 6);
			if (!strcmp(U,"eraser")) {
				memmove(S, S+11, len-11);
				memset(S+len-11, 0, 11);
			} else if (!strcmp(U,"erasee") || !strcmp(U,"erased")) {
				memmove(S, S+10, len-10);
				memset(S+len-10, 0, 10);
			} else if (!strcmp(U,"ereras") || !strcmp(U,"erdrea")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else if (!strcmp(U,"er\0")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else {
				printf("NO\n"); return 0;
			}
		} else if (!strcmp(T,"dreamdr")) { // dreamdream(er)
			memmove(S, S+5, len-5);
			memset(S+len-5, 0, 5);
		} else {
			memset(T, 0, 10);
			memmove(T, S, 6);
			if (!strcmp(T,"eraser")) {
				memmove(S, S+6, len-6);
				memset(S+len-6, 0, 6);				
			} else {
				memset(T, 0, 10);
				memmove(T, S, 5);
				if (!strcmp(T,"dream")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} else if (!strcmp(T,"erase")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} 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	"dreamer"
.LC2:
	.string	"eraser"
.LC3:
	.string	"erasee"
.LC4:
	.string	"erased"
.LC5:
	.string	"ereras"
.LC6:
	.string	"erdrea"
.LC7:
	.string	"er"
	.string	""
.LC8:
	.string	"NO"
.LC9:
	.string	"dreamdr"
.LC10:
	.string	"dream"
.LC11:
	.string	"erase"
.LC12:
	.string	"YES"
	.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	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L18:
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100056(%rbp)
	cmpl	$0, -100056(%rbp)
	je	.L22
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100042(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %ecx
	movw	%cx, 4(%rax)
	movzbl	6(%rdx), %edx
	movb	%dl, 6(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100042(%rbp), %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	movzwl	4(%rax), %eax
	movw	%ax, 4(%rdx)
	leaq	-100042(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	movl	-100056(%rbp), %eax
	subl	$11, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$11, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-11(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$11, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L5:
	leaq	-100042(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L7
	leaq	-100042(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	-100056(%rbp), %eax
	subl	$10, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$10, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-10(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L8:
	leaq	-100042(%rbp), %rax
	leaq	.LC5(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-100042(%rbp), %rax
	leaq	.LC6(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L10
.L9:
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L10:
	leaq	-100042(%rbp), %rax
	leaq	.LC7(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L4:
	leaq	-100052(%rbp), %rax
	leaq	.LC9(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L14:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %edx
	movw	%dx, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L15
	movl	-100056(%rbp), %eax
	subl	$6, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$6, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-6(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$6, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L15:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzbl	4(%rdx), %edx
	movb	%dl, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC10(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L16:
	leaq	-100052(%rbp), %rax
	leaq	.LC11(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L17:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L13:
	jmp	.L18
.L22:
	nop
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"%s"
.LC1:
	.string	"dreamer"
.LC2:
	.string	"eraser"
.LC3:
	.string	"erasee"
.LC4:
	.string	"erased"
.LC5:
	.string	"ereras"
.LC6:
	.string	"erdrea"
	.section	.rodata
.LC7:
	.string	"er"
	.string	""
	.section	.rodata.str1.1
.LC8:
	.string	"NO"
.LC9:
	.string	"dreamdr"
.LC10:
	.string	"dream"
.LC11:
	.string	"erase"
.LC12:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1768, %rsp
	.cfi_def_cfa_offset 100128
	leaq	.LC0(%rip), %rdi
	leaq	.LC7(%rip), %r15
	movabsq	$32199667804893796, %r13
	movabsq	$32198568293266020, %r14
	movq	%fs:40, %rax
	movq	%rax, 100056(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbp
	leaq	12(%rsp), %rbx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L3
.L56:
	movl	0(%rbp), %eax
	xorl	%esi, %esi
	movb	$0, 21(%rsp)
	xorl	%r8d, %r8d
	movw	%si, 19(%rsp)
	leaq	22(%rsp), %rdi
	movl	%eax, (%rbx)
	movzwl	4(%rbp), %eax
	movq	$0, 22(%rsp)
	movw	%ax, 4(%rbx)
	movzbl	6(%rbp), %eax
	movw	%r8w, 30(%rsp)
	movb	%al, 6(%rbx)
	cmpq	%r13, (%rbx)
	je	.L46
	cmpq	%r14, (%rbx)
	je	.L44
	movl	$0, 18(%rsp)
	cmpl	$1935766117, (%rbx)
	je	.L47
.L28:
	movl	0(%rbp), %eax
	movzbl	4(%rbp), %edx
	movb	$0, 21(%rsp)
	movl	$0, 17(%rsp)
	movl	%eax, (%rbx)
	movb	%dl, 4(%rbx)
	cmpl	$1634038372, %eax
	je	.L48
.L31:
	cmpl	$1935766117, (%rbx)
	je	.L49
.L23:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movq	100056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L50
	addq	$100072, %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
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movl	37(%rsp), %eax
	movzwl	41(%rsp), %edx
	movl	%eax, 22(%rsp)
	movw	%dx, 26(%rsp)
	cmpl	$1935766117, %eax
	je	.L51
.L7:
	cmpl	$1935766117, 22(%rsp)
	je	.L52
.L11:
	cmpl	$1935766117, 22(%rsp)
	je	.L53
.L14:
	cmpl	$1919251045, 22(%rsp)
	je	.L54
.L17:
	cmpl	$1919185509, 22(%rsp)
	je	.L55
.L20:
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L23
	leal	-7(%r12), %edx
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	leaq	39(%rsp), %rsi
	call	__memmove_chk@PLT
	leaq	-7(%rbp,%r12), %rdx
	movl	$7, %ecx
	xorl	%eax, %eax
	movq	%rdx, %rdi
	rep stosb
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L48:
	cmpw	$109, 4(%rbx)
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L44:
	leal	-5(%r12), %edx
	leaq	37(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-5(%rbp,%r12), %rax
	movq	%rbp, %rdi
	movl	$0, (%rax)
	movb	$0, 4(%rax)
	call	strlen@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L56
.L3:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L47:
	cmpw	$29285, 4(%rbx)
	jne	.L28
	cmpb	$0, 6(%rbx)
	jne	.L28
	leal	-6(%r12), %edx
	leaq	38(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-6(%rbp,%r12), %rax
	movl	$0, (%rax)
	movw	$0, 4(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L51:
	cmpw	$29285, 26(%rsp)
	jne	.L7
	cmpb	$0, 28(%rsp)
	jne	.L7
	leal	-11(%r12), %edx
	leaq	43(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-11(%rbp,%r12), %rax
	movq	$0, (%rax)
	movw	$0, 8(%rax)
	movb	$0, 10(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L52:
	cmpw	$25957, 26(%rsp)
	jne	.L11
	cmpb	$0, 28(%rsp)
	jne	.L11
.L13:
	leal	-10(%r12), %edx
	movl	$100010, %ecx
	leaq	42(%rsp), %rsi
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-10(%rbp,%r12), %rax
	xorl	%ecx, %ecx
	movq	$0, (%rax)
	movw	%cx, 8(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L53:
	cmpw	$25701, 26(%rsp)
	jne	.L14
	cmpb	$0, 28(%rsp)
	je	.L13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L49:
	cmpw	$101, 4(%rbx)
	jne	.L23
	jmp	.L44
.L54:
	cmpw	$29537, 26(%rsp)
	jne	.L17
	cmpb	$0, 28(%rsp)
	jne	.L17
.L19:
	leal	-7(%r12), %edx
	leaq	39(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-7(%rbp,%r12), %rax
	xorl	%edx, %edx
	movl	$0, (%rax)
	movw	%dx, 4(%rax)
	movb	$0, 6(%rax)
	jmp	.L2
.L55:
	cmpw	$24933, 26(%rsp)
	jne	.L20
	cmpb	$0, 28(%rsp)
	je	.L19
	jmp	.L20
.L50:
	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	"%s"
.LC1:
	.string	"dreamer"
.LC2:
	.string	"eraser"
.LC3:
	.string	"erasee"
.LC4:
	.string	"erased"
.LC5:
	.string	"ereras"
.LC6:
	.string	"erdrea"
	.section	.rodata
.LC7:
	.string	"er"
	.string	""
	.section	.rodata.str1.1
.LC8:
	.string	"NO"
.LC9:
	.string	"dreamdr"
.LC10:
	.string	"dream"
.LC11:
	.string	"erase"
.LC12:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1768, %rsp
	.cfi_def_cfa_offset 100128
	leaq	.LC0(%rip), %rdi
	leaq	.LC7(%rip), %r15
	movabsq	$32199667804893796, %r13
	movabsq	$32198568293266020, %r14
	movq	%fs:40, %rax
	movq	%rax, 100056(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbp
	leaq	12(%rsp), %rbx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L3
.L56:
	movl	0(%rbp), %eax
	xorl	%esi, %esi
	movb	$0, 21(%rsp)
	xorl	%r8d, %r8d
	movw	%si, 19(%rsp)
	leaq	22(%rsp), %rdi
	movl	%eax, (%rbx)
	movzwl	4(%rbp), %eax
	movq	$0, 22(%rsp)
	movw	%ax, 4(%rbx)
	movzbl	6(%rbp), %eax
	movw	%r8w, 30(%rsp)
	movb	%al, 6(%rbx)
	cmpq	%r13, (%rbx)
	je	.L46
	cmpq	%r14, (%rbx)
	je	.L44
	movl	$0, 18(%rsp)
	cmpl	$1935766117, (%rbx)
	je	.L47
.L28:
	movl	0(%rbp), %eax
	movzbl	4(%rbp), %edx
	movb	$0, 21(%rsp)
	movl	$0, 17(%rsp)
	movl	%eax, (%rbx)
	movb	%dl, 4(%rbx)
	cmpl	$1634038372, %eax
	je	.L48
.L31:
	cmpl	$1935766117, (%rbx)
	je	.L49
.L23:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movq	100056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L50
	addq	$100072, %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
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movl	37(%rsp), %eax
	movzwl	41(%rsp), %edx
	movl	%eax, 22(%rsp)
	movw	%dx, 26(%rsp)
	cmpl	$1935766117, %eax
	je	.L51
.L7:
	cmpl	$1935766117, 22(%rsp)
	je	.L52
.L11:
	cmpl	$1935766117, 22(%rsp)
	je	.L53
.L14:
	cmpl	$1919251045, 22(%rsp)
	je	.L54
.L17:
	cmpl	$1919185509, 22(%rsp)
	je	.L55
.L20:
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L23
	leal	-7(%r12), %edx
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	leaq	39(%rsp), %rsi
	call	__memmove_chk@PLT
	leaq	-7(%rbp,%r12), %rdx
	movl	$7, %ecx
	xorl	%eax, %eax
	movq	%rdx, %rdi
	rep stosb
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L48:
	cmpw	$109, 4(%rbx)
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L44:
	leal	-5(%r12), %edx
	leaq	37(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-5(%rbp,%r12), %rax
	movq	%rbp, %rdi
	movl	$0, (%rax)
	movb	$0, 4(%rax)
	call	strlen@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L56
.L3:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L47:
	cmpw	$29285, 4(%rbx)
	jne	.L28
	cmpb	$0, 6(%rbx)
	jne	.L28
	leal	-6(%r12), %edx
	leaq	38(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-6(%rbp,%r12), %rax
	movl	$0, (%rax)
	movw	$0, 4(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L51:
	cmpw	$29285, 26(%rsp)
	jne	.L7
	cmpb	$0, 28(%rsp)
	jne	.L7
	leal	-11(%r12), %edx
	leaq	43(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-11(%rbp,%r12), %rax
	movq	$0, (%rax)
	movw	$0, 8(%rax)
	movb	$0, 10(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L52:
	cmpw	$25957, 26(%rsp)
	jne	.L11
	cmpb	$0, 28(%rsp)
	jne	.L11
.L13:
	leal	-10(%r12), %edx
	movl	$100010, %ecx
	leaq	42(%rsp), %rsi
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-10(%rbp,%r12), %rax
	xorl	%ecx, %ecx
	movq	$0, (%rax)
	movw	%cx, 8(%rax)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L53:
	cmpw	$25701, 26(%rsp)
	jne	.L14
	cmpb	$0, 28(%rsp)
	je	.L13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L49:
	cmpw	$101, 4(%rbx)
	jne	.L23
	jmp	.L44
.L54:
	cmpw	$29537, 26(%rsp)
	jne	.L17
	cmpb	$0, 28(%rsp)
	jne	.L17
.L19:
	leal	-7(%r12), %edx
	leaq	39(%rsp), %rsi
	movl	$100010, %ecx
	movq	%rbp, %rdi
	movslq	%edx, %rdx
	call	__memmove_chk@PLT
	leaq	-7(%rbp,%r12), %rax
	xorl	%edx, %edx
	movl	$0, (%rax)
	movw	%dx, 4(%rax)
	movb	$0, 6(%rax)
	jmp	.L2
.L55:
	cmpw	$24933, 26(%rsp)
	jne	.L20
	cmpb	$0, 28(%rsp)
	je	.L19
	jmp	.L20
.L50:
	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 <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
	int len;
	char S[100010], T[10], U[10];
	scanf("%s", &S);

	while (1) {
//		printf("%s\n", S);
		len = strlen(S);
		if (!len) break;
		memset(T, 0, 10);
		memset(U, 0, 10);
		memmove(T, S, 7);
		if (!strcmp(T,"dreamer")) { // dreamerase(d,e,r) or dreamer(d,e)
			memmove(U, S+5, 6);
			if (!strcmp(U,"eraser")) {
				memmove(S, S+11, len-11);
				memset(S+len-11, 0, 11);
			} else if (!strcmp(U,"erasee") || !strcmp(U,"erased")) {
				memmove(S, S+10, len-10);
				memset(S+len-10, 0, 10);
			} else if (!strcmp(U,"ereras") || !strcmp(U,"erdrea")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else if (!strcmp(U,"er\0")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else {
				printf("NO\n"); return 0;
			}
		} else if (!strcmp(T,"dreamdr")) { // dreamdream(er)
			memmove(S, S+5, len-5);
			memset(S+len-5, 0, 5);
		} else {
			memset(T, 0, 10);
			memmove(T, S, 6);
			if (!strcmp(T,"eraser")) {
				memmove(S, S+6, len-6);
				memset(S+len-6, 0, 6);				
			} else {
				memset(T, 0, 10);
				memmove(T, S, 5);
				if (!strcmp(T,"dream")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} else if (!strcmp(T,"erase")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} else {
					printf("NO\n");
					return 0;
				}
			}
		}
	}
	
	printf("YES\n");

	return 0;
}

erasedream

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

int main(void) {
	int len;
	char S[100010], T[10], U[10];
	scanf("%s", &S);

	while (1) {
//		printf("%s\n", S);
		len = strlen(S);
		if (!len) break;
		memset(T, 0, 10);
		memset(U, 0, 10);
		memmove(T, S, 7);
		if (!strcmp(T,"dreamer")) { // dreamerase(d,e,r) or dreamer(d,e)
			memmove(U, S+5, 6);
			if (!strcmp(U,"eraser")) {
				memmove(S, S+11, len-11);
				memset(S+len-11, 0, 11);
			} else if (!strcmp(U,"erasee") || !strcmp(U,"erased")) {
				memmove(S, S+10, len-10);
				memset(S+len-10, 0, 10);
			} else if (!strcmp(U,"ereras") || !strcmp(U,"erdrea")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else if (!strcmp(U,"er\0")) {
				memmove(S, S+7, len-7);
				memset(S+len-7, 0, 7);
			} else {
				printf("NO\n"); return 0;
			}
		} else if (!strcmp(T,"dreamdr")) { // dreamdream(er)
			memmove(S, S+5, len-5);
			memset(S+len-5, 0, 5);
		} else {
			memset(T, 0, 10);
			memmove(T, S, 6);
			if (!strcmp(T,"eraser")) {
				memmove(S, S+6, len-6);
				memset(S+len-6, 0, 6);				
			} else {
				memset(T, 0, 10);
				memmove(T, S, 5);
				if (!strcmp(T,"dream")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} else if (!strcmp(T,"erase")) {
					memmove(S, S+5, len-5);
					memset(S+len-5, 0, 5);
				} 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	"dreamer"
.LC2:
	.string	"eraser"
.LC3:
	.string	"erasee"
.LC4:
	.string	"erased"
.LC5:
	.string	"ereras"
.LC6:
	.string	"erdrea"
.LC7:
	.string	"er"
	.string	""
.LC8:
	.string	"NO"
.LC9:
	.string	"dreamdr"
.LC10:
	.string	"dream"
.LC11:
	.string	"erase"
.LC12:
	.string	"YES"
	.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	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L18:
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100056(%rbp)
	cmpl	$0, -100056(%rbp)
	je	.L22
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100042(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %ecx
	movw	%cx, 4(%rax)
	movzbl	6(%rdx), %edx
	movb	%dl, 6(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100042(%rbp), %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	movzwl	4(%rax), %eax
	movw	%ax, 4(%rdx)
	leaq	-100042(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	movl	-100056(%rbp), %eax
	subl	$11, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$11, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-11(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$11, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L5:
	leaq	-100042(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L7
	leaq	-100042(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	-100056(%rbp), %eax
	subl	$10, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$10, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-10(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L8:
	leaq	-100042(%rbp), %rax
	leaq	.LC5(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-100042(%rbp), %rax
	leaq	.LC6(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L10
.L9:
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L10:
	leaq	-100042(%rbp), %rax
	leaq	.LC7(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L4:
	leaq	-100052(%rbp), %rax
	leaq	.LC9(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L14:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %edx
	movw	%dx, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L15
	movl	-100056(%rbp), %eax
	subl	$6, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$6, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-6(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$6, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L15:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzbl	4(%rdx), %edx
	movb	%dl, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC10(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L16:
	leaq	-100052(%rbp), %rax
	leaq	.LC11(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L17:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L13:
	jmp	.L18
.L22:
	nop
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"%s"
.LC1:
	.string	"dreamer"
.LC2:
	.string	"eraser"
.LC3:
	.string	"erasee"
.LC4:
	.string	"erased"
.LC5:
	.string	"ereras"
.LC6:
	.string	"erdrea"
.LC7:
	.string	"er"
	.string	""
.LC8:
	.string	"NO"
.LC9:
	.string	"dreamdr"
.LC10:
	.string	"dream"
.LC11:
	.string	"erase"
.LC12:
	.string	"YES"
	.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	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L18:
	leaq	-100032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -100056(%rbp)
	cmpl	$0, -100056(%rbp)
	je	.L22
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100042(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %ecx
	movw	%cx, 4(%rax)
	movzbl	6(%rdx), %edx
	movb	%dl, 6(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100042(%rbp), %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	movzwl	4(%rax), %eax
	movw	%ax, 4(%rdx)
	leaq	-100042(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	movl	-100056(%rbp), %eax
	subl	$11, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$11, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-11(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$11, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L5:
	leaq	-100042(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L7
	leaq	-100042(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	-100056(%rbp), %eax
	subl	$10, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$10, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-10(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L8:
	leaq	-100042(%rbp), %rax
	leaq	.LC5(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-100042(%rbp), %rax
	leaq	.LC6(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L10
.L9:
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L13
.L10:
	leaq	-100042(%rbp), %rax
	leaq	.LC7(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L11
	movl	-100056(%rbp), %eax
	subl	$7, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$7, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-7(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$7, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L4:
	leaq	-100052(%rbp), %rax
	leaq	.LC9(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L14:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzwl	4(%rdx), %edx
	movw	%dx, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L15
	movl	-100056(%rbp), %eax
	subl	$6, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$6, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-6(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$6, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L15:
	leaq	-100052(%rbp), %rax
	movl	$10, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-100052(%rbp), %rax
	leaq	-100032(%rbp), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movzbl	4(%rdx), %edx
	movb	%dl, 4(%rax)
	leaq	-100052(%rbp), %rax
	leaq	.LC10(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L16:
	leaq	-100052(%rbp), %rax
	leaq	.LC11(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L17
	movl	-100056(%rbp), %eax
	subl	$5, %eax
	movslq	%eax, %rdx
	leaq	-100032(%rbp), %rax
	addq	$5, %rax
	leaq	-100032(%rbp), %rcx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memmove@PLT
	movl	-100056(%rbp), %eax
	cltq
	leaq	-5(%rax), %rdx
	leaq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movl	$5, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	jmp	.L18
.L17:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L19
.L13:
	jmp	.L18
.L22:
	nop
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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:
