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

```c
#include <stdio.h>
int main(void){
    int n,q,a[100000]={0},i;
    char s[100001];
    scanf("%d %d",&n,&q);
    scanf("%s",s);
    for(i=1;i<n;i++){
        if(s[i-1]=='A' && s[i]=='C') a[i] = a[i-1]+1;
        else a[i]=a[i-1];
    }
    for(i=0;i<q;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        printf("%d\n",a[y-1]-a[x-1]);
    }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$320, %rsp
	.cfi_def_cfa_offset 500080
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 500024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	400016(%rsp), %rbp
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L2
	subl	$2, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rax
	leaq	20(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$65, (%rdx)
	je	.L13
.L3:
	movl	(%rax), %ecx
.L4:
	movl	%ecx, 4(%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L5
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%rbx, %rsi
	addl	$1, %r14d
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	8(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r14d, 4(%rsp)
	jg	.L7
.L6:
	movq	500024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$500032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmpb	$67, 1(%rdx)
	jne	.L3
	movl	(%rax), %ebx
	leal	1(%rbx), %ecx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$320, %rsp
	.cfi_def_cfa_offset 500080
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 500024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	400016(%rsp), %rbp
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L2
	subl	$2, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rax
	leaq	20(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$65, (%rdx)
	je	.L13
.L3:
	movl	(%rax), %ecx
.L4:
	movl	%ecx, 4(%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L5
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%rbx, %rsi
	addl	$1, %r14d
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	8(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r14d, 4(%rsp)
	jg	.L7
.L6:
	movq	500024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$500032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmpb	$67, 1(%rdx)
	jne	.L3
	movl	(%rax), %ebx
	leal	1(%rbx), %ecx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$320, %rsp
	.cfi_def_cfa_offset 500080
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 500024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	400016(%rsp), %rbp
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L2
	subl	$2, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rax
	leaq	20(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$65, (%rdx)
	je	.L13
.L3:
	movl	(%rax), %ecx
.L4:
	movl	%ecx, 4(%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L5
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%rbx, %rsi
	addl	$1, %r14d
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	8(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r14d, 4(%rsp)
	jg	.L7
.L6:
	movq	500024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$500032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmpb	$67, 1(%rdx)
	jne	.L3
	movl	(%rax), %ebx
	leal	1(%rbx), %ecx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include <stdio.h>
int main(void){
    int n,q,a[100000]={0},i;
    char s[100001];
    scanf("%d %d",&n,&q);
    scanf("%s",s);
    for(i=1;i<n;i++){
        if(s[i-1]=='A' && s[i]=='C') a[i] = a[i-1]+1;
        else a[i]=a[i-1];
    }
    for(i=0;i<q;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        printf("%d\n",a[y-1]-a[x-1]);
    }
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(void){
    int n,q,a[100000]={0},i;
    char s[100001];
    scanf("%d %d",&n,&q);
    scanf("%s",s);
    for(i=1;i<n;i++){
        if(s[i-1]=='A' && s[i]=='C') a[i] = a[i-1]+1;
        else a[i]=a[i-1];
    }
    for(i=0;i<q;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        printf("%d\n",a[y-1]-a[x-1]);
    }
}```

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.
Optimized Assembly Code:

8 3
ACACTACG
3 7
2 3
1 6
 8 3
GCATCACA
3 7
2 3
1 8
 8 3
ACBCTADG
3 7
2 3
1 6
 8 3
ACACTACG
3 7
2 3
1 2
 8 3
ACACTACG
3 7
4 3
1 2
 8 3
GAATCCCA
3 7
3 3
2 8
 8 3
ACACTADG
3 7
2 4
1 6
 8 2
ACBCTACG
6 7
3 3
1 6
 8 3
ACACTADG
3 7
2 4
2 6
 8 2
ACACTACG
3 7
4 5
1 2

2
0
2
 1
0
1
 0
0
1
 2
0
1
 2
-1
1
 0
0
0
 1
1
2
 1
0
 1
1
1
 2
0

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

```c
#include <stdio.h>
int main(void){
    int n,q,a[100000]={0},i;
    char s[100001];
    scanf("%d %d",&n,&q);
    scanf("%s",s);
    for(i=1;i<n;i++){
        if(s[i-1]=='A' && s[i]=='C') a[i] = a[i-1]+1;
        else a[i]=a[i-1];
    }
    for(i=0;i<q;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        printf("%d\n",a[y-1]-a[x-1]);
    }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$320, %rsp
	.cfi_def_cfa_offset 500080
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 500024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	400016(%rsp), %rbp
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L2
	subl	$2, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rax
	leaq	20(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$65, (%rdx)
	je	.L13
.L3:
	movl	(%rax), %ecx
.L4:
	movl	%ecx, 4(%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L5
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%rbx, %rsi
	addl	$1, %r14d
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	8(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r14d, 4(%rsp)
	jg	.L7
.L6:
	movq	500024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$500032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmpb	$67, 1(%rdx)
	jne	.L3
	movl	(%rax), %ebx
	leal	1(%rbx), %ecx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$320, %rsp
	.cfi_def_cfa_offset 500080
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 500024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	400016(%rsp), %rbp
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L2
	subl	$2, %ecx
	movq	%rbp, %rdx
	movq	%rbx, %rax
	leaq	20(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	cmpb	$65, (%rdx)
	je	.L13
.L3:
	movl	(%rax), %ecx
.L4:
	movl	%ecx, 4(%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L5
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movq	%rbx, %rsi
	addl	$1, %r14d
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	8(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r14d, 4(%rsp)
	jg	.L7
.L6:
	movq	500024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$500032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmpb	$67, 1(%rdx)
	jne	.L3
	movl	(%rax), %ebx
	leal	1(%rbx), %ecx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```