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

int main(void){
  int n , m;
  scanf("%d %d",&n,&m);

  int  p[100001] = {0} , t , ac = 0 ,wa = 0;
  char s[100001][2];

  for(int i = 0;i < m;i ++){
    scanf("%d %s",&t ,s[i]);
    if(p[t] >= 0 && p[t] != 1000000){
      if(s[i][0] == 'W'){
        p[t] ++;
      }
      else{
        wa += p[t];
        ac ++;
        p[t] = 1000000;
      }
    }
  }
  for(int i = 1;i <= 100000;i ++){
    if(p[i] < 0){
      wa -= p[i];
    }
    else if(p[i] > 0){
      wa += 0;

    }
  }
 
  printf("%d %d\n",ac,wa);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %s"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2040, %rsp
	.cfi_def_cfa_offset 600112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	200032(%rsp), %rdi
	movl	$400004, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r15d, %r15d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1000000, 200032(%rsp,%rdx,4)
	addl	%eax, %ebp
	addl	$1, %r12d
.L3:
	addl	$1, %r15d
	addq	$2, %rbx
	cmpl	%r15d, 8(%rsp)
	jle	.L2
.L5:
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdx
	movl	200032(%rsp,%rdx,4), %eax
	testl	%eax, %eax
	js	.L3
	cmpl	$1000000, %eax
	je	.L3
	cmpb	$87, (%rbx)
	jne	.L4
	addl	$1, %eax
	addl	$1, %r15d
	addq	$2, %rbx
	movl	%eax, 200032(%rsp,%rdx,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L5
.L2:
	pxor	%xmm1, %xmm1
	leaq	200036(%rsp), %rax
	leaq	600036(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm0
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	psrldq	$8, %xmm0
	leaq	.LC2(%rip), %rsi
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ebp, %ecx
	call	__printf_chk@PLT
	movq	600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$600056, %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
.L8:
	.cfi_restore_state
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d %s"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2040, %rsp
	.cfi_def_cfa_offset 600112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	200032(%rsp), %rdi
	movl	$400004, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r15d, %r15d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1000000, 200032(%rsp,%rdx,4)
	addl	%eax, %ebp
	addl	$1, %r12d
.L3:
	addl	$1, %r15d
	addq	$2, %rbx
	cmpl	%r15d, 8(%rsp)
	jle	.L2
.L5:
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdx
	movl	200032(%rsp,%rdx,4), %eax
	testl	%eax, %eax
	js	.L3
	cmpl	$1000000, %eax
	je	.L3
	cmpb	$87, (%rbx)
	jne	.L4
	addl	$1, %eax
	addl	$1, %r15d
	addq	$2, %rbx
	movl	%eax, 200032(%rsp,%rdx,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L5
.L2:
	pxor	%xmm1, %xmm1
	leaq	200036(%rsp), %rax
	leaq	600036(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm0
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	psrldq	$8, %xmm0
	leaq	.LC2(%rip), %rsi
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ebp, %ecx
	call	__printf_chk@PLT
	movq	600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$600056, %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
.L8:
	.cfi_restore_state
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d %s"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2040, %rsp
	.cfi_def_cfa_offset 600112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	200032(%rsp), %rdi
	movl	$400004, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r15d, %r15d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1000000, 200032(%rsp,%rdx,4)
	addl	%eax, %ebp
	addl	$1, %r12d
.L3:
	addl	$1, %r15d
	addq	$2, %rbx
	cmpl	%r15d, 8(%rsp)
	jle	.L2
.L5:
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdx
	movl	200032(%rsp,%rdx,4), %eax
	testl	%eax, %eax
	js	.L3
	cmpl	$1000000, %eax
	je	.L3
	cmpb	$87, (%rbx)
	jne	.L4
	addl	$1, %eax
	addl	$1, %r15d
	addq	$2, %rbx
	movl	%eax, 200032(%rsp,%rdx,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L5
.L2:
	pxor	%xmm1, %xmm1
	leaq	200036(%rsp), %rax
	leaq	600036(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm0
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	psrldq	$8, %xmm0
	leaq	.LC2(%rip), %rsi
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ebp, %ecx
	call	__printf_chk@PLT
	movq	600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$600056, %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
.L8:
	.cfi_restore_state
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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<string.h>

int main(void){
  int n , m;
  scanf("%d %d",&n,&m);

  int  p[100001] = {0} , t , ac = 0 ,wa = 0;
  char s[100001][2];

  for(int i = 0;i < m;i ++){
    scanf("%d %s",&t ,s[i]);
    if(p[t] >= 0 && p[t] != 1000000){
      if(s[i][0] == 'W'){
        p[t] ++;
      }
      else{
        wa += p[t];
        ac ++;
        p[t] = 1000000;
      }
    }
  }
  for(int i = 1;i <= 100000;i ++){
    if(p[i] < 0){
      wa -= p[i];
    }
    else if(p[i] > 0){
      wa += 0;

    }
  }
 
  printf("%d %d\n",ac,wa);

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

int main(void){
  int n , m;
  scanf("%d %d",&n,&m);

  int  p[100001] = {0} , t , ac = 0 ,wa = 0;
  char s[100001][2];

  for(int i = 0;i < m;i ++){
    scanf("%d %s",&t ,s[i]);
    if(p[t] >= 0 && p[t] != 1000000){
      if(s[i][0] == 'W'){
        p[t] ++;
      }
      else{
        wa += p[t];
        ac ++;
        p[t] = 1000000;
      }
    }
  }
  for(int i = 1;i <= 100000;i ++){
    if(p[i] < 0){
      wa -= p[i];
    }
    else if(p[i] > 0){
      wa += 0;

    }
  }
 
  printf("%d %d\n",ac,wa);

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

int main(void){
  int n , m;
  scanf("%d %d",&n,&m);

  int  p[100001] = {0} , t , ac = 0 ,wa = 0;
  char s[100001][2];

  for(int i = 0;i < m;i ++){
    scanf("%d %s",&t ,s[i]);
    if(p[t] >= 0 && p[t] != 1000000){
      if(s[i][0] == 'W'){
        p[t] ++;
      }
      else{
        wa += p[t];
        ac ++;
        p[t] = 1000000;
      }
    }
  }
  for(int i = 1;i <= 100000;i ++){
    if(p[i] < 0){
      wa -= p[i];
    }
    else if(p[i] > 0){
      wa += 0;

    }
  }
 
  printf("%d %d\n",ac,wa);

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %s"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2040, %rsp
	.cfi_def_cfa_offset 600112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	200032(%rsp), %rdi
	movl	$400004, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r15d, %r15d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1000000, 200032(%rsp,%rdx,4)
	addl	%eax, %ebp
	addl	$1, %r12d
.L3:
	addl	$1, %r15d
	addq	$2, %rbx
	cmpl	%r15d, 8(%rsp)
	jle	.L2
.L5:
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdx
	movl	200032(%rsp,%rdx,4), %eax
	testl	%eax, %eax
	js	.L3
	cmpl	$1000000, %eax
	je	.L3
	cmpb	$87, (%rbx)
	jne	.L4
	addl	$1, %eax
	addl	$1, %r15d
	addq	$2, %rbx
	movl	%eax, 200032(%rsp,%rdx,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L5
.L2:
	pxor	%xmm1, %xmm1
	leaq	200036(%rsp), %rax
	leaq	600036(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm0
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	psrldq	$8, %xmm0
	leaq	.LC2(%rip), %rsi
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ebp, %ecx
	call	__printf_chk@PLT
	movq	600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$600056, %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
.L8:
	.cfi_restore_state
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d %s"
.LC2:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-598016(%rsp), %r11
	.cfi_def_cfa 11, 598072
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2040, %rsp
	.cfi_def_cfa_offset 600112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 600040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	200032(%rsp), %rdi
	movl	$400004, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r15d, %r15d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$1000000, 200032(%rsp,%rdx,4)
	addl	%eax, %ebp
	addl	$1, %r12d
.L3:
	addl	$1, %r15d
	addq	$2, %rbx
	cmpl	%r15d, 8(%rsp)
	jle	.L2
.L5:
	movq	%rbx, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdx
	movl	200032(%rsp,%rdx,4), %eax
	testl	%eax, %eax
	js	.L3
	cmpl	$1000000, %eax
	je	.L3
	cmpb	$87, (%rbx)
	jne	.L4
	addl	$1, %eax
	addl	$1, %r15d
	addq	$2, %rbx
	movl	%eax, 200032(%rsp,%rdx,4)
	cmpl	%r15d, 8(%rsp)
	jg	.L5
.L2:
	pxor	%xmm1, %xmm1
	leaq	200036(%rsp), %rax
	leaq	600036(%rsp), %rdx
	movdqa	%xmm1, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rax), %xmm0
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L6
	movdqa	%xmm1, %xmm0
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	psrldq	$8, %xmm0
	leaq	.LC2(%rip), %rsi
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ebp, %ecx
	call	__printf_chk@PLT
	movq	600040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$600056, %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
.L8:
	.cfi_restore_state
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```