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, cnt = 0;
  scanf("%d", &n);
  int a[n], b[n+1];
  for (size_t i = 0; i < n; i++) {
    scanf("%d", a+i);
  }
  for (size_t i = n; i > 0; i--) {
    int c = n/i, d = 0;
    if (c>1) {
      for (size_t j = 1; j < c; j++) {
        d += b[(j+1)*i];
      }
    }
    if (a[i-1] == d%2) {
      b[i] = 0;
    }else {
      b[i] = 1;
      cnt++;
    }
  }
  printf("%d\n", cnt);
  for (size_t i = 0; i < n; i++) {
    if (b[i+1] == 1) {
      printf("%d ", i+1);
    }
  }
  printf("\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -132(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-120(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -120(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -120(%rbp)
	jb	.L9
	movl	-136(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	jmp	.L10
.L16:
	movl	-136(%rbp), %eax
	cltq
	movl	$0, %edx
	divq	-112(%rbp)
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
	cmpl	$1, -124(%rbp)
	jle	.L11
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-104(%rbp), %rax
	addq	$1, %rax
	imulq	-112(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -128(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cltq
	cmpq	%rax, -104(%rbp)
	jb	.L13
.L11:
	movq	-112(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movl	(%rax,%rdx,4), %edx
	movl	-128(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	%eax, %edx
	jne	.L14
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$0, (%rax,%rdx,4)
	jmp	.L15
.L14:
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -132(%rbp)
.L15:
	subq	$1, -112(%rbp)
.L10:
	cmpq	$0, -112(%rbp)
	jne	.L16
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$0, -96(%rbp)
	jmp	.L17
.L19:
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L18
	movq	-96(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addq	$1, -96(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jb	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	0(,%rsi,4), %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L41:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L41
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L42
.L4:
	addq	$19, %rdx
	movq	%rsp, %rcx
	movq	%rsp, %r12
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L42:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L43
.L7:
	movq	%rsp, %rbx
	movq	%r12, %r15
	xorl	%r13d, %r13d
	testq	%rsi, %rsi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %r8
	addq	$4, %r15
	cmpq	%r13, %r8
	ja	.L10
	testq	%r8, %r8
	je	.L11
	leaq	-8(%rbx,%r8,8), %r9
	movq	%r8, %rdi
	xorl	%r10d, %r10d
	xorl	%edx, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	subq	$8, %r9
.L12:
	movl	%edx, %eax
	subq	$1, %rdi
	shrl	$31, %eax
	addl	%eax, %edx
	andl	$1, %edx
	subl	%eax, %edx
	xorl	%eax, %eax
	cmpl	%edx, (%r12,%rdi,4)
	je	.L15
	addl	$1, %r10d
	movl	$1, %eax
.L15:
	movl	%eax, 4(%rbx,%rdi,4)
	testq	%rdi, %rdi
	je	.L9
	movq	%r8, %rax
	xorl	%edx, %edx
	divq	%rdi
	xorl	%edx, %edx
	cmpq	$1, %rax
	jbe	.L13
	leaq	0(,%rdi,4), %r11
	movq	%r9, %rsi
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %rcx
	addl	(%rsi), %edx
	addq	%r11, %rsi
	cmpq	%rcx, %rax
	jne	.L14
	jmp	.L13
.L11:
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r10d, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movl	$1, %edi
	leaq	.LC2(%rip), %r13
	call	__printf_chk@PLT
	movl	-60(%rbp), %edx
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %r12
	cmpl	$1, (%rbx,%r12,4)
	je	.L44
	movslq	%edx, %rax
	cmpq	%rax, %r12
	jb	.L17
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L45
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	-60(%rbp), %rax
	movq	%rax, %rdx
	cmpq	%rax, %r12
	jb	.L17
	jmp	.L20
.L43:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L45:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	0(,%rsi,4), %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L41:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L41
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L42
.L4:
	addq	$19, %rdx
	movq	%rsp, %rcx
	movq	%rsp, %r12
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L42:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L43
.L7:
	movq	%rsp, %rbx
	movq	%r12, %r15
	xorl	%r13d, %r13d
	testq	%rsi, %rsi
	je	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %r8
	addq	$4, %r15
	cmpq	%r13, %r8
	ja	.L10
	testq	%r8, %r8
	je	.L11
	leaq	-8(%rbx,%r8,8), %r9
	movq	%r8, %rdi
	xorl	%r10d, %r10d
	xorl	%edx, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	subq	$8, %r9
.L12:
	movl	%edx, %eax
	subq	$1, %rdi
	shrl	$31, %eax
	addl	%eax, %edx
	andl	$1, %edx
	subl	%eax, %edx
	xorl	%eax, %eax
	cmpl	%edx, (%r12,%rdi,4)
	je	.L15
	addl	$1, %r10d
	movl	$1, %eax
.L15:
	movl	%eax, 4(%rbx,%rdi,4)
	testq	%rdi, %rdi
	je	.L9
	movq	%r8, %rax
	xorl	%edx, %edx
	divq	%rdi
	xorl	%edx, %edx
	cmpq	$1, %rax
	jbe	.L13
	leaq	0(,%rdi,4), %r11
	movq	%r9, %rsi
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %rcx
	addl	(%rsi), %edx
	addq	%r11, %rsi
	cmpq	%rcx, %rax
	jne	.L14
	jmp	.L13
.L11:
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r10d, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movl	$1, %edi
	leaq	.LC2(%rip), %r13
	call	__printf_chk@PLT
	movl	-60(%rbp), %edx
	testl	%edx, %edx
	je	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %r12
	cmpl	$1, (%rbx,%r12,4)
	je	.L44
	movslq	%edx, %rax
	cmpq	%rax, %r12
	jb	.L17
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L45
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	-60(%rbp), %rax
	movq	%rax, %rdx
	cmpq	%rax, %r12
	jb	.L17
	jmp	.L20
.L43:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L45:
	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:

#include <stdio.h>

int main() {
  int n, cnt = 0;
  scanf("%d", &n);
  int a[n], b[n+1];
  for (size_t i = 0; i < n; i++) {
    scanf("%d", a+i);
  }
  for (size_t i = n; i > 0; i--) {
    int c = n/i, d = 0;
    if (c>1) {
      for (size_t j = 1; j < c; j++) {
        d += b[(j+1)*i];
      }
    }
    if (a[i-1] == d%2) {
      b[i] = 0;
    }else {
      b[i] = 1;
      cnt++;
    }
  }
  printf("%d\n", cnt);
  for (size_t i = 0; i < n; i++) {
    if (b[i+1] == 1) {
      printf("%d ", i+1);
    }
  }
  printf("\n");
  return 0;
}

3
1 0 1
 3
1 1 0
 3
0 0 0
 5
1 0 0 0 0
 5
1 0 0 0 1
 5
1 1 0 1 0
 5
1 0 1 0 0
 5
1 1 0 0 0
 5
1 0 0 0 0
 3
0 0 0

1
3 
 1
2 
 0

 1
1 
 1
5 
 1
4 
 1
3 
 1
2 
 1
1 
 0


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, cnt = 0;
  scanf("%d", &n);
  int a[n], b[n+1];
  for (size_t i = 0; i < n; i++) {
    scanf("%d", a+i);
  }
  for (size_t i = n; i > 0; i--) {
    int c = n/i, d = 0;
    if (c>1) {
      for (size_t j = 1; j < c; j++) {
        d += b[(j+1)*i];
      }
    }
    if (a[i-1] == d%2) {
      b[i] = 0;
    }else {
      b[i] = 1;
      cnt++;
    }
  }
  printf("%d\n", cnt);
  for (size_t i = 0; i < n; i++) {
    if (b[i+1] == 1) {
      printf("%d ", i+1);
    }
  }
  printf("\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -132(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-120(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -120(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -120(%rbp)
	jb	.L9
	movl	-136(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	jmp	.L10
.L16:
	movl	-136(%rbp), %eax
	cltq
	movl	$0, %edx
	divq	-112(%rbp)
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
	cmpl	$1, -124(%rbp)
	jle	.L11
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-104(%rbp), %rax
	addq	$1, %rax
	imulq	-112(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -128(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cltq
	cmpq	%rax, -104(%rbp)
	jb	.L13
.L11:
	movq	-112(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movl	(%rax,%rdx,4), %edx
	movl	-128(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	%eax, %edx
	jne	.L14
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$0, (%rax,%rdx,4)
	jmp	.L15
.L14:
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -132(%rbp)
.L15:
	subq	$1, -112(%rbp)
.L10:
	cmpq	$0, -112(%rbp)
	jne	.L16
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$0, -96(%rbp)
	jmp	.L17
.L19:
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L18
	movq	-96(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addq	$1, -96(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jb	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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"
.LC1:
	.string	"%d\n"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -132(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -176(%rbp)
	movq	$0, -168(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-136(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-120(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -120(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -120(%rbp)
	jb	.L9
	movl	-136(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	jmp	.L10
.L16:
	movl	-136(%rbp), %eax
	cltq
	movl	$0, %edx
	divq	-112(%rbp)
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
	cmpl	$1, -124(%rbp)
	jle	.L11
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-104(%rbp), %rax
	addq	$1, %rax
	imulq	-112(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -128(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cltq
	cmpq	%rax, -104(%rbp)
	jb	.L13
.L11:
	movq	-112(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movl	(%rax,%rdx,4), %edx
	movl	-128(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	%eax, %edx
	jne	.L14
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$0, (%rax,%rdx,4)
	jmp	.L15
.L14:
	movq	-64(%rbp), %rax
	movq	-112(%rbp), %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -132(%rbp)
.L15:
	subq	$1, -112(%rbp)
.L10:
	cmpq	$0, -112(%rbp)
	jne	.L16
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$0, -96(%rbp)
	jmp	.L17
.L19:
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L18
	movq	-96(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L18:
	addq	$1, -96(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cltq
	cmpq	%rax, -96(%rbp)
	jb	.L19
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
