	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_remove_dynamic_key         ## -- Begin function iwl_remove_dynamic_key
	.p2align	4, 0x90
_iwl_remove_dynamic_key:                ## @iwl_remove_dynamic_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	4(%rsi), %esi
	movq	%rcx, %rdx
	callq	_iwlagn_key_sta_id
	movq	_IWL_INVALID_STATION@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movq	%rax, %rbx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %r13
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movq	16(%r12), %rax
	leaq	(%rax,%rbx,8), %rsi
	addq	$4, %rsi
	leaq	-56(%rbp), %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	16(%r12), %rax
	movq	_IWL_STA_UCODE_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax,%rbx,8), %ecx
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rbx
LBB0_4:
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	xorl	%eax, %eax
	cmpq	(%r14), %rbx
	je	LBB0_10
## %bb.5:
	leaq	4(%r12), %rdi
	callq	_lockdep_assert_held
	decl	(%r15)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_IWL_DEBUG_WEP
	movl	8(%r14), %edi
	movq	%r12, %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
LBB0_7:
	movl	(%r14), %edi
	movq	_STA_KEY_FLG_KEYID_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	callq	_cpu_to_le16
	movq	_STA_KEY_FLG_MAP_KEY_MSK@GOTPCREL(%rip), %rsi
	movq	_STA_KEY_FLG_NO_ENC@GOTPCREL(%rip), %rdx
	movq	_STA_KEY_FLG_INVALID@GOTPCREL(%rip), %rcx
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	movl	$0, %edi
	andl	4(%r14), %ebx
	jne	LBB0_9
## %bb.8:
	movq	_STA_KEY_MULTICAST_MSK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
LBB0_9:
	orl	(%rsi), %eax
	orl	(%rdx), %eax
	orl	(%rcx), %eax
	orl	%edi, %eax
	movl	%eax, -48(%rbp)
	movl	8(%r14), %eax
	movl	%eax, -44(%rbp)
	movq	_STA_MODIFY_KEY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_STA_CONTROL_MODIFY_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_iwl_send_add_sta
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_INVALID_STATION,8,3        ## @IWL_INVALID_STATION
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IWL_STA_UCODE_ACTIVE,4,2       ## @IWL_STA_UCODE_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Remove dynamic key: idx=%d sta=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"offset %d not used in uCode key table.\n"

	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ## @STA_KEY_FLG_KEYID_POS
	.comm	_STA_KEY_FLG_MAP_KEY_MSK,4,2    ## @STA_KEY_FLG_MAP_KEY_MSK
	.comm	_STA_KEY_FLG_NO_ENC,4,2         ## @STA_KEY_FLG_NO_ENC
	.comm	_STA_KEY_FLG_INVALID,4,2        ## @STA_KEY_FLG_INVALID
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_STA_KEY_MULTICAST_MSK,4,2      ## @STA_KEY_MULTICAST_MSK
	.comm	_STA_MODIFY_KEY_MASK,4,2        ## @STA_MODIFY_KEY_MASK
	.comm	_STA_CONTROL_MODIFY_MSK,4,2     ## @STA_CONTROL_MODIFY_MSK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_remove_dynamic_key         ; -- Begin function iwl_remove_dynamic_key
	.p2align	2
_iwl_remove_dynamic_key:                ; @iwl_remove_dynamic_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w1, [x1, #4]
	mov	x2, x3
	bl	_iwlagn_key_sta_id
Lloh0:
	adrp	x24, _IWL_INVALID_STATION@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IWL_INVALID_STATION@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x22, x0
	add	x23, x19, #8
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	x8, [x19, #16]
	lsl	x25, x22, #3
	add	x8, x8, x25
	add	x1, x8, #4
	mov	x0, sp
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x25]
Lloh5:
	adrp	x9, _IWL_STA_UCODE_ACTIVE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IWL_STA_UCODE_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldr	x10, [x24]
	tst	w9, w8
	csel	x22, x10, x22, eq
	mov	x0, x23
	bl	_spin_unlock_bh
	ldr	x8, [x24]
	cmp	x22, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
	add	x0, x19, #4
	bl	_lockdep_assert_held
	ldr	w8, [x21]
	sub	w8, w8, #1
	str	w8, [x21]
	ldr	w2, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_IWL_DEBUG_WEP
	ldr	w0, [x20, #8]
	mov	x1, x19
	bl	_test_and_clear_bit
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w2, [x20, #8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_6:
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _STA_KEY_FLG_KEYID_POS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _STA_KEY_FLG_KEYID_POS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le16
Lloh15:
	adrp	x8, _STA_KEY_FLG_MAP_KEY_MSK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STA_KEY_FLG_MAP_KEY_MSK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _STA_KEY_FLG_NO_ENC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _STA_KEY_FLG_NO_ENC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _STA_KEY_FLG_INVALID@GOTPAGE
Lloh22:
	ldr	x10, [x10, _STA_KEY_FLG_INVALID@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh25:
	ldr	x11, [x11, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
Lloh27:
	adrp	x12, _STA_KEY_MULTICAST_MSK@GOTPAGE
Lloh28:
	ldr	x12, [x12, _STA_KEY_MULTICAST_MSK@GOTPAGEOFF]
Lloh29:
	ldr	w12, [x12]
	ldp	w13, w14, [x20, #4]
	tst	w11, w13
	csel	w11, w12, wzr, eq
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	stp	w8, w14, [sp, #8]
Lloh30:
	adrp	x8, _STA_MODIFY_KEY_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _STA_MODIFY_KEY_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _STA_CONTROL_MODIFY_MSK@GOTPAGE
Lloh34:
	ldr	x9, [x9, _STA_CONTROL_MODIFY_MSK@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	stp	w9, w8, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #0
	bl	_iwl_send_add_sta
LBB0_7:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_INVALID_STATION,8,3        ; @IWL_INVALID_STATION
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IWL_STA_UCODE_ACTIVE,4,2       ; @IWL_STA_UCODE_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Remove dynamic key: idx=%d sta=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"offset %d not used in uCode key table.\n"

	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ; @STA_KEY_FLG_KEYID_POS
	.comm	_STA_KEY_FLG_MAP_KEY_MSK,4,2    ; @STA_KEY_FLG_MAP_KEY_MSK
	.comm	_STA_KEY_FLG_NO_ENC,4,2         ; @STA_KEY_FLG_NO_ENC
	.comm	_STA_KEY_FLG_INVALID,4,2        ; @STA_KEY_FLG_INVALID
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_STA_KEY_MULTICAST_MSK,4,2      ; @STA_KEY_MULTICAST_MSK
	.comm	_STA_MODIFY_KEY_MASK,4,2        ; @STA_MODIFY_KEY_MASK
	.comm	_STA_CONTROL_MODIFY_MSK,4,2     ; @STA_CONTROL_MODIFY_MSK
.subsections_via_symbols
