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>
#define MAX 100000
int parent(int i) {return i/2;}
int left(int i) {return 2*i;}
int right(int i){ return 2*i+1;}

int main(){
  int H,i,A[MAX+1];

  scanf("%d",&H);

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

  for(i=1;i<=H;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(parent(i)>=1) printf("parent key = %d, ",A[parent(i)]);
    if(left(i)<=H) printf("left key = %d, ",A[left(i)]);
    if(right(i)<=H) printf("right key = %d, ",A[right(i)]);
    printf("\n");
  }
  return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE23:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB24:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE24:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB25:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE25:
	.size	right, .-right
	.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:
.LFB26:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	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	.L7
	testl	%eax, %eax
	jle	.L9
	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	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jge	.L21
.L11:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L9
	leaq	16(%rsp), %r15
.L12:
	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
.L13:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L10
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L11
.L21:
	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	.L12
.L9:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$400040, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE23:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB24:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE24:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB25:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE25:
	.size	right, .-right
	.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:
.LFB26:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	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	.L7
	testl	%eax, %eax
	jle	.L9
	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	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jge	.L21
.L11:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L9
	leaq	16(%rsp), %r15
.L12:
	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
.L13:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L10
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L11
.L21:
	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	.L12
.L9:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$400040, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE23:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB24:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE24:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB25:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE25:
	.size	right, .-right
	.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:
.LFB26:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	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	.L7
	testl	%eax, %eax
	jle	.L9
	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	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jge	.L21
.L11:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L9
	leaq	16(%rsp), %r15
.L12:
	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
.L13:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L10
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L11
.L21:
	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	.L12
.L9:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$400040, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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:
```
```c
#include<stdio.h>
#define MAX 100000
int parent(int i) {return i/2;}
int left(int i) {return 2*i;}
int right(int i){ return 2*i+1;}

int main(){
  int H,i,A[MAX+1];

  scanf("%d",&H);

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

  for(i=1;i<=H;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(parent(i)>=1) printf("parent key = %d, ",A[parent(i)]);
    if(left(i)<=H) printf("left key = %d, ",A[left(i)]);
    if(right(i)<=H) printf("right key = %d, ",A[right(i)]);
    printf("\n");
  }
  return 0;
}

```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define MAX 100000
int parent(int i) {return i/2;}
int left(int i) {return 2*i;}
int right(int i){ return 2*i+1;}

int main(){
  int H,i,A[MAX+1];

  scanf("%d",&H);

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

  for(i=1;i<=H;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(parent(i)>=1) printf("parent key = %d, ",A[parent(i)]);
    if(left(i)<=H) printf("left key = %d, ",A[left(i)]);
    if(right(i)<=H) printf("right key = %d, ",A[right(i)]);
    printf("\n");
  }
  return 0;
}

```

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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define MAX 100000
int parent(int i) {return i/2;}
int left(int i) {return 2*i;}
int right(int i){ return 2*i+1;}

int main(){
  int H,i,A[MAX+1];

  scanf("%d",&H);

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

  for(i=1;i<=H;i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(parent(i)>=1) printf("parent key = %d, ",A[parent(i)]);
    if(left(i)<=H) printf("left key = %d, ",A[left(i)]);
    if(right(i)<=H) printf("right key = %d, ",A[right(i)]);
    printf("\n");
  }
  return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE23:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB24:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE24:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB25:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE25:
	.size	right, .-right
	.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:
.LFB26:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	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	.L7
	testl	%eax, %eax
	jle	.L9
	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	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jge	.L21
.L11:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L9
	leaq	16(%rsp), %r15
.L12:
	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
.L13:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L10
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L11
.L21:
	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	.L12
.L9:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$400040, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE23:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB24:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE24:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB25:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE25:
	.size	right, .-right
	.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:
.LFB26:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	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	.L7
	testl	%eax, %eax
	jle	.L9
	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	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jge	.L21
.L11:
	movl	$10, %edi
	movl	%r14d, %ebx
	addl	$2, %ebp
	call	putchar@PLT
	cmpl	%r14d, 12(%rsp)
	jl	.L9
	leaq	16(%rsp), %r15
.L12:
	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
.L13:
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jl	.L10
	movl	8(%rsp,%r14,8), %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	leal	1(%rbp), %edx
	cmpl	%edx, %eax
	jl	.L11
.L21:
	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	.L12
.L9:
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$400040, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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:
```