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>
int n,k,r,s,p,i,z=0;
char t[100001];
int main(){
    scanf("%d%d%d%d%d%s",&n,&k,&r,&s,&p,t);
    for(i=0;i<n;i++){
        if(i<k||t[i]!=t[i-k]){
            if(t[i]=='r')z+=p;
            else if(t[i]=='s')z+=r;
            else if(t[i]=='p')z+=s;
        }
        else if(t[i]==t[i-k])t[i]='n';
    }
    printf("%d",z);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d%d%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	s(%rip), %r8
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	p(%rip), %r9
	leaq	r(%rip), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 56
	pushq	%rbx
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	$0, i(%rip)
	movl	z(%rip), %r12d
	popq	%rdx
	.cfi_def_cfa_offset 48
	testl	%r8d, %r8d
	jle	.L3
	movl	z(%rip), %r12d
	movl	k(%rip), %edi
	movl	s(%rip), %ebp
	movl	r(%rip), %r11d
	movl	p(%rip), %r10d
	movl	%r12d, %esi
	testl	%edi, %edi
	jle	.L17
	cmpl	%r8d, %edi
	movl	%r8d, %r13d
	movq	%rbx, %rax
	cmovle	%edi, %r13d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmpb	$115, %cl
	je	.L26
	cmpb	$112, %cl
	jne	.L7
	addl	%ebp, %esi
	movl	$1, %r9d
.L7:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%edx, %r13d
	jle	.L27
.L8:
	movzbl	(%rax), %ecx
	cmpb	$114, %cl
	jne	.L28
	addl	$1, %edx
	addl	%r10d, %esi
	movl	$1, %r9d
	addq	$1, %rax
	cmpl	%edx, %r13d
	jg	.L8
.L27:
	cmpl	%edx, %r8d
	jle	.L15
.L4:
	movslq	%edx, %r13
	leaq	(%rbx,%r13), %rax
	movl	%edx, %ebx
	subl	%edi, %ebx
	subl	%eax, %edx
	movslq	%ebx, %rbx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$114, %cl
	je	.L29
	cmpb	$115, %cl
	je	.L30
	cmpb	$112, %cl
	jne	.L11
	addl	%ebp, %esi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jge	.L15
.L14:
	movq	%rax, %rdi
	movzbl	(%rax), %ecx
	subq	%r13, %rdi
	cmpb	(%rdi,%rbx), %cl
	jne	.L10
	movb	$110, (%rax)
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jl	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, i(%rip)
	testb	%r9b, %r9b
	je	.L3
	movl	%esi, z(%rip)
	movl	%esi, %r12d
.L3:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	addl	%r10d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 100001
t:
	.zero	100001
	.globl	z
	.align 4
	.type	z, @object
	.size	z, 4
z:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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%d%d%d%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	s(%rip), %r8
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	p(%rip), %r9
	leaq	r(%rip), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 56
	pushq	%rbx
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	$0, i(%rip)
	movl	z(%rip), %r12d
	popq	%rdx
	.cfi_def_cfa_offset 48
	testl	%r8d, %r8d
	jle	.L3
	movl	z(%rip), %r12d
	movl	k(%rip), %edi
	movl	s(%rip), %ebp
	movl	r(%rip), %r11d
	movl	p(%rip), %r10d
	movl	%r12d, %esi
	testl	%edi, %edi
	jle	.L17
	cmpl	%r8d, %edi
	movl	%r8d, %r13d
	movq	%rbx, %rax
	cmovle	%edi, %r13d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmpb	$115, %cl
	je	.L26
	cmpb	$112, %cl
	jne	.L7
	addl	%ebp, %esi
	movl	$1, %r9d
.L7:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%edx, %r13d
	jle	.L27
.L8:
	movzbl	(%rax), %ecx
	cmpb	$114, %cl
	jne	.L28
	addl	$1, %edx
	addl	%r10d, %esi
	movl	$1, %r9d
	addq	$1, %rax
	cmpl	%edx, %r13d
	jg	.L8
.L27:
	cmpl	%edx, %r8d
	jle	.L15
.L4:
	movslq	%edx, %r13
	leaq	(%rbx,%r13), %rax
	movl	%edx, %ebx
	subl	%edi, %ebx
	subl	%eax, %edx
	movslq	%ebx, %rbx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$114, %cl
	je	.L29
	cmpb	$115, %cl
	je	.L30
	cmpb	$112, %cl
	jne	.L11
	addl	%ebp, %esi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jge	.L15
.L14:
	movq	%rax, %rdi
	movzbl	(%rax), %ecx
	subq	%r13, %rdi
	cmpb	(%rdi,%rbx), %cl
	jne	.L10
	movb	$110, (%rax)
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jl	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, i(%rip)
	testb	%r9b, %r9b
	je	.L3
	movl	%esi, z(%rip)
	movl	%esi, %r12d
.L3:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	addl	%r10d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 100001
t:
	.zero	100001
	.globl	z
	.align 4
	.type	z, @object
	.size	z, 4
z:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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%d%d%d%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	s(%rip), %r8
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	p(%rip), %r9
	leaq	r(%rip), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 56
	pushq	%rbx
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	$0, i(%rip)
	movl	z(%rip), %r12d
	popq	%rdx
	.cfi_def_cfa_offset 48
	testl	%r8d, %r8d
	jle	.L3
	movl	z(%rip), %r12d
	movl	k(%rip), %edi
	movl	s(%rip), %ebp
	movl	r(%rip), %r11d
	movl	p(%rip), %r10d
	movl	%r12d, %esi
	testl	%edi, %edi
	jle	.L17
	cmpl	%r8d, %edi
	movl	%r8d, %r13d
	movq	%rbx, %rax
	cmovle	%edi, %r13d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmpb	$115, %cl
	je	.L26
	cmpb	$112, %cl
	jne	.L7
	addl	%ebp, %esi
	movl	$1, %r9d
.L7:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%edx, %r13d
	jle	.L27
.L8:
	movzbl	(%rax), %ecx
	cmpb	$114, %cl
	jne	.L28
	addl	$1, %edx
	addl	%r10d, %esi
	movl	$1, %r9d
	addq	$1, %rax
	cmpl	%edx, %r13d
	jg	.L8
.L27:
	cmpl	%edx, %r8d
	jle	.L15
.L4:
	movslq	%edx, %r13
	leaq	(%rbx,%r13), %rax
	movl	%edx, %ebx
	subl	%edi, %ebx
	subl	%eax, %edx
	movslq	%ebx, %rbx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$114, %cl
	je	.L29
	cmpb	$115, %cl
	je	.L30
	cmpb	$112, %cl
	jne	.L11
	addl	%ebp, %esi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jge	.L15
.L14:
	movq	%rax, %rdi
	movzbl	(%rax), %ecx
	subq	%r13, %rdi
	cmpb	(%rdi,%rbx), %cl
	jne	.L10
	movb	$110, (%rax)
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jl	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, i(%rip)
	testb	%r9b, %r9b
	je	.L3
	movl	%esi, z(%rip)
	movl	%esi, %r12d
.L3:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	addl	%r10d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 100001
t:
	.zero	100001
	.globl	z
	.align 4
	.type	z, @object
	.size	z, 4
z:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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>
int n,k,r,s,p,i,z=0;
char t[100001];
int main(){
    scanf("%d%d%d%d%d%s",&n,&k,&r,&s,&p,t);
    for(i=0;i<n;i++){
        if(i<k||t[i]!=t[i-k]){
            if(t[i]=='r')z+=p;
            else if(t[i]=='s')z+=r;
            else if(t[i]=='p')z+=s;
        }
        else if(t[i]==t[i-k])t[i]='n';
    }
    printf("%d",z);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int n,k,r,s,p,i,z=0;
char t[100001];
int main(){
    scanf("%d%d%d%d%d%s",&n,&k,&r,&s,&p,t);
    for(i=0;i<n;i++){
        if(i<k||t[i]!=t[i-k]){
            if(t[i]=='r')z+=p;
            else if(t[i]=='s')z+=r;
            else if(t[i]=='p')z+=s;
        }
        else if(t[i]==t[i-k])t[i]='n';
    }
    printf("%d",z);
    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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int n,k,r,s,p,i,z=0;
char t[100001];
int main(){
    scanf("%d%d%d%d%d%s",&n,&k,&r,&s,&p,t);
    for(i=0;i<n;i++){
        if(i<k||t[i]!=t[i-k]){
            if(t[i]=='r')z+=p;
            else if(t[i]=='s')z+=r;
            else if(t[i]=='p')z+=s;
        }
        else if(t[i]==t[i-k])t[i]='n';
    }
    printf("%d",z);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d%d%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	s(%rip), %r8
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	p(%rip), %r9
	leaq	r(%rip), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 56
	pushq	%rbx
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	$0, i(%rip)
	movl	z(%rip), %r12d
	popq	%rdx
	.cfi_def_cfa_offset 48
	testl	%r8d, %r8d
	jle	.L3
	movl	z(%rip), %r12d
	movl	k(%rip), %edi
	movl	s(%rip), %ebp
	movl	r(%rip), %r11d
	movl	p(%rip), %r10d
	movl	%r12d, %esi
	testl	%edi, %edi
	jle	.L17
	cmpl	%r8d, %edi
	movl	%r8d, %r13d
	movq	%rbx, %rax
	cmovle	%edi, %r13d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmpb	$115, %cl
	je	.L26
	cmpb	$112, %cl
	jne	.L7
	addl	%ebp, %esi
	movl	$1, %r9d
.L7:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%edx, %r13d
	jle	.L27
.L8:
	movzbl	(%rax), %ecx
	cmpb	$114, %cl
	jne	.L28
	addl	$1, %edx
	addl	%r10d, %esi
	movl	$1, %r9d
	addq	$1, %rax
	cmpl	%edx, %r13d
	jg	.L8
.L27:
	cmpl	%edx, %r8d
	jle	.L15
.L4:
	movslq	%edx, %r13
	leaq	(%rbx,%r13), %rax
	movl	%edx, %ebx
	subl	%edi, %ebx
	subl	%eax, %edx
	movslq	%ebx, %rbx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$114, %cl
	je	.L29
	cmpb	$115, %cl
	je	.L30
	cmpb	$112, %cl
	jne	.L11
	addl	%ebp, %esi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jge	.L15
.L14:
	movq	%rax, %rdi
	movzbl	(%rax), %ecx
	subq	%r13, %rdi
	cmpb	(%rdi,%rbx), %cl
	jne	.L10
	movb	$110, (%rax)
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jl	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, i(%rip)
	testb	%r9b, %r9b
	je	.L3
	movl	%esi, z(%rip)
	movl	%esi, %r12d
.L3:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	addl	%r10d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 100001
t:
	.zero	100001
	.globl	z
	.align 4
	.type	z, @object
	.size	z, 4
z:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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%d%d%d%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	s(%rip), %r8
	xorl	%eax, %eax
	leaq	k(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	p(%rip), %r9
	leaq	r(%rip), %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 56
	pushq	%rbx
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r8d
	popq	%rax
	.cfi_def_cfa_offset 56
	movl	$0, i(%rip)
	movl	z(%rip), %r12d
	popq	%rdx
	.cfi_def_cfa_offset 48
	testl	%r8d, %r8d
	jle	.L3
	movl	z(%rip), %r12d
	movl	k(%rip), %edi
	movl	s(%rip), %ebp
	movl	r(%rip), %r11d
	movl	p(%rip), %r10d
	movl	%r12d, %esi
	testl	%edi, %edi
	jle	.L17
	cmpl	%r8d, %edi
	movl	%r8d, %r13d
	movq	%rbx, %rax
	cmovle	%edi, %r13d
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmpb	$115, %cl
	je	.L26
	cmpb	$112, %cl
	jne	.L7
	addl	%ebp, %esi
	movl	$1, %r9d
.L7:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%edx, %r13d
	jle	.L27
.L8:
	movzbl	(%rax), %ecx
	cmpb	$114, %cl
	jne	.L28
	addl	$1, %edx
	addl	%r10d, %esi
	movl	$1, %r9d
	addq	$1, %rax
	cmpl	%edx, %r13d
	jg	.L8
.L27:
	cmpl	%edx, %r8d
	jle	.L15
.L4:
	movslq	%edx, %r13
	leaq	(%rbx,%r13), %rax
	movl	%edx, %ebx
	subl	%edi, %ebx
	subl	%eax, %edx
	movslq	%ebx, %rbx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$114, %cl
	je	.L29
	cmpb	$115, %cl
	je	.L30
	cmpb	$112, %cl
	jne	.L11
	addl	%ebp, %esi
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jge	.L15
.L14:
	movq	%rax, %rdi
	movzbl	(%rax), %ecx
	subq	%r13, %rdi
	cmpb	(%rdi,%rbx), %cl
	jne	.L10
	movb	$110, (%rax)
	addq	$1, %rax
	leal	(%rdx,%rax), %ecx
	cmpl	%r8d, %ecx
	jl	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, i(%rip)
	testb	%r9b, %r9b
	je	.L3
	movl	%esi, z(%rip)
	movl	%esi, %r12d
.L3:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	addl	%r10d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	addl	%r11d, %esi
	movl	$1, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 100001
t:
	.zero	100001
	.globl	z
	.align 4
	.type	z, @object
	.size	z, 4
z:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:
```