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 <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; }                            /* 1,2,3,4.. */
int des(const void *a, const void *b) { return *(int *)b - *(int *)a; }                            /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b) { return *(char *)a - *(char *)b; }                     /* a,b,c,d.. */
int cmp_str(const void *a, const void *b) { return strcmp(*(const char **)a, *(const char **)b); } /* aaa,aab.. */
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define rep(i, l, r) for (int i = l; i < r; i++)
#define MAX 100001
#define MOD 1000000007

typedef long long int lli;

int main(void)
{
  int n, k;
  char s[MAX];
  scanf("%d %d %s", &n, &k, s);

  int nsize = 0, nums[MAX]; // 1-0-...-0-1と並ぶ配列
  int now = 1;              // 今見ている数
  int cnt = 0;              // 今見ている数の連続して並んでいる数
  rep(i, 0, n) {
    if (s[i] == (char)('0' + now)) cnt++;
    else {
      nums[nsize++] = cnt;
      now = 1 - now;
      cnt = 1;
    }
  }
  nums[nsize++] = cnt;

  // 最後が0で終わっている場合(1-0-...1-0)
  // 最後を1で終わっている配列にする(1-0-...-0-1)
  if (nsize % 2 == 0) nums[nsize++] = 0;

  int range = 2 * k + 1;
  int ans = 0;

  for (int i = 0; i < nsize; i += 2) {
    int left  = i;
    int right = min(i + range, nsize);
    int tmp = 0;
    for (int j = left; j < right; j++) {
      tmp += nums[j];
    }
    ans = max(ans, tmp);
  }
  printf("%d\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	acs
	.type	acs, @function
acs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	acs, .-acs
	.globl	des
	.type	des, @function
des:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	des, .-des
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_str, .-cmp_str
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$384, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100016(%rbp), %rcx
	leaq	-500080(%rbp), %rdx
	leaq	-500084(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500076(%rbp)
	movl	$1, -500072(%rbp)
	movl	$0, -500068(%rbp)
	movl	$0, -500064(%rbp)
	jmp	.L10
.L13:
	movl	-500064(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movl	-500072(%rbp), %edx
	addl	$48, %edx
	cmpb	%dl, %al
	jne	.L11
	addl	$1, -500068(%rbp)
	jmp	.L12
.L11:
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	$1, %eax
	subl	-500072(%rbp), %eax
	movl	%eax, -500072(%rbp)
	movl	$1, -500068(%rbp)
.L12:
	addl	$1, -500064(%rbp)
.L10:
	movl	-500084(%rbp), %eax
	cmpl	%eax, -500064(%rbp)
	jl	.L13
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	-500076(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	$0, -500032(%rbp,%rax,4)
.L14:
	movl	-500080(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -500044(%rbp)
	movl	$0, -500060(%rbp)
	movl	$0, -500056(%rbp)
	jmp	.L15
.L18:
	movl	-500056(%rbp), %eax
	movl	%eax, -500040(%rbp)
	movl	-500056(%rbp), %edx
	movl	-500044(%rbp), %eax
	addl	%eax, %edx
	movl	-500076(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -500036(%rbp)
	movl	$0, -500052(%rbp)
	movl	-500040(%rbp), %eax
	movl	%eax, -500048(%rbp)
	jmp	.L16
.L17:
	movl	-500048(%rbp), %eax
	cltq
	movl	-500032(%rbp,%rax,4), %eax
	addl	%eax, -500052(%rbp)
	addl	$1, -500048(%rbp)
.L16:
	movl	-500048(%rbp), %eax
	cmpl	-500036(%rbp), %eax
	jl	.L17
	movl	-500060(%rbp), %edx
	movl	-500052(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -500060(%rbp)
	addl	$2, -500056(%rbp)
.L15:
	movl	-500056(%rbp), %eax
	cmpl	-500076(%rbp), %eax
	jl	.L18
	movl	-500060(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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
	.p2align 4
	.globl	acs
	.type	acs, @function
acs:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	acs, .-acs
	.p2align 4
	.globl	des
	.type	des, @function
des:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	des, .-des
	.p2align 4
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB53:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	cmp_char, .-cmp_char
	.p2align 4
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB54:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rsi
	movq	(%rdi), %rdi
	jmp	strcmp@PLT
	.cfi_endproc
.LFE54:
	.size	cmp_str, .-cmp_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499728
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$336, %rsp
	.cfi_def_cfa_offset 500064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400032(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L7
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%esi, %esi
	movl	$1, %ecx
	leaq	400033(%rsp,%rdx), %r8
	movl	$1, %r9d
	xorl	%edx, %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %ebx
	movslq	%edx, %rdi
	addq	$1, %rax
	addl	$1, %edx
	subl	%ecx, %ebx
	movl	%esi, 16(%rsp,%rdi,4)
	movl	$1, %esi
	movl	%ebx, %ecx
	cmpq	%r8, %rax
	je	.L26
.L10:
	leal	48(%rcx), %edi
	cmpb	%dil, (%rax)
	jne	.L8
	addq	$1, %rax
	addl	$1, %esi
	cmpq	%r8, %rax
	jne	.L10
.L26:
	movslq	%edx, %rax
	leal	1(%rdx), %r9d
	movl	%esi, 16(%rsp,%rax,4)
	testb	$1, %dl
	je	.L11
	movslq	%r9d, %r9
	movl	$0, 16(%rsp,%r9,4)
	leal	2(%rdx), %r9d
.L11:
	movl	12(%rsp), %eax
	leaq	16(%rsp), %r8
	xorl	%ecx, %ecx
	xorl	%r10d, %r10d
	leal	1(%rax,%rax), %r11d
	.p2align 4,,10
	.p2align 3
.L17:
	leal	(%r11,%rcx), %edx
	cmpl	%r9d, %edx
	cmovg	%r9d, %edx
	cmpl	%ecx, %edx
	jle	.L19
	movl	%edx, %edi
	subl	%ecx, %edi
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L20
	movl	%edi, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %rsi
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rsi, %rax
	jne	.L14
	movdqa	%xmm0, %xmm1
	movl	%edi, %ebx
	psrldq	$8, %xmm1
	andl	$-4, %ebx
	paddd	%xmm1, %xmm0
	leal	(%rbx,%rcx), %esi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%edi, %ebx
	je	.L12
.L13:
	movslq	%esi, %rdi
	addl	16(%rsp,%rdi,4), %eax
	leal	1(%rsi), %edi
	cmpl	%edi, %edx
	jle	.L12
	movslq	%edi, %rdi
	addl	$2, %esi
	addl	16(%rsp,%rdi,4), %eax
	cmpl	%esi, %edx
	jle	.L12
	movslq	%esi, %rsi
	addl	16(%rsp,%rsi,4), %eax
.L12:
	cmpl	%eax, %r10d
	cmovl	%eax, %r10d
	addl	$2, %ecx
	addq	$8, %r8
	cmpl	%ecx, %r9d
	jg	.L17
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	500040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$500048, %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
.L19:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L12
.L20:
	movl	%ecx, %esi
	xorl	%eax, %eax
	jmp	.L13
.L7:
	movl	$0, 16(%rsp)
	movl	$1, %r9d
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.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
	.p2align 4
	.globl	acs
	.type	acs, @function
acs:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	acs, .-acs
	.p2align 4
	.globl	des
	.type	des, @function
des:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	des, .-des
	.p2align 4
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB53:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	cmp_char, .-cmp_char
	.p2align 4
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB54:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rsi
	movq	(%rdi), %rdi
	jmp	strcmp@PLT
	.cfi_endproc
.LFE54:
	.size	cmp_str, .-cmp_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499728
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$336, %rsp
	.cfi_def_cfa_offset 500064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400032(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L7
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%esi, %esi
	movl	$1, %ecx
	leaq	400033(%rsp,%rdx), %r8
	movl	$1, %r9d
	xorl	%edx, %edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %ebx
	movslq	%edx, %rdi
	addq	$1, %rax
	addl	$1, %edx
	subl	%ecx, %ebx
	movl	%esi, 16(%rsp,%rdi,4)
	movl	$1, %esi
	movl	%ebx, %ecx
	cmpq	%r8, %rax
	je	.L26
.L10:
	leal	48(%rcx), %edi
	cmpb	%dil, (%rax)
	jne	.L8
	addq	$1, %rax
	addl	$1, %esi
	cmpq	%r8, %rax
	jne	.L10
.L26:
	movslq	%edx, %rax
	leal	1(%rdx), %r9d
	movl	%esi, 16(%rsp,%rax,4)
	testb	$1, %dl
	je	.L11
	movslq	%r9d, %r9
	movl	$0, 16(%rsp,%r9,4)
	leal	2(%rdx), %r9d
.L11:
	movl	12(%rsp), %eax
	leaq	16(%rsp), %r8
	xorl	%ecx, %ecx
	xorl	%r10d, %r10d
	leal	1(%rax,%rax), %r11d
	.p2align 4,,10
	.p2align 3
.L17:
	leal	(%r11,%rcx), %edx
	cmpl	%r9d, %edx
	cmovg	%r9d, %edx
	cmpl	%ecx, %edx
	jle	.L19
	movl	%edx, %edi
	subl	%ecx, %edi
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L20
	movl	%edi, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %rsi
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rsi, %rax
	jne	.L14
	movdqa	%xmm0, %xmm1
	movl	%edi, %ebx
	psrldq	$8, %xmm1
	andl	$-4, %ebx
	paddd	%xmm1, %xmm0
	leal	(%rbx,%rcx), %esi
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%edi, %ebx
	je	.L12
.L13:
	movslq	%esi, %rdi
	addl	16(%rsp,%rdi,4), %eax
	leal	1(%rsi), %edi
	cmpl	%edi, %edx
	jle	.L12
	movslq	%edi, %rdi
	addl	$2, %esi
	addl	16(%rsp,%rdi,4), %eax
	cmpl	%esi, %edx
	jle	.L12
	movslq	%esi, %rsi
	addl	16(%rsp,%rsi,4), %eax
.L12:
	cmpl	%eax, %r10d
	cmovl	%eax, %r10d
	addl	$2, %ecx
	addq	$8, %r8
	cmpl	%ecx, %r9d
	jg	.L17
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	500040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$500048, %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
.L19:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L12
.L20:
	movl	%ecx, %esi
	xorl	%eax, %eax
	jmp	.L13
.L7:
	movl	$0, 16(%rsp)
	movl	$1, %r9d
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.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 <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; }                            /* 1,2,3,4.. */
int des(const void *a, const void *b) { return *(int *)b - *(int *)a; }                            /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b) { return *(char *)a - *(char *)b; }                     /* a,b,c,d.. */
int cmp_str(const void *a, const void *b) { return strcmp(*(const char **)a, *(const char **)b); } /* aaa,aab.. */
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define rep(i, l, r) for (int i = l; i < r; i++)
#define MAX 100001
#define MOD 1000000007

typedef long long int lli;

int main(void)
{
  int n, k;
  char s[MAX];
  scanf("%d %d %s", &n, &k, s);

  int nsize = 0, nums[MAX]; // 1-0-...-0-1と並ぶ配列
  int now = 1;              // 今見ている数
  int cnt = 0;              // 今見ている数の連続して並んでいる数
  rep(i, 0, n) {
    if (s[i] == (char)('0' + now)) cnt++;
    else {
      nums[nsize++] = cnt;
      now = 1 - now;
      cnt = 1;
    }
  }
  nums[nsize++] = cnt;

  // 最後が0で終わっている場合(1-0-...1-0)
  // 最後を1で終わっている配列にする(1-0-...-0-1)
  if (nsize % 2 == 0) nums[nsize++] = 0;

  int range = 2 * k + 1;
  int ans = 0;

  for (int i = 0; i < nsize; i += 2) {
    int left  = i;
    int right = min(i + range, nsize);
    int tmp = 0;
    for (int j = left; j < right; j++) {
      tmp += nums[j];
    }
    ans = max(ans, tmp);
  }
  printf("%d\n", ans);
  return 0;
}

5 1
00000
 5 1
11010
 14 2
11101010110111
 5 0
11000
 5 1
01010
 1 1
0
 14 2
11101010110101
 14 2
11101000110111
 14 2
11101000111111
 14 1
11101010110111

5
 4
 8
 2
 3
 1
 7
 10
 14
 6

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 <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; }                            /* 1,2,3,4.. */
int des(const void *a, const void *b) { return *(int *)b - *(int *)a; }                            /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b) { return *(char *)a - *(char *)b; }                     /* a,b,c,d.. */
int cmp_str(const void *a, const void *b) { return strcmp(*(const char **)a, *(const char **)b); } /* aaa,aab.. */
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define rep(i, l, r) for (int i = l; i < r; i++)
#define MAX 100001
#define MOD 1000000007

typedef long long int lli;

int main(void)
{
  int n, k;
  char s[MAX];
  scanf("%d %d %s", &n, &k, s);

  int nsize = 0, nums[MAX]; // 1-0-...-0-1と並ぶ配列
  int now = 1;              // 今見ている数
  int cnt = 0;              // 今見ている数の連続して並んでいる数
  rep(i, 0, n) {
    if (s[i] == (char)('0' + now)) cnt++;
    else {
      nums[nsize++] = cnt;
      now = 1 - now;
      cnt = 1;
    }
  }
  nums[nsize++] = cnt;

  // 最後が0で終わっている場合(1-0-...1-0)
  // 最後を1で終わっている配列にする(1-0-...-0-1)
  if (nsize % 2 == 0) nums[nsize++] = 0;

  int range = 2 * k + 1;
  int ans = 0;

  for (int i = 0; i < nsize; i += 2) {
    int left  = i;
    int right = min(i + range, nsize);
    int tmp = 0;
    for (int j = left; j < right; j++) {
      tmp += nums[j];
    }
    ans = max(ans, tmp);
  }
  printf("%d\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	acs
	.type	acs, @function
acs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	acs, .-acs
	.globl	des
	.type	des, @function
des:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	des, .-des
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_str, .-cmp_str
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$384, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100016(%rbp), %rcx
	leaq	-500080(%rbp), %rdx
	leaq	-500084(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500076(%rbp)
	movl	$1, -500072(%rbp)
	movl	$0, -500068(%rbp)
	movl	$0, -500064(%rbp)
	jmp	.L10
.L13:
	movl	-500064(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movl	-500072(%rbp), %edx
	addl	$48, %edx
	cmpb	%dl, %al
	jne	.L11
	addl	$1, -500068(%rbp)
	jmp	.L12
.L11:
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	$1, %eax
	subl	-500072(%rbp), %eax
	movl	%eax, -500072(%rbp)
	movl	$1, -500068(%rbp)
.L12:
	addl	$1, -500064(%rbp)
.L10:
	movl	-500084(%rbp), %eax
	cmpl	%eax, -500064(%rbp)
	jl	.L13
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	-500076(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	$0, -500032(%rbp,%rax,4)
.L14:
	movl	-500080(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -500044(%rbp)
	movl	$0, -500060(%rbp)
	movl	$0, -500056(%rbp)
	jmp	.L15
.L18:
	movl	-500056(%rbp), %eax
	movl	%eax, -500040(%rbp)
	movl	-500056(%rbp), %edx
	movl	-500044(%rbp), %eax
	addl	%eax, %edx
	movl	-500076(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -500036(%rbp)
	movl	$0, -500052(%rbp)
	movl	-500040(%rbp), %eax
	movl	%eax, -500048(%rbp)
	jmp	.L16
.L17:
	movl	-500048(%rbp), %eax
	cltq
	movl	-500032(%rbp,%rax,4), %eax
	addl	%eax, -500052(%rbp)
	addl	$1, -500048(%rbp)
.L16:
	movl	-500048(%rbp), %eax
	cmpl	-500036(%rbp), %eax
	jl	.L17
	movl	-500060(%rbp), %edx
	movl	-500052(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -500060(%rbp)
	addl	$2, -500056(%rbp)
.L15:
	movl	-500056(%rbp), %eax
	cmpl	-500076(%rbp), %eax
	jl	.L18
	movl	-500060(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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
	.globl	acs
	.type	acs, @function
acs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	acs, .-acs
	.globl	des
	.type	des, @function
des:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	des, .-des
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_str, .-cmp_str
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$384, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100016(%rbp), %rcx
	leaq	-500080(%rbp), %rdx
	leaq	-500084(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500076(%rbp)
	movl	$1, -500072(%rbp)
	movl	$0, -500068(%rbp)
	movl	$0, -500064(%rbp)
	jmp	.L10
.L13:
	movl	-500064(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	movl	-500072(%rbp), %edx
	addl	$48, %edx
	cmpb	%dl, %al
	jne	.L11
	addl	$1, -500068(%rbp)
	jmp	.L12
.L11:
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	$1, %eax
	subl	-500072(%rbp), %eax
	movl	%eax, -500072(%rbp)
	movl	$1, -500068(%rbp)
.L12:
	addl	$1, -500064(%rbp)
.L10:
	movl	-500084(%rbp), %eax
	cmpl	%eax, -500064(%rbp)
	jl	.L13
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	-500068(%rbp), %edx
	movl	%edx, -500032(%rbp,%rax,4)
	movl	-500076(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-500076(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -500076(%rbp)
	cltq
	movl	$0, -500032(%rbp,%rax,4)
.L14:
	movl	-500080(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -500044(%rbp)
	movl	$0, -500060(%rbp)
	movl	$0, -500056(%rbp)
	jmp	.L15
.L18:
	movl	-500056(%rbp), %eax
	movl	%eax, -500040(%rbp)
	movl	-500056(%rbp), %edx
	movl	-500044(%rbp), %eax
	addl	%eax, %edx
	movl	-500076(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -500036(%rbp)
	movl	$0, -500052(%rbp)
	movl	-500040(%rbp), %eax
	movl	%eax, -500048(%rbp)
	jmp	.L16
.L17:
	movl	-500048(%rbp), %eax
	cltq
	movl	-500032(%rbp,%rax,4), %eax
	addl	%eax, -500052(%rbp)
	addl	$1, -500048(%rbp)
.L16:
	movl	-500048(%rbp), %eax
	cmpl	-500036(%rbp), %eax
	jl	.L17
	movl	-500060(%rbp), %edx
	movl	-500052(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -500060(%rbp)
	addl	$2, -500056(%rbp)
.L15:
	movl	-500056(%rbp), %eax
	cmpl	-500076(%rbp), %eax
	jl	.L18
	movl	-500060(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
