	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nand_controller_probe
_atmel_nand_controller_probe:           ## @atmel_nand_controller_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
LBB0_5:
	cmpq	$0, 16(%rbx)
	je	LBB0_13
## %bb.6:
	movl	$21, -20(%rbp)
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_of_get_compatible_child
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	callq	_of_node_put
	movq	_atmel_sama5_nand_caps@GOTPCREL(%rip), %rbx
LBB0_8:
	cmpl	$0, 8(%rbx)
	jne	LBB0_11
## %bb.9:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_atmel_sam9g45_nand_caps@GOTPCREL(%rip), %rbx
LBB0_11:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_of_property_read_u32
	cmpl	$21, -20(%rbp)
	je	LBB0_13
## %bb.12:
	movq	_atmel_sam9261_nand_caps@GOTPCREL(%rip), %rbx
LBB0_13:
	movq	(%rbx), %rax
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*(%rax)
	jmp	LBB0_14
LBB0_2:
	movq	%r14, %rdi
	callq	_of_device_get_match_data
	movq	%rax, %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not retrieve NFC caps\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"atmel,sama5d3-nfc"

	.comm	_atmel_sama5_nand_caps,24,3     ## @atmel_sama5_nand_caps
L_.str.2:                               ## @.str.2
	.asciz	"atmel,nand-has-dma"

	.comm	_atmel_sam9g45_nand_caps,24,3   ## @atmel_sam9g45_nand_caps
L_.str.3:                               ## @.str.3
	.asciz	"atmel,nand-addr-offset"

	.comm	_atmel_sam9261_nand_caps,24,3   ## @atmel_sam9261_nand_caps
	.no_dead_strip	_atmel_nand_controller_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_nand_controller_probe
_atmel_nand_controller_probe:           ; @atmel_nand_controller_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	x20, [x8]
	cbz	x20, LBB0_10
LBB0_2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
; %bb.3:
	mov	w8, #21
	str	w8, [sp, #12]
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_of_get_compatible_child
	cbz	x0, LBB0_5
; %bb.4:
	bl	_of_node_put
Lloh2:
	adrp	x20, _atmel_sama5_nand_caps@GOTPAGE
Lloh3:
	ldr	x20, [x20, _atmel_sama5_nand_caps@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_of_property_read_bool
Lloh6:
	adrp	x8, _atmel_sam9g45_nand_caps@GOTPAGE
Lloh7:
	ldr	x8, [x8, _atmel_sam9g45_nand_caps@GOTPAGEOFF]
	cmp	x0, #0
	csel	x20, x20, x8, eq
LBB0_7:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _atmel_sam9261_nand_caps@GOTPAGE
Lloh11:
	ldr	x9, [x9, _atmel_sam9261_nand_caps@GOTPAGEOFF]
	cmp	w8, #21
	csel	x20, x20, x9, eq
LBB0_8:
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_of_device_get_match_data
	mov	x20, x0
	cbnz	x20, LBB0_2
LBB0_10:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not retrieve NFC caps\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"atmel,sama5d3-nfc"

	.comm	_atmel_sama5_nand_caps,24,3     ; @atmel_sama5_nand_caps
l_.str.2:                               ; @.str.2
	.asciz	"atmel,nand-has-dma"

	.comm	_atmel_sam9g45_nand_caps,24,3   ; @atmel_sam9g45_nand_caps
l_.str.3:                               ; @.str.3
	.asciz	"atmel,nand-addr-offset"

	.comm	_atmel_sam9261_nand_caps,24,3   ; @atmel_sam9261_nand_caps
	.no_dead_strip	_atmel_nand_controller_probe
.subsections_via_symbols
