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)
{
    unsigned int inputN, inputM, tmpQNum, ACCount = 0, WACount = 0;
    char result[3];
    int questionFlag[100001];
    unsigned int questionNumber[100001], tmpWACount[100001];

    scanf("%u%u", &inputN, &inputM);

    for (int index = 0; index < inputN; index++)
    {
        questionFlag[index] = 0;
        tmpWACount[index] = 0;
    }
    for (int index = 0; index < inputM; index++)
    {
        scanf("%d%s", &tmpQNum, result);
        if (questionFlag[tmpQNum - 1] == 0)
        {
            if (strcmp(result, "AC") == 0)
            {
                questionFlag[tmpQNum - 1] = 1;
            }
            else
            {
                tmpWACount[tmpQNum - 1]++;
            }
        }
    }
    for (int index = 0; index < inputN; index++)
    {
        if (questionFlag[index] == 1)
        {
            ACCount++;
            WACount += tmpWACount[index];
        }
    }

    printf("%d %d", ACCount, WACount);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%u%u"
.LC1:
	.string	"%d%s"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	movl	%ebx, %r12d
	leaq	16(%rsp), %r8
	xorl	%esi, %esi
	salq	$2, %r12
	movq	%r8, %rdi
	movq	%r12, %rdx
	call	memset@PLT
	leaq	400032(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L3
.L16:
	xorl	%ebx, %ebx
	leaq	800037(%rsp), %rbp
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	cmpb	$67, 1(%rbp)
	jne	.L6
	cmpb	$0, 2(%rbp)
	jne	.L6
	movl	$1, 16(%rsp,%rax,4)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jbe	.L25
.L7:
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	movl	16(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L4
	cmpb	$65, 0(%rbp)
	je	.L26
.L6:
	addl	$1, 400032(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	ja	.L7
.L25:
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L17
.L3:
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovne	%ebx, %esi
	cmpl	$3, %ebx
	jbe	.L19
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	movdqa	.LC2(%rip), %xmm3
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	leaq	16(%rsp), %r8
	salq	$4, %rdx
	leaq	400032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	pcmpeqd	(%r8,%rax), %xmm0
	psubd	%xmm0, %xmm1
	pand	(%rdi,%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L8
.L9:
	movslq	%eax, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L27
.L12:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jnb	.L8
	movslq	%esi, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L28
.L13:
	addl	$2, %eax
	cmpl	%ebx, %eax
	jnb	.L8
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	je	.L29
.L8:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L12
.L28:
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L13
.L29:
	addl	$1, %edx
	addl	400032(%rsp,%rax,4), %ecx
	jmp	.L8
.L2:
	cmpl	$0, 8(%rsp)
	jne	.L16
.L17:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L8
.L19:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	"%u%u"
.LC1:
	.string	"%d%s"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	movl	%ebx, %r12d
	leaq	16(%rsp), %r8
	xorl	%esi, %esi
	salq	$2, %r12
	movq	%r8, %rdi
	movq	%r12, %rdx
	call	memset@PLT
	leaq	400032(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L3
.L16:
	xorl	%ebx, %ebx
	leaq	800037(%rsp), %rbp
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	cmpb	$67, 1(%rbp)
	jne	.L6
	cmpb	$0, 2(%rbp)
	jne	.L6
	movl	$1, 16(%rsp,%rax,4)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jbe	.L25
.L7:
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	movl	16(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L4
	cmpb	$65, 0(%rbp)
	je	.L26
.L6:
	addl	$1, 400032(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	ja	.L7
.L25:
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L17
.L3:
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovne	%ebx, %esi
	cmpl	$3, %ebx
	jbe	.L19
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	movdqa	.LC2(%rip), %xmm3
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	leaq	16(%rsp), %r8
	salq	$4, %rdx
	leaq	400032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	pcmpeqd	(%r8,%rax), %xmm0
	psubd	%xmm0, %xmm1
	pand	(%rdi,%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L8
.L9:
	movslq	%eax, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L27
.L12:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jnb	.L8
	movslq	%esi, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L28
.L13:
	addl	$2, %eax
	cmpl	%ebx, %eax
	jnb	.L8
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	je	.L29
.L8:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L12
.L28:
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L13
.L29:
	addl	$1, %edx
	addl	400032(%rsp,%rax,4), %ecx
	jmp	.L8
.L2:
	cmpl	$0, 8(%rsp)
	jne	.L16
.L17:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L8
.L19:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	"%u%u"
.LC1:
	.string	"%d%s"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	movl	%ebx, %r12d
	leaq	16(%rsp), %r8
	xorl	%esi, %esi
	salq	$2, %r12
	movq	%r8, %rdi
	movq	%r12, %rdx
	call	memset@PLT
	leaq	400032(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L3
.L16:
	xorl	%ebx, %ebx
	leaq	800037(%rsp), %rbp
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	cmpb	$67, 1(%rbp)
	jne	.L6
	cmpb	$0, 2(%rbp)
	jne	.L6
	movl	$1, 16(%rsp,%rax,4)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jbe	.L25
.L7:
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	movl	16(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L4
	cmpb	$65, 0(%rbp)
	je	.L26
.L6:
	addl	$1, 400032(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	ja	.L7
.L25:
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L17
.L3:
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovne	%ebx, %esi
	cmpl	$3, %ebx
	jbe	.L19
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	movdqa	.LC2(%rip), %xmm3
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	leaq	16(%rsp), %r8
	salq	$4, %rdx
	leaq	400032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	pcmpeqd	(%r8,%rax), %xmm0
	psubd	%xmm0, %xmm1
	pand	(%rdi,%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L8
.L9:
	movslq	%eax, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L27
.L12:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jnb	.L8
	movslq	%esi, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L28
.L13:
	addl	$2, %eax
	cmpl	%ebx, %eax
	jnb	.L8
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	je	.L29
.L8:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L12
.L28:
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L13
.L29:
	addl	$1, %edx
	addl	400032(%rsp,%rax,4), %ecx
	jmp	.L8
.L2:
	cmpl	$0, 8(%rsp)
	jne	.L16
.L17:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L8
.L19:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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)
{
    unsigned int inputN, inputM, tmpQNum, ACCount = 0, WACount = 0;
    char result[3];
    int questionFlag[100001];
    unsigned int questionNumber[100001], tmpWACount[100001];

    scanf("%u%u", &inputN, &inputM);

    for (int index = 0; index < inputN; index++)
    {
        questionFlag[index] = 0;
        tmpWACount[index] = 0;
    }
    for (int index = 0; index < inputM; index++)
    {
        scanf("%d%s", &tmpQNum, result);
        if (questionFlag[tmpQNum - 1] == 0)
        {
            if (strcmp(result, "AC") == 0)
            {
                questionFlag[tmpQNum - 1] = 1;
            }
            else
            {
                tmpWACount[tmpQNum - 1]++;
            }
        }
    }
    for (int index = 0; index < inputN; index++)
    {
        if (questionFlag[index] == 1)
        {
            ACCount++;
            WACount += tmpWACount[index];
        }
    }

    printf("%d %d", ACCount, WACount);

    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)
{
    unsigned int inputN, inputM, tmpQNum, ACCount = 0, WACount = 0;
    char result[3];
    int questionFlag[100001];
    unsigned int questionNumber[100001], tmpWACount[100001];

    scanf("%u%u", &inputN, &inputM);

    for (int index = 0; index < inputN; index++)
    {
        questionFlag[index] = 0;
        tmpWACount[index] = 0;
    }
    for (int index = 0; index < inputM; index++)
    {
        scanf("%d%s", &tmpQNum, result);
        if (questionFlag[tmpQNum - 1] == 0)
        {
            if (strcmp(result, "AC") == 0)
            {
                questionFlag[tmpQNum - 1] = 1;
            }
            else
            {
                tmpWACount[tmpQNum - 1]++;
            }
        }
    }
    for (int index = 0; index < inputN; index++)
    {
        if (questionFlag[index] == 1)
        {
            ACCount++;
            WACount += tmpWACount[index];
        }
    }

    printf("%d %d", ACCount, WACount);

    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

1 0 2 0 0 0 2 2
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)
{
    unsigned int inputN, inputM, tmpQNum, ACCount = 0, WACount = 0;
    char result[3];
    int questionFlag[100001];
    unsigned int questionNumber[100001], tmpWACount[100001];

    scanf("%u%u", &inputN, &inputM);

    for (int index = 0; index < inputN; index++)
    {
        questionFlag[index] = 0;
        tmpWACount[index] = 0;
    }
    for (int index = 0; index < inputM; index++)
    {
        scanf("%d%s", &tmpQNum, result);
        if (questionFlag[tmpQNum - 1] == 0)
        {
            if (strcmp(result, "AC") == 0)
            {
                questionFlag[tmpQNum - 1] = 1;
            }
            else
            {
                tmpWACount[tmpQNum - 1]++;
            }
        }
    }
    for (int index = 0; index < inputN; index++)
    {
        if (questionFlag[index] == 1)
        {
            ACCount++;
            WACount += tmpWACount[index];
        }
    }

    printf("%d %d", ACCount, WACount);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%u%u"
.LC1:
	.string	"%d%s"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	movl	%ebx, %r12d
	leaq	16(%rsp), %r8
	xorl	%esi, %esi
	salq	$2, %r12
	movq	%r8, %rdi
	movq	%r12, %rdx
	call	memset@PLT
	leaq	400032(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L3
.L16:
	xorl	%ebx, %ebx
	leaq	800037(%rsp), %rbp
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	cmpb	$67, 1(%rbp)
	jne	.L6
	cmpb	$0, 2(%rbp)
	jne	.L6
	movl	$1, 16(%rsp,%rax,4)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jbe	.L25
.L7:
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	movl	16(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L4
	cmpb	$65, 0(%rbp)
	je	.L26
.L6:
	addl	$1, 400032(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	ja	.L7
.L25:
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L17
.L3:
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovne	%ebx, %esi
	cmpl	$3, %ebx
	jbe	.L19
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	movdqa	.LC2(%rip), %xmm3
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	leaq	16(%rsp), %r8
	salq	$4, %rdx
	leaq	400032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	pcmpeqd	(%r8,%rax), %xmm0
	psubd	%xmm0, %xmm1
	pand	(%rdi,%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L8
.L9:
	movslq	%eax, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L27
.L12:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jnb	.L8
	movslq	%esi, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L28
.L13:
	addl	$2, %eax
	cmpl	%ebx, %eax
	jnb	.L8
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	je	.L29
.L8:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L12
.L28:
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L13
.L29:
	addl	$1, %edx
	addl	400032(%rsp,%rax,4), %ecx
	jmp	.L8
.L2:
	cmpl	$0, 8(%rsp)
	jne	.L16
.L17:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L8
.L19:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	"%u%u"
.LC1:
	.string	"%d%s"
.LC3:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L2
	movl	%ebx, %r12d
	leaq	16(%rsp), %r8
	xorl	%esi, %esi
	salq	$2, %r12
	movq	%r8, %rdi
	movq	%r12, %rdx
	call	memset@PLT
	leaq	400032(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L3
.L16:
	xorl	%ebx, %ebx
	leaq	800037(%rsp), %rbp
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	cmpb	$67, 1(%rbp)
	jne	.L6
	cmpb	$0, 2(%rbp)
	jne	.L6
	movl	$1, 16(%rsp,%rax,4)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jbe	.L25
.L7:
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	movl	16(%rsp,%rax,4), %edx
	testl	%edx, %edx
	jne	.L4
	cmpb	$65, 0(%rbp)
	je	.L26
.L6:
	addl	$1, 400032(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	ja	.L7
.L25:
	movl	4(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L17
.L3:
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovne	%ebx, %esi
	cmpl	$3, %ebx
	jbe	.L19
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	movdqa	.LC2(%rip), %xmm3
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	leaq	16(%rsp), %r8
	salq	$4, %rdx
	leaq	400032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	%xmm3, %xmm0
	pcmpeqd	(%r8,%rax), %xmm0
	psubd	%xmm0, %xmm1
	pand	(%rdi,%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L8
.L9:
	movslq	%eax, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L27
.L12:
	leal	1(%rax), %esi
	cmpl	%ebx, %esi
	jnb	.L8
	movslq	%esi, %rsi
	cmpl	$1, 16(%rsp,%rsi,4)
	je	.L28
.L13:
	addl	$2, %eax
	cmpl	%ebx, %eax
	jnb	.L8
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	je	.L29
.L8:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L12
.L28:
	addl	$1, %edx
	addl	400032(%rsp,%rsi,4), %ecx
	jmp	.L13
.L29:
	addl	$1, %edx
	addl	400032(%rsp,%rax,4), %ecx
	jmp	.L8
.L2:
	cmpl	$0, 8(%rsp)
	jne	.L16
.L17:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L8
.L19:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
```