	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_remove
_mwl8k_remove:                          ## @mwl8k_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, %r14
	callq	_pci_get_drvdata
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r15
	movq	(%rax), %r12
	leaq	36(%r12), %rdi
	callq	_wait_for_completion
	movq	(%r12), %rax
	movq	_FW_STATE_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_mwl8k_hw_reset
	jmp	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_ieee80211_stop_queues
	movq	%r15, %rdi
	callq	_ieee80211_unregister_hw
	leaq	32(%r12), %rdi
	callq	_tasklet_kill
	leaq	28(%r12), %rdi
	callq	_tasklet_kill
	movq	%r12, %rdi
	callq	_mwl8k_hw_reset
	movq	%r12, %rdi
	callq	_mwl8k_tx_queues
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_INT_MAX@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_mwl8k_txq_reclaim
	incl	%ebx
	movq	%r12, %rdi
	callq	_mwl8k_tx_queues
	cmpl	%eax, %ebx
	jl	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_mwl8k_tx_queues
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mwl8k_txq_deinit
	incl	%ebx
	movq	%r12, %rdi
	callq	_mwl8k_tx_queues
	cmpl	%eax, %ebx
	jl	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mwl8k_rxq_deinit
	movl	24(%r12), %edi
	movl	16(%r12), %ecx
	movl	20(%r12), %edx
	movl	$4, %esi
	callq	_pci_free_consistent
LBB0_10:
	movl	12(%r12), %esi
	movq	%r14, %rdi
	callq	_pci_iounmap
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_pci_iounmap
	movq	%r15, %rdi
	callq	_ieee80211_free_hw
	movq	%r14, %rdi
	callq	_pci_release_regions
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_disable_device             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_STATE_ERROR,8,3             ## @FW_STATE_ERROR
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_mwl8k_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_remove
_mwl8k_remove:                          ; @mwl8k_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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x21, [x0]
	add	x0, x21, #36
	bl	_wait_for_completion
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _FW_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FW_STATE_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_mwl8k_hw_reset
	b	LBB0_11
LBB0_3:
	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
	ret
LBB0_4:
	mov	x0, x20
	bl	_ieee80211_stop_queues
	mov	x0, x20
	bl	_ieee80211_unregister_hw
	add	x0, x21, #32
	bl	_tasklet_kill
	add	x0, x21, #28
	bl	_tasklet_kill
	mov	x0, x21
	bl	_mwl8k_hw_reset
	mov	x0, x21
	bl	_mwl8k_tx_queues
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w22, #0
Lloh3:
	adrp	x23, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x23, [x23, _INT_MAX@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #1
	bl	_mwl8k_txq_reclaim
	add	w22, w22, #1
	mov	x0, x21
	bl	_mwl8k_tx_queues
	cmp	w22, w0
	b.lt	LBB0_6
LBB0_7:
	mov	x0, x21
	bl	_mwl8k_tx_queues
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_mwl8k_txq_deinit
	add	w22, w22, #1
	mov	x0, x21
	bl	_mwl8k_tx_queues
	cmp	w22, w0
	b.lt	LBB0_9
LBB0_10:
	mov	x0, x20
	mov	w1, #0
	bl	_mwl8k_rxq_deinit
	ldp	w2, w0, [x21, #20]
	ldr	w3, [x21, #16]
	mov	w1, #4
	bl	_pci_free_consistent
LBB0_11:
	ldr	w1, [x21, #12]
	mov	x0, x19
	bl	_pci_iounmap
	ldr	w1, [x21, #8]
	mov	x0, x19
	bl	_pci_iounmap
	mov	x0, x20
	bl	_ieee80211_free_hw
	mov	x0, x19
	bl	_pci_release_regions
	mov	x0, x19
	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	_pci_disable_device
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_STATE_ERROR,8,3             ; @FW_STATE_ERROR
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_mwl8k_remove
.subsections_via_symbols
