	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WalSndWriteData
_WalSndWriteData:                       ## @WalSndWriteData
	.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, %rbx
	movq	_tmpbuf@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_resetStringInfo
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_pq_sendint64
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	addq	$36, %rdi
	movl	(%r15), %esi
	movl	$4, %edx
	callq	_memcpy
	movq	(%rbx), %rax
	movq	8(%rax), %rsi
	movl	(%rax), %edx
	movl	$100, %edi
	callq	_pq_putmessage_noblock
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	xorl	%eax, %eax
	callq	_pq_flush_if_writable
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_WalSndShutdown
LBB0_2:
	movq	_last_reply_timestamp@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_wal_sender_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	callq	_TimestampTzPlusMilliseconds
	cmpq	%rax, %r14
	jge	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testl	%eax, %eax
	je	LBB0_12
LBB0_4:
	xorl	%eax, %eax
	callq	_ProcessRepliesIfAny
	xorl	%eax, %eax
	callq	_WalSndCheckTimeOut
	xorl	%eax, %eax
	callq	_WalSndKeepaliveIfNecessary
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	_WL_TIMEOUT@GOTPCREL(%rip), %rbx
	movq	_MyLatch@GOTPCREL(%rip), %r14
	movq	_MyProcPort@GOTPCREL(%rip), %r15
	movq	_WAIT_EVENT_WAL_SENDER_WRITE_DATA@GOTPCREL(%rip), %r12
	movq	_ConfigReloadPending@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_ProcessRepliesIfAny
	xorl	%eax, %eax
	callq	_WalSndCheckTimeOut
	xorl	%eax, %eax
	callq	_WalSndKeepaliveIfNecessary
	xorl	%eax, %eax
	callq	_pq_is_send_pending
	testl	%eax, %eax
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movq	%rax, %rdi
	callq	_WalSndComputeSleeptime
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_WL_SOCKET_WRITEABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_WL_SOCKET_READABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	orl	(%rbx), %esi
	movl	(%r14), %edi
	movq	(%r15), %rcx
	movl	(%rcx), %edx
	movl	(%r12), %r8d
	movq	%rax, %rcx
	callq	_WaitLatchOrSocket
	movl	(%r14), %edi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	cmpl	$0, (%r13)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, (%r13)
	movq	_PGC_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ProcessConfigFile
	xorl	%eax, %eax
	callq	_SyncRepInitConfig
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_pq_flush_if_writable
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_WalSndShutdown
	jmp	LBB0_10
LBB0_11:
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SetLatch                       ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tmpbuf,4,2                     ## @tmpbuf
	.comm	_last_reply_timestamp,4,2       ## @last_reply_timestamp
	.comm	_wal_sender_timeout,4,2         ## @wal_sender_timeout
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WL_SOCKET_WRITEABLE,4,2        ## @WL_SOCKET_WRITEABLE
	.comm	_WL_SOCKET_READABLE,4,2         ## @WL_SOCKET_READABLE
	.comm	_WL_TIMEOUT,4,2                 ## @WL_TIMEOUT
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_MyProcPort,8,3                 ## @MyProcPort
	.comm	_WAIT_EVENT_WAL_SENDER_WRITE_DATA,4,2 ## @WAIT_EVENT_WAL_SENDER_WRITE_DATA
	.comm	_ConfigReloadPending,4,2        ## @ConfigReloadPending
	.comm	_PGC_SIGHUP,4,2                 ## @PGC_SIGHUP
	.no_dead_strip	_WalSndWriteData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WalSndWriteData
_WalSndWriteData:                       ; @WalSndWriteData
	.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	x20, x0
Lloh0:
	adrp	x21, _tmpbuf@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tmpbuf@GOTPAGEOFF]
	mov	x0, x21
	bl	_resetStringInfo
	bl	_GetCurrentTimestamp
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	bl	_pq_sendint64
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	add	x0, x8, #36
	ldr	w1, [x21]
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x20]
	ldr	x1, [x8, #8]
	ldr	w2, [x8]
	mov	w0, #100
	bl	_pq_putmessage_noblock
	bl	_CHECK_FOR_INTERRUPTS
	bl	_pq_flush_if_writable
	cbz	x0, LBB0_2
; %bb.1:
	bl	_WalSndShutdown
LBB0_2:
Lloh2:
	adrp	x8, _last_reply_timestamp@GOTPAGE
Lloh3:
	ldr	x8, [x8, _last_reply_timestamp@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _wal_sender_timeout@GOTPAGE
Lloh6:
	ldr	x8, [x8, _wal_sender_timeout@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	bl	_TimestampTzPlusMilliseconds
	cmp	x19, x0
	b.ge	LBB0_4
; %bb.3:
	bl	_pq_is_send_pending
	cbz	w0, LBB0_12
LBB0_4:
	bl	_ProcessRepliesIfAny
	bl	_WalSndCheckTimeOut
	bl	_WalSndKeepaliveIfNecessary
	bl	_pq_is_send_pending
Lloh8:
	adrp	x19, _MyLatch@GOTPAGE
Lloh9:
	ldr	x19, [x19, _MyLatch@GOTPAGEOFF]
	cbz	w0, LBB0_11
; %bb.5:
Lloh10:
	adrp	x20, _WL_LATCH_SET@GOTPAGE
Lloh11:
	ldr	x20, [x20, _WL_LATCH_SET@GOTPAGEOFF]
Lloh12:
	adrp	x21, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh13:
	ldr	x21, [x21, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh14:
	adrp	x22, _WL_SOCKET_WRITEABLE@GOTPAGE
Lloh15:
	ldr	x22, [x22, _WL_SOCKET_WRITEABLE@GOTPAGEOFF]
Lloh16:
	adrp	x23, _WL_SOCKET_READABLE@GOTPAGE
Lloh17:
	ldr	x23, [x23, _WL_SOCKET_READABLE@GOTPAGEOFF]
Lloh18:
	adrp	x24, _WL_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x24, [x24, _WL_TIMEOUT@GOTPAGEOFF]
Lloh20:
	adrp	x25, _MyProcPort@GOTPAGE
Lloh21:
	ldr	x25, [x25, _MyProcPort@GOTPAGEOFF]
Lloh22:
	adrp	x26, _WAIT_EVENT_WAL_SENDER_WRITE_DATA@GOTPAGE
Lloh23:
	ldr	x26, [x26, _WAIT_EVENT_WAL_SENDER_WRITE_DATA@GOTPAGEOFF]
Lloh24:
	adrp	x27, _ConfigReloadPending@GOTPAGE
Lloh25:
	ldr	x27, [x27, _ConfigReloadPending@GOTPAGEOFF]
Lloh26:
	adrp	x28, _PGC_SIGHUP@GOTPAGE
Lloh27:
	ldr	x28, [x28, _PGC_SIGHUP@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_ProcessRepliesIfAny
	bl	_WalSndCheckTimeOut
	bl	_WalSndKeepaliveIfNecessary
	bl	_pq_is_send_pending
	cbz	w0, LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_GetCurrentTimestamp
	bl	_WalSndComputeSleeptime
	mov	x3, x0
	ldr	w8, [x20]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w1, w8, w9
	ldr	w0, [x19]
	ldr	x8, [x25]
	ldr	w2, [x8]
	ldr	w4, [x26]
	bl	_WaitLatchOrSocket
	ldr	w0, [x19]
	bl	_ResetLatch
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w8, [x27]
	cbz	w8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	wzr, [x27]
	ldr	w0, [x28]
	bl	_ProcessConfigFile
	bl	_SyncRepInitConfig
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_pq_flush_if_writable
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_WalSndShutdown
	b	LBB0_6
LBB0_11:
	ldr	w0, [x19]
	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
	b	_SetLatch
LBB0_12:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_tmpbuf,4,2                     ; @tmpbuf
	.comm	_last_reply_timestamp,4,2       ; @last_reply_timestamp
	.comm	_wal_sender_timeout,4,2         ; @wal_sender_timeout
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WL_SOCKET_WRITEABLE,4,2        ; @WL_SOCKET_WRITEABLE
	.comm	_WL_SOCKET_READABLE,4,2         ; @WL_SOCKET_READABLE
	.comm	_WL_TIMEOUT,4,2                 ; @WL_TIMEOUT
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_MyProcPort,8,3                 ; @MyProcPort
	.comm	_WAIT_EVENT_WAL_SENDER_WRITE_DATA,4,2 ; @WAIT_EVENT_WAL_SENDER_WRITE_DATA
	.comm	_ConfigReloadPending,4,2        ; @ConfigReloadPending
	.comm	_PGC_SIGHUP,4,2                 ; @PGC_SIGHUP
	.no_dead_strip	_WalSndWriteData
.subsections_via_symbols
