	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_cmd_set_ap_key          ## -- Begin function wl1271_cmd_set_ap_key
	.p2align	4, 0x90
_wl1271_cmd_set_ap_key:                 ## @wl1271_cmd_set_ap_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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	24(%rbp), %rdx
	movq	(%rbx), %rcx
	movq	_KEY_WEP@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_WEP_DEFAULT_LID_TYPE@GOTPCREL(%rip), %rax
	cmpq	%rdx, %rcx
	jne	LBB0_6
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movq	_BROADCAST_LID_TYPE@GOTPCREL(%rip), %rax
	cmpq	%rdx, %rcx
	je	LBB0_7
LBB0_6:
	movq	_UNICAST_LID_TYPE@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rbx
	movq	_DEBUG_CRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edx, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_wl1271_debug
	movq	%rbx, 64(%r13)
	movq	24(%rbp), %rax
	movq	%rax, 56(%r13)
	movq	%r15, %rdi
	callq	_cpu_to_le16
	movq	%rax, 48(%r13)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 40(%r13)
	movq	%r12, 32(%r13)
	movq	%r14, 24(%r13)
	movq	40(%rbp), %rdi
	callq	_cpu_to_le16
	movq	16(%r13), %rcx
	movq	%rax, (%rcx)
	movl	32(%rbp), %edi
	callq	_cpu_to_le32
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	_KEY_TKIP@GOTPCREL(%rip), %rax
	movq	(%r13), %rdi
	cmpq	%r12, (%rax)
	jne	LBB0_9
## %bb.8:
	movl	$16, %edx
	movq	16(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_memcpy
	movq	(%r13), %rdi
	addq	$16, %rdi
	leaq	192(%rbx), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r13), %rdi
	addq	$24, %rdi
	subq	$-128, %rbx
	movl	$8, %edx
	movq	%rbx, %rsi
	jmp	LBB0_10
LBB0_9:
	movq	16(%rbp), %rsi
	movq	%rbx, %rdx
LBB0_10:
	callq	_memcpy
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	_DEBUG_CRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	movl	$72, %ecx
	callq	_wl1271_dump
	movq	_CMD_SET_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movl	$72, %ecx
	xorl	%r8d, %r8d
	callq	_wl1271_cmd_send
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	callq	_wl1271_warning
LBB0_12:
	movq	%r13, %rdi
	callq	_kfree
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KEY_WEP,8,3                    ## @KEY_WEP
	.comm	_WEP_DEFAULT_LID_TYPE,8,3       ## @WEP_DEFAULT_LID_TYPE
	.comm	_BROADCAST_LID_TYPE,8,3         ## @BROADCAST_LID_TYPE
	.comm	_UNICAST_LID_TYPE,8,3           ## @UNICAST_LID_TYPE
	.comm	_DEBUG_CRYPT,4,2                ## @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ap key action: %d id: %d lid: %d type: %d hlid: %d"

	.comm	_KEY_TKIP,8,3                   ## @KEY_TKIP
L_.str.1:                               ## @.str.1
	.asciz	"TARGET AP KEY: "

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_cmd_set_ap_key          ; -- Begin function wl1271_cmd_set_ap_key
	.p2align	2
_wl1271_cmd_set_ap_key:                 ; @wl1271_cmd_set_ap_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
	mov	x25, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x26, x2
	mov	x27, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #72
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x28, [x29, #24]
	ldr	w20, [x29, #16]
	ldr	x8, [x27]
Lloh3:
	adrp	x9, _KEY_WEP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KEY_WEP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _WEP_DEFAULT_LID_TYPE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _WEP_DEFAULT_LID_TYPE@GOTPAGEOFF]
Lloh8:
	adrp	x11, _BROADCAST_LID_TYPE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _BROADCAST_LID_TYPE@GOTPAGEOFF]
	cmp	x9, x23
	csel	x9, x10, x11, eq
Lloh10:
	adrp	x10, _UNICAST_LID_TYPE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _UNICAST_LID_TYPE@GOTPAGEOFF]
	cmp	x8, x25
	csel	x8, x9, x10, eq
	ldr	x27, [x8]
Lloh12:
	adrp	x8, _DEBUG_CRYPT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEBUG_CRYPT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x26
	mov	x3, x24
	mov	x4, x27
	mov	x5, x23
	mov	x6, x25
	bl	_wl1271_debug
	stp	x25, x27, [x19, #56]
	mov	x0, x26
	bl	_cpu_to_le16
	stp	x22, x0, [x19, #40]
	stp	x24, x23, [x19, #24]
	mov	x0, x28
	bl	_cpu_to_le16
	ldr	x8, [x19, #16]
	str	x0, [x8]
	mov	x0, x20
	bl	_cpu_to_le32
	mov	x8, x0
	ldp	x0, x9, [x19]
	str	w8, [x9]
Lloh17:
	adrp	x8, _KEY_TKIP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KEY_TKIP@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_4
; %bb.2:
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	ldr	x8, [x19]
	add	x0, x8, #16
	add	x1, x21, #192
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x19]
	add	x0, x8, #24
	add	x1, x21, #128
	mov	w2, #8
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_4:
	mov	x1, x21
	mov	x2, x22
LBB0_5:
	bl	_memcpy
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
Lloh23:
	adrp	x8, _DEBUG_CRYPT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DEBUG_CRYPT@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	w3, #72
	bl	_wl1271_dump
Lloh28:
	adrp	x8, _CMD_SET_KEYS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CMD_SET_KEYS@GOTPAGEOFF]
Lloh30:
	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_7
; %bb.6:
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1271_warning
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	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	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KEY_WEP,8,3                    ; @KEY_WEP
	.comm	_WEP_DEFAULT_LID_TYPE,8,3       ; @WEP_DEFAULT_LID_TYPE
	.comm	_BROADCAST_LID_TYPE,8,3         ; @BROADCAST_LID_TYPE
	.comm	_UNICAST_LID_TYPE,8,3           ; @UNICAST_LID_TYPE
	.comm	_DEBUG_CRYPT,4,2                ; @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ap key action: %d id: %d lid: %d type: %d hlid: %d"

	.comm	_KEY_TKIP,8,3                   ; @KEY_TKIP
l_.str.1:                               ; @.str.1
	.asciz	"TARGET AP KEY: "

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

.subsections_via_symbols
