	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function end_sync_write
_end_sync_write:                        ## @end_sync_write
	.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	%rdi, %r13
	callq	_get_resync_r10bio
	movq	%rax, %r12
	movq	16(%rax), %r14
	movq	(%r14), %rbx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r13, %rdx
	callq	_find_bio_disk
	cmpl	$0, -44(%rbp)
	movq	(%rbx), %rcx
	cltq
	je	LBB0_1
## %bb.5:
	shlq	$4, %rax
	movq	8(%rcx,%rax), %r15
	cmpq	$0, (%r13)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_md_error
	jmp	LBB0_10
LBB0_1:
	shlq	$4, %rax
	movq	(%rcx,%rax), %r15
	cmpq	$0, (%r13)
	je	LBB0_7
## %bb.2:
	movq	_WriteErrorSeen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_WantReplacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_MD_RECOVERY_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	callq	_set_bit
LBB0_4:
	movq	_R10BIO_WriteError@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	8(%r12), %rax
	movslq	-48(%rbp), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	4(%r12), %edx
	leaq	-56(%rbp), %rcx
	leaq	-52(%rbp), %r8
	movq	%r15, %rdi
	callq	_is_badblock
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	_R10BIO_MadeGood@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
LBB0_10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rdev_dec_pending
	movq	%r12, %rdi
	callq	_end_sync_request
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WriteErrorSeen,4,2             ## @WriteErrorSeen
	.comm	_WantReplacement,4,2            ## @WantReplacement
	.comm	_MD_RECOVERY_NEEDED,4,2         ## @MD_RECOVERY_NEEDED
	.comm	_R10BIO_WriteError,4,2          ## @R10BIO_WriteError
	.comm	_R10BIO_MadeGood,4,2            ## @R10BIO_MadeGood
	.no_dead_strip	_end_sync_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function end_sync_write
_end_sync_write:                        ; @end_sync_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x0
	bl	_get_resync_r10bio
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x21, [x20]
	add	x3, sp, #4
	mov	x4, sp
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_find_bio_disk
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w10, [sp]
	ldr	x8, [x21]
	sxtw	x9, w0
	cbz	w10, LBB0_3
; %bb.1:
	add	x8, x8, x9, lsl #4
	ldr	x21, [x8, #8]
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_md_error
	b	LBB0_10
LBB0_3:
	lsl	x9, x9, #4
	ldr	x21, [x8, x9]
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _WriteErrorSeen@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WriteErrorSeen@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x22, x21, #8
	mov	x1, x22
	bl	_set_bit
Lloh3:
	adrp	x8, _WantReplacement@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WantReplacement@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_and_set_bit
	cbnz	w0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _MD_RECOVERY_NEEDED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MD_RECOVERY_NEEDED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x1, [x21]
	bl	_set_bit
LBB0_6:
Lloh9:
	adrp	x8, _R10BIO_WriteError@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R10BIO_WriteError@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19, #8]
	ldrsw	x9, [sp, #4]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [x19, #4]
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x21
	bl	_is_badblock
	cbz	x0, LBB0_10
; %bb.8:
Lloh11:
	adrp	x8, _R10BIO_MadeGood@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R10BIO_MadeGood@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_rdev_dec_pending
	mov	x0, x19
	bl	_end_sync_request
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_WriteErrorSeen,4,2             ; @WriteErrorSeen
	.comm	_WantReplacement,4,2            ; @WantReplacement
	.comm	_MD_RECOVERY_NEEDED,4,2         ; @MD_RECOVERY_NEEDED
	.comm	_R10BIO_WriteError,4,2          ; @R10BIO_WriteError
	.comm	_R10BIO_MadeGood,4,2            ; @R10BIO_MadeGood
	.no_dead_strip	_end_sync_write
.subsections_via_symbols
