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

```c
#include <stdio.h>
#include <math.h>
#include <stdbool.h>

int main() {
	int n,k,r,s,p;
	int ans=0;
	char t[100001]={};
	scanf("%d%d%d%d%d", &n, &k, &r, &s, &p);
	scanf("%s", t);
	int cmpt[200001]={};
	for (int i = 0; i < n; i++) {
		if(t[i]=='r')
		cmpt[i]=0;
		else if(t[i]=='s')
		cmpt[i]=1;
		else if(t[i]=='p')
		cmpt[i]=2;
	}
	for (int i = 0; i < n; i++) {
		if(cmpt[i]==cmpt[i+k]){
			cmpt[i+k]=-1;
		}
		switch (cmpt[i]) {
			case 0:
			ans+=p;
			break;
			case 1:
			ans+=r;
			break;
			case 2:
			ans+=s;
			break;
			default:
			break;
		}
	}
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-897024(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -900044(%rbp)
	movq	$0, -100016(%rbp)
	movq	$0, -100008(%rbp)
	leaq	-100000(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-900048(%rbp), %rdi
	leaq	-900052(%rbp), %rsi
	leaq	-900056(%rbp), %rcx
	leaq	-900060(%rbp), %rdx
	leaq	-900064(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-900032(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -900040(%rbp)
	jmp	.L2
.L6:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-900040(%rbp), %eax
	cltq
	movl	$0, -900032(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-900040(%rbp), %eax
	cltq
	movl	$1, -900032(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$112, %al
	jne	.L4
	movl	-900040(%rbp), %eax
	cltq
	movl	$2, -900032(%rbp,%rax,4)
.L4:
	addl	$1, -900040(%rbp)
.L2:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900040(%rbp)
	jl	.L6
	movl	$0, -900036(%rbp)
	jmp	.L7
.L14:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %edx
	movl	-900060(%rbp), %ecx
	movl	-900036(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-900060(%rbp), %edx
	movl	-900036(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	$-1, -900032(%rbp,%rax,4)
.L8:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L9
	cmpl	$2, %eax
	jg	.L17
	testl	%eax, %eax
	je	.L11
	cmpl	$1, %eax
	je	.L12
	jmp	.L17
.L11:
	movl	-900048(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L12:
	movl	-900056(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L9:
	movl	-900052(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L17:
	nop
.L13:
	addl	$1, -900036(%rbp)
.L7:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900036(%rbp)
	jl	.L14
	movl	-900044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-897024(%rsp), %r11
	.cfi_def_cfa 11, 897040
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3040, %rsp
	.cfi_def_cfa_offset 900080
	pxor	%xmm0, %xmm0
	movl	$99985, %edx
	xorl	%esi, %esi
	leaq	800064(%rsp), %rdi
	leaq	800048(%rsp), %rbx
	movq	%fs:40, %rax
	movq	%rax, 900056(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 800048(%rsp)
	call	memset@PLT
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	28(%rsp), %r9
	leaq	24(%rsp), %r8
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$800004, %edx
	leaq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	movq	%rbx, %rcx
	leaq	36(%rsp,%rdx,4), %rdi
	movq	%rax, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$115, %sil
	je	.L18
	cmpb	$112, %sil
	jne	.L4
	movl	$2, (%rdx)
.L4:
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdi, %rdx
	je	.L19
.L6:
	movzbl	(%rcx), %esi
	cmpb	$114, %sil
	jne	.L3
	movl	$0, (%rdx)
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdi, %rdx
	jne	.L6
.L19:
	movl	24(%rsp), %ebx
	movl	20(%rsp), %r11d
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	movl	28(%rsp), %r10d
	movslq	16(%rsp), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%r10), %esi
	testl	%edx, %edx
	cmove	%esi, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rdi, %rax
	je	.L2
.L11:
	movl	(%rax,%rcx,4), %edx
	cmpl	%edx, (%rax)
	cmove	%r9d, %edx
	movl	%edx, (%rax,%rcx,4)
	movl	(%rax), %edx
	cmpl	$1, %edx
	je	.L8
	cmpl	$2, %edx
	jne	.L20
	addq	$4, %rax
	addl	%ebx, %r8d
	cmpq	%rdi, %rax
	jne	.L11
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	900056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$900064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	$1, (%rdx)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	addl	%r11d, %r8d
	jmp	.L10
.L13:
	xorl	%r8d, %r8d
	jmp	.L2
.L21:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-897024(%rsp), %r11
	.cfi_def_cfa 11, 897040
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3040, %rsp
	.cfi_def_cfa_offset 900080
	pxor	%xmm0, %xmm0
	movl	$99985, %edx
	xorl	%esi, %esi
	leaq	800064(%rsp), %rdi
	leaq	800048(%rsp), %rbx
	movq	%fs:40, %rax
	movq	%rax, 900056(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 800048(%rsp)
	call	memset@PLT
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	28(%rsp), %r9
	leaq	24(%rsp), %r8
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$800004, %edx
	leaq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	movq	%rbx, %rcx
	leaq	36(%rsp,%rdx,4), %rdi
	movq	%rax, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$115, %sil
	je	.L18
	cmpb	$112, %sil
	jne	.L4
	movl	$2, (%rdx)
.L4:
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdi, %rdx
	je	.L19
.L6:
	movzbl	(%rcx), %esi
	cmpb	$114, %sil
	jne	.L3
	movl	$0, (%rdx)
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdi, %rdx
	jne	.L6
.L19:
	movl	24(%rsp), %ebx
	movl	20(%rsp), %r11d
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	movl	28(%rsp), %r10d
	movslq	16(%rsp), %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%r10), %esi
	testl	%edx, %edx
	cmove	%esi, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rdi, %rax
	je	.L2
.L11:
	movl	(%rax,%rcx,4), %edx
	cmpl	%edx, (%rax)
	cmove	%r9d, %edx
	movl	%edx, (%rax,%rcx,4)
	movl	(%rax), %edx
	cmpl	$1, %edx
	je	.L8
	cmpl	$2, %edx
	jne	.L20
	addq	$4, %rax
	addl	%ebx, %r8d
	cmpq	%rdi, %rax
	jne	.L11
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	900056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$900064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	$1, (%rdx)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	addl	%r11d, %r8d
	jmp	.L10
.L13:
	xorl	%r8d, %r8d
	jmp	.L2
.L21:
	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:

#include <stdio.h>
#include <math.h>
#include <stdbool.h>

int main() {
	int n,k,r,s,p;
	int ans=0;
	char t[100001]={};
	scanf("%d%d%d%d%d", &n, &k, &r, &s, &p);
	scanf("%s", t);
	int cmpt[200001]={};
	for (int i = 0; i < n; i++) {
		if(t[i]=='r')
		cmpt[i]=0;
		else if(t[i]=='s')
		cmpt[i]=1;
		else if(t[i]=='p')
		cmpt[i]=2;
	}
	for (int i = 0; i < n; i++) {
		if(cmpt[i]==cmpt[i+k]){
			cmpt[i+k]=-1;
		}
		switch (cmpt[i]) {
			case 0:
			ans+=p;
			break;
			case 1:
			ans+=r;
			break;
			case 2:
			ans+=s;
			break;
			default:
			break;
		}
	}
	printf("%d\n", ans);
	return 0;
}

30 6
325 234 123
rspsspspsrpspsppprpsprpssprpsr
 30 6
42 234 123
rspsspspsrpspsppprpsprpssprpsr
 30 6
30 234 123
rspsspspsrpspsppprpsprpssprpsr
 30 6
30 234 123
rspsspspsrpspsppprpsprpssprpss
 30 6
30 234 165
rspsspspsrpspsppprpsprpssprpss
 30 9
30 234 165
rspsspspsrpspsppprpsprpssprpss
 30 9
30 234 88
rspsspspsrpspsppprpsprpssprpss
 30 9
30 234 88
rrpsspspsrpspsppprpsprpssprpss
 30 9
30 234 21
rrpsspspsrpspsppprpsprpssprpss
 30 3
30 234 21
rrpsspspsrpspsppprpsprpssprpss

6328
 3498
 3378
 3255
 3465
 3135
 2904
 2962
 2694
 2502

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

```c
#include <stdio.h>
#include <math.h>
#include <stdbool.h>

int main() {
	int n,k,r,s,p;
	int ans=0;
	char t[100001]={};
	scanf("%d%d%d%d%d", &n, &k, &r, &s, &p);
	scanf("%s", t);
	int cmpt[200001]={};
	for (int i = 0; i < n; i++) {
		if(t[i]=='r')
		cmpt[i]=0;
		else if(t[i]=='s')
		cmpt[i]=1;
		else if(t[i]=='p')
		cmpt[i]=2;
	}
	for (int i = 0; i < n; i++) {
		if(cmpt[i]==cmpt[i+k]){
			cmpt[i+k]=-1;
		}
		switch (cmpt[i]) {
			case 0:
			ans+=p;
			break;
			case 1:
			ans+=r;
			break;
			case 2:
			ans+=s;
			break;
			default:
			break;
		}
	}
	printf("%d\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-897024(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -900044(%rbp)
	movq	$0, -100016(%rbp)
	movq	$0, -100008(%rbp)
	leaq	-100000(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-900048(%rbp), %rdi
	leaq	-900052(%rbp), %rsi
	leaq	-900056(%rbp), %rcx
	leaq	-900060(%rbp), %rdx
	leaq	-900064(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-900032(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -900040(%rbp)
	jmp	.L2
.L6:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-900040(%rbp), %eax
	cltq
	movl	$0, -900032(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-900040(%rbp), %eax
	cltq
	movl	$1, -900032(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$112, %al
	jne	.L4
	movl	-900040(%rbp), %eax
	cltq
	movl	$2, -900032(%rbp,%rax,4)
.L4:
	addl	$1, -900040(%rbp)
.L2:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900040(%rbp)
	jl	.L6
	movl	$0, -900036(%rbp)
	jmp	.L7
.L14:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %edx
	movl	-900060(%rbp), %ecx
	movl	-900036(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-900060(%rbp), %edx
	movl	-900036(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	$-1, -900032(%rbp,%rax,4)
.L8:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L9
	cmpl	$2, %eax
	jg	.L17
	testl	%eax, %eax
	je	.L11
	cmpl	$1, %eax
	je	.L12
	jmp	.L17
.L11:
	movl	-900048(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L12:
	movl	-900056(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L9:
	movl	-900052(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L17:
	nop
.L13:
	addl	$1, -900036(%rbp)
.L7:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900036(%rbp)
	jl	.L14
	movl	-900044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-897024(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -900044(%rbp)
	movq	$0, -100016(%rbp)
	movq	$0, -100008(%rbp)
	leaq	-100000(%rbp), %rax
	movl	$99985, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-900048(%rbp), %rdi
	leaq	-900052(%rbp), %rsi
	leaq	-900056(%rbp), %rcx
	leaq	-900060(%rbp), %rdx
	leaq	-900064(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-900032(%rbp), %rax
	movl	$800004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -900040(%rbp)
	jmp	.L2
.L6:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-900040(%rbp), %eax
	cltq
	movl	$0, -900032(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-900040(%rbp), %eax
	cltq
	movl	$1, -900032(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-900040(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	$112, %al
	jne	.L4
	movl	-900040(%rbp), %eax
	cltq
	movl	$2, -900032(%rbp,%rax,4)
.L4:
	addl	$1, -900040(%rbp)
.L2:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900040(%rbp)
	jl	.L6
	movl	$0, -900036(%rbp)
	jmp	.L7
.L14:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %edx
	movl	-900060(%rbp), %ecx
	movl	-900036(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-900060(%rbp), %edx
	movl	-900036(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	$-1, -900032(%rbp,%rax,4)
.L8:
	movl	-900036(%rbp), %eax
	cltq
	movl	-900032(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L9
	cmpl	$2, %eax
	jg	.L17
	testl	%eax, %eax
	je	.L11
	cmpl	$1, %eax
	je	.L12
	jmp	.L17
.L11:
	movl	-900048(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L12:
	movl	-900056(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L9:
	movl	-900052(%rbp), %eax
	addl	%eax, -900044(%rbp)
	jmp	.L13
.L17:
	nop
.L13:
	addl	$1, -900036(%rbp)
.L7:
	movl	-900064(%rbp), %eax
	cmpl	%eax, -900036(%rbp)
	jl	.L14
	movl	-900044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
