Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
int main(void)
{
  char a[1001];
  int i,l;
  scanf("%s",a);
  l=strlen(a);
  for(i=0;i<l;i++){
    if(a[i]=='A')
      a[i]='X';
    else if(a[i]=='B')
      a[i]='Y';
    else if(a[i]=='C')
      a[i]='Z';
    else 
      a[i]=a[i]-3;
  }
  printf("%s\n",a);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -1028(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L2
.L7:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L3
	movl	-1032(%rbp), %eax
	cltq
	movb	$88, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$66, %al
	jne	.L5
	movl	-1032(%rbp), %eax
	cltq
	movb	$89, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$67, %al
	jne	.L6
	movl	-1032(%rbp), %eax
	cltq
	movb	$90, -1024(%rbp,%rax)
	jmp	.L4
.L6:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	subl	$3, %eax
	movl	%eax, %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1024(%rbp,%rax)
.L4:
	addl	$1, -1032(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	-1028(%rbp), %eax
	jl	.L7
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	subq	$1024, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1016(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	leal	-1(%rax), %edx
	movl	%eax, %edi
	cmpl	$14, %edx
	jbe	.L10
	movl	%eax, %ecx
	movq	%rbp, %rdx
	pxor	%xmm3, %xmm3
	movdqa	.LC1(%rip), %xmm12
	shrl	$4, %ecx
	movdqa	.LC2(%rip), %xmm11
	movdqa	.LC3(%rip), %xmm10
	subl	$1, %ecx
	movdqa	.LC6(%rip), %xmm4
	movdqa	.LC4(%rip), %xmm9
	salq	$4, %rcx
	movdqa	.LC7(%rip), %xmm7
	movdqa	.LC5(%rip), %xmm8
	movdqa	.LC8(%rip), %xmm6
	movdqa	.LC9(%rip), %xmm5
	leaq	16(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rdx), %xmm1
	movdqa	%xmm4, %xmm15
	addq	$16, %rdx
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm14
	pcmpeqb	%xmm10, %xmm0
	pcmpeqb	%xmm9, %xmm14
	paddb	%xmm12, %xmm2
	psubusb	%xmm11, %xmm2
	pcmpeqb	%xmm3, %xmm2
	movdqa	%xmm0, %xmm13
	pcmpeqb	%xmm3, %xmm0
	pcmpeqb	%xmm3, %xmm2
	pand	%xmm2, %xmm13
	pand	%xmm2, %xmm0
	movdqa	%xmm8, %xmm2
	pand	%xmm14, %xmm2
	pandn	%xmm4, %xmm14
	por	%xmm2, %xmm14
	movdqa	%xmm1, %xmm2
	paddb	%xmm5, %xmm1
	pcmpeqb	%xmm7, %xmm2
	pand	%xmm0, %xmm1
	pand	%xmm2, %xmm15
	pandn	%xmm14, %xmm2
	movdqa	%xmm6, %xmm14
	por	%xmm15, %xmm2
	pand	%xmm13, %xmm14
	pandn	%xmm2, %xmm13
	por	%xmm14, %xmm13
	pandn	%xmm13, %xmm0
	por	%xmm1, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rcx
	jne	.L4
	movl	%eax, %esi
	andl	$-16, %esi
	testb	$15, %al
	je	.L2
.L3:
	movslq	%esi, %rax
	movl	$90, %r8d
	addq	%rbp, %rax
	subl	%eax, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$89, %ecx
	cmpb	$66, %dl
	je	.L8
	leal	-3(%rdx), %ecx
	cmpb	$67, %dl
	cmove	%r8d, %ecx
.L8:
	movb	%cl, (%rax)
	addq	$1, %rax
	leal	(%rsi,%rax), %edx
	cmpl	%edx, %edi
	jle	.L2
.L7:
	movzbl	(%rax), %edx
	cmpb	$65, %dl
	jne	.L6
	movl	$88, %ecx
	addq	$1, %rax
	movb	%cl, -1(%rax)
	leal	(%rsi,%rax), %edx
	cmpl	%edx, %edi
	jg	.L7
.L2:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC3:
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.align 16
.LC4:
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.align 16
.LC5:
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.align 16
.LC6:
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.align 16
.LC7:
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.align 16
.LC8:
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.align 16
.LC9:
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	subq	$1024, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1016(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	leal	-1(%rax), %edx
	movl	%eax, %edi
	cmpl	$14, %edx
	jbe	.L10
	movl	%eax, %ecx
	movq	%rbp, %rdx
	pxor	%xmm3, %xmm3
	movdqa	.LC1(%rip), %xmm12
	shrl	$4, %ecx
	movdqa	.LC2(%rip), %xmm11
	movdqa	.LC3(%rip), %xmm10
	subl	$1, %ecx
	movdqa	.LC6(%rip), %xmm4
	movdqa	.LC4(%rip), %xmm9
	salq	$4, %rcx
	movdqa	.LC7(%rip), %xmm7
	movdqa	.LC5(%rip), %xmm8
	movdqa	.LC8(%rip), %xmm6
	movdqa	.LC9(%rip), %xmm5
	leaq	16(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rdx), %xmm1
	movdqa	%xmm4, %xmm15
	addq	$16, %rdx
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm14
	pcmpeqb	%xmm10, %xmm0
	pcmpeqb	%xmm9, %xmm14
	paddb	%xmm12, %xmm2
	psubusb	%xmm11, %xmm2
	pcmpeqb	%xmm3, %xmm2
	movdqa	%xmm0, %xmm13
	pcmpeqb	%xmm3, %xmm0
	pcmpeqb	%xmm3, %xmm2
	pand	%xmm2, %xmm13
	pand	%xmm2, %xmm0
	movdqa	%xmm8, %xmm2
	pand	%xmm14, %xmm2
	pandn	%xmm4, %xmm14
	por	%xmm2, %xmm14
	movdqa	%xmm1, %xmm2
	paddb	%xmm5, %xmm1
	pcmpeqb	%xmm7, %xmm2
	pand	%xmm0, %xmm1
	pand	%xmm2, %xmm15
	pandn	%xmm14, %xmm2
	movdqa	%xmm6, %xmm14
	por	%xmm15, %xmm2
	pand	%xmm13, %xmm14
	pandn	%xmm2, %xmm13
	por	%xmm14, %xmm13
	pandn	%xmm13, %xmm0
	por	%xmm1, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rcx
	jne	.L4
	movl	%eax, %esi
	andl	$-16, %esi
	testb	$15, %al
	je	.L2
.L3:
	movslq	%esi, %rax
	movl	$90, %r8d
	addq	%rbp, %rax
	subl	%eax, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$89, %ecx
	cmpb	$66, %dl
	je	.L8
	leal	-3(%rdx), %ecx
	cmpb	$67, %dl
	cmove	%r8d, %ecx
.L8:
	movb	%cl, (%rax)
	addq	$1, %rax
	leal	(%rsi,%rax), %edx
	cmpl	%edx, %edi
	jle	.L2
.L7:
	movzbl	(%rax), %edx
	cmpb	$65, %dl
	jne	.L6
	movl	$88, %ecx
	addq	$1, %rax
	movb	%cl, -1(%rax)
	leal	(%rsi,%rax), %edx
	cmpl	%edx, %edi
	jg	.L7
.L2:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1024, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.byte	-65
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC3:
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.byte	67
	.align 16
.LC4:
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.byte	65
	.align 16
.LC5:
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.byte	88
	.align 16
.LC6:
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.byte	89
	.align 16
.LC7:
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.align 16
.LC8:
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.byte	90
	.align 16
.LC9:
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.byte	-3
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <string.h>
int main(void)
{
  char a[1001];
  int i,l;
  scanf("%s",a);
  l=strlen(a);
  for(i=0;i<l;i++){
    if(a[i]=='A')
      a[i]='X';
    else if(a[i]=='B')
      a[i]='Y';
    else if(a[i]=='C')
      a[i]='Z';
    else 
      a[i]=a[i]-3;
  }
  printf("%s\n",a);
  return 0;
}
MRL

JOI

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
int main(void)
{
  char a[1001];
  int i,l;
  scanf("%s",a);
  l=strlen(a);
  for(i=0;i<l;i++){
    if(a[i]=='A')
      a[i]='X';
    else if(a[i]=='B')
      a[i]='Y';
    else if(a[i]=='C')
      a[i]='Z';
    else 
      a[i]=a[i]-3;
  }
  printf("%s\n",a);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -1028(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L2
.L7:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L3
	movl	-1032(%rbp), %eax
	cltq
	movb	$88, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$66, %al
	jne	.L5
	movl	-1032(%rbp), %eax
	cltq
	movb	$89, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$67, %al
	jne	.L6
	movl	-1032(%rbp), %eax
	cltq
	movb	$90, -1024(%rbp,%rax)
	jmp	.L4
.L6:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	subl	$3, %eax
	movl	%eax, %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1024(%rbp,%rax)
.L4:
	addl	$1, -1032(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	-1028(%rbp), %eax
	jl	.L7
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -1028(%rbp)
	movl	$0, -1032(%rbp)
	jmp	.L2
.L7:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L3
	movl	-1032(%rbp), %eax
	cltq
	movb	$88, -1024(%rbp,%rax)
	jmp	.L4
.L3:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$66, %al
	jne	.L5
	movl	-1032(%rbp), %eax
	cltq
	movb	$89, -1024(%rbp,%rax)
	jmp	.L4
.L5:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	cmpb	$67, %al
	jne	.L6
	movl	-1032(%rbp), %eax
	cltq
	movb	$90, -1024(%rbp,%rax)
	jmp	.L4
.L6:
	movl	-1032(%rbp), %eax
	cltq
	movzbl	-1024(%rbp,%rax), %eax
	subl	$3, %eax
	movl	%eax, %edx
	movl	-1032(%rbp), %eax
	cltq
	movb	%dl, -1024(%rbp,%rax)
.L4:
	addl	$1, -1032(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	-1028(%rbp), %eax
	jl	.L7
	leaq	-1024(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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:
