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 N, i;
int A[200000];
long long int ans;

int main(){
  scanf("%d", &N);
  for(i=0; i<N; i++){
    scanf("%d", A+i);
  }
  if(A[0] != 0){
    printf("-1\n");
    return 0;
  }
  for(i=0; i<N-1; i++){
    if(A[i]+1 < A[i+1]){
      printf("-1\n");
      return 0;
    }
  }
  for(i=1; i<N; i++){
    if(A[i-1]+1 == A[i]){
      ans++;
    }else{
      ans += A[i];
    }
  }
  printf("%lld\n", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L2
	xorl	%eax, %eax
	leaq	A(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movq	%r12, %rdi
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L3
.L2:
	movl	A(%rip), %esi
	testl	%esi, %esi
	jne	.L8
	movl	$0, i(%rip)
	cmpl	$1, %ecx
	jle	.L6
	leal	-2(%rcx), %r8d
	xorl	%edx, %edx
	movl	$1, %eax
	xorl	%r9d, %r9d
	addq	$2, %r8
	leaq	A(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	movl	$1, %r9d
	cmpq	%r8, %rax
	je	.L6
.L9:
	leal	1(%rdx), %edi
	movl	0(%rbp,%rax,4), %edx
	movl	%ebx, %r10d
	movl	%eax, %ebx
	cmpl	%edx, %edi
	jge	.L7
	testb	%r9b, %r9b
	je	.L8
	movl	%r10d, i(%rip)
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movq	ans(%rip), %rax
	movl	$1, i(%rip)
	movq	%rax, %rdx
	cmpl	$1, %ecx
	jle	.L10
	leaq	4+A(%rip), %rdx
	leal	-2(%rcx), %edi
	leaq	4(%rdx), %r8
	leaq	(%r8,%rdi,4), %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	(%rdx), %r9
	leal	1(%rsi), %r8d
	leaq	1(%rax), %rdi
	addq	%r9, %rax
	cmpl	%r8d, %r9d
	movq	%r9, %rsi
	cmove	%rdi, %rax
	addq	$4, %rdx
	cmpq	%r10, %rdx
	jne	.L13
	movq	%rax, ans(%rip)
	movq	%rax, %rdx
	movl	%ecx, i(%rip)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 800000
A:
	.zero	800000
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L2
	xorl	%eax, %eax
	leaq	A(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movq	%r12, %rdi
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L3
.L2:
	movl	A(%rip), %esi
	testl	%esi, %esi
	jne	.L8
	movl	$0, i(%rip)
	cmpl	$1, %ecx
	jle	.L6
	leal	-2(%rcx), %r8d
	xorl	%edx, %edx
	movl	$1, %eax
	xorl	%r9d, %r9d
	addq	$2, %r8
	leaq	A(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	movl	$1, %r9d
	cmpq	%r8, %rax
	je	.L6
.L9:
	leal	1(%rdx), %edi
	movl	0(%rbp,%rax,4), %edx
	movl	%ebx, %r10d
	movl	%eax, %ebx
	cmpl	%edx, %edi
	jge	.L7
	testb	%r9b, %r9b
	je	.L8
	movl	%r10d, i(%rip)
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movq	ans(%rip), %rax
	movl	$1, i(%rip)
	movq	%rax, %rdx
	cmpl	$1, %ecx
	jle	.L10
	leaq	4+A(%rip), %rdx
	leal	-2(%rcx), %edi
	leaq	4(%rdx), %r8
	leaq	(%r8,%rdi,4), %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	(%rdx), %r9
	leal	1(%rsi), %r8d
	leaq	1(%rax), %rdi
	addq	%r9, %rax
	cmpl	%r8d, %r9d
	movq	%r9, %rsi
	cmove	%rdi, %rax
	addq	$4, %rdx
	cmpq	%r10, %rdx
	jne	.L13
	movq	%rax, ans(%rip)
	movq	%rax, %rdx
	movl	%ecx, i(%rip)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 800000
A:
	.zero	800000
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L2
	xorl	%eax, %eax
	leaq	A(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movq	%r12, %rdi
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L3
.L2:
	movl	A(%rip), %esi
	testl	%esi, %esi
	jne	.L8
	movl	$0, i(%rip)
	cmpl	$1, %ecx
	jle	.L6
	leal	-2(%rcx), %r8d
	xorl	%edx, %edx
	movl	$1, %eax
	xorl	%r9d, %r9d
	addq	$2, %r8
	leaq	A(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	movl	$1, %r9d
	cmpq	%r8, %rax
	je	.L6
.L9:
	leal	1(%rdx), %edi
	movl	0(%rbp,%rax,4), %edx
	movl	%ebx, %r10d
	movl	%eax, %ebx
	cmpl	%edx, %edi
	jge	.L7
	testb	%r9b, %r9b
	je	.L8
	movl	%r10d, i(%rip)
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movq	ans(%rip), %rax
	movl	$1, i(%rip)
	movq	%rax, %rdx
	cmpl	$1, %ecx
	jle	.L10
	leaq	4+A(%rip), %rdx
	leal	-2(%rcx), %edi
	leaq	4(%rdx), %r8
	leaq	(%r8,%rdi,4), %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	(%rdx), %r9
	leal	1(%rsi), %r8d
	leaq	1(%rax), %rdi
	addq	%r9, %rax
	cmpl	%r8d, %r9d
	movq	%r9, %rsi
	cmove	%rdi, %rax
	addq	$4, %rdx
	cmpq	%r10, %rdx
	jne	.L13
	movq	%rax, ans(%rip)
	movq	%rax, %rdx
	movl	%ecx, i(%rip)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 800000
A:
	.zero	800000
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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 N, i;
int A[200000];
long long int ans;

int main(){
  scanf("%d", &N);
  for(i=0; i<N; i++){
    scanf("%d", A+i);
  }
  if(A[0] != 0){
    printf("-1\n");
    return 0;
  }
  for(i=0; i<N-1; i++){
    if(A[i]+1 < A[i+1]){
      printf("-1\n");
      return 0;
    }
  }
  for(i=1; i<N; i++){
    if(A[i-1]+1 == A[i]){
      ans++;
    }else{
      ans += A[i];
    }
  }
  printf("%lld\n", ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int N, i;
int A[200000];
long long int ans;

int main(){
  scanf("%d", &N);
  for(i=0; i<N; i++){
    scanf("%d", A+i);
  }
  if(A[0] != 0){
    printf("-1\n");
    return 0;
  }
  for(i=0; i<N-1; i++){
    if(A[i]+1 < A[i+1]){
      printf("-1\n");
      return 0;
    }
  }
  for(i=1; i<N; i++){
    if(A[i-1]+1 == A[i]){
      ans++;
    }else{
      ans += A[i];
    }
  }
  printf("%lld\n", ans);
}```

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:

3
0
2
1
 4
0
0
1
2
 3
0
1
0
 3
0
0
0
 9
0
1
1
0
2
2
2
1
2
 3
0
2
2
 9
0
1
1
0
2
2
2
1
4
 4
0
0
0
2
 3
0
1
2
 9
0
1
1
0
2
2
2
1
3

-1
 2
 1
 0
 -1
 -1
 -1
 -1
 2
 -1

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 N, i;
int A[200000];
long long int ans;

int main(){
  scanf("%d", &N);
  for(i=0; i<N; i++){
    scanf("%d", A+i);
  }
  if(A[0] != 0){
    printf("-1\n");
    return 0;
  }
  for(i=0; i<N-1; i++){
    if(A[i]+1 < A[i+1]){
      printf("-1\n");
      return 0;
    }
  }
  for(i=1; i<N; i++){
    if(A[i-1]+1 == A[i]){
      ans++;
    }else{
      ans += A[i];
    }
  }
  printf("%lld\n", ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L2
	xorl	%eax, %eax
	leaq	A(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movq	%r12, %rdi
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L3
.L2:
	movl	A(%rip), %esi
	testl	%esi, %esi
	jne	.L8
	movl	$0, i(%rip)
	cmpl	$1, %ecx
	jle	.L6
	leal	-2(%rcx), %r8d
	xorl	%edx, %edx
	movl	$1, %eax
	xorl	%r9d, %r9d
	addq	$2, %r8
	leaq	A(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	movl	$1, %r9d
	cmpq	%r8, %rax
	je	.L6
.L9:
	leal	1(%rdx), %edi
	movl	0(%rbp,%rax,4), %edx
	movl	%ebx, %r10d
	movl	%eax, %ebx
	cmpl	%edx, %edi
	jge	.L7
	testb	%r9b, %r9b
	je	.L8
	movl	%r10d, i(%rip)
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movq	ans(%rip), %rax
	movl	$1, i(%rip)
	movq	%rax, %rdx
	cmpl	$1, %ecx
	jle	.L10
	leaq	4+A(%rip), %rdx
	leal	-2(%rcx), %edi
	leaq	4(%rdx), %r8
	leaq	(%r8,%rdi,4), %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	(%rdx), %r9
	leal	1(%rsi), %r8d
	leaq	1(%rax), %rdi
	addq	%r9, %rax
	cmpl	%r8d, %r9d
	movq	%r9, %rsi
	cmove	%rdi, %rax
	addq	$4, %rdx
	cmpq	%r10, %rdx
	jne	.L13
	movq	%rax, ans(%rip)
	movq	%rax, %rdx
	movl	%ecx, i(%rip)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 800000
A:
	.zero	800000
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %r12
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L2
	xorl	%eax, %eax
	leaq	A(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movq	%r12, %rdi
	leaq	0(%rbp,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L3
.L2:
	movl	A(%rip), %esi
	testl	%esi, %esi
	jne	.L8
	movl	$0, i(%rip)
	cmpl	$1, %ecx
	jle	.L6
	leal	-2(%rcx), %r8d
	xorl	%edx, %edx
	movl	$1, %eax
	xorl	%r9d, %r9d
	addq	$2, %r8
	leaq	A(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	movl	$1, %r9d
	cmpq	%r8, %rax
	je	.L6
.L9:
	leal	1(%rdx), %edi
	movl	0(%rbp,%rax,4), %edx
	movl	%ebx, %r10d
	movl	%eax, %ebx
	cmpl	%edx, %edi
	jge	.L7
	testb	%r9b, %r9b
	je	.L8
	movl	%r10d, i(%rip)
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movq	ans(%rip), %rax
	movl	$1, i(%rip)
	movq	%rax, %rdx
	cmpl	$1, %ecx
	jle	.L10
	leaq	4+A(%rip), %rdx
	leal	-2(%rcx), %edi
	leaq	4(%rdx), %r8
	leaq	(%r8,%rdi,4), %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	(%rdx), %r9
	leal	1(%rsi), %r8d
	leaq	1(%rax), %rdi
	addq	%r9, %rax
	cmpl	%r8d, %r9d
	movq	%r9, %rsi
	cmove	%rdi, %rax
	addq	$4, %rdx
	cmpq	%r10, %rdx
	jne	.L13
	movq	%rax, ans(%rip)
	movq	%rax, %rdx
	movl	%ecx, i(%rip)
.L10:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 800000
A:
	.zero	800000
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:
```