	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XLogRead
_XLogRead:                              ## @XLogRead
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_sendSeg@GOTPCREL(%rip), %r13
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	jle	LBB0_25
	.p2align	4, 0x90
LBB0_2:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	(%r12), %rax
	movl	24(%rax), %edi
	movq	8(%rax), %rsi
	callq	_XLogFileNameP
	movslq	%eax, %rsi
	movq	(%r12), %rax
	movq	16(%rax), %rdx
	movslq	%r13d, %rcx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r15d, %rax
	movq	(%r12), %rcx
	addq	%rax, 16(%rcx)
	addl	%r15d, %r14d
	addq	%rax, %rbx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	subq	%rax, -88(%rbp)                 ## 8-byte Folded Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, %r13
	jle	LBB0_25
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	movl	%r14d, %edi
	callq	_XLogSegmentOffset
	movq	%rax, %r12
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	js	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rsi
	movq	(%r15), %rdx
	movl	%r14d, %edi
	callq	_XLByteInSeg
	testl	%eax, %eax
	jne	LBB0_15
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%r13, %rbx
	movq	%rsp, %r13
	movq	(%rbx), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	js	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_close
	movq	(%rbx), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rsi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rdx
	movl	%r14d, %edi
	callq	_XLByteToSeg
	movq	_sendTimeLine@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	%esi, 24(%rax)
	movq	_sendTimeLineIsHistoric@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_sendTimeLineValidUpto@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rdx
	callq	_XLByteToSeg
	movq	(%rbx), %rax
	movl	24(%rax), %esi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rdx
	movq	(%r15), %rcx
	movq	%r13, %rdi
	callq	_XLogFilePath
	movq	_PG_BINARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_BasicOpenFile
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	jns	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	cmpq	-112(%rbp), %rbx                ## 8-byte Folded Reload
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_sendSeg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	24(%rax), %edi
	movq	8(%rax), %rsi
	callq	_XLogFileNameP
	movslq	%eax, %rsi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_sendSeg@GOTPCREL(%rip), %rbx
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	$0, 16(%rax)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%rbx, %r13
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	cmpq	%r12, 16(%rax)
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %esi
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	_sendSeg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	24(%rax), %edi
	movq	8(%rax), %rsi
	callq	_XLogFileNameP
	movslq	%eax, %rsi
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r13d, %edi
	movq	_sendSeg@GOTPCREL(%rip), %r13
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	movq	%r12, 16(%rax)
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rax
	movq	%r13, %r12
	movq	(%r15), %r13
	subq	%rax, %r13
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r13, %rax
	cmovlq	%rax, %r13
	movq	_WAIT_EVENT_WAL_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgstat_report_wait_start
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_read
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_pgstat_report_wait_end
	testl	%r15d, %r15d
	js	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=1
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	(%r12), %rax
	movl	24(%rax), %edi
	movq	8(%rax), %rsi
	callq	_XLogFileNameP
	movslq	%eax, %rsi
	movq	(%r12), %rax
	movq	16(%rax), %rdx
	movslq	%r13d, %r8
	leaq	L_.str.4(%rip), %rdi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_errmsg
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdx
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_XLByteToSeg
	movq	_ThisTimeLineID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CheckXLogRemoved
	movq	_am_cascading_walsender@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	_MyWalSnd@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_SpinLockAcquire
	movl	(%r12), %ebx
	movl	$0, (%r12)
	movq	%r14, %rdi
	callq	_SpinLockRelease
	testl	%ebx, %ebx
	je	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	(%r13), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	js	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_25 Depth=1
	callq	_close
	movq	(%r13), %rax
	movl	$-1, (%rax)
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	jg	LBB0_2
	jmp	LBB0_25
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_sendSeg,8,3                    ## @sendSeg
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_sendTimeLine,4,2               ## @sendTimeLine
	.comm	_sendTimeLineIsHistoric,8,3     ## @sendTimeLineIsHistoric
	.comm	_sendTimeLineValidUpto,4,2      ## @sendTimeLineValidUpto
	.comm	_sendTimeLineNextTLI,4,2        ## @sendTimeLineNextTLI
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"requested WAL segment %s has already been removed"

L_.str.1:                               ## @.str.1
	.asciz	"could not open file \"%s\": %m"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.2:                               ## @.str.2
	.asciz	"could not seek in log segment %s to offset %u: %m"

	.comm	_WAIT_EVENT_WAL_READ,4,2        ## @WAIT_EVENT_WAL_READ
L_.str.3:                               ## @.str.3
	.asciz	"could not read from log segment %s, offset %u, length %zu: %m"

	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ## @ERRCODE_DATA_CORRUPTED
L_.str.4:                               ## @.str.4
	.asciz	"could not read from log segment %s, offset %u: read %d of %zu"

	.comm	_ThisTimeLineID,4,2             ## @ThisTimeLineID
	.comm	_am_cascading_walsender,8,3     ## @am_cascading_walsender
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.no_dead_strip	_XLogRead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XLogRead
_XLogRead:                              ; @XLogRead
	.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
	sub	sp, sp, #48
	stur	x3, [x29, #-104]                ; 8-byte Folded Spill
	stur	w2, [x29, #-108]                ; 4-byte Folded Spill
	stur	x1, [x29, #-120]                ; 8-byte Folded Spill
	mov	x22, x0
Lloh0:
	adrp	x21, _sendSeg@GOTPAGE
Lloh1:
	ldr	x21, [x21, _sendSeg@GOTPAGEOFF]
Lloh2:
	adrp	x25, _MAXPGPATH@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MAXPGPATH@GOTPAGEOFF]
Lloh4:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh5:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	cmp	x8, #1
	b.lt	LBB0_25
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldur	x28, [x29, #-120]               ; 8-byte Folded Reload
	ldur	w20, [x29, #-108]               ; 4-byte Folded Reload
	ldur	x26, [x29, #-104]               ; 8-byte Folded Reload
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=2
Lloh7:
	adrp	x8, _ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
	ldr	x8, [x21]
	ldr	w0, [x8, #24]
	ldr	x1, [x8, #8]
	bl	_XLogFileNameP
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	sxtw	x9, w24
	stp	x8, x9, [sp, #-16]!
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
	add	sp, sp, #16
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w20, w23, w20
	sxtw	x8, w23
	ldr	x9, [x21]
	ldr	x10, [x9, #16]
	add	x10, x10, x8
	str	x10, [x9, #16]
	sub	x26, x26, x8
	add	x28, x28, x8
	cmp	x26, #0
	b.le	LBB0_25
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x22]
	mov	x0, x20
	bl	_XLogSegmentOffset
	mov	x23, x0
	ldr	x8, [x21]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x1, [x8, #8]
	ldr	x2, [x22]
	mov	x0, x20
	bl	_XLByteInSeg
	cbnz	w0, LBB0_18
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x27, sp
	ldr	w8, [x25]
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	ldr	x8, [x21]
	ldr	w0, [x8]
	tbnz	w0, #31, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	bl	_close
	ldr	x8, [x21]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x1, [x8, #8]
	ldr	x2, [x22]
	mov	x0, x20
	bl	_XLByteToSeg
Lloh14:
	adrp	x8, _sendTimeLine@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sendTimeLine@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x21]
	str	w1, [x8, #24]
Lloh17:
	adrp	x9, _sendTimeLineIsHistoric@GOTPAGE
Lloh18:
	ldr	x9, [x9, _sendTimeLineIsHistoric@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cbz	x9, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh20:
	adrp	x8, _sendTimeLineValidUpto@GOTPAGE
Lloh21:
	ldr	x8, [x8, _sendTimeLineValidUpto@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	x2, [x22]
	bl	_XLByteToSeg
	ldr	x8, [x21]
	ldr	w1, [x8, #24]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x2, [x8, #8]
	ldr	x3, [x22]
	mov	x0, x24
	bl	_XLogFilePath
Lloh23:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _PG_BINARY@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PG_BINARY@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x24
	bl	_BasicOpenFile
	ldr	x8, [x21]
	str	w0, [x8]
	tbz	w0, #31, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	x25, [x8]
Lloh32:
	adrp	x8, _ENOENT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh34:
	ldr	x19, [x8]
Lloh35:
	adrp	x8, _ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	stur	w8, [x29, #-92]                 ; 4-byte Folded Spill
	bl	_errcode_for_file_access
	cmp	x25, x19
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21]
	ldr	w0, [x8, #24]
	ldr	x1, [x8, #8]
	bl	_XLogFileNameP
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh38:
	adrp	x0, l_.str@PAGE
Lloh39:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=2
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=2
	bl	_errmsg
	mov	x1, x0
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	bl	_ereport
Lloh42:
	adrp	x25, _MAXPGPATH@GOTPAGE
Lloh43:
	ldr	x25, [x25, _MAXPGPATH@GOTPAGEOFF]
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	sp, x27
	ldr	x8, [x21]
	str	xzr, [x8, #16]
LBB0_18:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21]
	ldr	x9, [x8, #16]
	cmp	x9, x23
	b.eq	LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x8]
Lloh44:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
	mov	x1, x23
	bl	_lseek
	tbz	x0, #63, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh47:
	adrp	x8, _ERROR@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh49:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
	ldr	x8, [x21]
	ldr	w0, [x8, #24]
	ldr	x1, [x8, #8]
	bl	_XLogFileNameP
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	str	x23, [sp, #-16]!
Lloh50:
	adrp	x0, l_.str.2@PAGE
Lloh51:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	add	sp, sp, #16
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_21:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21]
	str	x23, [x8, #16]
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x22]
	sub	x8, x8, x23
	cmp	x26, x8
	csel	x24, x26, x8, lt
Lloh52:
	adrp	x8, _WAIT_EVENT_WAL_READ@GOTPAGE
Lloh53:
	ldr	x8, [x8, _WAIT_EVENT_WAL_READ@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	bl	_pgstat_report_wait_start
	ldr	x8, [x21]
	ldr	w0, [x8]
	mov	x1, x28
	mov	x2, x24
	bl	_read
	mov	x23, x0
	bl	_pgstat_report_wait_end
	tbnz	w23, #31, LBB0_3
; %bb.23:                               ;   in Loop: Header=BB0_6 Depth=2
	cbnz	w23, LBB0_5
; %bb.24:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh55:
	adrp	x8, _ERROR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh57:
	ldr	w19, [x8]
Lloh58:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh60:
	ldr	w0, [x8]
	bl	_errcode
	ldr	x8, [x21]
	ldr	w0, [x8, #24]
	ldr	x1, [x8, #8]
	bl	_XLogFileNameP
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	sxtw	x9, w24
	sub	sp, sp, #32
	stp	xzr, x9, [sp, #8]
	str	x8, [sp]
Lloh61:
	adrp	x0, l_.str.4@PAGE
Lloh62:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_errmsg
	add	sp, sp, #32
	b	LBB0_4
LBB0_25:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x2, [x22]
	ldur	w0, [x29, #-108]                ; 4-byte Folded Reload
	bl	_XLByteToSeg
Lloh63:
	adrp	x8, _ThisTimeLineID@GOTPAGE
Lloh64:
	ldr	x8, [x8, _ThisTimeLineID@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	bl	_CheckXLogRemoved
Lloh66:
	adrp	x8, _am_cascading_walsender@GOTPAGE
Lloh67:
	ldr	x8, [x8, _am_cascading_walsender@GOTPAGEOFF]
Lloh68:
	ldr	x8, [x8]
	cbz	x8, LBB0_29
; %bb.26:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh69:
	adrp	x8, _MyWalSnd@GOTPAGE
Lloh70:
	ldr	x8, [x8, _MyWalSnd@GOTPAGEOFF]
Lloh71:
	ldr	x20, [x8]
	add	x19, x20, #4
	mov	x0, x19
	bl	_SpinLockAcquire
	ldr	w23, [x20]
	str	wzr, [x20]
	mov	x0, x19
	bl	_SpinLockRelease
	cbz	w23, LBB0_29
; %bb.27:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8]
	tbnz	w0, #31, LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_1 Depth=1
	bl	_close
	ldr	x8, [x21]
	mov	w9, #-1
	str	w9, [x8]
	b	LBB0_1
LBB0_29:
	ldur	x8, [x29, #-88]
Lloh72:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh73:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh74:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.30:
	sub	sp, x29, #80
	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_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_sendSeg,8,3                    ; @sendSeg
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_sendTimeLine,4,2               ; @sendTimeLine
	.comm	_sendTimeLineIsHistoric,8,3     ; @sendTimeLineIsHistoric
	.comm	_sendTimeLineValidUpto,4,2      ; @sendTimeLineValidUpto
	.comm	_sendTimeLineNextTLI,4,2        ; @sendTimeLineNextTLI
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"requested WAL segment %s has already been removed"

l_.str.1:                               ; @.str.1
	.asciz	"could not open file \"%s\": %m"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.2:                               ; @.str.2
	.asciz	"could not seek in log segment %s to offset %u: %m"

	.comm	_WAIT_EVENT_WAL_READ,4,2        ; @WAIT_EVENT_WAL_READ
l_.str.3:                               ; @.str.3
	.asciz	"could not read from log segment %s, offset %u, length %zu: %m"

	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ; @ERRCODE_DATA_CORRUPTED
l_.str.4:                               ; @.str.4
	.asciz	"could not read from log segment %s, offset %u: read %d of %zu"

	.comm	_ThisTimeLineID,4,2             ; @ThisTimeLineID
	.comm	_am_cascading_walsender,8,3     ; @am_cascading_walsender
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.no_dead_strip	_XLogRead
.subsections_via_symbols
