	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtdtest_scan_for_bad_eraseblocks ## -- Begin function mtdtest_scan_for_bad_eraseblocks
	.p2align	4, 0x90
_mtdtest_scan_for_bad_eraseblocks:      ## @mtdtest_scan_for_bad_eraseblocks
	.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	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_mtd_can_have_bb
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_info
	movl	$0, %ebx
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r13), %esi
	movq	%r14, %rdi
	callq	_is_block_bad
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	setne	(%r12,%r15)
	addl	%ecx, %ebx
	xorl	%eax, %eax
	callq	_cond_resched
	incq	%r15
	cmpq	%r15, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_3
## %bb.4:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_6:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scanning for bad eraseblocks\n"

L_.str.1:                               ## @.str.1
	.asciz	"scanned %d eraseblocks, %d are bad\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtdtest_scan_for_bad_eraseblocks ; -- Begin function mtdtest_scan_for_bad_eraseblocks
	.p2align	2
_mtdtest_scan_for_bad_eraseblocks:      ; @mtdtest_scan_for_bad_eraseblocks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_mtd_can_have_bb
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	cmp	w19, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w23, #0
	mov	w24, w19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_is_block_bad
	cmp	x0, #0
	cset	w8, ne
	strb	w8, [x21], #1
	cinc	w23, w23, ne
	bl	_cond_resched
	add	w20, w20, #1
	subs	x24, x24, #1
	b.ne	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w19, #0
	mov	w23, #0
LBB0_5:
	stp	x19, x23, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scanning for bad eraseblocks\n"

l_.str.1:                               ; @.str.1
	.asciz	"scanned %d eraseblocks, %d are bad\n"

.subsections_via_symbols
