	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RestoreWALFileForRecovery
_RestoreWALFileForRecovery:             ## @RestoreWALFileForRecovery
	.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	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_fflush
LBB0_2:
	movq	_maxretries@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	js	LBB0_8
## %bb.3:
	movq	$-1, %r12
	xorl	%ebx, %ebx
	movq	_restoreCommand@GOTPCREL(%rip), %r13
	movq	_sleeptime@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_system
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	imulq	%rbx, %rdi
	callq	_pg_usleep
	movslq	(%r15), %rax
	incq	%r12
	addq	$1000000, %rbx                  ## imm = 0xF4240
	cmpq	%rax, %r12
	jl	LBB0_4
LBB0_8:
	xorl	%ebx, %ebx
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_fprintf
	jmp	LBB0_10
LBB0_5:
	movl	$1, %ebx
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	movl	(%r14), %edi
	callq	_fflush
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,8,3                      ## @debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"running restore:      "

	.comm	_maxretries,4,2                 ## @maxretries
	.comm	_restoreCommand,4,2             ## @restoreCommand
L_.str.1:                               ## @.str.1
	.asciz	"OK\n"

	.comm	_sleeptime,8,3                  ## @sleeptime
L_.str.2:                               ## @.str.2
	.asciz	"not restored\n"

	.no_dead_strip	_RestoreWALFileForRecovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RestoreWALFileForRecovery
_RestoreWALFileForRecovery:             ; @RestoreWALFileForRecovery
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x20, _debug@GOTPAGE
Lloh1:
	ldr	x20, [x20, _debug@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x19, _stderr@GOTPAGE
Lloh3:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
	bl	_fflush
LBB0_2:
Lloh6:
	adrp	x21, _maxretries@GOTPAGE
Lloh7:
	ldr	x21, [x21, _maxretries@GOTPAGEOFF]
	ldr	w8, [x21]
	tbnz	w8, #31, LBB0_6
; %bb.3:
	mov	x22, #0
	mov	x23, #-1
Lloh8:
	adrp	x24, _restoreCommand@GOTPAGE
Lloh9:
	ldr	x24, [x24, _restoreCommand@GOTPAGEOFF]
Lloh10:
	adrp	x25, _sleeptime@GOTPAGE
Lloh11:
	ldr	x25, [x25, _sleeptime@GOTPAGEOFF]
	mov	w26, #16960
	movk	w26, #15, lsl #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_system
	cbz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	mul	x0, x22, x8
	bl	_pg_usleep
	ldrsw	x8, [x21]
	add	x23, x23, #1
	add	x22, x22, x26
	cmp	x23, x8
	b.lt	LBB0_4
LBB0_6:
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
	bl	_fflush
LBB0_11:
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,8,3                      ; @debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"running restore:      "

	.comm	_maxretries,4,2                 ; @maxretries
	.comm	_restoreCommand,4,2             ; @restoreCommand
l_.str.1:                               ; @.str.1
	.asciz	"OK\n"

	.comm	_sleeptime,8,3                  ; @sleeptime
l_.str.2:                               ; @.str.2
	.asciz	"not restored\n"

	.no_dead_strip	_RestoreWALFileForRecovery
.subsections_via_symbols
