	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_scan_tail
_nand_scan_tail:                        ## @nand_scan_tail
	.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, %r13
	callq	_nand_to_mtd
	movl	(%r13), %ecx
	movq	_NAND_BBT_NO_OOB_BBM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	setne	%dl
	movq	_NAND_BBT_USE_FLASH@GOTPCREL(%rip), %rsi
	andl	(%rsi), %ecx
	movq	%rax, %r14
	sete	%al
	andb	%dl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_113
LBB0_3:
	movl	4(%r14), %edi
	addl	(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_kmalloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_nand_select_target
	movq	%r13, %rdi
	callq	_nand_manufacturer_init
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_nand_deselect_target
	testl	%r15d, %r15d
	jne	LBB0_112
## %bb.5:
	movslq	(%r14), %rax
	addq	16(%r13), %rax
	movq	%rax, 32(%r13)
	cmpl	$0, 128(%r14)
	jne	LBB0_16
## %bb.6:
	movl	40(%r13), %eax
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.7:
	movq	48(%r13), %rcx
	movq	_NAND_ECC_BCH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_16
LBB0_8:
	movl	4(%r14), %edx
	cmpl	$63, %edx
	jg	LBB0_12
## %bb.9:
	movq	_nand_ooblayout_sp_ops@GOTPCREL(%rip), %rsi
	cmpl	$8, %edx
	je	LBB0_15
## %bb.10:
	cmpl	$16, %edx
	je	LBB0_15
	jmp	LBB0_86
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	cmpl	$128, %edx
	je	LBB0_14
## %bb.13:
	cmpl	$64, %edx
	jne	LBB0_86
LBB0_14:
	movq	_nand_ooblayout_lp_hamming_ops@GOTPCREL(%rip), %rsi
LBB0_15:
	movq	%r14, %rdi
	callq	_mtd_set_ooblayout
LBB0_16:
	movl	40(%r13), %edx
	leal	-128(%rdx), %eax
	cmpl	$5, %eax
	ja	LBB0_24
## %bb.17:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_18:
	cmpq	$0, 168(%r13)
	je	LBB0_42
## %bb.19:
	cmpq	$0, 160(%r13)
	je	LBB0_42
## %bb.20:
	cmpq	$0, 112(%r13)
	jne	LBB0_22
## %bb.21:
	movq	_nand_read_oob_std@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 112(%r13)
LBB0_22:
	cmpq	$0, 96(%r13)
	jne	LBB0_72
## %bb.23:
	movq	_nand_write_oob_std@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 96(%r13)
	jmp	LBB0_72
LBB0_24:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_25:
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_109
LBB0_26:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_nand_read_page_raw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 168(%r13)
	movq	_nand_write_page_raw@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 160(%r13)
	movq	_nand_read_oob_std@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 112(%r13)
	movq	%rax, 152(%r13)
	movq	%rcx, 144(%r13)
	movq	_nand_write_oob_std@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 96(%r13)
	movl	(%r14), %eax
	movl	%eax, 56(%r13)
	movq	$0, 60(%r13)
	jmp	LBB0_72
LBB0_27:
	cmpq	$0, 128(%r13)
	je	LBB0_70
## %bb.28:
	cmpq	$0, 136(%r13)
	je	LBB0_70
## %bb.29:
	cmpl	$0, 176(%r13)
	je	LBB0_70
## %bb.30:
	cmpq	$0, 168(%r13)
	jne	LBB0_35
## %bb.31:
	movq	_nand_read_page_hwecc_oob_first@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 168(%r13)
	jmp	LBB0_33
LBB0_32:
	movq	168(%r13), %rax
LBB0_33:
	testq	%rax, %rax
	jne	LBB0_35
## %bb.34:
	movq	_nand_read_page_hwecc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 168(%r13)
LBB0_35:
	cmpq	$0, 160(%r13)
	je	LBB0_43
## %bb.36:
	cmpq	$0, 152(%r13)
	je	LBB0_44
LBB0_37:
	cmpq	$0, 144(%r13)
	je	LBB0_45
LBB0_38:
	cmpq	$0, 112(%r13)
	je	LBB0_46
LBB0_39:
	cmpq	$0, 96(%r13)
	je	LBB0_47
LBB0_40:
	cmpl	$0, 184(%r13)
	je	LBB0_48
LBB0_41:
	cmpl	$0, 180(%r13)
	jne	LBB0_52
	jmp	LBB0_49
LBB0_42:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_108
LBB0_43:
	movq	_nand_write_page_hwecc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 160(%r13)
	cmpq	$0, 152(%r13)
	jne	LBB0_37
LBB0_44:
	movq	_nand_read_page_raw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 152(%r13)
	cmpq	$0, 144(%r13)
	jne	LBB0_38
LBB0_45:
	movq	_nand_write_page_raw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 144(%r13)
	cmpq	$0, 112(%r13)
	jne	LBB0_39
LBB0_46:
	movq	_nand_read_oob_std@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 112(%r13)
	cmpq	$0, 96(%r13)
	jne	LBB0_40
LBB0_47:
	movq	_nand_write_oob_std@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 96(%r13)
	cmpl	$0, 184(%r13)
	jne	LBB0_41
LBB0_48:
	movq	_nand_read_subpage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 184(%r13)
	cmpl	$0, 180(%r13)
	jne	LBB0_52
LBB0_49:
	cmpl	$0, 176(%r13)
	je	LBB0_52
## %bb.50:
	cmpq	$0, 128(%r13)
	je	LBB0_52
## %bb.51:
	movq	_nand_write_subpage_hwecc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 180(%r13)
LBB0_52:
	cmpq	$0, 128(%r13)
	je	LBB0_57
## %bb.53:
	cmpq	$0, 136(%r13)
	je	LBB0_57
## %bb.54:
	cmpl	$0, 176(%r13)
	je	LBB0_57
## %bb.55:
	cmpq	$0, 168(%r13)
	jne	LBB0_61
## %bb.56:
	movq	_nand_read_page_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 168(%r13)
	jmp	LBB0_61
LBB0_57:
	movq	168(%r13), %rax
	testq	%rax, %rax
	je	LBB0_70
## %bb.58:
	movq	_nand_read_page_hwecc@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_70
## %bb.59:
	movq	160(%r13), %rax
	testq	%rax, %rax
	je	LBB0_70
## %bb.60:
	movq	_nand_write_page_hwecc@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_70
LBB0_61:
	cmpq	$0, 160(%r13)
	je	LBB0_88
## %bb.62:
	cmpq	$0, 152(%r13)
	je	LBB0_89
LBB0_63:
	cmpq	$0, 144(%r13)
	je	LBB0_90
LBB0_64:
	cmpq	$0, 112(%r13)
	je	LBB0_91
LBB0_65:
	cmpq	$0, 96(%r13)
	je	LBB0_92
LBB0_66:
	movl	(%r14), %edx
	movl	56(%r13), %esi
	cmpl	%esi, %edx
	jge	LBB0_71
## %bb.67:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	movl	$128, 40(%r13)
	movq	_NAND_ECC_HAMMING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
LBB0_68:
	movq	%r13, %rdi
	callq	_nand_set_ecc_soft_ops
	testl	%eax, %eax
	je	LBB0_72
## %bb.69:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_84
LBB0_70:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_108
LBB0_71:
	cmpl	$0, 60(%r13)
	je	LBB0_107
LBB0_72:
	cmpq	$0, 136(%r13)
	jne	LBB0_74
## %bb.73:
	cmpq	$0, 128(%r13)
	je	LBB0_76
LBB0_74:
	movl	4(%r14), %edi
	movl	(%rbx), %esi
	callq	_kmalloc
	movq	%rax, 80(%r13)
	movl	4(%r14), %edi
	movl	(%rbx), %esi
	callq	_kmalloc
	movq	%rax, 88(%r13)
	cmpq	$0, 80(%r13)
	je	LBB0_83
## %bb.75:
	testq	%rax, %rax
	je	LBB0_83
LBB0_76:
	cmpq	$0, 120(%r13)
	jne	LBB0_78
## %bb.77:
	movq	112(%r13), %rax
	movq	%rax, 120(%r13)
LBB0_78:
	cmpq	$0, 104(%r13)
	jne	LBB0_80
## %bb.79:
	movq	96(%r13), %rax
	movq	%rax, 104(%r13)
LBB0_80:
	movl	60(%r13), %eax
	movl	%eax, 8(%r14)
	movl	56(%r13), %esi
	movl	%esi, 12(%r14)
	movl	(%r14), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, 68(%r13)
	imull	%eax, %esi
	cmpl	%ecx, %esi
	jne	LBB0_85
## %bb.81:
	imull	64(%r13), %eax
	movl	%eax, 72(%r13)
	cmpl	4(%r14), %eax
	jle	LBB0_93
## %bb.82:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_108
LBB0_83:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_84:
	xorl	%r15d, %r15d
	jmp	LBB0_110
LBB0_85:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_108
LBB0_86:
	cmpl	$130, %eax
	jne	LBB0_106
## %bb.87:
	movq	_nand_ooblayout_lp_ops@GOTPCREL(%rip), %rsi
	jmp	LBB0_15
LBB0_88:
	movq	_nand_write_page_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 160(%r13)
	cmpq	$0, 152(%r13)
	jne	LBB0_63
LBB0_89:
	movq	_nand_read_page_raw_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 152(%r13)
	cmpq	$0, 144(%r13)
	jne	LBB0_64
LBB0_90:
	movq	_nand_write_page_raw_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 144(%r13)
	cmpq	$0, 112(%r13)
	jne	LBB0_65
LBB0_91:
	movq	_nand_read_oob_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 112(%r13)
	cmpq	$0, 96(%r13)
	jne	LBB0_66
LBB0_92:
	movq	_nand_write_oob_syndrome@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 96(%r13)
	jmp	LBB0_66
LBB0_93:
	movq	%r14, %rdi
	callq	_mtd_ooblayout_count_freebytes
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	movl	%ecx, 16(%r14)
	movq	%r13, %rdi
	callq	_nand_ecc_strength_good
	testl	%eax, %eax
	jne	LBB0_95
## %bb.94:
	movl	124(%r14), %esi
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_95:
	movq	_NAND_NO_SUBPAGE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_114
LBB0_96:
	movl	(%r14), %eax
	movb	20(%r14), %cl
	sarl	%cl, %eax
	movl	%eax, 8(%r13)
	movl	$-1, 28(%r13)
	cmpl	$128, 40(%r13)
	jne	LBB0_99
## %bb.97:
	cmpl	$10, 12(%r13)
	jl	LBB0_99
## %bb.98:
	movq	_NAND_SUBPAGE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
LBB0_99:
	leaq	24(%r13), %r12
	movl	120(%r14), %edx
	movq	_rawnand_ops@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_nanddev_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_111
## %bb.100:
	movq	_NAND_ROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_102
## %bb.101:
	movq	_MTD_CAP_ROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 116(%r14)
LBB0_102:
	movq	_nand_erase@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 112(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 96(%r14)
	movq	_panic_nand_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 92(%r14)
	movq	_nand_read_oob@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%r14)
	movq	_nand_write_oob@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%r14)
	movq	_nand_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r14)
	movups	%xmm0, 64(%r14)
	movq	_nand_suspend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	movq	_nand_resume@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	_nand_shutdown@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_nand_block_isreserved@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_nand_block_isbad@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_nand_block_markbad@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_nanddev_mtd_max_bad_blocks@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	cmpq	$0, 24(%r14)
	jne	LBB0_104
## %bb.103:
	movl	8(%r14), %eax
	leal	(%rax,%rax,2), %edi
	movl	$4, %esi
	callq	_DIV_ROUND_UP
	movq	%rax, 24(%r14)
LBB0_104:
	movq	%r13, %rdi
	callq	_nand_init_data_interface
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_118
LBB0_105:
	movq	%r12, %rdi
	callq	_nanddev_cleanup
	jmp	LBB0_111
LBB0_106:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
	jmp	LBB0_25
LBB0_107:
	leaq	L_.str.2(%rip), %rsi
LBB0_108:
	xorl	%r15d, %r15d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_WARN
LBB0_109:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_110:
	subl	(%rax), %r15d
LBB0_111:
	movq	%r13, %rdi
	callq	_nand_manufacturer_cleanup
LBB0_112:
	movq	16(%r13), %rdi
	callq	_kfree
	movq	88(%r13), %rdi
	callq	_kfree
	movq	80(%r13), %rdi
	callq	_kfree
	movl	%r15d, %ebx
LBB0_113:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_114:
	movq	%r13, %rdi
	callq	_nand_is_slc
	testq	%rax, %rax
	je	LBB0_96
## %bb.115:
	movl	68(%r13), %eax
	addl	$-2, %eax
	rorl	%eax
	cmpl	$7, %eax
	ja	LBB0_96
## %bb.116:
	movl	$139, %ecx
	btl	%eax, %ecx
	jae	LBB0_96
## %bb.117:
	cltq
	leaq	l_switch.table.nand_scan_tail(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 20(%r14)
	jmp	LBB0_96
LBB0_118:
	movq	%r12, %rdi
	callq	_nanddev_ntargets
	testl	%eax, %eax
	jle	LBB0_122
## %bb.119:
	xorl	%ebx, %ebx
LBB0_120:                               ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_nand_setup_data_interface
	testl	%eax, %eax
	jne	LBB0_124
## %bb.121:                             ##   in Loop: Header=BB0_120 Depth=1
	incl	%ebx
	movq	%r12, %rdi
	callq	_nanddev_ntargets
	cmpl	%eax, %ebx
	jl	LBB0_120
LBB0_122:
	movq	_NAND_SKIP_BBTSCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, 4(%r13)
	jne	LBB0_113
## %bb.123:
	movq	%r13, %rdi
	callq	_nand_create_bbt
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_105
	jmp	LBB0_113
LBB0_124:
	movl	%eax, %r15d
	jmp	LBB0_105
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_68, LBB0_68-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_52, LBB0_52-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
LJTI0_0:
	.long	L0_0_set_68
	.long	L0_0_set_18
	.long	L0_0_set_26
	.long	L0_0_set_52
	.long	L0_0_set_27
	.long	L0_0_set_32
	.end_data_region
                                        ## -- End function
	.comm	_NAND_BBT_NO_OOB_BBM,4,2        ## @NAND_BBT_NO_OOB_BBM
	.comm	_NAND_BBT_USE_FLASH,4,2         ## @NAND_BBT_USE_FLASH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NAND_ECC_BCH,8,3               ## @NAND_ECC_BCH
	.comm	_nand_ooblayout_sp_ops,4,2      ## @nand_ooblayout_sp_ops
	.comm	_nand_ooblayout_lp_hamming_ops,4,2 ## @nand_ooblayout_lp_hamming_ops
	.comm	_nand_ooblayout_lp_ops,4,2      ## @nand_ooblayout_lp_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No oob scheme defined for oobsize %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"No ECC functions supplied; hardware ECC not possible\n"

	.comm	_nand_read_page_hwecc_oob_first,8,3 ## @nand_read_page_hwecc_oob_first
	.comm	_nand_read_page_hwecc,8,3       ## @nand_read_page_hwecc
	.comm	_nand_write_page_hwecc,8,3      ## @nand_write_page_hwecc
	.comm	_nand_read_page_raw,8,3         ## @nand_read_page_raw
	.comm	_nand_write_page_raw,8,3        ## @nand_write_page_raw
	.comm	_nand_read_oob_std,8,3          ## @nand_read_oob_std
	.comm	_nand_write_oob_std,8,3         ## @nand_write_oob_std
	.comm	_nand_read_subpage,4,2          ## @nand_read_subpage
	.comm	_nand_write_subpage_hwecc,4,2   ## @nand_write_subpage_hwecc
	.comm	_nand_read_page_syndrome,8,3    ## @nand_read_page_syndrome
	.comm	_nand_write_page_syndrome,8,3   ## @nand_write_page_syndrome
	.comm	_nand_read_page_raw_syndrome,8,3 ## @nand_read_page_raw_syndrome
	.comm	_nand_write_page_raw_syndrome,8,3 ## @nand_write_page_raw_syndrome
	.comm	_nand_read_oob_syndrome,8,3     ## @nand_read_oob_syndrome
	.comm	_nand_write_oob_syndrome,8,3    ## @nand_write_oob_syndrome
L_.str.2:                               ## @.str.2
	.asciz	"Driver must set ecc.strength when using hardware ECC\n"

L_.str.3:                               ## @.str.3
	.asciz	"%d byte HW ECC not possible on %d byte page size, fallback to SW ECC\n"

	.comm	_NAND_ECC_HAMMING,8,3           ## @NAND_ECC_HAMMING
L_.str.4:                               ## @.str.4
	.asciz	"No ECC functions supplied; on-die ECC not possible\n"

L_.str.5:                               ## @.str.5
	.asciz	"NAND_ECC_NONE selected by board driver. This is not recommended!\n"

L_.str.6:                               ## @.str.6
	.asciz	"Invalid NAND_ECC_MODE %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Invalid ECC parameters\n"

L_.str.8:                               ## @.str.8
	.asciz	"Total number of ECC bytes exceeded oobsize\n"

L_.str.9:                               ## @.str.9
	.asciz	"WARNING: %s: the ECC used on your system is too weak compared to the one required by the NAND chip\n"

	.comm	_NAND_NO_SUBPAGE_WRITE,4,2      ## @NAND_NO_SUBPAGE_WRITE
	.comm	_NAND_SUBPAGE_READ,4,2          ## @NAND_SUBPAGE_READ
	.comm	_rawnand_ops,4,2                ## @rawnand_ops
	.comm	_NAND_ROM,4,2                   ## @NAND_ROM
	.comm	_MTD_CAP_ROM,4,2                ## @MTD_CAP_ROM
	.comm	_nand_erase,4,2                 ## @nand_erase
	.comm	_panic_nand_write,4,2           ## @panic_nand_write
	.comm	_nand_read_oob,4,2              ## @nand_read_oob
	.comm	_nand_write_oob,4,2             ## @nand_write_oob
	.comm	_nand_sync,4,2                  ## @nand_sync
	.comm	_nand_suspend,4,2               ## @nand_suspend
	.comm	_nand_resume,4,2                ## @nand_resume
	.comm	_nand_shutdown,4,2              ## @nand_shutdown
	.comm	_nand_block_isreserved,4,2      ## @nand_block_isreserved
	.comm	_nand_block_isbad,4,2           ## @nand_block_isbad
	.comm	_nand_block_markbad,4,2         ## @nand_block_markbad
	.comm	_nanddev_mtd_max_bad_blocks,4,2 ## @nanddev_mtd_max_bad_blocks
	.comm	_NAND_SKIP_BBTSCAN,4,2          ## @NAND_SKIP_BBTSCAN
	.no_dead_strip	_nand_scan_tail
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.nand_scan_tail
l_switch.table.nand_scan_tail:
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	2                               ## 0x2

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_scan_tail
_nand_scan_tail:                        ; @nand_scan_tail
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_nand_to_mtd
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _NAND_BBT_NO_OOB_BBM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_BBT_NO_OOB_BBM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
Lloh3:
	adrp	x10, _NAND_BBT_USE_FLASH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NAND_BBT_USE_FLASH@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w8, eq
	and	w0, w9, w8
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_110
LBB0_3:
	ldp	w8, w9, [x20]
	add	w0, w9, w8
Lloh8:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_kmalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_11
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_nand_select_target
	mov	x0, x19
	bl	_nand_manufacturer_init
	mov	x22, x0
	mov	x0, x19
	bl	_nand_deselect_target
	cbnz	w22, LBB0_109
; %bb.5:
	ldr	x8, [x19, #16]
	ldrsw	x9, [x20]
	add	x8, x8, x9
	str	x8, [x19, #32]
	ldr	w8, [x20, #128]
	cbnz	w8, LBB0_16
; %bb.6:
	ldr	w8, [x19, #40]
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.7:
	ldr	x9, [x19, #48]
Lloh10:
	adrp	x10, _NAND_ECC_BCH@GOTPAGE
Lloh11:
	ldr	x10, [x10, _NAND_ECC_BCH@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_16
LBB0_8:
	ldr	w9, [x20, #4]
	cmp	w9, #63
	b.gt	LBB0_12
; %bb.9:
Lloh13:
	adrp	x1, _nand_ooblayout_sp_ops@GOTPAGE
Lloh14:
	ldr	x1, [x1, _nand_ooblayout_sp_ops@GOTPAGEOFF]
	cmp	w9, #8
	b.eq	LBB0_15
; %bb.10:
	cmp	w9, #16
	b.eq	LBB0_15
	b	LBB0_83
LBB0_11:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
	cmp	w9, #128
	b.eq	LBB0_14
; %bb.13:
	cmp	w9, #64
	b.ne	LBB0_83
LBB0_14:
Lloh17:
	adrp	x1, _nand_ooblayout_lp_hamming_ops@GOTPAGE
Lloh18:
	ldr	x1, [x1, _nand_ooblayout_lp_hamming_ops@GOTPAGEOFF]
LBB0_15:
	mov	x0, x20
	bl	_mtd_set_ooblayout
LBB0_16:
	ldr	w8, [x19, #40]
	sub	w9, w8, #128
	cmp	w9, #5
	b.hi	LBB0_24
; %bb.17:
Lloh19:
	adrp	x8, lJTI0_0@PAGE
Lloh20:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_18
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_18:
	ldr	x8, [x19, #168]
	cbz	x8, LBB0_41
; %bb.19:
	ldr	x8, [x19, #160]
	cbz	x8, LBB0_41
; %bb.20:
	ldr	x8, [x19, #112]
	cbnz	x8, LBB0_22
; %bb.21:
Lloh21:
	adrp	x8, _nand_read_oob_std@GOTPAGE
Lloh22:
	ldr	x8, [x8, _nand_read_oob_std@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [x19, #112]
LBB0_22:
	ldr	x8, [x19, #96]
	cbnz	x8, LBB0_70
; %bb.23:
Lloh24:
	adrp	x8, _nand_write_oob_std@GOTPAGE
Lloh25:
	ldr	x8, [x8, _nand_write_oob_std@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19, #96]
	b	LBB0_70
LBB0_24:
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_105
LBB0_25:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_warn
Lloh31:
	adrp	x8, _nand_read_page_raw@GOTPAGE
Lloh32:
	ldr	x8, [x8, _nand_read_page_raw@GOTPAGEOFF]
Lloh33:
	adrp	x9, _nand_write_page_raw@GOTPAGE
Lloh34:
	ldr	x9, [x9, _nand_write_page_raw@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
Lloh36:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #160]
Lloh37:
	adrp	x10, _nand_read_oob_std@GOTPAGE
Lloh38:
	ldr	x10, [x10, _nand_read_oob_std@GOTPAGEOFF]
Lloh39:
	ldr	x10, [x10]
	str	x10, [x19, #112]
	stp	x9, x8, [x19, #144]
Lloh40:
	adrp	x8, _nand_write_oob_std@GOTPAGE
Lloh41:
	ldr	x8, [x8, _nand_write_oob_std@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	str	x8, [x19, #96]
	ldr	w8, [x20]
	stp	w8, wzr, [x19, #56]
	str	wzr, [x19, #64]
	b	LBB0_70
LBB0_26:
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_68
; %bb.27:
	ldr	x8, [x19, #136]
	cbz	x8, LBB0_68
; %bb.28:
	ldr	w8, [x19, #176]
	cbz	w8, LBB0_68
; %bb.29:
	ldr	x8, [x19, #168]
	cbnz	x8, LBB0_34
; %bb.30:
Lloh43:
	adrp	x8, _nand_read_page_hwecc_oob_first@GOTPAGE
Lloh44:
	ldr	x8, [x8, _nand_read_page_hwecc_oob_first@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	str	x8, [x19, #168]
	b	LBB0_32
LBB0_31:
	ldr	x8, [x19, #168]
LBB0_32:
	cbnz	x8, LBB0_34
; %bb.33:
Lloh46:
	adrp	x8, _nand_read_page_hwecc@GOTPAGE
Lloh47:
	ldr	x8, [x8, _nand_read_page_hwecc@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	str	x8, [x19, #168]
LBB0_34:
	ldr	x8, [x19, #160]
	cbz	x8, LBB0_42
; %bb.35:
	ldr	x8, [x19, #152]
	cbz	x8, LBB0_43
LBB0_36:
	ldr	x8, [x19, #144]
	cbz	x8, LBB0_44
LBB0_37:
	ldr	x8, [x19, #112]
	cbz	x8, LBB0_45
LBB0_38:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_46
LBB0_39:
	ldr	w8, [x19, #184]
	cbz	w8, LBB0_47
LBB0_40:
	ldr	w8, [x19, #180]
	cbnz	w8, LBB0_51
	b	LBB0_48
LBB0_41:
Lloh49:
	adrp	x1, l_.str.4@PAGE
Lloh50:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_105
LBB0_42:
Lloh51:
	adrp	x8, _nand_write_page_hwecc@GOTPAGE
Lloh52:
	ldr	x8, [x8, _nand_write_page_hwecc@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
	str	x8, [x19, #160]
	ldr	x8, [x19, #152]
	cbnz	x8, LBB0_36
LBB0_43:
Lloh54:
	adrp	x8, _nand_read_page_raw@GOTPAGE
Lloh55:
	ldr	x8, [x8, _nand_read_page_raw@GOTPAGEOFF]
Lloh56:
	ldr	x8, [x8]
	str	x8, [x19, #152]
	ldr	x8, [x19, #144]
	cbnz	x8, LBB0_37
LBB0_44:
Lloh57:
	adrp	x8, _nand_write_page_raw@GOTPAGE
Lloh58:
	ldr	x8, [x8, _nand_write_page_raw@GOTPAGEOFF]
Lloh59:
	ldr	x8, [x8]
	str	x8, [x19, #144]
	ldr	x8, [x19, #112]
	cbnz	x8, LBB0_38
LBB0_45:
Lloh60:
	adrp	x8, _nand_read_oob_std@GOTPAGE
Lloh61:
	ldr	x8, [x8, _nand_read_oob_std@GOTPAGEOFF]
Lloh62:
	ldr	x8, [x8]
	str	x8, [x19, #112]
	ldr	x8, [x19, #96]
	cbnz	x8, LBB0_39
LBB0_46:
Lloh63:
	adrp	x8, _nand_write_oob_std@GOTPAGE
Lloh64:
	ldr	x8, [x8, _nand_write_oob_std@GOTPAGEOFF]
Lloh65:
	ldr	x8, [x8]
	str	x8, [x19, #96]
	ldr	w8, [x19, #184]
	cbnz	w8, LBB0_40
LBB0_47:
Lloh66:
	adrp	x8, _nand_read_subpage@GOTPAGE
Lloh67:
	ldr	x8, [x8, _nand_read_subpage@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	str	w8, [x19, #184]
	ldr	w8, [x19, #180]
	cbnz	w8, LBB0_51
LBB0_48:
	ldr	w8, [x19, #176]
	cbz	w8, LBB0_51
; %bb.49:
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_51
; %bb.50:
Lloh69:
	adrp	x8, _nand_write_subpage_hwecc@GOTPAGE
Lloh70:
	ldr	x8, [x8, _nand_write_subpage_hwecc@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	str	w8, [x19, #180]
LBB0_51:
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_56
; %bb.52:
	ldr	x8, [x19, #136]
	cbz	x8, LBB0_56
; %bb.53:
	ldr	w8, [x19, #176]
	cbz	w8, LBB0_56
; %bb.54:
	ldr	x8, [x19, #168]
	cbnz	x8, LBB0_60
; %bb.55:
Lloh72:
	adrp	x8, _nand_read_page_syndrome@GOTPAGE
Lloh73:
	ldr	x8, [x8, _nand_read_page_syndrome@GOTPAGEOFF]
Lloh74:
	ldr	x8, [x8]
	str	x8, [x19, #168]
	b	LBB0_60
LBB0_56:
	ldr	x8, [x19, #168]
	cbz	x8, LBB0_68
; %bb.57:
Lloh75:
	adrp	x9, _nand_read_page_hwecc@GOTPAGE
Lloh76:
	ldr	x9, [x9, _nand_read_page_hwecc@GOTPAGEOFF]
Lloh77:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_68
; %bb.58:
	ldr	x8, [x19, #160]
	cbz	x8, LBB0_68
; %bb.59:
Lloh78:
	adrp	x9, _nand_write_page_hwecc@GOTPAGE
Lloh79:
	ldr	x9, [x9, _nand_write_page_hwecc@GOTPAGEOFF]
Lloh80:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_68
LBB0_60:
	ldr	x8, [x19, #160]
	cbz	x8, LBB0_85
; %bb.61:
	ldr	x8, [x19, #152]
	cbz	x8, LBB0_86
LBB0_62:
	ldr	x8, [x19, #144]
	cbz	x8, LBB0_87
LBB0_63:
	ldr	x8, [x19, #112]
	cbz	x8, LBB0_88
LBB0_64:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_89
LBB0_65:
	ldr	w9, [x20]
	ldr	w8, [x19, #56]
	cmp	w9, w8
	b.ge	LBB0_69
; %bb.66:
	stp	x8, x9, [sp]
Lloh81:
	adrp	x0, l_.str.3@PAGE
Lloh82:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_warn
	mov	w8, #128
	str	w8, [x19, #40]
Lloh83:
	adrp	x8, _NAND_ECC_HAMMING@GOTPAGE
Lloh84:
	ldr	x8, [x8, _NAND_ECC_HAMMING@GOTPAGEOFF]
Lloh85:
	ldr	x8, [x8]
	str	x8, [x19, #48]
LBB0_67:
	mov	x0, x19
	bl	_nand_set_ecc_soft_ops
	cbnz	w0, LBB0_106
	b	LBB0_70
LBB0_68:
Lloh86:
	adrp	x1, l_.str.1@PAGE
Lloh87:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_105
LBB0_69:
	ldr	w8, [x19, #60]
	cbz	w8, LBB0_104
LBB0_70:
	ldr	x8, [x19, #136]
	cbnz	x8, LBB0_72
; %bb.71:
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_74
LBB0_72:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_kmalloc
	str	x0, [x19, #80]
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_kmalloc
	str	x0, [x19, #88]
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_81
; %bb.73:
	cbz	x0, LBB0_81
LBB0_74:
	ldr	x8, [x19, #120]
	cbnz	x8, LBB0_76
; %bb.75:
	ldr	x8, [x19, #112]
	str	x8, [x19, #120]
LBB0_76:
	ldr	x8, [x19, #104]
	cbnz	x8, LBB0_78
; %bb.77:
	ldr	x8, [x19, #96]
	str	x8, [x19, #104]
LBB0_78:
	ldr	d0, [x19, #56]
	rev64.2s	v1, v0
	str	d1, [x20, #8]
	ldr	w9, [x20]
	fmov	w10, s0
	sdiv	w8, w9, w10
	str	w8, [x19, #68]
	mul	w10, w8, w10
	cmp	w10, w9
	b.ne	LBB0_82
; %bb.79:
	ldr	w9, [x19, #64]
	mul	w8, w9, w8
	str	w8, [x19, #72]
	ldr	w9, [x20, #4]
	cmp	w8, w9
	b.le	LBB0_90
; %bb.80:
Lloh88:
	adrp	x1, l_.str.8@PAGE
Lloh89:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_105
LBB0_81:
Lloh90:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh91:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_107
LBB0_82:
Lloh92:
	adrp	x1, l_.str.7@PAGE
Lloh93:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_105
LBB0_83:
	cmp	w8, #130
	b.ne	LBB0_103
; %bb.84:
Lloh94:
	adrp	x1, _nand_ooblayout_lp_ops@GOTPAGE
Lloh95:
	ldr	x1, [x1, _nand_ooblayout_lp_ops@GOTPAGEOFF]
	b	LBB0_15
LBB0_85:
Lloh96:
	adrp	x8, _nand_write_page_syndrome@GOTPAGE
Lloh97:
	ldr	x8, [x8, _nand_write_page_syndrome@GOTPAGEOFF]
Lloh98:
	ldr	x8, [x8]
	str	x8, [x19, #160]
	ldr	x8, [x19, #152]
	cbnz	x8, LBB0_62
LBB0_86:
Lloh99:
	adrp	x8, _nand_read_page_raw_syndrome@GOTPAGE
Lloh100:
	ldr	x8, [x8, _nand_read_page_raw_syndrome@GOTPAGEOFF]
Lloh101:
	ldr	x8, [x8]
	str	x8, [x19, #152]
	ldr	x8, [x19, #144]
	cbnz	x8, LBB0_63
LBB0_87:
Lloh102:
	adrp	x8, _nand_write_page_raw_syndrome@GOTPAGE
Lloh103:
	ldr	x8, [x8, _nand_write_page_raw_syndrome@GOTPAGEOFF]
Lloh104:
	ldr	x8, [x8]
	str	x8, [x19, #144]
	ldr	x8, [x19, #112]
	cbnz	x8, LBB0_64
LBB0_88:
Lloh105:
	adrp	x8, _nand_read_oob_syndrome@GOTPAGE
Lloh106:
	ldr	x8, [x8, _nand_read_oob_syndrome@GOTPAGEOFF]
Lloh107:
	ldr	x8, [x8]
	str	x8, [x19, #112]
	ldr	x8, [x19, #96]
	cbnz	x8, LBB0_65
LBB0_89:
Lloh108:
	adrp	x8, _nand_write_oob_syndrome@GOTPAGE
Lloh109:
	ldr	x8, [x8, _nand_write_oob_syndrome@GOTPAGEOFF]
Lloh110:
	ldr	x8, [x8]
	str	x8, [x19, #96]
	b	LBB0_65
LBB0_90:
	mov	x0, x20
	bl	_mtd_ooblayout_count_freebytes
	cmp	w0, #0
	csel	w8, w0, wzr, gt
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_nand_ecc_strength_good
	cbnz	w0, LBB0_92
; %bb.91:
	ldr	w8, [x20, #124]
	str	x8, [sp]
Lloh111:
	adrp	x0, l_.str.9@PAGE
Lloh112:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_pr_warn
LBB0_92:
	ldr	w8, [x19, #4]
Lloh113:
	adrp	x9, _NAND_NO_SUBPAGE_WRITE@GOTPAGE
Lloh114:
	ldr	x9, [x9, _NAND_NO_SUBPAGE_WRITE@GOTPAGEOFF]
Lloh115:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_111
LBB0_93:
	ldr	w8, [x20]
	ldr	w9, [x20, #20]
	asr	w8, w8, w9
	str	w8, [x19, #8]
	mov	w8, #-1
	str	w8, [x19, #28]
	ldr	w8, [x19, #40]
	cmp	w8, #128
	b.ne	LBB0_96
; %bb.94:
	ldr	w8, [x19, #12]
	cmp	w8, #10
	b.lt	LBB0_96
; %bb.95:
Lloh116:
	adrp	x8, _NAND_SUBPAGE_READ@GOTPAGE
Lloh117:
	ldr	x8, [x8, _NAND_SUBPAGE_READ@GOTPAGEOFF]
Lloh118:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_96:
	add	x21, x19, #24
	ldr	w2, [x20, #120]
Lloh119:
	adrp	x1, _rawnand_ops@GOTPAGE
Lloh120:
	ldr	x1, [x1, _rawnand_ops@GOTPAGEOFF]
	mov	x0, x21
	bl	_nanddev_init
	mov	x22, x0
	cbnz	w0, LBB0_108
; %bb.97:
	ldr	w8, [x19, #4]
Lloh121:
	adrp	x9, _NAND_ROM@GOTPAGE
Lloh122:
	ldr	x9, [x9, _NAND_ROM@GOTPAGEOFF]
Lloh123:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_99
; %bb.98:
Lloh124:
	adrp	x8, _MTD_CAP_ROM@GOTPAGE
Lloh125:
	ldr	x8, [x8, _MTD_CAP_ROM@GOTPAGEOFF]
Lloh126:
	ldr	w8, [x8]
	str	w8, [x20, #116]
LBB0_99:
Lloh127:
	adrp	x8, _nand_erase@GOTPAGE
Lloh128:
	ldr	x8, [x8, _nand_erase@GOTPAGEOFF]
Lloh129:
	ldr	w8, [x8]
	str	w8, [x20, #112]
	stp	xzr, xzr, [x20, #96]
Lloh130:
	adrp	x8, _panic_nand_write@GOTPAGE
Lloh131:
	ldr	x8, [x8, _panic_nand_write@GOTPAGEOFF]
Lloh132:
	ldr	w8, [x8]
Lloh133:
	adrp	x9, _nand_read_oob@GOTPAGE
Lloh134:
	ldr	x9, [x9, _nand_read_oob@GOTPAGEOFF]
Lloh135:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #88]
Lloh136:
	adrp	x8, _nand_write_oob@GOTPAGE
Lloh137:
	ldr	x8, [x8, _nand_write_oob@GOTPAGEOFF]
Lloh138:
	ldr	w8, [x8]
Lloh139:
	adrp	x9, _nand_sync@GOTPAGE
Lloh140:
	ldr	x9, [x9, _nand_sync@GOTPAGEOFF]
Lloh141:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #80]
	stp	xzr, xzr, [x20, #64]
Lloh142:
	adrp	x8, _nand_suspend@GOTPAGE
Lloh143:
	ldr	x8, [x8, _nand_suspend@GOTPAGEOFF]
Lloh144:
	ldr	w8, [x8]
Lloh145:
	adrp	x9, _nand_resume@GOTPAGE
Lloh146:
	ldr	x9, [x9, _nand_resume@GOTPAGEOFF]
	str	w8, [x20, #56]
Lloh147:
	ldr	w8, [x9]
Lloh148:
	adrp	x9, _nand_shutdown@GOTPAGE
Lloh149:
	ldr	x9, [x9, _nand_shutdown@GOTPAGEOFF]
Lloh150:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #48]
Lloh151:
	adrp	x8, _nand_block_isreserved@GOTPAGE
Lloh152:
	ldr	x8, [x8, _nand_block_isreserved@GOTPAGEOFF]
Lloh153:
	ldr	w8, [x8]
Lloh154:
	adrp	x9, _nand_block_isbad@GOTPAGE
Lloh155:
	ldr	x9, [x9, _nand_block_isbad@GOTPAGEOFF]
Lloh156:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh157:
	adrp	x8, _nand_block_markbad@GOTPAGE
Lloh158:
	ldr	x8, [x8, _nand_block_markbad@GOTPAGEOFF]
Lloh159:
	ldr	w8, [x8]
Lloh160:
	adrp	x9, _nanddev_mtd_max_bad_blocks@GOTPAGE
Lloh161:
	ldr	x9, [x9, _nanddev_mtd_max_bad_blocks@GOTPAGEOFF]
Lloh162:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #32]
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_101
; %bb.100:
	ldr	w8, [x20, #8]
	add	w0, w8, w8, lsl #1
	mov	w1, #4
	bl	_DIV_ROUND_UP
	str	x0, [x20, #24]
LBB0_101:
	mov	x0, x19
	bl	_nand_init_data_interface
	mov	x22, x0
	cbz	w0, LBB0_115
LBB0_102:
	mov	x0, x21
	bl	_nanddev_cleanup
	b	LBB0_108
LBB0_103:
	str	x9, [sp]
Lloh163:
	adrp	x1, l_.str@PAGE
Lloh164:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_105
LBB0_104:
Lloh165:
	adrp	x1, l_.str.2@PAGE
Lloh166:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_105:
	mov	w0, #1
	bl	_WARN
LBB0_106:
Lloh167:
	adrp	x8, _EINVAL@GOTPAGE
Lloh168:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_107:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_108:
	mov	x0, x19
	bl	_nand_manufacturer_cleanup
LBB0_109:
	ldr	x0, [x19, #16]
	bl	_kfree
	ldr	x0, [x19, #88]
	bl	_kfree
	ldr	x0, [x19, #80]
	bl	_kfree
LBB0_110:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
LBB0_111:
	mov	x0, x19
	bl	_nand_is_slc
	cbz	x0, LBB0_93
; %bb.112:
	ldr	w8, [x19, #68]
	sub	w8, w8, #2
	ror	w8, w8, #1
	cmp	w8, #7
	b.hi	LBB0_93
; %bb.113:
	mov	w9, #139
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_93
; %bb.114:
Lloh169:
	adrp	x9, l_switch.table.nand_scan_tail@PAGE
Lloh170:
	add	x9, x9, l_switch.table.nand_scan_tail@PAGEOFF
	ldr	w8, [x9, w8, sxtw #2]
	str	w8, [x20, #20]
	b	LBB0_93
LBB0_115:
	mov	x0, x21
	bl	_nanddev_ntargets
	cmp	w0, #1
	b.lt	LBB0_119
; %bb.116:
	mov	w20, #0
LBB0_117:                               ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_nand_setup_data_interface
	cbnz	w0, LBB0_121
; %bb.118:                              ;   in Loop: Header=BB0_117 Depth=1
	add	w20, w20, #1
	mov	x0, x21
	bl	_nanddev_ntargets
	cmp	w20, w0
	b.lt	LBB0_117
LBB0_119:
	ldr	w8, [x19, #4]
Lloh171:
	adrp	x9, _NAND_SKIP_BBTSCAN@GOTPAGE
Lloh172:
	ldr	x9, [x9, _NAND_SKIP_BBTSCAN@GOTPAGEOFF]
Lloh173:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_122
; %bb.120:
	mov	w22, #0
	b	LBB0_110
LBB0_121:
	mov	x22, x0
	b	LBB0_102
LBB0_122:
	mov	x0, x19
	bl	_nand_create_bbt
	mov	x22, x0
	cbnz	w0, LBB0_102
	b	LBB0_110
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpAdd	Lloh88, Lloh89
	.loh AdrpLdrGot	Lloh90, Lloh91
	.loh AdrpAdd	Lloh92, Lloh93
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh105, Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGot	Lloh119, Lloh120
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGotLdr	Lloh124, Lloh125, Lloh126
	.loh AdrpLdrGotLdr	Lloh160, Lloh161, Lloh162
	.loh AdrpLdrGotLdr	Lloh157, Lloh158, Lloh159
	.loh AdrpLdrGotLdr	Lloh154, Lloh155, Lloh156
	.loh AdrpLdrGotLdr	Lloh151, Lloh152, Lloh153
	.loh AdrpLdrGotLdr	Lloh148, Lloh149, Lloh150
	.loh AdrpLdrGotLdr	Lloh145, Lloh146, Lloh147
	.loh AdrpLdrGotLdr	Lloh142, Lloh143, Lloh144
	.loh AdrpLdrGotLdr	Lloh139, Lloh140, Lloh141
	.loh AdrpLdrGotLdr	Lloh136, Lloh137, Lloh138
	.loh AdrpLdrGotLdr	Lloh133, Lloh134, Lloh135
	.loh AdrpLdrGotLdr	Lloh130, Lloh131, Lloh132
	.loh AdrpLdrGotLdr	Lloh127, Lloh128, Lloh129
	.loh AdrpAdd	Lloh163, Lloh164
	.loh AdrpAdd	Lloh165, Lloh166
	.loh AdrpLdrGot	Lloh167, Lloh168
	.loh AdrpAdd	Lloh169, Lloh170
	.loh AdrpLdrGotLdr	Lloh171, Lloh172, Lloh173
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_67-LBB0_18)>>2
	.byte	(LBB0_18-LBB0_18)>>2
	.byte	(LBB0_25-LBB0_18)>>2
	.byte	(LBB0_51-LBB0_18)>>2
	.byte	(LBB0_26-LBB0_18)>>2
	.byte	(LBB0_31-LBB0_18)>>2
                                        ; -- End function
	.comm	_NAND_BBT_NO_OOB_BBM,4,2        ; @NAND_BBT_NO_OOB_BBM
	.comm	_NAND_BBT_USE_FLASH,4,2         ; @NAND_BBT_USE_FLASH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NAND_ECC_BCH,8,3               ; @NAND_ECC_BCH
	.comm	_nand_ooblayout_sp_ops,4,2      ; @nand_ooblayout_sp_ops
	.comm	_nand_ooblayout_lp_hamming_ops,4,2 ; @nand_ooblayout_lp_hamming_ops
	.comm	_nand_ooblayout_lp_ops,4,2      ; @nand_ooblayout_lp_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No oob scheme defined for oobsize %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"No ECC functions supplied; hardware ECC not possible\n"

	.comm	_nand_read_page_hwecc_oob_first,8,3 ; @nand_read_page_hwecc_oob_first
	.comm	_nand_read_page_hwecc,8,3       ; @nand_read_page_hwecc
	.comm	_nand_write_page_hwecc,8,3      ; @nand_write_page_hwecc
	.comm	_nand_read_page_raw,8,3         ; @nand_read_page_raw
	.comm	_nand_write_page_raw,8,3        ; @nand_write_page_raw
	.comm	_nand_read_oob_std,8,3          ; @nand_read_oob_std
	.comm	_nand_write_oob_std,8,3         ; @nand_write_oob_std
	.comm	_nand_read_subpage,4,2          ; @nand_read_subpage
	.comm	_nand_write_subpage_hwecc,4,2   ; @nand_write_subpage_hwecc
	.comm	_nand_read_page_syndrome,8,3    ; @nand_read_page_syndrome
	.comm	_nand_write_page_syndrome,8,3   ; @nand_write_page_syndrome
	.comm	_nand_read_page_raw_syndrome,8,3 ; @nand_read_page_raw_syndrome
	.comm	_nand_write_page_raw_syndrome,8,3 ; @nand_write_page_raw_syndrome
	.comm	_nand_read_oob_syndrome,8,3     ; @nand_read_oob_syndrome
	.comm	_nand_write_oob_syndrome,8,3    ; @nand_write_oob_syndrome
l_.str.2:                               ; @.str.2
	.asciz	"Driver must set ecc.strength when using hardware ECC\n"

l_.str.3:                               ; @.str.3
	.asciz	"%d byte HW ECC not possible on %d byte page size, fallback to SW ECC\n"

	.comm	_NAND_ECC_HAMMING,8,3           ; @NAND_ECC_HAMMING
l_.str.4:                               ; @.str.4
	.asciz	"No ECC functions supplied; on-die ECC not possible\n"

l_.str.5:                               ; @.str.5
	.asciz	"NAND_ECC_NONE selected by board driver. This is not recommended!\n"

l_.str.6:                               ; @.str.6
	.asciz	"Invalid NAND_ECC_MODE %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Invalid ECC parameters\n"

l_.str.8:                               ; @.str.8
	.asciz	"Total number of ECC bytes exceeded oobsize\n"

l_.str.9:                               ; @.str.9
	.asciz	"WARNING: %s: the ECC used on your system is too weak compared to the one required by the NAND chip\n"

	.comm	_NAND_NO_SUBPAGE_WRITE,4,2      ; @NAND_NO_SUBPAGE_WRITE
	.comm	_NAND_SUBPAGE_READ,4,2          ; @NAND_SUBPAGE_READ
	.comm	_rawnand_ops,4,2                ; @rawnand_ops
	.comm	_NAND_ROM,4,2                   ; @NAND_ROM
	.comm	_MTD_CAP_ROM,4,2                ; @MTD_CAP_ROM
	.comm	_nand_erase,4,2                 ; @nand_erase
	.comm	_panic_nand_write,4,2           ; @panic_nand_write
	.comm	_nand_read_oob,4,2              ; @nand_read_oob
	.comm	_nand_write_oob,4,2             ; @nand_write_oob
	.comm	_nand_sync,4,2                  ; @nand_sync
	.comm	_nand_suspend,4,2               ; @nand_suspend
	.comm	_nand_resume,4,2                ; @nand_resume
	.comm	_nand_shutdown,4,2              ; @nand_shutdown
	.comm	_nand_block_isreserved,4,2      ; @nand_block_isreserved
	.comm	_nand_block_isbad,4,2           ; @nand_block_isbad
	.comm	_nand_block_markbad,4,2         ; @nand_block_markbad
	.comm	_nanddev_mtd_max_bad_blocks,4,2 ; @nanddev_mtd_max_bad_blocks
	.comm	_NAND_SKIP_BBTSCAN,4,2          ; @NAND_SKIP_BBTSCAN
	.no_dead_strip	_nand_scan_tail
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.nand_scan_tail
l_switch.table.nand_scan_tail:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	2                               ; 0x2

.subsections_via_symbols
