	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1550nd_probe
_au1550nd_probe:                        ## @au1550nd_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, %r13
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$52, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	leaq	L_.str.2(%rip), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_request_mem_region
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_8:
	movl	(%r15), %edi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_ioremap_nocache
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	%r14, %rbx
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_nand_to_mtd
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, (%rax)
	movl	(%r15), %edi
	callq	_find_nand_cs
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movl	%eax, (%r14)
	movq	_au1550_device_ready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_au1550_select_chip@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	_au1550_command@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movl	$30, 12(%r14)
	movq	_NAND_ECC_SOFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_NAND_ECC_HAMMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 40(%r14)
LBB0_14:
	testq	%rax, %rax
	movq	_au_read_byte16@GOTPCREL(%rip), %rax
	cmoveq	_au_read_byte@GOTPCREL(%rip), %rax
	movq	_au_write_byte16@GOTPCREL(%rip), %rcx
	cmoveq	_au_write_byte@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	(%rcx), %eax
	movl	%eax, 8(%r14)
	movq	_au_write_buf16@GOTPCREL(%rip), %rax
	cmoveq	_au_write_buf@GOTPCREL(%rip), %rax
	movq	_au_read_buf16@GOTPCREL(%rip), %rcx
	cmoveq	_au_read_buf@GOTPCREL(%rip), %rcx
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movl	(%rcx), %eax
	movl	%eax, 16(%r14)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_nand_scan
	testl	%eax, %eax
	je	LBB0_20
## %bb.15:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_11:
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_16:
	movl	4(%r14), %edi
	callq	_iounmap
LBB0_17:
	movl	(%r15), %r12d
	movq	%r15, %rdi
	callq	_resource_size
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
LBB0_18:
	movq	%r14, %rdi
	callq	_kfree
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	(%r12), %edx
	movl	4(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtd_device_register
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"no NAND memory resource\n"

L_.str.2:                               ## @.str.2
	.asciz	"au1550-nand"

L_.str.3:                               ## @.str.3
	.asciz	"cannot claim NAND memory area\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot remap NAND memory area\n"

L_.str.5:                               ## @.str.5
	.asciz	"cannot detect NAND chipselect\n"

	.comm	_au1550_device_ready,4,2        ## @au1550_device_ready
	.comm	_au1550_select_chip,4,2         ## @au1550_select_chip
	.comm	_au1550_command,4,2             ## @au1550_command
	.comm	_NAND_ECC_SOFT,4,2              ## @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ## @NAND_ECC_HAMMING
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_au_read_byte16,4,2             ## @au_read_byte16
	.comm	_au_read_byte,4,2               ## @au_read_byte
	.comm	_au_write_byte16,4,2            ## @au_write_byte16
	.comm	_au_write_byte,4,2              ## @au_write_byte
	.comm	_au_write_buf16,4,2             ## @au_write_buf16
	.comm	_au_write_buf,4,2               ## @au_write_buf
	.comm	_au_read_buf16,4,2              ## @au_read_buf16
	.comm	_au_read_buf,4,2                ## @au_read_buf
L_.str.6:                               ## @.str.6
	.asciz	"NAND scan failed with %d\n"

	.no_dead_strip	_au1550nd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1550nd_probe
_au1550nd_probe:                        ; @au1550nd_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_dev_get_platdata
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #52
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	ldr	w23, [x0]
	bl	_resource_size
	mov	x1, x0
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_request_mem_region
	cbz	x0, LBB0_10
; %bb.4:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_21
LBB0_8:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_20
LBB0_10:
	ldr	w0, [x21]
	mov	w1, #4096
	bl	_ioremap_nocache
	str	w0, [x19, #4]
	cbz	w0, LBB0_16
; %bb.11:
	add	x24, x19, #12
	mov	x0, x24
	bl	_nand_to_mtd
	mov	x23, x0
	str	x20, [x0]
	ldr	w0, [x21]
	bl	_find_nand_cs
	tbnz	w0, #31, LBB0_17
; %bb.12:
	str	w0, [x19]
Lloh22:
	adrp	x8, _au1550_device_ready@GOTPAGE
Lloh23:
	ldr	x8, [x8, _au1550_device_ready@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _au1550_select_chip@GOTPAGE
Lloh26:
	ldr	x9, [x9, _au1550_select_chip@GOTPAGEOFF]
	str	w8, [x19, #36]
Lloh27:
	ldr	w8, [x9]
Lloh28:
	adrp	x9, _au1550_command@GOTPAGE
Lloh29:
	ldr	x9, [x9, _au1550_command@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #28]
	mov	w8, #30
	str	w8, [x19, #12]
Lloh31:
	adrp	x8, _NAND_ECC_SOFT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _NAND_ECC_SOFT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _NAND_ECC_HAMMING@GOTPAGE
Lloh35:
	ldr	x9, [x9, _NAND_ECC_HAMMING@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #44]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_14
; %bb.13:
Lloh37:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh38:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	ldr	w10, [x19, #40]
	orr	w9, w10, w9
	str	w9, [x19, #40]
LBB0_14:
Lloh40:
	adrp	x9, _au_read_byte16@GOTPAGE
Lloh41:
	ldr	x9, [x9, _au_read_byte16@GOTPAGEOFF]
Lloh42:
	adrp	x10, _au_read_byte@GOTPAGE
Lloh43:
	ldr	x10, [x10, _au_read_byte@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _au_write_byte16@GOTPAGE
Lloh45:
	ldr	x9, [x9, _au_write_byte16@GOTPAGEOFF]
Lloh46:
	adrp	x10, _au_write_byte@GOTPAGE
Lloh47:
	ldr	x10, [x10, _au_write_byte@GOTPAGEOFF]
	str	w8, [x19, #24]
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh48:
	adrp	x8, _au_write_buf16@GOTPAGE
Lloh49:
	ldr	x8, [x8, _au_write_buf16@GOTPAGEOFF]
Lloh50:
	adrp	x9, _au_write_buf@GOTPAGE
Lloh51:
	ldr	x9, [x9, _au_write_buf@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh52:
	adrp	x9, _au_read_buf16@GOTPAGE
Lloh53:
	ldr	x9, [x9, _au_read_buf16@GOTPAGEOFF]
	str	w8, [x19, #20]
Lloh54:
	adrp	x8, _au_read_buf@GOTPAGE
Lloh55:
	ldr	x8, [x8, _au_read_buf@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x24
	mov	w1, #1
	bl	_nand_scan
	mov	x24, x0
	cbz	w0, LBB0_22
; %bb.15:
	str	x24, [sp]
Lloh56:
	adrp	x1, l_.str.6@PAGE
Lloh57:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_18
LBB0_16:
Lloh58:
	adrp	x1, l_.str.4@PAGE
Lloh59:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh60:
	adrp	x8, _ENODEV@GOTPAGE
Lloh61:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_19
LBB0_17:
Lloh63:
	adrp	x1, l_.str.5@PAGE
Lloh64:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh65:
	adrp	x8, _ENODEV@GOTPAGE
Lloh66:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_18:
	ldr	w0, [x19, #4]
	bl	_iounmap
LBB0_19:
	ldr	w20, [x21]
	mov	x0, x21
	bl	_resource_size
	mov	x1, x0
	mov	x0, x20
	bl	_release_mem_region
LBB0_20:
	mov	x0, x19
	bl	_kfree
LBB0_21:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_22:
	ldp	w2, w1, [x22]
	mov	x0, x23
	bl	_mtd_device_register
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"no NAND memory resource\n"

l_.str.2:                               ; @.str.2
	.asciz	"au1550-nand"

l_.str.3:                               ; @.str.3
	.asciz	"cannot claim NAND memory area\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot remap NAND memory area\n"

l_.str.5:                               ; @.str.5
	.asciz	"cannot detect NAND chipselect\n"

	.comm	_au1550_device_ready,4,2        ; @au1550_device_ready
	.comm	_au1550_select_chip,4,2         ; @au1550_select_chip
	.comm	_au1550_command,4,2             ; @au1550_command
	.comm	_NAND_ECC_SOFT,4,2              ; @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ; @NAND_ECC_HAMMING
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_au_read_byte16,4,2             ; @au_read_byte16
	.comm	_au_read_byte,4,2               ; @au_read_byte
	.comm	_au_write_byte16,4,2            ; @au_write_byte16
	.comm	_au_write_byte,4,2              ; @au_write_byte
	.comm	_au_write_buf16,4,2             ; @au_write_buf16
	.comm	_au_write_buf,4,2               ; @au_write_buf
	.comm	_au_read_buf16,4,2              ; @au_read_buf16
	.comm	_au_read_buf,4,2                ; @au_read_buf
l_.str.6:                               ; @.str.6
	.asciz	"NAND scan failed with %d\n"

	.no_dead_strip	_au1550nd_probe
.subsections_via_symbols
