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<string.h>

int main(void){
  int n,i,actotal=0,watotal=0;
  int m,p[200000],ac[200000]={0},wa[200000]={0};
  char s[200000][5];
  
  scanf("%d", &n);
  scanf("%d", &m);
  for(i=0;i<m;i++){
     scanf("%d",&p[i]);
     scanf("%s",s[i]);
  }
  for(i=0;i<m;i++){
    if(strcmp(s[i],"AC")==0){
      if(ac[p[i]]==0){
        watotal += wa[p[i]];
        actotal++;
      }
      ac[p[i]]=1;
    }else{
      if(ac[p[i]]==0){
        wa[p[i]]++;
      }
    }
  }
  printf("%d %d",actotal,watotal);
  
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3399680(%rsp), %r11
	.cfi_def_cfa 11, 3399736
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$376, %rsp
	.cfi_def_cfa_offset 3400112
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 3400040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rdi
	call	memset@PLT
	movl	$800000, %edx
	leaq	1600032(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	leaq	28(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	32(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	2400032(%rsp), %r15
	movq	%rax, 8(%rsp)
	movq	%r15, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rbx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rbp,4), %rsi
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$5, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$67, 1(%r15)
	jne	.L7
	cmpb	$0, 2(%r15)
	jne	.L7
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %esi
	testl	%esi, %esi
	jne	.L8
	addl	1600032(%rsp,%rax,4), %r9d
	addl	$1, %r8d
.L8:
	movl	$1, 800032(%rsp,%rax,4)
.L9:
	addq	$4, %rbx
	addq	$5, %r15
	cmpq	%rcx, %rbx
	je	.L3
.L10:
	cmpb	$65, (%r15)
	je	.L16
.L7:
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L9
	addq	$4, %rbx
	addl	$1, 1600032(%rsp,%rax,4)
	addq	$5, %r15
	cmpq	%rcx, %rbx
	jne	.L10
.L3:
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	3400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$3400056, %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
.L5:
	.cfi_restore_state
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3399680(%rsp), %r11
	.cfi_def_cfa 11, 3399736
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$376, %rsp
	.cfi_def_cfa_offset 3400112
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 3400040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rdi
	call	memset@PLT
	movl	$800000, %edx
	leaq	1600032(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	leaq	28(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	32(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	2400032(%rsp), %r15
	movq	%rax, 8(%rsp)
	movq	%r15, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rbx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rbp,4), %rsi
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$5, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$67, 1(%r15)
	jne	.L7
	cmpb	$0, 2(%r15)
	jne	.L7
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %esi
	testl	%esi, %esi
	jne	.L8
	addl	1600032(%rsp,%rax,4), %r9d
	addl	$1, %r8d
.L8:
	movl	$1, 800032(%rsp,%rax,4)
.L9:
	addq	$4, %rbx
	addq	$5, %r15
	cmpq	%rcx, %rbx
	je	.L3
.L10:
	cmpb	$65, (%r15)
	je	.L16
.L7:
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L9
	addq	$4, %rbx
	addl	$1, 1600032(%rsp,%rax,4)
	addq	$5, %r15
	cmpq	%rcx, %rbx
	jne	.L10
.L3:
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	3400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$3400056, %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
.L5:
	.cfi_restore_state
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3399680(%rsp), %r11
	.cfi_def_cfa 11, 3399736
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$376, %rsp
	.cfi_def_cfa_offset 3400112
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 3400040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rdi
	call	memset@PLT
	movl	$800000, %edx
	leaq	1600032(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	leaq	28(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	32(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	2400032(%rsp), %r15
	movq	%rax, 8(%rsp)
	movq	%r15, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rbx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rbp,4), %rsi
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$5, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$67, 1(%r15)
	jne	.L7
	cmpb	$0, 2(%r15)
	jne	.L7
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %esi
	testl	%esi, %esi
	jne	.L8
	addl	1600032(%rsp,%rax,4), %r9d
	addl	$1, %r8d
.L8:
	movl	$1, 800032(%rsp,%rax,4)
.L9:
	addq	$4, %rbx
	addq	$5, %r15
	cmpq	%rcx, %rbx
	je	.L3
.L10:
	cmpb	$65, (%r15)
	je	.L16
.L7:
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L9
	addq	$4, %rbx
	addl	$1, 1600032(%rsp,%rax,4)
	addq	$5, %r15
	cmpq	%rcx, %rbx
	jne	.L10
.L3:
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	3400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$3400056, %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
.L5:
	.cfi_restore_state
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include<stdlib.h>
#include<string.h>

int main(void){
  int n,i,actotal=0,watotal=0;
  int m,p[200000],ac[200000]={0},wa[200000]={0};
  char s[200000][5];
  
  scanf("%d", &n);
  scanf("%d", &m);
  for(i=0;i<m;i++){
     scanf("%d",&p[i]);
     scanf("%s",s[i]);
  }
  for(i=0;i<m;i++){
    if(strcmp(s[i],"AC")==0){
      if(ac[p[i]]==0){
        watotal += wa[p[i]];
        actotal++;
      }
      ac[p[i]]=1;
    }else{
      if(ac[p[i]]==0){
        wa[p[i]]++;
      }
    }
  }
  printf("%d %d",actotal,watotal);
  
  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<string.h>

int main(void){
  int n,i,actotal=0,watotal=0;
  int m,p[200000],ac[200000]={0},wa[200000]={0};
  char s[200000][5];
  
  scanf("%d", &n);
  scanf("%d", &m);
  for(i=0;i<m;i++){
     scanf("%d",&p[i]);
     scanf("%s",s[i]);
  }
  for(i=0;i<m;i++){
    if(strcmp(s[i],"AC")==0){
      if(ac[p[i]]==0){
        watotal += wa[p[i]];
        actotal++;
      }
      ac[p[i]]=1;
    }else{
      if(ac[p[i]]==0){
        wa[p[i]]++;
      }
    }
  }
  printf("%d %d",actotal,watotal);
  
  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:

100000 3
7777 AC
7777 AC
7777 CA
 100000 3
12676 AC
7777 AC
7777 CA
 1 0
 4 5
1 WA
1 AC
2 WA
2 AC
2 WA
 4 5
1 WA
1 AC
0 WA
2 AC
2 WA
 100000 3
6234 AC
7777 AC
7777 AC
 2 0
 2 -1
 2 -2
 2 -4

1 0 2 0 0 0 2 2 2 1 2 0 0 0 0 0 0 0 0 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<string.h>

int main(void){
  int n,i,actotal=0,watotal=0;
  int m,p[200000],ac[200000]={0},wa[200000]={0};
  char s[200000][5];
  
  scanf("%d", &n);
  scanf("%d", &m);
  for(i=0;i<m;i++){
     scanf("%d",&p[i]);
     scanf("%s",s[i]);
  }
  for(i=0;i<m;i++){
    if(strcmp(s[i],"AC")==0){
      if(ac[p[i]]==0){
        watotal += wa[p[i]];
        actotal++;
      }
      ac[p[i]]=1;
    }else{
      if(ac[p[i]]==0){
        wa[p[i]]++;
      }
    }
  }
  printf("%d %d",actotal,watotal);
  
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3399680(%rsp), %r11
	.cfi_def_cfa 11, 3399736
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$376, %rsp
	.cfi_def_cfa_offset 3400112
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 3400040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rdi
	call	memset@PLT
	movl	$800000, %edx
	leaq	1600032(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	leaq	28(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	32(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	2400032(%rsp), %r15
	movq	%rax, 8(%rsp)
	movq	%r15, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rbx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rbp,4), %rsi
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$5, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$67, 1(%r15)
	jne	.L7
	cmpb	$0, 2(%r15)
	jne	.L7
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %esi
	testl	%esi, %esi
	jne	.L8
	addl	1600032(%rsp,%rax,4), %r9d
	addl	$1, %r8d
.L8:
	movl	$1, 800032(%rsp,%rax,4)
.L9:
	addq	$4, %rbx
	addq	$5, %r15
	cmpq	%rcx, %rbx
	je	.L3
.L10:
	cmpb	$65, (%r15)
	je	.L16
.L7:
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L9
	addq	$4, %rbx
	addl	$1, 1600032(%rsp,%rax,4)
	addq	$5, %r15
	cmpq	%rcx, %rbx
	jne	.L10
.L3:
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	3400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$3400056, %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
.L5:
	.cfi_restore_state
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3399680(%rsp), %r11
	.cfi_def_cfa 11, 3399736
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$376, %rsp
	.cfi_def_cfa_offset 3400112
	movl	$800000, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 3400040(%rsp)
	xorl	%eax, %eax
	leaq	800032(%rsp), %rdi
	call	memset@PLT
	movl	$800000, %edx
	leaq	1600032(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	leaq	24(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	leaq	28(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	32(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	2400032(%rsp), %r15
	movq	%rax, 8(%rsp)
	movq	%r15, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rbx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rbp,4), %rsi
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$5, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$67, 1(%r15)
	jne	.L7
	cmpb	$0, 2(%r15)
	jne	.L7
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %esi
	testl	%esi, %esi
	jne	.L8
	addl	1600032(%rsp,%rax,4), %r9d
	addl	$1, %r8d
.L8:
	movl	$1, 800032(%rsp,%rax,4)
.L9:
	addq	$4, %rbx
	addq	$5, %r15
	cmpq	%rcx, %rbx
	je	.L3
.L10:
	cmpb	$65, (%r15)
	je	.L16
.L7:
	movslq	(%rbx), %rax
	movl	800032(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L9
	addq	$4, %rbx
	addl	$1, 1600032(%rsp,%rax,4)
	addq	$5, %r15
	cmpq	%rcx, %rbx
	jne	.L10
.L3:
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	3400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$3400056, %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
.L5:
	.cfi_restore_state
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```