	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_pci_remove
_mtip_pci_remove:                       ## @mtip_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_pci_get_drvdata
	movq	%rax, %r12
	movq	_MTIP_DDF_REMOVE_PENDING_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r15
	movq	%r15, %rsi
	callq	_set_bit
	movq	_dev_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	leaq	8(%r12), %rdi
	callq	_list_del_init
	movq	_removing_list@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_mtip_check_surprise_removal
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	_MTIP_DDF_CLEANUP_BIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movl	$20, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	$20, %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_mtip_command_cleanup
LBB0_12:
	movq	%r12, %rdi
	callq	_mtip_block_remove
	movq	%r14, %rdi
	callq	_pci_disable_msi
	movq	_dev_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_list_del_init
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	callq	_kfree
	movq	_MTIP_ABAR@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pcim_iounmap_regions           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ## @MTIP_DDF_REMOVE_PENDING_BIT
	.comm	_dev_lock,4,2                   ## @dev_lock
	.comm	_removing_list,4,2              ## @removing_list
	.comm	_MTIP_DDF_CLEANUP_BIT,4,2       ## @MTIP_DDF_CLEANUP_BIT
	.comm	_MTIP_ABAR,4,2                  ## @MTIP_ABAR
	.no_dead_strip	_mtip_pci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_pci_remove
_mtip_pci_remove:                       ; @mtip_pci_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	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x21, x20, #4
	mov	x1, x21
	bl	_set_bit
Lloh3:
	adrp	x22, _dev_lock@GOTPAGE
Lloh4:
	ldr	x22, [x22, _dev_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x0, x20, #8
	bl	_list_del_init
Lloh5:
	adrp	x1, _removing_list@GOTPAGE
Lloh6:
	ldr	x1, [x1, _removing_list@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_mtip_check_surprise_removal
	cbz	x0, LBB0_12
; %bb.1:
Lloh7:
	adrp	x22, _MTIP_DDF_CLEANUP_BIT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MTIP_DDF_CLEANUP_BIT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.2:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.3:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.4:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.5:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.6:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.7:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.8:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.9:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.10:
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_12
; %bb.11:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	bl	_mtip_command_cleanup
LBB0_12:
	mov	x0, x20
	bl	_mtip_block_remove
	mov	x0, x19
	bl	_pci_disable_msi
Lloh9:
	adrp	x21, _dev_lock@GOTPAGE
Lloh10:
	ldr	x21, [x21, _dev_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_list_del_init
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_kfree
Lloh11:
	adrp	x8, _MTIP_ABAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTIP_ABAR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w1, w9, w8
	mov	x0, x19
	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
	b	_pcim_iounmap_regions
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ; @MTIP_DDF_REMOVE_PENDING_BIT
	.comm	_dev_lock,4,2                   ; @dev_lock
	.comm	_removing_list,4,2              ; @removing_list
	.comm	_MTIP_DDF_CLEANUP_BIT,4,2       ; @MTIP_DDF_CLEANUP_BIT
	.comm	_MTIP_ABAR,4,2                  ; @MTIP_ABAR
	.no_dead_strip	_mtip_pci_remove
.subsections_via_symbols
