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 main()
{
	int N, K;
	char S[100001];
	scanf("%d %d", &N, &K);
	scanf("%s", S);
	
	int i, j, k, l[50001] = {}, r[50001] = {};
	for (i = 0, k = 0; i < N; ) {
		for (; S[i] == '0'; i++);
		l[++k] = i;
		for (; S[i] == '1'; i++);
		r[k] = i;
	}
	
	if (k <= K) {
		printf("%d\n", N);
		fflush(stdout);
		return 0;
	}

	int max = 0;
	for (i = 0; i <= k - K; i++) if (r[i+K] - l[i] > max) max = r[i+K] - l[i];
	printf("%d\n", max);
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	-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	$352, %rsp
	.cfi_def_cfa_offset 500080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	400048(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	200032(%rsp), %r9
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%r9, %rdi
	call	memset@PLT
	movl	8(%rsp), %r10d
	movq	%rax, %r9
	testl	%r10d, %r10d
	jle	.L18
	movzbl	400048(%rsp), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	leaq	400047(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rcx), %eax
	cltq
	cmpb	$48, %dl
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$48, %dl
	je	.L4
.L8:
	movl	%ecx, (%rbx,%rdi,4)
	movl	%edi, %r8d
	cmpb	$49, %dl
	jne	.L5
	addl	$1, %ecx
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$49, %dl
	je	.L6
.L5:
	movl	%ecx, (%r9,%rdi,4)
	addq	$1, %rdi
	cmpl	%ecx, %r10d
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	cmpl	%r8d, %esi
	jge	.L9
	subl	%esi, %r8d
	js	.L29
	leal	1(%r8), %edi
	cmpl	$2, %r8d
	jle	.L19
	movl	%edi, %edx
	movslq	%esi, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	(%r9,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rcx,%rax), %xmm0
	psubd	(%rbx,%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L14
	movdqa	%xmm2, %xmm1
	movl	%edi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andb	$3, %dil
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	je	.L11
.L13:
	leal	(%rcx,%rsi), %eax
	movslq	%ecx, %rdi
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jl	.L11
	leal	(%rsi,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	200032(%rsp,%rdi,4), %edi
	subl	16(%rsp,%rax,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jl	.L11
	leal	(%rsi,%rcx), %eax
	movslq	%ecx, %rcx
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L11:
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	500056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$500064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	%r10d, %edx
	jmp	.L11
.L18:
	xorl	%r8d, %r8d
	jmp	.L2
.L29:
	xorl	%edx, %edx
	jmp	.L11
.L19:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L13
.L30:
	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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%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	-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	$352, %rsp
	.cfi_def_cfa_offset 500080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	400048(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	200032(%rsp), %r9
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%r9, %rdi
	call	memset@PLT
	movl	8(%rsp), %r10d
	movq	%rax, %r9
	testl	%r10d, %r10d
	jle	.L18
	movzbl	400048(%rsp), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	leaq	400047(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rcx), %eax
	cltq
	cmpb	$48, %dl
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$48, %dl
	je	.L4
.L8:
	movl	%ecx, (%rbx,%rdi,4)
	movl	%edi, %r8d
	cmpb	$49, %dl
	jne	.L5
	addl	$1, %ecx
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$49, %dl
	je	.L6
.L5:
	movl	%ecx, (%r9,%rdi,4)
	addq	$1, %rdi
	cmpl	%ecx, %r10d
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	cmpl	%r8d, %esi
	jge	.L9
	subl	%esi, %r8d
	js	.L29
	leal	1(%r8), %edi
	cmpl	$2, %r8d
	jle	.L19
	movl	%edi, %edx
	movslq	%esi, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	(%r9,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rcx,%rax), %xmm0
	psubd	(%rbx,%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L14
	movdqa	%xmm2, %xmm1
	movl	%edi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andb	$3, %dil
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	je	.L11
.L13:
	leal	(%rcx,%rsi), %eax
	movslq	%ecx, %rdi
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jl	.L11
	leal	(%rsi,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	200032(%rsp,%rdi,4), %edi
	subl	16(%rsp,%rax,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jl	.L11
	leal	(%rsi,%rcx), %eax
	movslq	%ecx, %rcx
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L11:
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	500056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$500064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	%r10d, %edx
	jmp	.L11
.L18:
	xorl	%r8d, %r8d
	jmp	.L2
.L29:
	xorl	%edx, %edx
	jmp	.L11
.L19:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L13
.L30:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	-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	$352, %rsp
	.cfi_def_cfa_offset 500080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	400048(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	200032(%rsp), %r9
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%r9, %rdi
	call	memset@PLT
	movl	8(%rsp), %r10d
	movq	%rax, %r9
	testl	%r10d, %r10d
	jle	.L18
	movzbl	400048(%rsp), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	leaq	400047(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rcx), %eax
	cltq
	cmpb	$48, %dl
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$48, %dl
	je	.L4
.L8:
	movl	%ecx, (%rbx,%rdi,4)
	movl	%edi, %r8d
	cmpb	$49, %dl
	jne	.L5
	addl	$1, %ecx
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$49, %dl
	je	.L6
.L5:
	movl	%ecx, (%r9,%rdi,4)
	addq	$1, %rdi
	cmpl	%ecx, %r10d
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	cmpl	%r8d, %esi
	jge	.L9
	subl	%esi, %r8d
	js	.L29
	leal	1(%r8), %edi
	cmpl	$2, %r8d
	jle	.L19
	movl	%edi, %edx
	movslq	%esi, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	(%r9,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rcx,%rax), %xmm0
	psubd	(%rbx,%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L14
	movdqa	%xmm2, %xmm1
	movl	%edi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andb	$3, %dil
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	je	.L11
.L13:
	leal	(%rcx,%rsi), %eax
	movslq	%ecx, %rdi
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jl	.L11
	leal	(%rsi,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	200032(%rsp,%rdi,4), %edi
	subl	16(%rsp,%rax,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jl	.L11
	leal	(%rsi,%rcx), %eax
	movslq	%ecx, %rcx
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L11:
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	500056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$500064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	%r10d, %edx
	jmp	.L11
.L18:
	xorl	%r8d, %r8d
	jmp	.L2
.L29:
	xorl	%edx, %edx
	jmp	.L11
.L19:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L13
.L30:
	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:
```
```c
#include <stdio.h>

int main()
{
	int N, K;
	char S[100001];
	scanf("%d %d", &N, &K);
	scanf("%s", S);
	
	int i, j, k, l[50001] = {}, r[50001] = {};
	for (i = 0, k = 0; i < N; ) {
		for (; S[i] == '0'; i++);
		l[++k] = i;
		for (; S[i] == '1'; i++);
		r[k] = i;
	}
	
	if (k <= K) {
		printf("%d\n", N);
		fflush(stdout);
		return 0;
	}

	int max = 0;
	for (i = 0; i <= k - K; i++) if (r[i+K] - l[i] > max) max = r[i+K] - l[i];
	printf("%d\n", max);
	fflush(stdout);
	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 main()
{
	int N, K;
	char S[100001];
	scanf("%d %d", &N, &K);
	scanf("%s", S);
	
	int i, j, k, l[50001] = {}, r[50001] = {};
	for (i = 0, k = 0; i < N; ) {
		for (; S[i] == '0'; i++);
		l[++k] = i;
		for (; S[i] == '1'; i++);
		r[k] = i;
	}
	
	if (k <= K) {
		printf("%d\n", N);
		fflush(stdout);
		return 0;
	}

	int max = 0;
	for (i = 0; i <= k - K; i++) if (r[i+K] - l[i] > max) max = r[i+K] - l[i];
	printf("%d\n", max);
	fflush(stdout);
	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:

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

```c
#include <stdio.h>

int main()
{
	int N, K;
	char S[100001];
	scanf("%d %d", &N, &K);
	scanf("%s", S);
	
	int i, j, k, l[50001] = {}, r[50001] = {};
	for (i = 0, k = 0; i < N; ) {
		for (; S[i] == '0'; i++);
		l[++k] = i;
		for (; S[i] == '1'; i++);
		r[k] = i;
	}
	
	if (k <= K) {
		printf("%d\n", N);
		fflush(stdout);
		return 0;
	}

	int max = 0;
	for (i = 0; i <= k - K; i++) if (r[i+K] - l[i] > max) max = r[i+K] - l[i];
	printf("%d\n", max);
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	-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	$352, %rsp
	.cfi_def_cfa_offset 500080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	400048(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	200032(%rsp), %r9
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%r9, %rdi
	call	memset@PLT
	movl	8(%rsp), %r10d
	movq	%rax, %r9
	testl	%r10d, %r10d
	jle	.L18
	movzbl	400048(%rsp), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	leaq	400047(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rcx), %eax
	cltq
	cmpb	$48, %dl
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$48, %dl
	je	.L4
.L8:
	movl	%ecx, (%rbx,%rdi,4)
	movl	%edi, %r8d
	cmpb	$49, %dl
	jne	.L5
	addl	$1, %ecx
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$49, %dl
	je	.L6
.L5:
	movl	%ecx, (%r9,%rdi,4)
	addq	$1, %rdi
	cmpl	%ecx, %r10d
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	cmpl	%r8d, %esi
	jge	.L9
	subl	%esi, %r8d
	js	.L29
	leal	1(%r8), %edi
	cmpl	$2, %r8d
	jle	.L19
	movl	%edi, %edx
	movslq	%esi, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	(%r9,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rcx,%rax), %xmm0
	psubd	(%rbx,%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L14
	movdqa	%xmm2, %xmm1
	movl	%edi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andb	$3, %dil
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	je	.L11
.L13:
	leal	(%rcx,%rsi), %eax
	movslq	%ecx, %rdi
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jl	.L11
	leal	(%rsi,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	200032(%rsp,%rdi,4), %edi
	subl	16(%rsp,%rax,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jl	.L11
	leal	(%rsi,%rcx), %eax
	movslq	%ecx, %rcx
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L11:
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	500056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$500064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	%r10d, %edx
	jmp	.L11
.L18:
	xorl	%r8d, %r8d
	jmp	.L2
.L29:
	xorl	%edx, %edx
	jmp	.L11
.L19:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L13
.L30:
	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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%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	-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	$352, %rsp
	.cfi_def_cfa_offset 500080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	400048(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	200032(%rsp), %r9
	movl	$200004, %edx
	xorl	%esi, %esi
	movq	%r9, %rdi
	call	memset@PLT
	movl	8(%rsp), %r10d
	movq	%rax, %r9
	testl	%r10d, %r10d
	jle	.L18
	movzbl	400048(%rsp), %edx
	movl	$1, %edi
	xorl	%ecx, %ecx
	leaq	400047(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rcx), %eax
	cltq
	cmpb	$48, %dl
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$48, %dl
	je	.L4
.L8:
	movl	%ecx, (%rbx,%rdi,4)
	movl	%edi, %r8d
	cmpb	$49, %dl
	jne	.L5
	addl	$1, %ecx
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	movzbl	(%rsi,%rax), %edx
	cmpb	$49, %dl
	je	.L6
.L5:
	movl	%ecx, (%r9,%rdi,4)
	addq	$1, %rdi
	cmpl	%ecx, %r10d
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	cmpl	%r8d, %esi
	jge	.L9
	subl	%esi, %r8d
	js	.L29
	leal	1(%r8), %edi
	cmpl	$2, %r8d
	jle	.L19
	movl	%edi, %edx
	movslq	%esi, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	(%r9,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	(%rcx,%rax), %xmm0
	psubd	(%rbx,%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L14
	movdqa	%xmm2, %xmm1
	movl	%edi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andb	$3, %dil
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	je	.L11
.L13:
	leal	(%rcx,%rsi), %eax
	movslq	%ecx, %rdi
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jl	.L11
	leal	(%rsi,%rax), %edi
	cltq
	movslq	%edi, %rdi
	movl	200032(%rsp,%rdi,4), %edi
	subl	16(%rsp,%rax,4), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jl	.L11
	leal	(%rsi,%rcx), %eax
	movslq	%ecx, %rcx
	cltq
	movl	200032(%rsp,%rax,4), %eax
	subl	16(%rsp,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L11:
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	500056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$500064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	%r10d, %edx
	jmp	.L11
.L18:
	xorl	%r8d, %r8d
	jmp	.L2
.L29:
	xorl	%edx, %edx
	jmp	.L11
.L19:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L13
.L30:
	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:
```