	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_cached_read
_do_cached_read:                        ## @do_cached_read
	.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	%rcx, %r15
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	32(%rdi), %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r13d
	movq	_MTD_DEBUG_LEVEL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rcx
	movl	%r12d, %r8d
	callq	_DEBUG
	testq	%r13, %r13
	je	LBB0_14
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jg	LBB0_2
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	24(%rcx), %rdx
	movq	%r15, %rdi
	movq	%rdx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movl	%r14d, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %r15
	addq	%rax, %rbx
	subl	%r14d, %r12d
	jle	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r14d
	subl	%edx, %r14d
	cmpl	%r12d, %r14d
	cmovael	%r12d, %r14d
	movq	8(%rcx), %rax
	movq	_STATE_EMPTY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rax
	subq	%rdx, %rax
	cmpq	%rax, 16(%rcx)
	je	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rsi
	movl	%r14d, %edx
	leaq	-64(%rbp), %rcx
	movq	%r15, %r8
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	cmpq	%rax, -64(%rbp)
	je	LBB0_8
## %bb.12:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_14:
	leaq	-64(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	movq	%r15, %r8
	callq	*(%r14)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_DEBUG_LEVEL2,4,2           ## @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n"

	.comm	_STATE_EMPTY,8,3                ## @STATE_EMPTY
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_do_cached_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_cached_read
_do_cached_read:                        ; @do_cached_read
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x22, [x0, #32]
	ldr	w25, [x0]
Lloh0:
	adrp	x8, _MTD_DEBUG_LEVEL2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL2@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x22, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	mov	x4, x20
	bl	_DEBUG
	cbz	w25, LBB0_11
; %bb.1:
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.2:
Lloh5:
	adrp	x26, _STATE_EMPTY@GOTPAGE
Lloh6:
	ldr	x26, [x26, _STATE_EMPTY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x23, #24]
	add	x1, x9, x8
	mov	x0, x19
	mov	x2, x24
	bl	_memcpy
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x19, x19, x24
	add	x21, x21, x24
	sub	w20, w20, w24
	cmp	w20, #0
	b.le	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	udiv	x8, x21, x25
	msub	x8, x8, x25, x21
	sub	w9, w25, w8
	cmp	w9, w20
	csel	w24, w9, w20, lo
	ldr	x9, [x23, #8]
	ldr	x10, [x26]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x23, #16]
	sub	x10, x21, x8
	cmp	x9, x10
	b.eq	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22]
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	mov	x4, x19
	blr	x8
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #8]
	cmp	x8, x24
	b.eq	LBB0_4
; %bb.9:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	ldr	x8, [x22]
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x4, x19
	blr	x8
LBB0_12:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_DEBUG_LEVEL2,4,2           ; @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n"

	.comm	_STATE_EMPTY,8,3                ; @STATE_EMPTY
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_do_cached_read
.subsections_via_symbols
