	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LogStreamerMain
_LogStreamerMain:                       ## @LogStreamerMain
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_in_log_streamer@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_MemSet
	movl	16(%rbx), %eax
	movl	%eax, -28(%rbp)
	movl	12(%rbx), %eax
	movl	%eax, -32(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -36(%rbp)
	movq	_reached_end_position@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_bgpipe@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_standby_message_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	$0, -88(%rbp)
	movl	$1, -80(%rbp)
	movq	$0, -56(%rbp)
	movq	_replication_slot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_format@GOTPCREL(%rip), %r15
	cmpb	$112, (%r15)
	movl	4(%rbx), %edi
	jne	LBB0_2
## %bb.1:
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_CreateWalDirectoryMethod
	jmp	LBB0_3
LBB0_2:
	movq	_compresslevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_CreateWalTarMethod
LBB0_3:
	movq	%rax, -72(%rbp)
	movl	(%rbx), %edi
	leaq	-88(%rbp), %rsi
	callq	_ReceiveXlogStream
	movl	$1, %r14d
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movq	-72(%rbp), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	(%rbx), %edi
	callq	_PQfinish
	cmpb	$112, (%r15)
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_FreeWalDirectoryMethod
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_pg_log_error
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	callq	_FreeWalTarMethod
LBB0_9:
	movq	-72(%rbp), %rdi
	callq	_pg_free
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_in_log_streamer,4,2            ## @in_log_streamer
	.comm	_reached_end_position,4,2       ## @reached_end_position
	.comm	_bgpipe,8,3                     ## @bgpipe
	.comm	_standby_message_timeout,4,2    ## @standby_message_timeout
	.comm	_replication_slot,4,2           ## @replication_slot
	.comm	_format,1,0                     ## @format
	.comm	_compresslevel,4,2              ## @compresslevel
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not finish writing WAL files: %m"

	.comm	_PGINVALID_SOCKET,4,2           ## @PGINVALID_SOCKET
	.no_dead_strip	_LogStreamerMain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LogStreamerMain
_LogStreamerMain:                       ; @LogStreamerMain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _in_log_streamer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _in_log_streamer@GOTPAGEOFF]
	mov	w20, #1
Lloh2:
	str	w20, [x8]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #64
	bl	_MemSet
	ldr	w8, [x19, #16]
	str	w8, [sp, #60]
	ldr	d0, [x19, #8]
	stur	d0, [sp, #52]
Lloh3:
	adrp	x8, _reached_end_position@GOTPAGE
Lloh4:
	ldr	x8, [x8, _reached_end_position@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #48]
Lloh6:
	adrp	x8, _bgpipe@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bgpipe@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _standby_message_timeout@GOTPAGE
Lloh10:
	ldr	x9, [x9, _standby_message_timeout@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #40]
	str	xzr, [sp]
	str	xzr, [sp, #32]
Lloh12:
	adrp	x8, _replication_slot@GOTPAGE
Lloh13:
	ldr	x8, [x8, _replication_slot@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w20, [sp, #8]
	str	w8, [sp, #24]
Lloh15:
	adrp	x20, _format@GOTPAGE
Lloh16:
	ldr	x20, [x20, _format@GOTPAGEOFF]
	ldrb	w8, [x20]
	ldr	w0, [x19, #4]
	cmp	w8, #112
	b.ne	LBB0_2
; %bb.1:
	mov	w1, #0
	mov	w2, #0
	bl	_CreateWalDirectoryMethod
	b	LBB0_3
LBB0_2:
Lloh17:
	adrp	x8, _compresslevel@GOTPAGE
Lloh18:
	ldr	x8, [x8, _compresslevel@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_CreateWalTarMethod
LBB0_3:
	str	x0, [sp, #16]
	ldr	w0, [x19]
	mov	x1, sp
	bl	_ReceiveXlogStream
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x8, [sp, #16]
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x19]
	bl	_PQfinish
	ldrb	w8, [x20]
	cmp	w8, #112
	b.ne	LBB0_9
; %bb.6:
	bl	_FreeWalDirectoryMethod
	b	LBB0_10
LBB0_7:
	mov	w0, #1
	b	LBB0_11
LBB0_8:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_error
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	bl	_FreeWalTarMethod
LBB0_10:
	ldr	x0, [sp, #16]
	bl	_pg_free
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_in_log_streamer,4,2            ; @in_log_streamer
	.comm	_reached_end_position,4,2       ; @reached_end_position
	.comm	_bgpipe,8,3                     ; @bgpipe
	.comm	_standby_message_timeout,4,2    ; @standby_message_timeout
	.comm	_replication_slot,4,2           ; @replication_slot
	.comm	_format,1,0                     ; @format
	.comm	_compresslevel,4,2              ; @compresslevel
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not finish writing WAL files: %m"

	.comm	_PGINVALID_SOCKET,4,2           ; @PGINVALID_SOCKET
	.no_dead_strip	_LogStreamerMain
.subsections_via_symbols
