	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spinand_markbad
_spinand_markbad:                       ## @spinand_markbad
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_nand_to_spinand
	movq	%rax, %rbx
	movl	$2, -32(%rbp)
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	(%r14), %esi
	movl	%esi, -20(%rbp)
	movq	%rbx, %rdi
	callq	_spinand_select_target
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_spinand_write_enable_op
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_spinand_erase_op
	movl	(%rbx), %edi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_memset
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_spinand_write_page
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_spinand_markbad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spinand_markbad
_spinand_markbad:                       ; @spinand_markbad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	bl	_nand_to_spinand
	mov	x19, x0
	mov	w8, #2
	str	w8, [sp]
	ldr	w8, [x0]
	stp	w8, wzr, [sp, #4]
	ldr	w1, [x20]
	str	w1, [sp, #12]
	bl	_spinand_select_target
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_spinand_write_enable_op
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_spinand_erase_op
	ldr	w0, [x19]
	mov	w1, #0
	mov	w2, #2
	bl	_memset
	mov	x1, sp
	mov	x0, x19
	bl	_spinand_write_page
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_spinand_markbad
.subsections_via_symbols
