	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_sdhci_probe
_aspeed_sdhci_probe:                    ## @aspeed_sdhci_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, %r14
	movq	_aspeed_sdhci_pdata@GOTPCREL(%rip), %rsi
	movl	$8, %edx
	callq	_sdhci_pltfm_init
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r12, %rdi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	%r12, %rdi
	callq	_sdhci_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r13
	movl	(%r14), %edi
	callq	_dev_get_drvdata
	movl	%eax, 4(%r13)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_aspeed_sdhci_calculate_slot
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	cmpl	$2, %ebx
	jb	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_info
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.8:
	movq	_ASPEED_SDC_S0MMC8@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_ASPEED_SDC_S1MMC8@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_sdhci_get_of_property
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r15), %rdi
	testq	%rax, %rax
	jne	LBB0_2
## %bb.10:
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_16
LBB0_12:
	movl	(%r12), %edi
	callq	_mmc_of_parse
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	callq	_sdhci_add_host
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_15:
	movq	(%r15), %rdi
	callq	_clk_disable_unprepare
LBB0_16:
	movq	%r14, %rdi
	callq	_sdhci_pltfm_free
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_aspeed_sdhci_pdata,4,2         ## @aspeed_sdhci_pdata
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuring for slot %d\n"

	.comm	_ASPEED_SDC_S0MMC8,4,2          ## @ASPEED_SDC_S0MMC8
	.comm	_ASPEED_SDC_S1MMC8,4,2          ## @ASPEED_SDC_S1MMC8
L_.str.1:                               ## @.str.1
	.asciz	"Unable to enable SDIO clock\n"

	.no_dead_strip	_aspeed_sdhci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_sdhci_probe
_aspeed_sdhci_probe:                    ; @aspeed_sdhci_probe
	.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	x19, x0
Lloh0:
	adrp	x1, _aspeed_sdhci_pdata@GOTPAGE
Lloh1:
	ldr	x1, [x1, _aspeed_sdhci_pdata@GOTPAGEOFF]
	mov	w2, #8
	bl	_sdhci_pltfm_init
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x20
LBB0_2:
	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
	b	_PTR_ERR
LBB0_3:
	mov	x0, x20
	bl	_sdhci_priv
	mov	x21, x0
	bl	_sdhci_pltfm_priv
	mov	x23, x0
	ldr	w0, [x19]
	bl	_dev_get_drvdata
	str	w0, [x23, #4]
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x23
	bl	_aspeed_sdhci_calculate_slot
	mov	x22, x0
	tbnz	w0, #31, LBB0_13
; %bb.4:
	cmp	w22, #2
	b.lo	LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_info
Lloh10:
	adrp	x8, _ASPEED_SDC_S0MMC8@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ASPEED_SDC_S0MMC8@GOTPAGEOFF]
Lloh12:
	adrp	x9, _ASPEED_SDC_S1MMC8@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ASPEED_SDC_S1MMC8@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x23]
	mov	x0, x19
	bl	_sdhci_get_of_property
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	x0, [x21]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x21]
	cbnz	x8, LBB0_2
; %bb.7:
	bl	_clk_prepare_enable
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_12
LBB0_9:
	ldr	w0, [x20]
	bl	_mmc_of_parse
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_sdhci_add_host
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_11:
	ldr	x0, [x21]
	bl	_clk_disable_unprepare
LBB0_12:
	mov	x0, x19
	bl	_sdhci_pltfm_free
LBB0_13:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_aspeed_sdhci_pdata,4,2         ; @aspeed_sdhci_pdata
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuring for slot %d\n"

	.comm	_ASPEED_SDC_S0MMC8,4,2          ; @ASPEED_SDC_S0MMC8
	.comm	_ASPEED_SDC_S1MMC8,4,2          ; @ASPEED_SDC_S1MMC8
l_.str.1:                               ; @.str.1
	.asciz	"Unable to enable SDIO clock\n"

	.no_dead_strip	_aspeed_sdhci_probe
.subsections_via_symbols
