	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_pci_remove
_rtsx_pci_remove:                       ## @rtsx_pci_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	%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, %r15
	callq	_pci_get_drvdata
	movq	%rax, %r14
	movq	72(%rax), %rbx
	movl	$1, (%rbx)
	leaq	60(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	_RTSX_BIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rtsx_pci_writel
	movq	$0, 64(%rbx)
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	leaq	56(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	leaq	52(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	leaq	16(%r15), %r12
	movq	%r12, %rdi
	callq	_mfd_remove_devices
	movq	24(%rbx), %rdi
	movq	_RTSX_RESV_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	48(%rbx), %edx
	movl	44(%rbx), %ecx
	callq	_dma_free_coherent
	movl	40(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movq	24(%rbx), %rdi
	callq	_pci_disable_msi
LBB0_2:
	movl	20(%rbx), %edi
	callq	_iounmap
	movq	%r15, %rdi
	callq	_pci_release_regions
	movq	%r15, %rdi
	callq	_pci_disable_device
	movq	_rtsx_pci_lock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movl	16(%rbx), %esi
	movq	_rtsx_pci_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%r13, %rdi
	callq	_spin_unlock
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r14, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_pci_name
	movl	(%r15), %r8d
	movl	8(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTSX_BIER,4,2                  ## @RTSX_BIER
	.comm	_RTSX_RESV_BUF_LEN,4,2          ## @RTSX_RESV_BUF_LEN
	.comm	_rtsx_pci_lock,4,2              ## @rtsx_pci_lock
	.comm	_rtsx_pci_idr,4,2               ## @rtsx_pci_idr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	": Realtek PCI-E Card Reader at %s [%04x:%04x] has been removed\n"

	.no_dead_strip	_rtsx_pci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_pci_remove
_rtsx_pci_remove:                       ; @rtsx_pci_remove
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	ldr	x21, [x0, #72]
	mov	w8, #1
	str	w8, [x21]
	add	x22, x21, #60
	mov	x0, x22
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _RTSX_BIER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTSX_BIER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_rtsx_pci_writel
	str	xzr, [x21, #64]
	mov	x0, x22
	bl	_spin_unlock_irq
	add	x0, x21, #56
	bl	_cancel_delayed_work_sync
	add	x0, x21, #52
	bl	_cancel_delayed_work_sync
	add	x22, x19, #16
	mov	x0, x22
	bl	_mfd_remove_devices
	ldr	x0, [x21, #24]
Lloh3:
	adrp	x8, _RTSX_RESV_BUF_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTSX_RESV_BUF_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	w3, w2, [x21, #44]
	bl	_dma_free_coherent
	ldr	w0, [x21, #40]
	mov	x1, x21
	bl	_free_irq
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x0, [x21, #24]
	bl	_pci_disable_msi
LBB0_2:
	ldr	w0, [x21, #20]
	bl	_iounmap
	mov	x0, x19
	bl	_pci_release_regions
	mov	x0, x19
	bl	_pci_disable_device
Lloh6:
	adrp	x23, _rtsx_pci_lock@GOTPAGE
Lloh7:
	ldr	x23, [x23, _rtsx_pci_lock@GOTPAGEOFF]
	mov	x0, x23
	bl	_spin_lock
	ldr	w1, [x21, #16]
Lloh8:
	adrp	x0, _rtsx_pci_idr@GOTPAGE
Lloh9:
	ldr	x0, [x0, _rtsx_pci_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x23
	bl	_spin_unlock
	ldr	x0, [x21, #8]
	bl	_kfree
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_pci_name
	mov	x2, x0
	ldr	w3, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w4, [x19]
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_dbg
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RTSX_BIER,4,2                  ; @RTSX_BIER
	.comm	_RTSX_RESV_BUF_LEN,4,2          ; @RTSX_RESV_BUF_LEN
	.comm	_rtsx_pci_lock,4,2              ; @rtsx_pci_lock
	.comm	_rtsx_pci_idr,4,2               ; @rtsx_pci_idr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	": Realtek PCI-E Card Reader at %s [%04x:%04x] has been removed\n"

	.no_dead_strip	_rtsx_pci_remove
.subsections_via_symbols
