	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SyncRepGetSyncStandbysQuorum
_SyncRepGetSyncStandbysQuorum:          ## @SyncRepGetSyncStandbysQuorum
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_NIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SyncRepConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_SYNC_REP_QUORUM@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	_max_wal_senders@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movq	_max_wal_senders@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$32, %r15
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_WalSndCtl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	leaq	(%r14,%r15), %rbx
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_SpinLockAcquire
	movl	(%r14,%r15), %r12d
	movl	28(%r14,%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	8(%r14,%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_SpinLockRelease
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WALSNDSTATE_STREAMING@GOTPCREL(%rip), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rax), %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WALSNDSTATE_STOPPING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 16(%r14,%r15)
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_XLogRecPtrIsInvalid
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_lappend_int
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r15, %r14
	movq	_MyWalSnd@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_10
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.comm	_SyncRepConfig,8,3              ## @SyncRepConfig
	.comm	_SYNC_REP_QUORUM,8,3            ## @SYNC_REP_QUORUM
	.comm	_max_wal_senders,4,2            ## @max_wal_senders
	.comm	_WalSndCtl,8,3                  ## @WalSndCtl
	.comm	_WALSNDSTATE_STREAMING,8,3      ## @WALSNDSTATE_STREAMING
	.comm	_WALSNDSTATE_STOPPING,8,3       ## @WALSNDSTATE_STOPPING
	.comm	_MyWalSnd,8,3                   ## @MyWalSnd
	.no_dead_strip	_SyncRepGetSyncStandbysQuorum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SyncRepGetSyncStandbysQuorum
_SyncRepGetSyncStandbysQuorum:          ; @SyncRepGetSyncStandbysQuorum
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	x0, [sp]                        ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _NIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _SyncRepConfig@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SyncRepConfig@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _SYNC_REP_QUORUM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SYNC_REP_QUORUM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
Lloh9:
	adrp	x24, _max_wal_senders@GOTPAGE
Lloh10:
	ldr	x24, [x24, _max_wal_senders@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x25, #0
	mov	x21, #0
Lloh11:
	adrp	x26, _WalSndCtl@GOTPAGE
Lloh12:
	ldr	x26, [x26, _WalSndCtl@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	add	x25, x25, #32
	cmp	x21, x8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	x20, [x8]
	add	x19, x20, x25
	add	x23, x19, #24
	mov	x0, x23
	bl	_SpinLockAcquire
	ldr	w28, [x19]
	ldr	w22, [x19, #28]
	ldr	x27, [x19, #8]
	mov	x0, x23
	bl	_SpinLockRelease
	cbz	w28, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh13:
	adrp	x8, _WALSNDSTATE_STREAMING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WALSNDSTATE_STREAMING@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _WALSNDSTATE_STOPPING@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WALSNDSTATE_STOPPING@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x27, x8
	ccmp	x27, x9, #4, ne
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x20, x25
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_XLogRecPtrIsInvalid
	cbnz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x21
	bl	_lappend_int
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cbz	x8, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh19:
	adrp	x8, _MyWalSnd@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MyWalSnd@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x19, x8
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_2
LBB0_10:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.comm	_SyncRepConfig,8,3              ; @SyncRepConfig
	.comm	_SYNC_REP_QUORUM,8,3            ; @SYNC_REP_QUORUM
	.comm	_max_wal_senders,4,2            ; @max_wal_senders
	.comm	_WalSndCtl,8,3                  ; @WalSndCtl
	.comm	_WALSNDSTATE_STREAMING,8,3      ; @WALSNDSTATE_STREAMING
	.comm	_WALSNDSTATE_STOPPING,8,3       ; @WALSNDSTATE_STOPPING
	.comm	_MyWalSnd,8,3                   ; @MyWalSnd
	.no_dead_strip	_SyncRepGetSyncStandbysQuorum
.subsections_via_symbols
