	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_bio_data_dir
	movl	%eax, %r12d
	movq	(%rbx), %rbx
	movq	%r13, %rdi
	movl	$24, %esi
	callq	_dm_per_bio_data
	movq	%rax, %r15
	movq	_WRITE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %r14
	movq	_REQ_PREFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DM_ENDIO_DONE@GOTPCREL(%rip), %rbx
	testl	%eax, (%r13)
	jne	LBB0_15
## %bb.2:
	movq	%r13, %rdi
	callq	_bio_op
	movq	_REQ_OP_DISCARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.3:
	movl	(%r14), %edi
	movl	16(%r15), %esi
	callq	_dm_rh_dec
	jmp	LBB0_15
LBB0_4:
	movq	(%r14), %rdi
	movq	_BLK_STS_NOTSUPP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_13
## %bb.5:
	movq	_REQ_RAHEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_6
LBB0_13:
	movq	$0, (%r15)
LBB0_14:
	movq	_DM_ENDIO_DONE@GOTPCREL(%rip), %rbx
LBB0_15:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.9:
	movq	8(%r15), %r14
	movq	(%r14), %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	%r14, %rdi
	callq	_fail_mirror
	movq	%r14, %rdi
	callq	_default_ok
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_mirror_available
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_dm_bio_restore
	movq	$0, (%r15)
	movq	$0, 8(%r13)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_queue_bio
	movq	_DM_ENDIO_INCOMPLETE@GOTPCREL(%rip), %rbx
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_DMERR_LIMIT
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMERR
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_REQ_PREFLUSH,4,2               ## @REQ_PREFLUSH
	.comm	_REQ_OP_DISCARD,8,3             ## @REQ_OP_DISCARD
	.comm	_DM_ENDIO_DONE,4,2              ## @DM_ENDIO_DONE
	.comm	_BLK_STS_NOTSUPP,8,3            ## @BLK_STS_NOTSUPP
	.comm	_REQ_RAHEAD,4,2                 ## @REQ_RAHEAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mirror read failed."

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
	.comm	_DM_ENDIO_INCOMPLETE,4,2        ## @DM_ENDIO_INCOMPLETE
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, #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	x23, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_bio_data_dir
	mov	x22, x0
	ldr	x19, [x19]
	mov	x0, x20
	mov	w1, #24
	bl	_dm_per_bio_data
	mov	x21, x0
Lloh0:
	adrp	x8, _WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _REQ_PREFLUSH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REQ_PREFLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_bio_op
Lloh6:
	adrp	x8, _REQ_OP_DISCARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REQ_OP_DISCARD@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.3:
	ldr	w0, [x19]
	ldr	w1, [x21, #16]
	bl	_dm_rh_dec
	b	LBB0_7
LBB0_4:
	ldr	x0, [x23]
Lloh9:
	adrp	x8, _BLK_STS_NOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BLK_STS_NOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _REQ_RAHEAD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REQ_RAHEAD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_6:
	str	xzr, [x21]
LBB0_7:
Lloh15:
	adrp	x8, _DM_ENDIO_DONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DM_ENDIO_DONE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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_9:
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.10:
	ldr	x8, [x21]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	x23, [x21, #8]
	ldr	x8, [x23]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMERR
Lloh19:
	adrp	x8, _DM_RAID1_READ_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DM_RAID1_READ_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_fail_mirror
	mov	x0, x23
	bl	_default_ok
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, x20
	bl	_mirror_available
	cbz	x0, LBB0_15
LBB0_13:
	mov	x0, x21
	mov	x1, x20
	bl	_dm_bio_restore
	str	xzr, [x21]
	str	xzr, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_queue_bio
Lloh22:
	adrp	x8, _DM_ENDIO_INCOMPLETE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DM_ENDIO_INCOMPLETE@GOTPAGEOFF]
	b	LBB0_8
LBB0_14:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR_LIMIT
	b	LBB0_7
LBB0_15:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DMERR
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_REQ_PREFLUSH,4,2               ; @REQ_PREFLUSH
	.comm	_REQ_OP_DISCARD,8,3             ; @REQ_OP_DISCARD
	.comm	_DM_ENDIO_DONE,4,2              ; @DM_ENDIO_DONE
	.comm	_BLK_STS_NOTSUPP,8,3            ; @BLK_STS_NOTSUPP
	.comm	_REQ_RAHEAD,4,2                 ; @REQ_RAHEAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mirror read failed."

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
	.comm	_DM_ENDIO_INCOMPLETE,4,2        ; @DM_ENDIO_INCOMPLETE
l_.str.2:                               ; @.str.2
	.asciz	"All replicated volumes dead, failing I/O"

	.no_dead_strip	_mirror_end_io
.subsections_via_symbols
