	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageGetHeapFreeSpace           ## -- Begin function PageGetHeapFreeSpace
	.p2align	4, 0x90
_PageGetHeapFreeSpace:                  ## @PageGetHeapFreeSpace
	.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, %r13
	callq	_PageGetFreeSpace
	movq	%rax, %r14
	testq	%rax, %rax
	jle	LBB0_3
## %bb.1:
	movq	%r13, %rdi
	callq	_PageGetMaxOffsetNumber
	movq	%rax, %r12
	movq	_MaxHeapTuplesPerPage@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jge	LBB0_5
LBB0_3:
	movq	%r14, %r15
LBB0_4:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%r13d, %edi
	callq	_PageHasFreeLinePointers
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	%r12, %rbx
	jg	LBB0_4
## %bb.7:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_PageGetItemId
	movl	%eax, %edi
	callq	_ItemIdIsUsed
	testl	%eax, %eax
	je	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_OffsetNumberNext
	movq	%rax, %rbx
	cmpq	%r12, %rax
	jle	LBB0_8
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxHeapTuplesPerPage,8,3       ## @MaxHeapTuplesPerPage
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageGetHeapFreeSpace           ; -- Begin function PageGetHeapFreeSpace
	.p2align	2
_PageGetHeapFreeSpace:                  ; @PageGetHeapFreeSpace
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_PageGetFreeSpace
	mov	x20, x0
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_PageGetMaxOffsetNumber
Lloh0:
	adrp	x8, _MaxHeapTuplesPerPage@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MaxHeapTuplesPerPage@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_4
LBB0_2:
	mov	x0, x20
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_PageHasFreeLinePointers
	mov	x8, x0
	mov	x0, #0
	cbz	x8, LBB0_3
; %bb.5:
Lloh3:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	cmp	x22, x21
	b.gt	LBB0_3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_PageGetItemId
	bl	_ItemIdIsUsed
	cbz	w0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_OffsetNumberNext
	mov	x22, x0
	cmp	x0, x21
	b.le	LBB0_6
; %bb.8:
	mov	x0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxHeapTuplesPerPage,8,3       ; @MaxHeapTuplesPerPage
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
.subsections_via_symbols
