	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function block2mtd_read
_block2mtd_read:                        ## @block2mtd_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r9
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%esi, %r10d
	sarl	%cl, %r10d
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movslq	(%rdi), %rax
	cmpl	%esi, %eax
	jge	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	8(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r14
	movslq	%esi, %r12
	leaq	(%r12,%rdx), %rcx
	movl	%eax, %edi
	subl	%esi, %edi
	cmpq	%rax, %rcx
	movslq	%edi, %r15
	cmovbeq	%rdx, %r15
	testq	%r9, %r9
	je	LBB0_5
## %bb.4:
	movq	$0, (%r9)
LBB0_5:
	testq	%r15, %r15
	je	LBB0_6
## %bb.8:
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%r10d, %ebx
	movl	%r10d, %esi
	callq	_page_read
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	%rax, %r13
	movq	%r14, %rcx
	decq	%r14
	andq	%r12, %r14
	leaq	(%r15,%r14), %rax
	movl	%ecx, %r12d
	subl	%r14d, %r12d
	cmpq	%rcx, %rax
	cmovbel	%r15d, %r12d
	movslq	%r12d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	subq	%rax, %r15
	incl	%ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rdi
	callq	_page_address
	addq	%rax, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movq	%r13, %rdi
	callq	_page_cache_release
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	addq	%rcx, (%rax)
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	testq	%r15, %r15
	je	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	movl	%r15d, %r12d
	cmoval	%eax, %r12d
	movslq	%r12d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	subq	%rax, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_page_read
	movq	%rax, %r13
	incl	%ebx
	movl	$0, %r14d
	testq	%rax, %rax
	jne	LBB0_10
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r13, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_block2mtd_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function block2mtd_read
_block2mtd_read:                        ; @block2mtd_read
	.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
	ldrsw	x9, [x0]
	cmp	w9, w1
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_2:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	ldr	x24, [x0, #8]
Lloh2:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldrsw	x26, [x10]
	add	x10, x2, w1, sxtw
	sub	w11, w9, w1
	sxtw	x11, w11
	cmp	x10, x9
	csel	x25, x11, x2, hi
	cbz	x3, LBB0_4
; %bb.3:
	str	xzr, [x20]
LBB0_4:
	cbz	x25, LBB0_14
; %bb.5:
	asr	w23, w21, w8
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x23
	bl	_page_read
	cbz	x0, LBB0_12
; %bb.6:
	mov	x22, x0
	sub	x8, x26, #1
	sxtw	x9, w21
	and	x28, x8, x9
	sub	w8, w26, w28
	add	x9, x25, x28
	cmp	x9, x26
	csel	w8, w8, w25, hi
	sxtw	x27, w8
	sub	x26, x25, x27
	add	w21, w23, #1
	mov	x23, x8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_IS_ERR
	cbnz	x0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_page_address
	add	x1, x0, x28
	mov	x0, x19
	mov	x2, x23
	bl	_memcpy
	mov	x0, x22
	bl	_page_cache_release
	cbz	x20, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20]
	add	x8, x8, x27
	str	x8, [x20]
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x26, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x19, x19, x27, lsl #2
Lloh8:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldrsw	x8, [x8]
	cmp	x26, x8
	csel	w23, w8, w26, hi
	sxtw	x27, w23
	sub	x26, x26, x27
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x21
	bl	_page_read
	mov	x22, x0
	mov	x28, #0
	add	w21, w21, #1
	cbnz	x0, LBB0_7
LBB0_12:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
LBB0_16:
	mov	x0, x22
	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
	b	_PTR_ERR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_block2mtd_read
.subsections_via_symbols
