	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nand_attach_chip
_atmel_nand_attach_chip:                ## @atmel_nand_attach_chip
	.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, %rbx
	movl	(%rdi), %edi
	callq	_to_nand_controller
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_atmel_nand
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r14
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
LBB0_3:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r15), %r13
	cmpl	$0, (%r13)
	je	LBB0_3
## %bb.4:
	xorl	%ebx, %ebx
	cmpq	$0, (%r14)
	jne	LBB0_7
## %bb.5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_dev_name
	movq	(%r12), %rcx
	movl	(%rcx), %r8d
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_devm_kasprintf
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atmel_nand"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"%s:nand.%d"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate mtd->name\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_atmel_nand_attach_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_nand_attach_chip
_atmel_nand_attach_chip:                ; @atmel_nand_attach_chip
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	ldr	w0, [x0]
	bl	_to_nand_controller
	mov	x19, x0
	mov	x0, x22
	bl	_to_atmel_nand
	mov	x21, x0
	mov	x0, x22
	bl	_nand_to_mtd
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
LBB0_2:
	mov	w0, #0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
	b	LBB0_7
LBB0_3:
	ldr	x22, [x19]
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.4:
	ldr	x8, [x20]
	cbnz	x8, LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	mov	x0, x22
	bl	_dev_name
	mov	x3, x0
	ldr	x8, [x21]
	ldr	w4, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	bl	_devm_kasprintf
	str	x0, [x20]
	cbz	x0, LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x0, [x19]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atmel_nand"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"%s:nand.%d"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate mtd->name\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_atmel_nand_attach_chip
.subsections_via_symbols
