	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_restore_ctx_init               ## -- Begin function restore_ctx_init
	.p2align	4, 0x90
_restore_ctx_init:                      ## @restore_ctx_init
	.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	16(%rdi), %r14
	movq	(%rdi), %r13
	movq	8(%rdi), %r12
	movl	$0, (%r12)
	cmpl	$1, (%r13)
	je	LBB0_24
## %bb.1:
	cmpl	$1, 4(%r13)
	je	LBB0_24
## %bb.2:
	cmpl	$1, 8(%r13)
	je	LBB0_24
## %bb.3:
	cmpl	$1, 12(%r13)
	je	LBB0_24
## %bb.4:
	cmpl	$1, 16(%r13)
	je	LBB0_24
## %bb.5:
	cmpl	$1, 20(%r13)
	je	LBB0_24
## %bb.6:
	cmpl	$1, 24(%r13)
	je	LBB0_24
## %bb.7:
	cmpl	$1, 28(%r13)
	je	LBB0_24
## %bb.8:
	cmpl	$1, 32(%r13)
	je	LBB0_24
## %bb.9:
	cmpl	$1, 36(%r13)
	je	LBB0_24
## %bb.10:
	cmpl	$1, 40(%r13)
	jne	LBB0_11
LBB0_24:
	xorl	%r14d, %r14d
LBB0_25:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testq	%rdx, %rdx
	je	LBB0_24
## %bb.12:
	movl	%esi, %r15d
	testl	%esi, %esi
	je	LBB0_24
## %bb.13:
	cmpl	$1, 44(%r13)
	je	LBB0_24
## %bb.14:
	movq	%rdi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	56(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.16:
	callq	_hcstrdup
	movl	%eax, 36(%r12)
	leaq	32(%r12), %rdi
	movq	56(%r13), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_hc_asprintf
	jmp	LBB0_17
LBB0_15:
	leaq	36(%r12), %rdi
	movslq	(%r14), %rdx
	movl	64(%r13), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_hc_asprintf
	leaq	32(%r12), %rdi
	movslq	(%r14), %rdx
	movl	64(%r13), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_hc_asprintf
LBB0_17:
	movl	%r15d, 4(%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r12)
	movq	%rbx, %rdi
	callq	_init_restore
	movl	$-1, %r14d
	cmpl	$-1, %eax
	je	LBB0_25
## %bb.18:
	movl	$1, (%r12)
	movl	$0, 16(%r12)
	cmpl	$1, 48(%r13)
	jne	LBB0_24
## %bb.19:
	movq	%rbx, %rdi
	callq	_read_restore
	cmpl	$-1, %eax
	je	LBB0_25
## %bb.20:
	movq	24(%r12), %r15
	movq	(%r15), %rax
	movq	_RESTORE_VERSION_MIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_22
## %bb.21:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_event_log_error
	jmp	LBB0_25
LBB0_22:
	movq	%rbx, %rdi
	callq	_user_options_init
	movl	8(%r15), %edx
	movl	12(%r15), %esi
	movq	%rbx, %rdi
	callq	_user_options_getopt
	cmpl	$-1, %eax
	je	LBB0_25
## %bb.23:
	movl	$1, 16(%r12)
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s.restore"

L_.str.1:                               ## @.str.1
	.asciz	"%s/%s.restore.new"

L_.str.2:                               ## @.str.2
	.asciz	"%s.new"

	.comm	_RESTORE_VERSION_MIN,8,3        ## @RESTORE_VERSION_MIN
L_.str.3:                               ## @.str.3
	.asciz	"Incompatible restore-file version."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_restore_ctx_init               ; -- Begin function restore_ctx_init
	.p2align	2
_restore_ctx_init:                      ; @restore_ctx_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	mov	w0, #0
	ldp	x22, x8, [x19, #8]
	ldr	x23, [x19]
	str	wzr, [x22]
	ldr	w9, [x23]
	cmp	w9, #1
	b.eq	LBB0_12
; %bb.1:
	ldr	w9, [x23, #4]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.2:
	ldr	w9, [x23, #8]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.3:
	ldr	w9, [x23, #12]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.4:
	ldr	w9, [x23, #16]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.5:
	ldr	w9, [x23, #20]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.6:
	ldr	w9, [x23, #24]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.7:
	ldr	w9, [x23, #28]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.8:
	ldr	w9, [x23, #32]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.9:
	ldr	w9, [x23, #36]
	cmp	w9, #1
	b.eq	LBB0_11
; %bb.10:
	ldr	w9, [x23, #40]
	cmp	w9, #1
	b.ne	LBB0_13
LBB0_11:
	mov	w0, #0
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
	add	sp, sp, #80
	ret
LBB0_13:
	mov	x20, x2
	mov	w0, #0
	cbz	x2, LBB0_12
; %bb.14:
	mov	x21, x1
	cbz	w1, LBB0_12
; %bb.15:
	ldr	w9, [x23, #44]
	cmp	w9, #1
	b.eq	LBB0_12
; %bb.16:
	ldr	x0, [x23, #56]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_hcstrdup
	str	w0, [x22, #36]
	add	x0, x22, #32
	ldr	x2, [x23, #56]
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_18:
	add	x0, x22, #36
	ldrsw	x2, [x8]
	ldr	w9, [x23, #64]
	str	x9, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x24, x8
	bl	_hc_asprintf
	add	x0, x22, #32
	ldrsw	x2, [x24]
	ldr	w8, [x23, #64]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_19:
	bl	_hc_asprintf
	str	w21, [x22, #4]
	str	x20, [x22, #8]
	mov	x0, x19
	bl	_init_restore
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.20:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x22]
	str	wzr, [x22, #16]
	ldr	w8, [x23, #48]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.21:
	mov	x0, x19
	bl	_read_restore
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.22:
	ldr	x20, [x22, #24]
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _RESTORE_VERSION_MIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RESTORE_VERSION_MIN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_24
; %bb.23:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_event_log_error
	mov	w0, #-1
	b	LBB0_12
LBB0_24:
	mov	x0, x19
	bl	_user_options_init
	ldp	w2, w1, [x20, #8]
	mov	x0, x19
	bl	_user_options_getopt
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.25:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x22, #16]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s.restore"

l_.str.1:                               ; @.str.1
	.asciz	"%s/%s.restore.new"

l_.str.2:                               ; @.str.2
	.asciz	"%s.new"

	.comm	_RESTORE_VERSION_MIN,8,3        ; @RESTORE_VERSION_MIN
l_.str.3:                               ; @.str.3
	.asciz	"Incompatible restore-file version."

.subsections_via_symbols
