	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3cmci_remove
_s3cmci_remove:                         ## @s3cmci_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, %r15
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_s3cmci_shutdown
	movl	24(%r12), %edi
	callq	_clk_put
	leaq	20(%r12), %rdi
	callq	_tasklet_disable
	movq	%r12, %rdi
	callq	_s3cmci_host_usedma
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	16(%r12), %edi
	callq	_dma_release_channel
LBB0_2:
	movl	12(%r12), %edi
	movq	%r12, %rsi
	callq	_free_irq
	cmpl	$0, (%r15)
	jne	LBB0_5
## %bb.3:
	movl	$5, %edi
	callq	_S3C2410_GPE
	movl	%eax, %ebx
	movl	$10, %edi
	callq	_S3C2410_GPE
	cmpl	%eax, %ebx
	jg	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_gpio_free
	leal	1(%rbx), %r15d
	movl	$10, %edi
	callq	_S3C2410_GPE
	cmpl	%eax, %ebx
	movl	%r15d, %ebx
	jl	LBB0_4
LBB0_5:
	movl	8(%r12), %edi
	callq	_iounmap
	movq	(%r12), %rdi
	movl	(%rdi), %ebx
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	movq	%r14, %rdi
	callq	_mmc_free_host
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_s3cmci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3cmci_remove
_s3cmci_remove:                         ; @s3cmci_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
	mov	x19, x0
	bl	_mmc_priv
	mov	x20, x0
	mov	x0, x21
	bl	_s3cmci_shutdown
	ldr	w0, [x20, #24]
	bl	_clk_put
	add	x0, x20, #20
	bl	_tasklet_disable
	mov	x0, x20
	bl	_s3cmci_host_usedma
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #16]
	bl	_dma_release_channel
LBB0_2:
	ldr	w0, [x20, #12]
	mov	x1, x20
	bl	_free_irq
	ldr	w8, [x21]
	cbnz	w8, LBB0_5
; %bb.3:
	mov	w0, #5
	bl	_S3C2410_GPE
	mov	x21, x0
	mov	w0, #10
	bl	_S3C2410_GPE
	cmp	w21, w0
	b.gt	LBB0_5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_gpio_free
	add	w22, w21, #1
	mov	w0, #10
	bl	_S3C2410_GPE
	cmp	w21, w0
	mov	x21, x22
	b.lt	LBB0_4
LBB0_5:
	ldr	w0, [x20, #8]
	bl	_iounmap
	ldr	x0, [x20]
	ldr	w20, [x0]
	bl	_resource_size
	mov	x1, x0
	mov	x0, x20
	bl	_release_mem_region
	mov	x0, x19
	bl	_mmc_free_host
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_s3cmci_remove
.subsections_via_symbols
