	.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	8(%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	24(%rdi), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ebx
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_bdev_logical_block_size
	sarl	$9, %eax
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_roundup
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.3:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	4(%r13), %r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	(%r12,%rcx), %eax
	movl	%ecx, %r14d
	negl	%r14d
	andl	%eax, %r14d
	subl	%r12d, %r14d
	cmpl	%ebx, %r14d
	cmovgel	%ebx, %r14d
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_fast
	movl	%r12d, %esi
	subl	(%r15), %esi
	movq	%r12, %r15
	movq	%rax, %rdi
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %edx
	movq	%rax, %r14
	callq	_bio_trim
	movq	8(%r13), %rax
	subl	4(%r13), %r12d
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	8(%rax,%rcx), %r12d
	movq	%r13, %rdi
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_choose_data_offset
	addl	%r12d, %eax
	movl	%eax, (%r14)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_bio_set_dev
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bio_set_op_attrs
	movq	%r14, %rdi
	callq	_submit_bio_wait
	movl	$1, %ecx
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	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	%r14, %rdi
	callq	_bio_put
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	subl	%eax, %ebx
	je	LBB0_10
## %bb.6:
	addl	%eax, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r12, %rdi
	callq	_bio_put
	addl	%r14d, %r15d
	subl	%r14d, %ebx
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	%ebx, %eax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r14d
	cmovll	%eax, %r14d
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_fast
	movq	%rax, %r12
	movl	%r15d, %esi
	subl	(%rbx), %esi
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_bio_trim
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rax
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movl	%r15d, %r13d
	subl	4(%rdi), %r13d
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	8(%rax,%rcx), %r13d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_choose_data_offset
	addl	%r13d, %eax
	movl	%eax, (%r12)
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_bio_set_dev
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_bio_set_op_attrs
	movq	%r12, %rdi
	callq	_submit_bio_wait
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %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
	jmp	LBB0_9
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_10:
	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	_REQ_OP_WRITE,4,2               ## @REQ_OP_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
	mov	x25, x1
	ldp	x8, x9, [x0, #8]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
	sbfiz	x10, x25, #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	x22, [x0, #24]
	ldr	w27, [x0]
	mov	w24, #1
	lsl	w23, w24, w8
	ldr	w0, [x21]
	bl	_bdev_logical_block_size
	asr	w1, w0, #9
	mov	x0, x23
	bl	_roundup
	cbz	w27, LBB0_11
; %bb.2:
	mov	x23, x0
	sxtw	x24, w25
	ldr	w20, [x19, #4]
	add	w8, w20, w0
	neg	w9, w0
	and	w8, w8, w9
	sub	w8, w8, w20
	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_fast
	mov	x26, x0
	ldr	w8, [x22]
	sub	w1, w20, w8
	mov	x2, x25
	bl	_bio_trim
	ldr	x8, [x19, #8]
	str	x24, [sp]                       ; 8-byte Folded Spill
	add	x8, x8, x24, lsl #4
	ldr	w8, [x8, #8]
	ldr	w9, [x19, #4]
	sub	w9, w20, w9
	add	w24, w9, w8
	mov	x0, x19
	mov	x1, x21
	bl	_choose_data_offset
	add	w8, w24, w0
	str	w8, [x26]
	ldr	w1, [x21]
	mov	x0, x26
	bl	_bio_set_dev
Lloh3:
	adrp	x8, _REQ_OP_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x26
	mov	w2, #0
	bl	_bio_set_op_attrs
	mov	x0, x26
	bl	_submit_bio_wait
	tbnz	x0, #63, LBB0_5
; %bb.3:
	mov	w24, #1
	b	LBB0_6
LBB0_4:
	mov	w24, #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	w24, ne
LBB0_6:
	mov	x0, x26
	bl	_bio_put
	subs	w28, w27, w25
	b.eq	LBB0_11
; %bb.7:
	add	w20, w20, w25
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x26
	bl	_bio_put
	add	w20, w20, w25
	subs	w28, w28, w25
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, w28
	csel	w25, w23, w28, 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_fast
	mov	x26, x0
	ldr	w8, [x22]
	sub	w1, w20, w8
	mov	x2, x25
	bl	_bio_trim
	ldr	x8, [x19, #8]
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x8, x8, x9, lsl #4
	ldr	w8, [x8, #8]
	ldr	w9, [x19, #4]
	sub	w9, w20, w9
	add	w27, w9, w8
	mov	x0, x19
	mov	x1, x21
	bl	_choose_data_offset
	add	w8, w27, w0
	str	w8, [x26]
	ldr	w1, [x21]
	mov	x0, x26
	bl	_bio_set_dev
Lloh9:
	adrp	x8, _REQ_OP_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x26
	mov	w2, #0
	bl	_bio_set_op_attrs
	mov	x0, x26
	bl	_submit_bio_wait
	tbz	x0, #63, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	mov	x1, x27
	mov	x2, x25
	mov	w3, #0
	bl	_rdev_set_badblocks
	cmp	x0, #0
	ccmp	w24, #0, #4, ne
	cset	w24, ne
	b	LBB0_8
LBB0_11:
	mov	x0, x24
	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	_REQ_OP_WRITE,4,2               ; @REQ_OP_WRITE
	.no_dead_strip	_narrow_write_error
.subsections_via_symbols
