	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heapam_scan_sample_next_block
_heapam_scan_sample_next_block:         ## @heapam_scan_sample_next_block
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rsi), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	*%rcx
	movq	%rax, %r14
	movq	%rax, 8(%rbx)
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_4:
	movq	8(%rbx), %rax
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %r15
	movl	16(%rbx), %edi
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	testl	%edi, %edi
	sete	%al
	movl	%eax, %edi
	callq	_Assert
	movq	24(%rbx), %r14
	jmp	LBB0_10
LBB0_6:
	callq	_Assert
	movq	(%rbx), %rdi
	movq	8(%rbx), %rax
	incq	%rax
	xorl	%r14d, %r14d
	cmpq	%rdi, %rax
	cmovlq	%rax, %r14
	movq	_SO_ALLOW_SYNC@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_8
## %bb.7:
	shrq	$32, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%r14, %rsi
	callq	_ss_report_location
LBB0_8:
	cmpq	24(%rbx), %r14
	jne	LBB0_10
## %bb.9:
	movq	(%r15), %r14
LBB0_10:
	movq	%r14, %rdi
	callq	_BlockNumberIsValid
	testl	%eax, %eax
	je	LBB0_11
## %bb.14:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_heapgetpage
	movl	$1, %eax
	jmp	LBB0_15
LBB0_11:
	movl	32(%rbx), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	32(%rbx), %edi
	callq	_ReleaseBuffer
LBB0_13:
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
LBB0_15:
	movl	%eax, 16(%rbx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_SO_ALLOW_SYNC,4,2              ## @SO_ALLOW_SYNC
	.comm	_InvalidBuffer,4,2              ## @InvalidBuffer
	.no_dead_strip	_heapam_scan_sample_next_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heapam_scan_sample_next_block
_heapam_scan_sample_next_block:         ; @heapam_scan_sample_next_block
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x9, [x1]
	ldr	x9, [x9]
	cbz	x9, LBB0_4
; %bb.2:
	mov	x0, x1
	mov	x1, x8
	blr	x9
	mov	x20, x0
	str	x0, [x19, #8]
	b	LBB0_9
LBB0_3:
	mov	w0, #0
	b	LBB0_15
LBB0_4:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x21, _InvalidBlockNumber@GOTPAGE
Lloh1:
	ldr	x21, [x21, _InvalidBlockNumber@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	w0, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	cmp	w0, #0
	cset	w0, eq
	bl	_Assert
	ldr	x20, [x19, #24]
	b	LBB0_9
LBB0_6:
	bl	_Assert
	ldp	x8, x9, [x19]
	add	x10, x9, #1
	cmp	x10, x8
	csinc	x20, xzr, x9, ge
Lloh2:
	adrp	x9, _SO_ALLOW_SYNC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SO_ALLOW_SYNC@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	lsr	x0, x8, #32
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x20
	bl	_ss_report_location
LBB0_8:
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	cmp	x20, x8
	csel	x20, x9, x20, eq
LBB0_9:
	mov	x0, x20
	bl	_BlockNumberIsValid
	cbz	w0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_heapgetpage
	mov	w0, #1
	b	LBB0_14
LBB0_11:
	ldr	w0, [x19, #32]
	bl	_BufferIsValid
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w0, [x19, #32]
	bl	_ReleaseBuffer
LBB0_13:
	mov	w0, #0
Lloh5:
	adrp	x8, _InvalidBuffer@GOTPAGE
Lloh6:
	ldr	x8, [x8, _InvalidBuffer@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh8:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh9:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_14:
	str	w0, [x19, #16]
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_SO_ALLOW_SYNC,4,2              ; @SO_ALLOW_SYNC
	.comm	_InvalidBuffer,4,2              ; @InvalidBuffer
	.no_dead_strip	_heapam_scan_sample_next_block
.subsections_via_symbols
