	.file	"40761580.c"
	.intel_syntax noprefix
	.text
	.type	xrealloc, @function
xrealloc:
.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	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	call	abort@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	xrealloc, .-xrealloc
	.section	.rodata
.LC0:
	.string	"the_stack_data/40761580.c"
	.align 8
.LC1:
	.string	"minhp->capacity >= k_initial_capacity"
	.text
	.type	minheap_detail_allocate, @function
minheap_detail_allocate:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 255
	jg	.L5
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 28
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	xrealloc
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	minheap_detail_allocate, .-minheap_detail_allocate
	.type	minheap_detail_grow, @function
minheap_detail_grow:
.LFB8:
	.cfi_startproc
	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]
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_detail_allocate
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	minheap_detail_grow, .-minheap_detail_grow
	.type	minheap_detail_swap, @function
minheap_detail_swap:
.LFB9:
	.cfi_startproc
	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	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 2
	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
.LFE9:
	.size	minheap_detail_swap, .-minheap_detail_swap
	.type	minheap_detail_heapify_down, @function
minheap_detail_heapify_down:
.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, 40
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -32[rbp], 0
.L14:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rax
	add	rax, 1
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -24[rbp], rax
	jge	.L15
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -16[rbp], rax
	jge	.L11
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L11
	mov	rax, QWORD PTR -16[rbp]
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -24[rbp]
.L12:
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L16
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	minheap_detail_swap
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L14
.L15:
	nop
	jmp	.L17
.L16:
	nop
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	minheap_detail_heapify_down, .-minheap_detail_heapify_down
	.type	minheap_detail_heapify_up, @function
minheap_detail_heapify_up:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	sub	rax, 1
	mov	QWORD PTR -16[rbp], rax
	jmp	.L19
.L22:
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, 1
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L23
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	minheap_detail_swap
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
.L19:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L22
	jmp	.L24
.L23:
	nop
.L24:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	minheap_detail_heapify_up, .-minheap_detail_heapify_up
	.type	minheap_create, @function
minheap_create:
.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 -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 256
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	minheap_detail_allocate
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rcx], rax
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	mov	rax, QWORD PTR -40[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	minheap_create, .-minheap_create
	.type	minheap_destroy, @function
minheap_destroy:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	minheap_destroy, .-minheap_destroy
	.type	minheap_length, @function
minheap_length:
.LFB14:
	.cfi_startproc
	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	rax, QWORD PTR 8[rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	minheap_length, .-minheap_length
	.type	minheap_peek, @function
minheap_peek:
.LFB15:
	.cfi_startproc
	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	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	minheap_peek, .-minheap_peek
	.type	minheap_pop, @function
minheap_pop:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	sal	rax, 2
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	minheap_detail_heapify_down
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	minheap_pop, .-minheap_pop
	.type	minheap_push, @function
minheap_push:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rdx, rax
	jne	.L36
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_detail_grow
.L36:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rcx, 1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rcx
	sal	rax, 2
	lea	rdx, [rsi+rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_detail_heapify_up
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	minheap_push, .-minheap_push
	.type	maxheap_create, @function
maxheap_create:
.LFB18:
	.cfi_startproc
	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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	minheap_create
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rcx], rax
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	mov	rax, QWORD PTR -40[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	maxheap_create, .-maxheap_create
	.type	maxheap_destroy, @function
maxheap_destroy:
.LFB19:
	.cfi_startproc
	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	rdi, rax
	call	minheap_destroy
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	maxheap_destroy, .-maxheap_destroy
	.type	maxheap_length, @function
maxheap_length:
.LFB20:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_length
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	maxheap_length, .-maxheap_length
	.type	maxheap_peek, @function
maxheap_peek:
.LFB21:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_peek
	neg	eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	maxheap_peek, .-maxheap_peek
	.type	maxheap_pop, @function
maxheap_pop:
.LFB22:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	minheap_pop
	neg	eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	maxheap_pop, .-maxheap_pop
	.type	maxheap_push, @function
maxheap_push:
.LFB23:
	.cfi_startproc
	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	eax, DWORD PTR -12[rbp]
	neg	eax
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	minheap_push
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	maxheap_push, .-maxheap_push
	.type	add, @function
add:
.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	maxheap_peek
	cmp	DWORD PTR -20[rbp], eax
	jge	.L49
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	maxheap_push
	jmp	.L51
.L49:
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	minheap_push
.L51:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	add, .-add
	.type	rebalance, @function
rebalance:
.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	maxheap_length
	mov	rbx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	minheap_length
	mov	rdx, rax
	mov	rax, rbx
	sub	rax, rdx
	cmp	rax, -2
	je	.L53
	cmp	rax, 2
	jne	.L56
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	maxheap_pop
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	minheap_push
	jmp	.L55
.L53:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	minheap_pop
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	maxheap_push
	jmp	.L55
.L56:
	nop
.L55:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	rebalance, .-rebalance
	.type	compute_median, @function
compute_median:
.LFB26:
	.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, 32
	.cfi_offset 3, -24
	mov	QWORD PTR -32[rbp], rdi
	mov	QWORD PTR -40[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	maxheap_length
	mov	rbx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	minheap_length
	mov	rdx, rax
	mov	rax, rbx
	sub	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L58
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	maxheap_peek
	mov	ebx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	minheap_peek
	add	eax, ebx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR .LC2[rip]
	divsd	xmm0, xmm1
	jmp	.L62
.L58:
	cmp	QWORD PTR -16[rbp], 0
	jle	.L60
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	maxheap_peek
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	jmp	.L62
.L60:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	minheap_peek
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
.L62:
	movq	rax, xmm0
	movq	xmm0, rax
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	compute_median, .-compute_median
	.section	.rodata
.LC3:
	.string	"%.1f\n"
	.text
	.type	put, @function
put:
.LFB27:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	movsd	QWORD PTR -8[rbp], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	put, .-put
	.section	.rodata
.LC4:
	.string	"%d"
	.text
	.type	get, @function
get:
.LFB28:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	get, .-get
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	maxheap_create
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	minheap_create
	mov	eax, 0
	call	get
	mov	DWORD PTR -68[rbp], eax
	mov	eax, 0
	call	get
	mov	edx, eax
	lea	rax, -64[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	maxheap_push
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	maxheap_peek
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movq	rax, xmm1
	movq	xmm0, rax
	call	put
	jmp	.L68
.L69:
	mov	eax, 0
	call	get
	mov	edx, eax
	lea	rcx, -32[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add
	lea	rdx, -32[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rebalance
	lea	rdx, -32[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	compute_median
	movq	rax, xmm0
	movq	xmm0, rax
	call	put
.L68:
	sub	DWORD PTR -68[rbp], 1
	cmp	DWORD PTR -68[rbp], 0
	jg	.L69
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	minheap_destroy
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	maxheap_destroy
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	main, .-main
	.section	.rodata
	.align 16
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 24
__PRETTY_FUNCTION__.0:
	.string	"minheap_detail_allocate"
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.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	"40761580.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xrealloc, %function
xrealloc:
	@ 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	realloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	bl	abort
.L2:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	xrealloc, .-xrealloc
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/40761580.c\000"
	.align	2
.LC1:
	.ascii	"minhp->capacity >= k_initial_capacity\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_detail_allocate, %function
minheap_detail_allocate:
	@ 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]
	cmp	r3, #255
	bgt	.L5
	ldr	r3, .L6
	mov	r2, #28
	ldr	r1, .L6+4
	ldr	r0, .L6+8
	bl	__assert_fail
.L5:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	xrealloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	__PRETTY_FUNCTION__.5149
	.word	.LC0
	.word	.LC1
	.size	minheap_detail_allocate, .-minheap_detail_allocate
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_detail_grow, %function
minheap_detail_grow:
	@ 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]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	minheap_detail_allocate
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_detail_grow, .-minheap_detail_grow
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_detail_swap, %function
minheap_detail_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, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	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	minheap_detail_swap, .-minheap_detail_swap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_detail_heapify_down, %function
minheap_detail_heapify_down:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-20]
.L16:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L13
	ldr	r3, [fp, #-12]
	b	.L14
.L13:
	ldr	r3, [fp, #-16]
.L14:
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L18
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	minheap_detail_swap
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	b	.L16
.L17:
	nop
	b	.L19
.L18:
	nop
.L19:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_detail_heapify_down, .-minheap_detail_heapify_down
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_detail_heapify_up, %function
minheap_detail_heapify_up:
	@ 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]
	ldr	r3, [r3, #4]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L21
.L24:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L25
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	minheap_detail_swap
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L24
	b	.L26
.L25:
	nop
.L26:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_detail_heapify_up, .-minheap_detail_heapify_up
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_create, %function
minheap_create:
	@ 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]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #256
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #20
	mov	r0, r3
	bl	minheap_detail_allocate
	ldr	r3, [fp, #-24]
	mov	ip, r3
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC2
	.size	minheap_create, .-minheap_create
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_destroy, %function
minheap_destroy:
	@ 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, #8]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_destroy, .-minheap_destroy
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_length, %function
minheap_length:
	@ 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, #4]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	minheap_length, .-minheap_length
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_peek, %function
minheap_peek:
	@ 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, #8]
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	minheap_peek, .-minheap_peek
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_pop, %function
minheap_pop:
	@ 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]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	sub	r1, r3, #1
	ldr	r3, [fp, #-16]
	str	r1, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r0, [fp, #-16]
	bl	minheap_detail_heapify_down
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_pop, .-minheap_pop
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	minheap_push, %function
minheap_push:
	@ 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]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L40
	ldr	r0, [fp, #-8]
	bl	minheap_detail_grow
.L40:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r0, r3, #1
	ldr	r1, [fp, #-8]
	str	r0, [r1, #4]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	minheap_detail_heapify_up
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	minheap_push, .-minheap_push
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_create, %function
maxheap_create:
	@ 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]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	mov	r0, r3
	bl	minheap_create
	ldr	r3, [fp, #-24]
	mov	ip, r3
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, .L44
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC3
	.size	maxheap_create, .-maxheap_create
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_destroy, %function
maxheap_destroy:
	@ 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]
	mov	r0, r3
	bl	minheap_destroy
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	maxheap_destroy, .-maxheap_destroy
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_length, %function
maxheap_length:
	@ 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]
	mov	r0, r3
	bl	minheap_length
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	maxheap_length, .-maxheap_length
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_peek, %function
maxheap_peek:
	@ 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]
	mov	r0, r3
	bl	minheap_peek
	mov	r3, r0
	rsb	r3, r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	maxheap_peek, .-maxheap_peek
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_pop, %function
maxheap_pop:
	@ 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]
	mov	r0, r3
	bl	minheap_pop
	mov	r3, r0
	rsb	r3, r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	maxheap_pop, .-maxheap_pop
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	maxheap_push, %function
maxheap_push:
	@ 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	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	mov	r1, r3
	mov	r0, r2
	bl	minheap_push
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	maxheap_push, .-maxheap_push
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add, %function
add:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	maxheap_peek
	mov	r2, r0
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bge	.L55
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	maxheap_push
	b	.L57
.L55:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	minheap_push
.L57:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	add, .-add
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rebalance, %function
rebalance:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	maxheap_length
	mov	r4, r0
	ldr	r0, [fp, #-20]
	bl	minheap_length
	mov	r3, r0
	sub	r3, r4, r3
	cmn	r3, #2
	beq	.L59
	cmp	r3, #2
	bne	.L62
	ldr	r0, [fp, #-16]
	bl	maxheap_pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	minheap_push
	b	.L61
.L59:
	ldr	r0, [fp, #-20]
	bl	minheap_pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	maxheap_push
	b	.L61
.L62:
	nop
.L61:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rebalance, .-rebalance
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	compute_median, %function
compute_median:
	@ 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	r0, [fp, #-24]
	bl	maxheap_length
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	minheap_length
	mov	r3, r0
	sub	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L64
	ldr	r0, [fp, #-24]
	bl	maxheap_peek
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	minheap_peek
	mov	r3, r0
	add	r3, r4, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	b	.L68
.L64:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L66
	ldr	r0, [fp, #-24]
	bl	maxheap_peek
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	b	.L68
.L66:
	ldr	r0, [fp, #-28]
	bl	minheap_peek
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
.L68:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	compute_median, .-compute_median
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%.1f\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	put, %function
put:
	@ 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, #-12]
	str	r1, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L70
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	.LC4
	.size	put, .-put
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get, %function
get:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L75+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC6
	.word	.LC5
	.size	get, .-get
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L82
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #32
	mov	r0, r3
	bl	maxheap_create
	sub	r3, fp, #20
	mov	r0, r3
	bl	minheap_create
	bl	get
	str	r0, [fp, #-36]
	bl	get
	mov	r2, r0
	sub	r3, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	maxheap_push
	sub	r3, fp, #32
	mov	r0, r3
	bl	maxheap_peek
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	put
	b	.L78
.L79:
	bl	get
	mov	r2, r0
	sub	r1, fp, #20
	sub	r3, fp, #32
	mov	r0, r3
	bl	add
	sub	r2, fp, #20
	sub	r3, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	rebalance
	sub	r2, fp, #20
	sub	r3, fp, #32
	mov	r1, r2
	mov	r0, r3
	bl	compute_median
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	put
.L78:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bgt	.L79
	sub	r3, fp, #20
	mov	r0, r3
	bl	minheap_destroy
	sub	r3, fp, #32
	mov	r0, r3
	bl	maxheap_destroy
	mov	r3, #0
	ldr	r2, .L82
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L81
	bl	__stack_chk_fail
.L81:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5149, %object
	.size	__PRETTY_FUNCTION__.5149, 24
__PRETTY_FUNCTION__.5149:
	.ascii	"minheap_detail_allocate\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
