	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_read_ecc
_onenand_read_ecc:                      ## @onenand_read_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_FLEXONENAND
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movq	8(%rbx), %rdi
	movq	_ONENAND_REG_ECC_STATUS@GOTPCREL(%rip), %r15
	addq	(%r15), %rdi
	callq	*(%rbx)
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx), %rdi
	incq	%rdi
	callq	*(%rbx)
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$2, %rdi
	callq	*(%rbx)
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_9
LBB0_11:
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$3, %rdi
	callq	*(%rbx)
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.12:
	movq	_FLEXONENAND_UNCORRECTABLE_ERROR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_3
## %bb.13:
	movq	_ONENAND_ECC_1BIT_ALL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_16:
	movq	_ONENAND_REG_ECC_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rax
	addq	8(%rbx), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_2:
	movq	_FLEXONENAND_UNCORRECTABLE_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	%rbx, %rcx
	movq	_ONENAND_ECC_1BIT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_5
LBB0_6:
	movq	_FLEXONENAND_UNCORRECTABLE_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_3
## %bb.7:
	movq	%rbx, %rcx
	movq	_ONENAND_ECC_1BIT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_9:
	movq	_FLEXONENAND_UNCORRECTABLE_ERROR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_10
LBB0_3:
	movq	_ONENAND_ECC_2BIT_ALL@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rcx
	movq	_ONENAND_ECC_1BIT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ONENAND_REG_ECC_STATUS,8,3     ## @ONENAND_REG_ECC_STATUS
	.comm	_FLEXONENAND_UNCORRECTABLE_ERROR,4,2 ## @FLEXONENAND_UNCORRECTABLE_ERROR
	.comm	_ONENAND_ECC_2BIT_ALL,4,2       ## @ONENAND_ECC_2BIT_ALL
	.comm	_ONENAND_ECC_1BIT_ALL,4,2       ## @ONENAND_ECC_1BIT_ALL
	.no_dead_strip	_onenand_read_ecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_read_ecc
_onenand_read_ecc:                      ; @onenand_read_ecc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_FLEXONENAND
	cbz	w0, LBB0_8
; %bb.1:
	ldp	x8, x9, [x19]
Lloh0:
	adrp	x22, _ONENAND_REG_ECC_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ONENAND_REG_ECC_STATUS@GOTPAGEOFF]
	ldr	x10, [x22]
	add	x0, x9, x10
	blr	x8
	mov	x20, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_9
; %bb.2:
	mov	w20, #0
LBB0_3:
	ldp	x8, x9, [x19]
	ldr	x10, [x22]
	add	x9, x9, x10
	add	x0, x9, #1
	blr	x8
	mov	x21, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_11
LBB0_4:
	ldp	x8, x9, [x19]
	ldr	x10, [x22]
	add	x9, x9, x10
	add	x0, x9, #2
	blr	x8
	mov	x21, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_13
LBB0_5:
	ldp	x8, x9, [x19]
	ldr	x10, [x22]
	add	x9, x9, x10
	add	x0, x9, #3
	blr	x8
	mov	x19, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbnz	x0, LBB0_16
; %bb.6:
Lloh2:
	adrp	x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_14
; %bb.7:
Lloh5:
	adrp	x8, _ONENAND_ECC_1BIT_ALL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ONENAND_ECC_1BIT_ALL@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	ldp	x1, x8, [x19]
Lloh7:
	adrp	x9, _ONENAND_REG_ECC_STATUS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ONENAND_REG_ECC_STATUS@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x1
LBB0_9:
Lloh10:
	adrp	x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_14
; %bb.10:
Lloh13:
	adrp	x8, _ONENAND_ECC_1BIT_ALL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ONENAND_ECC_1BIT_ALL@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	b	LBB0_3
LBB0_11:
Lloh16:
	adrp	x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_14
; %bb.12:
Lloh19:
	adrp	x8, _ONENAND_ECC_1BIT_ALL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ONENAND_ECC_1BIT_ALL@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	b	LBB0_4
LBB0_13:
Lloh22:
	adrp	x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FLEXONENAND_UNCORRECTABLE_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
LBB0_14:
Lloh25:
	adrp	x8, _ONENAND_ECC_2BIT_ALL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ONENAND_ECC_2BIT_ALL@GOTPAGEOFF]
LBB0_15:
	ldr	w20, [x8]
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh27:
	adrp	x8, _ONENAND_ECC_1BIT_ALL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ONENAND_ECC_1BIT_ALL@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ONENAND_REG_ECC_STATUS,8,3     ; @ONENAND_REG_ECC_STATUS
	.comm	_FLEXONENAND_UNCORRECTABLE_ERROR,4,2 ; @FLEXONENAND_UNCORRECTABLE_ERROR
	.comm	_ONENAND_ECC_2BIT_ALL,4,2       ; @ONENAND_ECC_2BIT_ALL
	.comm	_ONENAND_ECC_1BIT_ALL,4,2       ; @ONENAND_ECC_1BIT_ALL
	.no_dead_strip	_onenand_read_ecc
.subsections_via_symbols
