	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpmi_nand_probe
_gpmi_nand_probe:                       ## @gpmi_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	_gpmi_nand_id_table@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r15, 8(%r14)
	movq	%r15, (%r14)
	movq	%r14, %rdi
	callq	_acquire_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	___gpmi_enable_clk
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_pm_runtime_set_autosuspend_delay
	movq	%r15, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%r15, %rdi
	callq	_pm_runtime_set_active
	movq	%r15, %rdi
	callq	_pm_runtime_enable
	movq	%r15, %rdi
	callq	_pm_runtime_get_sync
	movq	%r14, %rdi
	callq	_gpmi_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_gpmi_nand_init
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	callq	_pm_runtime_put
	movq	%r15, %rdi
	callq	_pm_runtime_disable
	movq	%r14, %rdi
	callq	_release_resources
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	callq	_pm_runtime_mark_last_busy
	movq	%r15, %rdi
	callq	_pm_runtime_put_autosuspend
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gpmi_nand_id_table,4,2         ## @gpmi_nand_id_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find the right device id.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"driver registered.\n"

	.no_dead_strip	_gpmi_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpmi_nand_probe
_gpmi_nand_probe:                       ; @gpmi_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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _gpmi_nand_id_table@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gpmi_nand_id_table@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_of_match_device
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w8, [x0]
	str	w8, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	stp	x19, x19, [x20]
	mov	x0, x20
	bl	_acquire_resources
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	bl	___gpmi_enable_clk
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #500
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x19
	bl	_pm_runtime_use_autosuspend
	mov	x0, x19
	bl	_pm_runtime_set_active
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	bl	_pm_runtime_get_sync
	mov	x0, x20
	bl	_gpmi_init
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_gpmi_nand_init
	mov	x21, x0
	cbz	w0, LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_pm_runtime_put
	mov	x0, x19
	bl	_pm_runtime_disable
	mov	x0, x20
	bl	_release_resources
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	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_11:
	mov	x0, x19
	bl	_pm_runtime_mark_last_busy
	mov	x0, x19
	bl	_pm_runtime_put_autosuspend
	ldr	x0, [x20]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gpmi_nand_id_table,4,2         ; @gpmi_nand_id_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find the right device id.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"driver registered.\n"

	.no_dead_strip	_gpmi_nand_probe
.subsections_via_symbols
