	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spinand_isbad
_spinand_isbad:                         ## @spinand_isbad
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_nand_to_spinand
	movq	%rax, %rbx
	movl	$2, -40(%rbp)
	movq	_MTD_OPS_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	(%rbx), %rdi
	movq	%rdi, -32(%rbp)
	movl	$0, -24(%rbp)
	movl	(%r14), %eax
	movl	%eax, -20(%rbp)
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_memset
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_spinand_select_target
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_spinand_read_page
	movq	(%rbx), %rcx
	movl	$1, %eax
	cmpl	$255, (%rcx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpl	$255, 4(%rcx)
	setne	%al
LBB0_2:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_OPS_RAW,4,2                ## @MTD_OPS_RAW
	.no_dead_strip	_spinand_isbad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spinand_isbad
_spinand_isbad:                         ; @spinand_isbad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_nand_to_spinand
	mov	x20, x0
	mov	w8, #2
Lloh0:
	adrp	x9, _MTD_OPS_RAW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTD_OPS_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	ldr	x0, [x0]
	str	x0, [sp, #16]
	ldr	w8, [x19]
	stp	wzr, w8, [sp, #24]
	mov	w1, #0
	mov	w2, #2
	bl	_memset
	ldr	w1, [x19]
	mov	x0, x20
	bl	_spinand_select_target
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #0
	bl	_spinand_read_page
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #255
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x8, #4]
	cmp	w8, #255
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_OPS_RAW,4,2                ; @MTD_OPS_RAW
	.no_dead_strip	_spinand_isbad
.subsections_via_symbols
