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>

void inverse(char *a,char *b){
	int i;
	
	for(i=0;i<strlen(a);i++){
		b[i]=a[strlen(a)-i-1];
	}
}

int main(){
	char S[100];
	char Sinv[100];
	char keyence[7]="keyence";
	char keyenceinv[7]="ecneyek";
	int i,f;
	int patn=0;
	int n=0;
	
	gets(S);
	
	patn=strcspn(S,"k");
	
	if(patn==strlen(S)){
		printf("NO");
	}else if(1<=patn){
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			printf("NO");
		}
	}else{
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			inverse(S,Sinv);
			i=0;
			while(S[i]==keyence[i]){
				i++;
			}
			
			f=0;
			while(Sinv[f]==keyenceinv[f] && f<7-i){
				f++;
			}
			
			if(i+f==7)	printf("YES");
			else	printf("NO");
		}
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inverse
	.type	inverse, @function
inverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L3
	nop
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inverse, .-inverse
	.section	.rodata
.LC0:
	.string	"k"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$1702454635, -254(%rbp)
	movw	$25454, -250(%rbp)
	movb	$101, -248(%rbp)
	movl	$1701733221, -247(%rbp)
	movw	$25977, -243(%rbp)
	movb	$107, -241(%rbp)
	movl	$0, -264(%rbp)
	movl	$0, -260(%rbp)
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-240(%rbp), %rax
	leaq	.LC0(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcspn@PLT
	movl	%eax, -264(%rbp)
	movl	-264(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L5:
	cmpl	$0, -264(%rbp)
	jle	.L7
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L7:
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inverse
	movl	$0, -272(%rbp)
	jmp	.L10
.L11:
	addl	$1, -272(%rbp)
.L10:
	movl	-272(%rbp), %eax
	cltq
	movzbl	-240(%rbp,%rax), %edx
	movl	-272(%rbp), %eax
	cltq
	movzbl	-254(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -268(%rbp)
	jmp	.L12
.L14:
	addl	$1, -268(%rbp)
.L12:
	movl	-268(%rbp), %eax
	cltq
	movzbl	-128(%rbp,%rax), %edx
	movl	-268(%rbp), %eax
	cltq
	movzbl	-247(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L13
	movl	$7, %eax
	subl	-272(%rbp), %eax
	cmpl	%eax, -268(%rbp)
	jl	.L14
.L13:
	movl	-272(%rbp), %edx
	movl	-268(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L15:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	inverse
	.type	inverse, @function
inverse:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subq	$1, %rax
	subq	%rbx, %rax
	movzbl	(%r12,%rax), %eax
	movb	%al, 0(%rbp,%rbx)
	addq	$1, %rbx
.L2:
	movq	%r12, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	ja	.L3
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	inverse, .-inverse
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"k"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$25454, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$248, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movw	%dx, 13(%rsp)
	movq	%rbx, %rdi
	movl	$1702454635, 9(%rsp)
	movb	$101, 15(%rsp)
	call	gets@PLT
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	call	strcspn@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	strlen@PLT
	movslq	%ebp, %rdx
	cmpq	%rax, %rdx
	je	.L10
	leaq	9(%rsp), %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	testl	%ebp, %ebp
	jle	.L9
	testq	%rax, %rax
	je	.L10
.L11:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	testq	%rax, %rax
	jne	.L11
	leaq	128(%rsp), %rsi
	movq	%rbx, %rdi
	call	inverse
	cmpb	$107, 16(%rsp)
	jne	.L18
	movl	$1, %eax
	leaq	8(%rsp), %rsi
.L13:
	movzbl	(%rbx,%rax), %edx
	movl	%eax, %ecx
	addq	$1, %rax
	cmpb	(%rsi,%rax), %dl
	je	.L13
.L12:
	cmpb	$101, 128(%rsp)
	jne	.L10
	movl	$7, %eax
	subl	%ecx, %eax
	cmpb	$99, 129(%rsp)
	jne	.L19
	cmpl	$1, %eax
	je	.L16
	cmpb	$110, 130(%rsp)
	jne	.L20
	cmpl	$2, %eax
	je	.L16
	cmpb	$101, 131(%rsp)
	jne	.L21
	cmpl	$3, %eax
	je	.L16
	cmpb	$121, 132(%rsp)
	jne	.L22
	cmpl	$4, %eax
	je	.L16
	cmpb	$101, 133(%rsp)
	jne	.L23
	cmpl	$5, %eax
	je	.L16
	movl	$6, %eax
.L16:
	addl	%ecx, %eax
	cmpl	$7, %eax
	je	.L11
.L10:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L18:
	xorl	%ecx, %ecx
	jmp	.L12
.L19:
	movl	$1, %eax
	jmp	.L16
.L20:
	movl	$2, %eax
	jmp	.L16
.L21:
	movl	$3, %eax
	jmp	.L16
.L22:
	movl	$4, %eax
	jmp	.L16
.L23:
	movl	$5, %eax
	jmp	.L16
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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
	.p2align 4
	.globl	inverse
	.type	inverse, @function
inverse:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subq	$1, %rax
	subq	%rbx, %rax
	movzbl	(%r12,%rax), %eax
	movb	%al, 0(%rbp,%rbx)
	addq	$1, %rbx
.L2:
	movq	%r12, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	ja	.L3
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	inverse, .-inverse
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"k"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$25454, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$248, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movw	%dx, 13(%rsp)
	movq	%rbx, %rdi
	movl	$1702454635, 9(%rsp)
	movb	$101, 15(%rsp)
	call	gets@PLT
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	call	strcspn@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	strlen@PLT
	movslq	%ebp, %rdx
	cmpq	%rax, %rdx
	je	.L10
	leaq	9(%rsp), %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	testl	%ebp, %ebp
	jle	.L9
	testq	%rax, %rax
	je	.L10
.L11:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L8:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	testq	%rax, %rax
	jne	.L11
	leaq	128(%rsp), %rsi
	movq	%rbx, %rdi
	call	inverse
	cmpb	$107, 16(%rsp)
	jne	.L18
	movl	$1, %eax
	leaq	8(%rsp), %rsi
.L13:
	movzbl	(%rbx,%rax), %edx
	movl	%eax, %ecx
	addq	$1, %rax
	cmpb	(%rsi,%rax), %dl
	je	.L13
.L12:
	cmpb	$101, 128(%rsp)
	jne	.L10
	movl	$7, %eax
	subl	%ecx, %eax
	cmpb	$99, 129(%rsp)
	jne	.L19
	cmpl	$1, %eax
	je	.L16
	cmpb	$110, 130(%rsp)
	jne	.L20
	cmpl	$2, %eax
	je	.L16
	cmpb	$101, 131(%rsp)
	jne	.L21
	cmpl	$3, %eax
	je	.L16
	cmpb	$121, 132(%rsp)
	jne	.L22
	cmpl	$4, %eax
	je	.L16
	cmpb	$101, 133(%rsp)
	jne	.L23
	cmpl	$5, %eax
	je	.L16
	movl	$6, %eax
.L16:
	addl	%ecx, %eax
	cmpl	$7, %eax
	je	.L11
.L10:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L18:
	xorl	%ecx, %ecx
	jmp	.L12
.L19:
	movl	$1, %eax
	jmp	.L16
.L20:
	movl	$2, %eax
	jmp	.L16
.L21:
	movl	$3, %eax
	jmp	.L16
.L22:
	movl	$4, %eax
	jmp	.L16
.L23:
	movl	$5, %eax
	jmp	.L16
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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>

void inverse(char *a,char *b){
	int i;
	
	for(i=0;i<strlen(a);i++){
		b[i]=a[strlen(a)-i-1];
	}
}

int main(){
	char S[100];
	char Sinv[100];
	char keyence[7]="keyence";
	char keyenceinv[7]="ecneyek";
	int i,f;
	int patn=0;
	int n=0;
	
	gets(S);
	
	patn=strcspn(S,"k");
	
	if(patn==strlen(S)){
		printf("NO");
	}else if(1<=patn){
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			printf("NO");
		}
	}else{
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			inverse(S,Sinv);
			i=0;
			while(S[i]==keyence[i]){
				i++;
			}
			
			f=0;
			while(Sinv[f]==keyenceinv[f] && f<7-i){
				f++;
			}
			
			if(i+f==7)	printf("YES");
			else	printf("NO");
		}
	}
	
	return 0;
}
ecneyek
 ashkfyha
 eeyofscienck
 mnyszsbzpf
 ecneyel
 arhkfyha
 eeyofsciencj
 mnyszsb{pf
 ecleyen
 arhkyfha

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>

void inverse(char *a,char *b){
	int i;
	
	for(i=0;i<strlen(a);i++){
		b[i]=a[strlen(a)-i-1];
	}
}

int main(){
	char S[100];
	char Sinv[100];
	char keyence[7]="keyence";
	char keyenceinv[7]="ecneyek";
	int i,f;
	int patn=0;
	int n=0;
	
	gets(S);
	
	patn=strcspn(S,"k");
	
	if(patn==strlen(S)){
		printf("NO");
	}else if(1<=patn){
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			printf("NO");
		}
	}else{
		if(strstr(S,keyence)!=NULL){
			printf("YES");
		}else{
			inverse(S,Sinv);
			i=0;
			while(S[i]==keyence[i]){
				i++;
			}
			
			f=0;
			while(Sinv[f]==keyenceinv[f] && f<7-i){
				f++;
			}
			
			if(i+f==7)	printf("YES");
			else	printf("NO");
		}
	}
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inverse
	.type	inverse, @function
inverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L3
	nop
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inverse, .-inverse
	.section	.rodata
.LC0:
	.string	"k"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$1702454635, -254(%rbp)
	movw	$25454, -250(%rbp)
	movb	$101, -248(%rbp)
	movl	$1701733221, -247(%rbp)
	movw	$25977, -243(%rbp)
	movb	$107, -241(%rbp)
	movl	$0, -264(%rbp)
	movl	$0, -260(%rbp)
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-240(%rbp), %rax
	leaq	.LC0(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcspn@PLT
	movl	%eax, -264(%rbp)
	movl	-264(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L5:
	cmpl	$0, -264(%rbp)
	jle	.L7
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L7:
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inverse
	movl	$0, -272(%rbp)
	jmp	.L10
.L11:
	addl	$1, -272(%rbp)
.L10:
	movl	-272(%rbp), %eax
	cltq
	movzbl	-240(%rbp,%rax), %edx
	movl	-272(%rbp), %eax
	cltq
	movzbl	-254(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -268(%rbp)
	jmp	.L12
.L14:
	addl	$1, -268(%rbp)
.L12:
	movl	-268(%rbp), %eax
	cltq
	movzbl	-128(%rbp,%rax), %edx
	movl	-268(%rbp), %eax
	cltq
	movzbl	-247(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L13
	movl	$7, %eax
	subl	-272(%rbp), %eax
	cmpl	%eax, -268(%rbp)
	jl	.L14
.L13:
	movl	-272(%rbp), %edx
	movl	-268(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L15:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	inverse
	.type	inverse, @function
inverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movq	-48(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	addl	$1, -20(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L3
	nop
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	inverse, .-inverse
	.section	.rodata
.LC0:
	.string	"k"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$1702454635, -254(%rbp)
	movw	$25454, -250(%rbp)
	movb	$101, -248(%rbp)
	movl	$1701733221, -247(%rbp)
	movw	$25977, -243(%rbp)
	movb	$107, -241(%rbp)
	movl	$0, -264(%rbp)
	movl	$0, -260(%rbp)
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	leaq	-240(%rbp), %rax
	leaq	.LC0(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcspn@PLT
	movl	%eax, -264(%rbp)
	movl	-264(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L5:
	cmpl	$0, -264(%rbp)
	jle	.L7
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L7:
	leaq	-254(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strstr@PLT
	testq	%rax, %rax
	je	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	leaq	-128(%rbp), %rdx
	leaq	-240(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inverse
	movl	$0, -272(%rbp)
	jmp	.L10
.L11:
	addl	$1, -272(%rbp)
.L10:
	movl	-272(%rbp), %eax
	cltq
	movzbl	-240(%rbp,%rax), %edx
	movl	-272(%rbp), %eax
	cltq
	movzbl	-254(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movl	$0, -268(%rbp)
	jmp	.L12
.L14:
	addl	$1, -268(%rbp)
.L12:
	movl	-268(%rbp), %eax
	cltq
	movzbl	-128(%rbp,%rax), %edx
	movl	-268(%rbp), %eax
	cltq
	movzbl	-247(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L13
	movl	$7, %eax
	subl	-272(%rbp), %eax
	cmpl	%eax, -268(%rbp)
	jl	.L14
.L13:
	movl	-272(%rbp), %edx
	movl	-268(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L15:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
