	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ndfc_probe
_ndfc_probe:                            ## @ndfc_probe
	.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, %r15
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_of_get_property
	movl	-44(%rbp), %edx
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	cmpl	$12, %edx
	jne	LBB0_10
## %bb.2:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movq	_NDFC_MAX_CS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_11
## %bb.3:
	movq	_ndfc_ctrl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	movq	%rax, %rbx
	shlq	$5, %rbx
	leaq	(%r12,%rbx), %r14
	movq	%rax, (%r12,%rbx)
	leaq	(%r12,%rbx), %rdi
	addq	$24, %rdi
	callq	_nand_controller_init
	movq	%r15, 16(%r12,%rbx)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_dev_set_drvdata
	movl	(%r15), %edi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_of_iomap
	movq	%rax, 8(%r12,%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	addq	%rbx, %r12
	addq	$8, %r12
	movq	(%r14), %rdi
	callq	_NDFC_CCR_BS
	movq	%rax, %rbx
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_be32_to_cpup
	orq	%rax, %rbx
LBB0_6:
	movq	_NDFC_CCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_out_be32
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	movq	%r12, %rbx
	je	LBB0_8
## %bb.7:
	movq	_NDFC_BCFG0@GOTPCREL(%rip), %rcx
	movl	(%r14), %edx
	shll	$2, %edx
	addl	(%rcx), %edx
	movslq	%edx, %r12
	addq	(%rbx), %r12
	movq	%rax, %rdi
	callq	_be32_to_cpup
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_out_be32
LBB0_8:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ndfc_chip_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	callq	_iounmap
	movl	%r14d, %r13d
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"unable read reg property (%d)\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_NDFC_MAX_CS,8,3                ## @NDFC_MAX_CS
L_.str.2:                               ## @.str.2
	.asciz	"invalid CS number (%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ndfc_ctrl,8,3                  ## @ndfc_ctrl
L_.str.3:                               ## @.str.3
	.asciz	"failed to get memory\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.4:                               ## @.str.4
	.asciz	"ccr"

	.comm	_NDFC_CCR,8,3                   ## @NDFC_CCR
L_.str.5:                               ## @.str.5
	.asciz	"bank-settings"

	.comm	_NDFC_BCFG0,4,2                 ## @NDFC_BCFG0
	.no_dead_strip	_ndfc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ndfc_probe
_ndfc_probe:                            ; @ndfc_probe
	.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
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	bl	_of_get_property
	ldr	w8, [sp, #12]
	cmp	x0, #0
	ccmp	w8, #12, #0, ne
	b.eq	LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	ldr	w0, [x0]
	bl	_be32_to_cpu
Lloh6:
	adrp	x8, _NDFC_MAX_CS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NDFC_MAX_CS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.hs	LBB0_10
; %bb.3:
Lloh9:
	adrp	x8, _ndfc_ctrl@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ndfc_ctrl@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x20, x8, x0, lsl #5
	str	x0, [x20]
	add	x0, x20, #24
	bl	_nand_controller_init
	str	x19, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	ldr	w0, [x19]
	mov	w1, #0
	bl	_of_iomap
	mov	x22, x20
	str	x0, [x22, #8]!
	cbz	x0, LBB0_11
; %bb.4:
	ldr	x0, [x20]
	bl	_NDFC_CCR_BS
	mov	x21, x0
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_6
; %bb.5:
	bl	_be32_to_cpup
	orr	x21, x0, x21
LBB0_6:
	ldr	x8, [x22]
Lloh14:
	adrp	x9, _NDFC_CCR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NDFC_CCR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	x1, x21
	bl	_out_be32
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x8, _NDFC_BCFG0@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NDFC_BCFG0@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20]
	add	w8, w8, w9, lsl #2
	ldr	x9, [x22]
	add	x21, x9, w8, sxtw
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x21
	bl	_out_be32
LBB0_8:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_ndfc_chip_init
	mov	x19, x0
	cbz	w0, LBB0_13
; %bb.9:
	ldr	x0, [x22]
	bl	_iounmap
	b	LBB0_13
LBB0_10:
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_13:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"unable read reg property (%d)\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_NDFC_MAX_CS,8,3                ; @NDFC_MAX_CS
l_.str.2:                               ; @.str.2
	.asciz	"invalid CS number (%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ndfc_ctrl,8,3                  ; @ndfc_ctrl
l_.str.3:                               ; @.str.3
	.asciz	"failed to get memory\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.4:                               ; @.str.4
	.asciz	"ccr"

	.comm	_NDFC_CCR,8,3                   ; @NDFC_CCR
l_.str.5:                               ; @.str.5
	.asciz	"bank-settings"

	.comm	_NDFC_BCFG0,4,2                 ; @NDFC_BCFG0
	.no_dead_strip	_ndfc_probe
.subsections_via_symbols
