	.file	"555807.c"
	.intel_syntax noprefix
	.text
	.globl	heap_size
	.data
	.align 4
	.type	heap_size, @object
	.size	heap_size, 4
heap_size:
	.long	14
	.globl	heap
	.align 32
	.type	heap, @object
	.size	heap, 56
heap:
	.long	3
	.long	14
	.long	5
	.long	2
	.long	22
	.long	16
	.long	11
	.long	12
	.long	9
	.long	13
	.long	15
	.long	1
	.long	4
	.long	18
	.text
	.globl	swap
	.type	swap, @function
swap:
.LFB0:
	.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 -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, heap[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	swap, .-swap
	.globl	check_child
	.type	check_child, @function
check_child:
.LFB1:
	.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	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jg	.L3
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jge	.L3
	mov	eax, 1
	jmp	.L5
.L3:
	mov	eax, 0
.L5:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	check_child, .-check_child
	.globl	heapify_node
	.type	heapify_node, @function
heapify_node:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
.L10:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	check_child
	test	eax, eax
	je	.L7
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -16[rbp], eax
.L7:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	check_child
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -16[rbp], eax
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	setne	al
	movzx	eax, al
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L9
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	swap
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
.L9:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	heapify_node, .-heapify_node
	.globl	heapify_array
	.type	heapify_array, @function
heapify_array:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	jmp	.L12
.L13:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	heapify_node
	sub	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	heapify_array, .-heapify_array
	.globl	extract_max
	.type	extract_max, @function
extract_max:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR heap[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR heap[rip], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	esi, eax
	mov	edi, 0
	call	heapify_node
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	extract_max, .-extract_max
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	print
	.type	print, @function
print:
.LFB5:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR heap_size[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L18
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	print, .-print
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, DWORD PTR heap_size[rip]
	sub	eax, 1
	mov	edi, eax
	call	heapsort@PLT
	mov	eax, 0
	call	print
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"555807.c"
	.text
	.global	heap_size
	.data
	.align	2
	.type	heap_size, %object
	.size	heap_size, 4
heap_size:
	.word	14
	.global	heap
	.align	2
	.type	heap, %object
	.size	heap, 56
heap:
	.word	3
	.word	14
	.word	5
	.word	2
	.word	22
	.word	16
	.word	11
	.word	12
	.word	9
	.word	13
	.word	15
	.word	1
	.word	4
	.word	18
	.text
	.align	2
	.global	swap
	.syntax unified
	.arm
	.fpu softvfp
	.type	swap, %function
swap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r2, .L2
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r2, .L2
	ldr	r3, [fp, #-20]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L2
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r1, .L2
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	heap
	.size	swap, .-swap
	.align	2
	.global	check_child
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_child, %function
check_child:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bgt	.L5
	ldr	r2, .L8
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L8
	ldr	r3, [fp, #-8]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	bge	.L5
	mov	r3, #1
	b	.L7
.L5:
	mov	r3, #0
.L7:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L9:
	.align	2
.L8:
	.word	heap
	.size	check_child, .-check_child
	.align	2
	.global	heapify_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	heapify_node, %function
heapify_node:
	@ 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	r3, [fp, #-24]
	str	r3, [fp, #-20]
.L14:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	check_child
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	check_child
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L13
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	swap
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
.L13:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L14
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	heapify_node, .-heapify_node
	.align	2
	.global	heapify_array
	.syntax unified
	.arm
	.fpu softvfp
	.type	heapify_array, %function
heapify_array:
	@ 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]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L16
.L17:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	heapify_node
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L17
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	heapify_array, .-heapify_array
	.align	2
	.global	extract_max
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract_max, %function
extract_max:
	@ 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, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r2, .L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, #0
	bl	heapify_node
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	heap
	.size	extract_max, .-extract_max
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r2, .L25
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L25+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L24
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	heap
	.word	.LC0
	.word	heap_size
	.size	print, .-print
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, .L29
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r0, r3
	bl	heapsort
	bl	print
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	heap_size
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
