	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SyncRepGetSyncRecPtr
_SyncRepGetSyncRecPtr:                  ## @SyncRepGetSyncRecPtr
	.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	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_SyncRepLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockHeldByMe
	movl	%eax, %edi
	callq	_Assert
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	(%rax), %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rbx)
	movl	$0, (%r14)
	movq	%r14, %rdi
	callq	_SyncRepGetSyncStandbys
	movq	%rax, %r13
	xorl	%ebx, %ebx
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.1:
	movq	_SyncRepConfig@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.2:
	movq	%r13, %rdi
	callq	_list_length
	movq	(%r14), %rcx
	movq	(%rcx), %r8
	cmpq	%r8, %rax
	jl	LBB0_7
## %bb.3:
	movq	8(%rcx), %rax
	movq	_SYNC_REP_PRIORITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_SyncRepGetOldestSyncRecPtr
	jmp	LBB0_6
LBB0_5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_SyncRepGetNthLatestSyncRecPtr
LBB0_6:
	movl	$1, %ebx
LBB0_7:
	movq	%r13, %rdi
	callq	_list_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SyncRepLock,4,2                ## @SyncRepLock
	.comm	_InvalidXLogRecPtr,4,2          ## @InvalidXLogRecPtr
	.comm	_SyncRepConfig,8,3              ## @SyncRepConfig
	.comm	_SYNC_REP_PRIORITY,8,3          ## @SYNC_REP_PRIORITY
	.no_dead_strip	_SyncRepGetSyncRecPtr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SyncRepGetSyncRecPtr
_SyncRepGetSyncRecPtr:                  ; @SyncRepGetSyncRecPtr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x24, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _SyncRepLock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SyncRepLock@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_LWLockHeldByMe
	bl	_Assert
Lloh3:
	adrp	x8, _InvalidXLogRecPtr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _InvalidXLogRecPtr@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x22]
	ldr	w9, [x8]
	str	w9, [x21]
	ldr	w8, [x8]
	str	w8, [x19]
	str	wzr, [x24]
	mov	x0, x24
	bl	_SyncRepGetSyncStandbys
	mov	x20, x0
	mov	w23, #0
	ldr	w8, [x24]
	cbz	w8, LBB0_8
; %bb.1:
Lloh5:
	adrp	x24, _SyncRepConfig@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SyncRepConfig@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x0, x20
	bl	_list_length
	ldr	x8, [x24]
	ldr	x4, [x8]
	cmp	x0, x4
	b.ge	LBB0_4
; %bb.3:
	mov	w23, #0
	b	LBB0_8
LBB0_4:
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _SYNC_REP_PRIORITY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SYNC_REP_PRIORITY@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	bl	_SyncRepGetOldestSyncRecPtr
	b	LBB0_7
LBB0_6:
	bl	_SyncRepGetNthLatestSyncRecPtr
LBB0_7:
	mov	w23, #1
LBB0_8:
	mov	x0, x20
	bl	_list_free
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SyncRepLock,4,2                ; @SyncRepLock
	.comm	_InvalidXLogRecPtr,4,2          ; @InvalidXLogRecPtr
	.comm	_SyncRepConfig,8,3              ; @SyncRepConfig
	.comm	_SYNC_REP_PRIORITY,8,3          ; @SYNC_REP_PRIORITY
	.no_dead_strip	_SyncRepGetSyncRecPtr
.subsections_via_symbols
