	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_mac_set_key
_il3945_mac_set_key:                    ## @il3945_mac_set_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	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	(%rdi), %r12
	movq	_IL_INVALID_STATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	_il3945_mod_params@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_22
LBB0_3:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_6:
	movq	%r12, %r14
	movq	%r12, %rdi
	callq	_il_is_associated
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_il_sta_id_or_broadcast
	movq	%rax, %rbx
	movq	_IL_INVALID_STATION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_22
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	$100, %esi
	callq	_il_scan_cancel_timeout
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	$129, %r15d
	je	LBB0_16
## %bb.10:
	cmpl	$128, %r15d
	jne	LBB0_20
## %bb.11:
	movq	%r14, %rdi
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.13:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_il3945_set_dynamic_key
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	jmp	LBB0_2
LBB0_16:
	movq	%r14, %rdi
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.18:
	movq	%rbx, %rsi
	callq	_il3945_clear_sta_key_info
	jmp	LBB0_19
LBB0_20:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_21
LBB0_12:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_il3945_set_static_key
LBB0_14:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_15
LBB0_17:
	callq	_il3945_remove_static_key
LBB0_19:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rdi
LBB0_15:
	xorl	%eax, %eax
	callq	_D_MAC80211
LBB0_21:
	leaq	L_.str.6(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_22:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IL_INVALID_STATION,8,3         ## @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

	.comm	_il3945_mod_params,8,3          ## @il3945_mod_params
L_.str.1:                               ## @.str.1
	.asciz	"leave - hwcrypto disabled\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
L_.str.2:                               ## @.str.2
	.asciz	"leave - IBSS RSN\n"

L_.str.3:                               ## @.str.3
	.asciz	"leave - station not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"enable hwcrypto key\n"

L_.str.5:                               ## @.str.5
	.asciz	"disable hwcrypto key\n"

L_.str.6:                               ## @.str.6
	.asciz	"leave ret %d\n"

	.no_dead_strip	_il3945_mac_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_mac_set_key
_il3945_mac_set_key:                    ; @il3945_mac_set_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, x4
	mov	x24, x3
	mov	x23, x2
	mov	x22, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x25, _IL_INVALID_STATION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IL_INVALID_STATION@GOTPAGEOFF]
	ldr	x21, [x25]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_MAC80211
Lloh4:
	adrp	x8, _il3945_mod_params@GOTPAGE
Lloh5:
	ldr	x8, [x8, _il3945_mod_params@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_2:
	bl	_D_MAC80211
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_23
LBB0_4:
	ldr	x8, [x23]
Lloh11:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x20]
Lloh14:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_il_is_associated
	mov	x23, x0
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, x24
	bl	_il_sta_id_or_broadcast
	mov	x21, x0
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_D_MAC80211
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #100
	bl	_il_scan_cancel_timeout
	cmp	w22, #129
	b.eq	LBB0_14
; %bb.10:
	cmp	w22, #128
	b.ne	LBB0_16
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	cbz	w23, LBB0_17
; %bb.12:
	mov	x2, x21
	bl	_il3945_set_dynamic_key
	b	LBB0_18
LBB0_13:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_14:
	mov	x0, x19
	cbz	w23, LBB0_19
; %bb.15:
	mov	x1, x21
	bl	_il3945_clear_sta_key_info
	b	LBB0_20
LBB0_16:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_17:
	bl	_il3945_set_static_key
LBB0_18:
	mov	x20, x0
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_19:
	bl	_il3945_remove_static_key
LBB0_20:
	mov	x20, x0
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_21:
	bl	_D_MAC80211
LBB0_22:
	str	x20, [sp]
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_D_MAC80211
	mov	x0, x19
	bl	_mutex_unlock
LBB0_23:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_IL_INVALID_STATION,8,3         ; @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

	.comm	_il3945_mod_params,8,3          ; @il3945_mod_params
l_.str.1:                               ; @.str.1
	.asciz	"leave - hwcrypto disabled\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
l_.str.2:                               ; @.str.2
	.asciz	"leave - IBSS RSN\n"

l_.str.3:                               ; @.str.3
	.asciz	"leave - station not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"enable hwcrypto key\n"

l_.str.5:                               ; @.str.5
	.asciz	"disable hwcrypto key\n"

l_.str.6:                               ; @.str.6
	.asciz	"leave ret %d\n"

	.no_dead_strip	_il3945_mac_set_key
.subsections_via_symbols
