	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SyncRepReleaseWaiters          ## -- Begin function SyncRepReleaseWaiters
	.p2align	4, 0x90
_SyncRepReleaseWaiters:                 ## @SyncRepReleaseWaiters
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MyWalSnd@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_WalSndCtl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	8(%rax), %rcx
	movq	_WALSNDSTATE_STREAMING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movq	_WALSNDSTATE_STOPPING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
LBB0_3:
	movl	16(%rax), %edi
	callq	_XLogRecPtrIsInvalid
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_announce_next_takeover@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_SyncRepLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	leaq	-56(%rbp), %rdi
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_SyncRepGetSyncRecPtr
	movl	%eax, %r15d
	movq	_announce_next_takeover@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_11
## %bb.6:
	cmpl	$0, -44(%rbp)
	je	LBB0_11
## %bb.7:
	movl	$0, (%r12)
	movq	_SyncRepConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_SYNC_REP_PRIORITY@GOTPCREL(%rip), %rcx
	movq	_LOG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	movq	_application_name@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	(%r13), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
LBB0_10:
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:
	cmpl	$0, -44(%rbp)
	je	LBB0_13
## %bb.14:
	movq	(%rbx), %rcx
	movq	_SYNC_REP_WAIT_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-56(%rbp), %eax
	xorl	%r14d, %r14d
	movl	$0, %r15d
	cmpl	%eax, (%rcx,%rsi,4)
	jge	LBB0_16
## %bb.15:
	movq	(%rbx), %rcx
	movl	%eax, (%rcx,%rsi,4)
	xorl	%edi, %edi
	callq	_SyncRepWakeQueue
	movl	%eax, %r15d
LBB0_16:
	movq	(%rbx), %rcx
	movq	_SYNC_REP_WAIT_FLUSH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-52(%rbp), %eax
	cmpl	%eax, (%rcx,%rsi,4)
	jge	LBB0_18
## %bb.17:
	movq	(%rbx), %rcx
	movl	%eax, (%rcx,%rsi,4)
	xorl	%edi, %edi
	callq	_SyncRepWakeQueue
	movl	%eax, %r14d
LBB0_18:
	movq	(%rbx), %rcx
	movq	_SYNC_REP_WAIT_APPLY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-48(%rbp), %eax
	xorl	%r12d, %r12d
	cmpl	%eax, (%rcx,%rsi,4)
	jge	LBB0_20
## %bb.19:
	movq	(%rbx), %rcx
	movl	%eax, (%rcx,%rsi,4)
	xorl	%edi, %edi
	callq	_SyncRepWakeQueue
	movl	%eax, %r12d
LBB0_20:
	movq	_SyncRepLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	movq	_DEBUG3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %eax
	movl	-48(%rbp), %ecx
	movl	%ecx, 32(%rsp)
	movl	%r12d, 16(%rsp)
	movl	%eax, 8(%rsp)
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %r9d
	callq	_elog
	jmp	LBB0_21
LBB0_13:
	movq	_SyncRepLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)
	sete	%al
	movl	%eax, (%r12)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_WalSndCtl,8,3                  ## @WalSndCtl
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.comm	_WALSNDSTATE_STREAMING,8,3      ## @WALSNDSTATE_STREAMING
	.comm	_WALSNDSTATE_STOPPING,8,3       ## @WALSNDSTATE_STOPPING
	.comm	_announce_next_takeover,4,2     ## @announce_next_takeover
	.comm	_SyncRepLock,4,2                ## @SyncRepLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_SyncRepConfig,8,3              ## @SyncRepConfig
	.comm	_SYNC_REP_PRIORITY,8,3          ## @SYNC_REP_PRIORITY
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"standby \"%s\" is now a synchronous standby with priority %u"

	.comm	_application_name,4,2           ## @application_name
L_.str.1:                               ## @.str.1
	.asciz	"standby \"%s\" is now a candidate for quorum synchronous standby"

	.comm	_SYNC_REP_WAIT_WRITE,8,3        ## @SYNC_REP_WAIT_WRITE
	.comm	_SYNC_REP_WAIT_FLUSH,8,3        ## @SYNC_REP_WAIT_FLUSH
	.comm	_SYNC_REP_WAIT_APPLY,8,3        ## @SYNC_REP_WAIT_APPLY
	.comm	_DEBUG3,4,2                     ## @DEBUG3
L_.str.2:                               ## @.str.2
	.asciz	"released %d procs up to write %X/%X, %d procs up to flush %X/%X, %d procs up to apply %X/%X"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SyncRepReleaseWaiters          ; -- Begin function SyncRepReleaseWaiters
	.p2align	2
_SyncRepReleaseWaiters:                 ; @SyncRepReleaseWaiters
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x23, _MyWalSnd@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MyWalSnd@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x8]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	x9, [x8, #8]
Lloh2:
	adrp	x10, _WALSNDSTATE_STREAMING@GOTPAGE
Lloh3:
	ldr	x10, [x10, _WALSNDSTATE_STREAMING@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _WALSNDSTATE_STOPPING@GOTPAGE
Lloh6:
	ldr	x11, [x11, _WALSNDSTATE_STOPPING@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x9, _WalSndCtl@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WalSndCtl@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x9]
	ldr	w0, [x8, #16]
	bl	_XLogRecPtrIsInvalid
	cbz	x0, LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _announce_next_takeover@GOTPAGE
Lloh12:
	ldr	x8, [x8, _announce_next_takeover@GOTPAGEOFF]
	mov	w9, #1
Lloh13:
	str	w9, [x8]
LBB0_4:
	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
	add	sp, sp, #96
	ret
LBB0_5:
Lloh14:
	adrp	x22, _SyncRepLock@GOTPAGE
Lloh15:
	ldr	x22, [x22, _SyncRepLock@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh16:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	add	x0, sp, #28
	add	x1, sp, #24
	add	x2, sp, #20
	add	x3, sp, #16
	bl	_SyncRepGetSyncRecPtr
	mov	x19, x0
Lloh19:
	adrp	x24, _announce_next_takeover@GOTPAGE
Lloh20:
	ldr	x24, [x24, _announce_next_takeover@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	w9, [sp, #16]
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	b.eq	LBB0_10
; %bb.6:
	str	wzr, [x24]
Lloh21:
	adrp	x8, _SyncRepConfig@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SyncRepConfig@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh24:
	adrp	x9, _SYNC_REP_PRIORITY@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SYNC_REP_PRIORITY@GOTPAGEOFF]
Lloh26:
	adrp	x10, _LOG@GOTPAGE
Lloh27:
	ldr	x10, [x10, _LOG@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
Lloh29:
	ldr	w20, [x10]
Lloh30:
	adrp	x10, _application_name@GOTPAGE
Lloh31:
	ldr	x10, [x10, _application_name@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x10]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x23]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh33:
	adrp	x0, l_.str@PAGE
Lloh34:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh35:
	adrp	x0, l_.str.1@PAGE
Lloh36:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_10:
	cbz	w19, LBB0_14
; %bb.11:
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_14
; %bb.12:
Lloh37:
	adrp	x8, _SYNC_REP_WAIT_WRITE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SYNC_REP_WAIT_WRITE@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh39:
	ldr	x1, [x8]
	ldr	w9, [x9, x1, lsl #2]
	ldr	w8, [sp, #28]
	cmp	w9, w8
	b.ge	LBB0_15
; %bb.13:
	ldr	x9, [x21]
	str	w8, [x9, x1, lsl #2]
	mov	w0, #0
	bl	_SyncRepWakeQueue
	mov	x19, x0
	b	LBB0_16
LBB0_14:
	ldr	w0, [x22]
	bl	_LWLockRelease
	ldr	w8, [sp, #16]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x24]
	b	LBB0_4
LBB0_15:
	mov	w19, #0
LBB0_16:
Lloh40:
	adrp	x8, _SYNC_REP_WAIT_FLUSH@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SYNC_REP_WAIT_FLUSH@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh42:
	ldr	x1, [x8]
	ldr	w9, [x9, x1, lsl #2]
	ldr	w8, [sp, #24]
	cmp	w9, w8
	b.ge	LBB0_18
; %bb.17:
	ldr	x9, [x21]
	str	w8, [x9, x1, lsl #2]
	mov	w0, #0
	bl	_SyncRepWakeQueue
	mov	x20, x0
	b	LBB0_19
LBB0_18:
	mov	w20, #0
LBB0_19:
Lloh43:
	adrp	x8, _SYNC_REP_WAIT_APPLY@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SYNC_REP_WAIT_APPLY@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh45:
	ldr	x1, [x8]
	ldr	w9, [x9, x1, lsl #2]
	ldr	w8, [sp, #20]
	cmp	w9, w8
	b.ge	LBB0_21
; %bb.20:
	ldr	x9, [x21]
	str	w8, [x9, x1, lsl #2]
	mov	w0, #0
	bl	_SyncRepWakeQueue
	mov	x21, x0
	b	LBB0_22
LBB0_21:
	mov	w21, #0
LBB0_22:
	ldr	w0, [x22]
	bl	_LWLockRelease
Lloh46:
	adrp	x8, _DEBUG3@GOTPAGE
Lloh47:
	ldr	x8, [x8, _DEBUG3@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ldp	w7, w4, [sp, #24]
	ldr	w8, [sp, #20]
	str	w8, [sp, #8]
	str	w21, [sp]
Lloh49:
	adrp	x1, l_.str.2@PAGE
Lloh50:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	x5, x20
	bl	_elog
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_WalSndCtl,8,3                  ; @WalSndCtl
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.comm	_WALSNDSTATE_STREAMING,8,3      ; @WALSNDSTATE_STREAMING
	.comm	_WALSNDSTATE_STOPPING,8,3       ; @WALSNDSTATE_STOPPING
	.comm	_announce_next_takeover,4,2     ; @announce_next_takeover
	.comm	_SyncRepLock,4,2                ; @SyncRepLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_SyncRepConfig,8,3              ; @SyncRepConfig
	.comm	_SYNC_REP_PRIORITY,8,3          ; @SYNC_REP_PRIORITY
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"standby \"%s\" is now a synchronous standby with priority %u"

	.comm	_application_name,4,2           ; @application_name
l_.str.1:                               ; @.str.1
	.asciz	"standby \"%s\" is now a candidate for quorum synchronous standby"

	.comm	_SYNC_REP_WAIT_WRITE,8,3        ; @SYNC_REP_WAIT_WRITE
	.comm	_SYNC_REP_WAIT_FLUSH,8,3        ; @SYNC_REP_WAIT_FLUSH
	.comm	_SYNC_REP_WAIT_APPLY,8,3        ; @SYNC_REP_WAIT_APPLY
	.comm	_DEBUG3,4,2                     ; @DEBUG3
l_.str.2:                               ; @.str.2
	.asciz	"released %d procs up to write %X/%X, %d procs up to flush %X/%X, %d procs up to apply %X/%X"

.subsections_via_symbols
