	.file	"569788.c"
	.intel_syntax noprefix
	.text
	.globl	generate_array
	.type	generate_array, @function
generate_array:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -4[rbp], 1
	jmp	.L2
.L3:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, -2043122445
	shr	rdx, 32
	add	edx, eax
	sar	edx, 18
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 499990
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	add	edx, 10
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L3
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	generate_array, .-generate_array
	.globl	copy_array
	.type	copy_array, @function
copy_array:
.LFB7:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -4[rbp], 1
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jle	.L6
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	copy_array, .-copy_array
	.globl	exchange
	.type	exchange, @function
exchange:
.LFB8:
	.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	exchange, .-exchange
	.globl	parent
	.type	parent, @function
parent:
.LFB9:
	.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
.LFE9:
	.size	parent, .-parent
	.globl	left_child
	.type	left_child, @function
left_child:
.LFB10:
	.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
.LFE10:
	.size	left_child, .-left_child
	.globl	right_child
	.type	right_child, @function
right_child:
.LFB11:
	.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
.LFE11:
	.size	right_child, .-right_child
	.globl	max_heapify
	.type	max_heapify, @function
max_heapify:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	left_child
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	right_child
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jg	.L15
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L15
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
.L16:
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jg	.L17
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L17
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
.L17:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	je	.L19
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 3[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	exchange
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	max_heapify
.L19:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	max_heapify, .-max_heapify
	.globl	build_bottom_up
	.type	build_bottom_up, @function
build_bottom_up:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	jmp	.L21
.L22:
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	esi, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	max_heapify
	sub	DWORD PTR -4[rbp], 1
.L21:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L22
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	build_bottom_up, .-build_bottom_up
	.globl	heap_insert
	.type	heap_insert, @function
heap_insert:
.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, 56
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L24
.L27:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	parent
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L28
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 3[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	exchange
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
.L24:
	cmp	DWORD PTR -8[rbp], 1
	jg	.L27
	jmp	.L23
.L28:
	nop
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	heap_insert, .-heap_insert
	.globl	build_top_down
	.type	build_top_down, @function
build_top_down:
.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, 64
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 1
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	lea	rsi, -16[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	heap_insert
	add	DWORD PTR -12[rbp], 1
.L30:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jle	.L31
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	build_top_down, .-build_top_down
	.globl	heapsort
	.type	heapsort, @function
heapsort:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L34
.L35:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	exchange
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR [rax]
	lea	rsi, -16[rbp]
	lea	rcx, -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8, rsi
	mov	esi, 1
	mov	rdi, rax
	call	max_heapify
	sub	DWORD PTR -12[rbp], 1
.L34:
	cmp	DWORD PTR -12[rbp], 1
	jg	.L35
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	heapsort, .-heapsort
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	show_elements
	.type	show_elements, @function
show_elements:
.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
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	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
.L38:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L39
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	show_elements, .-show_elements
	.section	.rodata
.LC1:
	.string	"Random array : "
.LC2:
	.string	"Heap bottom up : "
.LC3:
	.string	"Heap top down : "
.LC4:
	.string	"Sorted array : "
	.text
	.globl	test_functions
	.type	test_functions, @function
test_functions:
.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, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -164[rbp], 10
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -156[rbp], 35
	mov	DWORD PTR -152[rbp], 33
	mov	DWORD PTR -148[rbp], 42
	mov	DWORD PTR -144[rbp], 10
	mov	DWORD PTR -140[rbp], 14
	mov	DWORD PTR -136[rbp], 19
	mov	DWORD PTR -132[rbp], 27
	mov	DWORD PTR -128[rbp], 44
	mov	DWORD PTR -124[rbp], 26
	mov	DWORD PTR -120[rbp], 31
	mov	DWORD PTR -176[rbp], 0
	mov	DWORD PTR -172[rbp], 0
	mov	edx, DWORD PTR -164[rbp]
	lea	rcx, -112[rbp]
	lea	rax, -160[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	copy_array
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -164[rbp]
	lea	rax, -160[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	show_elements
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rcx, -172[rbp]
	lea	rdx, -176[rbp]
	mov	esi, DWORD PTR -164[rbp]
	lea	rax, -160[rbp]
	mov	rdi, rax
	call	build_bottom_up
	mov	edx, DWORD PTR -164[rbp]
	lea	rax, -160[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	show_elements
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, -172[rbp]
	lea	rcx, -176[rbp]
	mov	edx, DWORD PTR -164[rbp]
	lea	rsi, -64[rbp]
	lea	rax, -112[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	build_top_down
	mov	edx, DWORD PTR -164[rbp]
	lea	rax, -64[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	show_elements
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	DWORD PTR -168[rbp], eax
	lea	rdx, -168[rbp]
	lea	rax, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	heapsort
	mov	edx, DWORD PTR -164[rbp]
	lea	rax, -160[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	show_elements
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	test_functions, .-test_functions
	.section	.rodata
.LC5:
	.string	"w"
.LC6:
	.string	"assignments.csv"
.LC7:
	.string	"comparisons.csv"
.LC8:
	.string	"sums.csv"
.LC9:
	.string	"%d,%d,%d\n"
	.text
	.globl	test_building_methods
	.type	test_building_methods, @function
test_building_methods:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -118784[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 2496
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	call	fopen@PLT
	mov	QWORD PTR -121240[rbp], rax
	lea	rsi, .LC5[rip]
	lea	rdi, .LC7[rip]
	call	fopen@PLT
	mov	QWORD PTR -121232[rbp], rax
	lea	rsi, .LC5[rip]
	lea	rdi, .LC8[rip]
	call	fopen@PLT
	mov	QWORD PTR -121224[rbp], rax
	mov	DWORD PTR -121256[rbp], 100
	jmp	.L43
.L46:
	mov	DWORD PTR -121272[rbp], 0
	mov	DWORD PTR -121268[rbp], 0
	mov	DWORD PTR -121264[rbp], 0
	mov	DWORD PTR -121260[rbp], 0
	mov	DWORD PTR -121252[rbp], 0
	jmp	.L44
.L45:
	mov	edx, DWORD PTR -121256[rbp]
	lea	rax, -121216[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	generate_array
	mov	edx, DWORD PTR -121256[rbp]
	lea	rcx, -80816[rbp]
	lea	rax, -121216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	copy_array
	lea	rcx, -121268[rbp]
	lea	rdx, -121272[rbp]
	mov	esi, DWORD PTR -121256[rbp]
	lea	rax, -121216[rbp]
	mov	rdi, rax
	call	build_bottom_up
	lea	rdi, -121260[rbp]
	lea	rcx, -121264[rbp]
	mov	edx, DWORD PTR -121256[rbp]
	lea	rsi, -40416[rbp]
	lea	rax, -80816[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	build_top_down
	add	DWORD PTR -121252[rbp], 1
.L44:
	cmp	DWORD PTR -121252[rbp], 4
	jle	.L45
	mov	eax, DWORD PTR -121272[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -121272[rbp], eax
	mov	eax, DWORD PTR -121268[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -121268[rbp], eax
	mov	edx, DWORD PTR -121272[rbp]
	mov	eax, DWORD PTR -121268[rbp]
	add	eax, edx
	mov	DWORD PTR -121248[rbp], eax
	mov	eax, DWORD PTR -121264[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -121264[rbp], eax
	mov	eax, DWORD PTR -121260[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -121260[rbp], eax
	mov	edx, DWORD PTR -121264[rbp]
	mov	eax, DWORD PTR -121260[rbp]
	add	eax, edx
	mov	DWORD PTR -121244[rbp], eax
	mov	esi, DWORD PTR -121264[rbp]
	mov	ecx, DWORD PTR -121272[rbp]
	mov	edx, DWORD PTR -121256[rbp]
	mov	rax, QWORD PTR -121240[rbp]
	mov	r8d, esi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	esi, DWORD PTR -121260[rbp]
	mov	ecx, DWORD PTR -121268[rbp]
	mov	edx, DWORD PTR -121256[rbp]
	mov	rax, QWORD PTR -121232[rbp]
	mov	r8d, esi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	esi, DWORD PTR -121244[rbp]
	mov	ecx, DWORD PTR -121248[rbp]
	mov	edx, DWORD PTR -121256[rbp]
	mov	rax, QWORD PTR -121224[rbp]
	mov	r8d, esi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -121256[rbp], 100
.L43:
	cmp	DWORD PTR -121256[rbp], 10100
	jle	.L46
	mov	rax, QWORD PTR -121240[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -121232[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -121224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	test_building_methods, .-test_building_methods
	.globl	main
	.type	main, @function
main:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	test_functions
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.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	"569788.c"
	.text
	.align	2
	.global	generate_array
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_array, %function
generate_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]
	str	r1, [fp, #-20]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L3:
	bl	rand
	mov	r3, r0
	ldr	r2, .L4
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r1, r2, #18
	asr	r2, r3, #31
	sub	r2, r1, r2
	ldr	r1, .L4+4
	mul	r2, r1, r2
	sub	r2, r3, r2
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	add	r2, r2, #10
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L3
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	-2043122445
	.word	499990
	.size	generate_array, .-generate_array
	.align	2
	.global	copy_array
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy_array, %function
copy_array:
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L8
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	copy_array, .-copy_array
	.align	2
	.global	exchange
	.syntax unified
	.arm
	.fpu softvfp
	.type	exchange, %function
exchange:
	@ 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	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	exchange, .-exchange
	.align	2
	.global	parent
	.syntax unified
	.arm
	.fpu softvfp
	.type	parent, %function
parent:
	@ 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	parent, .-parent
	.align	2
	.global	left_child
	.syntax unified
	.arm
	.fpu softvfp
	.type	left_child, %function
left_child:
	@ 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_child, .-left_child
	.align	2
	.global	right_child
	.syntax unified
	.arm
	.fpu softvfp
	.type	right_child, %function
right_child:
	@ 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_child, .-right_child
	.align	2
	.global	max_heapify
	.syntax unified
	.arm
	.fpu softvfp
	.type	max_heapify, %function
max_heapify:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-28]
	bl	left_child
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-28]
	bl	right_child
	str	r0, [fp, #-8]
	ldr	r3, [fp, #4]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bgt	.L17
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L17
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	b	.L18
.L17:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
.L18:
	ldr	r3, [fp, #4]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bgt	.L19
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L19
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-16]
.L19:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L21
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	add	r2, r3, #3
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r0, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r1, r3
	bl	exchange
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	max_heapify
.L21:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	max_heapify, .-max_heapify
	.align	2
	.global	build_bottom_up
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_bottom_up, %function
build_bottom_up:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	max_heapify
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L24
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	build_bottom_up, .-build_bottom_up
	.align	2
	.global	heap_insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	heap_insert, %function
heap_insert:
	@ args = 4, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L26
.L29:
	ldr	r0, [fp, #-12]
	bl	parent
	str	r0, [fp, #-8]
	ldr	r3, [fp, #4]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L30
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	bl	exchange
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bgt	.L29
	b	.L25
.L30:
	nop
.L25:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	heap_insert, .-heap_insert
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	build_top_down
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_top_down, %function
build_top_down:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-40]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L32
.L33:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r1, fp, #16
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r0, [fp, #-28]
	bl	heap_insert
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L32:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	ble	.L33
	nop
	ldr	r3, .L35
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC1
	.size	build_top_down, .-build_top_down
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	heapsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	heapsort, %function
heapsort:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L38
.L39:
	ldr	r3, [fp, #-24]
	add	r0, r3, #4
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r1, r3
	bl	exchange
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	sub	r1, fp, #20
	sub	r3, fp, #16
	str	r3, [sp]
	mov	r3, r1
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	max_heapify
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L38:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bgt	.L39
	nop
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC2
	.size	heapsort, .-heapsort
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d \000"
	.text
	.align	2
	.global	show_elements
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_elements, %function
show_elements:
	@ 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, #1
	str	r3, [fp, #-8]
	b	.L44
.L45:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L46
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L44:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L45
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC3
	.size	show_elements, .-show_elements
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Random array : \000"
	.align	2
.LC5:
	.ascii	"Heap bottom up : \000"
	.align	2
.LC6:
	.ascii	"Heap top down : \000"
	.align	2
.LC7:
	.ascii	"Sorted array : \000"
	.align	2
.LC0:
	.word	0
	.word	35
	.word	33
	.word	42
	.word	10
	.word	14
	.word	19
	.word	27
	.word	44
	.word	26
	.word	31
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	test_functions
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_functions, %function
test_functions:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #10
	str	r3, [fp, #-144]
	ldr	r3, .L50+4
	sub	ip, fp, #140
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-156]
	mov	r3, #0
	str	r3, [fp, #-152]
	sub	r1, fp, #96
	sub	r3, fp, #140
	ldr	r2, [fp, #-144]
	mov	r0, r3
	bl	copy_array
	ldr	r0, .L50+8
	bl	puts
	sub	r3, fp, #140
	ldr	r1, [fp, #-144]
	mov	r0, r3
	bl	show_elements
	mov	r0, #10
	bl	putchar
	ldr	r0, .L50+12
	bl	puts
	sub	r3, fp, #152
	sub	r2, fp, #156
	sub	r0, fp, #140
	ldr	r1, [fp, #-144]
	bl	build_bottom_up
	sub	r3, fp, #140
	ldr	r1, [fp, #-144]
	mov	r0, r3
	bl	show_elements
	mov	r0, #10
	bl	putchar
	ldr	r0, .L50+16
	bl	puts
	sub	r2, fp, #156
	sub	r1, fp, #52
	sub	r0, fp, #96
	sub	r3, fp, #152
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-144]
	bl	build_top_down
	sub	r3, fp, #52
	ldr	r1, [fp, #-144]
	mov	r0, r3
	bl	show_elements
	mov	r0, #10
	bl	putchar
	ldr	r0, .L50+20
	bl	puts
	ldr	r3, [fp, #-144]
	str	r3, [fp, #-148]
	sub	r2, fp, #148
	sub	r3, fp, #140
	mov	r1, r2
	mov	r0, r3
	bl	heapsort
	sub	r3, fp, #140
	ldr	r1, [fp, #-144]
	mov	r0, r3
	bl	show_elements
	nop
	ldr	r3, .L50
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L49
	bl	__stack_chk_fail
.L49:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC8
	.word	.LC0
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	test_functions, .-test_functions
	.section	.rodata
	.align	2
.LC9:
	.ascii	"w\000"
	.align	2
.LC10:
	.ascii	"assignments.csv\000"
	.align	2
.LC11:
	.ascii	"comparisons.csv\000"
	.align	2
.LC12:
	.ascii	"sums.csv\000"
	.align	2
.LC13:
	.ascii	"%d,%d,%d\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	test_building_methods
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_building_methods, %function
test_building_methods:
	@ args = 0, pretend = 0, frame = 121248
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #120832
	sub	sp, sp, #428
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L58+4
	ldr	r0, .L58+8
	bl	fopen
	str	r0, [r4, #-2440]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L58+4
	ldr	r0, .L58+12
	bl	fopen
	str	r0, [r4, #-2436]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L58+4
	ldr	r0, .L58+16
	bl	fopen
	str	r0, [r4, #-2432]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #100
	str	r3, [r2, #-2448]
	b	.L53
.L56:
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2464]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2460]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2456]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2452]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2444]
	b	.L54
.L55:
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #120832
	sub	r3, r3, #12
	sub	r3, r3, #372
	ldr	r1, [r2, #-2448]
	mov	r0, r3
	bl	generate_array
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	sub	r1, fp, #79872
	sub	r1, r1, #12
	sub	r1, r1, #932
	sub	r3, fp, #120832
	sub	r3, r3, #12
	sub	r3, r3, #372
	ldr	r2, [r2, #-2448]
	mov	r0, r3
	bl	copy_array
	sub	r3, fp, #120832
	sub	r3, r3, #12
	sub	r3, r3, #412
	sub	r2, fp, #120832
	sub	r2, r2, #12
	sub	r2, r2, #416
	sub	r1, fp, #118784
	sub	r1, r1, #12
	sub	r0, fp, #120832
	sub	r0, r0, #12
	sub	r0, r0, #372
	ldr	r1, [r1, #-2448]
	bl	build_bottom_up
	sub	r2, fp, #120832
	sub	r2, r2, #12
	sub	r2, r2, #408
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	ip, r3
	sub	r1, fp, #40192
	sub	r1, r1, #12
	sub	r1, r1, #212
	sub	r0, fp, #79872
	sub	r0, r0, #12
	sub	r0, r0, #932
	sub	r3, fp, #120832
	sub	r3, r3, #12
	sub	r3, r3, #404
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [ip, #-2448]
	bl	build_top_down
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2444]
	add	r3, r3, #1
	str	r3, [r2, #-2444]
.L54:
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2444]
	cmp	r3, #4
	ble	.L55
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2464]
	ldr	r2, .L58+20
	smull	r1, r2, r3, r2
	asr	r2, r2, #1
	asr	r3, r3, #31
	sub	r3, r2, r3
	sub	r2, fp, #118784
	sub	r2, r2, #12
	str	r3, [r2, #-2464]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2460]
	ldr	r2, .L58+20
	smull	r1, r2, r3, r2
	asr	r2, r2, #1
	asr	r3, r3, #31
	sub	r3, r2, r3
	sub	r2, fp, #118784
	sub	r2, r2, #12
	str	r3, [r2, #-2460]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r2, [r3, #-2464]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2460]
	sub	r1, fp, #118784
	sub	r1, r1, #12
	add	r3, r2, r3
	str	r3, [r1, #-2428]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2456]
	ldr	r2, .L58+20
	smull	r1, r2, r3, r2
	asr	r2, r2, #1
	asr	r3, r3, #31
	sub	r3, r2, r3
	sub	r2, fp, #118784
	sub	r2, r2, #12
	str	r3, [r2, #-2456]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2452]
	ldr	r2, .L58+20
	smull	r1, r2, r3, r2
	asr	r2, r2, #1
	asr	r3, r3, #31
	sub	r3, r2, r3
	sub	r2, fp, #118784
	sub	r2, r2, #12
	str	r3, [r2, #-2452]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r2, [r3, #-2456]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2452]
	sub	r1, fp, #118784
	sub	r1, r1, #12
	add	r3, r2, r3
	str	r3, [r1, #-2424]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r2, [r3, #-2464]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2456]
	sub	r1, fp, #118784
	sub	r1, r1, #12
	sub	r0, fp, #118784
	sub	r0, r0, #12
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [r1, #-2448]
	ldr	r1, .L58+24
	ldr	r0, [r0, #-2440]
	bl	fprintf
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r2, [r3, #-2460]
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2452]
	sub	r1, fp, #118784
	sub	r1, r1, #12
	sub	r0, fp, #118784
	sub	r0, r0, #12
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [r1, #-2448]
	ldr	r1, .L58+24
	ldr	r0, [r0, #-2436]
	bl	fprintf
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r0, r3
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2424]
	str	r3, [sp]
	ldr	r3, [r1, #-2428]
	ldr	r2, [r2, #-2448]
	ldr	r1, .L58+24
	ldr	r0, [r0, #-2432]
	bl	fprintf
	sub	r3, fp, #118784
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2448]
	add	r3, r3, #100
	str	r3, [r2, #-2448]
.L53:
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r3, [r3, #-2448]
	ldr	r2, .L58+28
	cmp	r3, r2
	ble	.L56
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r0, [r3, #-2440]
	bl	fclose
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r0, [r3, #-2436]
	bl	fclose
	sub	r3, fp, #118784
	sub	r3, r3, #12
	ldr	r0, [r3, #-2432]
	bl	fclose
	nop
	ldr	r3, .L58
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC14
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	1717986919
	.word	.LC13
	.word	10100
	.size	test_building_methods, .-test_building_methods
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	test_functions
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
