	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function verify_eraseblock
_verify_eraseblock:                     ## @verify_eraseblock
	.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
	movl	%edi, %r15d
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%rcx), %edx
	movq	_ebcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	_bbt@GOTPCREL(%rip), %r8
	movq	(%r8), %rbx
	movl	%edx, %esi
	imull	%eax, %esi
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx,%rdi,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%edx, %r12d
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_3
## %bb.5:
	movl	%esi, %r12d
LBB0_6:
	movl	4(%rcx), %r13d
	movq	(%r8), %rdi
	movl	%r13d, %ecx
	subl	%esi, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rax), %esi
	movslq	%esi, %rsi
	cmpq	$0, (%rdi,%rsi,8)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	subl	%edx, %r13d
	decq	%rax
	jne	LBB0_7
## %bb.9:
	movl	%ecx, %r13d
	jmp	LBB0_10
LBB0_1:
	movl	4(%rcx), %r13d
	xorl	%r12d, %r12d
LBB0_10:
	movl	%edx, %r14d
	imull	%r15d, %r14d
	movq	_writebuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_rnd_state@GOTPCREL(%rip), %rdi
	callq	_prandom_bytes_state
	movq	_pgcnt@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	$2, (%rcx)
	jl	LBB0_11
## %bb.12:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_pgsize@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	incl	%ebx
	movq	_pgcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, %ebx
	jge	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_mtd@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	_bufsize@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_twopages@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%r12d, %esi
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_29
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r14), %rdi
	movl	(%r15), %edx
	movl	%r13d, %esi
	subl	%edx, %esi
	movl	(%rbx), %ecx
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_29
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rbx), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	(%r14), %rdi
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rbx), %edi
	movq	_pgsize@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rsi
	imulq	%rax, %rsi
	movq	_writebuf@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movl	(%r15), %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movslq	%r14d, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_errcnt@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_18
LBB0_11:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_21
LBB0_19:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	xorl	%eax, %eax
LBB0_20:
	movl	-52(%rbp), %r15d                ## 4-byte Reload
LBB0_21:
	movq	_pgsize@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	addl	%ecx, %ecx
	movl	%r13d, %edx
	subl	%ecx, %edx
	cmpl	%edx, -44(%rbp)                 ## 4-byte Folded Reload
	jg	LBB0_29
## %bb.22:
	movq	_bbt@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r15d, %rdx
	cmpq	$0, 8(%rcx,%rdx,8)
	jne	LBB0_29
## %bb.23:
	movq	_rnd_state@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_bufsize@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_twopages@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	%r12d, %esi
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_29
## %bb.24:
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %edx
	subl	%edx, %r13d
	movl	(%r15), %ecx
	movl	%r13d, %esi
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_29
## %bb.25:
	movl	(%r15), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %edx
	movl	(%r15), %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mtdtest_read
	testl	%eax, %eax
	jne	LBB0_29
## %bb.26:
	movq	_boundary@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax), %rsi
	movq	_writebuf@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movslq	(%r14), %rdx
	subq	%rdx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movslq	(%r14), %rdx
	movq	%rdx, %rsi
	addq	(%r12), %rsi
	movq	_rnd_state@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_prandom_bytes_state
	movl	(%r15), %edi
	movq	(%r12), %rsi
	movl	(%rbx), %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_errcnt@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_28:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_29:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtd,8,3                        ## @mtd
	.comm	_ebcnt,4,2                      ## @ebcnt
	.comm	_bbt,8,3                        ## @bbt
	.comm	_rnd_state,4,2                  ## @rnd_state
	.comm	_writebuf,8,3                   ## @writebuf
	.comm	_pgcnt,4,2                      ## @pgcnt
	.comm	_bufsize,4,2                    ## @bufsize
	.comm	_twopages,4,2                   ## @twopages
	.comm	_pgsize,4,2                     ## @pgsize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: verify failed at %#llx\n"

	.comm	_errcnt,4,2                     ## @errcnt
	.comm	_boundary,8,3                   ## @boundary
	.no_dead_strip	_verify_eraseblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function verify_eraseblock
_verify_eraseblock:                     ; @verify_eraseblock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x0
Lloh0:
	adrp	x24, _mtd@GOTPAGE
Lloh1:
	ldr	x24, [x24, _mtd@GOTPAGEOFF]
	ldr	x9, [x24]
	ldr	w2, [x9]
	mul	w19, w2, w0
Lloh2:
	adrp	x8, _ebcnt@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ebcnt@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #0
	b.le	LBB0_9
; %bb.1:
	mov	w21, #0
Lloh5:
	adrp	x10, _bbt@GOTPAGE
Lloh6:
	ldr	x10, [x10, _bbt@GOTPAGEOFF]
	ldr	x12, [x10]
	mul	w11, w2, w8
	mov	x13, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12]
	cbz	x14, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, w2
	add	x12, x12, #8
	subs	x13, x13, #1
	b.ne	LBB0_2
; %bb.4:
	mov	x21, x11
LBB0_5:
	ldr	w27, [x9, #4]
	ldr	x10, [x10]
	sub	w9, w27, w11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w11, w8, #1
	ldr	x11, [x10, w11, sxtw #3]
	cbz	x11, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w27, w27, w2
	subs	x8, x8, #1
	b.ne	LBB0_6
; %bb.8:
	mov	x27, x9
	b	LBB0_10
LBB0_9:
	mov	w21, #0
	ldr	w27, [x9, #4]
LBB0_10:
Lloh7:
	adrp	x8, _writebuf@GOTPAGE
Lloh8:
	ldr	x8, [x8, _writebuf@GOTPAGEOFF]
Lloh9:
	ldr	x1, [x8]
Lloh10:
	adrp	x22, _rnd_state@GOTPAGE
Lloh11:
	ldr	x22, [x22, _rnd_state@GOTPAGEOFF]
	mov	x0, x22
	bl	_prandom_bytes_state
Lloh12:
	adrp	x28, _pgcnt@GOTPAGE
Lloh13:
	ldr	x28, [x28, _pgcnt@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh14:
	adrp	x25, _pgsize@GOTPAGE
Lloh15:
	ldr	x25, [x25, _pgsize@GOTPAGEOFF]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.11:
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	mov	w22, #0
Lloh16:
	adrp	x20, _bufsize@GOTPAGE
Lloh17:
	ldr	x20, [x20, _bufsize@GOTPAGEOFF]
Lloh18:
	adrp	x23, _twopages@GOTPAGE
Lloh19:
	ldr	x23, [x23, _twopages@GOTPAGEOFF]
Lloh20:
	adrp	x26, _errcnt@GOTPAGE
Lloh21:
	ldr	x26, [x26, _errcnt@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w22, w22, #1
	ldr	w8, [x25]
	add	w19, w8, w19
	ldr	w8, [x28]
	sub	w8, w8, #1
	cmp	w22, w8
	b.ge	LBB0_19
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	w2, [x20]
	ldr	w3, [x23]
	mov	x1, x21
	bl	_mtdtest_read
	cbnz	w0, LBB0_29
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x24]
	ldr	w2, [x20]
	sub	w1, w27, w2
	ldr	w3, [x23]
	bl	_mtdtest_read
	cbnz	w0, LBB0_29
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x23]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_memset
	ldr	x0, [x24]
	ldr	w2, [x20]
	ldr	w3, [x23]
	mov	x1, x19
	bl	_mtdtest_read
	cbnz	w0, LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x23]
Lloh22:
	adrp	x8, _writebuf@GOTPAGE
Lloh23:
	ldr	x8, [x8, _writebuf@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldrsw	x9, [x25]
	sxtw	x10, w22
	madd	x1, x9, x10, x8
	ldr	w2, [x20]
	bl	_memcmp
	cbz	x0, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	sxtw	x1, w19
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	add	w8, w8, #1
	str	w8, [x26]
	b	LBB0_12
LBB0_18:
	mov	w0, #0
	b	LBB0_21
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
Lloh27:
	adrp	x22, _rnd_state@GOTPAGE
Lloh28:
	ldr	x22, [x22, _rnd_state@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x25]
	sub	w8, w27, w8, lsl #1
	cmp	w19, w8
	b.gt	LBB0_29
; %bb.22:
Lloh29:
	adrp	x8, _bbt@GOTPAGE
Lloh30:
	ldr	x8, [x8, _bbt@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	add	w9, w20, #1
	ldr	x8, [x8, w9, sxtw #3]
	cbnz	x8, LBB0_29
; %bb.23:
	ldr	w22, [x22]
	ldr	x0, [x24]
Lloh32:
	adrp	x23, _bufsize@GOTPAGE
Lloh33:
	ldr	x23, [x23, _bufsize@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh34:
	adrp	x26, _twopages@GOTPAGE
Lloh35:
	ldr	x26, [x26, _twopages@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x1, x21
	bl	_mtdtest_read
	cbnz	w0, LBB0_29
; %bb.24:
	ldr	x0, [x24]
	ldr	w2, [x23]
	sub	w1, w27, w2
	ldr	w3, [x26]
	bl	_mtdtest_read
	cbnz	w0, LBB0_29
; %bb.25:
	ldr	w0, [x26]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_memset
	ldr	x0, [x24]
	ldr	w2, [x23]
	ldr	w3, [x26]
	mov	x1, x19
	bl	_mtdtest_read
	cbnz	w0, LBB0_29
; %bb.26:
Lloh36:
	adrp	x21, _boundary@GOTPAGE
Lloh37:
	ldr	x21, [x21, _boundary@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh38:
	adrp	x8, _writebuf@GOTPAGE
Lloh39:
	ldr	x8, [x8, _writebuf@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	ldr	x9, [x24]
	ldrsw	x9, [x9]
	ldrsw	x2, [x25]
	add	x8, x8, x9
	sub	x1, x8, x2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	ldr	x8, [x21]
	ldrsw	x2, [x25]
	add	x1, x8, x2
Lloh41:
	adrp	x20, _rnd_state@GOTPAGE
Lloh42:
	ldr	x20, [x20, _rnd_state@GOTPAGEOFF]
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_prandom_bytes_state
	ldr	w0, [x26]
	ldr	x1, [x21]
	ldr	w2, [x23]
	bl	_memcmp
	cbz	x0, LBB0_28
; %bb.27:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x1, w19
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh45:
	adrp	x8, _errcnt@GOTPAGE
Lloh46:
	ldr	x8, [x8, _errcnt@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_28:
	mov	w0, #0
	str	w22, [x20]
LBB0_29:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_mtd,8,3                        ; @mtd
	.comm	_ebcnt,4,2                      ; @ebcnt
	.comm	_bbt,8,3                        ; @bbt
	.comm	_rnd_state,4,2                  ; @rnd_state
	.comm	_writebuf,8,3                   ; @writebuf
	.comm	_pgcnt,4,2                      ; @pgcnt
	.comm	_bufsize,4,2                    ; @bufsize
	.comm	_twopages,4,2                   ; @twopages
	.comm	_pgsize,4,2                     ; @pgsize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: verify failed at %#llx\n"

	.comm	_errcnt,4,2                     ; @errcnt
	.comm	_boundary,8,3                   ; @boundary
	.no_dead_strip	_verify_eraseblock
.subsections_via_symbols
