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,m,i,j,p,np,d[100010];
  char s[100010];
  scanf("%d %d %s",&n,&m,s);
  for(i=0;i<n;i++)d[i]=1e9;
  d[n]=0;
  p=np=n;
  while(p){
    for(i=1;i<=m;i++){
      if(p-i<0)break;
      if(s[p-i]=='0'){
	d[p-i]=d[p]+1;
	np=p-i;
      }
    }
    if(np==p){
      printf("-1\n");
      return 0;
    }
    p=np;
  }
  //for(i=0;i<n;i++)printf("%d ",d[i]);printf("\n");
  while(p!=n){
    if(p)printf(" ");
    for(i=1;i<=m;i++){
      if(d[p]==d[p+i]+1)break;
    }
    printf("%d",i);
    p+=i;
  }
  printf("\n");
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$384, %rsp
	.cfi_def_cfa_offset 500128
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500088(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400064(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L7
	leal	-1(%r11), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%r11d, %edx
	movdqa	.LC1(%rip), %xmm0
	leaq	16(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	%r11d, %eax
	andl	$-4, %eax
	testb	$3, %r11b
	je	.L7
.L4:
	movslq	%eax, %rdx
	movl	$1000000000, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r11d
	jle	.L7
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 16(%rsp,%rdx,4)
	cmpl	%eax, %r11d
	jle	.L7
	cltq
	movl	$1000000000, 16(%rsp,%rax,4)
.L7:
	movslq	%r11d, %rax
	movl	%r11d, %edi
	movl	12(%rsp), %esi
	movl	$0, 16(%rsp,%rax,4)
	testl	%edi, %edi
	je	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	testl	%esi, %esi
	jle	.L14
	movl	%edi, %eax
	subl	$1, %eax
	js	.L14
	cltq
	movl	%edi, %r9d
	leal	1(%rdi), %r8d
	movslq	%edi, %r10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L9
.L15:
	cmpb	$48, (%rbx,%rax)
	movl	%eax, %ecx
	jne	.L10
	movl	16(%rsp,%r10,4), %edx
	movl	%eax, %r9d
	addl	$1, %edx
	movl	%edx, 16(%rsp,%rax,4)
.L10:
	movl	%r8d, %edx
	subl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L11
.L9:
	cmpl	%r9d, %edi
	je	.L14
	movl	%r9d, %edi
	testl	%edi, %edi
	jne	.L35
.L13:
	leaq	.LC3(%rip), %rbx
	leaq	16(%rsp), %rbp
	testl	%r11d, %r11d
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rdi), %r12d
	movl	$1, %edx
	testl	%esi, %esi
	jle	.L19
	movslq	%edi, %rax
	movl	$1, %edx
	movl	16(%rsp,%rax,4), %r8d
	leaq	0(%rbp,%rax,4), %rcx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %edx
	addq	$4, %rcx
	cmpl	%esi, %edx
	jg	.L36
.L20:
	movl	4(%rcx), %eax
	leal	(%rdi,%rdx), %r12d
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L37
.L19:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r12d, 8(%rsp)
	je	.L22
	testl	%r12d, %r12d
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	movl	12(%rsp), %esi
	movl	%r12d, %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L12:
	movq	500088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$500096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%rdi,%rdx), %r12d
	jmp	.L19
.L24:
	xorl	%eax, %eax
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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 %s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$384, %rsp
	.cfi_def_cfa_offset 500128
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500088(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400064(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L7
	leal	-1(%r11), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%r11d, %edx
	movdqa	.LC1(%rip), %xmm0
	leaq	16(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	%r11d, %eax
	andl	$-4, %eax
	testb	$3, %r11b
	je	.L7
.L4:
	movslq	%eax, %rdx
	movl	$1000000000, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r11d
	jle	.L7
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 16(%rsp,%rdx,4)
	cmpl	%eax, %r11d
	jle	.L7
	cltq
	movl	$1000000000, 16(%rsp,%rax,4)
.L7:
	movslq	%r11d, %rax
	movl	%r11d, %edi
	movl	12(%rsp), %esi
	movl	$0, 16(%rsp,%rax,4)
	testl	%edi, %edi
	je	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	testl	%esi, %esi
	jle	.L14
	movl	%edi, %eax
	subl	$1, %eax
	js	.L14
	cltq
	movl	%edi, %r9d
	leal	1(%rdi), %r8d
	movslq	%edi, %r10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L9
.L15:
	cmpb	$48, (%rbx,%rax)
	movl	%eax, %ecx
	jne	.L10
	movl	16(%rsp,%r10,4), %edx
	movl	%eax, %r9d
	addl	$1, %edx
	movl	%edx, 16(%rsp,%rax,4)
.L10:
	movl	%r8d, %edx
	subl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L11
.L9:
	cmpl	%r9d, %edi
	je	.L14
	movl	%r9d, %edi
	testl	%edi, %edi
	jne	.L35
.L13:
	leaq	.LC3(%rip), %rbx
	leaq	16(%rsp), %rbp
	testl	%r11d, %r11d
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rdi), %r12d
	movl	$1, %edx
	testl	%esi, %esi
	jle	.L19
	movslq	%edi, %rax
	movl	$1, %edx
	movl	16(%rsp,%rax,4), %r8d
	leaq	0(%rbp,%rax,4), %rcx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %edx
	addq	$4, %rcx
	cmpl	%esi, %edx
	jg	.L36
.L20:
	movl	4(%rcx), %eax
	leal	(%rdi,%rdx), %r12d
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L37
.L19:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r12d, 8(%rsp)
	je	.L22
	testl	%r12d, %r12d
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	movl	12(%rsp), %esi
	movl	%r12d, %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L12:
	movq	500088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$500096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%rdi,%rdx), %r12d
	jmp	.L19
.L24:
	xorl	%eax, %eax
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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 %s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$384, %rsp
	.cfi_def_cfa_offset 500128
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500088(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400064(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L7
	leal	-1(%r11), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%r11d, %edx
	movdqa	.LC1(%rip), %xmm0
	leaq	16(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	%r11d, %eax
	andl	$-4, %eax
	testb	$3, %r11b
	je	.L7
.L4:
	movslq	%eax, %rdx
	movl	$1000000000, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r11d
	jle	.L7
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 16(%rsp,%rdx,4)
	cmpl	%eax, %r11d
	jle	.L7
	cltq
	movl	$1000000000, 16(%rsp,%rax,4)
.L7:
	movslq	%r11d, %rax
	movl	%r11d, %edi
	movl	12(%rsp), %esi
	movl	$0, 16(%rsp,%rax,4)
	testl	%edi, %edi
	je	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	testl	%esi, %esi
	jle	.L14
	movl	%edi, %eax
	subl	$1, %eax
	js	.L14
	cltq
	movl	%edi, %r9d
	leal	1(%rdi), %r8d
	movslq	%edi, %r10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L9
.L15:
	cmpb	$48, (%rbx,%rax)
	movl	%eax, %ecx
	jne	.L10
	movl	16(%rsp,%r10,4), %edx
	movl	%eax, %r9d
	addl	$1, %edx
	movl	%edx, 16(%rsp,%rax,4)
.L10:
	movl	%r8d, %edx
	subl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L11
.L9:
	cmpl	%r9d, %edi
	je	.L14
	movl	%r9d, %edi
	testl	%edi, %edi
	jne	.L35
.L13:
	leaq	.LC3(%rip), %rbx
	leaq	16(%rsp), %rbp
	testl	%r11d, %r11d
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rdi), %r12d
	movl	$1, %edx
	testl	%esi, %esi
	jle	.L19
	movslq	%edi, %rax
	movl	$1, %edx
	movl	16(%rsp,%rax,4), %r8d
	leaq	0(%rbp,%rax,4), %rcx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %edx
	addq	$4, %rcx
	cmpl	%esi, %edx
	jg	.L36
.L20:
	movl	4(%rcx), %eax
	leal	(%rdi,%rdx), %r12d
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L37
.L19:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r12d, 8(%rsp)
	je	.L22
	testl	%r12d, %r12d
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	movl	12(%rsp), %esi
	movl	%r12d, %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L12:
	movq	500088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$500096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%rdi,%rdx), %r12d
	jmp	.L19
.L24:
	xorl	%eax, %eax
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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,m,i,j,p,np,d[100010];
  char s[100010];
  scanf("%d %d %s",&n,&m,s);
  for(i=0;i<n;i++)d[i]=1e9;
  d[n]=0;
  p=np=n;
  while(p){
    for(i=1;i<=m;i++){
      if(p-i<0)break;
      if(s[p-i]=='0'){
	d[p-i]=d[p]+1;
	np=p-i;
      }
    }
    if(np==p){
      printf("-1\n");
      return 0;
    }
    p=np;
  }
  //for(i=0;i<n;i++)printf("%d ",d[i]);printf("\n");
  while(p!=n){
    if(p)printf(" ");
    for(i=1;i<=m;i++){
      if(d[p]==d[p+i]+1)break;
    }
    printf("%d",i);
    p+=i;
  }
  printf("\n");
  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,m,i,j,p,np,d[100010];
  char s[100010];
  scanf("%d %d %s",&n,&m,s);
  for(i=0;i<n;i++)d[i]=1e9;
  d[n]=0;
  p=np=n;
  while(p){
    for(i=1;i<=m;i++){
      if(p-i<0)break;
      if(s[p-i]=='0'){
	d[p-i]=d[p]+1;
	np=p-i;
      }
    }
    if(np==p){
      printf("-1\n");
      return 0;
    }
    p=np;
  }
  //for(i=0;i<n;i++)printf("%d ",d[i]);printf("\n");
  while(p!=n){
    if(p)printf(" ");
    for(i=1;i<=m;i++){
      if(d[p]==d[p+i]+1)break;
    }
    printf("%d",i);
    p+=i;
  }
  printf("\n");
  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:

9 3
0001000100

1 3 2 3

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,m,i,j,p,np,d[100010];
  char s[100010];
  scanf("%d %d %s",&n,&m,s);
  for(i=0;i<n;i++)d[i]=1e9;
  d[n]=0;
  p=np=n;
  while(p){
    for(i=1;i<=m;i++){
      if(p-i<0)break;
      if(s[p-i]=='0'){
	d[p-i]=d[p]+1;
	np=p-i;
      }
    }
    if(np==p){
      printf("-1\n");
      return 0;
    }
    p=np;
  }
  //for(i=0;i<n;i++)printf("%d ",d[i]);printf("\n");
  while(p!=n){
    if(p)printf(" ");
    for(i=1;i<=m;i++){
      if(d[p]==d[p+i]+1)break;
    }
    printf("%d",i);
    p+=i;
  }
  printf("\n");
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$384, %rsp
	.cfi_def_cfa_offset 500128
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500088(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400064(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L7
	leal	-1(%r11), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%r11d, %edx
	movdqa	.LC1(%rip), %xmm0
	leaq	16(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	%r11d, %eax
	andl	$-4, %eax
	testb	$3, %r11b
	je	.L7
.L4:
	movslq	%eax, %rdx
	movl	$1000000000, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r11d
	jle	.L7
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 16(%rsp,%rdx,4)
	cmpl	%eax, %r11d
	jle	.L7
	cltq
	movl	$1000000000, 16(%rsp,%rax,4)
.L7:
	movslq	%r11d, %rax
	movl	%r11d, %edi
	movl	12(%rsp), %esi
	movl	$0, 16(%rsp,%rax,4)
	testl	%edi, %edi
	je	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	testl	%esi, %esi
	jle	.L14
	movl	%edi, %eax
	subl	$1, %eax
	js	.L14
	cltq
	movl	%edi, %r9d
	leal	1(%rdi), %r8d
	movslq	%edi, %r10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L9
.L15:
	cmpb	$48, (%rbx,%rax)
	movl	%eax, %ecx
	jne	.L10
	movl	16(%rsp,%r10,4), %edx
	movl	%eax, %r9d
	addl	$1, %edx
	movl	%edx, 16(%rsp,%rax,4)
.L10:
	movl	%r8d, %edx
	subl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L11
.L9:
	cmpl	%r9d, %edi
	je	.L14
	movl	%r9d, %edi
	testl	%edi, %edi
	jne	.L35
.L13:
	leaq	.LC3(%rip), %rbx
	leaq	16(%rsp), %rbp
	testl	%r11d, %r11d
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rdi), %r12d
	movl	$1, %edx
	testl	%esi, %esi
	jle	.L19
	movslq	%edi, %rax
	movl	$1, %edx
	movl	16(%rsp,%rax,4), %r8d
	leaq	0(%rbp,%rax,4), %rcx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %edx
	addq	$4, %rcx
	cmpl	%esi, %edx
	jg	.L36
.L20:
	movl	4(%rcx), %eax
	leal	(%rdi,%rdx), %r12d
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L37
.L19:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r12d, 8(%rsp)
	je	.L22
	testl	%r12d, %r12d
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	movl	12(%rsp), %esi
	movl	%r12d, %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L12:
	movq	500088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$500096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%rdi,%rdx), %r12d
	jmp	.L19
.L24:
	xorl	%eax, %eax
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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 %s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-499712(%rsp), %r11
	.cfi_def_cfa 11, 499744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$384, %rsp
	.cfi_def_cfa_offset 500128
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 500088(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	400064(%rsp), %rbx
	movq	%rbx, %rcx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L7
	leal	-1(%r11), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%r11d, %edx
	movdqa	.LC1(%rip), %xmm0
	leaq	16(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	%r11d, %eax
	andl	$-4, %eax
	testb	$3, %r11b
	je	.L7
.L4:
	movslq	%eax, %rdx
	movl	$1000000000, 16(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r11d
	jle	.L7
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 16(%rsp,%rdx,4)
	cmpl	%eax, %r11d
	jle	.L7
	cltq
	movl	$1000000000, 16(%rsp,%rax,4)
.L7:
	movslq	%r11d, %rax
	movl	%r11d, %edi
	movl	12(%rsp), %esi
	movl	$0, 16(%rsp,%rax,4)
	testl	%edi, %edi
	je	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	testl	%esi, %esi
	jle	.L14
	movl	%edi, %eax
	subl	$1, %eax
	js	.L14
	cltq
	movl	%edi, %r9d
	leal	1(%rdi), %r8d
	movslq	%edi, %r10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L9
.L15:
	cmpb	$48, (%rbx,%rax)
	movl	%eax, %ecx
	jne	.L10
	movl	16(%rsp,%r10,4), %edx
	movl	%eax, %r9d
	addl	$1, %edx
	movl	%edx, 16(%rsp,%rax,4)
.L10:
	movl	%r8d, %edx
	subl	%ecx, %edx
	cmpl	%edx, %esi
	jge	.L11
.L9:
	cmpl	%r9d, %edi
	je	.L14
	movl	%r9d, %edi
	testl	%edi, %edi
	jne	.L35
.L13:
	leaq	.LC3(%rip), %rbx
	leaq	16(%rsp), %rbp
	testl	%r11d, %r11d
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	leal	1(%rdi), %r12d
	movl	$1, %edx
	testl	%esi, %esi
	jle	.L19
	movslq	%edi, %rax
	movl	$1, %edx
	movl	16(%rsp,%rax,4), %r8d
	leaq	0(%rbp,%rax,4), %rcx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %edx
	addq	$4, %rcx
	cmpl	%esi, %edx
	jg	.L36
.L20:
	movl	4(%rcx), %eax
	leal	(%rdi,%rdx), %r12d
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L37
.L19:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r12d, 8(%rsp)
	je	.L22
	testl	%r12d, %r12d
	je	.L17
	movl	$32, %edi
	call	putchar@PLT
.L17:
	movl	12(%rsp), %esi
	movl	%r12d, %edi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L12:
	movq	500088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$500096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	leal	(%rdi,%rdx), %r12d
	jmp	.L19
.L24:
	xorl	%eax, %eax
	jmp	.L4
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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:
```