	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_ecc_choose_conf           ## -- Begin function nand_ecc_choose_conf
	.p2align	4, 0x90
_nand_ecc_choose_conf:                  ## @nand_ecc_choose_conf
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	testl	%r15d, %r15d
	js	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpl	%r15d, (%rax)
	setl	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.6:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.11:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nand_check_ecc_caps            ## TAILCALL
LBB0_7:
	movq	_NAND_ECC_MAXIMIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_nand_match_ecc_req
	testl	%eax, %eax
	je	LBB0_9
LBB0_12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nand_maximize_ecc              ## TAILCALL
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NAND_ECC_MAXIMIZE,4,2          ## @NAND_ECC_MAXIMIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_ecc_choose_conf           ; -- Begin function nand_ecc_choose_conf
	.p2align	2
_nand_ecc_choose_conf:                  ; @nand_ecc_choose_conf
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_nand_to_mtd
	tbnz	w19, #31, LBB0_4
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w19
	cset	w0, lt
	bl	_WARN_ON
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_nand_check_ecc_caps
LBB0_8:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _NAND_ECC_MAXIMIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_ECC_MAXIMIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_nand_match_ecc_req
	cbz	w0, LBB0_3
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_nand_maximize_ecc
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NAND_ECC_MAXIMIZE,4,2          ; @NAND_ECC_MAXIMIZE
.subsections_via_symbols
