	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function FreePageBtreeRemovePage
_FreePageBtreeRemovePage:               ## @FreePageBtreeRemovePage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_fpm_segment_base
	movq	%rax, %r15
	movl	16(%r12), %esi
	movq	%rax, %rdi
	callq	_relptr_access
	testq	%rax, %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	cmpl	$1, (%rax)
	jg	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_FreePageBtreeRecycle
	movl	16(%rbx), %esi
	movq	%r15, %rdi
	callq	_relptr_access
	movq	%rbx, %r12
	testq	%rax, %rax
	jne	LBB0_2
LBB0_4:
	movl	24(%r14), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_relptr_store
	movq	$0, 16(%r14)
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	cmpq	$0, 8(%r14)
	sete	%dil
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Assert                         ## TAILCALL
LBB0_5:
	movq	%r12, %rdi
	callq	_FreePageBtreeFirstKey
	movq	8(%rbx), %rcx
	movq	_FREE_PAGE_LEAF_MAGIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_FreePageBtreeSearchLeaf
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	(%rbx), %eax
	setl	%dil
	callq	_Assert
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %r13d
	jge	LBB0_11
## %bb.7:
	leaq	32(%rbx), %rcx
	jmp	LBB0_10
LBB0_8:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_FreePageBtreeSearchInternal
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	(%rbx), %eax
	setl	%dil
	callq	_Assert
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %r13d
	jge	LBB0_11
## %bb.9:
	leaq	24(%rbx), %rcx
LBB0_10:
	movq	(%rcx), %rcx
	movslq	%r13d, %rdx
	leaq	(%rcx,%rdx,4), %rdi
	leaq	(%rcx,%rdx,4), %rsi
	addq	$4, %rsi
	notl	%edx
	addl	%eax, %edx
	shll	$2, %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memmove
LBB0_11:
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, (%rbx)
	xorl	%edi, %edi
	cmpl	$2, %eax
	setge	%dil
	callq	_Assert
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_FreePageBtreeRecycle
	testl	%r13d, %r13d
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_FreePageBtreeAdjustAncestorKeys
LBB0_13:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FreePageBtreeConsolidate       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FREE_PAGE_LEAF_MAGIC,8,3       ## @FREE_PAGE_LEAF_MAGIC
	.no_dead_strip	_FreePageBtreeRemovePage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function FreePageBtreeRemovePage
_FreePageBtreeRemovePage:               ; @FreePageBtreeRemovePage
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x19, x0
	bl	_fpm_segment_base
	mov	x20, x0
	ldr	w1, [x22, #16]
	bl	_relptr_access
	cbz	x0, LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_fpm_pointer_to_page
	mov	x1, x0
	mov	x0, x19
	bl	_FreePageBtreeRecycle
	ldr	w1, [x21, #16]
	mov	x0, x20
	bl	_relptr_access
	mov	x22, x21
	cbnz	x0, LBB0_1
LBB0_3:
	ldr	w1, [x19, #24]
	mov	x0, x20
	mov	x2, #0
	bl	_relptr_store
	str	xzr, [x19, #16]
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_Assert
LBB0_4:
	mov	x0, x22
	bl	_FreePageBtreeFirstKey
	mov	x1, x0
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _FREE_PAGE_LEAF_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FREE_PAGE_LEAF_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	x0, x21
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	bl	_FreePageBtreeSearchLeaf
	mov	x23, x0
	ldr	w8, [x21]
	cmp	w0, w8
	cset	w0, lt
	bl	_Assert
	ldr	w8, [x21]
	sub	w9, w8, #1
	cmp	w23, w9
	b.ge	LBB0_10
; %bb.6:
	add	x9, x21, #32
	b	LBB0_9
LBB0_7:
	bl	_FreePageBtreeSearchInternal
	mov	x23, x0
	ldr	w8, [x21]
	cmp	w0, w8
	cset	w0, lt
	bl	_Assert
	ldr	w8, [x21]
	sub	w9, w8, #1
	cmp	w23, w9
	b.ge	LBB0_10
; %bb.8:
	add	x9, x21, #24
LBB0_9:
	ldr	x9, [x9]
	add	x0, x9, w23, sxtw #2
	add	x1, x0, #4
	mvn	w9, w23
	add	w8, w8, w9
	lsl	w2, w8, #2
	bl	_memmove
LBB0_10:
	ldr	w8, [x21]
	subs	w8, w8, #1
	str	w8, [x21]
	cset	w0, gt
	bl	_Assert
	mov	x0, x20
	mov	x1, x22
	bl	_fpm_pointer_to_page
	mov	x1, x0
	mov	x0, x19
	bl	_FreePageBtreeRecycle
	cbnz	w23, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	bl	_FreePageBtreeAdjustAncestorKeys
LBB0_12:
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_FreePageBtreeConsolidate
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FREE_PAGE_LEAF_MAGIC,8,3       ; @FREE_PAGE_LEAF_MAGIC
	.no_dead_strip	_FreePageBtreeRemovePage
.subsections_via_symbols
