	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fail_mirror
_fail_mirror:                           ## @fail_mirror
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	$1, (%r14)
	addq	$12, %rdi
	callq	_atomic_inc
	leaq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_errors_handled
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movq	%r14, %rdi
	callq	_get_default_mirror
	cmpq	%rbx, %rax
	jne	LBB0_9
## %bb.3:
	cmpl	$0, 8(%r14)
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_keep_log
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_get_valid_mirror
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	callq	_set_default_mirror
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DMWARN
	jmp	LBB0_9
LBB0_5:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DMERR
LBB0_9:
	addq	$4, %r14
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_work                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Primary mirror (%s) failed while out-of-sync: Reads may fail."

L_.str.1:                               ## @.str.1
	.asciz	"All sides of mirror have failed."

	.no_dead_strip	_fail_mirror
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fail_mirror
_fail_mirror:                           ; @fail_mirror
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	w8, #1
	str	w8, [x19]
	add	x0, x0, #12
	bl	_atomic_inc
	add	x1, x20, #8
	mov	x0, x21
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	bl	_errors_handled
	cbz	w0, LBB0_1
; %bb.3:
	mov	x0, x19
	bl	_get_default_mirror
	cmp	x0, x20
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_keep_log
	cbz	w0, LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_get_valid_mirror
	cbz	x0, LBB0_8
; %bb.7:
	bl	_set_default_mirror
	b	LBB0_10
LBB0_8:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMWARN
	b	LBB0_10
LBB0_9:
	ldr	x8, [x20]
	ldr	w1, [x8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
LBB0_10:
	add	x0, x19, #4
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_schedule_work
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Primary mirror (%s) failed while out-of-sync: Reads may fail."

l_.str.1:                               ; @.str.1
	.asciz	"All sides of mirror have failed."

	.no_dead_strip	_fail_mirror
.subsections_via_symbols
