	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WalSndKeepaliveIfNecessary
_WalSndKeepaliveIfNecessary:            ## @WalSndKeepaliveIfNecessary
	.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
	movq	_wal_sender_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_5
## %bb.1:
	movq	_last_reply_timestamp@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jle	LBB0_5
## %bb.2:
	movq	_waiting_for_ping_response@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.3:
	shrl	%esi
	callq	_TimestampTzPlusMilliseconds
	movq	_last_processing@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jl	LBB0_5
## %bb.4:
	movl	$1, %edi
	callq	_WalSndKeepalive
	movl	$1, (%rbx)
	xorl	%eax, %eax
	callq	_pq_flush_if_writable
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WalSndShutdown                 ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wal_sender_timeout,4,2         ## @wal_sender_timeout
	.comm	_last_reply_timestamp,8,3       ## @last_reply_timestamp
	.comm	_waiting_for_ping_response,4,2  ## @waiting_for_ping_response
	.comm	_last_processing,8,3            ## @last_processing
	.no_dead_strip	_WalSndKeepaliveIfNecessary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WalSndKeepaliveIfNecessary
_WalSndKeepaliveIfNecessary:            ; @WalSndKeepaliveIfNecessary
	.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
Lloh0:
	adrp	x8, _wal_sender_timeout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wal_sender_timeout@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _last_reply_timestamp@GOTPAGE
Lloh4:
	ldr	x9, [x9, _last_reply_timestamp@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x9]
Lloh6:
	adrp	x19, _waiting_for_ping_response@GOTPAGE
Lloh7:
	ldr	x19, [x19, _waiting_for_ping_response@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	w8, #1
	ccmp	x0, #1, #8, ge
	ccmp	w9, #0, #0, ge
	b.ne	LBB0_4
; %bb.1:
	lsr	w1, w8, #1
	bl	_TimestampTzPlusMilliseconds
Lloh8:
	adrp	x8, _last_processing@GOTPAGE
Lloh9:
	ldr	x8, [x8, _last_processing@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x0
	b.lt	LBB0_4
; %bb.2:
	mov	w20, #1
	mov	w0, #1
	bl	_WalSndKeepalive
	str	w20, [x19]
	bl	_pq_flush_if_writable
	cbz	x0, LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WalSndShutdown
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_wal_sender_timeout,4,2         ; @wal_sender_timeout
	.comm	_last_reply_timestamp,8,3       ; @last_reply_timestamp
	.comm	_waiting_for_ping_response,4,2  ; @waiting_for_ping_response
	.comm	_last_processing,8,3            ; @last_processing
	.no_dead_strip	_WalSndKeepaliveIfNecessary
.subsections_via_symbols
