	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heap_xlog_visible
_heap_xlog_visible:                     ## @heap_xlog_visible
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	callq	_XLogRecGetData
	movq	%rax, %r15
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-52(%rbp), %r8
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%ecx, %ecx
	callq	_XLogRecGetBlockTag
	movq	_InHotStandby@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	4(%r15), %edi
	movl	-56(%rbp), %esi
	callq	_ResolveRecoveryConflictWithSnapshot
LBB0_2:
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_4
## %bb.3:
	movl	-48(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageSetAllVisible
	movl	-48(%rbp), %edi
	callq	_MarkBufferDirty
LBB0_4:
	movl	-48(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	-48(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageGetFreeSpace
	movl	%eax, %r12d
	movl	-48(%rbp), %edi
	callq	_UnlockReleaseBuffer
	movq	_VISIBILITYMAP_VALID_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_7
## %bb.6:
	movl	-56(%rbp), %edi
	movl	-52(%rbp), %esi
	movl	%r12d, %edx
	callq	_XLogRecordPageWithFreeSpace
LBB0_7:
	movq	_RBM_ZERO_ON_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_XLogReadBufferForRedoExtended
	movl	-44(%rbp), %edi
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.8:
	callq	_BufferGetPage
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	xorl	%edx, %edx
	callq	_PageInit
LBB0_10:
	movl	-44(%rbp), %edi
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	movl	-56(%rbp), %edi
	callq	_CreateFakeRelcacheEntry
	movl	%eax, %ebx
	movl	-52(%rbp), %esi
	leaq	-44(%rbp), %rdx
	movl	%eax, %edi
	callq	_visibilitymap_pin
	movl	%r12d, %edi
	callq	_PageGetLSN
	cmpq	%rax, %r14
	jle	LBB0_12
## %bb.11:
	movl	-52(%rbp), %esi
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-44(%rbp), %r8d
	movl	(%r15), %eax
	movl	4(%r15), %r9d
	movl	%eax, (%rsp)
	movl	%ebx, %edi
	movq	%r14, %rcx
	callq	_visibilitymap_set
LBB0_12:
	movl	-44(%rbp), %edi
	callq	_ReleaseBuffer
	movl	%ebx, %edi
	callq	_FreeFakeRelcacheEntry
	jmp	LBB0_15
LBB0_13:
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBuffer,4,2              ## @InvalidBuffer
	.comm	_InHotStandby,8,3               ## @InHotStandby
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_BLK_RESTORED,8,3               ## @BLK_RESTORED
	.comm	_VISIBILITYMAP_VALID_BITS,4,2   ## @VISIBILITYMAP_VALID_BITS
	.comm	_RBM_ZERO_ON_ERROR,4,2          ## @RBM_ZERO_ON_ERROR
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_heap_xlog_visible
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heap_xlog_visible
_heap_xlog_visible:                     ; @heap_xlog_visible
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	ldr	x19, [x0]
	bl	_XLogRecGetData
	mov	x20, x0
Lloh0:
	adrp	x23, _InvalidBuffer@GOTPAGE
Lloh1:
	ldr	x23, [x23, _InvalidBuffer@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x2, sp, #4
	mov	x4, sp
	mov	x0, x21
	mov	w1, #1
	mov	x3, #0
	bl	_XLogRecGetBlockTag
Lloh2:
	adrp	x8, _InHotStandby@GOTPAGE
Lloh3:
	ldr	x8, [x8, _InHotStandby@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20, #4]
	ldr	w1, [sp, #4]
	bl	_ResolveRecoveryConflictWithSnapshot
LBB0_2:
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #1
	bl	_XLogReadBufferForRedo
Lloh5:
	adrp	x24, _BLK_NEEDS_REDO@GOTPAGE
Lloh6:
	ldr	x24, [x24, _BLK_NEEDS_REDO@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [sp, #8]
	bl	_BufferGetPage
	bl	_PageSetAllVisible
	ldr	w0, [sp, #8]
	bl	_MarkBufferDirty
LBB0_4:
	ldr	w0, [sp, #8]
	bl	_BufferIsValid
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w0, [sp, #8]
	bl	_BufferGetPage
	bl	_PageGetFreeSpace
	mov	x22, x0
	ldr	w0, [sp, #8]
	bl	_UnlockReleaseBuffer
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _VISIBILITYMAP_VALID_BITS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VISIBILITYMAP_VALID_BITS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldp	w1, w0, [sp]
	mov	x2, x22
	bl	_XLogRecordPageWithFreeSpace
LBB0_7:
Lloh10:
	adrp	x8, _RBM_ZERO_ON_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RBM_ZERO_ON_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	x0, x21
	mov	w1, #0
	mov	w3, #0
	bl	_XLogReadBufferForRedoExtended
	mov	x8, x0
	ldr	x9, [x24]
	ldr	w0, [sp, #12]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:
	bl	_BufferGetPage
	mov	x21, x0
	bl	_PageIsNew
	cbz	x0, LBB0_10
; %bb.9:
Lloh13:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_PageInit
LBB0_10:
	ldr	w0, [sp, #12]
Lloh16:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_LockBuffer
	ldr	w0, [sp, #4]
	bl	_CreateFakeRelcacheEntry
	mov	x22, x0
	ldr	w1, [sp]
	add	x2, sp, #12
	bl	_visibilitymap_pin
	mov	x0, x21
	bl	_PageGetLSN
	cmp	x19, x0
	b.le	LBB0_12
; %bb.11:
	ldr	w1, [sp]
	ldr	w2, [x23]
	ldr	w4, [sp, #12]
	ldp	w6, w5, [x20]
	mov	x0, x22
	mov	x3, x19
	bl	_visibilitymap_set
LBB0_12:
	ldr	w0, [sp, #12]
	bl	_ReleaseBuffer
	mov	x0, x22
	bl	_FreeFakeRelcacheEntry
	b	LBB0_15
LBB0_13:
	bl	_BufferIsValid
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBuffer,4,2              ; @InvalidBuffer
	.comm	_InHotStandby,8,3               ; @InHotStandby
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_BLK_RESTORED,8,3               ; @BLK_RESTORED
	.comm	_VISIBILITYMAP_VALID_BITS,4,2   ; @VISIBILITYMAP_VALID_BITS
	.comm	_RBM_ZERO_ON_ERROR,4,2          ; @RBM_ZERO_ON_ERROR
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_heap_xlog_visible
.subsections_via_symbols
