	.file	"758080.c"
	.intel_syntax noprefix
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 200
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	DWORD PTR -236[rbp], 4
	mov	DWORD PTR -240[rbp], 20
	mov	DWORD PTR -176[rbp], 5
	mov	DWORD PTR -172[rbp], 3
	mov	DWORD PTR -168[rbp], 2
	mov	DWORD PTR -164[rbp], 1
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -144[rbp], 8
	mov	DWORD PTR -140[rbp], 6
	mov	DWORD PTR -136[rbp], 4
	mov	DWORD PTR -132[rbp], 4
	mov	DWORD PTR -128[rbp], 3
	mov	DWORD PTR -112[rbp], 10
	mov	DWORD PTR -108[rbp], 9
	mov	DWORD PTR -104[rbp], 2
	mov	DWORD PTR -100[rbp], 1
	mov	DWORD PTR -96[rbp], 1
	mov	DWORD PTR -80[rbp], 14
	mov	DWORD PTR -76[rbp], 11
	mov	DWORD PTR -72[rbp], 9
	mov	DWORD PTR -68[rbp], 8
	mov	DWORD PTR -64[rbp], 4
	lea	rax, -176[rbp]
	mov	esi, 5
	mov	rdi, rax
	call	ArrayToItemList
	mov	QWORD PTR -232[rbp], rax
	lea	rax, -144[rbp]
	mov	esi, 5
	mov	rdi, rax
	call	ArrayToItemList
	mov	QWORD PTR -224[rbp], rax
	lea	rax, -112[rbp]
	mov	esi, 5
	mov	rdi, rax
	call	ArrayToItemList
	mov	QWORD PTR -216[rbp], rax
	lea	rax, -80[rbp]
	mov	esi, 5
	mov	rdi, rax
	call	ArrayToItemList
	mov	QWORD PTR -208[rbp], rax
	mov	eax, DWORD PTR -236[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -200[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -224[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -216[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -208[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	edx, DWORD PTR -236[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ListsMerge
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	PrintList
	mov	rsp, rbx
	mov	eax, 0
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	MyMalloc
	.type	MyMalloc, @function
MyMalloc:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L8
	mov	eax, 0
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -8[rbp]
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MyMalloc, .-MyMalloc
	.globl	GetKey
	.type	GetKey, @function
GetKey:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	GetKey, .-GetKey
	.globl	Father
	.type	Father, @function
Father:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Father, .-Father
	.globl	Left
	.type	Left, @function
Left:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	add	eax, eax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Left, .-Left
	.globl	Right
	.type	Right, @function
Right:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	add	eax, eax
	add	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	Right, .-Right
	.globl	Swap
	.type	Swap, @function
Swap:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Swap, .-Swap
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	DisplayItemArr
	.type	DisplayItemArr, @function
DisplayItemArr:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L21
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	DisplayItemArr, .-DisplayItemArr
	.globl	ListInsert
	.type	ListInsert, @function
ListInsert:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	edi, 16
	call	MyMalloc
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ListInsert, .-ListInsert
	.globl	ListAppend
	.type	ListAppend, @function
ListAppend:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 16
	call	MyMalloc
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	cmp	QWORD PTR -32[rbp], 0
	jne	.L27
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L26
.L28:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
.L27:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L28
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
.L26:
	mov	rax, QWORD PTR -32[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ListAppend, .-ListAppend
	.globl	ReadFirst
	.type	ReadFirst, @function
ReadFirst:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	ReadFirst, .-ReadFirst
	.globl	PrintList
	.type	PrintList, @function
PrintList:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L33
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L33:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L34
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	PrintList, .-PrintList
	.globl	ArrayToItemList
	.type	ArrayToItemList, @function
ArrayToItemList:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L36
.L37:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ListAppend
	mov	QWORD PTR -8[rbp], rax
	add	DWORD PTR -12[rbp], 1
.L36:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L37
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	ArrayToItemList, .-ArrayToItemList
	.globl	PqueueNew
	.type	PqueueNew, @function
PqueueNew:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	PqueueNew, .-PqueueNew
	.section	.rodata
.LC1:
	.string	"there's no heap"
	.text
	.globl	PqueueLength
	.type	PqueueLength, @function
PqueueLength:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L42
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L43
.L42:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	PqueueLength, .-PqueueLength
	.globl	PqueueMin
	.type	PqueueMin, @function
PqueueMin:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L45
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], -1
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L46
.L45:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	PqueueMin, .-PqueueMin
	.globl	PqueueDestroy
	.type	PqueueDestroy, @function
PqueueDestroy:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	PqueueDestroy, .-PqueueDestroy
	.globl	DisplayQueue1
	.type	DisplayQueue1, @function
DisplayQueue1:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L49
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L48
.L49:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L51
.L52:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L51:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L52
	mov	edi, 10
	call	putchar@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	DisplayQueue1, .-DisplayQueue1
	.section	.rodata
.LC2:
	.string	"non c'e' piu' spazio"
	.text
	.globl	PqueueInsert
	.type	PqueueInsert, @function
PqueueInsert:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L54
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L53
.L54:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jl	.L56
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L53
.L56:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cdqe
	sal	rax, 2
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	MinHeapifyUp
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	PqueueInsert, .-PqueueInsert
	.globl	MinHeapifyUp
	.type	MinHeapifyUp, @function
MinHeapifyUp:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	cmp	DWORD PTR -44[rbp], 1
	jle	.L59
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	Father
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	cmp	ebx, eax
	jge	.L59
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Swap
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	MinHeapifyUp
.L59:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	MinHeapifyUp, .-MinHeapifyUp
	.globl	PqueueExtractMin
	.type	PqueueExtractMin, @function
PqueueExtractMin:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L61
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], -1
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L63
.L61:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rdx], ecx
	cdqe
	sal	rax, 2
	lea	rcx, [rsi+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 4[rax]
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 1
	mov	rdi, rax
	call	MinHeapifyDown
	mov	eax, DWORD PTR -4[rbp]
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	PqueueExtractMin, .-PqueueExtractMin
	.globl	MinHeapifyDown
	.type	MinHeapifyDown, @function
MinHeapifyDown:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	Left
	cmp	DWORD PTR -48[rbp], eax
	jle	.L67
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	cmp	DWORD PTR -48[rbp], eax
	jne	.L66
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -20[rbp], eax
.L66:
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	cmp	ebx, eax
	jle	.L67
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Swap
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	MinHeapifyDown
.L67:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	MinHeapifyDown, .-MinHeapifyDown
	.globl	PqueueSort
	.type	PqueueSort, @function
PqueueSort:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	DWORD PTR -64[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -64[rbp]
	sub	eax, DWORD PTR -60[rbp]
	add	eax, 1
	mov	edi, eax
	call	PqueueNew
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L69
.L70:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR [rdx]
	mov	rdi, rax
	call	PqueueInsert
	add	DWORD PTR -40[rbp], 1
.L69:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jle	.L70
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L71
.L72:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	PqueueExtractMin
	mov	DWORD PTR [rbx], eax
	add	DWORD PTR -36[rbp], 1
.L71:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jle	.L72
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	PqueueDestroy
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L73
	call	__stack_chk_fail@PLT
.L73:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	PqueueSort, .-PqueueSort
	.globl	HeapSort
	.type	HeapSort, @function
HeapSort:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BuildMaxHeapFromArr
	jmp	.L75
.L76:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	Swap
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	MaxHeapifyDown
.L75:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -12[rbp], edx
	cmp	eax, 1
	jg	.L76
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	HeapSort, .-HeapSort
	.globl	BuildMaxHeapFromArr
	.type	BuildMaxHeapFromArr, @function
BuildMaxHeapFromArr:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L78
.L79:
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	MaxHeapifyDown
	sub	DWORD PTR -4[rbp], 1
.L78:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L79
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	BuildMaxHeapFromArr, .-BuildMaxHeapFromArr
	.globl	MaxHeapifyDown
	.type	MaxHeapifyDown, @function
MaxHeapifyDown:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L81
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	cmp	ebx, eax
	jle	.L81
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -28[rbp], eax
.L81:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L82
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	call	GetKey
	cmp	ebx, eax
	jle	.L82
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -28[rbp], eax
.L82:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	je	.L84
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Swap
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	MaxHeapifyDown
.L84:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	MaxHeapifyDown, .-MaxHeapifyDown
	.globl	Swap2
	.type	Swap2, @function
Swap2:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	Swap2, .-Swap2
	.globl	Pqueue2New
	.type	Pqueue2New, @function
Pqueue2New:
.LFB27:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	Pqueue2New, .-Pqueue2New
	.globl	DisplayQueue2
	.type	DisplayQueue2, @function
DisplayQueue2:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L89
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L88
.L89:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L91
.L92:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L91:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L92
	mov	edi, 10
	call	putchar@PLT
.L88:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	DisplayQueue2, .-DisplayQueue2
	.globl	Pqueue2Insert
	.type	Pqueue2Insert, @function
Pqueue2Insert:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L94
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L93
.L94:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jl	.L96
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L93
.L96:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cdqe
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	MaxHeapifyUp2
.L93:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	Pqueue2Insert, .-Pqueue2Insert
	.globl	MaxHeapifyUp2
	.type	MaxHeapifyUp2, @function
MaxHeapifyUp2:
.LFB30:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	cmp	DWORD PTR -44[rbp], 1
	jle	.L99
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	Father
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	cmp	ebx, eax
	jle	.L99
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Swap2
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	MaxHeapifyUp2
.L99:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	MaxHeapifyUp2, .-MaxHeapifyUp2
	.section	.rodata
.LC3:
	.string	"the heap is empty"
	.text
	.globl	Pqueue2ExtractMax
	.type	Pqueue2ExtractMax, @function
Pqueue2ExtractMax:
.LFB31:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L101
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -12[rbp], -1
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L109
.L101:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L103
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -12[rbp], -1
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L109
.L103:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L104
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	QWORD PTR [rax], 0
	jmp	.L105
.L107:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rax], edx
.L105:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L106
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 1
	jg	.L107
.L106:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 1
	je	.L108
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rdx], ecx
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, eax
	mov	esi, 1
	mov	rdi, rcx
	call	Swap2
	jmp	.L108
.L104:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rdx]
	add	rdx, 8
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L108:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 1
	mov	rdi, rax
	call	MaxHeapifyDown2
	mov	eax, DWORD PTR -12[rbp]
.L109:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	Pqueue2ExtractMax, .-Pqueue2ExtractMax
	.globl	MaxHeapifyDown2
	.type	MaxHeapifyDown2, @function
MaxHeapifyDown2:
.LFB32:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jg	.L111
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	cmp	ebx, eax
	jle	.L111
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -28[rbp], eax
.L111:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jg	.L112
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	mov	ebx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ReadFirst
	mov	edi, eax
	call	GetKey
	cmp	ebx, eax
	jle	.L112
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -28[rbp], eax
.L112:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	je	.L114
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	Swap2
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	MaxHeapifyDown2
.L114:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	MaxHeapifyDown2, .-MaxHeapifyDown2
	.globl	ListsMerge
	.type	ListsMerge, @function
ListsMerge:
.LFB33:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	Pqueue2New
	mov	QWORD PTR -8[rbp], rax
	mov	QWORD PTR -16[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L116
.L117:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Pqueue2Insert
	add	DWORD PTR -20[rbp], 1
.L116:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L117
	jmp	.L118
.L119:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Pqueue2ExtractMax
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	ListAppend
	mov	QWORD PTR -16[rbp], rax
.L118:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L119
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	ListsMerge, .-ListsMerge
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"758080.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	5
	.word	3
	.word	2
	.word	1
	.word	0
	.align	2
.LC1:
	.word	8
	.word	6
	.word	4
	.word	4
	.word	3
	.align	2
.LC2:
	.word	10
	.word	9
	.word	2
	.word	1
	.word	1
	.align	2
.LC3:
	.word	14
	.word	11
	.word	9
	.word	8
	.word	4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #124
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r3, #4
	str	r3, [fp, #-128]
	mov	r3, #20
	str	r3, [fp, #-132]
	ldr	r3, .L4+4
	sub	ip, fp, #96
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L4+8
	sub	ip, fp, #76
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L4+12
	sub	ip, fp, #56
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L4+16
	sub	ip, fp, #36
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	sub	r3, fp, #96
	mov	r1, #5
	mov	r0, r3
	bl	ArrayToItemList
	str	r0, [fp, #-124]
	sub	r3, fp, #76
	mov	r1, #5
	mov	r0, r3
	bl	ArrayToItemList
	str	r0, [fp, #-120]
	sub	r3, fp, #56
	mov	r1, #5
	mov	r0, r3
	bl	ArrayToItemList
	str	r0, [fp, #-116]
	sub	r3, fp, #36
	mov	r1, #5
	mov	r0, r3
	bl	ArrayToItemList
	str	r0, [fp, #-112]
	ldr	ip, [fp, #-128]
	sub	r3, ip, #1
	str	r3, [fp, #-108]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-124]
	str	r2, [r3]
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-120]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-116]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-112]
	str	r2, [r3, #12]
	ldr	r1, [fp, #-128]
	ldr	r0, [fp, #-104]
	bl	ListsMerge
	str	r0, [fp, #-100]
	ldr	r0, [fp, #-100]
	bl	PrintList
	mov	sp, r4
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	MyMalloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	MyMalloc, %function
MyMalloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L7
	mov	r3, #0
	b	.L8
.L7:
	ldr	r3, [fp, #-8]
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	MyMalloc, .-MyMalloc
	.align	2
	.global	GetKey
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetKey, %function
GetKey:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	GetKey, .-GetKey
	.align	2
	.global	Father
	.syntax unified
	.arm
	.fpu softvfp
	.type	Father, %function
Father:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Father, .-Father
	.align	2
	.global	Left
	.syntax unified
	.arm
	.fpu softvfp
	.type	Left, %function
Left:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Left, .-Left
	.align	2
	.global	Right
	.syntax unified
	.arm
	.fpu softvfp
	.type	Right, %function
Right:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	add	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Right, .-Right
	.align	2
	.global	Swap
	.syntax unified
	.arm
	.fpu softvfp
	.type	Swap, %function
Swap:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Swap, .-Swap
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d \000"
	.text
	.align	2
	.global	DisplayItemArr
	.syntax unified
	.arm
	.fpu softvfp
	.type	DisplayItemArr, %function
DisplayItemArr:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L19
.L20:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L21
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L20
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC5
	.size	DisplayItemArr, .-DisplayItemArr
	.align	2
	.global	ListInsert
	.syntax unified
	.arm
	.fpu softvfp
	.type	ListInsert, %function
ListInsert:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #8
	bl	MyMalloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ListInsert, .-ListInsert
	.align	2
	.global	ListAppend
	.syntax unified
	.arm
	.fpu softvfp
	.type	ListAppend, %function
ListAppend:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	mov	r0, #8
	bl	MyMalloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L28
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	b	.L27
.L29:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
.L28:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L29
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
.L27:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ListAppend, .-ListAppend
	.align	2
	.global	ReadFirst
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReadFirst, %function
ReadFirst:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ReadFirst, .-ReadFirst
	.align	2
	.global	PrintList
	.syntax unified
	.arm
	.fpu softvfp
	.type	PrintList, %function
PrintList:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L34
.L35:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L36
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L34:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L35
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC5
	.size	PrintList, .-PrintList
	.align	2
	.global	ArrayToItemList
	.syntax unified
	.arm
	.fpu softvfp
	.type	ArrayToItemList, %function
ArrayToItemList:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L39
.L40:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	ListAppend
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L39:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L40
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ArrayToItemList, .-ArrayToItemList
	.align	2
	.global	PqueueNew
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueNew, %function
PqueueNew:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	PqueueNew, .-PqueueNew
	.section	.rodata
	.align	2
.LC6:
	.ascii	"there's no heap\000"
	.text
	.align	2
	.global	PqueueLength
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueLength, %function
PqueueLength:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L45
	ldr	r0, .L47
	bl	puts
	mvn	r3, #0
	b	.L46
.L45:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
.L46:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC6
	.size	PqueueLength, .-PqueueLength
	.align	2
	.global	PqueueMin
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueMin, %function
PqueueMin:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L50
	ldr	r0, .L52
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	b	.L51
.L50:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
.L51:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC6
	.size	PqueueMin, .-PqueueMin
	.align	2
	.global	PqueueDestroy
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueDestroy, %function
PqueueDestroy:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	PqueueDestroy, .-PqueueDestroy
	.align	2
	.global	DisplayQueue1
	.syntax unified
	.arm
	.fpu softvfp
	.type	DisplayQueue1, %function
DisplayQueue1:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L56
	ldr	r0, .L60
	bl	puts
	b	.L55
.L56:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L58
.L59:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L60+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L58:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L59
	mov	r0, #10
	bl	putchar
.L55:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L61:
	.align	2
.L60:
	.word	.LC6
	.word	.LC5
	.size	DisplayQueue1, .-DisplayQueue1
	.section	.rodata
	.align	2
.LC7:
	.ascii	"non c'e' piu' spazio\000"
	.text
	.align	2
	.global	PqueueInsert
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueInsert, %function
PqueueInsert:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L63
	ldr	r0, .L66
	bl	puts
	b	.L62
.L63:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	blt	.L65
	ldr	r0, .L66+4
	bl	puts
	b	.L62
.L65:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r1, r3, #1
	ldr	r3, [fp, #-8]
	str	r1, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	MinHeapifyUp
.L62:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC6
	.word	.LC7
	.size	PqueueInsert, .-PqueueInsert
	.align	2
	.global	MinHeapifyUp
	.syntax unified
	.arm
	.fpu softvfp
	.type	MinHeapifyUp, %function
MinHeapifyUp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	ble	.L70
	ldr	r0, [fp, #-28]
	bl	Father
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	bge	.L70
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	Swap
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	MinHeapifyUp
.L70:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	MinHeapifyUp, .-MinHeapifyUp
	.align	2
	.global	PqueueExtractMin
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueExtractMin, %function
PqueueExtractMin:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L72
	ldr	r0, .L75
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	b	.L74
.L72:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	sub	r0, r3, #1
	ldr	r1, [fp, #-16]
	str	r0, [r1, #8]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r2, r3
	mov	r1, #1
	bl	MinHeapifyDown
	ldr	r3, [fp, #-8]
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC6
	.size	PqueueExtractMin, .-PqueueExtractMin
	.align	2
	.global	MinHeapifyDown
	.syntax unified
	.arm
	.fpu softvfp
	.type	MinHeapifyDown, %function
MinHeapifyDown:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	Left
	mov	r2, r0
	ldr	r3, [fp, #-32]
	cmp	r3, r2
	ble	.L80
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bne	.L79
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
.L79:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L80
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	Swap
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	MinHeapifyDown
.L80:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	MinHeapifyDown, .-MinHeapifyDown
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	PqueueSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	PqueueSort, %function
PqueueSort:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L87
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	PqueueNew
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-24]
	b	.L82
.L83:
	ldr	r0, [fp, #-28]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r1, [r3]
	bl	PqueueInsert
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L82:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	ble	.L83
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	b	.L84
.L85:
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	mov	r0, r1
	bl	PqueueExtractMin
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L84:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	ble	.L85
	sub	r3, fp, #28
	mov	r0, r3
	bl	PqueueDestroy
	nop
	ldr	r3, .L87
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L86
	bl	__stack_chk_fail
.L86:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L88:
	.align	2
.L87:
	.word	.LC8
	.size	PqueueSort, .-PqueueSort
	.align	2
	.global	HeapSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	HeapSort, %function
HeapSort:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	BuildMaxHeapFromArr
	b	.L90
.L91:
	ldr	r2, [fp, #-12]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	Swap
	ldr	r2, [fp, #-12]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	MaxHeapifyDown
.L90:
	ldr	r3, [fp, #-12]
	sub	r2, r3, #1
	str	r2, [fp, #-12]
	cmp	r3, #1
	bgt	.L91
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	HeapSort, .-HeapSort
	.align	2
	.global	BuildMaxHeapFromArr
	.syntax unified
	.arm
	.fpu softvfp
	.type	BuildMaxHeapFromArr, %function
BuildMaxHeapFromArr:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L93
.L94:
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	MaxHeapifyDown
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L93:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L94
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	BuildMaxHeapFromArr, .-BuildMaxHeapFromArr
	.align	2
	.global	MaxHeapifyDown
	.syntax unified
	.arm
	.fpu softvfp
	.type	MaxHeapifyDown, %function
MaxHeapifyDown:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bge	.L96
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L96
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
.L96:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bge	.L97
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r0, [r3]
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L97
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
.L97:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	beq	.L99
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	Swap
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	MaxHeapifyDown
.L99:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	MaxHeapifyDown, .-MaxHeapifyDown
	.align	2
	.global	Swap2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Swap2, %function
Swap2:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Swap2, .-Swap2
	.align	2
	.global	Pqueue2New
	.syntax unified
	.arm
	.fpu softvfp
	.type	Pqueue2New, %function
Pqueue2New:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Pqueue2New, .-Pqueue2New
	.align	2
	.global	DisplayQueue2
	.syntax unified
	.arm
	.fpu softvfp
	.type	DisplayQueue2, %function
DisplayQueue2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L104
	ldr	r0, .L108
	bl	puts
	b	.L103
.L104:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L106
.L107:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L108+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L106:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L107
	mov	r0, #10
	bl	putchar
.L103:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	.LC6
	.word	.LC5
	.size	DisplayQueue2, .-DisplayQueue2
	.align	2
	.global	Pqueue2Insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	Pqueue2Insert, %function
Pqueue2Insert:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L111
	ldr	r0, .L114
	bl	puts
	b	.L110
.L111:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	blt	.L113
	ldr	r0, .L114+4
	bl	puts
	b	.L110
.L113:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r1, r3, #1
	ldr	r3, [fp, #-8]
	str	r1, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	MaxHeapifyUp2
.L110:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L115:
	.align	2
.L114:
	.word	.LC6
	.word	.LC7
	.size	Pqueue2Insert, .-Pqueue2Insert
	.align	2
	.global	MaxHeapifyUp2
	.syntax unified
	.arm
	.fpu softvfp
	.type	MaxHeapifyUp2, %function
MaxHeapifyUp2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	ble	.L118
	ldr	r0, [fp, #-28]
	bl	Father
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L118
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	Swap2
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	MaxHeapifyUp2
.L118:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	MaxHeapifyUp2, .-MaxHeapifyUp2
	.section	.rodata
	.align	2
.LC9:
	.ascii	"the heap is empty\000"
	.text
	.align	2
	.global	Pqueue2ExtractMax
	.syntax unified
	.arm
	.fpu softvfp
	.type	Pqueue2ExtractMax, %function
Pqueue2ExtractMax:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L120
	ldr	r0, .L129
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	b	.L128
.L120:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L122
	ldr	r0, .L129+4
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	b	.L128
.L122:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L123
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	b	.L124
.L126:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
.L124:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L125
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r3, #1
	bgt	.L126
.L125:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r3, #1
	beq	.L127
	ldr	r3, [fp, #-16]
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	sub	r1, r3, #1
	ldr	r2, [fp, #-16]
	str	r1, [r2, #8]
	mov	r2, r3
	mov	r1, #1
	bl	Swap2
	b	.L127
.L123:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r2, #4]
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	free
.L127:
	ldr	r3, [fp, #-16]
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r2, r3
	mov	r1, #1
	bl	MaxHeapifyDown2
	ldr	r3, [fp, #-12]
.L128:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L130:
	.align	2
.L129:
	.word	.LC6
	.word	.LC9
	.size	Pqueue2ExtractMax, .-Pqueue2ExtractMax
	.align	2
	.global	MaxHeapifyDown2
	.syntax unified
	.arm
	.fpu softvfp
	.type	MaxHeapifyDown2, %function
MaxHeapifyDown2:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bgt	.L132
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L132
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
.L132:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bgt	.L133
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r4, r0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	ReadFirst
	mov	r3, r0
	mov	r0, r3
	bl	GetKey
	mov	r3, r0
	cmp	r4, r3
	ble	.L133
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
.L133:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	beq	.L135
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	Swap2
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	MaxHeapifyDown2
.L135:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	MaxHeapifyDown2, .-MaxHeapifyDown2
	.align	2
	.global	ListsMerge
	.syntax unified
	.arm
	.fpu softvfp
	.type	ListsMerge, %function
ListsMerge:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	Pqueue2New
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L137
.L138:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	Pqueue2Insert
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L137:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L138
	b	.L139
.L140:
	ldr	r0, [fp, #-8]
	bl	Pqueue2ExtractMax
	mov	r3, r0
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	ListAppend
	str	r0, [fp, #-16]
.L139:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L140
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ListsMerge, .-ListsMerge
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
