	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __iwl_mvm_remove_sta_key
___iwl_mvm_remove_sta_key:              ## @__iwl_mvm_remove_sta_key
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	_IWL_UCODE_TLV_API_TKIP_MIC_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fw_has_api
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	%r13, (%rcx)
	je	LBB0_6
## %bb.1:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	_STA_KEY_FLG_KEYID_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	movq	_STA_KEY_FLG_KEYID_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_STA_KEY_FLG_NO_ENC@GOTPCREL(%rip), %rax
	movq	_STA_KEY_FLG_WEP_KEY_MAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%r15d, %r12d
	movl	%eax, %r15d
	movq	_STA_KEY_NOT_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:
	movq	_STA_KEY_MULTICAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	orl	%eax, %ebx
LBB0_3:
	movl	%ebx, -68(%rbp)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	%eax, -72(%rbp)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movl	$4, %eax
	movl	$16, %edx
	cmovel	%eax, %edx
	movq	%r13, -80(%rbp)
	movl	$128, -44(%rbp)
	movq	_ADD_STA_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	callq	_iwl_mvm_send_cmd_pdu_status
	cmpl	$128, -44(%rbp)
	jne	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_IWL_DEBUG_WEP
	jmp	LBB0_6
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_IWL_ERR
LBB0_6:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_UCODE_TLV_API_TKIP_MIC_KEYS,4,2 ## @IWL_UCODE_TLV_API_TKIP_MIC_KEYS
	.comm	_IWL_MVM_INVALID_STA,8,3        ## @IWL_MVM_INVALID_STA
	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ## @STA_KEY_FLG_KEYID_POS
	.comm	_STA_KEY_FLG_KEYID_MSK,4,2      ## @STA_KEY_FLG_KEYID_MSK
	.comm	_STA_KEY_FLG_NO_ENC,4,2         ## @STA_KEY_FLG_NO_ENC
	.comm	_STA_KEY_FLG_WEP_KEY_MAP,4,2    ## @STA_KEY_FLG_WEP_KEY_MAP
	.comm	_STA_KEY_NOT_VALID,4,2          ## @STA_KEY_NOT_VALID
	.comm	_STA_KEY_MULTICAST,4,2          ## @STA_KEY_MULTICAST
	.comm	_ADD_STA_KEY,4,2                ## @ADD_STA_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MODIFY_STA: remove sta key passed\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"MODIFY_STA: remove sta key failed\n"

	.no_dead_strip	___iwl_mvm_remove_sta_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __iwl_mvm_remove_sta_key
___iwl_mvm_remove_sta_key:              ; @__iwl_mvm_remove_sta_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _IWL_UCODE_TLV_API_TKIP_MIC_KEYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_UCODE_TLV_API_TKIP_MIC_KEYS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fw_has_api
Lloh3:
	adrp	x8, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_7
LBB0_2:
	mov	x22, x0
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _STA_KEY_FLG_KEYID_POS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _STA_KEY_FLG_KEYID_POS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh9:
	adrp	x9, _STA_KEY_FLG_KEYID_MSK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STA_KEY_FLG_KEYID_MSK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w0, w8, w9
	bl	_cpu_to_le16
	mov	x24, x0
Lloh12:
	adrp	x8, _STA_KEY_FLG_NO_ENC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STA_KEY_FLG_NO_ENC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _STA_KEY_FLG_WEP_KEY_MAP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STA_KEY_FLG_WEP_KEY_MAP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le16
	orr	w24, w0, w24
Lloh18:
	adrp	x8, _STA_KEY_NOT_VALID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STA_KEY_NOT_VALID@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	orr	w24, w24, w0
	cbz	w23, LBB0_4
; %bb.3:
Lloh21:
	adrp	x8, _STA_KEY_MULTICAST@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STA_KEY_MULTICAST@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	orr	w24, w0, w24
LBB0_4:
	ldr	w8, [x21, #4]
	stp	w8, w24, [sp, #24]
	str	x20, [sp, #16]
	mov	w8, #16
	mov	w9, #4
	cmp	w22, #0
	csel	w2, w9, w8, eq
	mov	w8, #128
	str	w8, [sp, #12]
Lloh24:
	adrp	x8, _ADD_STA_KEY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ADD_STA_KEY@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x3, sp, #16
	add	x4, sp, #12
	mov	x0, x19
	bl	_iwl_mvm_send_cmd_pdu_status
	ldr	w8, [sp, #12]
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.5:
	mov	x20, x0
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_WEP
	b	LBB0_7
LBB0_6:
Lloh29:
	adrp	x8, _EIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w20, w8
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_7:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_UCODE_TLV_API_TKIP_MIC_KEYS,4,2 ; @IWL_UCODE_TLV_API_TKIP_MIC_KEYS
	.comm	_IWL_MVM_INVALID_STA,8,3        ; @IWL_MVM_INVALID_STA
	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ; @STA_KEY_FLG_KEYID_POS
	.comm	_STA_KEY_FLG_KEYID_MSK,4,2      ; @STA_KEY_FLG_KEYID_MSK
	.comm	_STA_KEY_FLG_NO_ENC,4,2         ; @STA_KEY_FLG_NO_ENC
	.comm	_STA_KEY_FLG_WEP_KEY_MAP,4,2    ; @STA_KEY_FLG_WEP_KEY_MAP
	.comm	_STA_KEY_NOT_VALID,4,2          ; @STA_KEY_NOT_VALID
	.comm	_STA_KEY_MULTICAST,4,2          ; @STA_KEY_MULTICAST
	.comm	_ADD_STA_KEY,4,2                ; @ADD_STA_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MODIFY_STA: remove sta key passed\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"MODIFY_STA: remove sta key failed\n"

	.no_dead_strip	___iwl_mvm_remove_sta_key
.subsections_via_symbols
