	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_dt_init
_nand_dt_init:                          ## @nand_dt_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_nand_get_flash_node
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_of_get_nand_bus_width
	cmpl	$16, %eax
	jne	LBB0_3
## %bb.2:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r14)
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_NAND_IS_BOOT_MEDIUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r14)
LBB0_5:
	movq	%rbx, %rdi
	callq	_of_get_nand_on_flash_bbt
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_NAND_BBT_USE_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r14)
LBB0_7:
	movq	%rbx, %rdi
	callq	_of_get_nand_ecc_mode
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_of_get_nand_ecc_algo
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_of_get_nand_ecc_strength
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_of_get_nand_ecc_step_size
	testl	%r13d, %r13d
	js	LBB0_9
## %bb.8:
	movl	%r13d, (%r14)
LBB0_9:
	testl	%r12d, %r12d
	js	LBB0_11
## %bb.10:
	movl	%r12d, 4(%r14)
LBB0_11:
	testl	%r15d, %r15d
	js	LBB0_13
## %bb.12:
	movl	%r15d, 8(%r14)
LBB0_13:
	testl	%eax, %eax
	jle	LBB0_15
## %bb.14:
	movl	%eax, 12(%r14)
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_NAND_ECC_MAXIMIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r14)
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nand-is-boot-medium"

	.comm	_NAND_IS_BOOT_MEDIUM,4,2        ## @NAND_IS_BOOT_MEDIUM
	.comm	_NAND_BBT_USE_FLASH,4,2         ## @NAND_BBT_USE_FLASH
L_.str.1:                               ## @.str.1
	.asciz	"nand-ecc-maximize"

	.comm	_NAND_ECC_MAXIMIZE,4,2          ## @NAND_ECC_MAXIMIZE
	.no_dead_strip	_nand_dt_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_dt_init
_nand_dt_init:                          ; @nand_dt_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_nand_get_flash_node
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
	bl	_of_get_nand_bus_width
	cmp	w0, #16
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _NAND_BUSWIDTH_16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_bool
	cbz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _NAND_IS_BOOT_MEDIUM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAND_IS_BOOT_MEDIUM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_5:
	mov	x0, x20
	bl	_of_get_nand_on_flash_bbt
	cbz	x0, LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _NAND_BBT_USE_FLASH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NAND_BBT_USE_FLASH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
LBB0_7:
	mov	x0, x20
	bl	_of_get_nand_ecc_mode
	mov	x22, x0
	mov	x0, x20
	bl	_of_get_nand_ecc_algo
	mov	x21, x0
	mov	x0, x20
	bl	_of_get_nand_ecc_strength
	mov	x23, x0
	mov	x0, x20
	bl	_of_get_nand_ecc_step_size
	tbnz	w22, #31, LBB0_9
; %bb.8:
	str	w22, [x19]
LBB0_9:
	tbnz	w21, #31, LBB0_11
; %bb.10:
	str	w21, [x19, #4]
LBB0_11:
	tbnz	w23, #31, LBB0_13
; %bb.12:
	str	w23, [x19, #8]
LBB0_13:
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.14:
	str	w0, [x19, #12]
LBB0_15:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_bool
	cbz	x0, LBB0_17
; %bb.16:
Lloh13:
	adrp	x8, _NAND_ECC_MAXIMIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NAND_ECC_MAXIMIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_17:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nand-is-boot-medium"

	.comm	_NAND_IS_BOOT_MEDIUM,4,2        ; @NAND_IS_BOOT_MEDIUM
	.comm	_NAND_BBT_USE_FLASH,4,2         ; @NAND_BBT_USE_FLASH
l_.str.1:                               ; @.str.1
	.asciz	"nand-ecc-maximize"

	.comm	_NAND_ECC_MAXIMIZE,4,2          ; @NAND_ECC_MAXIMIZE
	.no_dead_strip	_nand_dt_init
.subsections_via_symbols
