	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rax
	movl	16(%rax), %ecx
	testl	%ecx, %ecx
	js	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	movl	(%rdi), %r15d
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_bdev_logical_block_size
	sarl	$9, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_roundup
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.3:
	movl	4(%r13), %r12d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leal	(%r12,%rcx), %eax
	movl	%ecx, %ebx
	negl	%ebx
	andl	%eax, %ebx
	subl	%r12d, %ebx
	leaq	16(%r13), %rsi
	cmpl	%r15d, %ebx
	cmovgel	%r15d, %ebx
	movq	_R1BIO_BehindIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	callq	_test_bit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	8(%r13,%rcx,4), %edi
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_fast
	movq	%rax, %r14
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bio_set_op_attrs
	movl	4(%r13), %eax
	movl	%eax, (%r14)
	movl	(%r13), %ecx
	shll	$9, %ecx
	movl	%ecx, 4(%r14)
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	subl	%eax, %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_bio_trim
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	8(%r12), %eax
	addl	%eax, (%r14)
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_bio_set_dev
	movq	%r14, %rdi
	callq	_submit_bio_wait
	movl	$1, %ecx
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	%r12, %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	%r14, %rdi
	callq	_bio_put
	subl	%ebx, %r15d
	je	LBB0_10
## %bb.6:
	addl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_bio_put
	addl	%r14d, %ebx
	subl	%r14d, %r15d
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r15d, %eax
	movl	%r15d, %r14d
	cmovll	%eax, %r14d
	movq	_R1BIO_BehindIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	8(%r13,%rcx,4), %edi
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_bio_clone_fast
	movq	%rax, %r12
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_bio_set_op_attrs
	movl	4(%r13), %eax
	movl	%eax, (%r12)
	movl	(%r13), %ecx
	shll	$9, %ecx
	movl	%ecx, 4(%r12)
	movl	%ebx, %esi
	subl	%eax, %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_bio_trim
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	8(%r13), %eax
	addl	%eax, (%r12)
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_bio_set_dev
	movq	%r12, %rdi
	callq	_submit_bio_wait
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	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
	jmp	LBB0_9
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R1BIO_BehindIO,4,2             ## @R1BIO_BehindIO
	.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:
	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
	ldr	x20, [x0, #24]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x21, [x8, w1, sxtw #3]
	ldr	w8, [x21, #16]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w26, [x0]
	mov	w24, #1
	lsl	w22, w24, w8
	ldr	w0, [x21]
	bl	_bdev_logical_block_size
	asr	w1, w0, #9
	mov	x0, x22
	bl	_roundup
	cbz	w26, LBB0_11
; %bb.2:
	mov	x22, x0
	ldr	w25, [x19, #4]
	add	w8, w25, w0
	neg	w9, w0
	and	w8, w8, w9
	add	x23, x19, #16
	sub	w8, w8, w25
	cmp	w8, w26
	csel	w28, w8, w26, lt
Lloh0:
	adrp	x8, _R1BIO_BehindIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R1BIO_BehindIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_test_bit
	mov	w8, #12
	mov	w9, #8
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
Lloh3:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_bio_clone_fast
	mov	x27, x0
Lloh6:
	adrp	x8, _REQ_OP_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_bio_set_op_attrs
	ldp	w9, w8, [x19]
	lsl	w9, w9, #9
	stp	w8, w9, [x27]
	sub	w1, w25, w8
	mov	x0, x27
	mov	x2, x28
	bl	_bio_trim
	ldr	w8, [x21, #8]
	ldr	w9, [x27]
	add	w8, w9, w8
	str	w8, [x27]
	ldr	w1, [x21]
	mov	x0, x27
	bl	_bio_set_dev
	mov	x0, x27
	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, x25
	mov	x2, x28
	mov	w3, #0
	bl	_rdev_set_badblocks
	cmp	x0, #0
	cset	w24, ne
LBB0_6:
	mov	x0, x27
	bl	_bio_put
	mov	x8, x28
	subs	w28, w26, w28
	b.eq	LBB0_11
; %bb.7:
	add	w25, w8, w25
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x27
	bl	_bio_put
	add	w25, w26, w25
	subs	w28, w28, w26
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, w28
	csel	w26, w22, w28, lt
Lloh9:
	adrp	x8, _R1BIO_BehindIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R1BIO_BehindIO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_test_bit
	cmp	x0, #0
	mov	w8, #12
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
Lloh12:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_bio_clone_fast
	mov	x27, x0
Lloh15:
	adrp	x8, _REQ_OP_WRITE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_bio_set_op_attrs
	ldp	w9, w8, [x19]
	lsl	w9, w9, #9
	stp	w8, w9, [x27]
	sub	w1, w25, w8
	mov	x0, x27
	mov	x2, x26
	bl	_bio_trim
	ldr	w8, [x21, #8]
	ldr	w9, [x27]
	add	w8, w9, w8
	str	w8, [x27]
	ldr	w1, [x21]
	mov	x0, x27
	bl	_bio_set_dev
	mov	x0, x27
	bl	_submit_bio_wait
	tbz	x0, #63, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	mov	x1, x25
	mov	x2, x26
	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, #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
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_R1BIO_BehindIO,4,2             ; @R1BIO_BehindIO
	.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
