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>
#define int long long
main()
{
  int N = 0;
  scanf("%lld",&N);

  int A[N];
  int i = 0;
  for(i = 0; i < N ; i++)
  {
	  scanf("%lld", &A[i]);
  }
  int CntPair = 0;

  for(i = 0; i < N ; i++)
  {
	 CntPair += A[i]/2;
	 if(i==N-1)break;
	 if(A[i]%2 == 1 && A[i+1]>0)
	 {
		 CntPair++;
		 A[i+1]--;
	 }
  }
  printf("%lld\n",CntPair);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.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	$56, %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
	movq	$0, -96(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-96(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L5
.L6:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L5:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L6
	movq	$0, -80(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L11:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	je	.L14
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L10
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jle	.L10
	addq	$1, -80(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	-64(%rbp), %rdx
	movq	(%rdx,%rax,8), %rdx
	leaq	-1(%rdx), %rcx
	movq	-64(%rbp), %rdx
	movq	%rcx, (%rdx,%rax,8)
.L10:
	addq	$1, -88(%rbp)
.L7:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	$0, -64(%rbp)
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L4:
	leaq	7(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r14
	andq	$-8, %rbx
	shrq	$3, %r14
	movq	%rbx, %r15
	testq	%rcx, %rcx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$8, %r15
	cmpq	%r12, %rsi
	jg	.L7
	testq	%rsi, %rsi
	jle	.L8
	movq	0(,%r14,8), %rax
	movq	%rsi, %rdi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	subq	$1, %rdi
	je	.L6
	xorl	%ecx, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpq	%rcx, %rsi
	je	.L6
.L11:
	movq	(%rbx,%rcx,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	addq	%rdx, %r8
	cmpq	%rcx, %rdi
	je	.L6
.L9:
	movq	%rax, %rdx
	addq	$1, %rcx
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L10
	movq	(%rbx,%rcx,8), %rax
	testq	%rax, %rax
	jle	.L10
	subq	$1, %rax
	addq	$1, %r8
	movq	%rax, (%rbx,%rcx,8)
	cmpq	%rcx, %rsi
	jne	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L8:
	xorl	%r8d, %r8d
	jmp	.L6
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	$0, -64(%rbp)
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L23:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L23
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L24
.L4:
	leaq	7(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r14
	andq	$-8, %rbx
	shrq	$3, %r14
	movq	%rbx, %r15
	testq	%rcx, %rcx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$8, %r15
	cmpq	%r12, %rsi
	jg	.L7
	testq	%rsi, %rsi
	jle	.L8
	movq	0(,%r14,8), %rax
	movq	%rsi, %rdi
	movq	%rax, %r8
	shrq	$63, %r8
	addq	%rax, %r8
	sarq	%r8
	subq	$1, %rdi
	je	.L6
	xorl	%ecx, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpq	%rcx, %rsi
	je	.L6
.L11:
	movq	(%rbx,%rcx,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	addq	%rdx, %r8
	cmpq	%rcx, %rdi
	je	.L6
.L9:
	movq	%rax, %rdx
	addq	$1, %rcx
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L10
	movq	(%rbx,%rcx,8), %rax
	testq	%rax, %rax
	jle	.L10
	subq	$1, %rax
	addq	$1, %r8
	movq	%rax, (%rbx,%rcx,8)
	cmpq	%rcx, %rsi
	jne	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L24:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L8:
	xorl	%r8d, %r8d
	jmp	.L6
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#define int long long
main()
{
  int N = 0;
  scanf("%lld",&N);

  int A[N];
  int i = 0;
  for(i = 0; i < N ; i++)
  {
	  scanf("%lld", &A[i]);
  }
  int CntPair = 0;

  for(i = 0; i < N ; i++)
  {
	 CntPair += A[i]/2;
	 if(i==N-1)break;
	 if(A[i]%2 == 1 && A[i+1]>0)
	 {
		 CntPair++;
		 A[i+1]--;
	 }
  }
  printf("%lld\n",CntPair);
  return 0;
}
8
2
0
1
6
1
8
2
1
 4
4
0
3
1
 8
2
0
1
9
1
8
2
1
 4
3
0
3
1
 4
0
0
3
1
 8
1
0
1
9
1
5
2
1
 8
1
0
1
1
1
5
1
1
 8
0
0
1
4
1
5
1
1
 8
0
0
1
4
1
5
2
1
 8
1
1
2
0
1
5
4
2

10
 4
 12
 3
 2
 9
 5
 6
 7
 8

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>
#define int long long
main()
{
  int N = 0;
  scanf("%lld",&N);

  int A[N];
  int i = 0;
  for(i = 0; i < N ; i++)
  {
	  scanf("%lld", &A[i]);
  }
  int CntPair = 0;

  for(i = 0; i < N ; i++)
  {
	 CntPair += A[i]/2;
	 if(i==N-1)break;
	 if(A[i]%2 == 1 && A[i+1]>0)
	 {
		 CntPair++;
		 A[i+1]--;
	 }
  }
  printf("%lld\n",CntPair);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.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	$56, %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
	movq	$0, -96(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-96(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L5
.L6:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L5:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L6
	movq	$0, -80(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L11:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	je	.L14
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L10
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jle	.L10
	addq	$1, -80(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	-64(%rbp), %rdx
	movq	(%rdx,%rax,8), %rdx
	leaq	-1(%rdx), %rcx
	movq	-64(%rbp), %rdx
	movq	%rcx, (%rdx,%rax,8)
.L10:
	addq	$1, -88(%rbp)
.L7:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"%lld"
.LC1:
	.string	"%lld\n"
	.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	$56, %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
	movq	$0, -96(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-96(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L5
.L6:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -88(%rbp)
.L5:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L6
	movq	$0, -80(%rbp)
	movq	$0, -88(%rbp)
	jmp	.L7
.L11:
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	addq	%rax, -80(%rbp)
	movq	-96(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	je	.L14
	movq	-64(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L10
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jle	.L10
	addq	$1, -80(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	-64(%rbp), %rdx
	movq	(%rdx,%rax,8), %rdx
	leaq	-1(%rdx), %rcx
	movq	-64(%rbp), %rdx
	movq	%rcx, (%rdx,%rax,8)
.L10:
	addq	$1, -88(%rbp)
.L7:
	movq	-96(%rbp), %rax
	cmpq	%rax, -88(%rbp)
	jl	.L11
	jmp	.L9
.L14:
	nop
.L9:
	movq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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:
