	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_mx_mmc_probe
_meson_mx_mmc_probe:                    ## @meson_mx_mmc_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, %rbx
	callq	_meson_mx_mmc_slot_pdev
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.25:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_3:
	movl	$56, %edi
	movq	%r12, %rsi
	callq	_mmc_alloc_host
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, %r15
	movq	%r14, 48(%rax)
	movq	%rbx, 24(%rax)
	leaq	44(%rax), %rdi
	callq	_spin_lock_init
	leaq	40(%r15), %rdi
	movq	_meson_mx_mmc_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	24(%r15), %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	16(%r15), %rdi
LBB0_7:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_22
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	24(%r15), %rdi
	movq	_meson_mx_mmc_irq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_meson_mx_mmc_irq_thread@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	%r15, (%rsp)
	movl	%eax, %esi
	xorl	%r9d, %r9d
	callq	_devm_request_threaded_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
LBB0_22:
	movq	%r14, %rdi
	callq	_mmc_free_host
LBB0_23:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_of_platform_device_destroy
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	24(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_devm_clk_get
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	(%r15), %rdi
	jmp	LBB0_7
LBB0_11:
	movq	24(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_devm_clk_get
	movq	%rax, 32(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	32(%r15), %rdi
	jmp	LBB0_7
LBB0_13:
	movq	%r15, %rdi
	callq	_meson_mx_mmc_register_clks
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.14:
	movq	(%r15), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	24(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_22
LBB0_16:
	movq	8(%r15), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	movq	24(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_21
LBB0_18:
	movq	_MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$39, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	movq	_MESON_MX_SDIO_CONF_M_ENDIAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_FIELD_PREP
	orl	%eax, %r13d
	movq	_MESON_MX_SDIO_CONF_WRITE_NWR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	movq	_MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_FIELD_PREP
	orl	%eax, %ebx
	orl	%r13d, %ebx
	movq	_MESON_MX_SDIO_CONF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	shlq	$2, %rsi
	addq	16(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_meson_mx_mmc_soft_reset
	movq	%r15, %rdi
	callq	_meson_mx_mmc_add_host
	testl	%eax, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_clk_disable_unprepare
LBB0_21:
	movq	(%r15), %rdi
	callq	_clk_disable_unprepare
	jmp	LBB0_22
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_meson_mx_mmc_timeout,4,2       ## @meson_mx_mmc_timeout
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_meson_mx_mmc_irq,4,2           ## @meson_mx_mmc_irq
	.comm	_meson_mx_mmc_irq_thread,4,2    ## @meson_mx_mmc_irq_thread
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"core"

L_.str.1:                               ## @.str.1
	.asciz	"clkin"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable core clock\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to enable MMC clock\n"

	.comm	_MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK,4,2 ## @MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK
	.comm	_MESON_MX_SDIO_CONF_M_ENDIAN_MASK,4,2 ## @MESON_MX_SDIO_CONF_M_ENDIAN_MASK
	.comm	_MESON_MX_SDIO_CONF_WRITE_NWR_MASK,4,2 ## @MESON_MX_SDIO_CONF_WRITE_NWR_MASK
	.comm	_MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK,4,2 ## @MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK
	.comm	_MESON_MX_SDIO_CONF,4,2         ## @MESON_MX_SDIO_CONF
	.no_dead_strip	_meson_mx_mmc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_mx_mmc_probe
_meson_mx_mmc_probe:                    ; @meson_mx_mmc_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	x22, x0
	bl	_meson_mx_mmc_slot_pdev
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	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_3:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_4:
	mov	w0, #56
	mov	x1, x19
	bl	_mmc_alloc_host
	cbz	x0, LBB0_8
; %bb.5:
	mov	x20, x0
	bl	_mmc_priv
	mov	x21, x0
	str	x20, [x0, #48]
	str	x22, [x0, #24]
	add	x0, x0, #44
	bl	_spin_lock_init
	add	x0, x21, #40
Lloh3:
	adrp	x8, _meson_mx_mmc_timeout@GOTPAGE
Lloh4:
	ldr	x8, [x8, _meson_mx_mmc_timeout@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	mov	x0, x22
	mov	x1, x21
	bl	_platform_set_drvdata
Lloh6:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	ldr	x0, [x21, #24]
	bl	_devm_ioremap_resource
	str	x0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x0, [x21, #16]
LBB0_7:
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_9:
	mov	x0, x22
	mov	w1, #0
	bl	_platform_get_irq
	mov	x1, x0
	ldr	x0, [x21, #24]
Lloh12:
	adrp	x8, _meson_mx_mmc_irq@GOTPAGE
Lloh13:
	ldr	x8, [x8, _meson_mx_mmc_irq@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _meson_mx_mmc_irq_thread@GOTPAGE
Lloh16:
	ldr	x8, [x8, _meson_mx_mmc_irq_thread@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x5, #0
	mov	x6, x21
	bl	_devm_request_threaded_irq
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_10:
	mov	x0, x20
	bl	_mmc_free_host
LBB0_11:
	mov	x0, x19
	mov	x1, #0
	bl	_of_platform_device_destroy
LBB0_12:
	mov	x0, x22
	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_13:
	ldr	x0, [x21, #24]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_devm_clk_get
	str	x0, [x21]
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.14:
	ldr	x0, [x21]
	b	LBB0_7
LBB0_15:
	ldr	x0, [x21, #24]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_devm_clk_get
	str	x0, [x21, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x0, [x21, #32]
	b	LBB0_7
LBB0_17:
	mov	x0, x21
	bl	_meson_mx_mmc_register_clks
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.18:
	ldr	x0, [x21]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_20
; %bb.19:
	mov	x22, x0
	ldr	x0, [x21, #24]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_20:
	ldr	x0, [x21, #8]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_22
; %bb.21:
	mov	x22, x0
	ldr	x0, [x21, #24]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_24
LBB0_22:
Lloh29:
	adrp	x8, _MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	w1, #39
	bl	_FIELD_PREP
	mov	x22, x0
Lloh32:
	adrp	x8, _MESON_MX_SDIO_CONF_M_ENDIAN_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MESON_MX_SDIO_CONF_M_ENDIAN_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	w1, #3
	bl	_FIELD_PREP
	orr	w22, w0, w22
Lloh35:
	adrp	x8, _MESON_MX_SDIO_CONF_WRITE_NWR_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MESON_MX_SDIO_CONF_WRITE_NWR_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w22, w22, w0
Lloh38:
	adrp	x8, _MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_FIELD_PREP
	orr	w0, w22, w0
	ldr	x8, [x21, #16]
Lloh41:
	adrp	x9, _MESON_MX_SDIO_CONF@GOTPAGE
Lloh42:
	ldr	x9, [x9, _MESON_MX_SDIO_CONF@GOTPAGEOFF]
Lloh43:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	bl	_writel
	mov	x0, x21
	bl	_meson_mx_mmc_soft_reset
	mov	x0, x21
	bl	_meson_mx_mmc_add_host
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.23:
	ldr	x0, [x21, #8]
	bl	_clk_disable_unprepare
LBB0_24:
	ldr	x0, [x21]
	bl	_clk_disable_unprepare
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_meson_mx_mmc_timeout,4,2       ; @meson_mx_mmc_timeout
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_meson_mx_mmc_irq,4,2           ; @meson_mx_mmc_irq
	.comm	_meson_mx_mmc_irq_thread,4,2    ; @meson_mx_mmc_irq_thread
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"core"

l_.str.1:                               ; @.str.1
	.asciz	"clkin"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable core clock\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to enable MMC clock\n"

	.comm	_MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK,4,2 ; @MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK
	.comm	_MESON_MX_SDIO_CONF_M_ENDIAN_MASK,4,2 ; @MESON_MX_SDIO_CONF_M_ENDIAN_MASK
	.comm	_MESON_MX_SDIO_CONF_WRITE_NWR_MASK,4,2 ; @MESON_MX_SDIO_CONF_WRITE_NWR_MASK
	.comm	_MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK,4,2 ; @MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK
	.comm	_MESON_MX_SDIO_CONF,4,2         ; @MESON_MX_SDIO_CONF
	.no_dead_strip	_meson_mx_mmc_probe
.subsections_via_symbols
