	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WalSndLoop
_WalSndLoop:                            ## @WalSndLoop
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movq	_last_reply_timestamp@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_waiting_for_ping_response@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ConfigReloadPending@GOTPCREL(%rip), %r13
	movq	_WalSndCaughtUp@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	orl	%r14d, %ebx
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MyProcPort@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	_WAIT_EVENT_WAL_SENDER_MAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ebx, %esi
	movq	%r12, %rcx
	callq	_WaitLatchOrSocket
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	cmpl	$0, (%r13)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r13)
	movq	_PGC_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ProcessConfigFile
	xorl	%eax, %eax
	callq	_SyncRepInitConfig
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_ProcessRepliesIfAny
	movq	_streamingDoneReceiving@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_streamingDoneSending@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testq	%rax, %rax
	je	LBB0_23
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r15)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pq_flush_if_writable
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_WalSndShutdown
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r15)
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_MyWalSnd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_WALSNDSTATE_CATCHUP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_DEBUG1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_application_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_WALSNDSTATE_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WalSndSetState
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_got_SIGUSR2@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_WalSndDone
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_WalSndCheckTimeOut
	xorl	%eax, %eax
	callq	_WalSndKeepaliveIfNecessary
	cmpl	$0, (%r15)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_streamingDoneSending@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testq	%rax, %rax
	je	LBB0_1
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WL_TIMEOUT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_WL_SOCKET_READABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	%eax, %edi
	callq	_WalSndComputeSleeptime
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_WL_SOCKET_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_22
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_last_reply_timestamp,4,2       ## @last_reply_timestamp
	.comm	_waiting_for_ping_response,4,2  ## @waiting_for_ping_response
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_ConfigReloadPending,4,2        ## @ConfigReloadPending
	.comm	_PGC_SIGHUP,4,2                 ## @PGC_SIGHUP
	.comm	_streamingDoneReceiving,8,3     ## @streamingDoneReceiving
	.comm	_streamingDoneSending,8,3       ## @streamingDoneSending
	.comm	_WalSndCaughtUp,4,2             ## @WalSndCaughtUp
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.comm	_WALSNDSTATE_CATCHUP,8,3        ## @WALSNDSTATE_CATCHUP
	.comm	_DEBUG1,4,2                     ## @DEBUG1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\"%s\" has now caught up with upstream server"

	.comm	_application_name,4,2           ## @application_name
	.comm	_WALSNDSTATE_STREAMING,4,2      ## @WALSNDSTATE_STREAMING
	.comm	_got_SIGUSR2,8,3                ## @got_SIGUSR2
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WL_TIMEOUT,4,2                 ## @WL_TIMEOUT
	.comm	_WL_SOCKET_READABLE,4,2         ## @WL_SOCKET_READABLE
	.comm	_WL_SOCKET_WRITEABLE,4,2        ## @WL_SOCKET_WRITEABLE
	.comm	_MyProcPort,8,3                 ## @MyProcPort
	.comm	_WAIT_EVENT_WAL_SENDER_MAIN,4,2 ## @WAIT_EVENT_WAL_SENDER_MAIN
	.no_dead_strip	_WalSndLoop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WalSndLoop
_WalSndLoop:                            ; @WalSndLoop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.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, x0
	bl	_GetCurrentTimestamp
Lloh0:
	adrp	x8, _last_reply_timestamp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _last_reply_timestamp@GOTPAGEOFF]
Lloh2:
	adrp	x9, _waiting_for_ping_response@GOTPAGE
Lloh3:
	ldr	x9, [x9, _waiting_for_ping_response@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
Lloh5:
	str	wzr, [x9]
Lloh6:
	adrp	x22, _MyLatch@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MyLatch@GOTPAGEOFF]
Lloh8:
	adrp	x23, _ConfigReloadPending@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ConfigReloadPending@GOTPAGEOFF]
Lloh10:
	adrp	x24, _streamingDoneReceiving@GOTPAGE
Lloh11:
	ldr	x24, [x24, _streamingDoneReceiving@GOTPAGEOFF]
Lloh12:
	adrp	x25, _streamingDoneSending@GOTPAGE
Lloh13:
	ldr	x25, [x25, _streamingDoneSending@GOTPAGEOFF]
Lloh14:
	adrp	x26, _WalSndCaughtUp@GOTPAGE
Lloh15:
	ldr	x26, [x26, _WalSndCaughtUp@GOTPAGEOFF]
Lloh16:
	adrp	x20, _MyProcPort@GOTPAGE
Lloh17:
	ldr	x20, [x20, _MyProcPort@GOTPAGEOFF]
Lloh18:
	adrp	x27, _WAIT_EVENT_WAL_SENDER_MAIN@GOTPAGE
Lloh19:
	ldr	x27, [x27, _WAIT_EVENT_WAL_SENDER_MAIN@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_pq_is_send_pending
	cbz	x0, LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh20:
	adrp	x8, _WL_LATCH_SET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WL_LATCH_SET@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh24:
	ldr	x9, [x9, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _WL_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _WL_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh29:
	adrp	x9, _WL_SOCKET_READABLE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _WL_SOCKET_READABLE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w28, w8, w9
	bl	_GetCurrentTimestamp
	bl	_WalSndComputeSleeptime
	mov	x21, x0
	bl	_pq_is_send_pending
Lloh32:
	adrp	x8, _WL_SOCKET_WRITEABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WL_SOCKET_WRITEABLE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w1, w28, w8
	ldr	w0, [x22]
	ldr	x8, [x20]
	ldr	w2, [x8]
	ldr	w4, [x27]
	mov	x3, x21
	bl	_WaitLatchOrSocket
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_ResetLatch
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w8, [x23]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x23]
Lloh35:
	adrp	x8, _PGC_SIGHUP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PGC_SIGHUP@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_ProcessConfigFile
	bl	_SyncRepInitConfig
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_ProcessRepliesIfAny
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_pq_is_send_pending
	cbz	x0, LBB0_19
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_pq_is_send_pending
	cbz	x0, LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x26]
	bl	_pq_flush_if_writable
	cbz	x0, LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_WalSndShutdown
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	cbz	w8, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	bl	_pq_is_send_pending
	cbnz	x0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh38:
	adrp	x8, _MyWalSnd@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MyWalSnd@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh41:
	adrp	x9, _WALSNDSTATE_CATCHUP@GOTPAGE
Lloh42:
	ldr	x9, [x9, _WALSNDSTATE_CATCHUP@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh44:
	adrp	x8, _DEBUG1@GOTPAGE
Lloh45:
	ldr	x8, [x8, _DEBUG1@GOTPAGEOFF]
Lloh46:
	ldr	w21, [x8]
Lloh47:
	adrp	x8, _application_name@GOTPAGE
Lloh48:
	ldr	x8, [x8, _application_name@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
Lloh50:
	adrp	x0, l_.str@PAGE
Lloh51:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
Lloh52:
	adrp	x8, _WALSNDSTATE_STREAMING@GOTPAGE
Lloh53:
	ldr	x8, [x8, _WALSNDSTATE_STREAMING@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	bl	_WalSndSetState
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh55:
	adrp	x8, _got_SIGUSR2@GOTPAGE
Lloh56:
	ldr	x8, [x8, _got_SIGUSR2@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_WalSndDone
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_WalSndCheckTimeOut
	bl	_WalSndKeepaliveIfNecessary
	ldr	w8, [x26]
	cbz	w8, LBB0_1
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_2
	b	LBB0_1
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	blr	x19
	bl	_pq_flush_if_writable
	cbnz	x0, LBB0_9
	b	LBB0_10
LBB0_19:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_last_reply_timestamp,4,2       ; @last_reply_timestamp
	.comm	_waiting_for_ping_response,4,2  ; @waiting_for_ping_response
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_ConfigReloadPending,4,2        ; @ConfigReloadPending
	.comm	_PGC_SIGHUP,4,2                 ; @PGC_SIGHUP
	.comm	_streamingDoneReceiving,8,3     ; @streamingDoneReceiving
	.comm	_streamingDoneSending,8,3       ; @streamingDoneSending
	.comm	_WalSndCaughtUp,4,2             ; @WalSndCaughtUp
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.comm	_WALSNDSTATE_CATCHUP,8,3        ; @WALSNDSTATE_CATCHUP
	.comm	_DEBUG1,4,2                     ; @DEBUG1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\"%s\" has now caught up with upstream server"

	.comm	_application_name,4,2           ; @application_name
	.comm	_WALSNDSTATE_STREAMING,4,2      ; @WALSNDSTATE_STREAMING
	.comm	_got_SIGUSR2,8,3                ; @got_SIGUSR2
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WL_TIMEOUT,4,2                 ; @WL_TIMEOUT
	.comm	_WL_SOCKET_READABLE,4,2         ; @WL_SOCKET_READABLE
	.comm	_WL_SOCKET_WRITEABLE,4,2        ; @WL_SOCKET_WRITEABLE
	.comm	_MyProcPort,8,3                 ; @MyProcPort
	.comm	_WAIT_EVENT_WAL_SENDER_MAIN,4,2 ; @WAIT_EVENT_WAL_SENDER_MAIN
	.no_dead_strip	_WalSndLoop
.subsections_via_symbols
