	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_mac_ctxt_remove        ## -- Begin function iwl_mvm_mac_ctxt_remove
	.p2align	4, 0x90
_iwl_mvm_mac_ctxt_remove:               ## @iwl_mvm_mac_ctxt_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	movq	%rax, %r12
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	sete	%bl
	movl	8(%r14), %r15d
	movq	%r14, %rdi
	callq	_ieee80211_vif_type_p2p
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_WARN_ONCE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	movq	%r13, %rbx
	leaq	-56(%rbp), %r13
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	callq	_FW_CMD_ID_AND_COLOR
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, -48(%rbp)
	movq	_FW_CTXT_ACTION_REMOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -56(%rbp)
	movq	_MAC_CONTEXT_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$16, %ecx
	movq	%r13, %r8
	callq	_iwl_mvm_send_cmd_pdu
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_IWL_ERR
	movl	%r13d, %r15d
	jmp	LBB0_6
LBB0_4:
	movl	$0, (%r12)
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_IEEE80211_HW_RX_INCLUDES_FCS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	callq	___clear_bit
	movq	%rbx, %rdi
	callq	_iwl_mvm_dealloc_snif_sta
LBB0_6:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Removing inactive MAC %pM/%d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_FW_CTXT_ACTION_REMOVE,4,2      ## @FW_CTXT_ACTION_REMOVE
	.comm	_MAC_CONTEXT_CMD,4,2            ## @MAC_CONTEXT_CMD
L_.str.1:                               ## @.str.1
	.asciz	"Failed to remove MAC context: %d\n"

	.comm	_NL80211_IFTYPE_MONITOR,8,3     ## @NL80211_IFTYPE_MONITOR
	.comm	_IEEE80211_HW_RX_INCLUDES_FCS,4,2 ## @IEEE80211_HW_RX_INCLUDES_FCS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_mac_ctxt_remove        ; -- Begin function iwl_mvm_mac_ctxt_remove
	.p2align	2
_iwl_mvm_mac_ctxt_remove:               ; @iwl_mvm_mac_ctxt_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_iwl_mvm_vif_from_mac80211
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #0
	cset	w22, eq
	ldr	w23, [x20, #8]
	mov	x0, x20
	bl	_ieee80211_vif_type_p2p
	mov	x3, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_WARN_ONCE
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_2:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldp	w1, w0, [x21, #4]
	bl	_FW_CMD_ID_AND_COLOR
	bl	_cpu_to_le32
	str	x0, [sp, #8]
Lloh5:
	adrp	x8, _FW_CTXT_ACTION_REMOVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FW_CTXT_ACTION_REMOVE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp]
Lloh8:
	adrp	x8, _MAC_CONTEXT_CMD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAC_CONTEXT_CMD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x4, sp
	mov	x0, x19
	mov	w2, #0
	mov	w3, #16
	bl	_iwl_mvm_send_cmd_pdu
	mov	x22, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_IWL_ERR
	b	LBB0_6
LBB0_4:
	str	wzr, [x21]
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh16:
	adrp	x8, _IEEE80211_HW_RX_INCLUDES_FCS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IEEE80211_HW_RX_INCLUDES_FCS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	___clear_bit
	mov	x0, x19
	bl	_iwl_mvm_dealloc_snif_sta
	mov	w22, #0
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Removing inactive MAC %pM/%d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_FW_CTXT_ACTION_REMOVE,4,2      ; @FW_CTXT_ACTION_REMOVE
	.comm	_MAC_CONTEXT_CMD,4,2            ; @MAC_CONTEXT_CMD
l_.str.1:                               ; @.str.1
	.asciz	"Failed to remove MAC context: %d\n"

	.comm	_NL80211_IFTYPE_MONITOR,8,3     ; @NL80211_IFTYPE_MONITOR
	.comm	_IEEE80211_HW_RX_INCLUDES_FCS,4,2 ; @IEEE80211_HW_RX_INCLUDES_FCS
.subsections_via_symbols
