	.file	"extr_freepage.c_FreePageBtreeRemove.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	FreePageBtreeRemove, @function
FreePageBtreeRemove:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rax, QWORD PTR FREE_PAGE_LEAF_MAGIC[rip]
	mov	r12, rdi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmp	QWORD PTR [rsi], rax
	mov	rbx, rdx
	sete	dil
	call	Assert@PLT
	xor	edi, edi
	cmp	QWORD PTR 8[rbp], rbx
	seta	dil
	call	Assert@PLT
	mov	rdx, QWORD PTR 8[rbp]
	cmp	rdx, 1
	je	.L8
	sub	rdx, 1
	mov	QWORD PTR 8[rbp], rdx
	cmp	rdx, rbx
	ja	.L9
.L4:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	FreePageBtreeConsolidate@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rcx, QWORD PTR 16[rbp]
	lea	rax, 4[0+rbx*4]
	sub	rdx, rbx
	sal	edx, 2
	lea	rsi, [rcx+rax]
	lea	rdi, -4[rcx+rax]
	call	memmove@PLT
	test	rbx, rbx
	jne	.L4
	mov	rsi, rbp
	mov	rdi, r12
	call	FreePageBtreeAdjustAncestorKeys@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	FreePageBtreeConsolidate@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	FreePageBtreeRemovePage@PLT
	.cfi_endproc
.LFE0:
	.size	FreePageBtreeRemove, .-FreePageBtreeRemove
	.comm	FREE_PAGE_LEAF_MAGIC,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_freepage.c_FreePageBtreeRemove.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FreePageBtreeRemove, %function
FreePageBtreeRemove:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L10
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	mov	r5, r2
	ldr	r2, [r1]
	mov	r6, r0
	sub	r0, r2, r3
	clz	r0, r0
	mov	r4, r1
	lsr	r0, r0, #5
	bl	Assert
	ldr	r0, [r4, #4]
	cmp	r0, r5
	movls	r0, #0
	movhi	r0, #1
	bl	Assert
	ldr	r3, [r4, #4]
	cmp	r3, #1
	beq	.L8
	sub	r3, r3, #1
	cmp	r3, r5
	str	r3, [r4, #4]
	bhi	.L9
.L4:
	mov	r1, r4
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	b	FreePageBtreeConsolidate
.L9:
	ldr	ip, [r4, #8]
	lsl	r0, r5, #2
	sub	r3, r3, r5
	add	r1, r0, #4
	lsl	r2, r3, #2
	add	r1, ip, r1
	add	r0, ip, r0
	bl	memmove
	cmp	r5, #0
	bne	.L4
	mov	r1, r4
	mov	r0, r6
	bl	FreePageBtreeAdjustAncestorKeys
	mov	r1, r4
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	b	FreePageBtreeConsolidate
.L8:
	mov	r1, r4
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	b	FreePageBtreeRemovePage
.L11:
	.align	2
.L10:
	.word	FREE_PAGE_LEAF_MAGIC
	.size	FreePageBtreeRemove, .-FreePageBtreeRemove
	.comm	FREE_PAGE_LEAF_MAGIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
