	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mirror_end_io
_mirror_end_io:                         ## @mirror_end_io
	.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	%rcx, %r14
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_bio_rw
	movl	%eax, %r15d
	movq	(%rbx), %rdx
	movq	(%r14), %rbx
	movq	_WRITE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.1:
	movq	_BIO_FLUSH@GOTPCREL(%rip), %rax
	movq	_BIO_DISCARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r12)
	jne	LBB0_15
## %bb.2:
	movl	4(%rdx), %edi
	movl	%ebx, %esi
	callq	_dm_rh_dec
	jmp	LBB0_15
LBB0_3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	je	LBB0_12
## %bb.4:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.5:
	movq	_BIO_RW_AHEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bio_rw_flagged
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_12
LBB0_6:
	movl	%r13d, %edi
	callq	_unlikely
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMERR
	movq	_DM_RAID1_READ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_fail_mirror
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_default_ok
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_mirror_available
	testq	%rax, %rax
	je	LBB0_13
LBB0_11:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_dm_bio_restore
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_mempool_free
	movq	$0, (%r14)
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_queue_bio
	movl	$1, %r13d
	jmp	LBB0_15
LBB0_12:
	testq	%rbx, %rbx
	je	LBB0_15
LBB0_14:
	movl	(%rdx), %esi
	movq	%rbx, %rdi
	callq	_mempool_free
	movq	$0, (%r14)
LBB0_15:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_DMERR_LIMIT
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_15
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMERR
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_BIO_FLUSH,4,2                  ## @BIO_FLUSH
	.comm	_BIO_DISCARD,4,2                ## @BIO_DISCARD
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_BIO_RW_AHEAD,4,2               ## @BIO_RW_AHEAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mirror read failed."

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Mirror read failed from %s. Trying alternative device."

	.comm	_DM_RAID1_READ_ERROR,4,2        ## @DM_RAID1_READ_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"All replicated volumes dead, failing I/O"

	.no_dead_strip	_mirror_end_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mirror_end_io
_mirror_end_io:                         ; @mirror_end_io
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
	mov	x0, x1
	bl	_bio_rw
	ldr	x21, [x21]
	ldr	x22, [x20]
Lloh0:
	adrp	x8, _WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x23]
Lloh3:
	adrp	x9, _BIO_FLUSH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BIO_FLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _BIO_DISCARD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _BIO_DISCARD@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_13
; %bb.2:
	ldr	w0, [x21, #4]
	mov	x1, x22
	bl	_dm_rh_dec
	b	LBB0_13
LBB0_3:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w8, w19
	b.eq	LBB0_11
; %bb.4:
	mov	x24, x0
Lloh12:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmn	w8, w19
	b.ne	LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _BIO_RW_AHEAD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BIO_RW_AHEAD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_bio_rw_flagged
	cbnz	x0, LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.7:
	cbz	x22, LBB0_14
; %bb.8:
	ldr	x25, [x22, #8]
	ldr	x8, [x25]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMERR
Lloh20:
	adrp	x8, _DM_RAID1_READ_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DM_RAID1_READ_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_fail_mirror
	mov	x0, x25
	bl	_default_ok
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x21
	mov	x1, x23
	bl	_mirror_available
	cbz	x0, LBB0_15
LBB0_10:
	mov	x0, x22
	mov	x1, x23
	bl	_dm_bio_restore
	ldr	w1, [x21]
	mov	x0, x22
	bl	_mempool_free
	str	xzr, [x20]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_queue_bio
	mov	w19, #1
	b	LBB0_13
LBB0_11:
	cbz	x22, LBB0_13
LBB0_12:
	ldr	w1, [x21]
	mov	x0, x22
	bl	_mempool_free
	str	xzr, [x20]
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR_LIMIT
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_13
LBB0_15:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DMERR
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_BIO_FLUSH,4,2                  ; @BIO_FLUSH
	.comm	_BIO_DISCARD,4,2                ; @BIO_DISCARD
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_BIO_RW_AHEAD,4,2               ; @BIO_RW_AHEAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mirror read failed."

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Mirror read failed from %s. Trying alternative device."

	.comm	_DM_RAID1_READ_ERROR,4,2        ; @DM_RAID1_READ_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"All replicated volumes dead, failing I/O"

	.no_dead_strip	_mirror_end_io
.subsections_via_symbols
