	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_set_stakey         ## -- Begin function wcn36xx_smd_set_stakey
	.p2align	4, 0x90
_wcn36xx_smd_set_stakey:                ## @wcn36xx_smd_set_stakey
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r13
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_mutex_lock
	movq	_WCN36XX_HAL_SET_STAKEY_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movups	-88(%rbp), %xmm0
	movups	-72(%rbp), %xmm1
	movups	-56(%rbp), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_INIT_HAL_MSG
	movq	%r15, -48(%rbp)
	movl	%ebx, -80(%rbp)
	movq	_WCN36XX_HAL_ED_WEP104@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_WCN36XX_HAL_ED_WEP40@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_2
## %bb.3:
	movq	-72(%rbp), %rax
	movq	%r13, 32(%rax)
	movl	$1, (%rax)
	movq	_WCN36XX_HAL_TX_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movq	$0, 16(%rax)
	movq	%r14, 8(%rax)
	movl	4(%rax), %edi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
	jmp	LBB0_4
LBB0_2:
	movq	%r13, -56(%rbp)
	movq	$0, -64(%rbp)
LBB0_4:
	movl	$1, -76(%rbp)
	movl	8(%r12), %edi
	movups	-88(%rbp), %xmm0
	movups	-72(%rbp), %xmm1
	movups	-56(%rbp), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_PREPARE_HAL_BUF
	movl	-88(%rbp), %esi
	movq	%r12, %rdi
	callq	_wcn36xx_smd_send_and_wait
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_9
LBB0_6:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	callq	_wcn36xx_smd_rsp_status_check
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_HAL_SET_STAKEY_REQ,4,2 ## @WCN36XX_HAL_SET_STAKEY_REQ
	.comm	_WCN36XX_HAL_ED_WEP104,4,2      ## @WCN36XX_HAL_ED_WEP104
	.comm	_WCN36XX_HAL_ED_WEP40,4,2       ## @WCN36XX_HAL_ED_WEP40
	.comm	_WCN36XX_HAL_TX_RX,4,2          ## @WCN36XX_HAL_TX_RX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sending hal_set_stakey failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"hal_set_stakey response failed err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_set_stakey         ; -- Begin function wcn36xx_smd_set_stakey
	.p2align	2
_wcn36xx_smd_set_stakey:                ; @wcn36xx_smd_set_stakey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x5
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _WCN36XX_HAL_SET_STAKEY_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_HAL_SET_STAKEY_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w23, #1
	str	w23, [sp, #28]
	stp	xzr, x21, [sp, #40]
	str	x20, [sp, #56]
	add	x0, sp, #16
	bl	_INIT_HAL_MSG
	ldr	w0, [x19, #8]
	stp	w22, w23, [sp, #24]
	stp	xzr, x21, [sp, #40]
	str	x20, [sp, #56]
	add	x1, sp, #16
	bl	_PREPARE_HAL_BUF
	mov	x0, x19
	bl	_wcn36xx_smd_send_and_wait
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w1, w0, [x19, #4]
	bl	_wcn36xx_smd_rsp_status_check
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	str	x20, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_wcn36xx_err
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_HAL_SET_STAKEY_REQ,4,2 ; @WCN36XX_HAL_SET_STAKEY_REQ
	.comm	_WCN36XX_HAL_ED_WEP104,4,2      ; @WCN36XX_HAL_ED_WEP104
	.comm	_WCN36XX_HAL_ED_WEP40,4,2       ; @WCN36XX_HAL_ED_WEP40
	.comm	_WCN36XX_HAL_TX_RX,4,2          ; @WCN36XX_HAL_TX_RX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sending hal_set_stakey failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"hal_set_stakey response failed err=%d\n"

.subsections_via_symbols
