	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_cached_data
_write_cached_data:                     ## @write_cached_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rcx
	movq	_STATE_DIRTY@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	_MTD_DEBUG_LEVEL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	movl	12(%rbx), %r8d
	movl	16(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_DEBUG
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%r14, %rdi
	callq	_erase_write
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_STATE_EMPTY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_DIRTY,8,3                ## @STATE_DIRTY
	.comm	_MTD_DEBUG_LEVEL2,4,2           ## @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtdblock: writing cached data for \"%s\" at 0x%lx, size 0x%x\n"

	.comm	_STATE_EMPTY,8,3                ## @STATE_EMPTY
	.no_dead_strip	_write_cached_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_cached_data
_write_cached_data:                     ; @write_cached_data
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _STATE_DIRTY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATE_DIRTY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #24]
Lloh3:
	adrp	x8, _MTD_DEBUG_LEVEL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL2@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w2, [x20]
	ldp	w4, w3, [x19, #12]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DEBUG
	ldp	w2, w1, [x19, #12]
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_erase_write
	cbnz	w0, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _STATE_EMPTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STATE_EMPTY@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_DIRTY,8,3                ; @STATE_DIRTY
	.comm	_MTD_DEBUG_LEVEL2,4,2           ; @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtdblock: writing cached data for \"%s\" at 0x%lx, size 0x%x\n"

	.comm	_STATE_EMPTY,8,3                ; @STATE_EMPTY
	.no_dead_strip	_write_cached_data
.subsections_via_symbols
