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>

char S[114514];

char Sriv[114514];

int main(void) {
	int i, l;
	if (scanf("%114513s", S) != 1) return 1;
	l = (int)strlen(S);
	for (i = 0; i < l; i++) {
		Sriv[l - 1 - i] = S[i];
	}
	Sriv[l] = '\0';
	for (i = 0; Sriv[i] != '\0';) {
		if (strncmp(Sriv + i, "maerd", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "remaerd", 7) == 0) i += 7;
		else if (strncmp(Sriv + i, "esare", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "resare", 6) == 0) i += 6;
		else {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	return 0;
}

/*
maerd
remaerd
esare
resare

こうすると多分いい
*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	Sriv
	.align 32
	.type	Sriv, @object
	.size	Sriv, 114514
Sriv:
	.zero	114514
	.section	.rodata
.LC0:
	.string	"%114513s"
.LC1:
	.string	"maerd"
.LC2:
	.string	"remaerd"
.LC3:
	.string	"esare"
.LC4:
	.string	"resare"
.LC5:
	.string	"NO"
.LC6:
	.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
	subq	$16, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	Sriv(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -8(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	$0, -8(%rbp)
	jmp	.L6
.L11:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L7
	addl	$5, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$7, %edx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$7, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L9
	addl	$5, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$6, %edx
	leaq	.LC4(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L10
	addl	$6, -8(%rbp)
	jmp	.L6
.L10:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L11
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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	"%114513s"
.LC1:
	.string	"maerd"
.LC2:
	.string	"remaerd"
.LC3:
	.string	"esare"
.LC4:
	.string	"resare"
.LC5:
	.string	"NO"
.LC6:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	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	S(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$1, %r8d
	jne	.L1
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movslq	%eax, %rdi
	leal	-1(%rax), %esi
	leaq	Sriv(%rip), %rbp
	movq	%rbx, %rdx
	leaq	1(%rbx), %rax
	leaq	-1(%rbp,%rdi), %rcx
	addq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	subq	$1, %rcx
	movb	%al, 1(%rcx)
	cmpq	%rsi, %rdx
	jne	.L6
.L7:
	movb	$0, 0(%rbp,%rdi)
	cmpb	$0, Sriv(%rip)
	je	.L5
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %r13
	leaq	.LC3(%rip), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$7, %edx
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L10
	addl	$7, %ebx
.L9:
	movslq	%ebx, %rdi
	cmpb	$0, 0(%rbp,%rdi)
	je	.L5
.L4:
	leaq	0(%rbp,%rdi), %r15
	movl	$5, %edx
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L8
.L18:
	addl	$5, %ebx
	movslq	%ebx, %rdi
	cmpb	$0, 0(%rbp,%rdi)
	jne	.L4
.L5:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
.L1:
	addq	$8, %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
.L10:
	.cfi_restore_state
	movl	$5, %edx
	movq	%r14, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L18
	movl	$6, %edx
	leaq	.LC4(%rip), %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L12
	addl	$6, %ebx
	jmp	.L9
.L20:
	leaq	Sriv(%rip), %rbp
	xorl	%edi, %edi
	jmp	.L7
.L12:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L1
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	Sriv
	.bss
	.align 32
	.type	Sriv, @object
	.size	Sriv, 114514
Sriv:
	.zero	114514
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.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	"%114513s"
.LC1:
	.string	"maerd"
.LC2:
	.string	"remaerd"
.LC3:
	.string	"esare"
.LC4:
	.string	"resare"
.LC5:
	.string	"NO"
.LC6:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	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	S(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$1, %r8d
	jne	.L1
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movslq	%eax, %rdi
	leal	-1(%rax), %esi
	leaq	Sriv(%rip), %rbp
	movq	%rbx, %rdx
	leaq	1(%rbx), %rax
	leaq	-1(%rbp,%rdi), %rcx
	addq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	subq	$1, %rcx
	movb	%al, 1(%rcx)
	cmpq	%rsi, %rdx
	jne	.L6
.L7:
	movb	$0, 0(%rbp,%rdi)
	cmpb	$0, Sriv(%rip)
	je	.L5
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %r13
	leaq	.LC3(%rip), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$7, %edx
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L10
	addl	$7, %ebx
.L9:
	movslq	%ebx, %rdi
	cmpb	$0, 0(%rbp,%rdi)
	je	.L5
.L4:
	leaq	0(%rbp,%rdi), %r15
	movl	$5, %edx
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L8
.L18:
	addl	$5, %ebx
	movslq	%ebx, %rdi
	cmpb	$0, 0(%rbp,%rdi)
	jne	.L4
.L5:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
.L1:
	addq	$8, %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
.L10:
	.cfi_restore_state
	movl	$5, %edx
	movq	%r14, %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L18
	movl	$6, %edx
	leaq	.LC4(%rip), %rsi
	movq	%r15, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L12
	addl	$6, %ebx
	jmp	.L9
.L20:
	leaq	Sriv(%rip), %rbp
	xorl	%edi, %edi
	jmp	.L7
.L12:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L1
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	Sriv
	.bss
	.align 32
	.type	Sriv, @object
	.size	Sriv, 114514
Sriv:
	.zero	114514
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.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>

char S[114514];

char Sriv[114514];

int main(void) {
	int i, l;
	if (scanf("%114513s", S) != 1) return 1;
	l = (int)strlen(S);
	for (i = 0; i < l; i++) {
		Sriv[l - 1 - i] = S[i];
	}
	Sriv[l] = '\0';
	for (i = 0; Sriv[i] != '\0';) {
		if (strncmp(Sriv + i, "maerd", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "remaerd", 7) == 0) i += 7;
		else if (strncmp(Sriv + i, "esare", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "resare", 6) == 0) i += 6;
		else {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	return 0;
}

/*
maerd
remaerd
esare
resare

こうすると多分いい
*/

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>

char S[114514];

char Sriv[114514];

int main(void) {
	int i, l;
	if (scanf("%114513s", S) != 1) return 1;
	l = (int)strlen(S);
	for (i = 0; i < l; i++) {
		Sriv[l - 1 - i] = S[i];
	}
	Sriv[l] = '\0';
	for (i = 0; Sriv[i] != '\0';) {
		if (strncmp(Sriv + i, "maerd", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "remaerd", 7) == 0) i += 7;
		else if (strncmp(Sriv + i, "esare", 5) == 0) i += 5;
		else if (strncmp(Sriv + i, "resare", 6) == 0) i += 6;
		else {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	return 0;
}

/*
maerd
remaerd
esare
resare

こうすると多分いい
*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	Sriv
	.align 32
	.type	Sriv, @object
	.size	Sriv, 114514
Sriv:
	.zero	114514
	.section	.rodata
.LC0:
	.string	"%114513s"
.LC1:
	.string	"maerd"
.LC2:
	.string	"remaerd"
.LC3:
	.string	"esare"
.LC4:
	.string	"resare"
.LC5:
	.string	"NO"
.LC6:
	.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
	subq	$16, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	Sriv(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -8(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	$0, -8(%rbp)
	jmp	.L6
.L11:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L7
	addl	$5, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$7, %edx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$7, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L9
	addl	$5, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$6, %edx
	leaq	.LC4(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L10
	addl	$6, -8(%rbp)
	jmp	.L6
.L10:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L11
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	Sriv
	.align 32
	.type	Sriv, @object
	.size	Sriv, 114514
Sriv:
	.zero	114514
	.section	.rodata
.LC0:
	.string	"%114513s"
.LC1:
	.string	"maerd"
.LC2:
	.string	"remaerd"
.LC3:
	.string	"esare"
.LC4:
	.string	"resare"
.LC5:
	.string	"NO"
.LC6:
	.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
	subq	$16, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	subl	-8(%rbp), %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	Sriv(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -8(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L5
	movl	-4(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	$0, -8(%rbp)
	jmp	.L6
.L11:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L7
	addl	$5, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$7, %edx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$7, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$5, %edx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L9
	addl	$5, -8(%rbp)
	jmp	.L6
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	addq	%rdx, %rax
	movl	$6, %edx
	leaq	.LC4(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L10
	addl	$6, -8(%rbp)
	jmp	.L6
.L10:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	Sriv(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L11
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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:
