	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxc_nand_correct_data
_mxc_nand_correct_data:                 ## @mxc_nand_correct_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_NFC_ECC_STATUS_RESULT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	_readw
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpl	$2, %ecx
	je	LBB0_2
## %bb.1:
	andl	$-4, %eax
	xorl	%ecx, %ecx
	cmpl	$8, %eax
	jne	LBB0_3
LBB0_2:
	movq	_MTD_DEBUG_LEVEL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DEBUG
	movl	$-1, %ecx
LBB0_3:
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_ECC_STATUS_RESULT,8,3      ## @NFC_ECC_STATUS_RESULT
	.comm	_MTD_DEBUG_LEVEL0,4,2           ## @MTD_DEBUG_LEVEL0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MXC_NAND: HWECC uncorrectable 2-bit ECC error\n"

	.no_dead_strip	_mxc_nand_correct_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxc_nand_correct_data
_mxc_nand_correct_data:                 ; @mxc_nand_correct_data
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _NFC_ECC_STATUS_RESULT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NFC_ECC_STATUS_RESULT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readw
	and	w8, w0, #0x3
	and	w9, w0, #0xfffffffc
	cmp	w8, #2
	ccmp	w9, #8, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MTD_DEBUG_LEVEL0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL0@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DEBUG
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_ECC_STATUS_RESULT,8,3      ; @NFC_ECC_STATUS_RESULT
	.comm	_MTD_DEBUG_LEVEL0,4,2           ; @MTD_DEBUG_LEVEL0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MXC_NAND: HWECC uncorrectable 2-bit ECC error\n"

	.no_dead_strip	_mxc_nand_correct_data
.subsections_via_symbols
