	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_rescan                    ## -- Begin function heap_rescan
	.p2align	4, 0x90
_heap_rescan:                           ## @heap_rescan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movslq	%edi, %rbx
	testl	%edx, %edx
	je	LBB0_12
## %bb.1:
	movq	_SO_ALLOW_STRAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.2:
	orl	8(%rbx), %eax
	jmp	LBB0_4
LBB0_3:
	notl	%eax
	andl	8(%rbx), %eax
LBB0_4:
	movq	_SO_ALLOW_SYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r8d, %r8d
	je	LBB0_6
## %bb.5:
	orl	%ecx, %eax
	jmp	LBB0_7
LBB0_6:
	notl	%ecx
	andl	%ecx, %eax
LBB0_7:
	movl	%eax, 8(%rbx)
	testl	%r9d, %r9d
	je	LBB0_11
## %bb.8:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	callq	_IsMVCCSnapshot
	testq	%rax, %rax
	je	LBB0_10
## %bb.15:
	movq	_SO_ALLOW_PAGEMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_12
LBB0_10:
	movl	8(%rbx), %eax
LBB0_11:
	movq	_SO_ALLOW_PAGEMODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 8(%rbx)
LBB0_12:
	movl	(%rbx), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	(%rbx), %edi
	callq	_ReleaseBuffer
LBB0_14:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_initscan                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SO_ALLOW_STRAT,4,2             ## @SO_ALLOW_STRAT
	.comm	_SO_ALLOW_SYNC,4,2              ## @SO_ALLOW_SYNC
	.comm	_SO_ALLOW_PAGEMODE,4,2          ## @SO_ALLOW_PAGEMODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_rescan                    ; -- Begin function heap_rescan
	.p2align	2
_heap_rescan:                           ; @heap_rescan
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
	cbz	w2, LBB0_13
; %bb.1:
Lloh0:
	adrp	x8, _SO_ALLOW_STRAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SO_ALLOW_STRAT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w3, LBB0_3
; %bb.2:
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	b	LBB0_4
LBB0_3:
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
LBB0_4:
Lloh3:
	adrp	x9, _SO_ALLOW_SYNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SO_ALLOW_SYNC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	w4, LBB0_6
; %bb.5:
	orr	w8, w8, w9
	str	w8, [x20, #8]
	cbnz	w5, LBB0_7
	b	LBB0_11
LBB0_6:
	bic	w8, w8, w9
	str	w8, [x20, #8]
	cbz	w5, LBB0_11
LBB0_7:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_11
; %bb.8:
	bl	_IsMVCCSnapshot
	cbz	x0, LBB0_10
; %bb.9:
Lloh6:
	adrp	x8, _SO_ALLOW_PAGEMODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_ALLOW_PAGEMODE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	b	LBB0_12
LBB0_10:
	ldr	w8, [x20, #8]
LBB0_11:
Lloh9:
	adrp	x9, _SO_ALLOW_PAGEMODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SO_ALLOW_PAGEMODE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	bic	w8, w8, w9
LBB0_12:
	str	w8, [x20, #8]
LBB0_13:
	ldr	w0, [x20]
	bl	_BufferIsValid
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [x20]
	bl	_ReleaseBuffer
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_initscan
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SO_ALLOW_STRAT,4,2             ; @SO_ALLOW_STRAT
	.comm	_SO_ALLOW_SYNC,4,2              ; @SO_ALLOW_SYNC
	.comm	_SO_ALLOW_PAGEMODE,4,2          ; @SO_ALLOW_PAGEMODE
.subsections_via_symbols
