	.file	"extr_mac80211.c_iwl_mvm_stop_ap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	iwl_mvm_stop_ap, @function
iwl_mvm_stop_ap:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	IWL_MAC80211_GET_MVM@PLT
	mov	rdi, r12
	mov	rbp, rax
	call	iwl_mvm_vif_from_mac80211@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	rbx, rax
	call	iwl_mvm_prepare_mac_removal@PLT
	mov	rdi, rbp
	call	mutex_lock@PLT
	cmp	QWORD PTR [r12], 0
	mov	DWORD PTR [rbx], 0
	je	.L2
	mov	rsi, QWORD PTR 8[rbp]
	test	rsi, rsi
	jne	.L8
.L2:
	mov	rdi, rbp
	xor	esi, esi
	call	iwl_mvm_update_quotas@PLT
	lea	rsi, 4[rbx]
	mov	rdi, rbp
	call	iwl_mvm_send_rm_bcast_sta@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	iwl_mvm_binding_remove_vif@PLT
	mov	rdi, rbp
	mov	rsi, r12
	call	iwl_mvm_mac_ctxt_remove@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mutex_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, rbp
	call	iwl_mvm_mac_ctxt_changed@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	iwl_mvm_stop_ap, .-iwl_mvm_stop_ap
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mac80211.c_iwl_mvm_stop_ap.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	iwl_mvm_stop_ap, %function
iwl_mvm_stop_ap:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	bl	IWL_MAC80211_GET_MVM
	mov	r4, r0
	mov	r0, r5
	bl	iwl_mvm_vif_from_mac80211
	mov	r1, r5
	mov	r6, r0
	mov	r0, r4
	bl	iwl_mvm_prepare_mac_removal
	mov	r0, r4
	bl	mutex_lock
	mov	r2, #0
	ldr	r3, [r5]
	str	r2, [r6]
	cmp	r3, r2
	beq	.L2
	ldr	r1, [r4, #4]
	cmp	r1, r2
	bne	.L11
.L2:
	mov	r1, #0
	mov	r0, r4
	bl	iwl_mvm_update_quotas
	add	r1, r6, #4
	mov	r0, r4
	bl	iwl_mvm_send_rm_bcast_sta
	mov	r1, r5
	mov	r0, r4
	bl	iwl_mvm_binding_remove_vif
	mov	r1, r5
	mov	r0, r4
	bl	iwl_mvm_mac_ctxt_remove
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	mutex_unlock
.L11:
	mov	r0, r4
	bl	iwl_mvm_mac_ctxt_changed
	b	.L2
	.size	iwl_mvm_stop_ap, .-iwl_mvm_stop_ap
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
