	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_vif_remove                 ## -- Begin function wil_vif_remove
	.p2align	4, 0x90
_wil_vif_remove:                        ## @wil_vif_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	%rsi, %r15
	movq	%rdi, %rbx
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_wil_has_active_ifaces
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_ASSERT_RTNL
	movq	%rbx, %rdi
	callq	_GET_MAX_VIFS
	cmpq	%r15, %rax
	jbe	LBB0_1
## %bb.3:
	movq	24(%rbx), %rax
	movq	(%rax,%r15,8), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.5:
	leaq	32(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wil6210_disconnect
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_vif_to_ndev
	movq	%rax, %rdi
	callq	_unregister_netdevice
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.6:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_wmi_port_delete
LBB0_8:
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	24(%rbx), %rax
	movq	$0, (%rax,%r15,8)
	xorl	%eax, %eax
	callq	_wmb
	movq	_wil_status_napi_en@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	12(%rbx), %rdi
	callq	_napi_synchronize
	leaq	8(%rbx), %rdi
	callq	_napi_synchronize
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_flush_work
	leaq	20(%r14), %rdi
	callq	_del_timer_sync
	leaq	16(%r14), %rdi
	callq	_cancel_work_sync
	movq	%r14, %rdi
	callq	_wil_probe_client_flush
	leaq	12(%r14), %rdi
	callq	_cancel_work_sync
	addq	$8, %r14
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cancel_work_sync               ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wil_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid MID: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"MID %d not registered\n"

	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
	.comm	_wil_status_napi_en,4,2         ## @wil_status_napi_en
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wil_vif_remove                 ; -- Begin function wil_vif_remove
	.p2align	2
_wil_vif_remove:                        ; @wil_vif_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	x21, x1
	mov	x19, x0
	mov	w1, #1
	mov	w2, #0
	bl	_wil_has_active_ifaces
	mov	x22, x0
	bl	_ASSERT_RTNL
	mov	x0, x19
	bl	_GET_MAX_VIFS
	cmp	x0, x21
	b.ls	LBB0_8
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	x20, [x8, x21, lsl #3]
	cbz	x20, LBB0_9
; %bb.2:
	add	x23, x19, #32
	mov	x0, x23
	bl	_mutex_lock
Lloh0:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_wil6210_disconnect
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x20
	bl	_vif_to_ndev
	bl	_unregister_netdevice
	cbz	w22, LBB0_5
; %bb.3:
	ldr	x1, [x20]
	cbz	x1, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_wmi_port_delete
LBB0_5:
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19, #24]
	str	xzr, [x8, x21, lsl #3]
	bl	_wmb
Lloh3:
	adrp	x8, _wil_status_napi_en@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wil_status_napi_en@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_test_bit
	cbz	x0, LBB0_7
; %bb.6:
	add	x0, x19, #12
	bl	_napi_synchronize
	add	x0, x19, #8
	bl	_napi_synchronize
LBB0_7:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	bl	_flush_work
	add	x0, x20, #20
	bl	_del_timer_sync
	add	x0, x20, #16
	bl	_cancel_work_sync
	mov	x0, x20
	bl	_wil_probe_client_flush
	add	x0, x20, #12
	bl	_cancel_work_sync
	add	x0, x20, #8
	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	_cancel_work_sync
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x19
	mov	x2, x21
	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	_wil_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid MID: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"MID %d not registered\n"

	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
	.comm	_wil_status_napi_en,4,2         ; @wil_status_napi_en
.subsections_via_symbols
