	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_probe
_sdhci_probe:                           ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	cmoveq	%r15, %rdi
	movl	$8, %esi
	callq	_sdhci_alloc_host
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_18
LBB0_2:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	32(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_17
LBB0_4:
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r14)
	movq	_sdhci_pltfm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	jle	LBB0_5
## %bb.6:
	movq	_SDHCI_QUIRK_BROKEN_ADMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	%r14, %rdi
	callq	_sdhci_priv
	movq	%rax, %r12
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movq	%rax, (%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r12), %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_10
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_8:
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_10:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_17:
	movq	%r14, %rdi
	callq	_sdhci_free_host
LBB0_18:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r12), %rdi
	movl	$50000000, %esi                 ## imm = 0x2FAF080
	callq	_clk_set_rate
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	(%r12), %rdi
	callq	_clk_get_rate
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_13:
	movl	16(%r14), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mmc_gpiod_request_cd
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_16
## %bb.14:
	movq	%r14, %rdi
	callq	_sdhci_add_host
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_15
LBB0_16:
	movq	(%r12), %rdi
	callq	_clk_disable_unprepare
	jmp	LBB0_17
LBB0_15:
	movq	%r15, %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	"cannot allocate memory for sdhci\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"unable to map iomem: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"sdhci"

	.comm	_sdhci_pltfm_ops,4,2            ## @sdhci_pltfm_ops
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SDHCI_QUIRK_BROKEN_ADMA,4,2    ## @SDHCI_QUIRK_BROKEN_ADMA
L_.str.3:                               ## @.str.3
	.asciz	"Error getting clock\n"

L_.str.4:                               ## @.str.4
	.asciz	"Error enabling clock\n"

L_.str.5:                               ## @.str.5
	.asciz	"Error setting desired clk, clk=%lu\n"

L_.str.6:                               ## @.str.6
	.asciz	"cd"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.7:                               ## @.str.7
	.asciz	"spear-sdhci probe failed: %d\n"

	.no_dead_strip	_sdhci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_probe
_sdhci_probe:                           ; @sdhci_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	csel	x0, x0, x8, eq
	mov	w1, #8
	bl	_sdhci_alloc_host
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_6
LBB0_2:
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, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x20, #32]
	bl	_PTR_ERR
	mov	x21, x0
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_dbg
LBB0_5:
	mov	x0, x20
	bl	_sdhci_free_host
LBB0_6:
Lloh7:
	adrp	x1, l_.str.7@PAGE
Lloh8:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_8:
Lloh9:
	adrp	x8, l_.str.2@PAGE
Lloh10:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x20]
Lloh11:
	adrp	x8, _sdhci_pltfm_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sdhci_pltfm_ops@GOTPAGEOFF]
	str	x8, [x20, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20, #8]
	cmp	x0, #0
	b.le	LBB0_11
; %bb.9:
Lloh13:
	adrp	x8, _SDHCI_QUIRK_BROKEN_ADMA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SDHCI_QUIRK_BROKEN_ADMA@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20, #20]
	mov	x0, x20
	bl	_sdhci_priv
	mov	x22, x0
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	x0, [x22]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x22]
	cbz	x8, LBB0_12
; %bb.10:
	bl	_PTR_ERR
	mov	x21, x0
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_11:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_12:
	bl	_clk_prepare_enable
	cbz	w0, LBB0_14
; %bb.13:
	mov	x21, x0
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_4
LBB0_14:
	ldr	x0, [x22]
	mov	w1, #61568
	movk	w1, #762, lsl #16
	bl	_clk_set_rate
	cbz	w0, LBB0_16
; %bb.15:
	ldr	x0, [x22]
	bl	_clk_get_rate
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_16:
	ldr	w0, [x20, #16]
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_mmc_gpiod_request_cd
	mov	x21, x0
Lloh27:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x20
	bl	_sdhci_add_host
	mov	x21, x0
	cbz	w0, LBB0_19
LBB0_18:
	ldr	x0, [x22]
	bl	_clk_disable_unprepare
	b	LBB0_5
LBB0_19:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate memory for sdhci\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"unable to map iomem: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"sdhci"

	.comm	_sdhci_pltfm_ops,4,2            ; @sdhci_pltfm_ops
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SDHCI_QUIRK_BROKEN_ADMA,4,2    ; @SDHCI_QUIRK_BROKEN_ADMA
l_.str.3:                               ; @.str.3
	.asciz	"Error getting clock\n"

l_.str.4:                               ; @.str.4
	.asciz	"Error enabling clock\n"

l_.str.5:                               ; @.str.5
	.asciz	"Error setting desired clk, clk=%lu\n"

l_.str.6:                               ; @.str.6
	.asciz	"cd"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.7:                               ; @.str.7
	.asciz	"spear-sdhci probe failed: %d\n"

	.no_dead_strip	_sdhci_probe
.subsections_via_symbols
