	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogReadBufferExtended         ## -- Begin function XLogReadBufferExtended
	.p2align	4, 0x90
_XLogReadBufferExtended:                ## @XLogReadBufferExtended
	.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	%rcx, %r13
	movq	%rdx, %r12
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_P_NEW@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rdx, (%rax)
	setne	%dil
	callq	_Assert
	movq	_InvalidBackendId@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_smgropen
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_smgrcreate
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_smgrnblocks
	cmpq	%r12, %rax
	jle	LBB0_1
LBB0_17:
	movl	%r15d, %edi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	callq	_ReadBufferWithoutRelcache
	movq	%rax, %rbx
LBB0_18:
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_23
## %bb.19:
	movq	%rbx, %rdi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	movq	%rbx, %rdi
	callq	_ReleaseBuffer
	movl	%r15d, %edi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	jmp	LBB0_21
LBB0_1:
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%r15d, %edi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
LBB0_21:
	callq	_log_invalid_page
	jmp	LBB0_22
LBB0_3:
	movq	_RBM_NORMAL_NO_LOG@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_4
LBB0_22:
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_23:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_InRecovery@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Assert
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_P_NEW@GOTPCREL(%rip), %rcx
	cmpq	%rax, %rbx
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_RBM_ZERO_AND_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_RBM_ZERO_AND_CLEANUP_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_LockBuffer
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_ReleaseBuffer
	movq	_P_NEW@GOTPCREL(%rip), %rcx
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rcx), %rdx
	movl	%r15d, %edi
	movl	%r14d, %esi
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	callq	_ReadBufferWithoutRelcache
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_BufferGetBlockNumber
	cmpq	%r12, %rax
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_12:
	movq	%rbx, %rdi
	callq	_BufferGetBlockNumber
	cmpq	%r12, %rax
	je	LBB0_18
## %bb.13:
	movq	_RBM_ZERO_AND_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_RBM_ZERO_AND_CLEANUP_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_16
LBB0_15:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_LockBuffer
LBB0_16:
	movq	%rbx, %rdi
	callq	_ReleaseBuffer
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_P_NEW,8,3                      ## @P_NEW
	.comm	_InvalidBackendId,4,2           ## @InvalidBackendId
	.comm	_RBM_NORMAL,8,3                 ## @RBM_NORMAL
	.comm	_InvalidBuffer,8,3              ## @InvalidBuffer
	.comm	_RBM_NORMAL_NO_LOG,8,3          ## @RBM_NORMAL_NO_LOG
	.comm	_InRecovery,4,2                 ## @InRecovery
	.comm	_RBM_ZERO_AND_LOCK,8,3          ## @RBM_ZERO_AND_LOCK
	.comm	_RBM_ZERO_AND_CLEANUP_LOCK,8,3  ## @RBM_ZERO_AND_CLEANUP_LOCK
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogReadBufferExtended         ; -- Begin function XLogReadBufferExtended
	.p2align	2
_XLogReadBufferExtended:                ; @XLogReadBufferExtended
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x25, _P_NEW@GOTPAGE
Lloh1:
	ldr	x25, [x25, _P_NEW@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, x2
	cset	w0, ne
	bl	_Assert
Lloh2:
	adrp	x8, _InvalidBackendId@GOTPAGE
Lloh3:
	ldr	x8, [x8, _InvalidBackendId@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_smgropen
	mov	x23, x0
	mov	x1, x20
	mov	w2, #1
	bl	_smgrcreate
	mov	x0, x23
	mov	x1, x20
	bl	_smgrnblocks
Lloh5:
	adrp	x24, _RBM_NORMAL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _RBM_NORMAL@GOTPAGEOFF]
	cmp	x0, x19
	b.le	LBB0_5
LBB0_1:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, #0
	bl	_ReadBufferWithoutRelcache
	mov	x23, x0
LBB0_2:
	ldr	x8, [x24]
	cmp	x8, x22
	b.ne	LBB0_10
; %bb.3:
	mov	x0, x23
	bl	_BufferGetPage
	bl	_PageIsNew
	cbz	x0, LBB0_10
; %bb.4:
	mov	x0, x23
	bl	_ReleaseBuffer
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #1
	b	LBB0_7
LBB0_5:
	ldr	x8, [x24]
	cmp	x8, x22
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
LBB0_7:
	bl	_log_invalid_page
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _RBM_NORMAL_NO_LOG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RBM_NORMAL_NO_LOG@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_11
LBB0_9:
Lloh10:
	adrp	x8, _InvalidBuffer@GOTPAGE
Lloh11:
	ldr	x8, [x8, _InvalidBuffer@GOTPAGEOFF]
Lloh12:
	ldr	x23, [x8]
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh13:
	adrp	x8, _InRecovery@GOTPAGE
Lloh14:
	ldr	x8, [x8, _InRecovery@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_Assert
Lloh16:
	adrp	x26, _InvalidBuffer@GOTPAGE
Lloh17:
	ldr	x26, [x26, _InvalidBuffer@GOTPAGEOFF]
Lloh18:
	adrp	x27, _RBM_ZERO_AND_LOCK@GOTPAGE
Lloh19:
	ldr	x27, [x27, _RBM_ZERO_AND_LOCK@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh20:
	adrp	x28, _RBM_ZERO_AND_CLEANUP_LOCK@GOTPAGE
Lloh21:
	ldr	x28, [x28, _RBM_ZERO_AND_CLEANUP_LOCK@GOTPAGEOFF]
	mov	x23, x8
	cmp	x23, x8
	b.eq	LBB0_15
LBB0_12:
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x22
	ccmp	x9, x22, #4, ne
	b.ne	LBB0_14
; %bb.13:
Lloh22:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_LockBuffer
LBB0_14:
	mov	x0, x23
	bl	_ReleaseBuffer
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x25]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
	mov	x4, #0
	bl	_ReadBufferWithoutRelcache
	mov	x23, x0
	bl	_BufferGetBlockNumber
	cmp	x0, x19
	b.ge	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x26]
	cmp	x23, x8
	b.ne	LBB0_12
	b	LBB0_15
LBB0_17:
	mov	x0, x23
	bl	_BufferGetBlockNumber
	cmp	x0, x19
	b.eq	LBB0_2
; %bb.18:
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x22
	ccmp	x9, x22, #4, ne
	b.ne	LBB0_20
; %bb.19:
Lloh25:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_LockBuffer
LBB0_20:
	mov	x0, x23
	bl	_ReleaseBuffer
	b	LBB0_1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_P_NEW,8,3                      ; @P_NEW
	.comm	_InvalidBackendId,4,2           ; @InvalidBackendId
	.comm	_RBM_NORMAL,8,3                 ; @RBM_NORMAL
	.comm	_InvalidBuffer,8,3              ; @InvalidBuffer
	.comm	_RBM_NORMAL_NO_LOG,8,3          ; @RBM_NORMAL_NO_LOG
	.comm	_InRecovery,4,2                 ; @InRecovery
	.comm	_RBM_ZERO_AND_LOCK,8,3          ; @RBM_ZERO_AND_LOCK
	.comm	_RBM_ZERO_AND_CLEANUP_LOCK,8,3  ; @RBM_ZERO_AND_CLEANUP_LOCK
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
.subsections_via_symbols
