	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReplicationSlotReserveWal      ## -- Begin function ReplicationSlotReserveWal
	.p2align	4, 0x90
_ReplicationSlotReserveWal:             ## @ReplicationSlotReserveWal
	.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	_MyReplicationSlot@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_Assert
	movq	(%r14), %rax
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	leaq	8(%r14), %r12
	movq	_wal_segment_size@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_GetRedoRecPtr
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_SpinLockAcquire
	movq	%rbx, (%r14)
	movq	%r12, %rdi
	callq	_SpinLockRelease
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_ReplicationSlotsComputeRequiredLSN
	movq	(%r14), %rdi
	movl	(%r13), %edx
	callq	_XLByteToSeg
	xorl	%eax, %eax
	callq	_XLogGetLastRemovedSegno
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_RecoveryInProgress
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_SlotIsLogical
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_GetXLogInsertRecPtr
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_SpinLockAcquire
	movq	%r15, (%r14)
	movq	%r12, %rdi
	callq	_SpinLockRelease
	xorl	%eax, %eax
	callq	_LogStandbySnapshot
	movq	%rax, %rdi
	callq	_XLogFlush
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MyReplicationSlot,8,3          ## @MyReplicationSlot
	.comm	_InvalidXLogRecPtr,8,3          ## @InvalidXLogRecPtr
	.comm	_wal_segment_size,4,2           ## @wal_segment_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReplicationSlotReserveWal      ; -- Begin function ReplicationSlotReserveWal
	.p2align	2
_ReplicationSlotReserveWal:             ; @ReplicationSlotReserveWal
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _MyReplicationSlot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MyReplicationSlot@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	cmp	x19, #0
	cset	w0, ne
	bl	_Assert
	mov	x20, x19
	ldr	x8, [x20], #8
Lloh3:
	adrp	x9, _InvalidXLogRecPtr@GOTPAGE
Lloh4:
	ldr	x9, [x9, _InvalidXLogRecPtr@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
Lloh6:
	adrp	x22, _wal_segment_size@GOTPAGE
Lloh7:
	ldr	x22, [x22, _wal_segment_size@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_GetRedoRecPtr
	mov	x21, x0
	mov	x0, x20
	bl	_SpinLockAcquire
	str	x21, [x19]
	mov	x0, x20
	bl	_SpinLockRelease
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_ReplicationSlotsComputeRequiredLSN
	ldr	x0, [x19]
	ldr	w2, [x22]
	bl	_XLByteToSeg
	bl	_XLogGetLastRemovedSegno
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_RecoveryInProgress
	cbnz	w0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_SlotIsLogical
	cbz	x0, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_GetXLogInsertRecPtr
	mov	x21, x0
	mov	x0, x20
	bl	_SpinLockAcquire
	str	x21, [x19]
	mov	x0, x20
	bl	_SpinLockRelease
	bl	_LogStandbySnapshot
	bl	_XLogFlush
	b	LBB0_2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MyReplicationSlot,8,3          ; @MyReplicationSlot
	.comm	_InvalidXLogRecPtr,8,3          ; @InvalidXLogRecPtr
	.comm	_wal_segment_size,4,2           ; @wal_segment_size
.subsections_via_symbols
