Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int n,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;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$400, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rcx
	leaq	-500096(%rbp), %rdx
	leaq	-500100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500092(%rbp)
	jmp	.L2
.L3:
	movl	-500092(%rbp), %eax
	cltq
	movl	$1000000000, -500080(%rbp,%rax,4)
	addl	$1, -500092(%rbp)
.L2:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jl	.L3
	movl	-500100(%rbp), %eax
	cltq
	movl	$0, -500080(%rbp,%rax,4)
	movl	-500100(%rbp), %eax
	movl	%eax, -500084(%rbp)
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
	jmp	.L4
.L12:
	movl	$1, -500092(%rbp)
	jmp	.L5
.L9:
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	testl	%eax, %eax
	js	.L22
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L8
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -500080(%rbp,%rax,4)
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	movl	%eax, -500084(%rbp)
.L8:
	addl	$1, -500092(%rbp)
.L5:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L9
	jmp	.L7
.L22:
	nop
.L7:
	movl	-500084(%rbp), %eax
	cmpl	-500088(%rbp), %eax
	jne	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
.L4:
	cmpl	$0, -500088(%rbp)
	jne	.L12
	jmp	.L13
.L19:
	cmpl	$0, -500088(%rbp)
	je	.L14
	movl	$32, %edi
	call	putchar@PLT
.L14:
	movl	$1, -500092(%rbp)
	jmp	.L15
.L18:
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %ecx
	movl	-500092(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-500080(%rbp,%rax,4), %eax
	addl	$1, %eax
	cmpl	%eax, %edx
	je	.L23
	addl	$1, -500092(%rbp)
.L15:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L18
	jmp	.L17
.L23:
	nop
.L17:
	movl	-500092(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-500092(%rbp), %eax
	addl	%eax, -500088(%rbp)
.L13:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500088(%rbp)
	jne	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %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
	.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:

#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;
}

9 3
0001000100

1 3 2 3

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int n,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;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$400, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rcx
	leaq	-500096(%rbp), %rdx
	leaq	-500100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500092(%rbp)
	jmp	.L2
.L3:
	movl	-500092(%rbp), %eax
	cltq
	movl	$1000000000, -500080(%rbp,%rax,4)
	addl	$1, -500092(%rbp)
.L2:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jl	.L3
	movl	-500100(%rbp), %eax
	cltq
	movl	$0, -500080(%rbp,%rax,4)
	movl	-500100(%rbp), %eax
	movl	%eax, -500084(%rbp)
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
	jmp	.L4
.L12:
	movl	$1, -500092(%rbp)
	jmp	.L5
.L9:
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	testl	%eax, %eax
	js	.L22
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L8
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -500080(%rbp,%rax,4)
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	movl	%eax, -500084(%rbp)
.L8:
	addl	$1, -500092(%rbp)
.L5:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L9
	jmp	.L7
.L22:
	nop
.L7:
	movl	-500084(%rbp), %eax
	cmpl	-500088(%rbp), %eax
	jne	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
.L4:
	cmpl	$0, -500088(%rbp)
	jne	.L12
	jmp	.L13
.L19:
	cmpl	$0, -500088(%rbp)
	je	.L14
	movl	$32, %edi
	call	putchar@PLT
.L14:
	movl	$1, -500092(%rbp)
	jmp	.L15
.L18:
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %ecx
	movl	-500092(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-500080(%rbp,%rax,4), %eax
	addl	$1, %eax
	cmpl	%eax, %edx
	je	.L23
	addl	$1, -500092(%rbp)
.L15:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L18
	jmp	.L17
.L23:
	nop
.L17:
	movl	-500092(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-500092(%rbp), %eax
	addl	%eax, -500088(%rbp)
.L13:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500088(%rbp)
	jne	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$400, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-100032(%rbp), %rcx
	leaq	-500096(%rbp), %rdx
	leaq	-500100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -500092(%rbp)
	jmp	.L2
.L3:
	movl	-500092(%rbp), %eax
	cltq
	movl	$1000000000, -500080(%rbp,%rax,4)
	addl	$1, -500092(%rbp)
.L2:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jl	.L3
	movl	-500100(%rbp), %eax
	cltq
	movl	$0, -500080(%rbp,%rax,4)
	movl	-500100(%rbp), %eax
	movl	%eax, -500084(%rbp)
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
	jmp	.L4
.L12:
	movl	$1, -500092(%rbp)
	jmp	.L5
.L9:
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	testl	%eax, %eax
	js	.L22
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %eax
	cmpb	$48, %al
	jne	.L8
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -500080(%rbp,%rax,4)
	movl	-500088(%rbp), %eax
	subl	-500092(%rbp), %eax
	movl	%eax, -500084(%rbp)
.L8:
	addl	$1, -500092(%rbp)
.L5:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L9
	jmp	.L7
.L22:
	nop
.L7:
	movl	-500084(%rbp), %eax
	cmpl	-500088(%rbp), %eax
	jne	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	movl	-500084(%rbp), %eax
	movl	%eax, -500088(%rbp)
.L4:
	cmpl	$0, -500088(%rbp)
	jne	.L12
	jmp	.L13
.L19:
	cmpl	$0, -500088(%rbp)
	je	.L14
	movl	$32, %edi
	call	putchar@PLT
.L14:
	movl	$1, -500092(%rbp)
	jmp	.L15
.L18:
	movl	-500088(%rbp), %eax
	cltq
	movl	-500080(%rbp,%rax,4), %edx
	movl	-500088(%rbp), %ecx
	movl	-500092(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movl	-500080(%rbp,%rax,4), %eax
	addl	$1, %eax
	cmpl	%eax, %edx
	je	.L23
	addl	$1, -500092(%rbp)
.L15:
	movl	-500096(%rbp), %eax
	cmpl	%eax, -500092(%rbp)
	jle	.L18
	jmp	.L17
.L23:
	nop
.L17:
	movl	-500092(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-500092(%rbp), %eax
	addl	%eax, -500088(%rbp)
.L13:
	movl	-500100(%rbp), %eax
	cmpl	%eax, -500088(%rbp)
	jne	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
