	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap2_nand_ecc_check
_omap2_nand_ecc_check:                  ## @omap2_nand_ecc_check
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rdi), %eax
	movl	$1, %r14d
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movl	$26, %ecx
	btl	%eax, %ecx
	jae	LBB0_2
## %bb.4:
	movq	_CONFIG_MTD_NAND_OMAP_BCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_is_elm_present
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_2:
	movq	_CONFIG_MTD_NAND_ECC_SW_BCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	movq	8(%rbx), %rdi
	callq	_dev_err
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_MTD_NAND_ECC_SW_BCH,4,2 ## @CONFIG_MTD_NAND_ECC_SW_BCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CONFIG_MTD_NAND_ECC_SW_BCH not enabled\n"

	.comm	_CONFIG_MTD_NAND_OMAP_BCH,4,2   ## @CONFIG_MTD_NAND_OMAP_BCH
L_.str.1:                               ## @.str.1
	.asciz	"CONFIG_MTD_NAND_OMAP_BCH not enabled\n"

L_.str.2:                               ## @.str.2
	.asciz	"ELM not available\n"

	.no_dead_strip	_omap2_nand_ecc_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap2_nand_ecc_check
_omap2_nand_ecc_check:                  ; @omap2_nand_ecc_check
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	mov	w0, #1
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.1:
	lsl	w8, w0, w8
	mov	w9, #26
	tst	w8, w9
	b.eq	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _CONFIG_MTD_NAND_OMAP_BCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_MTD_NAND_OMAP_BCH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_is_elm_present
	cbnz	w0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _CONFIG_MTD_NAND_ECC_SW_BCH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CONFIG_MTD_NAND_ECC_SW_BCH@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_8
LBB0_6:
	mov	w0, #1
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	ldr	x0, [x19, #8]
	bl	_dev_err
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_MTD_NAND_ECC_SW_BCH,4,2 ; @CONFIG_MTD_NAND_ECC_SW_BCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CONFIG_MTD_NAND_ECC_SW_BCH not enabled\n"

	.comm	_CONFIG_MTD_NAND_OMAP_BCH,4,2   ; @CONFIG_MTD_NAND_OMAP_BCH
l_.str.1:                               ; @.str.1
	.asciz	"CONFIG_MTD_NAND_OMAP_BCH not enabled\n"

l_.str.2:                               ; @.str.2
	.asciz	"ELM not available\n"

	.no_dead_strip	_omap2_nand_ecc_check
.subsections_via_symbols
