	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_write_completed
_handle_write_completed:                ## @handle_write_completed
	.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	%rsi, %r13
	movq	%rdi, %rbx
	movq	_R10BIO_IsSync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.1:
	movq	_R10BIO_IsRecover@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
LBB0_6:
	cmpl	$0, (%rbx)
	jle	LBB0_20
## %bb.7:
	movq	%rbx, %rcx
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r12
	movslq	(%rcx), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jge	LBB0_20
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	16(%rax,%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	(%rax,%rbx), %r14
	movq	8(%rcx), %rax
	shlq	$4, %r14
	movq	8(%rax,%r14), %r15
	movq	_BIO_UPTODATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	movq	8(%r13), %rcx
	movl	4(%rcx,%rbx), %esi
	movl	4(%r13), %edx
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	%r15, %rsi
	callq	_md_error
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rax
	movq	8(%rax,%rbx), %rsi
	testq	%rsi, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rcx), %rax
	movq	(%rax,%r14), %r15
	movq	_BIO_UPTODATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	movq	8(%r13), %rcx
	movl	4(%rcx,%rbx), %esi
	movl	4(%r13), %edx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	testl	%eax, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	%r15, %rsi
	callq	_md_error
	jmp	LBB0_18
LBB0_20:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_buf                        ## TAILCALL
LBB0_2:
	cmpl	$0, (%rbx)
	jle	LBB0_31
## %bb.3:
	movq	%rbx, %rdx
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movslq	(%rdx), %rax
	addq	$24, %r12
	cmpq	%rax, %r15
	jge	LBB0_31
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movslq	(%rax,%r12), %rbx
	movq	16(%rax,%r12), %rsi
	movq	8(%rdx), %rcx
	shlq	$4, %rbx
	movq	8(%rcx,%rbx), %r14
	movq	_IO_MADE_GOOD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	je	LBB0_5
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_BIO_UPTODATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_narrow_write_error
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	movq	%r14, %rdx
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	%rdx, %rsi
	callq	_md_error
	movq	_R10BIO_Degraded@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_set_bit
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rax,%r12), %esi
	movl	4(%r13), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rcx), %esi
	movq	%rdx, %rdi
	callq	_rdev_dec_pending
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rdx), %rax
	movq	(%rax,%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movq	8(%rax,%r12), %rcx
	movq	_IO_MADE_GOOD@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rax,%r12), %esi
	movl	4(%r13), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	callq	_rdev_dec_pending
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_30
LBB0_31:
	movq	_R10BIO_WriteError@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_33
## %bb.32:
	movq	%r13, %rdi
	callq	_close_write
LBB0_33:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_raid_end_bio_io                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R10BIO_IsSync,4,2              ## @R10BIO_IsSync
	.comm	_R10BIO_IsRecover,4,2           ## @R10BIO_IsRecover
	.comm	_BIO_UPTODATE,4,2               ## @BIO_UPTODATE
	.comm	_IO_MADE_GOOD,8,3               ## @IO_MADE_GOOD
	.comm	_R10BIO_Degraded,4,2            ## @R10BIO_Degraded
	.comm	_R10BIO_WriteError,4,2          ## @R10BIO_WriteError
	.no_dead_strip	_handle_write_completed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_write_completed
_handle_write_completed:                ; @handle_write_completed
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _R10BIO_IsSync@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R10BIO_IsSync@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_test_bit
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _R10BIO_IsRecover@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R10BIO_IsRecover@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_16
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x22, #0
	mov	x23, #0
Lloh6:
	adrp	x24, _BIO_UPTODATE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BIO_UPTODATE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_clear_badblocks
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x22, x22, #24
	cmp	x23, x8
	b.ge	LBB0_15
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldr	x1, [x8, #16]
	cbz	x1, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x25, [x8]
	ldr	x8, [x20, #8]
	add	x8, x8, x25, lsl #4
	ldr	x21, [x8, #8]
	ldr	w0, [x24]
	bl	_test_bit
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #4]
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_clear_badblocks
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_set_badblocks
	cbnz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_md_error
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #8]
	lsl	x9, x25, #4
	ldr	x21, [x8, x9]
	ldr	w0, [x24]
	bl	_test_bit
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #4]
	cbnz	x0, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_set_badblocks
	cbnz	w0, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_md_error
	b	LBB0_5
LBB0_15:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_put_buf
LBB0_16:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.17:
	mov	x23, #0
	mov	x21, #0
Lloh8:
	adrp	x24, _IO_MADE_GOOD@GOTPAGE
Lloh9:
	ldr	x24, [x24, _IO_MADE_GOOD@GOTPAGEOFF]
Lloh10:
	adrp	x25, _BIO_UPTODATE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _BIO_UPTODATE@GOTPAGEOFF]
Lloh12:
	adrp	x26, _R10BIO_Degraded@GOTPAGE
Lloh13:
	ldr	x26, [x26, _R10BIO_Degraded@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	add	x23, x23, #24
	cmp	x21, x8
	b.ge	LBB0_29
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x23
	ldrsw	x27, [x8]
	ldr	x1, [x8, #16]
	ldr	x9, [x20, #8]
	add	x9, x9, x27, lsl #4
	ldr	x22, [x9, #8]
	ldr	x9, [x24]
	cmp	x1, x9
	b.eq	LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	cbz	x1, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x25]
	bl	_test_bit
	cbnz	x0, LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_narrow_write_error
	cbnz	w0, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x22
	bl	_md_error
	ldr	w0, [x26]
	mov	x1, x19
	bl	_set_bit
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #4]
	mov	x0, x22
	mov	w3, #0
	bl	_rdev_clear_badblocks
LBB0_25:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w1, [x20, #4]
	mov	x0, x22
	bl	_rdev_dec_pending
LBB0_26:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x20, #8]
	lsl	x9, x27, #4
	ldr	x22, [x8, x9]
	cbz	x22, LBB0_18
; %bb.27:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x23
	ldr	x9, [x8, #8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_18
; %bb.28:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #4]
	mov	x0, x22
	mov	w3, #0
	bl	_rdev_clear_badblocks
	ldr	w1, [x20, #4]
	mov	x0, x22
	bl	_rdev_dec_pending
	b	LBB0_18
LBB0_29:
Lloh14:
	adrp	x8, _R10BIO_WriteError@GOTPAGE
Lloh15:
	ldr	x8, [x8, _R10BIO_WriteError@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_31
; %bb.30:
	mov	x0, x19
	bl	_close_write
LBB0_31:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_raid_end_bio_io
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_R10BIO_IsSync,4,2              ; @R10BIO_IsSync
	.comm	_R10BIO_IsRecover,4,2           ; @R10BIO_IsRecover
	.comm	_BIO_UPTODATE,4,2               ; @BIO_UPTODATE
	.comm	_IO_MADE_GOOD,8,3               ; @IO_MADE_GOOD
	.comm	_R10BIO_Degraded,4,2            ; @R10BIO_Degraded
	.comm	_R10BIO_WriteError,4,2          ; @R10BIO_WriteError
	.no_dead_strip	_handle_write_completed
.subsections_via_symbols
