	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	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	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
LBB0_6:
	cmpl	$0, (%rbx)
	jle	LBB0_22
## %bb.7:
	movq	%rbx, %rdx
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	movslq	(%rdx), %rax
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_22
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	16(%rax,%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 8(%rcx)
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movslq	(%rax,%rbx), %r14
	movq	32(%rdx), %rdx
	shlq	$4, %r14
	movq	8(%rdx,%r14), %r12
	cmpq	$0, (%rcx)
	movl	4(%rax,%rbx), %esi
	movl	8(%r15), %edx
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%r12, %rsi
	callq	_md_error
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	16(%r15), %rax
	movq	8(%rax,%rbx), %rcx
	testq	%rcx, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 8(%rcx)
	je	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	32(%rdx), %rdx
	movq	(%rdx,%r14), %r12
	cmpq	$0, (%rcx)
	movl	4(%rax,%rbx), %esi
	movl	8(%r15), %edx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%r12, %rsi
	callq	_md_error
	jmp	LBB0_20
LBB0_22:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_buf                        ## TAILCALL
LBB0_2:
	cmpl	$0, (%rbx)
	jle	LBB0_35
## %bb.3:
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movslq	(%rsi), %rax
	addq	$24, %r12
	cmpq	%rax, %r13
	jge	LBB0_34
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movslq	(%rcx,%r12), %rbx
	movq	16(%rcx,%r12), %rax
	movq	32(%rsi), %rdx
	shlq	$4, %rbx
	movq	8(%rdx,%rbx), %r14
	movq	_IO_MADE_GOOD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_5
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	je	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rax)
	je	LBB0_30
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_narrow_write_error
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, %rdi
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rcx,%r12), %esi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax), %rsi
	callq	_rdev_dec_pending
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	32(%rsi), %rax
	movq	(%rax,%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15), %rax
	movq	8(%rax,%r12), %rcx
	movq	_IO_MADE_GOOD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rax,%r12), %esi
	movl	8(%r15), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_rdev_clear_badblocks
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	movq	%rbx, %rdi
	callq	_rdev_dec_pending
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_33
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%r14, %rsi
	callq	_md_error
	movq	_R10BIO_Degraded@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	jmp	LBB0_28
LBB0_34:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_35
## %bb.38:
	leaq	20(%rsi), %r14
	movq	%rsi, %rbx
	movq	%r14, %rdi
	callq	_spin_lock_irq
	addq	$4, %r15
	leaq	28(%rbx), %rsi
	movq	%r15, %rdi
	callq	_list_add
	incl	24(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	leaq	16(%rbx), %rdi
	callq	_wake_up
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_md_wakeup_thread               ## TAILCALL
LBB0_35:
	movq	_R10BIO_WriteError@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	%r15, %rdi
	callq	_close_write
LBB0_37:
	movq	%r15, %rdi
	addq	$24, %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	_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_18
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.3:
	mov	x22, #0
	mov	x23, #0
	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_17
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x10, x8, x22
	ldr	x9, [x10, #16]
	cbz	x9, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x11, [x9, #8]
	cbz	x11, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x24, [x10]
	ldr	x10, [x20, #32]
	add	x10, x10, x24, lsl #4
	ldr	x21, [x10, #8]
	ldr	x9, [x9]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #8]
	cbz	x9, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_set_badblocks
	cbnz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x20, #8]
	mov	x1, x21
	bl	_md_error
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_clear_badblocks
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	add	x9, x8, x22
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x20, #32]
	lsl	x11, x24, #4
	ldr	x21, [x10, x11]
	ldr	x9, [x9]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #8]
	cbz	x9, LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	w3, #0
	bl	_rdev_set_badblocks
	cbnz	w0, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x20, #8]
	mov	x1, x21
	bl	_md_error
	b	LBB0_5
LBB0_17:
	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_18:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.19:
	mov	x23, #0
	mov	x21, #0
	mov	w26, #0
Lloh6:
	adrp	x24, _IO_MADE_GOOD@GOTPAGE
Lloh7:
	ldr	x24, [x24, _IO_MADE_GOOD@GOTPAGEOFF]
Lloh8:
	adrp	x25, _R10BIO_Degraded@GOTPAGE
Lloh9:
	ldr	x25, [x25, _R10BIO_Degraded@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	add	x23, x23, #24
	cmp	x21, x8
	b.ge	LBB0_32
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x9, x8, x23
	ldrsw	x27, [x9]
	ldr	x8, [x9, #16]
	ldr	x10, [x20, #32]
	add	x10, x10, x27, lsl #4
	ldr	x22, [x10, #8]
	ldr	x10, [x24]
	cmp	x8, x10
	b.eq	LBB0_27
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	cbz	x8, LBB0_29
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x8]
	cbz	x8, LBB0_29
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_narrow_write_error
	cbnz	w0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x0, [x20, #8]
	mov	x1, x22
	bl	_md_error
	ldr	w0, [x25]
	mov	x1, x19
	bl	_set_bit
LBB0_26:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	w26, #1
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	w1, [x9, #4]
	ldr	w2, [x19, #8]
	mov	x0, x22
	mov	w3, #0
	bl	_rdev_clear_badblocks
LBB0_28:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x1, [x20, #8]
	mov	x0, x22
	bl	_rdev_dec_pending
LBB0_29:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x20, #32]
	lsl	x9, x27, #4
	ldr	x22, [x8, x9]
	cbz	x22, LBB0_20
; %bb.30:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, x23
	ldr	x9, [x8, #8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_20
; %bb.31:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #8]
	mov	x0, x22
	mov	w3, #0
	bl	_rdev_clear_badblocks
	ldr	x1, [x20, #8]
	mov	x0, x22
	bl	_rdev_dec_pending
	b	LBB0_20
LBB0_32:
	cbz	w26, LBB0_34
; %bb.33:
	add	x21, x20, #20
	mov	x0, x21
	bl	_spin_lock_irq
	add	x0, x19, #4
	add	x1, x20, #28
	bl	_list_add
	ldr	w8, [x20, #24]
	add	w8, w8, #1
	str	w8, [x20, #24]
	mov	x0, x21
	bl	_spin_unlock_irq
	add	x0, x20, #16
	bl	_wake_up
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	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	_md_wakeup_thread
LBB0_34:
Lloh10:
	adrp	x8, _R10BIO_WriteError@GOTPAGE
Lloh11:
	ldr	x8, [x8, _R10BIO_WriteError@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_36
; %bb.35:
	mov	x0, x19
	bl	_close_write
LBB0_36:
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_R10BIO_IsSync,4,2              ; @R10BIO_IsSync
	.comm	_R10BIO_IsRecover,4,2           ; @R10BIO_IsRecover
	.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
