	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_mac_set_key             ## -- Begin function il4965_mac_set_key
	.p2align	4, 0x90
_il4965_mac_set_key:                    ## @il4965_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	(%rdi), %r13
	leaq	L_.str(%rip), %rdi
	callq	_D_MAC80211
	movq	8(%r13), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_D_MAC80211
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_17
LBB0_7:
	movq	%r13, %rdi
	movq	%r12, %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:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_9:
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	$100, %esi
	callq	_il_scan_cancel_timeout
	movq	8(%r14), %rcx
	movq	_WLAN_CIPHER_SUITE_WEP40@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_12
## %bb.10:
	testq	%r12, %r12
	je	LBB0_14
## %bb.11:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_12:
	xorl	%eax, %eax
	testq	%r12, %r12
	jne	LBB0_19
## %bb.13:
	movq	_WLAN_CIPHER_SUITE_WEP104@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_19
LBB0_14:
	cmpl	$128, %r15d
	jne	LBB0_18
## %bb.15:
	cmpl	$0, 4(%r13)
	je	LBB0_22
LBB0_16:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_il4965_set_dynamic_key
	jmp	LBB0_23
LBB0_17:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_18:
	movq	16(%r14), %rax
	movq	_HW_KEY_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%al
LBB0_19:
	cmpl	$129, %r15d
	je	LBB0_24
## %bb.20:
	cmpl	$128, %r15d
	jne	LBB0_26
## %bb.21:
	testb	%al, %al
	je	LBB0_16
LBB0_22:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_il4965_set_default_wep_key
LBB0_23:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_29
LBB0_24:
	movq	%r13, %rdi
	movq	%r14, %rsi
	testb	%al, %al
	je	LBB0_27
## %bb.25:
	callq	_il4965_remove_default_wep_key
	jmp	LBB0_28
LBB0_26:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_30
LBB0_27:
	movq	%rbx, %rdx
	callq	_il4965_remove_dynamic_key
LBB0_28:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
LBB0_29:
	callq	_D_MAC80211
LBB0_30:
	movq	%r13, %rdi
	callq	_mutex_unlock
	leaq	L_.str.5(%rip), %rdi
	callq	_D_MAC80211
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

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 - ad-hoc group key\n"

	.comm	_IL_INVALID_STATION,8,3         ## @IL_INVALID_STATION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ## @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ## @WLAN_CIPHER_SUITE_WEP104
	.comm	_HW_KEY_DEFAULT,8,3             ## @HW_KEY_DEFAULT
L_.str.3:                               ## @.str.3
	.asciz	"enable hwcrypto key\n"

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

L_.str.5:                               ## @.str.5
	.asciz	"leave\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_mac_set_key             ; -- Begin function il4965_mac_set_key
	.p2align	2
_il4965_mac_set_key:                    ; @il4965_mac_set_key
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_MAC80211
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_2:
	bl	_D_MAC80211
Lloh4:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	bl	_il_sta_id_or_broadcast
Lloh12:
	adrp	x8, _IL_INVALID_STATION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IL_INVALID_STATION@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #100
	bl	_il_scan_cancel_timeout
	ldr	x9, [x20, #8]
Lloh17:
	adrp	x8, _WLAN_CIPHER_SUITE_WEP40@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WLAN_CIPHER_SUITE_WEP40@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.10:
	cbz	x23, LBB0_14
; %bb.11:
	mov	w8, #0
	b	LBB0_19
LBB0_12:
	mov	w8, #0
	cbnz	x23, LBB0_19
; %bb.13:
Lloh20:
	adrp	x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGE
Lloh21:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_19
LBB0_14:
	cmp	w21, #128
	b.ne	LBB0_18
; %bb.15:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_22
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_il4965_set_dynamic_key
	b	LBB0_23
LBB0_17:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_18:
	ldr	x8, [x20, #16]
Lloh25:
	adrp	x9, _HW_KEY_DEFAULT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HW_KEY_DEFAULT@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
LBB0_19:
	cmp	w21, #129
	b.eq	LBB0_24
; %bb.20:
	cmp	w21, #128
	b.ne	LBB0_26
; %bb.21:
	cbz	w8, LBB0_16
LBB0_22:
	mov	x0, x19
	mov	x1, x20
	bl	_il4965_set_default_wep_key
LBB0_23:
	mov	x20, x0
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_29
LBB0_24:
	mov	x0, x19
	mov	x1, x20
	cbz	w8, LBB0_27
; %bb.25:
	bl	_il4965_remove_default_wep_key
	b	LBB0_28
LBB0_26:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_30
LBB0_27:
	mov	x2, x22
	bl	_il4965_remove_dynamic_key
LBB0_28:
	mov	x20, x0
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_29:
	bl	_D_MAC80211
LBB0_30:
	mov	x0, x19
	bl	_mutex_unlock
Lloh35:
	adrp	x0, l_.str.5@PAGE
Lloh36:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_D_MAC80211
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

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 - ad-hoc group key\n"

	.comm	_IL_INVALID_STATION,8,3         ; @IL_INVALID_STATION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ; @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ; @WLAN_CIPHER_SUITE_WEP104
	.comm	_HW_KEY_DEFAULT,8,3             ; @HW_KEY_DEFAULT
l_.str.3:                               ; @.str.3
	.asciz	"enable hwcrypto key\n"

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

l_.str.5:                               ; @.str.5
	.asciz	"leave\n"

.subsections_via_symbols
