	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function FreePageManagerGetInternal
_FreePageManagerGetInternal:            ## @FreePageManagerGetInternal
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_fpm_segment_base
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_FPM_NUM_FREELISTS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	callq	_Min
	leaq	-1(%rax), %r15
	xorl	%ecx, %ecx
	cmpq	(%r12), %r15
	jae	LBB0_35
## %bb.1:
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movl	$4, %r14d
	subq	%rax, %r14
	movq	%r12, %rbx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_relptr_is_null
	testq	%rax, %rax
	je	LBB0_3
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	addq	$-4, %r14
	cmpq	(%rbx), %r15
	jb	LBB0_2
## %bb.15:
	xorl	%ecx, %ecx
	jmp	LBB0_35
LBB0_3:
	movq	(%rbx), %rbx
	decq	%rbx
	movq	40(%r13), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r12, %rdi
	callq	_relptr_access
	movq	%rax, %r12
	cmpq	%rbx, %r15
	jae	LBB0_5
## %bb.4:
	movq	%r12, %rbx
LBB0_11:
	movq	%rbx, %r12
	testq	%rbx, %rbx
	movl	$0, %ecx
	je	LBB0_35
LBB0_12:
	movq	8(%r12), %rax
	movq	_FREE_PAGE_SPAN_LEADER_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	16(%r12), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_relptr_access
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	20(%r12), %esi
	movq	%rbx, %rdi
	callq	_relptr_access
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.13:
	addq	$20, %rcx
	jmp	LBB0_17
LBB0_5:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rbx
	cmpq	%rcx, %rax
	je	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r12), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_relptr_access
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	%rcx, %rax
	jb	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%rax, (%rbx)
	ja	LBB0_9
	jmp	LBB0_10
LBB0_16:
	movq	40(%r13), %rcx
	subq	%r14, %rcx
LBB0_17:
	movq	_FPM_NUM_FREELISTS@GOTPCREL(%rip), %rbx
	movl	(%rcx), %edi
	movl	20(%r12), %esi
	callq	_relptr_copy
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	16(%rax), %edi
	movl	16(%r12), %esi
	callq	_relptr_copy
LBB0_19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	movq	%rax, %r14
	movq	%r15, %rax
	subq	(%rbx), %rax
	cmpq	$-1, %rax
	je	LBB0_21
## %bb.20:
	movq	(%r13), %rax
	jmp	LBB0_22
LBB0_21:
	movq	(%r13), %rax
	cmpq	%rax, (%r12)
	je	LBB0_24
LBB0_22:
	movq	%r15, %rcx
	subq	%rax, %rcx
	cmpq	$-1, %rcx
	jne	LBB0_25
## %bb.23:
	movq	40(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_relptr_is_null
	testq	%rax, %rax
	je	LBB0_25
LBB0_24:
	movl	$1, 8(%r13)
LBB0_25:
	movl	32(%r13), %edi
	callq	_relptr_is_null
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	xorl	%edi, %edi
	cmpq	16(%r13), %r14
	sete	%dil
	callq	_Assert
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	24(%r13), %rax
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rbx, (%r12)
	setae	%dil
	callq	_Assert
	movq	16(%r13), %rsi
	addq	%rbx, %rsi
	movq	%rsi, 16(%r13)
	movq	24(%r13), %rdx
	subq	%rbx, %rdx
	movq	%rdx, 24(%r13)
	testq	%rdx, %rdx
	jle	LBB0_34
## %bb.27:
	movq	%r13, %rdi
	jmp	LBB0_33
LBB0_28:
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_FreePageBtreeSearch
	movl	-80(%rbp), %edi
	callq	_Assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%r12)
	jne	LBB0_30
## %bb.29:
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_FreePageBtreeRemove
	jmp	LBB0_34
LBB0_30:
	seta	%al
	movzbl	%al, %edi
	callq	_Assert
	movq	-72(%rbp), %rbx
	movq	-64(%rbp), %rax
	movq	(%rax), %r15
	shlq	$4, %rbx
	movq	(%r15,%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_Assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, 8(%r15,%rbx)
	subq	%rax, (%r15,%rbx)
	cmpq	$0, -72(%rbp)
	jne	LBB0_32
## %bb.31:
	movq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_FreePageBtreeAdjustAncestorKeys
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_32:
	addq	%rax, %r14
	movq	(%r12), %rdx
	subq	%rax, %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
LBB0_33:
	callq	_FreePagePushSpanLeader
LBB0_34:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_fpm_pointer_to_page
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	$1, %ecx
LBB0_35:
	movl	%ecx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FPM_NUM_FREELISTS,8,3          ## @FPM_NUM_FREELISTS
	.comm	_FREE_PAGE_SPAN_LEADER_MAGIC,8,3 ## @FREE_PAGE_SPAN_LEADER_MAGIC
	.no_dead_strip	_FreePageManagerGetInternal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function FreePageManagerGetInternal
_FreePageManagerGetInternal:            ; @FreePageManagerGetInternal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_fpm_segment_base
	mov	x20, x0
Lloh0:
	adrp	x27, _FPM_NUM_FREELISTS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _FPM_NUM_FREELISTS@GOTPAGEOFF]
	ldr	x1, [x27]
	mov	x0, x22
	bl	_Min
	sub	x26, x0, #1
	ldr	x8, [x27]
	cmp	x26, x8
	b.hs	LBB0_9
; %bb.1:
	mov	w8, #4
	sub	x28, x8, x0, lsl #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #40]
	ldr	w0, [x8, x26, lsl #2]
	bl	_relptr_is_null
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	ldr	x8, [x27]
	sub	x28, x28, #4
	cmp	x26, x8
	b.lo	LBB0_2
	b	LBB0_9
LBB0_4:
	ldr	x8, [x27]
	sub	x24, x8, #1
	ldr	x8, [x21, #40]
	ldr	w1, [x8, x26, lsl #2]
	mov	x0, x20
	bl	_relptr_access
	mov	x23, x0
	cmp	x26, x24
	b.hs	LBB0_11
; %bb.5:
	mov	x24, x23
LBB0_6:
	mov	x23, x24
	cbz	x24, LBB0_9
LBB0_7:
	ldr	x8, [x23, #8]
Lloh2:
	adrp	x9, _FREE_PAGE_SPAN_LEADER_MAGIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FREE_PAGE_SPAN_LEADER_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w1, [x23, #16]
	mov	x0, x20
	bl	_relptr_access
	mov	x25, x0
	ldr	w1, [x23, #20]
	mov	x0, x20
	bl	_relptr_access
	mov	x24, x0
	cbz	x25, LBB0_17
; %bb.8:
	add	x8, x25, #20
	b	LBB0_18
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	mov	x24, #0
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x24, x23
	cmp	x8, x22
	b.eq	LBB0_7
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w1, [x23, #20]
	mov	x0, x20
	bl	_relptr_access
	mov	x23, x0
	cbz	x0, LBB0_6
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cmp	x8, x22
	b.lo	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	cbz	x24, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x24]
	cmp	x9, x8
	b.hi	LBB0_12
	b	LBB0_13
LBB0_17:
	ldr	x8, [x21, #40]
	sub	x8, x8, x28
LBB0_18:
	ldr	w0, [x8]
	ldr	w1, [x23, #20]
	bl	_relptr_copy
	cbz	x24, LBB0_20
; %bb.19:
	ldr	w0, [x24, #16]
	ldr	w1, [x23, #16]
	bl	_relptr_copy
LBB0_20:
	mov	x0, x20
	mov	x1, x23
	bl	_fpm_pointer_to_page
	mov	x24, x0
	ldr	x8, [x27]
	sub	x8, x26, x8
	cmn	x8, #1
	b.eq	LBB0_22
; %bb.21:
	ldr	x8, [x21]
	b	LBB0_23
LBB0_22:
	ldr	x9, [x23]
	ldr	x8, [x21]
	cmp	x9, x8
	b.eq	LBB0_25
LBB0_23:
	sub	x8, x26, x8
	cmn	x8, #1
	b.ne	LBB0_26
; %bb.24:
	ldr	x8, [x21, #40]
	ldr	w0, [x8, x26, lsl #2]
	bl	_relptr_is_null
	cbz	x0, LBB0_26
LBB0_25:
	mov	w8, #1
	str	w8, [x21, #8]
LBB0_26:
	ldr	w0, [x21, #32]
	bl	_relptr_is_null
	cbz	x0, LBB0_28
; %bb.27:
	ldr	x8, [x21, #16]
	cmp	x24, x8
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x23]
	ldr	x9, [x21, #24]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x23]
	cmp	x8, x22
	cset	w0, hs
	bl	_Assert
	ldp	x8, x9, [x21, #16]
	add	x1, x8, x22
	sub	x2, x9, x22
	stp	x1, x2, [x21, #16]
	cmp	x2, #1
	b.ge	LBB0_33
	b	LBB0_34
LBB0_28:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x24
	bl	_FreePageBtreeSearch
	ldr	w0, [sp, #8]
	bl	_Assert
	ldr	x8, [x23]
	cmp	x8, x22
	b.ne	LBB0_30
; %bb.29:
	ldp	x2, x1, [sp, #16]
	mov	x0, x21
	bl	_FreePageBtreeRemove
	b	LBB0_34
LBB0_30:
	cset	w0, hi
	bl	_Assert
	ldp	x9, x8, [sp, #16]
	ldr	x8, [x8]
	add	x25, x8, x9, lsl #4
	ldr	x8, [x25]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w8, [x25, #8]
	add	w8, w8, w22
	str	w8, [x25, #8]
	ldr	x8, [x25]
	sub	x8, x8, x22
	str	x8, [x25]
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_32
; %bb.31:
	ldr	x1, [sp, #24]
	mov	x0, x21
	bl	_FreePageBtreeAdjustAncestorKeys
LBB0_32:
	add	x1, x24, x22
	ldr	x8, [x23]
	sub	x2, x8, x22
LBB0_33:
	mov	x0, x21
	bl	_FreePagePushSpanLeader
LBB0_34:
	mov	x0, x20
	mov	x1, x23
	bl	_fpm_pointer_to_page
	str	x0, [x19]
	mov	w0, #1
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FPM_NUM_FREELISTS,8,3          ; @FPM_NUM_FREELISTS
	.comm	_FREE_PAGE_SPAN_LEADER_MAGIC,8,3 ; @FREE_PAGE_SPAN_LEADER_MAGIC
	.no_dead_strip	_FreePageManagerGetInternal
.subsections_via_symbols
