	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ingenic_nand_probe
_ingenic_nand_probe:                    ## @ingenic_nand_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_jz4780_nemc_num_banks
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	_cs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_struct_size
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_device_get_match_data
	movl	%eax, 32(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	(%r12), %edi
	callq	_of_ingenic_ecc_get
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.13:
	movq	8(%r14), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, 24(%r14)
	movl	%r15d, (%r14)
	leaq	20(%r14), %rdi
	callq	_nand_controller_init
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ingenic_nand_init_chips
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.10:
	callq	_ingenic_ecc_release
	jmp	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no banks found\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_cs,4,2                         ## @cs
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ingenic_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ingenic_nand_probe
_ingenic_nand_probe:                    ; @ingenic_nand_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_jz4780_nemc_num_banks
	cbz	w0, LBB0_5
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _cs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cs@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x0
	bl	_struct_size
	mov	x1, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_device_get_match_data
	str	w0, [x20, #32]
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w0, [x19]
	bl	_of_ingenic_ecc_get
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.4:
	ldr	x0, [x20, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	str	x19, [x20, #24]
	str	w21, [x20]
	add	x0, x20, #20
	bl	_nand_controller_init
	add	x0, x20, #16
	bl	_INIT_LIST_HEAD
	mov	x0, x20
	mov	x1, x19
	bl	_ingenic_nand_init_chips
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.11:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_9
; %bb.12:
	bl	_ingenic_ecc_release
	b	LBB0_9
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no banks found\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_cs,4,2                         ; @cs
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ingenic_nand_probe
.subsections_via_symbols
