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<string.h>
#define MAX 2000000
#define INFTY (1<<30)

int H, A[MAX+1];

int parent(int i){ return i/2; }
int left(int i){ return 2*i; }
int right(int i){ return (2*i)+1; }

void maxHeapify(int i){
  int l, r, largest, tmp;
  l = left(i);
  r = right(i);
  if( l <= H && A[l] > A[i] ) largest = l;
  else largest = i;
  
  if( r <= H && A[r] > A[largest] ) largest = r;

  if( largest != i ){
    tmp = A[i];
    A[i] = A[largest];
    A[largest] = tmp;
    maxHeapify(largest);
  }
}

int extract(){
  int maxv;
  if( H < 1 ) return -INFTY;
  maxv = A[1];
  A[1] = A[H--];
  maxHeapify(1);
  return maxv;
}

void increaseKey(int i, int key){
  int tmp;
  if( key < A[i] ) return;
  A[i] = key;
  while( i > 1 && A[i/2] < A[i] ){
    tmp = A[i];
    A[i] = A[i/2];
    A[i/2] = tmp;
    i = i / 2;
  }
}

void insert(int key){
  H++;
  A[H] = -INFTY;
  increaseKey(H,key);
}

int main(){
  int key;
  char c[10];

  while( 1 ){
    scanf("%s",c);
    if( c[0] == 'e' && c[1] == 'n' ) break;
    if( c[0] == 'i' ){
      scanf("%d",&key);
      insert(key);
    }
    else printf("%d\n",extract());
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 8000004
A:
	.zero	8000004
	.text
	.globl	parent
	.type	parent, @function
parent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	parent, .-parent
	.globl	left
	.type	left, @function
left:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	left, .-left
	.globl	right
	.type	right, @function
right:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	right, .-right
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	left
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	right
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L8
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L9
.L8:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L9:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L12
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	maxHeapify
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.globl	extract
	.type	extract, @function
extract:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	H(%rip), %eax
	testl	%eax, %eax
	jg	.L14
	movl	$-1073741824, %eax
	jmp	.L15
.L14:
	movl	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, H(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	extract, .-extract
	.globl	increaseKey
	.type	increaseKey, @function
increaseKey:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L20:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
.L19:
	cmpl	$1, -20(%rbp)
	jle	.L16
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L20
	jmp	.L16
.L21:
	nop
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	increaseKey, .-increaseKey
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$-1073741824, (%rdx,%rax)
	movl	H(%rip), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	increaseKey
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L28:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$101, %al
	jne	.L24
	movzbl	-17(%rbp), %eax
	cmpb	$110, %al
	je	.L32
.L24:
	movzbl	-18(%rbp), %eax
	cmpb	$105, %al
	jne	.L26
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L28
.L26:
	movl	$0, %eax
	call	extract
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L28
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE35:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB36:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE36:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB37:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE37:
	.size	right, .-right
	.p2align 4
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB38:
	.cfi_startproc
	endbr64
	movl	H(%rip), %r9d
	leaq	A(%rip), %rdx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	movl	%r8d, %r10d
	cmpl	(%rdx,%rcx,4), %r8d
	jle	.L6
	cmpl	%eax, %r9d
	jge	.L11
	movl	%esi, %eax
.L7:
	cmpl	%edi, %eax
	je	.L5
	movl	(%rdx,%rcx,4), %esi
	movl	%r8d, (%rdx,%rcx,4)
	movslq	%eax, %rcx
	movl	%eax, %edi
	movl	%esi, (%rdx,%rcx,4)
.L9:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	jge	.L12
.L6:
	cmpl	%eax, %r9d
	jl	.L5
	movslq	%eax, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	cmpl	%r8d, (%rdx,%rcx,4)
	jl	.L7
.L5:
	ret
.L11:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L7
	movl	%r10d, %r8d
	movl	%esi, %eax
	jmp	.L7
	.cfi_endproc
.LFE38:
	.size	maxHeapify, .-maxHeapify
	.p2align 4
	.globl	extract
	.type	extract, @function
extract:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	H(%rip), %rax
	testl	%eax, %eax
	jle	.L18
	leaq	A(%rip), %rsi
	leal	-1(%rax), %r8d
	movl	4+A(%rip), %r10d
	movl	(%rsi,%rax,4), %r9d
	movl	$1, %eax
	movl	%r8d, H(%rip)
	leal	(%rax,%rax), %ecx
	movl	%r9d, 4+A(%rip)
	leal	1(%rcx), %edx
	cmpl	%ecx, %r8d
	jl	.L15
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %r9d
	jge	.L15
	cmpl	%edx, %r8d
	jge	.L21
.L19:
	movl	%ecx, %edx
.L16:
	cmpl	%edx, %eax
	je	.L13
	movl	%edi, (%rsi,%rax,4)
	movslq	%edx, %rax
	movl	%r9d, (%rsi,%rax,4)
	movslq	%edx, %rax
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edx
	cmpl	%ecx, %r8d
	jge	.L22
.L15:
	cmpl	%edx, %r8d
	jl	.L13
	movslq	%edx, %rcx
	movl	(%rsi,%rcx,4), %edi
	cmpl	%edi, %r9d
	jl	.L16
.L13:
	movl	%r10d, %eax
	ret
.L18:
	movl	$-1073741824, %r10d
	jmp	.L13
.L21:
	movslq	%edx, %r11
	movl	(%rsi,%r11,4), %r11d
	cmpl	%r11d, %edi
	jge	.L19
	movl	%r11d, %edi
	jmp	.L16
	.cfi_endproc
.LFE39:
	.size	extract, .-extract
	.p2align 4
	.globl	increaseKey
	.type	increaseKey, @function
increaseKey:
.LFB40:
	.cfi_startproc
	endbr64
	leaq	A(%rip), %rdx
	movslq	%edi, %rax
	cmpl	%esi, (%rdx,%rax,4)
	jg	.L23
	movl	%esi, (%rdx,%rax,4)
	cmpl	$1, %edi
	jg	.L25
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ecx, (%rdx,%rax,4)
	movl	%esi, (%rdx,%r8,4)
	cmpl	$1, %edi
	je	.L23
.L25:
	movslq	%edi, %rax
	sarl	%edi
	movslq	%edi, %r8
	movl	(%rdx,%r8,4), %ecx
	cmpl	%ecx, %esi
	jg	.L27
.L23:
	ret
.L32:
	ret
	.cfi_endproc
.LFE40:
	.size	increaseKey, .-increaseKey
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB41:
	.cfi_startproc
	endbr64
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	cmpl	$-1073741824, %edi
	jl	.L42
	leaq	A(%rip), %rcx
	movslq	%eax, %rdx
	movl	%edi, (%rcx,%rdx,4)
	cmpl	$1, %eax
	jg	.L35
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%esi, (%rcx,%rdx,4)
	movl	%edi, (%rcx,%r8,4)
	cmpl	$1, %eax
	je	.L33
.L35:
	movslq	%eax, %rdx
	sarl	%eax
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %esi
	cmpl	%esi, %edi
	jg	.L37
.L33:
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	cltq
	leaq	A(%rip), %rdx
	movl	$-1073741824, (%rdx,%rax,4)
	ret
.L43:
	ret
	.cfi_endproc
.LFE41:
	.size	insert, .-insert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	A(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	14(%rsp), %eax
	cmpb	$101, %al
	je	.L68
	cmpb	$105, %al
	jne	.L48
	movq	%r14, %rdi
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	movl	8(%rsp), %edi
	addl	$1, %eax
	movl	%eax, H(%rip)
	cmpl	$-1073741824, %edi
	jl	.L49
	movslq	%eax, %rdx
	movl	%edi, (%rbx,%rdx,4)
	cmpl	$1, %eax
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L50:
	movslq	%eax, %rdx
	sarl	%eax
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	jle	.L45
	movl	%ecx, (%rbx,%rdx,4)
	movl	%edi, (%rbx,%rsi,4)
	cmpl	$1, %eax
	jne	.L50
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L68:
	cmpb	$110, 15(%rsp)
	je	.L69
.L48:
	movslq	H(%rip), %rax
	testl	%eax, %eax
	jle	.L59
	movl	(%rbx,%rax,4), %r8d
	leal	-1(%rax), %edi
	movl	$1, %eax
	movl	4+A(%rip), %r9d
	leal	(%rax,%rax), %edx
	movl	%edi, H(%rip)
	movl	%r8d, 4+A(%rip)
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jl	.L54
	.p2align 4,,10
	.p2align 3
.L71:
	movslq	%edx, %rcx
	movl	(%rbx,%rcx,4), %ecx
	cmpl	%ecx, %r8d
	jge	.L54
	cmpl	%esi, %edi
	jge	.L70
.L60:
	movl	%edx, %esi
.L55:
	cmpl	%esi, %eax
	je	.L53
	movl	%ecx, (%rbx,%rax,4)
	movslq	%esi, %rax
	movl	%r8d, (%rbx,%rax,4)
	movslq	%esi, %rax
	leal	(%rax,%rax), %edx
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jge	.L71
.L54:
	cmpl	%esi, %edi
	jl	.L53
	movslq	%esi, %rdx
	movl	(%rbx,%rdx,4), %ecx
	cmpl	%ecx, %r8d
	jl	.L55
	.p2align 4,,10
	.p2align 3
.L53:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L45
.L69:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	cltq
	movl	$-1073741824, (%rbx,%rax,4)
	jmp	.L45
.L59:
	movl	$-1073741824, %r9d
	jmp	.L53
.L72:
	call	__stack_chk_fail@PLT
.L70:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	cmpl	%r10d, %ecx
	jge	.L60
	movl	%r10d, %ecx
	jmp	.L55
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 8000004
A:
	.zero	8000004
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	parent
	.type	parent, @function
parent:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE35:
	.size	parent, .-parent
	.p2align 4
	.globl	left
	.type	left, @function
left:
.LFB36:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE36:
	.size	left, .-left
	.p2align 4
	.globl	right
	.type	right, @function
right:
.LFB37:
	.cfi_startproc
	endbr64
	leal	1(%rdi,%rdi), %eax
	ret
	.cfi_endproc
.LFE37:
	.size	right, .-right
	.p2align 4
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB38:
	.cfi_startproc
	endbr64
	movl	H(%rip), %r9d
	leaq	A(%rip), %rdx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	movl	%r8d, %r10d
	cmpl	(%rdx,%rcx,4), %r8d
	jle	.L6
	cmpl	%eax, %r9d
	jge	.L11
	movl	%esi, %eax
.L7:
	cmpl	%edi, %eax
	je	.L5
	movl	(%rdx,%rcx,4), %esi
	movl	%r8d, (%rdx,%rcx,4)
	movslq	%eax, %rcx
	movl	%eax, %edi
	movl	%esi, (%rdx,%rcx,4)
.L9:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	jge	.L12
.L6:
	cmpl	%eax, %r9d
	jl	.L5
	movslq	%eax, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	cmpl	%r8d, (%rdx,%rcx,4)
	jl	.L7
.L5:
	ret
.L11:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L7
	movl	%r10d, %r8d
	movl	%esi, %eax
	jmp	.L7
	.cfi_endproc
.LFE38:
	.size	maxHeapify, .-maxHeapify
	.p2align 4
	.globl	extract
	.type	extract, @function
extract:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	H(%rip), %rax
	testl	%eax, %eax
	jle	.L18
	leaq	A(%rip), %rsi
	leal	-1(%rax), %r8d
	movl	4+A(%rip), %r10d
	movl	(%rsi,%rax,4), %r9d
	movl	$1, %eax
	movl	%r8d, H(%rip)
	leal	(%rax,%rax), %ecx
	movl	%r9d, 4+A(%rip)
	leal	1(%rcx), %edx
	cmpl	%ecx, %r8d
	jl	.L15
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %edi
	cmpl	%edi, %r9d
	jge	.L15
	cmpl	%edx, %r8d
	jge	.L21
.L19:
	movl	%ecx, %edx
.L16:
	cmpl	%edx, %eax
	je	.L13
	movl	%edi, (%rsi,%rax,4)
	movslq	%edx, %rax
	movl	%r9d, (%rsi,%rax,4)
	movslq	%edx, %rax
	leal	(%rax,%rax), %ecx
	leal	1(%rcx), %edx
	cmpl	%ecx, %r8d
	jge	.L22
.L15:
	cmpl	%edx, %r8d
	jl	.L13
	movslq	%edx, %rcx
	movl	(%rsi,%rcx,4), %edi
	cmpl	%edi, %r9d
	jl	.L16
.L13:
	movl	%r10d, %eax
	ret
.L18:
	movl	$-1073741824, %r10d
	jmp	.L13
.L21:
	movslq	%edx, %r11
	movl	(%rsi,%r11,4), %r11d
	cmpl	%r11d, %edi
	jge	.L19
	movl	%r11d, %edi
	jmp	.L16
	.cfi_endproc
.LFE39:
	.size	extract, .-extract
	.p2align 4
	.globl	increaseKey
	.type	increaseKey, @function
increaseKey:
.LFB40:
	.cfi_startproc
	endbr64
	leaq	A(%rip), %rdx
	movslq	%edi, %rax
	cmpl	%esi, (%rdx,%rax,4)
	jg	.L23
	movl	%esi, (%rdx,%rax,4)
	cmpl	$1, %edi
	jg	.L25
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ecx, (%rdx,%rax,4)
	movl	%esi, (%rdx,%r8,4)
	cmpl	$1, %edi
	je	.L23
.L25:
	movslq	%edi, %rax
	sarl	%edi
	movslq	%edi, %r8
	movl	(%rdx,%r8,4), %ecx
	cmpl	%ecx, %esi
	jg	.L27
.L23:
	ret
.L32:
	ret
	.cfi_endproc
.LFE40:
	.size	increaseKey, .-increaseKey
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB41:
	.cfi_startproc
	endbr64
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	cmpl	$-1073741824, %edi
	jl	.L42
	leaq	A(%rip), %rcx
	movslq	%eax, %rdx
	movl	%edi, (%rcx,%rdx,4)
	cmpl	$1, %eax
	jg	.L35
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%esi, (%rcx,%rdx,4)
	movl	%edi, (%rcx,%r8,4)
	cmpl	$1, %eax
	je	.L33
.L35:
	movslq	%eax, %rdx
	sarl	%eax
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %esi
	cmpl	%esi, %edi
	jg	.L37
.L33:
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	cltq
	leaq	A(%rip), %rdx
	movl	$-1073741824, (%rdx,%rax,4)
	ret
.L43:
	ret
	.cfi_endproc
.LFE41:
	.size	insert, .-insert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	A(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	14(%rsp), %eax
	cmpb	$101, %al
	je	.L68
	cmpb	$105, %al
	jne	.L48
	movq	%r14, %rdi
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	H(%rip), %eax
	movl	8(%rsp), %edi
	addl	$1, %eax
	movl	%eax, H(%rip)
	cmpl	$-1073741824, %edi
	jl	.L49
	movslq	%eax, %rdx
	movl	%edi, (%rbx,%rdx,4)
	cmpl	$1, %eax
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L50:
	movslq	%eax, %rdx
	sarl	%eax
	movslq	%eax, %rsi
	movl	(%rbx,%rsi,4), %ecx
	cmpl	%ecx, %edi
	jle	.L45
	movl	%ecx, (%rbx,%rdx,4)
	movl	%edi, (%rbx,%rsi,4)
	cmpl	$1, %eax
	jne	.L50
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L68:
	cmpb	$110, 15(%rsp)
	je	.L69
.L48:
	movslq	H(%rip), %rax
	testl	%eax, %eax
	jle	.L59
	movl	(%rbx,%rax,4), %r8d
	leal	-1(%rax), %edi
	movl	$1, %eax
	movl	4+A(%rip), %r9d
	leal	(%rax,%rax), %edx
	movl	%edi, H(%rip)
	movl	%r8d, 4+A(%rip)
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jl	.L54
	.p2align 4,,10
	.p2align 3
.L71:
	movslq	%edx, %rcx
	movl	(%rbx,%rcx,4), %ecx
	cmpl	%ecx, %r8d
	jge	.L54
	cmpl	%esi, %edi
	jge	.L70
.L60:
	movl	%edx, %esi
.L55:
	cmpl	%esi, %eax
	je	.L53
	movl	%ecx, (%rbx,%rax,4)
	movslq	%esi, %rax
	movl	%r8d, (%rbx,%rax,4)
	movslq	%esi, %rax
	leal	(%rax,%rax), %edx
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jge	.L71
.L54:
	cmpl	%esi, %edi
	jl	.L53
	movslq	%esi, %rdx
	movl	(%rbx,%rdx,4), %ecx
	cmpl	%ecx, %r8d
	jl	.L55
	.p2align 4,,10
	.p2align 3
.L53:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L45
.L69:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	cltq
	movl	$-1073741824, (%rbx,%rax,4)
	jmp	.L45
.L59:
	movl	$-1073741824, %r9d
	jmp	.L53
.L72:
	call	__stack_chk_fail@PLT
.L70:
	movslq	%esi, %r10
	movl	(%rbx,%r10,4), %r10d
	cmpl	%r10d, %ecx
	jge	.L60
	movl	%r10d, %ecx
	jmp	.L55
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 8000004
A:
	.zero	8000004
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<string.h>
#define MAX 2000000
#define INFTY (1<<30)

int H, A[MAX+1];

int parent(int i){ return i/2; }
int left(int i){ return 2*i; }
int right(int i){ return (2*i)+1; }

void maxHeapify(int i){
  int l, r, largest, tmp;
  l = left(i);
  r = right(i);
  if( l <= H && A[l] > A[i] ) largest = l;
  else largest = i;
  
  if( r <= H && A[r] > A[largest] ) largest = r;

  if( largest != i ){
    tmp = A[i];
    A[i] = A[largest];
    A[largest] = tmp;
    maxHeapify(largest);
  }
}

int extract(){
  int maxv;
  if( H < 1 ) return -INFTY;
  maxv = A[1];
  A[1] = A[H--];
  maxHeapify(1);
  return maxv;
}

void increaseKey(int i, int key){
  int tmp;
  if( key < A[i] ) return;
  A[i] = key;
  while( i > 1 && A[i/2] < A[i] ){
    tmp = A[i];
    A[i] = A[i/2];
    A[i/2] = tmp;
    i = i / 2;
  }
}

void insert(int key){
  H++;
  A[H] = -INFTY;
  increaseKey(H,key);
}

int main(){
  int key;
  char c[10];

  while( 1 ){
    scanf("%s",c);
    if( c[0] == 'e' && c[1] == 'n' ) break;
    if( c[0] == 'i' ){
      scanf("%d",&key);
      insert(key);
    }
    else printf("%d\n",extract());
  }
  return 0;
}


insert 8
insert 1
extract
insert 10
extract
insert 11
extract
extract
end
 insert 9
insert 2
extract
insert 10
extract
insert 11
extract
extract
end
 insert 8
insert 2
extract
insert 16
extract
insert 11
extract
extract
end
 insert 8
insert 1
extract
insert 15
extract
insert 11
extract
extract
end
 insert 8
insert 0
extract
insert 10
extract
insert 11
extract
extract
end
 insert 8
insert 2
extract
insert 8
extract
insert 11
extract
extract
end
 insert 8
insert 2
extract
insert 4
extract
insert 11
extract
extract
end
 insert 8
insert 2
extract
insert 10
extract
insert 14
extract
extract
end
 insert 9
insert 2
extract
insert 4
extract
insert 11
extract
extract
end
 insert 8
insert 0
extract
insert 4
extract
insert 11
extract
extract
end

8
10
11
1
 9
10
11
2
 8
16
11
2
 8
15
11
1
 8
10
11
0
 8
8
11
2
 8
4
11
2
 8
10
14
2
 9
4
11
2
 8
4
11
0

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<string.h>
#define MAX 2000000
#define INFTY (1<<30)

int H, A[MAX+1];

int parent(int i){ return i/2; }
int left(int i){ return 2*i; }
int right(int i){ return (2*i)+1; }

void maxHeapify(int i){
  int l, r, largest, tmp;
  l = left(i);
  r = right(i);
  if( l <= H && A[l] > A[i] ) largest = l;
  else largest = i;
  
  if( r <= H && A[r] > A[largest] ) largest = r;

  if( largest != i ){
    tmp = A[i];
    A[i] = A[largest];
    A[largest] = tmp;
    maxHeapify(largest);
  }
}

int extract(){
  int maxv;
  if( H < 1 ) return -INFTY;
  maxv = A[1];
  A[1] = A[H--];
  maxHeapify(1);
  return maxv;
}

void increaseKey(int i, int key){
  int tmp;
  if( key < A[i] ) return;
  A[i] = key;
  while( i > 1 && A[i/2] < A[i] ){
    tmp = A[i];
    A[i] = A[i/2];
    A[i/2] = tmp;
    i = i / 2;
  }
}

void insert(int key){
  H++;
  A[H] = -INFTY;
  increaseKey(H,key);
}

int main(){
  int key;
  char c[10];

  while( 1 ){
    scanf("%s",c);
    if( c[0] == 'e' && c[1] == 'n' ) break;
    if( c[0] == 'i' ){
      scanf("%d",&key);
      insert(key);
    }
    else printf("%d\n",extract());
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 8000004
A:
	.zero	8000004
	.text
	.globl	parent
	.type	parent, @function
parent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	parent, .-parent
	.globl	left
	.type	left, @function
left:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	left, .-left
	.globl	right
	.type	right, @function
right:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	right, .-right
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	left
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	right
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L8
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L9
.L8:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L9:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L12
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	maxHeapify
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.globl	extract
	.type	extract, @function
extract:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	H(%rip), %eax
	testl	%eax, %eax
	jg	.L14
	movl	$-1073741824, %eax
	jmp	.L15
.L14:
	movl	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, H(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	extract, .-extract
	.globl	increaseKey
	.type	increaseKey, @function
increaseKey:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L20:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
.L19:
	cmpl	$1, -20(%rbp)
	jle	.L16
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L20
	jmp	.L16
.L21:
	nop
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	increaseKey, .-increaseKey
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$-1073741824, (%rdx,%rax)
	movl	H(%rip), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	increaseKey
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L28:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$101, %al
	jne	.L24
	movzbl	-17(%rbp), %eax
	cmpb	$110, %al
	je	.L32
.L24:
	movzbl	-18(%rbp), %eax
	cmpb	$105, %al
	jne	.L26
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L28
.L26:
	movl	$0, %eax
	call	extract
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L28
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 8000004
A:
	.zero	8000004
	.text
	.globl	parent
	.type	parent, @function
parent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	parent, .-parent
	.globl	left
	.type	left, @function
left:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	left, .-left
	.globl	right
	.type	right, @function
right:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	right, .-right
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	left
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	right
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L8
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L9
.L8:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L9:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L10
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L12
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	maxHeapify
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.globl	extract
	.type	extract, @function
extract:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	H(%rip), %eax
	testl	%eax, %eax
	jg	.L14
	movl	$-1073741824, %eax
	jmp	.L15
.L14:
	movl	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, H(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	extract, .-extract
	.globl	increaseKey
	.type	increaseKey, @function
increaseKey:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L19
.L20:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
.L19:
	cmpl	$1, -20(%rbp)
	jle	.L16
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L20
	jmp	.L16
.L21:
	nop
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	increaseKey, .-increaseKey
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	$-1073741824, (%rdx,%rax)
	movl	H(%rip), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	increaseKey
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L28:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$101, %al
	jne	.L24
	movzbl	-17(%rbp), %eax
	cmpb	$110, %al
	je	.L32
.L24:
	movzbl	-18(%rbp), %eax
	cmpb	$105, %al
	jne	.L26
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L28
.L26:
	movl	$0, %eax
	call	extract
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L28
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
