	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cached_dev_write
_cached_dev_write:                      ## @cached_dev_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	%rsi, %r13
	movq	%rdi, %r12
	leaq	48(%rsi), %r14
	movl	4(%rdi), %edi
	movl	72(%rsi), %esi
	xorl	%edx, %edx
	callq	_KEY
	movl	%eax, -56(%rbp)
	movl	4(%r12), %ebx
	movq	%r14, %rdi
	callq	_bio_end_sector
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_KEY
	movl	%eax, -48(%rbp)
	movq	16(%r13), %rdi
	leaq	-56(%rbp), %rbx
	leaq	-48(%rbp), %r15
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_bch_keybuf_check_overlapping
	leaq	16(%r12), %rdi
	callq	_down_read_non_owner
	leaq	12(%r12), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_bch_keybuf_check_overlapping
	movabsq	$4294967296, %rcx               ## imm = 0x100000000
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rcx, (%r13)
LBB0_2:
	movq	%r14, %rdi
	callq	_bio_op
	movq	_REQ_OP_DISCARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	$1, (%r13)
LBB0_4:
	leaq	80(%r13), %r15
	movq	40(%r13), %rbx
	movq	%r12, %rdi
	callq	_cache_mode
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_should_writeback
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%r13)
LBB0_10:
	movq	%r12, %rdi
	callq	_bch_writeback_add
	movq	%r14, 24(%r13)
	movq	_REQ_PREFLUSH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, 48(%r13)
	je	LBB0_17
## %bb.11:
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_bio_alloc_bioset
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_bio_copy_dev
	movq	_backing_request_endio@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r12)
	movq	%r15, 16(%r12)
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rbx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	16(%r13), %rdi
	movq	%r12, %rsi
	jmp	LBB0_16
LBB0_6:
	cmpl	$0, (%r13)
	je	LBB0_9
## %bb.7:
	movq	40(%r13), %rdi
	movq	%rdi, 24(%r13)
	callq	_bio_get
	movq	%r14, %rdi
	callq	_bio_op
	movq	_REQ_OP_DISCARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:
	movl	8(%r12), %edi
	callq	_bdev_get_queue
	movl	%eax, %edi
	callq	_blk_queue_discard
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_17
LBB0_12:
	movq	_BLK_STS_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	jmp	LBB0_17
LBB0_9:
	cmpl	$0, 4(%r13)
	jne	LBB0_10
## %bb.14:
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_bio_clone_fast
	movq	%rax, 24(%r13)
LBB0_15:
	movq	_backing_request_endio@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 56(%r13)
	movq	16(%r13), %rdi
	movq	%r14, %rsi
LBB0_16:
	movq	%r15, %rdx
	callq	_closure_bio_submit
LBB0_17:
	addq	$8, %r13
	movq	_bch_data_insert@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_closure_call
	movq	_cached_dev_write_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_continue_at
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REQ_OP_DISCARD,8,3             ## @REQ_OP_DISCARD
	.comm	_backing_request_endio,8,3      ## @backing_request_endio
	.comm	_REQ_PREFLUSH,4,2               ## @REQ_PREFLUSH
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_BLK_STS_RESOURCE,4,2           ## @BLK_STS_RESOURCE
	.comm	_REQ_OP_WRITE,4,2               ## @REQ_OP_WRITE
	.comm	_bch_data_insert,4,2            ## @bch_data_insert
	.comm	_cached_dev_write_complete,4,2  ## @cached_dev_write_complete
	.no_dead_strip	_cached_dev_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cached_dev_write
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cached_dev_write:                      ; @cached_dev_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	mov	x22, x0
	add	x20, x1, #48
	ldr	w0, [x0, #4]
	ldr	w1, [x1, #72]
	mov	w2, #0
	bl	_KEY
	str	w0, [sp, #8]
	ldr	w21, [x22, #4]
	mov	x0, x20
	bl	_bio_end_sector
	mov	x1, x0
	mov	x0, x21
	mov	w2, #0
	bl	_KEY
	str	w0, [sp]
	ldr	x0, [x19, #16]
	add	x1, sp, #8
	mov	x2, sp
	bl	_bch_keybuf_check_overlapping
	add	x0, x22, #16
	bl	_down_read_non_owner
	add	x0, x22, #12
	add	x1, sp, #8
	mov	x2, sp
	bl	_bch_keybuf_check_overlapping
	adrp	x25, lCPI0_0@PAGE
	cbz	x0, LBB0_2
; %bb.1:
	ldr	d0, [x25, lCPI0_0@PAGEOFF]
	str	d0, [x19]
LBB0_2:
	add	x21, x19, #80
	mov	x0, x20
	bl	_bio_op
Lloh0:
	adrp	x24, _REQ_OP_DISCARD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _REQ_OP_DISCARD@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	ldr	x23, [x19, #40]
	mov	x0, x22
	bl	_cache_mode
	mov	x2, x0
	ldr	w3, [x19]
	mov	x0, x22
	mov	x1, x23
	bl	_should_writeback
	cbz	x0, LBB0_9
; %bb.5:
	ldr	d0, [x25, lCPI0_0@PAGEOFF]
	str	d0, [x19]
LBB0_6:
	mov	x0, x22
	bl	_bch_writeback_add
	str	x20, [x19, #24]
	ldr	w8, [x19, #48]
Lloh2:
	adrp	x23, _REQ_PREFLUSH@GOTPAGE
Lloh3:
	ldr	x23, [x23, _REQ_PREFLUSH@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.7:
Lloh4:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	w1, #0
	mov	x2, x22
	bl	_bio_alloc_bioset
	cbz	x0, LBB0_12
; %bb.8:
	mov	x22, x0
	mov	x1, x20
	bl	_bio_copy_dev
Lloh7:
	adrp	x8, _backing_request_endio@GOTPAGE
Lloh8:
	ldr	x8, [x8, _backing_request_endio@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _REQ_OP_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _REQ_OP_WRITE@GOTPAGEOFF]
	stp	x8, x21, [x22, #8]
Lloh12:
	ldr	w8, [x9]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x22]
	ldr	x0, [x19, #16]
	mov	x1, x22
	b	LBB0_16
LBB0_9:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.10:
	ldr	x0, [x19, #40]
	str	x0, [x19, #24]
	bl	_bio_get
	mov	x0, x20
	bl	_bio_op
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.11:
	ldr	w0, [x22, #8]
	bl	_bdev_get_queue
	bl	_blk_queue_discard
	cbnz	w0, LBB0_15
	b	LBB0_17
LBB0_12:
Lloh13:
	adrp	x8, _BLK_STS_RESOURCE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLK_STS_RESOURCE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	b	LBB0_17
LBB0_13:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_6
; %bb.14:
Lloh16:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_bio_clone_fast
	str	x0, [x19, #24]
LBB0_15:
Lloh19:
	adrp	x8, _backing_request_endio@GOTPAGE
Lloh20:
	ldr	x8, [x8, _backing_request_endio@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x8, [x19, #56]
	ldr	x0, [x19, #16]
	mov	x1, x20
LBB0_16:
	mov	x2, x21
	bl	_closure_bio_submit
LBB0_17:
	add	x0, x19, #8
Lloh22:
	adrp	x8, _bch_data_insert@GOTPAGE
Lloh23:
	ldr	x8, [x8, _bch_data_insert@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x2, #0
	mov	x3, x21
	bl	_closure_call
Lloh25:
	adrp	x8, _cached_dev_write_complete@GOTPAGE
Lloh26:
	ldr	x8, [x8, _cached_dev_write_complete@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_continue_at
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_REQ_OP_DISCARD,8,3             ; @REQ_OP_DISCARD
	.comm	_backing_request_endio,8,3      ; @backing_request_endio
	.comm	_REQ_PREFLUSH,4,2               ; @REQ_PREFLUSH
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_BLK_STS_RESOURCE,4,2           ; @BLK_STS_RESOURCE
	.comm	_REQ_OP_WRITE,4,2               ; @REQ_OP_WRITE
	.comm	_bch_data_insert,4,2            ; @bch_data_insert
	.comm	_cached_dev_write_complete,4,2  ; @cached_dev_write_complete
	.no_dead_strip	_cached_dev_write
.subsections_via_symbols
