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 i,d=0,s=1,n,data[251];
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d",&data[i]);
for(i=1;i<=n;i++){
printf("node %d: key = %d, ",i,data[i]);
if(i/2)
printf("parent key = %d, ",data[i/2]);
if(2*i<=n)
printf("left key = %d, ",data[2*i]);
if(2*i+1<=n)
printf("right key = %d, ",data[2*i+1]);
printf("\n");
}

return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"node %d: key = %d, "
.LC2:
	.string	"parent key = %d, "
.LC3:
	.string	"left key = %d, "
.LC4:
	.string	"right key = %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
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1032(%rbp)
	movl	$1, -1028(%rbp)
	leaq	-1040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1036(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1036(%rbp)
.L2:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L3
	movl	$1, -1036(%rbp)
	jmp	.L4
.L8:
	movl	-1036(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1036(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1036(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L5
	movl	-1036(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1036(%rbp)
.L4:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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"
.LC1:
	.string	"node %d: key = %d, "
.LC2:
	.string	"parent key = %d, "
.LC3:
	.string	"left key = %d, "
.LC4:
	.string	"right key = %d, "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$1, %ebx
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jge	.L3
	testl	%eax, %eax
	jle	.L5
	movl	20(%rsp), %ecx
	movl	$1, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %r12
	movl	$2, %ebp
	movl	$2, %r14d
	movq	%r12, %rsi
	leaq	.LC2(%rip), %r13
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%eax, %ebp
	jl	.L18
.L7:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L5
	leaq	16(%rsp), %r15
.L8:
	movl	(%r15,%r14,4), %ecx
	movl	%ebx, %edx
	sarl	%ebx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movslq	%ebx, %rbx
	addq	$1, %r14
	call	__printf_chk@PLT
	movl	16(%rsp,%rbx,4), %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L9:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L6
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	cmpl	%eax, %ebp
	jge	.L7
.L18:
	movl	12(%rsp,%r14,8), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r14d, %ebx
	leaq	.LC4(%rip), %rsi
	leaq	16(%rsp), %r15
	addl	$2, %ebp
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jge	.L8
.L5:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	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	"node %d: key = %d, "
.LC2:
	.string	"parent key = %d, "
.LC3:
	.string	"left key = %d, "
.LC4:
	.string	"right key = %d, "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$1, %ebx
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jge	.L3
	testl	%eax, %eax
	jle	.L5
	movl	20(%rsp), %ecx
	movl	$1, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %r12
	movl	$2, %ebp
	movl	$2, %r14d
	movq	%r12, %rsi
	leaq	.LC2(%rip), %r13
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%eax, %ebp
	jl	.L18
.L7:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L5
	leaq	16(%rsp), %r15
.L8:
	movl	(%r15,%r14,4), %ecx
	movl	%ebx, %edx
	sarl	%ebx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movslq	%ebx, %rbx
	addq	$1, %r14
	call	__printf_chk@PLT
	movl	16(%rsp,%rbx,4), %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
.L9:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L6
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	cmpl	%eax, %ebp
	jge	.L7
.L18:
	movl	12(%rsp,%r14,8), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r14d, %ebx
	leaq	.LC4(%rip), %rsi
	leaq	16(%rsp), %r15
	addl	$2, %ebp
	call	__printf_chk@PLT
	movl	$10, %edi
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jge	.L8
.L5:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	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 i,d=0,s=1,n,data[251];
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d",&data[i]);
for(i=1;i<=n;i++){
printf("node %d: key = %d, ",i,data[i]);
if(i/2)
printf("parent key = %d, ",data[i/2]);
if(2*i<=n)
printf("left key = %d, ",data[2*i]);
if(2*i+1<=n)
printf("right key = %d, ",data[2*i+1]);
printf("\n");
}

return 0;
}

5
7 8 1 4 3
 5
2 8 1 4 3
 5
4 8 1 4 3
 5
4 8 1 1 3
 5
4 8 1 1 5
 5
4 8 1 2 5
 5
4 16 1 2 5
 5
4 16 1 2 3
 5
4 16 1 0 3
 5
4 16 0 0 3

node 1: key = 7, left key = 8, right key = 1, 
node 2: key = 8, parent key = 7, left key = 4, right key = 3, 
node 3: key = 1, parent key = 7, 
node 4: key = 4, parent key = 8, 
node 5: key = 3, parent key = 8, 
 node 1: key = 2, left key = 8, right key = 1, 
node 2: key = 8, parent key = 2, left key = 4, right key = 3, 
node 3: key = 1, parent key = 2, 
node 4: key = 4, parent key = 8, 
node 5: key = 3, parent key = 8, 
 node 1: key = 4, left key = 8, right key = 1, 
node 2: key = 8, parent key = 4, left key = 4, right key = 3, 
node 3: key = 1, parent key = 4, 
node 4: key = 4, parent key = 8, 
node 5: key = 3, parent key = 8, 
 node 1: key = 4, left key = 8, right key = 1, 
node 2: key = 8, parent key = 4, left key = 1, right key = 3, 
node 3: key = 1, parent key = 4, 
node 4: key = 1, parent key = 8, 
node 5: key = 3, parent key = 8, 
 node 1: key = 4, left key = 8, right key = 1, 
node 2: key = 8, parent key = 4, left key = 1, right key = 5, 
node 3: key = 1, parent key = 4, 
node 4: key = 1, parent key = 8, 
node 5: key = 5, parent key = 8, 
 node 1: key = 4, left key = 8, right key = 1, 
node 2: key = 8, parent key = 4, left key = 2, right key = 5, 
node 3: key = 1, parent key = 4, 
node 4: key = 2, parent key = 8, 
node 5: key = 5, parent key = 8, 
 node 1: key = 4, left key = 16, right key = 1, 
node 2: key = 16, parent key = 4, left key = 2, right key = 5, 
node 3: key = 1, parent key = 4, 
node 4: key = 2, parent key = 16, 
node 5: key = 5, parent key = 16, 
 node 1: key = 4, left key = 16, right key = 1, 
node 2: key = 16, parent key = 4, left key = 2, right key = 3, 
node 3: key = 1, parent key = 4, 
node 4: key = 2, parent key = 16, 
node 5: key = 3, parent key = 16, 
 node 1: key = 4, left key = 16, right key = 1, 
node 2: key = 16, parent key = 4, left key = 0, right key = 3, 
node 3: key = 1, parent key = 4, 
node 4: key = 0, parent key = 16, 
node 5: key = 3, parent key = 16, 
 node 1: key = 4, left key = 16, right key = 0, 
node 2: key = 16, parent key = 4, left key = 0, right key = 3, 
node 3: key = 0, parent key = 4, 
node 4: key = 0, parent key = 16, 
node 5: key = 3, parent key = 16, 

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 i,d=0,s=1,n,data[251];
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d",&data[i]);
for(i=1;i<=n;i++){
printf("node %d: key = %d, ",i,data[i]);
if(i/2)
printf("parent key = %d, ",data[i/2]);
if(2*i<=n)
printf("left key = %d, ",data[2*i]);
if(2*i+1<=n)
printf("right key = %d, ",data[2*i+1]);
printf("\n");
}

return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"node %d: key = %d, "
.LC2:
	.string	"parent key = %d, "
.LC3:
	.string	"left key = %d, "
.LC4:
	.string	"right key = %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
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1032(%rbp)
	movl	$1, -1028(%rbp)
	leaq	-1040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1036(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1036(%rbp)
.L2:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L3
	movl	$1, -1036(%rbp)
	jmp	.L4
.L8:
	movl	-1036(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1036(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1036(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L5
	movl	-1036(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1036(%rbp)
.L4:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"node %d: key = %d, "
.LC2:
	.string	"parent key = %d, "
.LC3:
	.string	"left key = %d, "
.LC4:
	.string	"right key = %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
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1032(%rbp)
	movl	$1, -1028(%rbp)
	leaq	-1040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1036(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1036(%rbp)
.L2:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L3
	movl	$1, -1036(%rbp)
	jmp	.L4
.L8:
	movl	-1036(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1036(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1036(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	jbe	.L5
	movl	-1036(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	movl	-1036(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1040(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1036(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1036(%rbp)
.L4:
	movl	-1040(%rbp), %eax
	cmpl	%eax, -1036(%rbp)
	jle	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
