	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WalSndDone
_WalSndDone:                            ## @WalSndDone
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%eax, %eax
	callq	*%rdi
	movq	_MyWalSnd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_XLogRecPtrIsInvalid
	movq	_WalSndCaughtUp@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.1:
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movq	(%rbx), %rax
	movq	_sentPtr@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rax,%rcx,8), %rdx
	jne	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_DestRemote@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_EndCommand
	xorl	%eax, %eax
	callq	_pq_flush
	xorl	%edi, %edi
	callq	_proc_exit
LBB0_4:
	movq	_waiting_for_ping_response@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_6
## %bb.5:
	movl	$1, %edi
	callq	_WalSndKeepalive
	movl	$1, (%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.comm	_WalSndCaughtUp,8,3             ## @WalSndCaughtUp
	.comm	_sentPtr,8,3                    ## @sentPtr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"COPY 0"

	.comm	_DestRemote,4,2                 ## @DestRemote
	.comm	_waiting_for_ping_response,4,2  ## @waiting_for_ping_response
	.no_dead_strip	_WalSndDone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WalSndDone
_WalSndDone:                            ; @WalSndDone
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	blr	x0
Lloh0:
	adrp	x19, _MyWalSnd@GOTPAGE
Lloh1:
	ldr	x19, [x19, _MyWalSnd@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_XLogRecPtrIsInvalid
Lloh2:
	adrp	x8, _WalSndCaughtUp@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WalSndCaughtUp@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	cmp	x0, #0
	cset	w8, ne
	ldr	x9, [x19]
	ldr	x8, [x9, w8, uxtw #3]
Lloh5:
	adrp	x9, _sentPtr@GOTPAGE
Lloh6:
	ldr	x9, [x9, _sentPtr@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	bl	_pq_is_send_pending
	cbnz	w0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _DestRemote@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DestRemote@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_EndCommand
	bl	_pq_flush
	mov	w0, #0
	bl	_proc_exit
LBB0_4:
Lloh13:
	adrp	x19, _waiting_for_ping_response@GOTPAGE
Lloh14:
	ldr	x19, [x19, _waiting_for_ping_response@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.5:
	mov	w20, #1
	mov	w0, #1
	bl	_WalSndKeepalive
	str	w20, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.comm	_WalSndCaughtUp,8,3             ; @WalSndCaughtUp
	.comm	_sentPtr,8,3                    ; @sentPtr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"COPY 0"

	.comm	_DestRemote,4,2                 ; @DestRemote
	.comm	_waiting_for_ping_response,4,2  ; @waiting_for_ping_response
	.no_dead_strip	_WalSndDone
.subsections_via_symbols
