	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function narrow_write_error
_narrow_write_error:                    ## @narrow_write_error
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movslq	%esi, %rdx
	shlq	$4, %rdx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rdx), %rax
	movq	(%rcx,%rax,8), %rax
	movl	4(%rax), %ecx
	testl	%ecx, %ecx
	js	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r14d
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.3:
	movq	24(%r13), %r12
	movl	4(%r13), %r15d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leal	(%r15,%rcx), %eax
	movl	%ecx, %ebx
	negl	%ebx
	andl	%eax, %ebx
	subl	%r15d, %ebx
	cmpl	%r14d, %ebx
	cmovgel	%r14d, %ebx
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_mddev
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, %esi
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	subl	(%r12), %esi
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_md_trim_bio
	movq	8(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rax,%rcx), %r12d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	addl	%r15d, %r12d
	movq	%r13, %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_choose_data_offset
	addl	%r12d, %eax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	subl	4(%r13), %eax
	movl	%eax, (%r12)
	movl	(%r15), %eax
	movl	%eax, 4(%r12)
	movq	_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_submit_bio_wait
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
LBB0_5:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_bio_put
	subl	%ebx, %r14d
	je	LBB0_11
## %bb.6:
	addl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_rdev_set_badblocks
	testq	%rax, %rax
	setne	%al
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %r15d
	movl	-56(%rbp), %r14d                ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_bio_put
	addl	%r15d, %ebx
	subl	%r15d, %r14d
	je	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r14d, %eax
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	cmovll	%eax, %r14d
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_mddev
	movq	%rax, %r12
	movl	%ebx, %esi
	subl	(%r15), %esi
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_md_trim_bio
	movq	8(%r13), %rax
	movq	%r13, %r15
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rax,%rcx), %r13d
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	addl	%ebx, %r13d
	movq	%r15, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_choose_data_offset
	addl	%r13d, %eax
	movq	%r15, %r13
	subl	4(%r15), %eax
	movl	%eax, (%r12)
	movl	(%rbx), %eax
	movl	%eax, 4(%r12)
	movq	_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_submit_bio_wait
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r14d, %r15d
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_WRITE,4,2                      ## @WRITE
	.no_dead_strip	_narrow_write_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function narrow_write_error
_narrow_write_error:                    ; @narrow_write_error
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	ldp	x8, x9, [x0, #8]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x9, [x9]
	ldr	x9, [x9]
	sbfiz	x10, x1, #4, #32
	ldr	x8, [x8, x10]
	ldr	x21, [x9, x8, lsl #3]
	ldr	w8, [x21, #4]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w27, [x0]
	mov	w23, #1
	cbz	w27, LBB0_11
; %bb.2:
	ldr	x22, [x19, #24]
	sxtw	x20, w1
	lsl	w28, w23, w8
	ldr	w24, [x19, #4]
	add	w8, w24, w28
	neg	w9, w28
	and	w8, w8, w9
	sub	w8, w8, w24
	cmp	w8, w27
	csel	w25, w8, w27, lt
Lloh0:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_bio_clone_mddev
	mov	x26, x0
	ldr	w8, [x22]
	sub	w1, w24, w8
	mov	x2, x25
	bl	_md_trim_bio
	ldr	x8, [x19, #8]
	str	x20, [sp]                       ; 8-byte Folded Spill
	add	x8, x8, x20, lsl #4
	ldr	w23, [x8, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_choose_data_offset
	ldr	w8, [x19, #4]
	add	w9, w23, w24
	add	w9, w9, w0
	sub	w8, w9, w8
	ldr	w9, [x21]
	stp	w8, w9, [x26]
Lloh3:
	adrp	x8, _WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x26
	bl	_submit_bio_wait
	cbz	x0, LBB0_5
; %bb.3:
	mov	w23, #1
	b	LBB0_6
LBB0_4:
	mov	w23, #0
	b	LBB0_11
LBB0_5:
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	mov	w3, #0
	bl	_rdev_set_badblocks
	cmp	x0, #0
	cset	w23, ne
LBB0_6:
	mov	x0, x26
	bl	_bio_put
	subs	w27, w27, w25
	b.eq	LBB0_11
; %bb.7:
	add	w24, w25, w24
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x26
	bl	_bio_put
	add	w24, w25, w24
	subs	w27, w27, w25
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w28, w27
	csel	w25, w28, w27, lt
Lloh6:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_bio_clone_mddev
	mov	x26, x0
	ldr	w8, [x22]
	sub	w1, w24, w8
	mov	x2, x25
	bl	_md_trim_bio
	ldr	x8, [x19, #8]
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x8, x8, x9, lsl #4
	ldr	w20, [x8, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_choose_data_offset
	ldr	w8, [x19, #4]
	add	w9, w20, w24
	add	w9, w9, w0
	sub	w8, w9, w8
	ldr	w9, [x21]
	stp	w8, w9, [x26]
Lloh9:
	adrp	x8, _WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x26
	bl	_submit_bio_wait
	cbnz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	mov	w3, #0
	bl	_rdev_set_badblocks
	cmp	x0, #0
	ccmp	w23, #0, #4, ne
	cset	w23, ne
	b	LBB0_8
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_WRITE,4,2                      ; @WRITE
	.no_dead_strip	_narrow_write_error
.subsections_via_symbols
