	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function recoveryApplyDelay
_recoveryApplyDelay:                    ## @recoveryApplyDelay
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_recovery_min_apply_delay@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	cmpq	$0, (%r14)
	jle	LBB0_14
## %bb.1:
	movq	_reachedConsistency@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.2:
	movq	_ArchiveRecoveryRequested@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.3:
	movq	%rdi, %rbx
	callq	_XLogRecGetRmid
	movq	_RM_XACT_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	movq	%rbx, %rdi
	callq	_XLogRecGetInfo
	movq	_XLOG_XACT_OPMASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_XLOG_XACT_COMMIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	_XLOG_XACT_COMMIT_PREPARED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
LBB0_6:
	leaq	-60(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_getRecordTimestamp
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	-60(%rbp), %edi
	movq	(%r14), %rsi
	callq	_TimestampTzPlusMilliseconds
	movq	_recoveryDelayUntilTime@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	(%rbx), %esi
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%eax, %edi
	callq	_TimestampDifference
	cmpq	$0, -56(%rbp)
	jg	LBB0_9
## %bb.8:
	cmpl	$0, -44(%rbp)
	jle	LBB0_14
LBB0_9:
	movq	_XLogCtl@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_HandleStartupProcInterrupts
	xorl	%eax, %eax
	callq	_CheckForStandbyTrigger
	movl	$1, %r13d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %r14
	movq	_WAIT_EVENT_RECOVERY_APPLY_DELAY@GOTPCREL(%rip), %r15
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_DEBUG2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cltq
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_elog
	movq	(%r12), %rdi
	movq	_WL_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r14), %esi
	imulq	$1000, -56(%rbp), %rax          ## imm = 0x3E8
	movslq	-44(%rbp), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rdx
	addq	%rax, %rdx
	movl	(%r15), %ecx
	callq	_WaitLatch
	movq	(%r12), %rdi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_HandleStartupProcInterrupts
	xorl	%eax, %eax
	callq	_CheckForStandbyTrigger
	testq	%rax, %rax
	jne	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	(%rbx), %esi
	movl	%eax, %edi
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_TimestampDifference
	movq	-56(%rbp), %rdx
	movl	-44(%rbp), %eax
	testq	%rdx, %rdx
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$1000, %eax                     ## imm = 0x3E8
	jge	LBB0_13
LBB0_14:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_recovery_min_apply_delay,8,3   ## @recovery_min_apply_delay
	.comm	_reachedConsistency,4,2         ## @reachedConsistency
	.comm	_ArchiveRecoveryRequested,4,2   ## @ArchiveRecoveryRequested
	.comm	_RM_XACT_ID,8,3                 ## @RM_XACT_ID
	.comm	_XLOG_XACT_OPMASK,4,2           ## @XLOG_XACT_OPMASK
	.comm	_XLOG_XACT_COMMIT,4,2           ## @XLOG_XACT_COMMIT
	.comm	_XLOG_XACT_COMMIT_PREPARED,4,2  ## @XLOG_XACT_COMMIT_PREPARED
	.comm	_recoveryDelayUntilTime,4,2     ## @recoveryDelayUntilTime
	.comm	_XLogCtl,8,3                    ## @XLogCtl
	.comm	_DEBUG2,4,2                     ## @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"recovery apply delay %ld seconds, %d milliseconds"

	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_TIMEOUT,4,2                 ## @WL_TIMEOUT
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_RECOVERY_APPLY_DELAY,4,2 ## @WAIT_EVENT_RECOVERY_APPLY_DELAY
	.no_dead_strip	_recoveryApplyDelay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function recoveryApplyDelay
_recoveryApplyDelay:                    ; @recoveryApplyDelay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x20, _recovery_min_apply_delay@GOTPAGE
Lloh1:
	ldr	x20, [x20, _recovery_min_apply_delay@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _reachedConsistency@GOTPAGE
Lloh3:
	ldr	x9, [x9, _reachedConsistency@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _ArchiveRecoveryRequested@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ArchiveRecoveryRequested@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	x8, #1
	ccmp	w9, #0, #4, ge
	ccmp	w10, #0, #4, ne
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x0
	bl	_XLogRecGetRmid
Lloh8:
	adrp	x8, _RM_XACT_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RM_XACT_ID@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_XLogRecGetInfo
Lloh11:
	adrp	x8, _XLOG_XACT_OPMASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XLOG_XACT_OPMASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh14:
	adrp	x9, _XLOG_XACT_COMMIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _XLOG_XACT_COMMIT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _XLOG_XACT_COMMIT_PREPARED@GOTPAGE
Lloh18:
	ldr	x10, [x10, _XLOG_XACT_COMMIT_PREPARED@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_6
; %bb.3:
	add	x1, sp, #28
	mov	x0, x19
	bl	_getRecordTimestamp
	cbz	w0, LBB0_7
; %bb.4:
	ldr	w0, [sp, #28]
	ldr	x1, [x20]
	bl	_TimestampTzPlusMilliseconds
Lloh20:
	adrp	x20, _recoveryDelayUntilTime@GOTPAGE
Lloh21:
	ldr	x20, [x20, _recoveryDelayUntilTime@GOTPAGEOFF]
	str	w0, [x20]
	bl	_GetCurrentTimestamp
	ldr	w1, [x20]
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_TimestampDifference
	ldr	x8, [sp, #16]
	cmp	x8, #0
	b.gt	LBB0_8
; %bb.5:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ge	LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
Lloh22:
	adrp	x21, _XLogCtl@GOTPAGE
Lloh23:
	ldr	x21, [x21, _XLogCtl@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ResetLatch
	bl	_HandleStartupProcInterrupts
	bl	_CheckForStandbyTrigger
	cbnz	x0, LBB0_13
; %bb.9:
Lloh24:
	adrp	x22, _DEBUG2@GOTPAGE
Lloh25:
	ldr	x22, [x22, _DEBUG2@GOTPAGEOFF]
Lloh26:
	adrp	x19, l_.str@PAGE
Lloh27:
	add	x19, x19, l_.str@PAGEOFF
Lloh28:
	adrp	x23, _WL_LATCH_SET@GOTPAGE
Lloh29:
	ldr	x23, [x23, _WL_LATCH_SET@GOTPAGEOFF]
Lloh30:
	adrp	x24, _WL_TIMEOUT@GOTPAGE
Lloh31:
	ldr	x24, [x24, _WL_TIMEOUT@GOTPAGEOFF]
	mov	w25, #19923
	movk	w25, #4194, lsl #16
Lloh32:
	adrp	x26, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh33:
	ldr	x26, [x26, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
	mov	w27, #1000
Lloh34:
	adrp	x28, _WAIT_EVENT_RECOVERY_APPLY_DELAY@GOTPAGE
Lloh35:
	ldr	x28, [x28, _WAIT_EVENT_RECOVERY_APPLY_DELAY@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x22]
	smull	x8, w8, w25
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w3, w8, w9
	mov	x1, x19
	bl	_elog
	ldr	x0, [x21]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w1, w8, w9
	ldr	x8, [sp, #16]
	mul	x8, x8, x27
	ldrsw	x9, [sp, #12]
	mul	x9, x9, x25
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x2, x8, w9, sxtw
	ldr	w3, [x28]
	bl	_WaitLatch
	ldr	x0, [x21]
	bl	_ResetLatch
	bl	_HandleStartupProcInterrupts
	bl	_CheckForStandbyTrigger
	mov	x8, x0
	mov	w0, #1
	cbnz	x8, LBB0_7
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	bl	_GetCurrentTimestamp
	ldr	w1, [x20]
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_TimestampDifference
	ldr	x2, [sp, #16]
	ldr	w8, [sp, #12]
	cmp	x2, #0
	b.gt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, #1000
	b.ge	LBB0_10
LBB0_13:
	mov	w0, #1
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_recovery_min_apply_delay,8,3   ; @recovery_min_apply_delay
	.comm	_reachedConsistency,4,2         ; @reachedConsistency
	.comm	_ArchiveRecoveryRequested,4,2   ; @ArchiveRecoveryRequested
	.comm	_RM_XACT_ID,8,3                 ; @RM_XACT_ID
	.comm	_XLOG_XACT_OPMASK,4,2           ; @XLOG_XACT_OPMASK
	.comm	_XLOG_XACT_COMMIT,4,2           ; @XLOG_XACT_COMMIT
	.comm	_XLOG_XACT_COMMIT_PREPARED,4,2  ; @XLOG_XACT_COMMIT_PREPARED
	.comm	_recoveryDelayUntilTime,4,2     ; @recoveryDelayUntilTime
	.comm	_XLogCtl,8,3                    ; @XLogCtl
	.comm	_DEBUG2,4,2                     ; @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"recovery apply delay %ld seconds, %d milliseconds"

	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_TIMEOUT,4,2                 ; @WL_TIMEOUT
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_RECOVERY_APPLY_DELAY,4,2 ; @WAIT_EVENT_RECOVERY_APPLY_DELAY
	.no_dead_strip	_recoveryApplyDelay
.subsections_via_symbols
