	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_cmd_set_sta_key         ## -- Begin function wl1271_cmd_set_sta_key
	.p2align	4, 0x90
_wl1271_cmd_set_sta_key:                ## @wl1271_cmd_set_sta_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
	movl	%edx, %r13d
	movq	(%rsi), %rax
	movq	_WL12XX_INVALID_LINK_ID@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rax
	je	LBB0_14
## %bb.1:
	movq	%r8, %r12
	movq	%rsi, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%r14), %rax
	movq	%rax, (%r15)
	movq	_KEY_WEP@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_WEP_DEFAULT_LID_TYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_5:
	movq	24(%rbp), %rdi
	callq	_is_broadcast_ether_addr
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_UNICAST_LID_TYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_BROADCAST_LID_TYPE@GOTPCREL(%rip), %rax
LBB0_8:
	movq	16(%rbp), %r14
	movl	(%rax), %eax
	movl	%eax, 64(%r15)
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movq	%rax, 56(%r15)
	movq	%rbx, 48(%r15)
	movq	%r12, 40(%r15)
	movl	40(%rbp), %edi
	callq	_cpu_to_le16
	movq	32(%r15), %rcx
	movq	%rax, (%rcx)
	movl	32(%rbp), %edi
	callq	_cpu_to_le32
	movq	24(%r15), %rcx
	movl	%eax, (%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	_KEY_TKIP@GOTPCREL(%rip), %rax
	movq	8(%r15), %rdi
	cmpq	%r12, (%rax)
	jne	LBB0_10
## %bb.9:
	movl	$16, %edx
	movq	%r14, %rsi
	callq	_memcpy
	movq	8(%r15), %rdi
	addq	$16, %rdi
	leaq	192(%r14), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	8(%r15), %rdi
	addq	$24, %rdi
	subq	$-128, %r14
	movl	$8, %edx
	movq	%r14, %rsi
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rsi
	movq	%rbx, %rdx
LBB0_11:
	callq	_memcpy
	movq	_DEBUG_CRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movl	$72, %ecx
	callq	_wl1271_dump
	movq	_CMD_SET_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	$72, %ecx
	xorl	%r8d, %r8d
	callq	_wl1271_cmd_send
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	callq	_wl1271_warning
LBB0_13:
	movq	%r15, %rdi
	callq	_kfree
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ## @WL12XX_INVALID_LINK_ID
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KEY_WEP,8,3                    ## @KEY_WEP
	.comm	_WEP_DEFAULT_LID_TYPE,4,2       ## @WEP_DEFAULT_LID_TYPE
	.comm	_BROADCAST_LID_TYPE,4,2         ## @BROADCAST_LID_TYPE
	.comm	_UNICAST_LID_TYPE,4,2           ## @UNICAST_LID_TYPE
	.comm	_KEY_TKIP,8,3                   ## @KEY_TKIP
	.comm	_DEBUG_CRYPT,4,2                ## @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TARGET KEY: "

	.comm	_CMD_SET_KEYS,4,2               ## @CMD_SET_KEYS
L_.str.1:                               ## @.str.1
	.asciz	"could not set keys"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_cmd_set_sta_key         ; -- Begin function wl1271_cmd_set_sta_key
	.p2align	2
_wl1271_cmd_set_sta_key:                ; @wl1271_cmd_set_sta_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _WL12XX_INVALID_LINK_ID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WL12XX_INVALID_LINK_ID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_13
LBB0_2:
	mov	x28, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x20, x1
	mov	x26, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #72
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.3:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldp	w26, w27, [x29, #16]
	ldr	x8, [x20]
	str	x8, [x19]
Lloh6:
	adrp	x8, _KEY_WEP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_WEP@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _WEP_DEFAULT_LID_TYPE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WEP_DEFAULT_LID_TYPE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_6:
	mov	x0, x28
	bl	_is_broadcast_ether_addr
Lloh14:
	adrp	x8, _BROADCAST_LID_TYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BROADCAST_LID_TYPE@GOTPAGEOFF]
Lloh16:
	adrp	x9, _UNICAST_LID_TYPE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _UNICAST_LID_TYPE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	mov	x0, x25
	bl	_cpu_to_le16
	stp	x22, x0, [x19, #48]
	str	x23, [x19, #40]
	mov	x0, x27
	bl	_cpu_to_le16
	ldr	x8, [x19, #32]
	str	x0, [x8]
	mov	x0, x26
	bl	_cpu_to_le32
	ldr	x8, [x19, #24]
	str	w0, [x8]
	str	x24, [x19, #16]
Lloh18:
	adrp	x8, _KEY_TKIP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _KEY_TKIP@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x0, [x19, #8]
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.8:
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x0, x8, #16
	add	x1, x21, #192
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x0, x8, #24
	add	x1, x21, #128
	mov	w2, #8
	b	LBB0_10
LBB0_9:
	mov	x1, x21
	mov	x2, x22
LBB0_10:
	bl	_memcpy
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
Lloh21:
	adrp	x8, _DEBUG_CRYPT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DEBUG_CRYPT@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	w3, #72
	bl	_wl1271_dump
Lloh26:
	adrp	x8, _CMD_SET_KEYS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CMD_SET_KEYS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #72
	mov	w4, #0
	bl	_wl1271_cmd_send
	mov	x20, x0
	tbz	w0, #31, LBB0_12
; %bb.11:
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1271_warning
LBB0_12:
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ; @WL12XX_INVALID_LINK_ID
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KEY_WEP,8,3                    ; @KEY_WEP
	.comm	_WEP_DEFAULT_LID_TYPE,4,2       ; @WEP_DEFAULT_LID_TYPE
	.comm	_BROADCAST_LID_TYPE,4,2         ; @BROADCAST_LID_TYPE
	.comm	_UNICAST_LID_TYPE,4,2           ; @UNICAST_LID_TYPE
	.comm	_KEY_TKIP,8,3                   ; @KEY_TKIP
	.comm	_DEBUG_CRYPT,4,2                ; @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TARGET KEY: "

	.comm	_CMD_SET_KEYS,4,2               ; @CMD_SET_KEYS
l_.str.1:                               ; @.str.1
	.asciz	"could not set keys"

.subsections_via_symbols
