	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function FreePageBtreeCleanup
_FreePageBtreeCleanup:                  ## @FreePageBtreeCleanup
	.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	%rdi, %r15
	callq	_fpm_segment_base
	movq	%rax, %r14
	movl	32(%r15), %edi
	callq	_relptr_is_null
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	_FREE_PAGE_LEAF_MAGIC@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	movq	_FREE_PAGE_INTERNAL_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	32(%r15), %edi
	movq	8(%r12), %rax
	movl	(%rax), %esi
	callq	_relptr_copy
	movl	32(%r15), %esi
	movq	%r14, %rdi
	callq	_relptr_access
	movl	32(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_relptr_store
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_FreePageBtreeRecycle
	movl	32(%r15), %edi
	callq	_relptr_is_null
	testl	%eax, %eax
	jne	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	32(%r15), %esi
	movq	%r14, %rdi
	callq	_relptr_access
	movq	%rax, %r12
	movl	16(%rax), %eax
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	setg	%dil
	callq	_Assert
	decq	(%r15)
	movq	24(%r12), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	32(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_relptr_store
	movq	(%r12), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, 8(%r15)
	jmp	LBB0_14
LBB0_3:
	cmpl	$2, %eax
	jne	LBB0_15
## %bb.4:
	movq	24(%r12), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.8:
	movq	(%r12), %rcx
	movq	(%rcx), %rax
	movq	8(%rcx), %rbx
	leaq	(%rbx,%rax), %rdx
	incq	%rdx
	cmpq	16(%rcx), %rdx
	jne	LBB0_9
## %bb.10:
	addq	%rax, %rbx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	cmpq	%rax, %rbx
	jne	LBB0_11
## %bb.12:
	movq	(%r12), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_FreePagePopSpanLeader
	movq	(%r12), %rax
	movq	16(%rax), %rsi
	movq	%r15, %rdi
	callq	_FreePagePopSpanLeader
	movq	(%r12), %rax
	movq	(%rax), %rcx
	movq	%rcx, 8(%r15)
	movq	8(%rax), %rcx
	movq	24(%rax), %rax
	leaq	1(%rcx,%rax), %rax
	movq	%rax, 16(%r15)
	movq	$0, (%r15)
	movl	32(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_relptr_store
	movq	8(%r15), %rsi
	movq	16(%r15), %rdx
	movq	%r15, %rdi
	callq	_FreePagePushSpanLeader
	movl	$1, %edi
	callq	_Assert
	movq	16(%r15), %r13
	jmp	LBB0_15
LBB0_5:
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_9:
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_11:
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	%r15, %rdi
	callq	_FreePageBtreeGetRecycled
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_fpm_pointer_to_page
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_FreePageManagerPutInternal
	testq	%rax, %rax
	je	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpq	%r13, %rax
	cmovgq	%rax, %r13
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 24(%r15)
	jg	LBB0_16
	jmp	LBB0_18
LBB0_17:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_FreePageBtreeRecycle
LBB0_18:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FREE_PAGE_LEAF_MAGIC,8,3       ## @FREE_PAGE_LEAF_MAGIC
	.comm	_FREE_PAGE_INTERNAL_MAGIC,8,3   ## @FREE_PAGE_INTERNAL_MAGIC
	.no_dead_strip	_FreePageBtreeCleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function FreePageBtreeCleanup
_FreePageBtreeCleanup:                  ; @FreePageBtreeCleanup
	.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	x19, x0
	bl	_fpm_segment_base
	mov	x20, x0
	ldr	w0, [x19, #32]
	bl	_relptr_is_null
	cbz	w0, LBB0_5
LBB0_1:
	mov	x21, #0
LBB0_2:
	ldr	x8, [x19, #24]
	cmp	x8, #1
	b.lt	LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_FreePageBtreeGetRecycled
	mov	x1, x0
	mov	x0, x20
	bl	_fpm_pointer_to_page
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	mov	w3, #1
	bl	_FreePageManagerPutInternal
	cbz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x0, x21
	csel	x21, x0, x21, gt
	ldr	x8, [x19, #24]
	cmp	x8, #0
	b.gt	LBB0_3
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x22, _FREE_PAGE_LEAF_MAGIC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FREE_PAGE_LEAF_MAGIC@GOTPAGEOFF]
Lloh2:
	adrp	x23, _FREE_PAGE_INTERNAL_MAGIC@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FREE_PAGE_INTERNAL_MAGIC@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w0, [x19, #32]
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	bl	_relptr_copy
	ldr	w1, [x19, #32]
	mov	x0, x20
	bl	_relptr_access
	ldr	w1, [x0, #32]
	mov	x0, x20
	mov	x2, #0
	bl	_relptr_store
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_fpm_pointer_to_page
	mov	x1, x0
	mov	x0, x19
	bl	_FreePageBtreeRecycle
	ldr	w0, [x19, #32]
	bl	_relptr_is_null
	cbnz	w0, LBB0_1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #32]
	mov	x0, x20
	bl	_relptr_access
	mov	x21, x0
	ldr	w8, [x0, #16]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldr	x8, [x19]
	sub	x8, x8, #1
	str	x8, [x19]
	ldr	x8, [x21, #24]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x19, #32]
	mov	x0, x20
	mov	x2, #0
	bl	_relptr_store
	ldr	x8, [x21]
	ldr	q0, [x8]
	stur	q0, [x19, #8]
	b	LBB0_7
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	bl	_FreePageBtreeRecycle
LBB0_12:
	mov	x0, 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
	ret
LBB0_13:
	cmp	w8, #2
	b.ne	LBB0_1
; %bb.14:
	ldr	x8, [x21, #24]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.15:
	ldr	x8, [x21]
	ldp	x9, x10, [x8]
	add	x22, x10, x9
	ldr	x8, [x8, #16]
	add	x9, x22, #1
	cmp	x9, x8
	b.ne	LBB0_1
; %bb.16:
	mov	x0, x20
	mov	x1, x21
	bl	_fpm_pointer_to_page
	cmp	x22, x0
	b.ne	LBB0_1
; %bb.17:
	ldr	x8, [x21]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_FreePagePopSpanLeader
	ldr	x8, [x21]
	ldr	x1, [x8, #16]
	mov	x0, x19
	bl	_FreePagePopSpanLeader
	ldr	x8, [x21]
	ldp	x9, x10, [x8]
	ldr	x8, [x8, #24]
	add	x8, x10, x8
	add	x8, x8, #1
	stp	x9, x8, [x19, #8]
	str	xzr, [x19]
	ldr	w1, [x19, #32]
	mov	x0, x20
	mov	x2, #0
	bl	_relptr_store
	ldp	x1, x2, [x19, #8]
	mov	x0, x19
	bl	_FreePagePushSpanLeader
	mov	w0, #1
	bl	_Assert
	ldr	x21, [x19, #16]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FREE_PAGE_LEAF_MAGIC,8,3       ; @FREE_PAGE_LEAF_MAGIC
	.comm	_FREE_PAGE_INTERNAL_MAGIC,8,3   ; @FREE_PAGE_INTERNAL_MAGIC
	.no_dead_strip	_FreePageBtreeCleanup
.subsections_via_symbols
