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<stdlib.h>

#define H 250

int main(){
  int x,a,b,c,i,A[H+1];

  scanf("%d",&x);

  for(i=1;i<=x;i++){
    scanf("%d",&A[i]);
  }


  for(i=1;i<=x;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(i==1) {
      if(x==2) printf("left key = %d, ",A[2*i]);
      else printf("left key = %d, right key = %d, ",A[2*i],A[2*i+1]);
    }
    else
      {
	printf("parent key = %d, ",A[i/2]);
	if(x>=2*i) printf("left key = %d, ",A[2*i]);
 	if(x>=2*i+1) printf("right key = %d, ",A[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	"left key = %d, "
	.align 8
.LC3:
	.string	"left key = %d, right key = %d, "
.LC4:
	.string	"parent key = %d, "
.LC5:
	.string	"right key = %d, "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1028(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1028(%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, -1028(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L3
	movl	$1, -1028(%rbp)
	jmp	.L4
.L9:
	movl	-1028(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	cmpl	$1, -1028(%rbp)
	jne	.L5
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L6
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%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
	jmp	.L7
.L5:
	movl	-1028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L4:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"left key = %d, "
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"left key = %d, right key = %d, "
	.section	.rodata.str1.1
.LC4:
	.string	"parent key = %d, "
.LC5:
	.string	"right key = %d, "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	.L4
	.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	.L4
	movl	$2, %ebx
	movl	$1, %r15d
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r12
	leaq	.LC4(%rip), %r13
	leaq	.LC3(%rip), %r14
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$2, 12(%rsp)
	movl	24(%rsp), %edx
	je	.L17
	movl	28(%rsp), %ecx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movl	$10, %edi
	addq	$1, %r15
	addl	$2, %ebx
	call	putchar@PLT
	cmpl	%r15d, 12(%rsp)
	jl	.L4
.L8:
	movl	0(%rbp,%r15,4), %ecx
	xorl	%eax, %eax
	movl	%r15d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$1, %r15
	je	.L18
	movl	%r15d, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	sarl	%eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	12(%rsp), %ebx
	jg	.L7
	movl	0(%rbp,%r15,8), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	12(%rsp), %ebx
	jge	.L7
	movl	4(%rbp,%r15,8), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	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
.LFE39:
	.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	"left key = %d, "
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"left key = %d, right key = %d, "
	.section	.rodata.str1.1
.LC4:
	.string	"parent key = %d, "
.LC5:
	.string	"right key = %d, "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	.L4
	.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	.L4
	movl	$2, %ebx
	movl	$1, %r15d
	leaq	16(%rsp), %rbp
	leaq	.LC1(%rip), %r12
	leaq	.LC4(%rip), %r13
	leaq	.LC3(%rip), %r14
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$2, 12(%rsp)
	movl	24(%rsp), %edx
	je	.L17
	movl	28(%rsp), %ecx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movl	$10, %edi
	addq	$1, %r15
	addl	$2, %ebx
	call	putchar@PLT
	cmpl	%r15d, 12(%rsp)
	jl	.L4
.L8:
	movl	0(%rbp,%r15,4), %ecx
	xorl	%eax, %eax
	movl	%r15d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$1, %r15
	je	.L18
	movl	%r15d, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	sarl	%eax
	cltq
	movl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	12(%rsp), %ebx
	jg	.L7
	movl	0(%rbp,%r15,8), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	12(%rsp), %ebx
	jge	.L7
	movl	4(%rbp,%r15,8), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	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
.LFE39:
	.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<stdlib.h>

#define H 250

int main(){
  int x,a,b,c,i,A[H+1];

  scanf("%d",&x);

  for(i=1;i<=x;i++){
    scanf("%d",&A[i]);
  }


  for(i=1;i<=x;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(i==1) {
      if(x==2) printf("left key = %d, ",A[2*i]);
      else printf("left key = %d, right key = %d, ",A[2*i],A[2*i+1]);
    }
    else
      {
	printf("parent key = %d, ",A[i/2]);
	if(x>=2*i) printf("left key = %d, ",A[2*i]);
 	if(x>=2*i+1) printf("right key = %d, ",A[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>
#include<stdlib.h>

#define H 250

int main(){
  int x,a,b,c,i,A[H+1];

  scanf("%d",&x);

  for(i=1;i<=x;i++){
    scanf("%d",&A[i]);
  }


  for(i=1;i<=x;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(i==1) {
      if(x==2) printf("left key = %d, ",A[2*i]);
      else printf("left key = %d, right key = %d, ",A[2*i],A[2*i+1]);
    }
    else
      {
	printf("parent key = %d, ",A[i/2]);
	if(x>=2*i) printf("left key = %d, ",A[2*i]);
 	if(x>=2*i+1) printf("right key = %d, ",A[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	"left key = %d, "
	.align 8
.LC3:
	.string	"left key = %d, right key = %d, "
.LC4:
	.string	"parent key = %d, "
.LC5:
	.string	"right key = %d, "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1028(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1028(%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, -1028(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L3
	movl	$1, -1028(%rbp)
	jmp	.L4
.L9:
	movl	-1028(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	cmpl	$1, -1028(%rbp)
	jne	.L5
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L6
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%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
	jmp	.L7
.L5:
	movl	-1028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L4:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"node %d: key = %d, "
.LC2:
	.string	"left key = %d, "
	.align 8
.LC3:
	.string	"left key = %d, right key = %d, "
.LC4:
	.string	"parent key = %d, "
.LC5:
	.string	"right key = %d, "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1028(%rbp)
	jmp	.L2
.L3:
	leaq	-1024(%rbp), %rdx
	movl	-1028(%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, -1028(%rbp)
.L2:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L3
	movl	$1, -1028(%rbp)
	jmp	.L4
.L9:
	movl	-1028(%rbp), %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	cmpl	$1, -1028(%rbp)
	jne	.L5
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L6
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %edx
	movl	-1028(%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
	jmp	.L7
.L5:
	movl	-1028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-1028(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-1032(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	-1028(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	movl	-1024(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L4:
	movl	-1032(%rbp), %eax
	cmpl	%eax, -1028(%rbp)
	jle	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
