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>
int H=0,A[2000001];
void maxHeapify(int);
void insert(int);
int extract();
int main(){
  char command[10];
  int k;
  while(1){
    scanf("%s",command);
    if(!strcmp(command,"insert")){
      scanf("%d",&k);
      insert(k);
    }
    else if(!strcmp(command,"extract")){
      k=extract();
      printf("%d\n",k);
    }
    else break;
  }

  return 0;
}
void insert(int k){
  int tmp,i;
  H++;
  i=H;
  A[H]=k;
  while(i>1 && A[i/2]<A[i]){
    tmp=A[i/2];
    A[i/2]=A[i];
    A[i]=tmp;
    i=i/2;
  }
}
int extract(){
  int i,k;
  k=A[1];
  A[1]=A[H];
  H--;
  maxHeapify(1);
  return k; 
}
void maxHeapify(int i){
  int l=i*2,r=i*2+1,large,tmp;
  if(l<=H && A[l]>A[i])large=l;
  else large=i;
  if(r<=H && A[r]>A[large])large=r;
  if(large!=i){
    tmp=A[large];
    A[large]=A[i];
    A[i]=tmp;
    maxHeapify(large);
  }
}

```

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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"insert"
.LC2:
	.string	"%d"
.LC3:
	.string	"extract"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-18(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L2
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L6
.L2:
	leaq	-18(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	call	extract
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	insert
	.type	insert, @function
insert:
.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, -20(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-8(%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	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -8(%rbp)
.L11:
	cmpl	$1, -8(%rbp)
	jle	.L14
	movl	-8(%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	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	insert, .-insert
	.globl	extract
	.type	extract, @function
extract:
.LFB2:
	.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	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	H(%rip), %eax
	subl	$1, %eax
	movl	%eax, H(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	extract, .-extract
	.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
	addl	%eax, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L18
	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	.L18
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L19:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L20
	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	.L20
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L22
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%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
.L22:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.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	"%s"
.LC1:
	.string	"insert"
.LC2:
	.string	"%d"
.LC3:
	.string	"extract"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC4(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movabsq	$32760367481649253, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1702063721, (%r15)
	je	.L27
.L3:
	cmpq	%r12, (%r15)
	je	.L28
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cmpw	$29810, 4(%r15)
	jne	.L3
	cmpb	$0, 6(%r15)
	jne	.L3
	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
	movslq	%eax, %rdx
	movl	%eax, H(%rip)
	movl	%edi, (%rbx,%rdx,4)
	cmpl	$1, %eax
	jg	.L6
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	cltq
	movl	%edi, (%rbx,%rdx,4)
	movl	%esi, (%rbx,%rax,4)
	cmpl	$1, %ecx
	je	.L2
	movl	(%rbx,%rdx,4), %edi
	movl	%ecx, %eax
.L6:
	movl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rdx
	movl	(%rbx,%rdx,4), %esi
	cmpl	%edi, %esi
	jl	.L8
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	H(%rip), %rax
	movl	4+A(%rip), %r9d
	movl	$1, %edx
	movq	%rax, %r8
	movl	(%rbx,%rax,4), %eax
	subl	$1, %r8d
	movl	%eax, 4+A(%rip)
	movl	%r8d, H(%rip)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	movslq	%esi, %rcx
	movl	(%rbx,%rcx,4), %edi
	movslq	%edx, %rcx
	movl	%edi, %r10d
	cmpl	(%rbx,%rcx,4), %edi
	jle	.L12
	cmpl	%eax, %r8d
	jge	.L30
	movl	%esi, %eax
.L13:
	cmpl	%eax, %edx
	je	.L14
	movl	(%rbx,%rcx,4), %esi
	movslq	%eax, %rdx
	movl	%esi, (%rbx,%rdx,4)
	movl	%eax, %edx
	movl	%edi, (%rbx,%rcx,4)
.L15:
	leal	(%rdx,%rdx), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r8d
	jge	.L31
.L12:
	cmpl	%eax, %r8d
	jl	.L14
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edi
	movslq	%edx, %rcx
	cmpl	(%rbx,%rcx,4), %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r9d, 8(%rsp)
	call	__printf_chk@PLT
	jmp	.L2
.L29:
	call	__stack_chk_fail@PLT
.L30:
	movslq	%eax, %rdi
	movl	(%rbx,%rdi,4), %edi
	cmpl	%r10d, %edi
	jg	.L13
	movl	%r10d, %edi
	movl	%esi, %eax
	jmp	.L13
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.text
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB36:
	.cfi_startproc
	endbr64
	movl	H(%rip), %eax
	leaq	A(%rip), %rdx
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	%eax, H(%rip)
	movl	%edi, (%rdx,%rcx,4)
	cmpl	$1, %eax
	jg	.L33
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L35:
	cltq
	movl	%edi, (%rdx,%rcx,4)
	movl	%r8d, (%rdx,%rax,4)
	cmpl	$1, %esi
	je	.L32
	movl	(%rdx,%rcx,4), %edi
	movl	%esi, %eax
.L33:
	movl	%eax, %esi
	sarl	%esi
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	cmpl	%edi, %r8d
	jl	.L35
.L32:
	ret
.L40:
	ret
	.cfi_endproc
.LFE36:
	.size	insert, .-insert
	.p2align 4
	.globl	extract
	.type	extract, @function
extract:
.LFB37:
	.cfi_startproc
	endbr64
	movslq	H(%rip), %rax
	leaq	A(%rip), %rdx
	movl	$1, %ecx
	movl	4+A(%rip), %r11d
	movq	%rax, %r9
	movl	(%rdx,%rax,4), %eax
	subl	$1, %r9d
	movl	%eax, 4+A(%rip)
	movl	%r9d, H(%rip)
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L48:
	movslq	%edi, %rsi
	movl	(%rdx,%rsi,4), %r8d
	movslq	%ecx, %rsi
	movl	%r8d, %r10d
	cmpl	(%rdx,%rsi,4), %r8d
	jle	.L42
	cmpl	%eax, %r9d
	jge	.L47
	movl	%edi, %eax
.L43:
	cmpl	%eax, %ecx
	je	.L41
	movl	(%rdx,%rsi,4), %edi
	movslq	%eax, %rcx
	movl	%edi, (%rdx,%rcx,4)
	movl	%eax, %ecx
	movl	%r8d, (%rdx,%rsi,4)
.L45:
	leal	(%rcx,%rcx), %edi
	leal	1(%rdi), %eax
	cmpl	%edi, %r9d
	jge	.L48
.L42:
	cmpl	%eax, %r9d
	jl	.L41
	movslq	%eax, %rsi
	movl	(%rdx,%rsi,4), %r8d
	movslq	%ecx, %rsi
	cmpl	%r8d, (%rdx,%rsi,4)
	jl	.L43
.L41:
	movl	%r11d, %eax
	ret
.L47:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L43
	movl	%r10d, %r8d
	movl	%edi, %eax
	jmp	.L43
	.cfi_endproc
.LFE37:
	.size	extract, .-extract
	.p2align 4
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB38:
	.cfi_startproc
	endbr64
	movl	H(%rip), %r9d
	leaq	A(%rip), %rdx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L56:
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	movl	%r8d, %r10d
	cmpl	(%rdx,%rcx,4), %r8d
	jle	.L50
	cmpl	%eax, %r9d
	jge	.L55
	movl	%esi, %eax
.L51:
	cmpl	%edi, %eax
	je	.L49
	movl	(%rdx,%rcx,4), %edi
	movslq	%eax, %rsi
	movl	%edi, (%rdx,%rsi,4)
	movl	%eax, %edi
	movl	%r8d, (%rdx,%rcx,4)
.L53:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	jge	.L56
.L50:
	cmpl	%eax, %r9d
	jl	.L49
	movslq	%eax, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	cmpl	(%rdx,%rcx,4), %r8d
	jg	.L51
.L49:
	ret
.L55:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L51
	movl	%r10d, %r8d
	movl	%esi, %eax
	jmp	.L51
	.cfi_endproc
.LFE38:
	.size	maxHeapify, .-maxHeapify
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"insert"
.LC2:
	.string	"%d"
.LC3:
	.string	"extract"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC4(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movabsq	$32760367481649253, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	A(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1702063721, (%r15)
	je	.L27
.L3:
	cmpq	%r12, (%r15)
	je	.L28
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cmpw	$29810, 4(%r15)
	jne	.L3
	cmpb	$0, 6(%r15)
	jne	.L3
	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
	movslq	%eax, %rdx
	movl	%eax, H(%rip)
	movl	%edi, (%rbx,%rdx,4)
	cmpl	$1, %eax
	jg	.L6
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	cltq
	movl	%edi, (%rbx,%rdx,4)
	movl	%esi, (%rbx,%rax,4)
	cmpl	$1, %ecx
	je	.L2
	movl	(%rbx,%rdx,4), %edi
	movl	%ecx, %eax
.L6:
	movl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rdx
	movl	(%rbx,%rdx,4), %esi
	cmpl	%edi, %esi
	jl	.L8
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	H(%rip), %rax
	movl	4+A(%rip), %r9d
	movl	$1, %edx
	movq	%rax, %r8
	movl	(%rbx,%rax,4), %eax
	subl	$1, %r8d
	movl	%eax, 4+A(%rip)
	movl	%r8d, H(%rip)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	movslq	%esi, %rcx
	movl	(%rbx,%rcx,4), %edi
	movslq	%edx, %rcx
	movl	%edi, %r10d
	cmpl	(%rbx,%rcx,4), %edi
	jle	.L12
	cmpl	%eax, %r8d
	jge	.L30
	movl	%esi, %eax
.L13:
	cmpl	%eax, %edx
	je	.L14
	movl	(%rbx,%rcx,4), %esi
	movslq	%eax, %rdx
	movl	%esi, (%rbx,%rdx,4)
	movl	%eax, %edx
	movl	%edi, (%rbx,%rcx,4)
.L15:
	leal	(%rdx,%rdx), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r8d
	jge	.L31
.L12:
	cmpl	%eax, %r8d
	jl	.L14
	movslq	%eax, %rcx
	movl	(%rbx,%rcx,4), %edi
	movslq	%edx, %rcx
	cmpl	(%rbx,%rcx,4), %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r9d, 8(%rsp)
	call	__printf_chk@PLT
	jmp	.L2
.L29:
	call	__stack_chk_fail@PLT
.L30:
	movslq	%eax, %rdi
	movl	(%rbx,%rdi,4), %edi
	cmpl	%r10d, %edi
	jg	.L13
	movl	%r10d, %edi
	movl	%esi, %eax
	jmp	.L13
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.text
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB36:
	.cfi_startproc
	endbr64
	movl	H(%rip), %eax
	leaq	A(%rip), %rdx
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	%eax, H(%rip)
	movl	%edi, (%rdx,%rcx,4)
	cmpl	$1, %eax
	jg	.L33
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L35:
	cltq
	movl	%edi, (%rdx,%rcx,4)
	movl	%r8d, (%rdx,%rax,4)
	cmpl	$1, %esi
	je	.L32
	movl	(%rdx,%rcx,4), %edi
	movl	%esi, %eax
.L33:
	movl	%eax, %esi
	sarl	%esi
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	cmpl	%edi, %r8d
	jl	.L35
.L32:
	ret
.L40:
	ret
	.cfi_endproc
.LFE36:
	.size	insert, .-insert
	.p2align 4
	.globl	extract
	.type	extract, @function
extract:
.LFB37:
	.cfi_startproc
	endbr64
	movslq	H(%rip), %rax
	leaq	A(%rip), %rdx
	movl	$1, %ecx
	movl	4+A(%rip), %r11d
	movq	%rax, %r9
	movl	(%rdx,%rax,4), %eax
	subl	$1, %r9d
	movl	%eax, 4+A(%rip)
	movl	%r9d, H(%rip)
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L48:
	movslq	%edi, %rsi
	movl	(%rdx,%rsi,4), %r8d
	movslq	%ecx, %rsi
	movl	%r8d, %r10d
	cmpl	(%rdx,%rsi,4), %r8d
	jle	.L42
	cmpl	%eax, %r9d
	jge	.L47
	movl	%edi, %eax
.L43:
	cmpl	%eax, %ecx
	je	.L41
	movl	(%rdx,%rsi,4), %edi
	movslq	%eax, %rcx
	movl	%edi, (%rdx,%rcx,4)
	movl	%eax, %ecx
	movl	%r8d, (%rdx,%rsi,4)
.L45:
	leal	(%rcx,%rcx), %edi
	leal	1(%rdi), %eax
	cmpl	%edi, %r9d
	jge	.L48
.L42:
	cmpl	%eax, %r9d
	jl	.L41
	movslq	%eax, %rsi
	movl	(%rdx,%rsi,4), %r8d
	movslq	%ecx, %rsi
	cmpl	%r8d, (%rdx,%rsi,4)
	jl	.L43
.L41:
	movl	%r11d, %eax
	ret
.L47:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L43
	movl	%r10d, %r8d
	movl	%edi, %eax
	jmp	.L43
	.cfi_endproc
.LFE37:
	.size	extract, .-extract
	.p2align 4
	.globl	maxHeapify
	.type	maxHeapify, @function
maxHeapify:
.LFB38:
	.cfi_startproc
	endbr64
	movl	H(%rip), %r9d
	leaq	A(%rip), %rdx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L56:
	movslq	%esi, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	movl	%r8d, %r10d
	cmpl	(%rdx,%rcx,4), %r8d
	jle	.L50
	cmpl	%eax, %r9d
	jge	.L55
	movl	%esi, %eax
.L51:
	cmpl	%edi, %eax
	je	.L49
	movl	(%rdx,%rcx,4), %edi
	movslq	%eax, %rsi
	movl	%edi, (%rdx,%rsi,4)
	movl	%eax, %edi
	movl	%r8d, (%rdx,%rcx,4)
.L53:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	jge	.L56
.L50:
	cmpl	%eax, %r9d
	jl	.L49
	movslq	%eax, %rcx
	movl	(%rdx,%rcx,4), %r8d
	movslq	%edi, %rcx
	cmpl	(%rdx,%rcx,4), %r8d
	jg	.L51
.L49:
	ret
.L55:
	movslq	%eax, %r8
	movl	(%rdx,%r8,4), %r8d
	cmpl	%r10d, %r8d
	jg	.L51
	movl	%r10d, %r8d
	movl	%esi, %eax
	jmp	.L51
	.cfi_endproc
.LFE38:
	.size	maxHeapify, .-maxHeapify
	.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>
int H=0,A[2000001];
void maxHeapify(int);
void insert(int);
int extract();
int main(){
  char command[10];
  int k;
  while(1){
    scanf("%s",command);
    if(!strcmp(command,"insert")){
      scanf("%d",&k);
      insert(k);
    }
    else if(!strcmp(command,"extract")){
      k=extract();
      printf("%d\n",k);
    }
    else break;
  }

  return 0;
}
void insert(int k){
  int tmp,i;
  H++;
  i=H;
  A[H]=k;
  while(i>1 && A[i/2]<A[i]){
    tmp=A[i/2];
    A[i/2]=A[i];
    A[i]=tmp;
    i=i/2;
  }
}
int extract(){
  int i,k;
  k=A[1];
  A[1]=A[H];
  H--;
  maxHeapify(1);
  return k; 
}
void maxHeapify(int i){
  int l=i*2,r=i*2+1,large,tmp;
  if(l<=H && A[l]>A[i])large=l;
  else large=i;
  if(r<=H && A[r]>A[large])large=r;
  if(large!=i){
    tmp=A[large];
    A[large]=A[i];
    A[i]=tmp;
    maxHeapify(large);
  }
}


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>
int H=0,A[2000001];
void maxHeapify(int);
void insert(int);
int extract();
int main(){
  char command[10];
  int k;
  while(1){
    scanf("%s",command);
    if(!strcmp(command,"insert")){
      scanf("%d",&k);
      insert(k);
    }
    else if(!strcmp(command,"extract")){
      k=extract();
      printf("%d\n",k);
    }
    else break;
  }

  return 0;
}
void insert(int k){
  int tmp,i;
  H++;
  i=H;
  A[H]=k;
  while(i>1 && A[i/2]<A[i]){
    tmp=A[i/2];
    A[i/2]=A[i];
    A[i]=tmp;
    i=i/2;
  }
}
int extract(){
  int i,k;
  k=A[1];
  A[1]=A[H];
  H--;
  maxHeapify(1);
  return k; 
}
void maxHeapify(int i){
  int l=i*2,r=i*2+1,large,tmp;
  if(l<=H && A[l]>A[i])large=l;
  else large=i;
  if(r<=H && A[r]>A[large])large=r;
  if(large!=i){
    tmp=A[large];
    A[large]=A[i];
    A[i]=tmp;
    maxHeapify(large);
  }
}

```

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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"insert"
.LC2:
	.string	"%d"
.LC3:
	.string	"extract"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-18(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L2
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L6
.L2:
	leaq	-18(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	call	extract
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	insert
	.type	insert, @function
insert:
.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, -20(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-8(%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	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -8(%rbp)
.L11:
	cmpl	$1, -8(%rbp)
	jle	.L14
	movl	-8(%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	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	insert, .-insert
	.globl	extract
	.type	extract, @function
extract:
.LFB2:
	.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	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	H(%rip), %eax
	subl	$1, %eax
	movl	%eax, H(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	extract, .-extract
	.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
	addl	%eax, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L18
	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	.L18
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L19:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L20
	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	.L20
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L22
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%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
.L22:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.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
	.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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"insert"
.LC2:
	.string	"%d"
.LC3:
	.string	"extract"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-18(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-18(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L2
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L6
.L2:
	leaq	-18(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	call	extract
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L9:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	insert
	.type	insert, @function
insert:
.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, -20(%rbp)
	movl	H(%rip), %eax
	addl	$1, %eax
	movl	%eax, H(%rip)
	movl	H(%rip), %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-8(%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	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -8(%rbp)
.L11:
	cmpl	$1, -8(%rbp)
	jle	.L14
	movl	-8(%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	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	insert, .-insert
	.globl	extract
	.type	extract, @function
extract:
.LFB2:
	.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	4+A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	H(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4+A(%rip)
	movl	H(%rip), %eax
	subl	$1, %eax
	movl	%eax, H(%rip)
	movl	$1, %edi
	call	maxHeapify
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	extract, .-extract
	.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
	addl	%eax, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	H(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L18
	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	.L18
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L19
.L18:
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L19:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L20
	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	.L20
	movl	-8(%rbp), %eax
	movl	%eax, -16(%rbp)
.L20:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L22
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%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
.L22:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	maxHeapify, .-maxHeapify
	.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:
