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>

static char* str_dream   = "dream";
static char* str_dreamer = "dreamer";
static char* str_erase   = "erase";
static char* str_eraser  = "eraser";
static char* str_mer     = "mer";
static char* str_ser     = "ser";

int main(int argc, char* argv[]){
        char *buf= NULL;
        char tmp[256+1]={0};
        int  spos = -1;
        int  epos = -1;

        buf = (char*)calloc(100000+2, sizeof(char));
        if(buf==NULL){
                return 1;
        }

        while(fgets(tmp, sizeof(tmp)-1, stdin)!=NULL){
                strcat(buf, tmp);
                memset(tmp, 0, sizeof(tmp));
        }

        epos = strlen(buf) -1;
        spos = epos;
        int ans =  1;
        for(;epos>=0 && spos>=0 && ans!=0;){
                if(buf[epos]=='\n'){
                        epos--;
                        continue;
                }
                if(buf[epos]=='m'){ //dream
                        spos = epos - 5 + 1; //dream
                        if(spos<0){
                                ans = 0;
                                break;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_dream, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='e'){ //erase
                        spos = epos - 5 + 1; //erase
                        if(spos<0){
                                ans = 0;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_erase, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='r'){ //dreamer or eraser
                        spos = epos - 3 + 1; // mer or ser
                        if(spos<0){
                                ans = 0;
                        }
                        else if(memcmp((void*)(&buf[spos]), str_mer, 3)==0){ //mer
                                spos = epos - 7 + 1; //dreamer
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_dreamer, 7)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else if(memcmp((void*)(&buf[spos]), str_ser, 3)==0){ //ser
                                spos = epos - 6 + 1; //eraser
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_eraser, 6)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else{
                                ans = 0;
                        }
                }
                else{
                        ans = 0;
                }
                epos = spos - 1;
        }

        if(ans==1){
                printf("YES\n");
        }
        else{
                printf("NO\n");
        }
        return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"dream"
	.section	.data.rel.local,"aw"
	.align 8
	.type	str_dream, @object
	.size	str_dream, 8
str_dream:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"dreamer"
	.section	.data.rel.local
	.align 8
	.type	str_dreamer, @object
	.size	str_dreamer, 8
str_dreamer:
	.quad	.LC1
	.section	.rodata
.LC2:
	.string	"erase"
	.section	.data.rel.local
	.align 8
	.type	str_erase, @object
	.size	str_erase, 8
str_erase:
	.quad	.LC2
	.section	.rodata
.LC3:
	.string	"eraser"
	.section	.data.rel.local
	.align 8
	.type	str_eraser, @object
	.size	str_eraser, 8
str_eraser:
	.quad	.LC3
	.section	.rodata
.LC4:
	.string	"mer"
	.section	.data.rel.local
	.align 8
	.type	str_mer, @object
	.size	str_mer, 8
str_mer:
	.quad	.LC4
	.section	.rodata
.LC5:
	.string	"ser"
	.section	.data.rel.local
	.align 8
	.type	str_ser, @object
	.size	str_ser, 8
str_ser:
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"YES"
.LC7:
	.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
	subq	$320, %rsp
	movl	%edi, -308(%rbp)
	movq	%rsi, -320(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -280(%rbp)
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movb	%al, (%rdx)
	addq	$1, %rdx
	movl	$-1, -292(%rbp)
	movl	$-1, -288(%rbp)
	movl	$1, %esi
	movl	$100002, %edi
	call	calloc@PLT
	movq	%rax, -280(%rbp)
	cmpq	$0, -280(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L23
.L5:
	leaq	-272(%rbp), %rdx
	movq	-280(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcat@PLT
	leaq	-272(%rbp), %rax
	movl	$257, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
.L4:
	movq	stdin(%rip), %rdx
	leaq	-272(%rbp), %rax
	movl	$256, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movq	-280(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -288(%rbp)
	movl	-288(%rbp), %eax
	movl	%eax, -292(%rbp)
	movl	$1, -284(%rbp)
	jmp	.L6
.L20:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L7
	subl	$1, -288(%rbp)
	jmp	.L6
.L7:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$109, %al
	jne	.L8
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L9
	movl	$0, -284(%rbp)
	jmp	.L10
.L9:
	movq	str_dream(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L8:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$101, %al
	jne	.L12
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L13
	movl	$0, -284(%rbp)
	jmp	.L11
.L13:
	movq	str_erase(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L12:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$114, %al
	jne	.L14
	movl	-288(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L15
	movl	$0, -284(%rbp)
	jmp	.L11
.L15:
	movq	str_mer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-288(%rbp), %eax
	subl	$6, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L17
	movl	$0, -284(%rbp)
	jmp	.L11
.L17:
	movq	str_dreamer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$7, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L16:
	movq	str_ser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L18
	movl	-288(%rbp), %eax
	subl	$5, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L19
	movl	$0, -284(%rbp)
	jmp	.L11
.L19:
	movq	str_eraser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L18:
	movl	$0, -284(%rbp)
	jmp	.L11
.L14:
	movl	$0, -284(%rbp)
.L11:
	movl	-292(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -288(%rbp)
.L6:
	cmpl	$0, -288(%rbp)
	js	.L10
	cmpl	$0, -292(%rbp)
	js	.L10
	cmpl	$0, -284(%rbp)
	jne	.L20
.L10:
	cmpl	$1, -284(%rbp)
	jne	.L21
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	"dream"
.LC1:
	.string	"erase"
.LC2:
	.string	"mer"
.LC3:
	.string	"dreamer"
.LC4:
	.string	"ser"
.LC5:
	.string	"eraser"
.LC6:
	.string	"YES"
.LC7:
	.string	"NO"
	.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
	movl	$30, %ecx
	pxor	%xmm0, %xmm0
	movl	$1, %esi
	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
	subq	$280, %rsp
	.cfi_def_cfa_offset 336
	movq	%fs:40, %rax
	movq	%rax, 264(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movaps	%xmm0, (%rsp)
	rep stosq
	movb	$0, (%rdi)
	movl	$100002, %edi
	call	calloc@PLT
	testq	%rax, %rax
	je	.L22
	movq	%rax, %r12
	movq	%rsp, %rbp
	xorl	%ebx, %ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rdi
	movl	$100002, %edx
	movq	%rbp, %rsi
	call	__strcat_chk@PLT
	movl	$32, %ecx
	movq	%rbp, %rdi
	movq	%rbx, %rax
	rep stosq
	movb	$0, (%rdi)
.L3:
	movq	stdin(%rip), %rdx
	movl	$256, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L4
	movq	%r12, %rdi
	call	strlen@PLT
	movl	%eax, %ebx
	subl	$1, %ebx
	js	.L5
	leaq	.LC4(%rip), %r15
	leaq	.LC5(%rip), %r13
	leaq	.LC3(%rip), %rbp
.L20:
	movslq	%ebx, %rax
	movzbl	(%r12,%rax), %eax
	cmpb	$10, %al
	je	.L32
.L6:
	cmpb	$109, %al
	je	.L33
	cmpb	$101, %al
	je	.L34
	cmpb	$114, %al
	je	.L35
.L9:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
.L1:
	movq	264(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L36
	addq	$280, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L33:
	.cfi_restore_state
	subl	$4, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rax
	addq	%r12, %rax
	cmpl	$1634038372, (%rax)
	je	.L37
.L14:
	movl	$1, %eax
.L15:
	xorl	$1, %eax
.L12:
	leal	-1(%r14), %ebx
	testl	%r14d, %r14d
	je	.L19
	testl	%eax, %eax
	je	.L9
	movslq	%ebx, %rax
	movzbl	(%r12,%rax), %eax
	cmpb	$10, %al
	jne	.L6
.L32:
	subl	$1, %ebx
	jns	.L20
.L5:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	subl	$4, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rax
	addq	%r12, %rax
	cmpl	$1935766117, (%rax)
	jne	.L14
	cmpb	$101, 4(%rax)
	jne	.L14
	xorl	%eax, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L35:
	movl	%ebx, %edi
	subl	$2, %edi
	js	.L9
	movslq	%edi, %rdi
	addq	%r12, %rdi
	cmpw	$25965, (%rdi)
	je	.L38
.L16:
	movl	$3, %edx
	movq	%r15, %rsi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L9
	subl	$5, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rdi
	movl	$6, %edx
	movq	%r13, %rsi
	addq	%r12, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	cmpb	$109, 4(%rax)
	jne	.L14
	xorl	%eax, %eax
	jmp	.L15
.L38:
	cmpb	$114, 2(%rdi)
	jne	.L16
	subl	$6, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rdi
	movl	$7, %edx
	movq	%rbp, %rsi
	addq	%r12, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	jmp	.L12
.L19:
	subl	$1, %eax
	je	.L5
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
.L22:
	movl	$1, %eax
	jmp	.L1
	.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	"dream"
.LC1:
	.string	"erase"
.LC2:
	.string	"mer"
.LC3:
	.string	"dreamer"
.LC4:
	.string	"ser"
.LC5:
	.string	"eraser"
.LC6:
	.string	"YES"
.LC7:
	.string	"NO"
	.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
	movl	$30, %ecx
	pxor	%xmm0, %xmm0
	movl	$1, %esi
	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
	subq	$280, %rsp
	.cfi_def_cfa_offset 336
	movq	%fs:40, %rax
	movq	%rax, 264(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movaps	%xmm0, (%rsp)
	rep stosq
	movb	$0, (%rdi)
	movl	$100002, %edi
	call	calloc@PLT
	testq	%rax, %rax
	je	.L22
	movq	%rax, %r12
	movq	%rsp, %rbp
	xorl	%ebx, %ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rdi
	movl	$100002, %edx
	movq	%rbp, %rsi
	call	__strcat_chk@PLT
	movl	$32, %ecx
	movq	%rbp, %rdi
	movq	%rbx, %rax
	rep stosq
	movb	$0, (%rdi)
.L3:
	movq	stdin(%rip), %rdx
	movl	$256, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L4
	movq	%r12, %rdi
	call	strlen@PLT
	movl	%eax, %ebx
	subl	$1, %ebx
	js	.L5
	leaq	.LC4(%rip), %r15
	leaq	.LC5(%rip), %r13
	leaq	.LC3(%rip), %rbp
.L20:
	movslq	%ebx, %rax
	movzbl	(%r12,%rax), %eax
	cmpb	$10, %al
	je	.L32
.L6:
	cmpb	$109, %al
	je	.L33
	cmpb	$101, %al
	je	.L34
	cmpb	$114, %al
	je	.L35
.L9:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
.L1:
	movq	264(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L36
	addq	$280, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L33:
	.cfi_restore_state
	subl	$4, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rax
	addq	%r12, %rax
	cmpl	$1634038372, (%rax)
	je	.L37
.L14:
	movl	$1, %eax
.L15:
	xorl	$1, %eax
.L12:
	leal	-1(%r14), %ebx
	testl	%r14d, %r14d
	je	.L19
	testl	%eax, %eax
	je	.L9
	movslq	%ebx, %rax
	movzbl	(%r12,%rax), %eax
	cmpb	$10, %al
	jne	.L6
.L32:
	subl	$1, %ebx
	jns	.L20
.L5:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	subl	$4, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rax
	addq	%r12, %rax
	cmpl	$1935766117, (%rax)
	jne	.L14
	cmpb	$101, 4(%rax)
	jne	.L14
	xorl	%eax, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L35:
	movl	%ebx, %edi
	subl	$2, %edi
	js	.L9
	movslq	%edi, %rdi
	addq	%r12, %rdi
	cmpw	$25965, (%rdi)
	je	.L38
.L16:
	movl	$3, %edx
	movq	%r15, %rsi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L9
	subl	$5, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rdi
	movl	$6, %edx
	movq	%r13, %rsi
	addq	%r12, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	cmpb	$109, 4(%rax)
	jne	.L14
	xorl	%eax, %eax
	jmp	.L15
.L38:
	cmpb	$114, 2(%rdi)
	jne	.L16
	subl	$6, %ebx
	movl	%ebx, %r14d
	js	.L9
	movslq	%ebx, %rdi
	movl	$7, %edx
	movq	%rbp, %rsi
	addq	%r12, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	jmp	.L12
.L19:
	subl	$1, %eax
	je	.L5
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
.L22:
	movl	$1, %eax
	jmp	.L1
	.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>

static char* str_dream   = "dream";
static char* str_dreamer = "dreamer";
static char* str_erase   = "erase";
static char* str_eraser  = "eraser";
static char* str_mer     = "mer";
static char* str_ser     = "ser";

int main(int argc, char* argv[]){
        char *buf= NULL;
        char tmp[256+1]={0};
        int  spos = -1;
        int  epos = -1;

        buf = (char*)calloc(100000+2, sizeof(char));
        if(buf==NULL){
                return 1;
        }

        while(fgets(tmp, sizeof(tmp)-1, stdin)!=NULL){
                strcat(buf, tmp);
                memset(tmp, 0, sizeof(tmp));
        }

        epos = strlen(buf) -1;
        spos = epos;
        int ans =  1;
        for(;epos>=0 && spos>=0 && ans!=0;){
                if(buf[epos]=='\n'){
                        epos--;
                        continue;
                }
                if(buf[epos]=='m'){ //dream
                        spos = epos - 5 + 1; //dream
                        if(spos<0){
                                ans = 0;
                                break;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_dream, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='e'){ //erase
                        spos = epos - 5 + 1; //erase
                        if(spos<0){
                                ans = 0;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_erase, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='r'){ //dreamer or eraser
                        spos = epos - 3 + 1; // mer or ser
                        if(spos<0){
                                ans = 0;
                        }
                        else if(memcmp((void*)(&buf[spos]), str_mer, 3)==0){ //mer
                                spos = epos - 7 + 1; //dreamer
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_dreamer, 7)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else if(memcmp((void*)(&buf[spos]), str_ser, 3)==0){ //ser
                                spos = epos - 6 + 1; //eraser
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_eraser, 6)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else{
                                ans = 0;
                        }
                }
                else{
                        ans = 0;
                }
                epos = spos - 1;
        }

        if(ans==1){
                printf("YES\n");
        }
        else{
                printf("NO\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>

static char* str_dream   = "dream";
static char* str_dreamer = "dreamer";
static char* str_erase   = "erase";
static char* str_eraser  = "eraser";
static char* str_mer     = "mer";
static char* str_ser     = "ser";

int main(int argc, char* argv[]){
        char *buf= NULL;
        char tmp[256+1]={0};
        int  spos = -1;
        int  epos = -1;

        buf = (char*)calloc(100000+2, sizeof(char));
        if(buf==NULL){
                return 1;
        }

        while(fgets(tmp, sizeof(tmp)-1, stdin)!=NULL){
                strcat(buf, tmp);
                memset(tmp, 0, sizeof(tmp));
        }

        epos = strlen(buf) -1;
        spos = epos;
        int ans =  1;
        for(;epos>=0 && spos>=0 && ans!=0;){
                if(buf[epos]=='\n'){
                        epos--;
                        continue;
                }
                if(buf[epos]=='m'){ //dream
                        spos = epos - 5 + 1; //dream
                        if(spos<0){
                                ans = 0;
                                break;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_dream, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='e'){ //erase
                        spos = epos - 5 + 1; //erase
                        if(spos<0){
                                ans = 0;
                        }
                        else{
                                if(memcmp((void*)(&buf[spos]), str_erase, 5)!=0){
                                        ans = 0;
                                }
                        }
                }
                else if(buf[epos]=='r'){ //dreamer or eraser
                        spos = epos - 3 + 1; // mer or ser
                        if(spos<0){
                                ans = 0;
                        }
                        else if(memcmp((void*)(&buf[spos]), str_mer, 3)==0){ //mer
                                spos = epos - 7 + 1; //dreamer
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_dreamer, 7)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else if(memcmp((void*)(&buf[spos]), str_ser, 3)==0){ //ser
                                spos = epos - 6 + 1; //eraser
                                if(spos<0){
                                        ans = 0;
                                }
                                else{
                                        if(memcmp((void*)(&buf[spos]), str_eraser, 6)!=0){
                                                ans = 0;
                                        }
                                }
                        }
                        else{
                                ans = 0;
                        }
                }
                else{
                        ans = 0;
                }
                epos = spos - 1;
        }

        if(ans==1){
                printf("YES\n");
        }
        else{
                printf("NO\n");
        }
        return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"dream"
	.section	.data.rel.local,"aw"
	.align 8
	.type	str_dream, @object
	.size	str_dream, 8
str_dream:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"dreamer"
	.section	.data.rel.local
	.align 8
	.type	str_dreamer, @object
	.size	str_dreamer, 8
str_dreamer:
	.quad	.LC1
	.section	.rodata
.LC2:
	.string	"erase"
	.section	.data.rel.local
	.align 8
	.type	str_erase, @object
	.size	str_erase, 8
str_erase:
	.quad	.LC2
	.section	.rodata
.LC3:
	.string	"eraser"
	.section	.data.rel.local
	.align 8
	.type	str_eraser, @object
	.size	str_eraser, 8
str_eraser:
	.quad	.LC3
	.section	.rodata
.LC4:
	.string	"mer"
	.section	.data.rel.local
	.align 8
	.type	str_mer, @object
	.size	str_mer, 8
str_mer:
	.quad	.LC4
	.section	.rodata
.LC5:
	.string	"ser"
	.section	.data.rel.local
	.align 8
	.type	str_ser, @object
	.size	str_ser, 8
str_ser:
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"YES"
.LC7:
	.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
	subq	$320, %rsp
	movl	%edi, -308(%rbp)
	movq	%rsi, -320(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -280(%rbp)
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movb	%al, (%rdx)
	addq	$1, %rdx
	movl	$-1, -292(%rbp)
	movl	$-1, -288(%rbp)
	movl	$1, %esi
	movl	$100002, %edi
	call	calloc@PLT
	movq	%rax, -280(%rbp)
	cmpq	$0, -280(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L23
.L5:
	leaq	-272(%rbp), %rdx
	movq	-280(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcat@PLT
	leaq	-272(%rbp), %rax
	movl	$257, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
.L4:
	movq	stdin(%rip), %rdx
	leaq	-272(%rbp), %rax
	movl	$256, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movq	-280(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -288(%rbp)
	movl	-288(%rbp), %eax
	movl	%eax, -292(%rbp)
	movl	$1, -284(%rbp)
	jmp	.L6
.L20:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L7
	subl	$1, -288(%rbp)
	jmp	.L6
.L7:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$109, %al
	jne	.L8
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L9
	movl	$0, -284(%rbp)
	jmp	.L10
.L9:
	movq	str_dream(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L8:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$101, %al
	jne	.L12
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L13
	movl	$0, -284(%rbp)
	jmp	.L11
.L13:
	movq	str_erase(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L12:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$114, %al
	jne	.L14
	movl	-288(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L15
	movl	$0, -284(%rbp)
	jmp	.L11
.L15:
	movq	str_mer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-288(%rbp), %eax
	subl	$6, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L17
	movl	$0, -284(%rbp)
	jmp	.L11
.L17:
	movq	str_dreamer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$7, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L16:
	movq	str_ser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L18
	movl	-288(%rbp), %eax
	subl	$5, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L19
	movl	$0, -284(%rbp)
	jmp	.L11
.L19:
	movq	str_eraser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L18:
	movl	$0, -284(%rbp)
	jmp	.L11
.L14:
	movl	$0, -284(%rbp)
.L11:
	movl	-292(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -288(%rbp)
.L6:
	cmpl	$0, -288(%rbp)
	js	.L10
	cmpl	$0, -292(%rbp)
	js	.L10
	cmpl	$0, -284(%rbp)
	jne	.L20
.L10:
	cmpl	$1, -284(%rbp)
	jne	.L21
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	"dream"
	.section	.data.rel.local,"aw"
	.align 8
	.type	str_dream, @object
	.size	str_dream, 8
str_dream:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"dreamer"
	.section	.data.rel.local
	.align 8
	.type	str_dreamer, @object
	.size	str_dreamer, 8
str_dreamer:
	.quad	.LC1
	.section	.rodata
.LC2:
	.string	"erase"
	.section	.data.rel.local
	.align 8
	.type	str_erase, @object
	.size	str_erase, 8
str_erase:
	.quad	.LC2
	.section	.rodata
.LC3:
	.string	"eraser"
	.section	.data.rel.local
	.align 8
	.type	str_eraser, @object
	.size	str_eraser, 8
str_eraser:
	.quad	.LC3
	.section	.rodata
.LC4:
	.string	"mer"
	.section	.data.rel.local
	.align 8
	.type	str_mer, @object
	.size	str_mer, 8
str_mer:
	.quad	.LC4
	.section	.rodata
.LC5:
	.string	"ser"
	.section	.data.rel.local
	.align 8
	.type	str_ser, @object
	.size	str_ser, 8
str_ser:
	.quad	.LC5
	.section	.rodata
.LC6:
	.string	"YES"
.LC7:
	.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
	subq	$320, %rsp
	movl	%edi, -308(%rbp)
	movq	%rsi, -320(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -280(%rbp)
	movq	$0, -272(%rbp)
	movq	$0, -264(%rbp)
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movb	%al, (%rdx)
	addq	$1, %rdx
	movl	$-1, -292(%rbp)
	movl	$-1, -288(%rbp)
	movl	$1, %esi
	movl	$100002, %edi
	call	calloc@PLT
	movq	%rax, -280(%rbp)
	cmpq	$0, -280(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L23
.L5:
	leaq	-272(%rbp), %rdx
	movq	-280(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcat@PLT
	leaq	-272(%rbp), %rax
	movl	$257, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
.L4:
	movq	stdin(%rip), %rdx
	leaq	-272(%rbp), %rax
	movl	$256, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L5
	movq	-280(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -288(%rbp)
	movl	-288(%rbp), %eax
	movl	%eax, -292(%rbp)
	movl	$1, -284(%rbp)
	jmp	.L6
.L20:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L7
	subl	$1, -288(%rbp)
	jmp	.L6
.L7:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$109, %al
	jne	.L8
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L9
	movl	$0, -284(%rbp)
	jmp	.L10
.L9:
	movq	str_dream(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L8:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$101, %al
	jne	.L12
	movl	-288(%rbp), %eax
	subl	$4, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L13
	movl	$0, -284(%rbp)
	jmp	.L11
.L13:
	movq	str_erase(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$5, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L12:
	movl	-288(%rbp), %eax
	movslq	%eax, %rdx
	movq	-280(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$114, %al
	jne	.L14
	movl	-288(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L15
	movl	$0, -284(%rbp)
	jmp	.L11
.L15:
	movq	str_mer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	movl	-288(%rbp), %eax
	subl	$6, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L17
	movl	$0, -284(%rbp)
	jmp	.L11
.L17:
	movq	str_dreamer(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$7, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L16:
	movq	str_ser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$3, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L18
	movl	-288(%rbp), %eax
	subl	$5, %eax
	movl	%eax, -292(%rbp)
	cmpl	$0, -292(%rbp)
	jns	.L19
	movl	$0, -284(%rbp)
	jmp	.L11
.L19:
	movq	str_eraser(%rip), %rax
	movl	-292(%rbp), %edx
	movslq	%edx, %rcx
	movq	-280(%rbp), %rdx
	addq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L11
	movl	$0, -284(%rbp)
	jmp	.L11
.L18:
	movl	$0, -284(%rbp)
	jmp	.L11
.L14:
	movl	$0, -284(%rbp)
.L11:
	movl	-292(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -288(%rbp)
.L6:
	cmpl	$0, -288(%rbp)
	js	.L10
	cmpl	$0, -292(%rbp)
	js	.L10
	cmpl	$0, -284(%rbp)
	jne	.L20
.L10:
	cmpl	$1, -284(%rbp)
	jne	.L21
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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:
