	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReceiveXlogStream              ## -- Begin function ReceiveXlogStream
	.p2align	4, 0x90
_ReceiveXlogStream:                     ## @ReceiveXlogStream
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_CheckServerVersionForStreaming
	testl	%eax, %eax
	je	LBB0_45
## %bb.1:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movq	_reportFlushPosition@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	leaq	L_.str(%rip), %rsi
	leaq	-304(%rbp), %rdi
	callq	_sprintf
	cmpq	$0, 40(%r15)
	jne	LBB0_5
	jmp	LBB0_17
LBB0_3:
	xorl	%eax, %eax
	cmpq	$0, 48(%r15)
	setne	%al
	movq	_reportFlushPosition@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movb	$0, -304(%rbp)
	cmpq	$0, 40(%r15)
	je	LBB0_17
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.8:
	movq	%rbx, %rdi
	callq	_PQntuples
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_PQnfields
	cmpl	$2, %eax
	jg	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	callq	_PQntuples
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_PQnfields
	leaq	L_.str.3(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	movl	$3, %r8d
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_13
LBB0_6:
	movq	%r14, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	xorl	%r12d, %r12d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_13:
	movq	%rbx, %rdi
	callq	_PQclear
	jmp	LBB0_46
LBB0_11:
	movq	40(%r15), %r13
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_13
LBB0_14:
	movq	8(%r15), %r13
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_PQgetvalue
	movl	%eax, %edi
	callq	_atoi
	cmpq	%rax, %r13
	jle	LBB0_16
## %bb.15:
	movq	8(%r15), %rsi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_13
LBB0_16:
	movq	%rbx, %rdi
	callq	_PQclear
LBB0_17:
	leaq	16(%r15), %r13
	movl	16(%r15), %eax
	movq	_lastFlushPosition@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_existsTimeLineHistoryFile
	testl	%eax, %eax
	jne	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %r12
	movq	8(%r15), %rcx
	leaq	-176(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$128, %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_PQexec
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_PQnfields
	cmpl	$2, %eax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_PQntuples
	cmpl	$1, %eax
	je	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_PQntuples
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_PQnfields
	leaq	L_.str.8(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	movl	$2, %r8d
	callq	_pg_log_warning
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	movl	%eax, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_PQgetvalue
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_writeTimeLineHistoryFile
	movq	%r13, %rdi
	callq	_PQclear
	movq	%r12, %r13
LBB0_25:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	8(%r15), %esi
	movl	16(%r15), %edi
	xorl	%edx, %edx
	callq	*32(%r15)
	movl	$1, %r12d
	testq	%rax, %rax
	jne	LBB0_46
## %bb.26:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	16(%r15), %r9d
	movq	8(%r15), %rax
	movq	%rax, (%rsp)
	leaq	-176(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$128, %esi
	leaq	L_.str.9(%rip), %rdx
	leaq	-304(%rbp), %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_PQexec
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COPY_BOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rbx, %rdi
	callq	_PQclear
	movq	%r14, %rdi
	movq	%r15, %rsi
	leaq	-312(%rbp), %rdx
	callq	_HandleCopyStream
	testq	%rax, %rax
	je	LBB0_41
## %bb.29:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_37
## %bb.30:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	leaq	-308(%rbp), %rdx
	callq	_ReadEndOfStreamingResult
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_PQclear
	testl	%r12d, %r12d
	je	LBB0_41
## %bb.31:                              ##   in Loop: Header=BB0_18 Depth=1
	movslq	-308(%rbp), %r8
	movq	8(%r15), %rdx
	cmpq	%r8, %rdx
	jge	LBB0_32
## %bb.33:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	(%r13), %eax
	movl	-312(%rbp), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_34
## %bb.35:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r14, %rdi
	callq	_PQgetResult
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_40
## %bb.36:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rbx, %rdi
	callq	_PQclear
	movslq	-308(%rbp), %rax
	movq	%rax, 8(%r15)
	movl	16(%r15), %ebx
	movq	_WalSegSz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_XLogSegmentOffset
	subl	%eax, %ebx
	movl	%ebx, 16(%r15)
	jmp	LBB0_18
LBB0_27:
	movq	%rbx, %rdi
	callq	_PQresultErrorMessage
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_7
LBB0_37:
	movq	%rbx, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COMMAND_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_40
## %bb.38:
	movq	%rbx, %rdi
	callq	_PQclear
	movl	-312(%rbp), %edi
	movl	8(%r15), %esi
	xorl	%edx, %edx
	callq	*32(%r15)
	testq	%rax, %rax
	jne	LBB0_46
## %bb.39:
	leaq	L_.str.14(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_41
LBB0_40:
	movq	%rbx, %rdi
	callq	_PQresultErrorMessage
	leaq	L_.str.13(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pg_log_error
	movq	%rbx, %rdi
	callq	_PQclear
	jmp	LBB0_41
LBB0_32:
	leaq	L_.str.11(%rip), %rdi
	movl	%r8d, %esi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_41
LBB0_34:
	movl	%eax, (%rsp)
	leaq	L_.str.12(%rip), %rdi
	movq	%rdx, %rsi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_41:
	movq	_walfile@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_44
## %bb.42:
	movq	24(%r15), %rax
	movq	_CLOSE_NO_RENAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_44
## %bb.43:
	movq	_current_walfile_name@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	24(%r15), %rcx
	xorl	%eax, %eax
	callq	*8(%rcx)
	leaq	L_.str.15(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_44:
	movq	$0, (%rbx)
LBB0_45:
	xorl	%r12d, %r12d
LBB0_46:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_48
## %bb.47:
	movl	%r12d, %eax
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r13, %rdi
	callq	_PQresultErrorMessage
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.7(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
	movq	%r13, %rdi
	callq	_PQclear
	jmp	LBB0_46
LBB0_48:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_reportFlushPosition,4,2        ## @reportFlushPosition
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SLOT \"%s\" "

L_.str.1:                               ## @.str.1
	.asciz	"IDENTIFY_SYSTEM"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.2:                               ## @.str.2
	.asciz	"could not send replication command \"%s\": %s"

L_.str.3:                               ## @.str.3
	.asciz	"could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"

L_.str.4:                               ## @.str.4
	.asciz	"system identifier does not match between base backup and streaming connection"

L_.str.5:                               ## @.str.5
	.asciz	"starting timeline %u is not present in the server"

	.comm	_lastFlushPosition,4,2          ## @lastFlushPosition
L_.str.6:                               ## @.str.6
	.asciz	"TIMELINE_HISTORY %u"

L_.str.7:                               ## @.str.7
	.asciz	"TIMELINE_HISTORY"

L_.str.8:                               ## @.str.8
	.asciz	"unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"

L_.str.9:                               ## @.str.9
	.asciz	"START_REPLICATION %s%X/%X TIMELINE %u"

	.comm	_PGRES_COPY_BOTH,8,3            ## @PGRES_COPY_BOTH
L_.str.10:                              ## @.str.10
	.asciz	"START_REPLICATION"

L_.str.11:                              ## @.str.11
	.asciz	"server reported unexpected next timeline %u, following timeline %u"

L_.str.12:                              ## @.str.12
	.asciz	"server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"

	.comm	_PGRES_COMMAND_OK,8,3           ## @PGRES_COMMAND_OK
L_.str.13:                              ## @.str.13
	.asciz	"unexpected termination of replication stream: %s"

	.comm	_WalSegSz,4,2                   ## @WalSegSz
L_.str.14:                              ## @.str.14
	.asciz	"replication stream was terminated before stop point"

	.comm	_walfile,8,3                    ## @walfile
	.comm	_CLOSE_NO_RENAME,4,2            ## @CLOSE_NO_RENAME
L_.str.15:                              ## @.str.15
	.asciz	"could not close file \"%s\": %s"

	.comm	_current_walfile_name,4,2       ## @current_walfile_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReceiveXlogStream              ; -- Begin function ReceiveXlogStream
	.p2align	2
_ReceiveXlogStream:                     ; @ReceiveXlogStream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #432
	.cfi_def_cfa_offset 432
	stp	x28, x27, [sp, #336]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #352]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #368]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #384]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #400]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #416]            ; 16-byte Folded Spill
	add	x29, sp, #416
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	bl	_CheckServerVersionForStreaming
	cbz	w0, LBB0_45
; %bb.1:
	ldr	x2, [x19]
Lloh3:
	adrp	x8, _reportFlushPosition@GOTPAGE
Lloh4:
	ldr	x8, [x8, _reportFlushPosition@GOTPAGEOFF]
	cbz	x2, LBB0_3
; %bb.2:
	mov	w9, #1
	str	w9, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #64
	bl	_sprintf
	b	LBB0_4
LBB0_3:
	ldr	x9, [x19, #48]
	cmp	x9, #0
	cset	w9, ne
	str	w9, [x8]
	strb	wzr, [sp, #64]
LBB0_4:
	ldr	x8, [x19, #40]
Lloh7:
	adrp	x27, _PGRES_TUPLES_OK@GOTPAGE
Lloh8:
	ldr	x27, [x27, _PGRES_TUPLES_OK@GOTPAGEOFF]
	cbz	x8, LBB0_17
; %bb.5:
Lloh9:
	adrp	x22, l_.str.1@PAGE
Lloh10:
	add	x22, x22, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	bl	_PQexec
	mov	x21, x0
	bl	_PQresultStatus
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x21
	bl	_PQntuples
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_PQnfields
	cmp	w0, #2
	b.gt	LBB0_12
LBB0_8:
	mov	x0, x21
	bl	_PQntuples
	mov	x19, x0
	mov	x0, x21
	bl	_PQnfields
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #3
	mov	w9, #1
	stp	x9, x8, [sp, #16]
	stp	x19, x0, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_10:
	bl	_pg_log_error
	mov	x0, x21
LBB0_11:
	bl	_PQclear
	mov	w0, #0
	b	LBB0_45
LBB0_12:
	ldr	x22, [x19, #40]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetvalue
	mov	x1, x0
	mov	x0, x22
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.13:
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_14:
	ldr	x22, [x19, #8]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #1
	bl	_PQgetvalue
	bl	_atoi
	cmp	x22, x0
	b.le	LBB0_16
; %bb.15:
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_16:
	mov	x0, x21
	bl	_PQclear
LBB0_17:
	mov	x21, x19
	ldr	w8, [x21, #16]!
Lloh19:
	adrp	x9, _lastFlushPosition@GOTPAGE
Lloh20:
	ldr	x9, [x9, _lastFlushPosition@GOTPAGEOFF]
Lloh21:
	str	w8, [x9]
Lloh22:
	adrp	x24, l_.str.9@PAGE
Lloh23:
	add	x24, x24, l_.str.9@PAGEOFF
Lloh24:
	adrp	x23, _PGRES_COPY_BOTH@GOTPAGE
Lloh25:
	ldr	x23, [x23, _PGRES_COPY_BOTH@GOTPAGEOFF]
Lloh26:
	adrp	x28, _PGRES_COMMAND_OK@GOTPAGE
Lloh27:
	ldr	x28, [x28, _PGRES_COMMAND_OK@GOTPAGEOFF]
Lloh28:
	adrp	x22, _WalSegSz@GOTPAGE
Lloh29:
	ldr	x22, [x22, _WalSegSz@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_existsTimeLineHistoryFile
	cbnz	w0, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x3, [x19, #8]
	add	x0, sp, #192
	mov	w1, #128
Lloh30:
	adrp	x2, l_.str.6@PAGE
Lloh31:
	add	x2, x2, l_.str.6@PAGEOFF
	bl	_snprintf
	add	x1, sp, #192
	mov	x0, x20
	bl	_PQexec
	mov	x25, x0
	bl	_PQresultStatus
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_47
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	bl	_PQnfields
	cmp	w0, #2
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	bl	_PQntuples
	cmp	w0, #1
	b.eq	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	bl	_PQntuples
	mov	x26, x0
	mov	x0, x25
	bl	_PQnfields
	mov	x2, x0
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x26
	mov	w3, #1
	mov	w4, #2
	bl	_pg_log_warning
LBB0_23:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetvalue
	mov	x26, x0
	mov	x0, x25
	mov	w1, #0
	mov	w2, #1
	bl	_PQgetvalue
	mov	x2, x0
	mov	x0, x19
	mov	x1, x26
	bl	_writeTimeLineHistoryFile
	mov	x0, x25
	bl	_PQclear
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #32]
	ldr	w0, [x19, #16]
	ldr	w1, [x19, #8]
	mov	w2, #0
	blr	x8
	cbnz	x0, LBB0_36
; %bb.25:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x19, #16]
	stp	x9, x8, [sp, #8]
	add	x0, sp, #192
	add	x3, sp, #64
	mov	w1, #128
	mov	x2, x24
	bl	_snprintf
	add	x1, sp, #192
	mov	x0, x20
	bl	_PQexec
	mov	x25, x0
	bl	_PQresultStatus
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_33
; %bb.26:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	bl	_PQclear
	add	x2, sp, #60
	mov	x0, x20
	mov	x1, x19
	bl	_HandleCopyStream
	cbz	x0, LBB0_41
; %bb.27:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x25, x0
	bl	_PQresultStatus
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_34
; %bb.28:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x2, sp, #56
	mov	x0, x25
	mov	x1, x21
	bl	_ReadEndOfStreamingResult
	mov	x26, x0
	mov	x0, x25
	bl	_PQclear
	cbz	w26, LBB0_41
; %bb.29:                               ;   in Loop: Header=BB0_18 Depth=1
	ldrsw	x9, [sp, #56]
	ldr	x8, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_38
; %bb.30:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w11, [x21]
	ldr	w10, [sp, #60]
	cmp	w11, w10
	b.gt	LBB0_39
; %bb.31:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x20
	bl	_PQgetResult
	mov	x25, x0
	bl	_PQresultStatus
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_37
; %bb.32:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x25
	bl	_PQclear
	ldrsw	x8, [sp, #56]
	str	x8, [x19, #8]
	ldr	w25, [x19, #16]
	ldr	w1, [x22]
	mov	x0, x25
	bl	_XLogSegmentOffset
	sub	w8, w25, w0
	str	w8, [x19, #16]
	b	LBB0_18
LBB0_33:
	mov	x0, x25
	bl	_PQresultErrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
Lloh34:
	adrp	x8, l_.str.10@PAGE
Lloh35:
	add	x8, x8, l_.str.10@PAGEOFF
	b	LBB0_48
LBB0_34:
	mov	x0, x25
	bl	_PQresultStatus
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_37
; %bb.35:
	mov	x0, x25
	bl	_PQclear
	ldr	x8, [x19, #32]
	ldr	w0, [sp, #60]
	ldr	w1, [x19, #8]
	mov	w2, #0
	blr	x8
	cbz	x0, LBB0_49
LBB0_36:
	mov	w0, #1
	b	LBB0_45
LBB0_37:
	mov	x0, x25
	bl	_PQresultErrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh36:
	adrp	x0, l_.str.13@PAGE
Lloh37:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_pg_log_error
	mov	x0, x25
	bl	_PQclear
	b	LBB0_41
LBB0_38:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	stp	x9, x8, [sp]
Lloh38:
	adrp	x0, l_.str.11@PAGE
Lloh39:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_40
LBB0_39:
	str	x11, [sp, #40]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	stp	x10, x9, [sp, #16]
	str	x8, [sp]
Lloh40:
	adrp	x0, l_.str.12@PAGE
Lloh41:
	add	x0, x0, l_.str.12@PAGEOFF
LBB0_40:
	bl	_pg_log_error
LBB0_41:
Lloh42:
	adrp	x20, _walfile@GOTPAGE
Lloh43:
	ldr	x20, [x20, _walfile@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_44
; %bb.42:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
Lloh44:
	adrp	x9, _CLOSE_NO_RENAME@GOTPAGE
Lloh45:
	ldr	x9, [x9, _CLOSE_NO_RENAME@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x9]
	blr	x8
	cbz	x0, LBB0_44
; %bb.43:
Lloh47:
	adrp	x8, _current_walfile_name@GOTPAGE
Lloh48:
	ldr	x8, [x8, _current_walfile_name@GOTPAGEOFF]
	ldr	x9, [x19, #24]
	ldr	x9, [x9, #8]
Lloh49:
	ldr	w19, [x8]
	blr	x9
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh50:
	adrp	x0, l_.str.15@PAGE
Lloh51:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_pg_log_error
LBB0_44:
	mov	w0, #0
	str	xzr, [x20]
LBB0_45:
	ldur	x8, [x29, #-96]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_50
; %bb.46:
	ldp	x29, x30, [sp, #416]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #400]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #384]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #368]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #352]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #336]            ; 16-byte Folded Reload
	add	sp, sp, #432
	ret
LBB0_47:
	mov	x0, x25
	bl	_PQresultErrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
Lloh55:
	adrp	x8, l_.str.7@PAGE
Lloh56:
	add	x8, x8, l_.str.7@PAGEOFF
LBB0_48:
	stp	x8, x0, [sp]
Lloh57:
	adrp	x0, l_.str.2@PAGE
Lloh58:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_error
	mov	x0, x25
	b	LBB0_11
LBB0_49:
Lloh59:
	adrp	x0, l_.str.14@PAGE
Lloh60:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_40
LBB0_50:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.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	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_reportFlushPosition,4,2        ; @reportFlushPosition
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SLOT \"%s\" "

l_.str.1:                               ; @.str.1
	.asciz	"IDENTIFY_SYSTEM"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.2:                               ; @.str.2
	.asciz	"could not send replication command \"%s\": %s"

l_.str.3:                               ; @.str.3
	.asciz	"could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"

l_.str.4:                               ; @.str.4
	.asciz	"system identifier does not match between base backup and streaming connection"

l_.str.5:                               ; @.str.5
	.asciz	"starting timeline %u is not present in the server"

	.comm	_lastFlushPosition,4,2          ; @lastFlushPosition
l_.str.6:                               ; @.str.6
	.asciz	"TIMELINE_HISTORY %u"

l_.str.7:                               ; @.str.7
	.asciz	"TIMELINE_HISTORY"

l_.str.8:                               ; @.str.8
	.asciz	"unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"

l_.str.9:                               ; @.str.9
	.asciz	"START_REPLICATION %s%X/%X TIMELINE %u"

	.comm	_PGRES_COPY_BOTH,8,3            ; @PGRES_COPY_BOTH
l_.str.10:                              ; @.str.10
	.asciz	"START_REPLICATION"

l_.str.11:                              ; @.str.11
	.asciz	"server reported unexpected next timeline %u, following timeline %u"

l_.str.12:                              ; @.str.12
	.asciz	"server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"

	.comm	_PGRES_COMMAND_OK,8,3           ; @PGRES_COMMAND_OK
l_.str.13:                              ; @.str.13
	.asciz	"unexpected termination of replication stream: %s"

	.comm	_WalSegSz,4,2                   ; @WalSegSz
l_.str.14:                              ; @.str.14
	.asciz	"replication stream was terminated before stop point"

	.comm	_walfile,8,3                    ; @walfile
	.comm	_CLOSE_NO_RENAME,4,2            ; @CLOSE_NO_RENAME
l_.str.15:                              ; @.str.15
	.asciz	"could not close file \"%s\": %s"

	.comm	_current_walfile_name,4,2       ; @current_walfile_name
.subsections_via_symbols
