	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_remove_dynamic_key      ## -- Begin function il4965_remove_dynamic_key
	.p2align	4, 0x90
_il4965_remove_dynamic_key:             ## @il4965_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, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	addq	$24, %rdi
	callq	_lockdep_assert_held
	decl	20(%rbx)
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	leaq	(%r12,%r12,2), %r15
	movl	8(%rax,%r15,8), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movq	_STA_KEY_FLG_KEYID_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %r14d
	sarl	%cl, %r14d
	andl	$3, %r14d
	movq	(%r13), %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_D_WEP
	cmpq	%r14, (%r13)
	jne	LBB0_1
## %bb.3:
	movl	%ebx, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movq	_STA_KEY_FLG_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax,%r15,8)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_IL_WARN
	movq	%rbx, %rdi
	jmp	LBB0_2
LBB0_1:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_2:
	callq	_spin_unlock_irqrestore
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	12(%rax,%r15,8), %edi
	leaq	16(%rbx), %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	8(%rbx), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	12(%rax,%rcx,8), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_IL_ERR
LBB0_7:
	movq	8(%rbx), %rax
	shlq	$3, %r12
	leaq	(%r12,%r12,2), %r14
	leaq	(%rax,%r14), %rdi
	addq	$16, %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	8(%rbx), %rax
	leaq	(%rax,%r14), %rdi
	addq	$8, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_STA_KEY_FLG_NO_ENC@GOTPCREL(%rip), %rax
	movq	_STA_KEY_FLG_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	8(%rbx), %rax
	movl	%ecx, 8(%rax,%r14)
	movl	8(%r13), %ecx
	movl	%ecx, 12(%rax,%r14)
	movq	_STA_MODIFY_KEY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax,%r14)
	movq	_STA_CONTROL_MODIFY_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax,%r14)
	movq	%rbx, %rdi
	callq	_il_is_rfkill
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_D_WEP
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	shlq	$3, %rsi
	addq	8(%rbx), %rsi
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_CMD_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_il_send_add_sta
	movl	%eax, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ## @STA_KEY_FLG_KEYID_POS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Remove dynamic key: idx=%d sta=%d\n"

	.comm	_STA_KEY_FLG_INVALID,4,2        ## @STA_KEY_FLG_INVALID
L_.str.1:                               ## @.str.1
	.asciz	"Removing wrong key %d 0x%x\n"

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

	.comm	_STA_KEY_FLG_NO_ENC,4,2         ## @STA_KEY_FLG_NO_ENC
	.comm	_STA_MODIFY_KEY_MASK,4,2        ## @STA_MODIFY_KEY_MASK
	.comm	_STA_CONTROL_MODIFY_MSK,4,2     ## @STA_CONTROL_MODIFY_MSK
L_.str.3:                               ## @.str.3
	.asciz	"Not sending C_ADD_STA command because RFKILL enabled.\n"

	.comm	_CMD_SYNC,4,2                   ## @CMD_SYNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_remove_dynamic_key      ; -- Begin function il4965_remove_dynamic_key
	.p2align	2
_il4965_remove_dynamic_key:             ; @il4965_remove_dynamic_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	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, x0, #24
	bl	_lockdep_assert_held
	ldr	w8, [x19, #20]
	sub	w8, w8, #1
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	mov	w9, #24
	madd	x8, x20, x9, x8
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	mov	x22, x0
Lloh0:
	adrp	x8, _STA_KEY_FLG_KEYID_POS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STA_KEY_FLG_KEYID_POS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w8, w0, w8
	and	w23, w8, #0x3
	ldr	x8, [x21]
	stp	x8, x20, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_WEP
	ldr	x8, [x21]
	cmp	x8, x23
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
	mov	w9, #24
	madd	x9, x20, x9, x8
	ldr	w9, [x9, #8]
Lloh5:
	adrp	x24, _STA_KEY_FLG_INVALID@GOTPAGE
Lloh6:
	ldr	x24, [x24, _STA_KEY_FLG_INVALID@GOTPAGEOFF]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_IL_WARN
	b	LBB0_7
LBB0_3:
	mov	w9, #24
	madd	x8, x20, x9, x8
	ldr	w0, [x8, #12]
	add	x1, x19, #16
	bl	_test_and_clear_bit
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x19, #8]
	mov	w9, #24
	madd	x8, x20, x9, x8
	ldr	w1, [x8, #12]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IL_ERR
LBB0_5:
	ldr	x8, [x19, #8]
	add	x9, x20, x20, lsl #1
	lsl	x22, x9, #3
	add	x8, x8, x22
	add	x0, x8, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	add	x0, x8, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh11:
	adrp	x8, _STA_KEY_FLG_NO_ENC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STA_KEY_FLG_NO_ENC@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	x9, [x19, #8]
	add	x9, x9, x22
	ldr	w10, [x21, #8]
	stp	w8, w10, [x9, #8]
Lloh14:
	adrp	x8, _STA_MODIFY_KEY_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STA_MODIFY_KEY_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x9, #4]
Lloh17:
	adrp	x8, _STA_CONTROL_MODIFY_MSK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STA_CONTROL_MODIFY_MSK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x9]
	mov	x0, x19
	bl	_il_is_rfkill
	cbz	x0, LBB0_9
; %bb.6:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_D_WEP
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_8:
	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
LBB0_9:
	ldr	x8, [x19, #8]
	mov	w9, #24
	madd	x1, x20, x9, x8
	add	x0, sp, #24
	mov	w2, #4
	bl	_memcpy
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh22:
	adrp	x8, _CMD_SYNC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CMD_SYNC@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	add	x1, sp, #24
	mov	x0, x19
	bl	_il_send_add_sta
	b	LBB0_8
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STA_KEY_FLG_KEYID_POS,4,2      ; @STA_KEY_FLG_KEYID_POS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Remove dynamic key: idx=%d sta=%d\n"

	.comm	_STA_KEY_FLG_INVALID,4,2        ; @STA_KEY_FLG_INVALID
l_.str.1:                               ; @.str.1
	.asciz	"Removing wrong key %d 0x%x\n"

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

	.comm	_STA_KEY_FLG_NO_ENC,4,2         ; @STA_KEY_FLG_NO_ENC
	.comm	_STA_MODIFY_KEY_MASK,4,2        ; @STA_MODIFY_KEY_MASK
	.comm	_STA_CONTROL_MODIFY_MSK,4,2     ; @STA_CONTROL_MODIFY_MSK
l_.str.3:                               ; @.str.3
	.asciz	"Not sending C_ADD_STA command because RFKILL enabled.\n"

	.comm	_CMD_SYNC,4,2                   ; @CMD_SYNC
.subsections_via_symbols
