	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WalRcvFetchTimeLineHistoryFiles
_WalRcvFetchTimeLineHistoryFiles:       ## @WalRcvFetchTimeLineHistoryFiles
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	%esi, %edi
	jle	LBB0_1
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movl	%edi, %ebx
	incl	%r14d
	jmp	LBB0_2
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rsi
	movl	-52(%rbp), %edx
	movl	%ebx, %edi
	callq	_writeTimeLineHistoryFile
	movq	-72(%rbp), %rdi
	callq	_pfree
	movq	-64(%rbp), %rdi
	callq	_pfree
	movq	%r15, %rsp
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%ebx, %r14d
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1, %ebx
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_existsTimeLineHistory
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsp, %r15
	movq	_MAXFNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_wrconn@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	leaq	-72(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-52(%rbp), %r8
	callq	_walrcv_readtimelinehistoryfile
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_TLHistoryFileName
	movq	-72(%rbp), %rdi
	movq	%r12, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ERRCODE_PROTOCOL_VIOLATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_errmsg_internal
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_6
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXFNAMELEN,4,2                ## @MAXFNAMELEN
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fetching timeline history file for timeline %u from primary server"

	.comm	_wrconn,4,2                     ## @wrconn
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_PROTOCOL_VIOLATION,4,2 ## @ERRCODE_PROTOCOL_VIOLATION
L_.str.1:                               ## @.str.1
	.asciz	"primary reported unexpected file name for timeline history file of timeline %u"

	.no_dead_strip	_WalRcvFetchTimeLineHistoryFiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WalRcvFetchTimeLineHistoryFiles
_WalRcvFetchTimeLineHistoryFiles:       ; @WalRcvFetchTimeLineHistoryFiles
	.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, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cmp	w0, w1
	b.le	LBB0_3
LBB0_1:
	ldur	x8, [x29, #-88]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.2:
	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_3:
	mov	x19, x0
	add	w24, w1, #1
Lloh6:
	adrp	x25, _MAXFNAMELEN@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MAXFNAMELEN@GOTPAGEOFF]
Lloh8:
	adrp	x26, _LOG@GOTPAGE
Lloh9:
	ldr	x26, [x26, _LOG@GOTPAGEOFF]
Lloh10:
	adrp	x20, l_.str@PAGE
Lloh11:
	add	x20, x20, l_.str@PAGEOFF
Lloh12:
	adrp	x27, _wrconn@GOTPAGE
Lloh13:
	ldr	x27, [x27, _wrconn@GOTPAGEOFF]
Lloh14:
	adrp	x21, l_.str.1@PAGE
Lloh15:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldur	x1, [x29, #-104]
	ldur	w2, [x29, #-108]
	mov	x0, x19
	bl	_writeTimeLineHistoryFile
	ldur	x0, [x29, #-96]
	bl	_pfree
	ldur	x0, [x29, #-104]
	bl	_pfree
	mov	sp, x28
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w19, w19, #1
	cmp	w24, w19
	b.eq	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w19, #1
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_existsTimeLineHistory
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, sp
	ldr	w8, [x25]
	mov	x9, x8
Lloh16:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh17:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w23, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
	ldr	w0, [x27]
	sub	x2, x29, #96
	sub	x3, x29, #104
	sub	x4, x29, #108
	mov	x1, x19
	bl	_walrcv_readtimelinehistoryfile
	mov	x0, x22
	mov	x1, x19
	bl	_TLHistoryFileName
	ldur	x0, [x29, #-96]
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w22, [x8]
Lloh21:
	adrp	x8, _ERRCODE_PROTOCOL_VIOLATION@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_PROTOCOL_VIOLATION@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	mov	x1, x19
	bl	_errmsg_internal
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
	b	LBB0_4
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXFNAMELEN,4,2                ; @MAXFNAMELEN
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fetching timeline history file for timeline %u from primary server"

	.comm	_wrconn,4,2                     ; @wrconn
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_PROTOCOL_VIOLATION,4,2 ; @ERRCODE_PROTOCOL_VIOLATION
l_.str.1:                               ; @.str.1
	.asciz	"primary reported unexpected file name for timeline history file of timeline %u"

	.no_dead_strip	_WalRcvFetchTimeLineHistoryFiles
.subsections_via_symbols
