	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_block_is_bad               ## -- Begin function mtd_block_is_bad
	.p2align	4, 0x90
_mtd_block_is_bad:                      ## @mtd_block_is_bad
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	%esi, -4(%rbp)
	movq	_mtdtype@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_MTD_NANDFLASH@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movq	_MEMGETBADBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-4(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	js	LBB0_3
LBB0_2:
	addq	$16, %rsp
	popq	%rbp
	retq
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_mtdtype,8,3                    ## @mtdtype
	.comm	_MTD_NANDFLASH,8,3              ## @MTD_NANDFLASH
	.comm	_MEMGETBADBLOCK,4,2             ## @MEMGETBADBLOCK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get erase block status\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_block_is_bad               ; -- Begin function mtd_block_is_bad
	.p2align	2
_mtd_block_is_bad:                      ; @mtd_block_is_bad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _mtdtype@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mtdtype@GOTPAGEOFF]
	stur	w1, [x29, #-4]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _MTD_NANDFLASH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MTD_NANDFLASH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _MEMGETBADBLOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMGETBADBLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	x2, x29, #4
	bl	_ioctl
	tbz	w0, #31, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mtdtype,8,3                    ; @mtdtype
	.comm	_MTD_NANDFLASH,8,3              ; @MTD_NANDFLASH
	.comm	_MEMGETBADBLOCK,4,2             ; @MEMGETBADBLOCK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get erase block status\n"

.subsections_via_symbols
