	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function verify_eraseblock2
_verify_eraseblock2:                    ## @verify_eraseblock2
	.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	_mtd@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, %ebx
	imull	%edi, %ebx
	incl	%edi
	movq	_subpgsize@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leal	(%rdx,%rbx), %ecx
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	imull	%edi, %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	%eax, %ecx
	jg	LBB0_12
## %bb.1:
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%r14), %r12d
	movq	_writebuf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_rnd_state@GOTPCREL(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_prandom_bytes_state
	movq	_readbuf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	imull	%r12d, %esi
	callq	_clear_data
	movq	(%r15), %rdi
	movq	%r13, %r15
	movl	(%r13), %edx
	imull	%r12d, %edx
	movq	_readbuf@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ebx, %esi
	leaq	-56(%rbp), %rcx
	callq	_mtd_read
	movb	$1, %cl
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r15), %rax
	movslq	%r12d, %rcx
	imulq	%rax, %rcx
	cmpq	%rcx, -56(%rbp)
	setne	%cl
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%cl, %edi
	callq	_unlikely
	movslq	%ebx, %r13
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_mtd_is_bitflip
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r15), %rax
	movslq	%r12d, %rcx
	imulq	%rax, %rcx
	cmpq	%rcx, -56(%rbp)
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_pr_info
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_readbuf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_writebuf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r15), %edx
	imull	%r12d, %edx
	callq	_memcmp
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	callq	_pr_err
	movq	_errcnt@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$33, %r14d
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
	movl	(%r15), %edx
	imull	%edx, %r12d
	addl	%ebx, %r12d
	movq	_mtd@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	imull	%r14d, %edx
	leal	(%rdx,%r12), %ecx
	movl	(%rax), %eax
	imull	-48(%rbp), %eax                 ## 4-byte Folded Reload
	incl	%r14d
	movl	%r12d, %ebx
	cmpl	%eax, %ecx
	jle	LBB0_2
	jmp	LBB0_12
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_pr_err
	xorl	%eax, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$1, %ecx
	sbbl	%eax, %eax
	orl	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
LBB0_12:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	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	_subpgsize,4,2                  ## @subpgsize
	.comm	_rnd_state,4,2                  ## @rnd_state
	.comm	_writebuf,4,2                   ## @writebuf
	.comm	_readbuf,4,2                    ## @readbuf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ECC correction at %#llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"error: read failed at %#llx\n"

L_.str.2:                               ## @.str.2
	.asciz	"error: verify failed at %#llx\n"

	.comm	_errcnt,4,2                     ## @errcnt
	.no_dead_strip	_verify_eraseblock2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function verify_eraseblock2
_verify_eraseblock2:                    ; @verify_eraseblock2
	.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
Lloh0:
	adrp	x24, _mtd@GOTPAGE
Lloh1:
	ldr	x24, [x24, _mtd@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	w8, [x8]
	mul	w19, w8, w0
	add	w25, w0, #1
Lloh2:
	adrp	x26, _subpgsize@GOTPAGE
Lloh3:
	ldr	x26, [x26, _subpgsize@GOTPAGEOFF]
	ldr	w2, [x26]
	mul	w8, w8, w25
	add	w9, w2, w19
	cmp	w9, w8
	b.le	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_14
LBB0_2:
	mov	w27, #2
Lloh4:
	adrp	x28, _writebuf@GOTPAGE
Lloh5:
	ldr	x28, [x28, _writebuf@GOTPAGEOFF]
Lloh6:
	adrp	x22, _readbuf@GOTPAGE
Lloh7:
	ldr	x22, [x22, _readbuf@GOTPAGEOFF]
Lloh8:
	adrp	x21, _errcnt@GOTPAGE
Lloh9:
	ldr	x21, [x21, _errcnt@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w20, w27, #1
	ldr	w1, [x28]
Lloh10:
	adrp	x0, _rnd_state@GOTPAGE
Lloh11:
	ldr	x0, [x0, _rnd_state@GOTPAGEOFF]
	bl	_prandom_bytes_state
	ldr	w0, [x22]
	ldr	w8, [x26]
	mul	w1, w8, w20
	bl	_clear_data
	ldr	x0, [x24]
	ldr	w8, [x26]
	mul	w2, w8, w20
	ldr	w4, [x22]
	add	x3, sp, #8
	mov	x1, x19
	bl	_mtd_read
	mov	x23, x0
	cbz	w0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_6
	b	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	ldrsw	x9, [x26]
	mov	x10, x20
	sxtw	x10, w10
	mul	x9, x9, x10
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_mtd_is_bitflip
	cbz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	ldrsw	x9, [x26]
	sxtw	x10, w20
	mul	x9, x9, x10
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x1, w19
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	w23, #0
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	ldr	w1, [x28]
	ldr	w8, [x26]
	mul	w2, w8, w20
	bl	_memcmp
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x19
	sxtw	x1, w8
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w27, #33
	b.eq	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	madd	w19, w8, w20, w19
	ldr	x9, [x24]
	ldr	w9, [x9]
	mul	w2, w8, w27
	mul	w8, w9, w25
	add	w27, w27, #1
	add	w9, w2, w19
	cmp	w9, w8
	b.le	LBB0_3
	b	LBB0_14
LBB0_13:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x1, w19
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	cmp	w23, #0
	csinv	w23, w23, wzr, ne
LBB0_14:
	mov	x0, x23
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_mtd,8,3                        ; @mtd
	.comm	_subpgsize,4,2                  ; @subpgsize
	.comm	_rnd_state,4,2                  ; @rnd_state
	.comm	_writebuf,4,2                   ; @writebuf
	.comm	_readbuf,4,2                    ; @readbuf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ECC correction at %#llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"error: read failed at %#llx\n"

l_.str.2:                               ; @.str.2
	.asciz	"error: verify failed at %#llx\n"

	.comm	_errcnt,4,2                     ; @errcnt
	.no_dead_strip	_verify_eraseblock2
.subsections_via_symbols
