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>
#define ll long long
int main(){
    int n;
    scanf("%d",&n);
    ll a[n + 1];
    ll max = n;
    for(int i = 1; i <= n; i++){
        scanf("%lld",&a[i]);
        if(a[i] > n - 1)
            a[i] = 0;
    }
    ll ans = 0;
    ll b[n + 1], c[n + 1];
    for(int i = 1; i <= n; i++){
        b[i] = i - a[i];
        c[i] = i + a[i];
        if(a[i] == 0){
            b[i] = -1;
            c[i] = -1;
        }
    }
    int d[2 * n + 1];
    for(int i = 0; i < 2 * n; i++)
        d[i] = 0;
    for(int i = 1; i <= n; i++){
        if(c[i] >= 0)
            d[c[i]] ++;
    }
    for(int i = 1; i <= n; i++){
        if(b[i] >= 0){
            ans += d[b[i]];
        }
    }
    printf("%lld\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.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	$216, %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
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -128(%rbp)
	movslq	%edx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edx, %rax
	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, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	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, -120(%rbp)
	movl	-160(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L5
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	(%rdx,%rax,8), %rdx
	movl	-160(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, %rdx
	jle	.L6
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	$0, (%rdx,%rax,8)
.L6:
	addl	$1, -156(%rbp)
.L5:
	movl	-160(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jle	.L7
	movq	$0, -136(%rbp)
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,8), %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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movl	-160(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	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
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -152(%rbp)
	jmp	.L14
.L16:
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, %rcx
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L15
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
.L15:
	addl	$1, -152(%rbp)
.L14:
	movl	-160(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jle	.L16
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	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
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L20
.L21:
	movq	-64(%rbp), %rax
	movl	-148(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -148(%rbp)
.L20:
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	$1, -144(%rbp)
	jmp	.L22
.L24:
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L23
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	-64(%rbp), %rdx
	movl	(%rdx,%rax,4), %edx
	leal	1(%rdx), %ecx
	movq	-64(%rbp), %rdx
	movl	%ecx, (%rdx,%rax,4)
.L23:
	addl	$1, -144(%rbp)
.L22:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jle	.L24
	movl	$1, -140(%rbp)
	jmp	.L25
.L27:
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L26
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -136(%rbp)
.L26:
	addl	$1, -140(%rbp)
.L25:
	movl	-160(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jle	.L27
	movq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L29
	call	__stack_chk_fail@PLT
.L29:
	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	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %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
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	movq	%rsp, %rsi
	leal	1(%rcx), %eax
	cltq
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L46:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L46
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L47
.L4:
	movq	%rsp, %r15
	testl	%ecx, %ecx
	jle	.L5
	leaq	8(%r15), %rbx
	movl	$1, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	leal	-1(%rcx), %r13d
	movslq	%r13d, %rax
	cmpq	%rax, (%rbx)
	jle	.L6
	movq	$0, (%rbx)
.L6:
	addl	$1, %r12d
	addq	$8, %rbx
	cmpl	%r12d, %ecx
	jge	.L7
	leal	1(%rcx), %edi
	movq	%rsp, %rsi
	movslq	%edi, %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %r8
	movq	%rax, %rdx
	andq	$-4096, %r8
	andq	$-16, %rdx
	subq	%r8, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L48
.L10:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rsi
.L11:
	cmpq	%rsi, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L47:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L48:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L10
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L13:
	movq	%rsp, %r12
	testl	%ecx, %ecx
	jle	.L5
	movl	%edi, %edi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%r15,%rax,8), %rdx
	movq	%rax, %rsi
	subq	%rdx, %rsi
	movq	%rsi, (%rbx,%rax,8)
	leaq	(%rax,%rdx), %rsi
	movq	%rsi, (%r12,%rax,8)
	testq	%rdx, %rdx
	jne	.L14
	movq	$-1, (%rbx,%rax,8)
	movq	$-1, (%r12,%rax,8)
.L14:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	%ecx, %ecx
	movq	%rsp, %rsi
	leal	1(%rcx), %eax
	cltq
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L21:
	cmpq	%rsi, %rsp
	je	.L22
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L21
.L22:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L23
	orq	$0, -8(%rsp,%rdx)
.L23:
	movslq	%ecx, %rdx
	movl	$4, %eax
	movq	%rsp, %rdi
	movl	%r13d, %r13d
	salq	$2, %rdx
	testl	%ecx, %ecx
	cmovle	%rax, %rdx
	xorl	%esi, %esi
	salq	$3, %r13
	call	memset@PLT
	leaq	16(%r12,%r13), %rcx
	movq	%rax, %rdi
	leaq	8(%r12), %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	.L17
	addl	$1, (%rdi,%rdx,4)
.L17:
	addq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L18
	leaq	8(%rbx), %rax
	leaq	16(%rbx,%r13), %rcx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	.L19
	movslq	(%rdi,%rdx,4), %rdx
	addq	%rdx, %r8
.L19:
	addq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L20
.L24:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	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
.L5:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L24
.L49:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L13
.L50:
	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	"%lld"
.LC2:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %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
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	movq	%rsp, %rsi
	leal	1(%rcx), %eax
	cltq
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L46:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L46
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L47
.L4:
	movq	%rsp, %r15
	testl	%ecx, %ecx
	jle	.L5
	leaq	8(%r15), %rbx
	movl	$1, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	leal	-1(%rcx), %r13d
	movslq	%r13d, %rax
	cmpq	%rax, (%rbx)
	jle	.L6
	movq	$0, (%rbx)
.L6:
	addl	$1, %r12d
	addq	$8, %rbx
	cmpl	%r12d, %ecx
	jge	.L7
	leal	1(%rcx), %edi
	movq	%rsp, %rsi
	movslq	%edi, %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %r8
	movq	%rax, %rdx
	andq	$-4096, %r8
	andq	$-16, %rdx
	subq	%r8, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L48
.L10:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %rbx
	andq	$-16, %rdx
	subq	%rax, %rsi
.L11:
	cmpq	%rsi, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L47:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L48:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L10
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L13:
	movq	%rsp, %r12
	testl	%ecx, %ecx
	jle	.L5
	movl	%edi, %edi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%r15,%rax,8), %rdx
	movq	%rax, %rsi
	subq	%rdx, %rsi
	movq	%rsi, (%rbx,%rax,8)
	leaq	(%rax,%rdx), %rsi
	movq	%rsi, (%r12,%rax,8)
	testq	%rdx, %rdx
	jne	.L14
	movq	$-1, (%rbx,%rax,8)
	movq	$-1, (%r12,%rax,8)
.L14:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	%ecx, %ecx
	movq	%rsp, %rsi
	leal	1(%rcx), %eax
	cltq
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L21:
	cmpq	%rsi, %rsp
	je	.L22
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L21
.L22:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L23
	orq	$0, -8(%rsp,%rdx)
.L23:
	movslq	%ecx, %rdx
	movl	$4, %eax
	movq	%rsp, %rdi
	movl	%r13d, %r13d
	salq	$2, %rdx
	testl	%ecx, %ecx
	cmovle	%rax, %rdx
	xorl	%esi, %esi
	salq	$3, %r13
	call	memset@PLT
	leaq	16(%r12,%r13), %rcx
	movq	%rax, %rdi
	leaq	8(%r12), %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	.L17
	addl	$1, (%rdi,%rdx,4)
.L17:
	addq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L18
	leaq	8(%rbx), %rax
	leaq	16(%rbx,%r13), %rcx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L20:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	.L19
	movslq	(%rdi,%rdx,4), %rdx
	addq	%rdx, %r8
.L19:
	addq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L20
.L24:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	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
.L5:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L24
.L49:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L13
.L50:
	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>
#define ll long long
int main(){
    int n;
    scanf("%d",&n);
    ll a[n + 1];
    ll max = n;
    for(int i = 1; i <= n; i++){
        scanf("%lld",&a[i]);
        if(a[i] > n - 1)
            a[i] = 0;
    }
    ll ans = 0;
    ll b[n + 1], c[n + 1];
    for(int i = 1; i <= n; i++){
        b[i] = i - a[i];
        c[i] = i + a[i];
        if(a[i] == 0){
            b[i] = -1;
            c[i] = -1;
        }
    }
    int d[2 * n + 1];
    for(int i = 0; i < 2 * n; i++)
        d[i] = 0;
    for(int i = 1; i <= n; i++){
        if(c[i] >= 0)
            d[c[i]] ++;
    }
    for(int i = 1; i <= n; i++){
        if(b[i] >= 0){
            ans += d[b[i]];
        }
    }
    printf("%lld\n",ans);
    return 0;
}
32
3 1 4 1 5 9 4 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 9 5
 32
3 1 4 1 5 9 4 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 2 5
 32
3 1 4 1 5 9 4 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 2 8
 32
3 1 4 1 5 9 4 12 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 2 8
 6
2 3 6 1 3 1
 32
3 1 4 1 8 9 4 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 2 8
 32
3 1 4 1 5 9 4 12 5 3 5 8 9 7 9 3 2 4 8 4 6 2 6 4 3 3 8 3 2 7 2 8
 32
2 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 17 5
 32
2 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 4 7 17 5
 32
3 1 4 1 8 11 8 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 3 7 2 14

23
 24
 25
 27
 3
 26
 28
 21
 19
 20

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>
#define ll long long
int main(){
    int n;
    scanf("%d",&n);
    ll a[n + 1];
    ll max = n;
    for(int i = 1; i <= n; i++){
        scanf("%lld",&a[i]);
        if(a[i] > n - 1)
            a[i] = 0;
    }
    ll ans = 0;
    ll b[n + 1], c[n + 1];
    for(int i = 1; i <= n; i++){
        b[i] = i - a[i];
        c[i] = i + a[i];
        if(a[i] == 0){
            b[i] = -1;
            c[i] = -1;
        }
    }
    int d[2 * n + 1];
    for(int i = 0; i < 2 * n; i++)
        d[i] = 0;
    for(int i = 1; i <= n; i++){
        if(c[i] >= 0)
            d[c[i]] ++;
    }
    for(int i = 1; i <= n; i++){
        if(b[i] >= 0){
            ans += d[b[i]];
        }
    }
    printf("%lld\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.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	$216, %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
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -128(%rbp)
	movslq	%edx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edx, %rax
	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, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	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, -120(%rbp)
	movl	-160(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L5
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	(%rdx,%rax,8), %rdx
	movl	-160(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, %rdx
	jle	.L6
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	$0, (%rdx,%rax,8)
.L6:
	addl	$1, -156(%rbp)
.L5:
	movl	-160(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jle	.L7
	movq	$0, -136(%rbp)
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,8), %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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movl	-160(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	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
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -152(%rbp)
	jmp	.L14
.L16:
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, %rcx
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L15
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
.L15:
	addl	$1, -152(%rbp)
.L14:
	movl	-160(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jle	.L16
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	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
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L20
.L21:
	movq	-64(%rbp), %rax
	movl	-148(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -148(%rbp)
.L20:
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	$1, -144(%rbp)
	jmp	.L22
.L24:
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L23
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	-64(%rbp), %rdx
	movl	(%rdx,%rax,4), %edx
	leal	1(%rdx), %ecx
	movq	-64(%rbp), %rdx
	movl	%ecx, (%rdx,%rax,4)
.L23:
	addl	$1, -144(%rbp)
.L22:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jle	.L24
	movl	$1, -140(%rbp)
	jmp	.L25
.L27:
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L26
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -136(%rbp)
.L26:
	addl	$1, -140(%rbp)
.L25:
	movl	-160(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jle	.L27
	movq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L29
	call	__stack_chk_fail@PLT
.L29:
	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	"%lld"
.LC2:
	.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	$216, %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
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -128(%rbp)
	movslq	%edx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%edx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edx, %rax
	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, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	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, -120(%rbp)
	movl	-160(%rbp), %eax
	cltq
	movq	%rax, -112(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L5
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	(%rdx,%rax,8), %rdx
	movl	-160(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, %rdx
	jle	.L6
	movq	-120(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movq	$0, (%rdx,%rax,8)
.L6:
	addl	$1, -156(%rbp)
.L5:
	movl	-160(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jle	.L7
	movq	$0, -136(%rbp)
	movl	-160(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,8), %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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movl	-160(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	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
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -152(%rbp)
	jmp	.L14
.L16:
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, %rcx
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movl	-152(%rbp), %eax
	movslq	%eax, %rcx
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-120(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L15
	movq	-96(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
	movq	-80(%rbp), %rax
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	movq	$-1, (%rax,%rdx,8)
.L15:
	addl	$1, -152(%rbp)
.L14:
	movl	-160(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jle	.L16
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	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
.L17:
	cmpq	%rdx, %rsp
	je	.L18
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L17
.L18:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L19
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L19:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L20
.L21:
	movq	-64(%rbp), %rax
	movl	-148(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -148(%rbp)
.L20:
	movl	-160(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	$1, -144(%rbp)
	jmp	.L22
.L24:
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L23
	movq	-80(%rbp), %rax
	movl	-144(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	-64(%rbp), %rdx
	movl	(%rdx,%rax,4), %edx
	leal	1(%rdx), %ecx
	movq	-64(%rbp), %rdx
	movl	%ecx, (%rdx,%rax,4)
.L23:
	addl	$1, -144(%rbp)
.L22:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jle	.L24
	movl	$1, -140(%rbp)
	jmp	.L25
.L27:
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	js	.L26
	movq	-96(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-64(%rbp), %rax
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -136(%rbp)
.L26:
	addl	$1, -140(%rbp)
.L25:
	movl	-160(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jle	.L27
	movq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%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	.L29
	call	__stack_chk_fail@PLT
.L29:
	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:
