	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxamci_remove
_pxamci_remove:                         ## @pxamci_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_platform_get_drvdata
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mmc_remove_host
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	callq	_pxamci_stop_clock
	movq	_TXFIFO_WR_REQ@GOTPCREL(%rip), %rax
	movq	_RXFIFO_RD_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_CLK_IS_OFF@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_STOP_CMD@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_END_CMD_RES@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PRG_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_DATA_TRAN_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_MMC_I_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	4(%rbx), %edi
	callq	_dmaengine_terminate_all
	movl	(%rbx), %edi
	callq	_dmaengine_terminate_all
	movl	4(%rbx), %edi
	callq	_dma_release_channel
	movl	(%rbx), %edi
	callq	_dma_release_channel
	movq	%r14, %rdi
	callq	_mmc_free_host
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TXFIFO_WR_REQ,4,2              ## @TXFIFO_WR_REQ
	.comm	_RXFIFO_RD_REQ,4,2              ## @RXFIFO_RD_REQ
	.comm	_CLK_IS_OFF,4,2                 ## @CLK_IS_OFF
	.comm	_STOP_CMD,4,2                   ## @STOP_CMD
	.comm	_END_CMD_RES,4,2                ## @END_CMD_RES
	.comm	_PRG_DONE,4,2                   ## @PRG_DONE
	.comm	_DATA_TRAN_DONE,4,2             ## @DATA_TRAN_DONE
	.comm	_MMC_I_MASK,8,3                 ## @MMC_I_MASK
	.no_dead_strip	_pxamci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxamci_remove
_pxamci_remove:                         ; @pxamci_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	_platform_get_drvdata
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_mmc_priv
	mov	x20, x0
	mov	x0, x19
	bl	_mmc_remove_host
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	blr	x8
LBB0_4:
	mov	x0, x20
	bl	_pxamci_stop_clock
Lloh0:
	adrp	x8, _TXFIFO_WR_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TXFIFO_WR_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RXFIFO_RD_REQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RXFIFO_RD_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _CLK_IS_OFF@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CLK_IS_OFF@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _STOP_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STOP_CMD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _END_CMD_RES@GOTPAGE
Lloh13:
	ldr	x9, [x9, _END_CMD_RES@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _PRG_DONE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PRG_DONE@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh17:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _DATA_TRAN_DONE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DATA_TRAN_DONE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x20, #8]
Lloh21:
	adrp	x9, _MMC_I_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MMC_I_MASK@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x20, #4]
	bl	_dmaengine_terminate_all
	ldr	w0, [x20]
	bl	_dmaengine_terminate_all
	ldr	w0, [x20, #4]
	bl	_dma_release_channel
	ldr	w0, [x20]
	bl	_dma_release_channel
	mov	x0, x19
	bl	_mmc_free_host
LBB0_5:
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TXFIFO_WR_REQ,4,2              ; @TXFIFO_WR_REQ
	.comm	_RXFIFO_RD_REQ,4,2              ; @RXFIFO_RD_REQ
	.comm	_CLK_IS_OFF,4,2                 ; @CLK_IS_OFF
	.comm	_STOP_CMD,4,2                   ; @STOP_CMD
	.comm	_END_CMD_RES,4,2                ; @END_CMD_RES
	.comm	_PRG_DONE,4,2                   ; @PRG_DONE
	.comm	_DATA_TRAN_DONE,4,2             ; @DATA_TRAN_DONE
	.comm	_MMC_I_MASK,8,3                 ; @MMC_I_MASK
	.no_dead_strip	_pxamci_remove
.subsections_via_symbols
