	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmci_remove
_mmci_remove:                           ## @mmci_remove
	.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, %rbx
	callq	_amba_get_drvdata
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, %r15
	movq	16(%rax), %r12
	movq	%rbx, %rdi
	callq	_pm_runtime_get_sync
	movq	%r14, %rdi
	callq	_mmc_remove_host
	movq	_MMCIMASK0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.2:
	movq	_MMCIMASK1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
LBB0_3:
	movq	_MMCICOMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_MMCIDATACTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_mmci_dma_release
	movl	(%r15), %edi
	callq	_clk_disable_unprepare
	movq	%r14, %rdi
	callq	_mmc_free_host
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMCIMASK0,8,3                  ## @MMCIMASK0
	.comm	_MMCIMASK1,8,3                  ## @MMCIMASK1
	.comm	_MMCICOMMAND,8,3                ## @MMCICOMMAND
	.comm	_MMCIDATACTRL,8,3               ## @MMCIDATACTRL
	.no_dead_strip	_mmci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmci_remove
_mmci_remove:                           ; @mmci_remove
	.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	x21, x0
	bl	_amba_get_drvdata
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_mmc_priv
	mov	x20, x0
	ldr	x22, [x0, #16]
	mov	x0, x21
	bl	_pm_runtime_get_sync
	mov	x0, x19
	bl	_mmc_remove_host
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _MMCIMASK0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMCIMASK0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x22]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _MMCIMASK1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMCIMASK1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
LBB0_3:
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _MMCICOMMAND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMCICOMMAND@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _MMCIDATACTRL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMCIDATACTRL@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	mov	x0, x20
	bl	_mmci_dma_release
	ldr	w0, [x20]
	bl	_clk_disable_unprepare
	mov	x0, x19
	bl	_mmc_free_host
LBB0_4:
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MMCIMASK0,8,3                  ; @MMCIMASK0
	.comm	_MMCIMASK1,8,3                  ; @MMCIMASK1
	.comm	_MMCICOMMAND,8,3                ; @MMCICOMMAND
	.comm	_MMCIDATACTRL,8,3               ; @MMCIDATACTRL
	.no_dead_strip	_mmci_remove
.subsections_via_symbols
