	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_rm_sta                 ## -- Begin function iwl_mvm_rm_sta
	.p2align	4, 0x90
_iwl_mvm_rm_sta:                        ## @iwl_mvm_rm_sta
	.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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_iwl_mvm_sta_from_mac80211
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	36(%rbx), %rdi
	callq	_lockdep_assert_held
	movq	%rbx, %rdi
	callq	_iwl_mvm_has_new_rx_api
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	24(%r14), %edi
	callq	_kfree
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_iwl_mvm_drain_sta
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_iwl_mvm_flush_sta
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.4:
	movq	%rbx, %rdi
	callq	_iwl_mvm_has_new_tx_api
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iwl_mvm_wait_sta_queues_empty
	jmp	LBB0_7
LBB0_6:
	movl	20(%r14), %esi
	movl	32(%rbx), %edi
	callq	_iwl_trans_wait_tx_queues_empty
LBB0_7:
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_8
LBB0_19:
	movl	%r13d, %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_iwl_mvm_drain_sta
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_iwl_mvm_disable_sta_queues
	movq	8(%r14), %r15
	movq	_IEEE80211_INVAL_HW_QUEUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_11
## %bb.9:
	movq	24(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax,%r15,4), %r8d
	movq	_IWL_MVM_QUEUE_RESERVED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	setne	%al
	movq	_IWL_MVM_QUEUE_FREE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r8d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_WARN
	testq	%rax, %rax
	je	LBB0_10
## %bb.18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_10:
	movq	_IWL_MVM_QUEUE_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15,4)
LBB0_11:
	movq	(%r12), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_15
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jne	LBB0_15
## %bb.13:
	cmpq	$0, 8(%r12)
	jne	LBB0_19
## %bb.14:
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_15:
	xorl	%edi, %edi
	cmpq	%rcx, 16(%rbx)
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	leaq	8(%rbx), %rdi
	callq	_cancel_delayed_work
LBB0_17:
	movq	%r14, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_iwl_mvm_rm_sta_common
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	xorl	%esi, %esi
	callq	_RCU_INIT_POINTER
	movl	%r15d, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_INVAL_HW_QUEUE,8,3   ## @IEEE80211_INVAL_HW_QUEUE
	.comm	_IWL_MVM_QUEUE_RESERVED,4,2     ## @IWL_MVM_QUEUE_RESERVED
	.comm	_IWL_MVM_QUEUE_FREE,4,2         ## @IWL_MVM_QUEUE_FREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sta_id %d reserved txq %d status %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_IWL_MVM_INVALID_STA,8,3        ## @IWL_MVM_INVALID_STA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_rm_sta                 ; -- Begin function iwl_mvm_rm_sta
	.p2align	2
_iwl_mvm_rm_sta:                        ; @iwl_mvm_rm_sta
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_iwl_mvm_vif_from_mac80211
	mov	x21, x0
	mov	x0, x24
	bl	_iwl_mvm_sta_from_mac80211
	mov	x20, x0
	ldr	x23, [x0]
	add	x0, x19, #36
	bl	_lockdep_assert_held
	mov	x0, x19
	bl	_iwl_mvm_has_new_rx_api
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #24]
	bl	_kfree
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_iwl_mvm_drain_sta
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	bl	_iwl_mvm_flush_sta
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.4:
	mov	x0, x19
	bl	_iwl_mvm_has_new_tx_api
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_mvm_wait_sta_queues_empty
	mov	x25, x0
	cbnz	w0, LBB0_14
	b	LBB0_7
LBB0_6:
	ldr	w1, [x20, #20]
	ldr	w0, [x19, #32]
	bl	_iwl_trans_wait_tx_queues_empty
	mov	x25, x0
	cbnz	w0, LBB0_14
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_iwl_mvm_drain_sta
	mov	x25, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	bl	_iwl_mvm_disable_sta_queues
	ldr	x24, [x20, #8]
Lloh0:
	adrp	x8, _IEEE80211_INVAL_HW_QUEUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_INVAL_HW_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x24, x8
	b.eq	LBB0_11
; %bb.8:
	ldr	x26, [x19, #24]
	ldr	w4, [x26, x24, lsl #2]
Lloh3:
	adrp	x8, _IWL_MVM_QUEUE_RESERVED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_MVM_QUEUE_RESERVED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w4, w8
Lloh6:
	adrp	x27, _IWL_MVM_QUEUE_FREE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _IWL_MVM_QUEUE_FREE@GOTPAGEOFF]
	ldr	w8, [x27]
	ccmp	w4, w8, #4, ne
	cset	w0, ne
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x24
	bl	_WARN
	cbz	x0, LBB0_10
; %bb.9:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_14
LBB0_10:
	ldr	w8, [x27]
	str	w8, [x26, x24, lsl #2]
LBB0_11:
	ldr	x8, [x22]
Lloh13:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.12:
	ldr	x8, [x21]
	cmp	x8, x23
	b.ne	LBB0_17
; %bb.13:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_16
LBB0_14:
	mov	x0, x25
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh16:
	adrp	x8, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_17:
	ldr	x8, [x19, #16]
	cmp	x8, x23
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_19
; %bb.18:
Lloh19:
	adrp	x8, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	add	x0, x19, #8
	bl	_cancel_delayed_work
LBB0_19:
	add	x21, x20, #16
	mov	x0, x21
	bl	_spin_lock_bh
	mov	x0, x21
	bl	_spin_unlock_bh
	ldr	x1, [x20]
	mov	x0, x19
	bl	_iwl_mvm_rm_sta_common
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x9, [x20]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, #0
	bl	_RCU_INIT_POINTER
	mov	x0, x21
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_INVAL_HW_QUEUE,8,3   ; @IEEE80211_INVAL_HW_QUEUE
	.comm	_IWL_MVM_QUEUE_RESERVED,4,2     ; @IWL_MVM_QUEUE_RESERVED
	.comm	_IWL_MVM_QUEUE_FREE,4,2         ; @IWL_MVM_QUEUE_FREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sta_id %d reserved txq %d status %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_IWL_MVM_INVALID_STA,8,3        ; @IWL_MVM_INVALID_STA
.subsections_via_symbols
