	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_detect
_nand_detect:                           ## @nand_detect
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	64(%rbx), %r13
	leaq	48(%rbx), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_nanddev_get_memorg
	movq	%rax, %r12
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%r12)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nand_reset
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_33
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nand_select_target
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	_nand_readid_op
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_33
## %bb.2:
	movq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	movl	$8, %ecx
	callq	_nand_readid_op
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_33
## %bb.3:
	movq	(%r13), %rcx
	movq	8(%r13), %r8
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_24
## %bb.4:
	cmpq	%rdx, %r8
	jne	LBB0_24
## %bb.5:
	movq	64(%rbx), %rdi
	movq	%rsi, %r14
	callq	_ARRAY_SIZE
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_nand_id_len
	movl	%eax, 72(%rbx)
	movq	%r14, %rdi
	callq	_nand_get_manufacturer
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, 56(%rbx)
	testq	%r15, %r15
	jne	LBB0_7
## %bb.6:
	movq	_nand_flash_ids@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_7:
	movl	(%rbx), %ecx
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %eax
	notl	%eax
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	cmpq	$0, 32(%r15)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_18
## %bb.8:
	movq	%r15, %rax
LBB0_9:
	leaq	32(%rax), %rcx
	movq	%rax, %r15
LBB0_10:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_nand_onfi_detect
	testl	%eax, %eax
	js	LBB0_25
## %bb.11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_20
## %bb.12:
	movq	%rbx, %rdi
	callq	_nand_jedec_detect
	testl	%eax, %eax
	js	LBB0_25
## %bb.13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_20
## %bb.14:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_36
## %bb.15:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_42
LBB0_16:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpq	(%r15), %r14
	je	LBB0_34
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	40(%r15), %rax
	cmpq	$0, 72(%r15)
	movq	%rax, %r15
	je	LBB0_9
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_is_full_id_nand
	testq	%rax, %rax
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_find_full_id_nand
	testq	%rax, %rax
	je	LBB0_17
LBB0_20:
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	cmpq	$0, 16(%r12)
	jne	LBB0_22
## %bb.21:
	movq	24(%rbx), %rax
	movq	%rax, 16(%r12)
LBB0_22:
	andl	-60(%rbp), %r13d                ## 4-byte Folded Reload
	movl	(%rbx), %eax
	movq	_NAND_BUSWIDTH_AUTO@GOTPCREL(%rip), %rcx
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	testl	%eax, (%rcx)
	je	LBB0_26
## %bb.23:
	andl	%r13d, %edi
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_nand_set_defaults
	jmp	LBB0_27
LBB0_24:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_33
LBB0_25:
	movl	%eax, %r14d
	jmp	LBB0_33
LBB0_26:
	andl	%eax, %edi
	cmpl	%edi, %r13d
	jne	LBB0_39
LBB0_27:
	movq	%rbx, %rdi
	callq	_nand_decode_bbm_options
	movl	(%r12), %edi
	callq	_ffs
	decl	%eax
	movl	%eax, 4(%rbx)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_nanddev_target_size
	movl	%eax, %r15d
	movb	4(%rbx), %cl
	sarl	%cl, %eax
	decl	%eax
	movl	%eax, 8(%rbx)
	movl	4(%r12), %edi
	callq	_ffs
	decq	%rax
	movq	%rax, 32(%rbx)
	movq	%rax, 40(%rbx)
	testl	%r15d, %r15d
	je	LBB0_29
## %bb.28:
	movl	%r15d, %edi
	callq	_ffs
	decl	%eax
	jmp	LBB0_30
LBB0_29:
	callq	_ffs
	addl	$31, %eax
LBB0_30:
	movl	%eax, 12(%rbx)
	subl	4(%rbx), %eax
	cmpl	$17, %eax
	jl	LBB0_32
## %bb.31:
	movq	_NAND_ROW_ADDR_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_32:
	movl	$8, 16(%rbx)
	movq	%rbx, %rdi
	callq	_nand_legacy_adjust_cmdfunc
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_pr_info
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_nand_manufacturer_name
	movq	24(%rbx), %rdx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_info
	sarl	$20, %r15d
	movq	%rbx, %rdi
	callq	_nand_is_slc
	testq	%rax, %rax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	(%r12), %r8d
	movl	4(%r12), %ecx
	shrl	$10, %ecx
	movl	8(%r12), %r9d
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_33:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	leaq	32(%r15), %rcx
	movq	32(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.35:
	cmpl	$0, 24(%r15)
	je	LBB0_10
LBB0_36:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kstrdup
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_41
## %bb.37:
	cmpl	$0, 24(%r15)
	je	LBB0_43
## %bb.38:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_nand_decode_id
	jmp	LBB0_44
LBB0_39:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rdx
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_pr_info
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_nand_manufacturer_name
	movq	16(%r12), %rdx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_info
	xorl	%eax, %eax
	testl	%r13d, %r13d
	setne	%al
	leal	8(,%rax,8), %esi
	movl	(%r15), %eax
	xorl	%ecx, %ecx
	andl	(%rbx), %eax
	setne	%cl
	leal	8(,%rcx,8), %edx
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	24(%rbx), %rdi
	callq	_kfree
	jmp	LBB0_33
LBB0_41:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_42:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_33
LBB0_43:
	movq	%rbx, %rdi
	callq	_nand_manufacturer_detect
LBB0_44:
	movl	8(%r15), %eax
	orl	%eax, (%rbx)
	movl	16(%r15), %edi
	shll	$20, %edi
	movl	12(%r12), %esi
	imull	8(%r12), %esi
	callq	_DIV_ROUND_DOWN_ULL
	movl	%eax, 16(%r12)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"second ID read did not match %02x,%02x against %02x,%02x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_nand_flash_ids,8,3             ## @nand_flash_ids
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NAND_BUSWIDTH_AUTO,4,2         ## @NAND_BUSWIDTH_AUTO
L_.str.1:                               ## @.str.1
	.asciz	"device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"bus width %d instead of %d bits\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NAND_ROW_ADDR_3,4,2            ## @NAND_ROW_ADDR_3
L_.str.4:                               ## @.str.4
	.asciz	"%d MiB, %s, erase size: %d KiB, page size: %d, OOB size: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"SLC"

L_.str.6:                               ## @.str.6
	.asciz	"MLC"

	.no_dead_strip	_nand_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_detect
_nand_detect:                           ; @nand_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x1
	mov	x19, x0
	bl	_nand_to_mtd
	mov	x20, x0
	ldr	x24, [x19, #64]
	add	x23, x19, #48
	mov	x0, x23
	bl	_nanddev_get_memorg
	mov	x25, x0
	movi.2s	v0, #1
	str	d0, [x0]
	mov	x0, x19
	mov	w1, #0
	bl	_nand_reset
	mov	x27, x0
	cbnz	w0, LBB0_30
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_nand_select_target
	mov	x0, x19
	mov	w1, #0
	mov	x2, x24
	mov	w3, #2
	bl	_nand_readid_op
	mov	x27, x0
	cbnz	w0, LBB0_30
; %bb.2:
	ldp	x22, x21, [x24]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x24
	mov	w3, #8
	bl	_nand_readid_op
	mov	x27, x0
	cbnz	w0, LBB0_30
; %bb.3:
	ldp	x8, x9, [x24]
	cmp	x8, x22
	ccmp	x9, x21, #0, eq
	b.eq	LBB0_7
; %bb.4:
	stp	x8, x9, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_pr_info
LBB0_5:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_30
LBB0_7:
	ldr	x0, [x19, #64]
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x24
	bl	_nand_id_len
	str	w0, [x19, #72]
	mov	x0, x22
	bl	_nand_get_manufacturer
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	str	x0, [x19, #56]
Lloh4:
	adrp	x8, _nand_flash_ids@GOTPAGE
Lloh5:
	ldr	x8, [x8, _nand_flash_ids@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x26, #0
	csel	x26, x8, x26, eq
	ldr	w9, [x19]
Lloh7:
	adrp	x8, _NAND_BUSWIDTH_16@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh9:
	ldr	w24, [x8]
	str	w9, [sp, #44]                   ; 4-byte Folded Spill
	bic	w8, w9, w24
	str	w8, [x19]
	ldr	x8, [x26, #32]
	cbnz	x8, LBB0_17
; %bb.8:
	mov	x8, x26
LBB0_9:
	add	x28, x8, #32
	mov	x26, x8
LBB0_10:
	mov	x0, x19
	bl	_nand_onfi_detect
	mov	x27, x0
	tbnz	w0, #31, LBB0_30
; %bb.11:
	cbnz	w27, LBB0_19
; %bb.12:
	mov	x0, x19
	bl	_nand_jedec_detect
	mov	x27, x0
	tbnz	w0, #31, LBB0_30
; %bb.13:
	cbnz	w27, LBB0_19
; %bb.14:
	ldr	x0, [x28]
	cbnz	x0, LBB0_33
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x26]
	cmp	x21, x8
	b.eq	LBB0_31
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x8, x26, #40
	ldr	x9, [x26, #72]
	mov	x26, x8
	cbz	x9, LBB0_9
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	bl	_is_full_id_nand
	cbz	x0, LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_find_full_id_nand
	cbz	x0, LBB0_16
LBB0_19:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_21
LBB0_20:
	ldr	x8, [x19, #24]
	str	x8, [x20, #16]
LBB0_21:
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	and	w24, w24, w8
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _NAND_BUSWIDTH_AUTO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NAND_BUSWIDTH_AUTO@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x9]
Lloh13:
	adrp	x25, _NAND_BUSWIDTH_16@GOTPAGE
Lloh14:
	ldr	x25, [x25, _NAND_BUSWIDTH_16@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w10, w8
	b.eq	LBB0_23
; %bb.22:
	and	w0, w9, w24
	bl	_WARN_ON
	mov	x0, x19
	bl	_nand_set_defaults
	b	LBB0_24
LBB0_23:
	and	w8, w9, w8
	cmp	w24, w8
	b.ne	LBB0_36
LBB0_24:
	mov	x0, x19
	bl	_nand_decode_bbm_options
	ldr	w0, [x20]
	bl	_ffs
	sub	w8, w0, #1
	str	w8, [x19, #4]
	mov	x0, x23
	bl	_nanddev_target_size
	mov	x23, x0
	ldr	w8, [x19, #4]
	asr	w8, w0, w8
	sub	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w0, [x20, #4]
	bl	_ffs
	sub	x8, x0, #1
	stp	x8, x8, [x19, #32]
	cbz	w23, LBB0_26
; %bb.25:
	mov	x0, x23
	bl	_ffs
	sub	w8, w0, #1
	b	LBB0_27
LBB0_26:
	bl	_ffs
	add	w8, w0, #31
LBB0_27:
	str	w8, [x19, #12]
	ldr	w9, [x19, #4]
	sub	w8, w8, w9
	cmp	w8, #17
	b.lt	LBB0_29
; %bb.28:
Lloh15:
	adrp	x8, _NAND_ROW_ADDR_3@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NAND_ROW_ADDR_3@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_29:
	mov	w8, #8
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_nand_legacy_adjust_cmdfunc
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_pr_info
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_nand_manufacturer_name
	mov	x1, x0
	ldr	x2, [x19, #24]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	asr	w21, w23, #20
	mov	x0, x19
	bl	_nand_is_slc
Lloh22:
	adrp	x8, l_.str.5@PAGE
Lloh23:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh24:
	adrp	x9, l_.str.6@PAGE
Lloh25:
	add	x9, x9, l_.str.6@PAGEOFF
	cmp	x0, #0
	csel	x2, x9, x8, eq
	ldp	w9, w8, [x20]
	lsr	w8, w8, #10
	ldr	w10, [x20, #8]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_pr_info
	mov	w27, #0
LBB0_30:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_31:
	mov	x28, x26
	ldr	x0, [x28, #32]!
	cbz	x0, LBB0_10
; %bb.32:
	ldr	w8, [x26, #24]
	cbz	w8, LBB0_10
LBB0_33:
Lloh28:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_kstrdup
	str	x0, [x19, #24]
	cbz	x0, LBB0_37
; %bb.34:
	ldr	w8, [x26, #24]
	cbz	w8, LBB0_38
; %bb.35:
	mov	x0, x19
	mov	x1, x26
	bl	_nand_decode_id
	b	LBB0_39
LBB0_36:
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_pr_info
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_nand_manufacturer_name
	mov	x1, x0
	ldr	x2, [x20, #16]
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	mov	w8, #16
	mov	w9, #8
	cmp	w24, #0
	csel	w1, w9, w8, eq
	ldr	w10, [x19]
	ldr	w11, [x25]
	tst	w11, w10
	csel	w2, w9, w8, eq
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_warn
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w27, w8
	ldr	x0, [x19, #24]
	bl	_kfree
	b	LBB0_30
LBB0_37:
Lloh40:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_38:
	mov	x0, x19
	bl	_nand_manufacturer_detect
LBB0_39:
	ldr	w8, [x26, #8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w8, [x26, #16]
	lsl	w0, w8, #20
	ldp	w8, w9, [x25, #8]
	mul	w1, w9, w8
	bl	_DIV_ROUND_DOWN_ULL
	str	w0, [x25, #16]
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_21
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"second ID read did not match %02x,%02x against %02x,%02x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_nand_flash_ids,8,3             ; @nand_flash_ids
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NAND_BUSWIDTH_AUTO,4,2         ; @NAND_BUSWIDTH_AUTO
l_.str.1:                               ; @.str.1
	.asciz	"device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"bus width %d instead of %d bits\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NAND_ROW_ADDR_3,4,2            ; @NAND_ROW_ADDR_3
l_.str.4:                               ; @.str.4
	.asciz	"%d MiB, %s, erase size: %d KiB, page size: %d, OOB size: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"SLC"

l_.str.6:                               ; @.str.6
	.asciz	"MLC"

	.no_dead_strip	_nand_detect
.subsections_via_symbols
