	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nand_controller_init
_atmel_nand_controller_init:            ## @atmel_nand_controller_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	addq	$40, %rdi
	callq	_nand_controller_init
	movq	_atmel_nand_controller_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	leaq	32(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, 16(%rbx)
	movq	%r15, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_devm_atmel_pmecc_get
	movl	%eax, 28(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	28(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	addl	(%rax), %ecx
	je	LBB0_14
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
LBB0_13:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_3:
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.4:
	movq	_atmel_nand_avoid_dma@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.5:
	callq	_dma_cap_zero
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dma_cap_set
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_dma_request_channel
	movl	%eax, 24(%rbx)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	8(%rbx), %rax
	xorl	%r15d, %r15d
	cmpq	$0, (%rax)
	je	LBB0_8
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r14), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_of_clk_get
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.15:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%rbx), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_syscon_node_to_regmap
	movl	%eax, (%rbx)
	movq	%r12, %rdi
	callq	_of_node_put
	movl	(%rbx), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_atmel_nand_controller_ops,4,2  ## @atmel_nand_controller_ops
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not get PMECC object (err = %d)\n"

	.comm	_atmel_nand_avoid_dma,4,2       ## @atmel_nand_avoid_dma
	.comm	_DMA_MEMCPY,4,2                 ## @DMA_MEMCPY
L_.str.1:                               ## @.str.1
	.asciz	"Failed to request DMA channel\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to retrieve MCK clk\n"

L_.str.3:                               ## @.str.3
	.asciz	"atmel,smc"

L_.str.4:                               ## @.str.4
	.asciz	"Missing or invalid atmel,smc property\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.5:                               ## @.str.5
	.asciz	"Could not get SMC regmap (err = %d)\n"

	.no_dead_strip	_atmel_nand_controller_init
.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_init
_atmel_nand_controller_init:            ; @atmel_nand_controller_init
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x0, x0, #40
	bl	_nand_controller_init
Lloh0:
	adrp	x8, _atmel_nand_controller_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _atmel_nand_controller_ops@GOTPAGEOFF]
	str	x8, [x20, #40]
	add	x0, x20, #32
	bl	_INIT_LIST_HEAD
	stp	x21, x19, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	bl	_devm_atmel_pmecc_get
	str	w0, [x20, #28]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x20, #28]
	bl	_PTR_ERR
	mov	x20, x0
Lloh2:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_8
; %bb.2:
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_3:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _atmel_nand_avoid_dma@GOTPAGE
Lloh8:
	ldr	x9, [x9, _atmel_nand_avoid_dma@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	x8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_6
; %bb.4:
	bl	_dma_cap_zero
Lloh10:
	adrp	x8, _DMA_MEMCPY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_MEMCPY@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_dma_cap_set
	mov	x1, #0
	mov	x2, #0
	bl	_dma_request_channel
	str	w0, [x20, #24]
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x0, [x20, #16]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	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_9:
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_of_clk_get
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	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
	b	_PTR_ERR
LBB0_11:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_14
; %bb.12:
	mov	x21, x0
	bl	_syscon_node_to_regmap
	str	w0, [x20]
	mov	x0, x21
	bl	_of_node_put
	ldr	w0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.13:
	ldr	w0, [x20]
	bl	_PTR_ERR
	mov	x20, x0
	str	x20, [sp]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_8
LBB0_14:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_atmel_nand_controller_ops,4,2  ; @atmel_nand_controller_ops
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not get PMECC object (err = %d)\n"

	.comm	_atmel_nand_avoid_dma,4,2       ; @atmel_nand_avoid_dma
	.comm	_DMA_MEMCPY,4,2                 ; @DMA_MEMCPY
l_.str.1:                               ; @.str.1
	.asciz	"Failed to request DMA channel\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to retrieve MCK clk\n"

l_.str.3:                               ; @.str.3
	.asciz	"atmel,smc"

l_.str.4:                               ; @.str.4
	.asciz	"Missing or invalid atmel,smc property\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.5:                               ; @.str.5
	.asciz	"Could not get SMC regmap (err = %d)\n"

	.no_dead_strip	_atmel_nand_controller_init
.subsections_via_symbols
