	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetReplicationApplyDelay       ## -- Begin function GetReplicationApplyDelay
	.p2align	4, 0x90
_GetReplicationApplyDelay:              ## @GetReplicationApplyDelay
	.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	_WalRcv@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_SpinLockAcquire
	movq	(%rbx), %r15
	movq	%r14, %rdi
	callq	_SpinLockRelease
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_GetXLogReplayRecPtr
	cmpq	%rax, %r15
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_GetCurrentChunkReplayStartTime
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	leaq	-40(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TimestampDifference
	imull	$1000, -40(%rbp), %eax          ## imm = 0x3E8
	movslq	-28(%rbp), %rcx
	imulq	$274877907, %rcx, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rcx
	shrq	$63, %rcx
	sarq	$38, %rbx
	addl	%ecx, %ebx
	addl	%eax, %ebx
	jmp	LBB0_4
LBB0_2:
	movl	$-1, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WalRcv,8,3                     ## @WalRcv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetReplicationApplyDelay       ; -- Begin function GetReplicationApplyDelay
	.p2align	2
_GetReplicationApplyDelay:              ; @GetReplicationApplyDelay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _WalRcv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WalRcv@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	add	x19, x20, #8
	mov	x0, x19
	bl	_SpinLockAcquire
	ldr	x20, [x20]
	mov	x0, x19
	bl	_SpinLockRelease
	mov	x0, #0
	bl	_GetXLogReplayRecPtr
	cmp	x20, x0
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	bl	_GetCurrentChunkReplayStartTime
	cbz	x0, LBB0_4
; %bb.3:
	mov	x19, x0
	bl	_GetCurrentTimestamp
	mov	x1, x0
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	bl	_TimestampDifference
	ldp	w10, w8, [sp, #4]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	mov	w9, #1000
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	mul	x10, x10, x11
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	madd	w0, w8, w9, w10
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WalRcv,8,3                     ; @WalRcv
.subsections_via_symbols
