	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_set_key
_mwl8k_set_key:                         ## @mwl8k_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, %r12
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_MWL8K_VIF
	movq	(%r13), %rdx
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_3
## %bb.1:
	movq	(%r15), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_2
LBB0_3:
	leaq	8(%r13), %rcx
	testq	%rbx, %rbx
	cmovneq	%rbx, %rcx
	movq	(%rcx), %rbx
	movq	_SET_KEY@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_10
## %bb.4:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_mwl8k_cmd_encryption_set_key
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	(%r12), %rax
	movq	_WLAN_CIPHER_SUITE_WEP40@GOTPCREL(%rip), %rcx
	movq	_WLAN_CIPHER_SUITE_WEP104@GOTPCREL(%rip), %rdi
	movq	_MWL8K_UPDATE_ENCRYPTION_TYPE_WEP@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	(%rdi), %rax
	je	LBB0_7
## %bb.6:
	movq	_MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED@GOTPCREL(%rip), %rsi
LBB0_7:
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rsi
	movl	(%rsi), %ecx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_mwl8k_cmd_update_encryption_enable
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	$1, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mwl8k_cmd_encryption_remove_key ## TAILCALL
LBB0_2:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_SET_KEY,4,2                    ## @SET_KEY
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ## @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ## @WLAN_CIPHER_SUITE_WEP104
	.comm	_MWL8K_UPDATE_ENCRYPTION_TYPE_WEP,4,2 ## @MWL8K_UPDATE_ENCRYPTION_TYPE_WEP
	.comm	_MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED,4,2 ## @MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED
	.no_dead_strip	_mwl8k_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_set_key
_mwl8k_set_key:                         ; @mwl8k_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	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x24, x1
	mov	x21, x0
	mov	x0, x2
	bl	_MWL8K_VIF
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	w8, [x8]
	cbz	w8, LBB0_7
LBB0_2:
	add	x8, x20, #8
	cmp	x23, #0
	csel	x8, x8, x23, eq
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _SET_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SET_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_mwl8k_cmd_encryption_set_key
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _WLAN_CIPHER_SUITE_WEP40@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WLAN_CIPHER_SUITE_WEP40@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh12:
	adrp	x8, _MWL8K_UPDATE_ENCRYPTION_TYPE_WEP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MWL8K_UPDATE_ENCRYPTION_TYPE_WEP@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_mwl8k_cmd_update_encryption_enable
	cbnz	w0, LBB0_8
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	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
	b	_mwl8k_cmd_encryption_remove_key
LBB0_7:
Lloh16:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_SET_KEY,4,2                    ; @SET_KEY
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ; @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ; @WLAN_CIPHER_SUITE_WEP104
	.comm	_MWL8K_UPDATE_ENCRYPTION_TYPE_WEP,4,2 ; @MWL8K_UPDATE_ENCRYPTION_TYPE_WEP
	.comm	_MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED,4,2 ; @MWL8K_UPDATE_ENCRYPTION_TYPE_MIXED
	.no_dead_strip	_mwl8k_set_key
.subsections_via_symbols
