	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_page
_read_page:                             ## @read_page
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_2:
	movq	_mtd@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	$8, %rsi
	leaq	-32(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	movq	_offset@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	(%rdi), %rdx
	movq	_rbuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-40(%rbp), %rcx
	callq	_mtd_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	_EUCLEAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_5
LBB0_4:
	movq	(%r14), %rax
	movl	8(%rax), %ebx
	subl	-32(%rbp), %ebx
LBB0_5:
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.6:
	movq	-40(%rbp), %rax
	movq	(%r14), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	(%r15), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_9:
	movq	(%r15), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read_page\n"

	.comm	_mtd,8,3                        ## @mtd
	.comm	_offset,8,3                     ## @offset
	.comm	_rbuffer,4,2                    ## @rbuffer
	.comm	_EUCLEAN,4,2                    ## @EUCLEAN
L_.str.1:                               ## @.str.1
	.asciz	"error: read failed at %#llx\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_read_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_page
_read_page:                             ; @read_page
	.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
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_2:
Lloh2:
	adrp	x20, _mtd@GOTPAGE
Lloh3:
	ldr	x20, [x20, _mtd@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #8
	mov	x0, sp
	mov	w2, #4
	bl	_memcpy
Lloh4:
	adrp	x21, _offset@GOTPAGE
Lloh5:
	ldr	x21, [x21, _offset@GOTPAGEOFF]
	ldr	x0, [x20]
	ldr	x1, [x21]
	ldr	x2, [x0]
Lloh6:
	adrp	x8, _rbuffer@GOTPAGE
Lloh7:
	ldr	x8, [x8, _rbuffer@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	add	x3, sp, #8
	bl	_mtd_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x19, x0
Lloh9:
	adrp	x8, _EUCLEAN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EUCLEAN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_5
LBB0_4:
	ldr	x8, [x20]
	ldr	w8, [x8, #8]
	ldr	w9, [sp]
	sub	w19, w8, w9
LBB0_5:
	tbnz	w19, #31, LBB0_8
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.7:
	ldr	x1, [x21]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_9
LBB0_8:
	ldr	x1, [x21]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_9:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read_page\n"

	.comm	_mtd,8,3                        ; @mtd
	.comm	_offset,8,3                     ; @offset
	.comm	_rbuffer,4,2                    ; @rbuffer
	.comm	_EUCLEAN,4,2                    ; @EUCLEAN
l_.str.1:                               ; @.str.1
	.asciz	"error: read failed at %#llx\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_read_page
.subsections_via_symbols
