	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function StartLogicalReplication
_StartLogicalReplication:               ## @StartLogicalReplication
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_CheckLogicalDecodingRequirements
	movq	_MyReplicationSlot@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	sete	%dil
	callq	_Assert
	movl	8(%rbx), %edi
	movl	$1, %esi
	callq	_ReplicationSlotAcquire
	movq	_am_cascading_walsender@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_RecoveryInProgress
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_got_STOPPING@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_3:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movq	_logical_read_xlog_page@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_WalSndPrepareWrite@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_WalSndWriteData@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_WalSndUpdateProgress@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%edx, %edx
	callq	_CreateDecodingContext
	movq	_logical_decoding_ctx@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movq	_WALSNDSTATE_CATCHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WalSndSetState
	leaq	-28(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$87, %esi
	callq	_pq_beginmessage
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pq_sendbyte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pq_sendint16
	movq	%rbx, %rdi
	callq	_pq_endmessage
	xorl	%eax, %eax
	callq	_pq_flush
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movq	_logical_startptr@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movl	4(%rax), %eax
	movq	_sentPtr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_MyWalSnd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_SpinLockAcquire
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdi
	movl	%eax, 4(%rdi)
	callq	_SpinLockRelease
	movq	_replication_active@GOTPCREL(%rip), %rbx
	movl	$1, (%rbx)
	xorl	%eax, %eax
	callq	_SyncRepInitConfig
	movq	_XLogSendLogical@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WalSndLoop
	movl	(%r14), %edi
	callq	_FreeDecodingContext
	xorl	%eax, %eax
	callq	_ReplicationSlotRelease
	movl	$0, (%rbx)
	movq	_got_STOPPING@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	callq	_proc_exit
LBB0_5:
	movq	_WALSNDSTATE_STARTUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WalSndSetState
	movq	_DestRemote@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_EndCommand
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MyReplicationSlot,8,3          ## @MyReplicationSlot
	.comm	_am_cascading_walsender,8,3     ## @am_cascading_walsender
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"terminating walsender process after promotion"

	.comm	_got_STOPPING,4,2               ## @got_STOPPING
	.comm	_logical_read_xlog_page,4,2     ## @logical_read_xlog_page
	.comm	_WalSndPrepareWrite,4,2         ## @WalSndPrepareWrite
	.comm	_WalSndWriteData,4,2            ## @WalSndWriteData
	.comm	_WalSndUpdateProgress,4,2       ## @WalSndUpdateProgress
	.comm	_logical_decoding_ctx,4,2       ## @logical_decoding_ctx
	.comm	_WALSNDSTATE_CATCHUP,4,2        ## @WALSNDSTATE_CATCHUP
	.comm	_logical_startptr,4,2           ## @logical_startptr
	.comm	_sentPtr,4,2                    ## @sentPtr
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.comm	_replication_active,4,2         ## @replication_active
	.comm	_XLogSendLogical,4,2            ## @XLogSendLogical
	.comm	_WALSNDSTATE_STARTUP,4,2        ## @WALSNDSTATE_STARTUP
L_.str.1:                               ## @.str.1
	.asciz	"COPY 0"

	.comm	_DestRemote,4,2                 ## @DestRemote
	.no_dead_strip	_StartLogicalReplication
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function StartLogicalReplication
_StartLogicalReplication:               ; @StartLogicalReplication
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	bl	_CheckLogicalDecodingRequirements
Lloh0:
	adrp	x22, _MyReplicationSlot@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MyReplicationSlot@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	ldr	w0, [x19, #8]
	mov	w23, #1
	mov	w1, #1
	bl	_ReplicationSlotAcquire
Lloh2:
	adrp	x8, _am_cascading_walsender@GOTPAGE
Lloh3:
	ldr	x8, [x8, _am_cascading_walsender@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x21, _got_STOPPING@GOTPAGE
Lloh6:
	ldr	x21, [x21, _got_STOPPING@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	bl	_RecoveryInProgress
	cbnz	w0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _LOG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
	mov	w8, #1
	str	w8, [x21]
LBB0_3:
	ldp	w1, w0, [x19]
Lloh12:
	adrp	x8, _logical_read_xlog_page@GOTPAGE
Lloh13:
	ldr	x8, [x8, _logical_read_xlog_page@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _WalSndPrepareWrite@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WalSndPrepareWrite@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
Lloh18:
	adrp	x8, _WalSndWriteData@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WalSndWriteData@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
Lloh21:
	adrp	x8, _WalSndUpdateProgress@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WalSndUpdateProgress@GOTPAGEOFF]
Lloh23:
	ldr	w6, [x8]
	mov	w2, #0
	bl	_CreateDecodingContext
Lloh24:
	adrp	x19, _logical_decoding_ctx@GOTPAGE
Lloh25:
	ldr	x19, [x19, _logical_decoding_ctx@GOTPAGEOFF]
	str	w0, [x19]
Lloh26:
	adrp	x8, _WALSNDSTATE_CATCHUP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WALSNDSTATE_CATCHUP@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_WalSndSetState
	add	x0, sp, #12
	mov	w1, #87
	bl	_pq_beginmessage
	add	x0, sp, #12
	mov	w1, #0
	bl	_pq_sendbyte
	add	x0, sp, #12
	mov	w1, #0
	bl	_pq_sendint16
	add	x0, sp, #12
	bl	_pq_endmessage
	bl	_pq_flush
	ldr	x8, [x22]
Lloh29:
	adrp	x9, _logical_startptr@GOTPAGE
Lloh30:
	ldr	x9, [x9, _logical_startptr@GOTPAGEOFF]
	ldp	w10, w8, [x8]
Lloh31:
	str	w10, [x9]
Lloh32:
	adrp	x9, _sentPtr@GOTPAGE
Lloh33:
	ldr	x9, [x9, _sentPtr@GOTPAGEOFF]
Lloh34:
	str	w8, [x9]
Lloh35:
	adrp	x20, _MyWalSnd@GOTPAGE
Lloh36:
	ldr	x20, [x20, _MyWalSnd@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_SpinLockAcquire
	ldr	x8, [x22]
	ldr	w8, [x8]
	ldr	x0, [x20]
	str	w8, [x0, #4]
	bl	_SpinLockRelease
Lloh37:
	adrp	x20, _replication_active@GOTPAGE
Lloh38:
	ldr	x20, [x20, _replication_active@GOTPAGEOFF]
	str	w23, [x20]
	bl	_SyncRepInitConfig
Lloh39:
	adrp	x8, _XLogSendLogical@GOTPAGE
Lloh40:
	ldr	x8, [x8, _XLogSendLogical@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	bl	_WalSndLoop
	ldr	w0, [x19]
	bl	_FreeDecodingContext
	bl	_ReplicationSlotRelease
	str	wzr, [x20]
	ldr	w8, [x21]
	cbz	w8, LBB0_5
; %bb.4:
	mov	w0, #0
	bl	_proc_exit
LBB0_5:
Lloh42:
	adrp	x8, _WALSNDSTATE_STARTUP@GOTPAGE
Lloh43:
	ldr	x8, [x8, _WALSNDSTATE_STARTUP@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	bl	_WalSndSetState
Lloh45:
	adrp	x8, _DestRemote@GOTPAGE
Lloh46:
	ldr	x8, [x8, _DestRemote@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x0, l_.str.1@PAGE
Lloh49:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_EndCommand
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_MyReplicationSlot,8,3          ; @MyReplicationSlot
	.comm	_am_cascading_walsender,8,3     ; @am_cascading_walsender
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"terminating walsender process after promotion"

	.comm	_got_STOPPING,4,2               ; @got_STOPPING
	.comm	_logical_read_xlog_page,4,2     ; @logical_read_xlog_page
	.comm	_WalSndPrepareWrite,4,2         ; @WalSndPrepareWrite
	.comm	_WalSndWriteData,4,2            ; @WalSndWriteData
	.comm	_WalSndUpdateProgress,4,2       ; @WalSndUpdateProgress
	.comm	_logical_decoding_ctx,4,2       ; @logical_decoding_ctx
	.comm	_WALSNDSTATE_CATCHUP,4,2        ; @WALSNDSTATE_CATCHUP
	.comm	_logical_startptr,4,2           ; @logical_startptr
	.comm	_sentPtr,4,2                    ; @sentPtr
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.comm	_replication_active,4,2         ; @replication_active
	.comm	_XLogSendLogical,4,2            ; @XLogSendLogical
	.comm	_WALSNDSTATE_STARTUP,4,2        ; @WALSNDSTATE_STARTUP
l_.str.1:                               ; @.str.1
	.asciz	"COPY 0"

	.comm	_DestRemote,4,2                 ; @DestRemote
	.no_dead_strip	_StartLogicalReplication
.subsections_via_symbols
