	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_cmd_encryption_set_key
_mwl8k_cmd_encryption_set_key:          ## @mwl8k_cmd_encryption_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	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_MWL8K_VIF
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_mwl8k_encryption_set_cmd_info
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MWL8K_ENCR_SET_KEY@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	movl	%eax, %r15d
	testl	%ecx, 8(%r12)
	jne	LBB0_5
## %bb.4:
	movq	_MWL8K_ENCR_SET_GROUP_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_5:
	movl	12(%r12), %ecx
	leal	-128(%rcx), %edx
	cmpl	$2, %edx
	jb	LBB0_9
## %bb.6:
	cmpl	$130, %ecx
	je	LBB0_13
## %bb.7:
	cmpl	$131, %ecx
	jne	LBB0_12
## %bb.8:
	movl	16(%r12), %edx
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_9:
	movq	(%r12), %rbx
	movq	(%r14), %rcx
	cmpl	$0, (%rcx,%rbx,8)
	jne	LBB0_11
## %bb.10:
	movl	4(%rcx,%rbx,8), %edi
	movl	16(%r12), %edx
	addl	$32, %edx
	movq	%rsi, %r15
	movq	%r12, %rsi
	callq	_memcpy
	movq	(%r14), %rax
	movl	$1, (%rax,%rbx,8)
	movl	(%r15), %eax
LBB0_11:
	movl	16(%r12), %edx
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_13:
	movq	_MAX_ENCR_KEY_LENGTH@GOTPCREL(%rip), %rax
	movq	_MIC_KEY_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%edx, %edx
	addl	(%rax), %edx
LBB0_14:
	movl	8(%r13), %edi
	movq	24(%r12), %rsi
	callq	_memcpy
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r13)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_mwl8k_post_pervif_cmd
LBB0_15:
	movl	%eax, %ebx
LBB0_16:
	movq	%r13, %rdi
	callq	_kfree
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_MWL8K_ENCR_SET_KEY,4,2         ## @MWL8K_ENCR_SET_KEY
	.comm	_MWL8K_ENCR_SET_GROUP_KEY,4,2   ## @MWL8K_ENCR_SET_GROUP_KEY
	.comm	_MAX_ENCR_KEY_LENGTH,4,2        ## @MAX_ENCR_KEY_LENGTH
	.comm	_MIC_KEY_LENGTH,4,2             ## @MIC_KEY_LENGTH
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_mwl8k_cmd_encryption_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_cmd_encryption_set_key
_mwl8k_cmd_encryption_set_key:          ; @mwl8k_cmd_encryption_set_key
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_MWL8K_VIF
	mov	x23, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x1, x24
	mov	x2, x22
	bl	_mwl8k_encryption_set_cmd_info
	tbnz	w0, #31, LBB0_12
; %bb.2:
Lloh3:
	adrp	x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
Lloh6:
	adrp	x8, _MWL8K_ENCR_SET_GROUP_KEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MWL8K_ENCR_SET_GROUP_KEY@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x8]
Lloh9:
	adrp	x25, _MWL8K_ENCR_SET_KEY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _MWL8K_ENCR_SET_KEY@GOTPAGEOFF]
	ldr	w8, [x25]
	ldp	w12, w9, [x22, #8]
	tst	w10, w12
	csel	w24, w11, w8, eq
	sub	w10, w9, #128
	cmp	w10, #2
	b.lo	LBB0_7
; %bb.3:
	cmp	w9, #130
	b.eq	LBB0_10
; %bb.4:
	cmp	w9, #131
	b.ne	LBB0_15
; %bb.5:
	ldr	w2, [x22, #16]
	b	LBB0_11
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_7:
	ldr	x10, [x22]
	ldr	x9, [x23]
	lsl	x24, x10, #3
	ldr	w10, [x9, x24]
	cbnz	w10, LBB0_9
; %bb.8:
	add	x8, x9, x24
	ldr	w0, [x8, #4]
	ldr	w8, [x22, #16]
	add	w2, w8, #32
	mov	x1, x22
	bl	_memcpy
	ldr	x8, [x23]
	mov	w9, #1
	str	w9, [x8, x24]
	ldr	w8, [x25]
LBB0_9:
	ldr	w2, [x22, #16]
	mov	x24, x8
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x8, _MAX_ENCR_KEY_LENGTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_ENCR_KEY_LENGTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _MIC_KEY_LENGTH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MIC_KEY_LENGTH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	add	w2, w8, w9, lsl #1
LBB0_11:
	ldr	w0, [x19, #8]
	ldr	x1, [x22, #24]
	bl	_memcpy
	mov	x0, x24
	bl	_cpu_to_le32
	str	w0, [x19, #4]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_mwl8k_post_pervif_cmd
LBB0_12:
	mov	x24, x0
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh20:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_MWL8K_ENCR_SET_KEY,4,2         ; @MWL8K_ENCR_SET_KEY
	.comm	_MWL8K_ENCR_SET_GROUP_KEY,4,2   ; @MWL8K_ENCR_SET_GROUP_KEY
	.comm	_MAX_ENCR_KEY_LENGTH,4,2        ; @MAX_ENCR_KEY_LENGTH
	.comm	_MIC_KEY_LENGTH,4,2             ; @MIC_KEY_LENGTH
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_mwl8k_cmd_encryption_set_key
.subsections_via_symbols
