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>
int main(){
    int n,k;scanf("%d %d",&n,&k);
    int r,s,p;scanf("%d %d %d",&r,&s,&p);
    char t[200000];scanf("%s",t);

    int table[200000]={};
    for(int i=0;i<n;i++){
        if(t[i]=='r'){
            table[i]=p;
        }else if(t[i]=='s'){
            table[i]=r;
        }else{
            table[i]=s;
        }
    }
    //for(int i=0;i<n;i++)printf("%d ",table[i]);
    unsigned long long int ans=0;
    for(int i=0;i<k;i++)ans+=table[i];
    for(int i=k;i<n;i++){
        if(t[i]!=t[i-k])ans+=table[i];
        else t[i]='.';
    }
    printf("%llu\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%llu\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	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1000052(%rbp), %rdx
	leaq	-1000056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000040(%rbp), %rcx
	leaq	-1000044(%rbp), %rdx
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1000036(%rbp)
	jmp	.L2
.L6:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-1000040(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-1000048(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-1000044(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
.L4:
	addl	$1, -1000036(%rbp)
.L2:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000036(%rbp)
	jl	.L6
	movq	$0, -1000024(%rbp)
	movl	$0, -1000032(%rbp)
	jmp	.L7
.L8:
	movl	-1000032(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	addl	$1, -1000032(%rbp)
.L7:
	movl	-1000052(%rbp), %eax
	cmpl	%eax, -1000032(%rbp)
	jl	.L8
	movl	-1000052(%rbp), %eax
	movl	%eax, -1000028(%rbp)
	jmp	.L9
.L12:
	movl	-1000028(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %edx
	movl	-1000052(%rbp), %ecx
	movl	-1000028(%rbp), %eax
	subl	%ecx, %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L10
	movl	-1000028(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	jmp	.L11
.L10:
	movl	-1000028(%rbp), %eax
	cltq
	movb	$46, -200016(%rbp,%rax)
.L11:
	addl	$1, -1000028(%rbp)
.L9:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000028(%rbp)
	jl	.L12
	movq	-1000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%s"
.LC7:
	.string	"%llu\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	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999440
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$624, %rsp
	.cfi_def_cfa_offset 1000064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	leaq	800032(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rcx
	xorl	%eax, %eax
	leaq	24(%rsp), %rdx
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rdi
	movl	$800000, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	12(%rsp), %ecx
	movq	%rax, %rdi
	testl	%ecx, %ecx
	jle	.L2
	leal	-1(%rcx), %eax
	movl	24(%rsp), %r8d
	movl	20(%rsp), %esi
	movl	28(%rsp), %r10d
	cmpl	$14, %eax
	jbe	.L18
	movl	%ecx, %r9d
	movd	%r10d, %xmm5
	movd	%r8d, %xmm1
	movq	%rbx, %rdx
	shrl	$4, %r9d
	pshufd	$0, %xmm5, %xmm12
	movd	%esi, %xmm5
	movdqa	.LC3(%rip), %xmm15
	subl	$1, %r9d
	pshufd	$0, %xmm5, %xmm5
	pxor	%xmm10, %xmm10
	movq	%rdi, %rax
	salq	$4, %r9
	pshufd	$0, %xmm1, %xmm11
	pxor	%xmm9, %xmm9
	leaq	800048(%rsp,%r9), %r9
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rdx), %xmm0
	movdqa	%xmm10, %xmm2
	movdqa	%xmm12, %xmm4
	movdqa	%xmm9, %xmm13
	movdqa	%xmm5, %xmm14
	addq	$16, %rdx
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	movdqa	%xmm0, %xmm6
	paddb	.LC5(%rip), %xmm0
	pcmpeqb	%xmm15, %xmm1
	pcmpeqb	.LC4(%rip), %xmm6
	psubusb	.LC6(%rip), %xmm0
	pcmpeqb	%xmm10, %xmm0
	pcmpgtb	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	pcmpeqb	%xmm10, %xmm0
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm1
	movdqa	%xmm9, %xmm2
	pcmpgtw	%xmm3, %xmm2
	movdqa	%xmm3, %xmm8
	movdqa	%xmm1, %xmm7
	punpcklwd	%xmm2, %xmm8
	punpckhwd	%xmm2, %xmm3
	movdqa	%xmm12, %xmm2
	pand	%xmm3, %xmm2
	pandn	%xmm5, %xmm3
	pand	%xmm8, %xmm4
	por	%xmm2, %xmm3
	movdqa	%xmm9, %xmm2
	pandn	%xmm5, %xmm8
	pcmpgtw	%xmm1, %xmm2
	por	%xmm4, %xmm8
	movdqa	%xmm12, %xmm4
	punpcklwd	%xmm2, %xmm7
	punpckhwd	%xmm2, %xmm1
	movdqa	%xmm12, %xmm2
	pand	%xmm7, %xmm4
	pandn	%xmm5, %xmm7
	pand	%xmm1, %xmm2
	por	%xmm4, %xmm7
	movdqa	%xmm10, %xmm4
	pandn	%xmm5, %xmm1
	pcmpgtb	%xmm6, %xmm4
	por	%xmm2, %xmm1
	movdqa	%xmm6, %xmm2
	punpcklbw	%xmm4, %xmm2
	punpckhbw	%xmm4, %xmm6
	pcmpgtw	%xmm2, %xmm13
	movdqa	%xmm2, %xmm4
	punpcklwd	%xmm13, %xmm4
	punpckhwd	%xmm13, %xmm2
	movdqa	%xmm5, %xmm13
	pand	%xmm4, %xmm14
	pandn	%xmm8, %xmm4
	movdqa	%xmm5, %xmm8
	pand	%xmm2, %xmm8
	pandn	%xmm3, %xmm2
	movdqa	%xmm6, %xmm3
	por	%xmm8, %xmm2
	movdqa	%xmm9, %xmm8
	por	%xmm14, %xmm4
	pcmpgtw	%xmm6, %xmm8
	punpcklwd	%xmm8, %xmm3
	punpckhwd	%xmm8, %xmm6
	movdqa	%xmm9, %xmm8
	pand	%xmm3, %xmm13
	pandn	%xmm7, %xmm3
	movdqa	%xmm5, %xmm7
	pand	%xmm6, %xmm7
	pandn	%xmm1, %xmm6
	por	%xmm13, %xmm3
	movdqa	%xmm6, %xmm1
	movdqa	%xmm10, %xmm6
	movdqa	%xmm11, %xmm13
	pcmpgtb	%xmm0, %xmm6
	por	%xmm7, %xmm1
	movdqa	%xmm0, %xmm7
	punpcklbw	%xmm6, %xmm7
	punpckhbw	%xmm6, %xmm0
	pcmpgtw	%xmm7, %xmm8
	movdqa	%xmm7, %xmm6
	punpcklwd	%xmm8, %xmm6
	pand	%xmm6, %xmm13
	pandn	%xmm4, %xmm6
	movdqa	%xmm7, %xmm4
	punpckhwd	%xmm8, %xmm4
	movdqa	%xmm11, %xmm7
	movdqa	%xmm11, %xmm8
	pand	%xmm4, %xmm7
	pandn	%xmm2, %xmm4
	movdqa	%xmm0, %xmm2
	por	%xmm7, %xmm4
	movdqa	%xmm9, %xmm7
	por	%xmm13, %xmm6
	pcmpgtw	%xmm0, %xmm7
	movaps	%xmm6, -64(%rax)
	movaps	%xmm4, -48(%rax)
	punpcklwd	%xmm7, %xmm2
	punpckhwd	%xmm7, %xmm0
	pand	%xmm2, %xmm8
	pandn	%xmm3, %xmm2
	movdqa	%xmm11, %xmm3
	pand	%xmm0, %xmm3
	pandn	%xmm1, %xmm0
	por	%xmm8, %xmm2
	por	%xmm3, %xmm0
	movaps	%xmm2, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%r9, %rdx
	jne	.L4
	movl	%ecx, %eax
	andl	$-16, %eax
	testb	$15, %cl
	je	.L2
.L3:
	cltq
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$115, %dl
	movl	%esi, %edx
	cmovne	%r8d, %edx
	movl	%edx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L2
.L7:
	movzbl	(%rbx,%rax), %edx
	cmpb	$114, %dl
	jne	.L6
	movl	%r10d, %edx
	movl	%edx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L7
.L2:
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	jle	.L20
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L21
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	pxor	%xmm4, %xmm4
	movq	%rdi, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rax), %xmm0
	movdqa	%xmm4, %xmm1
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm3
	punpckhdq	%xmm1, %xmm0
	paddq	%xmm3, %xmm0
	paddq	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	testb	$3, %sil
	je	.L9
.L10:
	movslq	%eax, %r8
	movslq	32(%rsp,%r8,4), %r8
	addq	%r8, %rdx
	leal	1(%rax), %r8d
	cmpl	%esi, %r8d
	jge	.L9
	movslq	%r8d, %r8
	addl	$2, %eax
	movslq	32(%rsp,%r8,4), %r8
	addq	%r8, %rdx
	cmpl	%esi, %eax
	jge	.L9
	cltq
	movslq	32(%rsp,%rax,4), %rax
	addq	%rax, %rdx
.L9:
	cmpl	%esi, %ecx
	jle	.L13
	subl	$1, %ecx
	leaq	(%rdi,%rsi,4), %r8
	xorl	%eax, %eax
	subl	%esi, %ecx
	addq	%rbx, %rsi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	(%r8,%rax,4), %rdi
	addq	%rdi, %rdx
	leaq	1(%rax), %rdi
	cmpq	%rax, %rcx
	je	.L13
.L22:
	movq	%rdi, %rax
.L16:
	movzbl	(%rbx,%rax), %edi
	cmpb	%dil, (%rsi,%rax)
	jne	.L28
	movb	$46, (%rsi,%rax)
	leaq	1(%rax), %rdi
	cmpq	%rax, %rcx
	jne	.L22
.L13:
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1000040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1000048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L9
.L21:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L18:
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.align 16
.LC4:
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.align 16
.LC5:
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.align 16
.LC6:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%s"
.LC7:
	.string	"%llu\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	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999440
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$624, %rsp
	.cfi_def_cfa_offset 1000064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	leaq	800032(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rcx
	xorl	%eax, %eax
	leaq	24(%rsp), %rdx
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rdi
	movl	$800000, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	12(%rsp), %ecx
	movq	%rax, %rdi
	testl	%ecx, %ecx
	jle	.L2
	leal	-1(%rcx), %eax
	movl	24(%rsp), %r8d
	movl	20(%rsp), %esi
	movl	28(%rsp), %r10d
	cmpl	$14, %eax
	jbe	.L18
	movl	%ecx, %r9d
	movd	%r10d, %xmm5
	movd	%r8d, %xmm1
	movq	%rbx, %rdx
	shrl	$4, %r9d
	pshufd	$0, %xmm5, %xmm12
	movd	%esi, %xmm5
	movdqa	.LC3(%rip), %xmm15
	subl	$1, %r9d
	pshufd	$0, %xmm5, %xmm5
	pxor	%xmm10, %xmm10
	movq	%rdi, %rax
	salq	$4, %r9
	pshufd	$0, %xmm1, %xmm11
	pxor	%xmm9, %xmm9
	leaq	800048(%rsp,%r9), %r9
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	(%rdx), %xmm0
	movdqa	%xmm10, %xmm2
	movdqa	%xmm12, %xmm4
	movdqa	%xmm9, %xmm13
	movdqa	%xmm5, %xmm14
	addq	$16, %rdx
	addq	$64, %rax
	movdqa	%xmm0, %xmm1
	movdqa	%xmm0, %xmm6
	paddb	.LC5(%rip), %xmm0
	pcmpeqb	%xmm15, %xmm1
	pcmpeqb	.LC4(%rip), %xmm6
	psubusb	.LC6(%rip), %xmm0
	pcmpeqb	%xmm10, %xmm0
	pcmpgtb	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	pcmpeqb	%xmm10, %xmm0
	punpcklbw	%xmm2, %xmm3
	punpckhbw	%xmm2, %xmm1
	movdqa	%xmm9, %xmm2
	pcmpgtw	%xmm3, %xmm2
	movdqa	%xmm3, %xmm8
	movdqa	%xmm1, %xmm7
	punpcklwd	%xmm2, %xmm8
	punpckhwd	%xmm2, %xmm3
	movdqa	%xmm12, %xmm2
	pand	%xmm3, %xmm2
	pandn	%xmm5, %xmm3
	pand	%xmm8, %xmm4
	por	%xmm2, %xmm3
	movdqa	%xmm9, %xmm2
	pandn	%xmm5, %xmm8
	pcmpgtw	%xmm1, %xmm2
	por	%xmm4, %xmm8
	movdqa	%xmm12, %xmm4
	punpcklwd	%xmm2, %xmm7
	punpckhwd	%xmm2, %xmm1
	movdqa	%xmm12, %xmm2
	pand	%xmm7, %xmm4
	pandn	%xmm5, %xmm7
	pand	%xmm1, %xmm2
	por	%xmm4, %xmm7
	movdqa	%xmm10, %xmm4
	pandn	%xmm5, %xmm1
	pcmpgtb	%xmm6, %xmm4
	por	%xmm2, %xmm1
	movdqa	%xmm6, %xmm2
	punpcklbw	%xmm4, %xmm2
	punpckhbw	%xmm4, %xmm6
	pcmpgtw	%xmm2, %xmm13
	movdqa	%xmm2, %xmm4
	punpcklwd	%xmm13, %xmm4
	punpckhwd	%xmm13, %xmm2
	movdqa	%xmm5, %xmm13
	pand	%xmm4, %xmm14
	pandn	%xmm8, %xmm4
	movdqa	%xmm5, %xmm8
	pand	%xmm2, %xmm8
	pandn	%xmm3, %xmm2
	movdqa	%xmm6, %xmm3
	por	%xmm8, %xmm2
	movdqa	%xmm9, %xmm8
	por	%xmm14, %xmm4
	pcmpgtw	%xmm6, %xmm8
	punpcklwd	%xmm8, %xmm3
	punpckhwd	%xmm8, %xmm6
	movdqa	%xmm9, %xmm8
	pand	%xmm3, %xmm13
	pandn	%xmm7, %xmm3
	movdqa	%xmm5, %xmm7
	pand	%xmm6, %xmm7
	pandn	%xmm1, %xmm6
	por	%xmm13, %xmm3
	movdqa	%xmm6, %xmm1
	movdqa	%xmm10, %xmm6
	movdqa	%xmm11, %xmm13
	pcmpgtb	%xmm0, %xmm6
	por	%xmm7, %xmm1
	movdqa	%xmm0, %xmm7
	punpcklbw	%xmm6, %xmm7
	punpckhbw	%xmm6, %xmm0
	pcmpgtw	%xmm7, %xmm8
	movdqa	%xmm7, %xmm6
	punpcklwd	%xmm8, %xmm6
	pand	%xmm6, %xmm13
	pandn	%xmm4, %xmm6
	movdqa	%xmm7, %xmm4
	punpckhwd	%xmm8, %xmm4
	movdqa	%xmm11, %xmm7
	movdqa	%xmm11, %xmm8
	pand	%xmm4, %xmm7
	pandn	%xmm2, %xmm4
	movdqa	%xmm0, %xmm2
	por	%xmm7, %xmm4
	movdqa	%xmm9, %xmm7
	por	%xmm13, %xmm6
	pcmpgtw	%xmm0, %xmm7
	movaps	%xmm6, -64(%rax)
	movaps	%xmm4, -48(%rax)
	punpcklwd	%xmm7, %xmm2
	punpckhwd	%xmm7, %xmm0
	pand	%xmm2, %xmm8
	pandn	%xmm3, %xmm2
	movdqa	%xmm11, %xmm3
	pand	%xmm0, %xmm3
	pandn	%xmm1, %xmm0
	por	%xmm8, %xmm2
	por	%xmm3, %xmm0
	movaps	%xmm2, -32(%rax)
	movaps	%xmm0, -16(%rax)
	cmpq	%r9, %rdx
	jne	.L4
	movl	%ecx, %eax
	andl	$-16, %eax
	testb	$15, %cl
	je	.L2
.L3:
	cltq
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$115, %dl
	movl	%esi, %edx
	cmovne	%r8d, %edx
	movl	%edx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L2
.L7:
	movzbl	(%rbx,%rax), %edx
	cmpb	$114, %dl
	jne	.L6
	movl	%r10d, %edx
	movl	%edx, (%rdi,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L7
.L2:
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	jle	.L20
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L21
	movl	%esi, %edx
	pxor	%xmm2, %xmm2
	pxor	%xmm4, %xmm4
	movq	%rdi, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rax), %xmm0
	movdqa	%xmm4, %xmm1
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm3
	punpckhdq	%xmm1, %xmm0
	paddq	%xmm3, %xmm0
	paddq	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L11
	movdqa	%xmm2, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	testb	$3, %sil
	je	.L9
.L10:
	movslq	%eax, %r8
	movslq	32(%rsp,%r8,4), %r8
	addq	%r8, %rdx
	leal	1(%rax), %r8d
	cmpl	%esi, %r8d
	jge	.L9
	movslq	%r8d, %r8
	addl	$2, %eax
	movslq	32(%rsp,%r8,4), %r8
	addq	%r8, %rdx
	cmpl	%esi, %eax
	jge	.L9
	cltq
	movslq	32(%rsp,%rax,4), %rax
	addq	%rax, %rdx
.L9:
	cmpl	%esi, %ecx
	jle	.L13
	subl	$1, %ecx
	leaq	(%rdi,%rsi,4), %r8
	xorl	%eax, %eax
	subl	%esi, %ecx
	addq	%rbx, %rsi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	(%r8,%rax,4), %rdi
	addq	%rdi, %rdx
	leaq	1(%rax), %rdi
	cmpq	%rax, %rcx
	je	.L13
.L22:
	movq	%rdi, %rax
.L16:
	movzbl	(%rbx,%rax), %edi
	cmpb	%dil, (%rsi,%rax)
	jne	.L28
	movb	$46, (%rsi,%rax)
	leaq	1(%rax), %rdi
	cmpq	%rax, %rcx
	jne	.L22
.L13:
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1000040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1000048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L9
.L21:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L10
.L18:
	xorl	%eax, %eax
	jmp	.L3
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.byte	114
	.align 16
.LC4:
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.byte	115
	.align 16
.LC5:
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.byte	-114
	.align 16
.LC6:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	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:

#include<stdio.h>
int main(){
    int n,k;scanf("%d %d",&n,&k);
    int r,s,p;scanf("%d %d %d",&r,&s,&p);
    char t[200000];scanf("%s",t);

    int table[200000]={};
    for(int i=0;i<n;i++){
        if(t[i]=='r'){
            table[i]=p;
        }else if(t[i]=='s'){
            table[i]=r;
        }else{
            table[i]=s;
        }
    }
    //for(int i=0;i<n;i++)printf("%d ",table[i]);
    unsigned long long int ans=0;
    for(int i=0;i<k;i++)ans+=table[i];
    for(int i=k;i<n;i++){
        if(t[i]!=t[i-k])ans+=table[i];
        else t[i]='.';
    }
    printf("%llu\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>
int main(){
    int n,k;scanf("%d %d",&n,&k);
    int r,s,p;scanf("%d %d %d",&r,&s,&p);
    char t[200000];scanf("%s",t);

    int table[200000]={};
    for(int i=0;i<n;i++){
        if(t[i]=='r'){
            table[i]=p;
        }else if(t[i]=='s'){
            table[i]=r;
        }else{
            table[i]=s;
        }
    }
    //for(int i=0;i<n;i++)printf("%d ",table[i]);
    unsigned long long int ans=0;
    for(int i=0;i<k;i++)ans+=table[i];
    for(int i=k;i<n;i++){
        if(t[i]!=t[i-k])ans+=table[i];
        else t[i]='.';
    }
    printf("%llu\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%llu\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	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1000052(%rbp), %rdx
	leaq	-1000056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000040(%rbp), %rcx
	leaq	-1000044(%rbp), %rdx
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1000036(%rbp)
	jmp	.L2
.L6:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-1000040(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-1000048(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-1000044(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
.L4:
	addl	$1, -1000036(%rbp)
.L2:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000036(%rbp)
	jl	.L6
	movq	$0, -1000024(%rbp)
	movl	$0, -1000032(%rbp)
	jmp	.L7
.L8:
	movl	-1000032(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	addl	$1, -1000032(%rbp)
.L7:
	movl	-1000052(%rbp), %eax
	cmpl	%eax, -1000032(%rbp)
	jl	.L8
	movl	-1000052(%rbp), %eax
	movl	%eax, -1000028(%rbp)
	jmp	.L9
.L12:
	movl	-1000028(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %edx
	movl	-1000052(%rbp), %ecx
	movl	-1000028(%rbp), %eax
	subl	%ecx, %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L10
	movl	-1000028(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	jmp	.L11
.L10:
	movl	-1000028(%rbp), %eax
	cltq
	movb	$46, -200016(%rbp,%rax)
.L11:
	addl	$1, -1000028(%rbp)
.L9:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000028(%rbp)
	jl	.L12
	movq	-1000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%llu\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	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1000052(%rbp), %rdx
	leaq	-1000056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000040(%rbp), %rcx
	leaq	-1000044(%rbp), %rdx
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1000016(%rbp), %rax
	movl	$800000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1000036(%rbp)
	jmp	.L2
.L6:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$114, %al
	jne	.L3
	movl	-1000040(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-1000036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L5
	movl	-1000048(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
	jmp	.L4
.L5:
	movl	-1000044(%rbp), %edx
	movl	-1000036(%rbp), %eax
	cltq
	movl	%edx, -1000016(%rbp,%rax,4)
.L4:
	addl	$1, -1000036(%rbp)
.L2:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000036(%rbp)
	jl	.L6
	movq	$0, -1000024(%rbp)
	movl	$0, -1000032(%rbp)
	jmp	.L7
.L8:
	movl	-1000032(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	addl	$1, -1000032(%rbp)
.L7:
	movl	-1000052(%rbp), %eax
	cmpl	%eax, -1000032(%rbp)
	jl	.L8
	movl	-1000052(%rbp), %eax
	movl	%eax, -1000028(%rbp)
	jmp	.L9
.L12:
	movl	-1000028(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %edx
	movl	-1000052(%rbp), %ecx
	movl	-1000028(%rbp), %eax
	subl	%ecx, %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L10
	movl	-1000028(%rbp), %eax
	cltq
	movl	-1000016(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -1000024(%rbp)
	jmp	.L11
.L10:
	movl	-1000028(%rbp), %eax
	cltq
	movb	$46, -200016(%rbp,%rax)
.L11:
	addl	$1, -1000028(%rbp)
.L9:
	movl	-1000056(%rbp), %eax
	cmpl	%eax, -1000028(%rbp)
	jl	.L12
	movq	-1000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
