	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_eraseblock_by_page
_read_eraseblock_by_page:               ## @read_eraseblock_by_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_pgcnt@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_1
## %bb.2:
	movl	%edi, %r14d
	movq	_iobuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	imull	(%rdi), %r14d
	movq	_pgsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	%r14d, %esi
	movq	%rbx, %rcx
	callq	_mtdtest_read
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r13d
	cmpl	(%r12), %r13d
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_pgsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%rdx, %rbx
	addl	%edx, %r14d
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r14d, %esi
	movq	%rbx, %rcx
	callq	_mtdtest_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movl	%eax, %r15d
	jmp	LBB0_7
LBB0_1:
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtd,8,3                        ## @mtd
	.comm	_iobuf,8,3                      ## @iobuf
	.comm	_pgcnt,4,2                      ## @pgcnt
	.comm	_pgsize,8,3                     ## @pgsize
	.no_dead_strip	_read_eraseblock_by_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_eraseblock_by_page
_read_eraseblock_by_page:               ; @read_eraseblock_by_page
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x21, _pgcnt@GOTPAGE
Lloh1:
	ldr	x21, [x21, _pgcnt@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _iobuf@GOTPAGE
Lloh3:
	ldr	x8, [x8, _iobuf@GOTPAGEOFF]
Lloh4:
	ldr	x19, [x8]
Lloh5:
	adrp	x22, _mtd@GOTPAGE
Lloh6:
	ldr	x22, [x22, _mtd@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w9, [x8]
	mul	w20, w9, w0
Lloh7:
	adrp	x23, _pgsize@GOTPAGE
Lloh8:
	ldr	x23, [x23, _pgsize@GOTPAGEOFF]
	ldr	x2, [x23]
	mov	x0, x8
	mov	x1, x20
	mov	x3, x19
	bl	_mtdtest_read
	cbnz	w0, LBB0_6
; %bb.2:
	mov	w24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w24, w24, #1
	ldr	w8, [x21]
	cmp	w24, w8
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x23]
	add	x19, x19, x2
	add	w20, w20, w2
	ldr	x0, [x22]
	mov	x1, x20
	mov	x3, x19
	bl	_mtdtest_read
	cbz	w0, LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_mtd,8,3                        ; @mtd
	.comm	_iobuf,8,3                      ; @iobuf
	.comm	_pgcnt,4,2                      ; @pgcnt
	.comm	_pgsize,8,3                     ; @pgsize
	.no_dead_strip	_read_eraseblock_by_page
.subsections_via_symbols
