	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_pattern
_check_pattern:                         ## @check_pattern
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	addl	(%rcx), %edx
	movq	_NAND_BBT_SCANEMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	andl	4(%rcx), %r8d
	je	LBB0_5
## %bb.1:
	testl	%edx, %edx
	jle	LBB0_5
## %bb.2:
	movl	%edx, %r9d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$255, (%rdi,%rax,4)
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	cmpq	%rax, %r9
	jne	LBB0_3
LBB0_5:
	movslq	%edx, %rax
	leaq	(%rdi,%rax,4), %r9
	movl	8(%rcx), %r10d
	testl	%r10d, %r10d
	jle	LBB0_9
## %bb.6:
	movq	16(%rcx), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rcx,4), %edi
	cmpl	(%rax,%rcx,4), %edi
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	cmpq	%rcx, %r10
	jne	LBB0_7
LBB0_9:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	je	LBB0_14
## %bb.10:
	addl	%r10d, %edx
	cmpl	%esi, %edx
	jge	LBB0_14
## %bb.11:
	movslq	%r10d, %rcx
	leaq	(%r9,%rcx,4), %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$255, (%rcx)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	$4, %rcx
	incl	%edx
	cmpl	%esi, %edx
	jl	LBB0_12
LBB0_14:
	popq	%rbp
	retq
LBB0_15:
	movl	$-1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BBT_SCANEMPTY,4,2         ## @NAND_BBT_SCANEMPTY
	.no_dead_strip	_check_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_pattern
_check_pattern:                         ; @check_pattern
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x3]
	add	w8, w8, w2
Lloh0:
	adrp	x10, _NAND_BBT_SCANEMPTY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NAND_BBT_SCANEMPTY@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #0
	ccmp	w8, #1, #8, ne
	b.lt	LBB0_4
; %bb.1:
	mov	x10, x8
	mov	x11, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	cmp	w12, #255
	b.ne	LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x11, x11, #4
	subs	x10, x10, #1
	b.ne	LBB0_2
LBB0_4:
	add	x10, x0, w8, sxtw #2
	ldr	w11, [x3, #8]
	cmp	w11, #1
	b.lt	LBB0_8
; %bb.5:
	ldr	x12, [x3, #16]
	mov	x13, x11
	mov	x14, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x14]
	ldr	w16, [x12]
	cmp	w15, w16
	b.ne	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x12, x12, #4
	add	x14, x14, #4
	subs	x13, x13, #1
	b.ne	LBB0_6
LBB0_8:
	mov	w0, #0
	cbz	w9, LBB0_14
; %bb.9:
	add	w8, w11, w8
	cmp	w8, w1
	b.ge	LBB0_14
; %bb.10:
	add	x9, x10, w11, sxtw #2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	cmp	w10, #255
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #4
	add	w8, w8, #1
	cmp	w8, w1
	b.lt	LBB0_11
; %bb.13:
	mov	w0, #0
LBB0_14:
	ret
LBB0_15:
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BBT_SCANEMPTY,4,2         ; @NAND_BBT_SCANEMPTY
	.no_dead_strip	_check_pattern
.subsections_via_symbols
