	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function micron_supports_on_die_ecc
_micron_supports_on_die_ecc:            ## @micron_supports_on_die_ecc
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MICRON_ON_DIE_UNSUPPORTED@GOTPCREL(%rip), %r14
	cmpl	$0, 24(%rdi)
	je	LBB0_16
## %bb.1:
	movq	%rdi, %rbx
	callq	_nanddev_bits_per_cell
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.2:
	movl	(%rbx), %eax
	cmpl	$8, %eax
	je	LBB0_4
## %bb.3:
	cmpl	$4, %eax
	jne	LBB0_16
LBB0_4:
	cmpl	$5, 8(%rbx)
	jne	LBB0_16
## %bb.5:
	movq	16(%rbx), %rax
	movq	_MICRON_ID_INTERNAL_ECC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	16(%rax), %ecx
	cmpl	$2, %ecx
	jne	LBB0_16
## %bb.6:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_micron_nand_on_die_ecc_setup
	testl	%eax, %eax
	jne	LBB0_16
## %bb.7:
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20, %ecx
	callq	_nand_readid_op
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_micron_nand_on_die_ecc_setup
	testl	%eax, %eax
	je	LBB0_9
LBB0_16:
	movl	(%r14), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_MICRON_ID_ECC_ENABLED@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_16
## %bb.10:
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20, %ecx
	callq	_nand_readid_op
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:
	movl	(%r15), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_13
## %bb.12:
	movq	_MICRON_ON_DIE_MANDATORY@GOTPCREL(%rip), %r14
	jmp	LBB0_16
LBB0_13:
	movl	(%rbx), %eax
	addl	$-4, %eax
	testl	$-5, %eax
	jne	LBB0_14
## %bb.15:
	movq	_MICRON_ON_DIE_SUPPORTED@GOTPCREL(%rip), %r14
	jmp	LBB0_16
LBB0_14:
	movq	_MICRON_ON_DIE_UNSUPPORTED@GOTPCREL(%rip), %r14
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MICRON_ON_DIE_UNSUPPORTED,4,2  ## @MICRON_ON_DIE_UNSUPPORTED
	.comm	_MICRON_ID_INTERNAL_ECC_MASK,4,2 ## @MICRON_ID_INTERNAL_ECC_MASK
	.comm	_MICRON_ID_ECC_ENABLED,4,2      ## @MICRON_ID_ECC_ENABLED
	.comm	_MICRON_ON_DIE_MANDATORY,4,2    ## @MICRON_ON_DIE_MANDATORY
	.comm	_MICRON_ON_DIE_SUPPORTED,4,2    ## @MICRON_ON_DIE_SUPPORTED
	.no_dead_strip	_micron_supports_on_die_ecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function micron_supports_on_die_ecc
_micron_supports_on_die_ecc:            ; @micron_supports_on_die_ecc
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	bl	_nanddev_bits_per_cell
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #8
	ccmp	w8, #4, #4, ne
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w8, #5
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #16]
Lloh3:
	adrp	x9, _MICRON_ID_INTERNAL_ECC_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MICRON_ID_INTERNAL_ECC_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_micron_nand_on_die_ecc_setup
	cbnz	w0, LBB0_8
; %bb.6:
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #0
	mov	w3, #20
	bl	_nand_readid_op
	cbnz	w0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_micron_nand_on_die_ecc_setup
	cbz	w0, LBB0_11
LBB0_8:
Lloh6:
	adrp	x8, _MICRON_ON_DIE_UNSUPPORTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MICRON_ON_DIE_UNSUPPORTED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
	ldr	w8, [sp, #20]
Lloh11:
	adrp	x20, _MICRON_ID_ECC_ENABLED@GOTPAGE
Lloh12:
	ldr	x20, [x20, _MICRON_ID_ECC_ENABLED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.12:
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #0
	mov	w3, #20
	bl	_nand_readid_op
Lloh13:
	adrp	x8, _MICRON_ON_DIE_UNSUPPORTED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MICRON_ON_DIE_UNSUPPORTED@GOTPAGEOFF]
	cbnz	w0, LBB0_9
; %bb.13:
	ldr	w9, [sp, #20]
	ldr	w10, [x20]
	tst	w10, w9
	b.eq	LBB0_15
; %bb.14:
Lloh15:
	adrp	x8, _MICRON_ON_DIE_MANDATORY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MICRON_ON_DIE_MANDATORY@GOTPAGEOFF]
	b	LBB0_9
LBB0_15:
	ldr	w9, [x19]
	sub	w9, w9, #4
Lloh17:
	adrp	x10, _MICRON_ON_DIE_SUPPORTED@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MICRON_ON_DIE_SUPPORTED@GOTPAGEOFF]
	tst	w9, #0xfffffffb
	csel	x8, x10, x8, eq
	b	LBB0_9
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MICRON_ON_DIE_UNSUPPORTED,4,2  ; @MICRON_ON_DIE_UNSUPPORTED
	.comm	_MICRON_ID_INTERNAL_ECC_MASK,4,2 ; @MICRON_ID_INTERNAL_ECC_MASK
	.comm	_MICRON_ID_ECC_ENABLED,4,2      ; @MICRON_ID_ECC_ENABLED
	.comm	_MICRON_ON_DIE_MANDATORY,4,2    ; @MICRON_ON_DIE_MANDATORY
	.comm	_MICRON_ON_DIE_SUPPORTED,4,2    ; @MICRON_ON_DIE_SUPPORTED
	.no_dead_strip	_micron_supports_on_die_ecc
.subsections_via_symbols
