	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scan_block_fast
_scan_block_fast:                       ## @scan_block_fast
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_nand_to_mtd
	movq	%rax, %rbx
	movl	4(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%r12, -72(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -88(%rbp)
	movq	_MTD_OPS_PLACE_OOB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_nand_bbm_get_next_page
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rbx), %rax
	movslq	%r15d, %rsi
	imulq	%rax, %rsi
	addq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	leaq	-96(%rbp), %rdx
	callq	_mtd_read_oob
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_mtd_is_bitflip_or_eccerr
	testl	%eax, %eax
	je	LBB0_8
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_check_short_pattern
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_nand_bbm_get_next_page
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_2
LBB0_7:
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_5:
	movl	$1, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_OPS_PLACE_OOB,4,2          ## @MTD_OPS_PLACE_OOB
	.no_dead_strip	_scan_block_fast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scan_block_fast
_scan_block_fast:                       ; @scan_block_fast
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_nand_to_mtd
	mov	x23, x0
	ldr	w8, [x0, #4]
	str	w8, [sp, #40]
	stp	xzr, x19, [sp, #24]
	str	xzr, [sp, #16]
Lloh0:
	adrp	x8, _MTD_OPS_PLACE_OOB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTD_OPS_PLACE_OOB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	mov	x0, x22
	mov	w1, #0
	bl	_nand_bbm_get_next_page
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x24, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x23]
	sxtw	x9, w24
	madd	x1, x8, x9, x20
	add	x2, sp, #8
	mov	x0, x23
	bl	_mtd_read_oob
	cbz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	bl	_mtd_is_bitflip_or_eccerr
	cbz	w0, LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_check_short_pattern
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w1, w24, #1
	mov	x0, x22
	bl	_nand_bbm_get_next_page
	mov	x24, x0
	tbz	w0, #31, LBB0_2
LBB0_6:
	mov	w25, #0
	b	LBB0_8
LBB0_7:
	mov	w25, #1
LBB0_8:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_OPS_PLACE_OOB,4,2          ; @MTD_OPS_PLACE_OOB
	.no_dead_strip	_scan_block_fast
.subsections_via_symbols
