	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_isbad_bbt
_onenand_isbad_bbt:                     ## @onenand_isbad_bbt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	(%rdi), %rdi
	movq	(%rdi), %rbx
	callq	_onenand_block
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edx
	movq	(%rbx), %rax
	movl	%edx, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ebx
	movl	%edx, %ecx
	andb	$6, %cl
	sarl	%cl, %ebx
	sarl	%edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %ecx
	andl	$3, %ecx
	movl	%r15d, %esi
	callq	_pr_debug
	andl	$3, %ebx
	je	LBB0_3
## %bb.1:
	cmpl	$2, %ebx
	je	LBB0_4
## %bb.2:
	cmpl	$1, %ebx
	movl	$1, %ebx
	jmp	LBB0_3
LBB0_4:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	sete	%bl
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n"

	.no_dead_strip	_onenand_isbad_bbt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_isbad_bbt
_onenand_isbad_bbt:                     ; @onenand_isbad_bbt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x0, [x0]
	ldr	x21, [x0]
	bl	_onenand_block
	lsl	w8, w0, #1
	ldr	x9, [x21]
	sbfx	w10, w0, #2, #29
	ldr	w9, [x9, w10, sxtw #2]
	and	w8, w8, #0x6
	asr	w8, w9, w8
	and	w21, w8, #0x3
	sbfx	w2, w0, #0, #31
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x3, x21
	bl	_pr_debug
	cmp	w19, #0
	cset	w8, eq
	mov	w9, #1
	mov	w10, #1
	cmp	w21, #1
	csel	w9, w9, w10, ne
	cmp	w21, #2
	csel	w8, w8, w9, eq
	cmp	w21, #0
	csel	w0, w21, w8, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n"

	.no_dead_strip	_onenand_isbad_bbt
.subsections_via_symbols
