	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function StreamLog
_StreamLog:                             ## @StreamLog
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_MemSet
	movq	_conn@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_GetConnection
	movq	%rax, %rdi
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_11
LBB0_2:
	callq	_CheckServerVersionForStreaming
	testl	%eax, %eax
	je	LBB0_12
## %bb.3:
	movq	(%rbx), %rdi
	leaq	-12(%rbp), %rdx
	leaq	-16(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_RunIdentifySystem
	testl	%eax, %eax
	je	LBB0_12
## %bb.4:
	leaq	-24(%rbp), %rdi
	callq	_FindStreamingStart
	movl	%eax, -72(%rbp)
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	movl	-16(%rbp), %eax
	movl	%eax, -72(%rbp)
	movl	-12(%rbp), %ecx
	movl	%ecx, -24(%rbp)
LBB0_6:
	movq	_WalSegSz@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_XLogSegmentOffset
	movl	-72(%rbp), %edx
	subl	%eax, %edx
	movl	%edx, -72(%rbp)
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movl	-24(%rbp), %ecx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
LBB0_8:
	movq	_stop_streaming@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_PGINVALID_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_standby_message_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_synchronous@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_do_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	$0, -68(%rbp)
	movq	_basedir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_compresslevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CreateWalDirectoryMethod
	movq	%rax, -56(%rbp)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -64(%rbp)
	movq	_replication_slot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%rbx), %rdi
	leaq	-72(%rbp), %rsi
	callq	_ReceiveXlogStream
	movq	-56(%rbp), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	(%rbx), %rdi
	callq	_PQfinish
	movq	$0, (%rbx)
	xorl	%eax, %eax
	callq	_FreeWalDirectoryMethod
	movq	-56(%rbp), %rdi
	callq	_pg_free
	movq	$0, (%rbx)
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
LBB0_11:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_12:
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_conn,8,3                       ## @conn
	.comm	_InvalidXLogRecPtr,4,2          ## @InvalidXLogRecPtr
	.comm	_WalSegSz,4,2                   ## @WalSegSz
	.comm	_verbose,8,3                    ## @verbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"starting log streaming at %X/%X (timeline %u)"

	.comm	_stop_streaming,4,2             ## @stop_streaming
	.comm	_PGINVALID_SOCKET,4,2           ## @PGINVALID_SOCKET
	.comm	_standby_message_timeout,4,2    ## @standby_message_timeout
	.comm	_synchronous,4,2                ## @synchronous
	.comm	_do_sync,4,2                    ## @do_sync
	.comm	_basedir,4,2                    ## @basedir
	.comm	_compresslevel,4,2              ## @compresslevel
L_.str.1:                               ## @.str.1
	.asciz	".partial"

	.comm	_replication_slot,4,2           ## @replication_slot
L_.str.2:                               ## @.str.2
	.asciz	"could not finish writing WAL files: %m"

	.no_dead_strip	_StreamLog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function StreamLog
_StreamLog:                             ; @StreamLog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #56
	bl	_MemSet
Lloh0:
	adrp	x19, _conn@GOTPAGE
Lloh1:
	ldr	x19, [x19, _conn@GOTPAGEOFF]
	ldr	x0, [x19]
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_GetConnection
	str	x0, [x19]
	cbz	x0, LBB0_11
LBB0_2:
	bl	_CheckServerVersionForStreaming
	cbz	w0, LBB0_12
; %bb.3:
	ldr	x0, [x19]
	sub	x2, x29, #24
	sub	x3, x29, #20
	mov	x1, #0
	mov	x4, #0
	bl	_RunIdentifySystem
	cbz	w0, LBB0_12
; %bb.4:
	add	x8, sp, #32
	add	x0, x8, #48
	bl	_FindStreamingStart
	str	w0, [sp, #32]
Lloh2:
	adrp	x8, _InvalidXLogRecPtr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _InvalidXLogRecPtr@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.5:
	ldp	w8, w0, [x29, #-24]
	str	w0, [sp, #32]
	str	w8, [sp, #80]
LBB0_6:
Lloh5:
	adrp	x8, _WalSegSz@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WalSegSz@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_XLogSegmentOffset
	ldr	w8, [sp, #32]
	sub	w8, w8, w0
	str	w8, [sp, #32]
Lloh8:
	adrp	x9, _verbose@GOTPAGE
Lloh9:
	ldr	x9, [x9, _verbose@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cbz	x9, LBB0_8
; %bb.7:
	ldr	w9, [sp, #80]
	stp	x8, x9, [sp, #8]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_info
LBB0_8:
Lloh13:
	adrp	x8, _stop_streaming@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stop_streaming@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _PGINVALID_SOCKET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PGINVALID_SOCKET@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _standby_message_timeout@GOTPAGE
Lloh20:
	ldr	x10, [x10, _standby_message_timeout@GOTPAGEOFF]
	stp	w9, w8, [sp, #72]
Lloh21:
	ldr	w8, [x10]
Lloh22:
	adrp	x9, _synchronous@GOTPAGE
Lloh23:
	ldr	x9, [x9, _synchronous@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #64]
Lloh25:
	adrp	x8, _do_sync@GOTPAGE
Lloh26:
	ldr	x8, [x8, _do_sync@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	str	w2, [sp, #60]
	str	wzr, [sp, #36]
Lloh28:
	adrp	x8, _basedir@GOTPAGE
Lloh29:
	ldr	x8, [x8, _basedir@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x8, _compresslevel@GOTPAGE
Lloh32:
	ldr	x8, [x8, _compresslevel@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	bl	_CreateWalDirectoryMethod
Lloh34:
	adrp	x8, l_.str.1@PAGE
Lloh35:
	add	x8, x8, l_.str.1@PAGEOFF
	stp	x8, x0, [sp, #40]
Lloh36:
	adrp	x8, _replication_slot@GOTPAGE
Lloh37:
	ldr	x8, [x8, _replication_slot@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	ldr	x0, [x19]
	add	x1, sp, #32
	bl	_ReceiveXlogStream
	ldr	x8, [sp, #48]
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_10
; %bb.9:
	ldr	x0, [x19]
	bl	_PQfinish
	str	xzr, [x19]
	bl	_FreeWalDirectoryMethod
	ldr	x0, [sp, #48]
	bl	_pg_free
	str	xzr, [x19]
	b	LBB0_11
LBB0_10:
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_info
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_conn,8,3                       ; @conn
	.comm	_InvalidXLogRecPtr,4,2          ; @InvalidXLogRecPtr
	.comm	_WalSegSz,4,2                   ; @WalSegSz
	.comm	_verbose,8,3                    ; @verbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"starting log streaming at %X/%X (timeline %u)"

	.comm	_stop_streaming,4,2             ; @stop_streaming
	.comm	_PGINVALID_SOCKET,4,2           ; @PGINVALID_SOCKET
	.comm	_standby_message_timeout,4,2    ; @standby_message_timeout
	.comm	_synchronous,4,2                ; @synchronous
	.comm	_do_sync,4,2                    ; @do_sync
	.comm	_basedir,4,2                    ; @basedir
	.comm	_compresslevel,4,2              ; @compresslevel
l_.str.1:                               ; @.str.1
	.asciz	".partial"

	.comm	_replication_slot,4,2           ; @replication_slot
l_.str.2:                               ; @.str.2
	.asciz	"could not finish writing WAL files: %m"

	.no_dead_strip	_StreamLog
.subsections_via_symbols
