	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxart_remove
_moxart_remove:                         ## @moxart_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, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dev_set_drvdata
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	movl	12(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	12(%r14), %edi
	callq	_dma_release_channel
LBB0_3:
	movl	8(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	8(%r14), %edi
	callq	_dma_release_channel
LBB0_5:
	movq	%r15, %rdi
	callq	_mmc_remove_host
	movq	%r15, %rdi
	callq	_mmc_free_host
	movq	_REG_INTERRUPT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_REG_POWER_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_REG_CLOCK_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_CLK_OFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	movl	%eax, %edi
	callq	_writel
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_INTERRUPT_MASK,8,3         ## @REG_INTERRUPT_MASK
	.comm	_REG_POWER_CONTROL,8,3          ## @REG_POWER_CONTROL
	.comm	_REG_CLOCK_CONTROL,8,3          ## @REG_CLOCK_CONTROL
	.comm	_CLK_OFF,4,2                    ## @CLK_OFF
	.no_dead_strip	_moxart_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxart_remove
_moxart_remove:                         ; @moxart_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	_dev_get_drvdata
	mov	x20, x0
	bl	_mmc_priv
	mov	x19, x0
	mov	x0, x21
	mov	x1, #0
	bl	_dev_set_drvdata
	cbz	x20, LBB0_6
; %bb.1:
	ldr	w0, [x19, #12]
	bl	_IS_ERR
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #12]
	bl	_dma_release_channel
LBB0_3:
	ldr	w0, [x19, #8]
	bl	_IS_ERR
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
	bl	_dma_release_channel
LBB0_5:
	mov	x0, x20
	bl	_mmc_remove_host
	mov	x0, x20
	bl	_mmc_free_host
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _REG_INTERRUPT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REG_INTERRUPT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _REG_POWER_CONTROL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_POWER_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19]
Lloh6:
	adrp	x20, _REG_CLOCK_CONTROL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REG_CLOCK_CONTROL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh8:
	adrp	x8, _CLK_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CLK_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
LBB0_6:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_INTERRUPT_MASK,8,3         ; @REG_INTERRUPT_MASK
	.comm	_REG_POWER_CONTROL,8,3          ; @REG_POWER_CONTROL
	.comm	_REG_CLOCK_CONTROL,8,3          ; @REG_CLOCK_CONTROL
	.comm	_CLK_OFF,4,2                    ; @CLK_OFF
	.no_dead_strip	_moxart_remove
.subsections_via_symbols
