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>
#include<stdlib.h>
#include<math.h>
#include<string.h> 
typedef unsigned long long ll;

int num[100000]={0};
char ch[100000];
int main(){
    int N,sum=0,Q,K,i,l,r;
    scanf("%d%d",&N,&Q);
    scanf("%s",ch);
    num[0] =0;
    for(i=1;i<N;i++){
        if(*(ch+i)=='C'&&*(ch+i-1)=='A'){
            sum++;
        }
        *(num+i) = sum; 
    }
    Q = Q-1;
    for(i=Q;i>=0;i--){
        scanf("%d%d",&l,&r);
        printf("%d\n",*(num+r-1)-*(num+l-1));
    }

    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	ch(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	movl	$0, num(%rip)
	cmpl	$1, %ecx
	jle	.L2
	leaq	4+num(%rip), %rax
	leal	-2(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	1+ch(%rip), %rdx
	leaq	(%rcx,%rsi,4), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$67, (%rdx)
	jne	.L3
	xorl	%edi, %edi
	cmpb	$65, -1(%rdx)
	sete	%dil
	addl	%edi, %ecx
.L3:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L4
.L2:
	movl	12(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%r15d, 12(%rsp)
	testl	%r15d, %r15d
	js	.L5
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	-4+num(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx,%rdx,4), %edx
	subl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %r15d
	jnb	.L6
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ch
	.bss
	.align 32
	.type	ch, @object
	.size	ch, 100000
ch:
	.zero	100000
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 400000
num:
	.zero	400000
	.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\n"
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	ch(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	movl	$0, num(%rip)
	cmpl	$1, %ecx
	jle	.L2
	leaq	4+num(%rip), %rax
	leal	-2(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	1+ch(%rip), %rdx
	leaq	(%rcx,%rsi,4), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$67, (%rdx)
	jne	.L3
	xorl	%edi, %edi
	cmpb	$65, -1(%rdx)
	sete	%dil
	addl	%edi, %ecx
.L3:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L4
.L2:
	movl	12(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%r15d, 12(%rsp)
	testl	%r15d, %r15d
	js	.L5
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	-4+num(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx,%rdx,4), %edx
	subl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %r15d
	jnb	.L6
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ch
	.bss
	.align 32
	.type	ch, @object
	.size	ch, 100000
ch:
	.zero	100000
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 400000
num:
	.zero	400000
	.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\n"
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	ch(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	movl	$0, num(%rip)
	cmpl	$1, %ecx
	jle	.L2
	leaq	4+num(%rip), %rax
	leal	-2(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	1+ch(%rip), %rdx
	leaq	(%rcx,%rsi,4), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$67, (%rdx)
	jne	.L3
	xorl	%edi, %edi
	cmpb	$65, -1(%rdx)
	sete	%dil
	addl	%edi, %ecx
.L3:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L4
.L2:
	movl	12(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%r15d, 12(%rsp)
	testl	%r15d, %r15d
	js	.L5
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	-4+num(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx,%rdx,4), %edx
	subl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %r15d
	jnb	.L6
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ch
	.bss
	.align 32
	.type	ch, @object
	.size	ch, 100000
ch:
	.zero	100000
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 400000
num:
	.zero	400000
	.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>
#include<stdlib.h>
#include<math.h>
#include<string.h> 
typedef unsigned long long ll;

int num[100000]={0};
char ch[100000];
int main(){
    int N,sum=0,Q,K,i,l,r;
    scanf("%d%d",&N,&Q);
    scanf("%s",ch);
    num[0] =0;
    for(i=1;i<N;i++){
        if(*(ch+i)=='C'&&*(ch+i-1)=='A'){
            sum++;
        }
        *(num+i) = sum; 
    }
    Q = Q-1;
    for(i=Q;i>=0;i--){
        scanf("%d%d",&l,&r);
        printf("%d\n",*(num+r-1)-*(num+l-1));
    }

    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h> 
typedef unsigned long long ll;

int num[100000]={0};
char ch[100000];
int main(){
    int N,sum=0,Q,K,i,l,r;
    scanf("%d%d",&N,&Q);
    scanf("%s",ch);
    num[0] =0;
    for(i=1;i<N;i++){
        if(*(ch+i)=='C'&&*(ch+i-1)=='A'){
            sum++;
        }
        *(num+i) = sum; 
    }
    Q = Q-1;
    for(i=Q;i>=0;i--){
        scanf("%d%d",&l,&r);
        printf("%d\n",*(num+r-1)-*(num+l-1));
    }

    return 0;
}
```

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>
#include<stdlib.h>
#include<math.h>
#include<string.h> 
typedef unsigned long long ll;

int num[100000]={0};
char ch[100000];
int main(){
    int N,sum=0,Q,K,i,l,r;
    scanf("%d%d",&N,&Q);
    scanf("%s",ch);
    num[0] =0;
    for(i=1;i<N;i++){
        if(*(ch+i)=='C'&&*(ch+i-1)=='A'){
            sum++;
        }
        *(num+i) = sum; 
    }
    Q = Q-1;
    for(i=Q;i>=0;i--){
        scanf("%d%d",&l,&r);
        printf("%d\n",*(num+r-1)-*(num+l-1));
    }

    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	ch(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	movl	$0, num(%rip)
	cmpl	$1, %ecx
	jle	.L2
	leaq	4+num(%rip), %rax
	leal	-2(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	1+ch(%rip), %rdx
	leaq	(%rcx,%rsi,4), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$67, (%rdx)
	jne	.L3
	xorl	%edi, %edi
	cmpb	$65, -1(%rdx)
	sete	%dil
	addl	%edi, %ecx
.L3:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L4
.L2:
	movl	12(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%r15d, 12(%rsp)
	testl	%r15d, %r15d
	js	.L5
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	-4+num(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx,%rdx,4), %edx
	subl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %r15d
	jnb	.L6
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ch
	.bss
	.align 32
	.type	ch, @object
	.size	ch, 100000
ch:
	.zero	100000
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 400000
num:
	.zero	400000
	.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\n"
	.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
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	ch(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	movl	$0, num(%rip)
	cmpl	$1, %ecx
	jle	.L2
	leaq	4+num(%rip), %rax
	leal	-2(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	1+ch(%rip), %rdx
	leaq	(%rcx,%rsi,4), %rsi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$67, (%rdx)
	jne	.L3
	xorl	%edi, %edi
	cmpb	$65, -1(%rdx)
	sete	%dil
	addl	%edi, %ecx
.L3:
	movl	%ecx, (%rax)
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L4
.L2:
	movl	12(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%r15d, 12(%rsp)
	testl	%r15d, %r15d
	js	.L5
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	-4+num(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx,%rdx,4), %edx
	subl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %r15d
	jnb	.L6
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ch
	.bss
	.align 32
	.type	ch, @object
	.size	ch, 100000
ch:
	.zero	100000
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 400000
num:
	.zero	400000
	.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:
```