	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WalSndErrorCleanup             ## -- Begin function WalSndErrorCleanup
	.p2align	4, 0x90
_WalSndErrorCleanup:                    ## @WalSndErrorCleanup
	.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	_LWLockReleaseAll
	xorl	%eax, %eax
	callq	_ConditionVariableCancelSleep
	xorl	%eax, %eax
	callq	_pgstat_report_wait_end
	movq	_sendSeg@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	callq	_close
	movq	(%rbx), %rax
	movl	$-1, (%rax)
LBB0_2:
	movq	_MyReplicationSlot@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_ReplicationSlotRelease
LBB0_4:
	xorl	%eax, %eax
	callq	_ReplicationSlotCleanup
	movq	_replication_active@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_got_STOPPING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_got_SIGUSR2@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	callq	_proc_exit
LBB0_6:
	movq	_WALSNDSTATE_STARTUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WalSndSetState                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sendSeg,8,3                    ## @sendSeg
	.comm	_MyReplicationSlot,8,3          ## @MyReplicationSlot
	.comm	_replication_active,4,2         ## @replication_active
	.comm	_got_STOPPING,8,3               ## @got_STOPPING
	.comm	_got_SIGUSR2,8,3                ## @got_SIGUSR2
	.comm	_WALSNDSTATE_STARTUP,4,2        ## @WALSNDSTATE_STARTUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WalSndErrorCleanup             ; -- Begin function WalSndErrorCleanup
	.p2align	2
_WalSndErrorCleanup:                    ; @WalSndErrorCleanup
	.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
	bl	_LWLockReleaseAll
	bl	_ConditionVariableCancelSleep
	bl	_pgstat_report_wait_end
Lloh0:
	adrp	x19, _sendSeg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sendSeg@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	bl	_close
	ldr	x8, [x19]
	mov	w9, #-1
	str	w9, [x8]
LBB0_2:
Lloh2:
	adrp	x8, _MyReplicationSlot@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MyReplicationSlot@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	bl	_ReplicationSlotRelease
LBB0_4:
	bl	_ReplicationSlotCleanup
Lloh5:
	adrp	x8, _replication_active@GOTPAGE
Lloh6:
	ldr	x8, [x8, _replication_active@GOTPAGEOFF]
Lloh7:
	adrp	x9, _got_STOPPING@GOTPAGE
Lloh8:
	ldr	x9, [x9, _got_STOPPING@GOTPAGEOFF]
Lloh9:
	str	wzr, [x8]
Lloh10:
	ldr	x8, [x9]
Lloh11:
	adrp	x9, _got_SIGUSR2@GOTPAGE
Lloh12:
	ldr	x9, [x9, _got_SIGUSR2@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_6
; %bb.5:
	mov	w0, #0
	bl	_proc_exit
LBB0_6:
Lloh14:
	adrp	x8, _WALSNDSTATE_STARTUP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WALSNDSTATE_STARTUP@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WalSndSetState
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_sendSeg,8,3                    ; @sendSeg
	.comm	_MyReplicationSlot,8,3          ; @MyReplicationSlot
	.comm	_replication_active,4,2         ; @replication_active
	.comm	_got_STOPPING,8,3               ; @got_STOPPING
	.comm	_got_SIGUSR2,8,3                ; @got_SIGUSR2
	.comm	_WALSNDSTATE_STARTUP,4,2        ; @WALSNDSTATE_STARTUP
.subsections_via_symbols
