	.file	"223914.c"
	.intel_syntax noprefix
	.text
	.globl	create_leaf
	.type	create_leaf, @function
create_leaf:
.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	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 64[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	QWORD PTR 8[rax+rdx*8], 0
	add	DWORD PTR -12[rbp], 1
.L4:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L5
	mov	rax, QWORD PTR -8[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	create_leaf, .-create_leaf
	.globl	binarySearch
	.type	binarySearch, @function
binarySearch:
.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L7
.L11:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L8
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	cmp	DWORD PTR -28[rbp], eax
	jg	.L10
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L7
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L7:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L11
	mov	eax, DWORD PTR -12[rbp]
.L9:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	binarySearch, .-binarySearch
	.globl	split_page
	.type	split_page, @function
split_page:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	QWORD PTR -16[rbp], rax
	mov	eax, 0
	call	create_leaf
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 64[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	DWORD PTR -20[rbp], 2
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L13
.L14:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR 4[rax+rdx*4]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	DWORD PTR 4[rax+rdx*4], ecx
	add	DWORD PTR -24[rbp], 1
.L13:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L14
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 64[rax]
	test	eax, eax
	jne	.L15
	mov	DWORD PTR -24[rbp], 0
	jmp	.L16
.L17:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rdx, QWORD PTR 8[rax+rdx*8]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	movsx	rcx, ecx
	add	rcx, 2
	mov	QWORD PTR 8[rax+rcx*8], rdx
	add	DWORD PTR -24[rbp], 1
.L16:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L17
.L15:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 2
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -24[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rdx, QWORD PTR 8[rax+rdx*8]
	mov	rax, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	add	rcx, 2
	mov	QWORD PTR 8[rax+rcx*8], rdx
	sub	DWORD PTR -24[rbp], 1
.L18:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jg	.L19
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	movsx	rdx, edx
	lea	rcx, 2[rdx]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax+rcx*8], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	lea	rcx, 2[rdx]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax+rcx*8], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	mov	DWORD PTR 4[rax+rdx*4], ecx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR 4[rax+rdx*4]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	DWORD PTR 4[rax+rdx*4], ecx
	add	DWORD PTR -24[rbp], 1
.L20:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L21
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	split_page, .-split_page
	.globl	insertNFP
	.type	insertNFP, @function
insertNFP:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	binarySearch
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 64[rax]
	test	eax, eax
	je	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR 4[rax+rdx*4]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	DWORD PTR 4[rax+rdx*4], ecx
	sub	DWORD PTR -8[rbp], 1
.L25:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -28[rbp]
	mov	DWORD PTR 4[rax+rdx*4], ecx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L27
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L28
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	split_page
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L28
	add	DWORD PTR -4[rbp], 1
.L28:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	edx, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insertNFP
	mov	QWORD PTR -24[rbp], rax
.L27:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	insertNFP, .-insertNFP
	.globl	insert
	.type	insert, @function
insert:
.LFB10:
	.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	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L31
	mov	eax, 0
	call	create_leaf
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 64[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	split_page
	mov	QWORD PTR -24[rbp], rax
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insertNFP
	mov	QWORD PTR -8[rbp], rax
	jmp	.L32
.L31:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insertNFP
	mov	QWORD PTR -16[rbp], rax
.L32:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	insert, .-insert
	.globl	height
	.type	height, @function
height:
.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
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L35
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	jmp	.L36
.L35:
	mov	eax, 0
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	height, .-height
	.globl	n_page
	.type	n_page, @function
n_page:
.LFB12:
	.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 -24[rbp], 0
	cmp	QWORD PTR -40[rbp], 0
	je	.L38
	mov	DWORD PTR -20[rbp], 0
	jmp	.L39
.L41:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	test	rax, rax
	je	.L40
	mov	eax, DWORD PTR -24[rbp]
	lea	ebx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rdi, rax
	call	n_page
	add	eax, ebx
	mov	DWORD PTR -24[rbp], eax
.L40:
	add	DWORD PTR -20[rbp], 1
.L39:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L41
.L38:
	mov	eax, DWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	n_page, .-n_page
	.section	.rodata
.LC0:
	.string	" %d"
	.text
	.globl	printBtree
	.type	printBtree, @function
printBtree:
.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	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L49
	mov	DWORD PTR -4[rbp], 0
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L45:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L46
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L47
.L48:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rdi, rax
	call	printBtree
	add	DWORD PTR -4[rbp], 1
.L47:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L48
.L49:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	printBtree, .-printBtree
	.globl	avg
	.type	avg, @function
avg:
.LFB14:
	.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 -8[rbp], 0
	cmp	QWORD PTR -24[rbp], 0
	je	.L51
	mov	DWORD PTR -4[rbp], 0
	jmp	.L52
.L53:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L52:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L53
.L51:
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdq
	idiv	ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	avg, .-avg
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, 0
	call	create_leaf
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L56
.L57:
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L56:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L57
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	n_page
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"223914.c"
	.text
	.align	2
	.global	create_leaf
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_leaf, %function
create_leaf:
	@ 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	r0, #44
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #40]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L4
.L5:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L5
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	create_leaf, .-create_leaf
	.align	2
	.global	binarySearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearch, %function
binarySearch:
	@ 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, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L7
.L11:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L8
	ldr	r3, [fp, #-8]
	b	.L9
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bgt	.L10
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L11
	ldr	r3, [fp, #-16]
.L9:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	binarySearch, .-binarySearch
	.align	2
	.global	split_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	split_page, %function
split_page:
	@ 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	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	bl	create_leaf
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #40]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #40]
	mov	r3, #2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L13
.L14:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L16
.L17:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L16:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L17
.L15:
	ldr	r3, [fp, #-16]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L18
.L19:
	ldr	r3, [fp, #-20]
	add	r0, r3, #1
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-24]
	add	r3, r0, #4
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bgt	.L19
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L20
.L21:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	ldr	r2, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L21
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	split_page, .-split_page
	.align	2
	.global	insertNFP
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertNFP, %function
insertNFP:
	@ 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	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	binarySearch
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	beq	.L24
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L25
.L26:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L25:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L26
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	b	.L27
.L24:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L28
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	split_page
	str	r0, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L28
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L28:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	insertNFP
	str	r0, [fp, #-16]
.L27:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insertNFP, .-insertNFP
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ 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, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L31
	bl	create_leaf
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #40]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #20]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	split_page
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	insertNFP
	str	r0, [fp, #-8]
	b	.L32
.L31:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	insertNFP
	str	r0, [fp, #-12]
.L32:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insert, .-insert
	.align	2
	.global	height
	.syntax unified
	.arm
	.fpu softvfp
	.type	height, %function
height:
	@ 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, #20]
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	b	.L36
.L35:
	mov	r3, #0
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	height, .-height
	.align	2
	.global	n_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	n_page, %function
n_page:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L38
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L39
.L41:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-20]
	add	r4, r3, #1
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	n_page
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-20]
.L40:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L39:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L41
.L38:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	n_page, .-n_page
	.section	.rodata
	.align	2
.LC0:
	.ascii	" %d\000"
	.text
	.align	2
	.global	printBtree
	.syntax unified
	.arm
	.fpu softvfp
	.type	printBtree, %function
printBtree:
	@ 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
	beq	.L49
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L45
.L46:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L50
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L45:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L46
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L47
.L48:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	printBtree
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L47:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L48
.L49:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC0
	.size	printBtree, .-printBtree
	.global	__aeabi_idiv
	.align	2
	.global	avg
	.syntax unified
	.arm
	.fpu softvfp
	.type	avg, %function
avg:
	@ 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	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L53
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L54
.L55:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L55
.L53:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	avg, .-avg
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L62
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L62+4
	bl	__isoc99_scanf
	bl	create_leaf
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L58
.L59:
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L62+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	insert
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L58:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L59
	ldr	r0, [fp, #-12]
	bl	n_page
	mov	r3, r0
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L62+8
	bl	printf
	mov	r3, #0
	ldr	r2, .L62
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L61
	bl	__stack_chk_fail
.L61:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L63:
	.align	2
.L62:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
