	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_set_pmk
_brcmf_set_pmk:                         ## @brcmf_set_pmk
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leal	(%r12,%r12), %edi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movq	_BRCMF_WSEC_PASSPHRASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.1:
	movl	%r12d, %r14d
	xorl	%r15d, %r15d
	leaq	L_.str(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r15,4), %ecx
	movl	$3, %esi
	movq	%r13, %rdx
	callq	_snprintf
	incq	%r15
	cmpq	%r15, %r14
	jne	LBB0_2
LBB0_3:
	movq	_BRCMF_C_SET_WSEC_PMK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$24, %ecx
	callq	_brcmf_fil_cmd_data_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_bphy_err
LBB0_5:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMF_WSEC_PASSPHRASE,4,2      ## @BRCMF_WSEC_PASSPHRASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02x"

	.comm	_BRCMF_C_SET_WSEC_PMK,4,2       ## @BRCMF_C_SET_WSEC_PMK
L_.str.1:                               ## @.str.1
	.asciz	"failed to change PSK in firmware (len=%u)\n"

	.no_dead_strip	_brcmf_set_pmk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_set_pmk
_brcmf_set_pmk:                         ; @brcmf_set_pmk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0]
	lsl	w0, w2, #1
	bl	_cpu_to_le16
	str	x0, [sp, #24]
Lloh0:
	adrp	x8, _BRCMF_WSEC_PASSPHRASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCMF_WSEC_PASSPHRASE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w24, w19
Lloh3:
	adrp	x23, l_.str@PAGE
Lloh4:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x22], #4
	mov	w1, #3
	mov	x2, x23
	bl	_snprintf
	subs	x24, x24, #1
	b.ne	LBB0_2
LBB0_3:
Lloh5:
	adrp	x8, _BRCMF_C_SET_WSEC_PMK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BRCMF_C_SET_WSEC_PMK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #24
	bl	_brcmf_fil_cmd_data_set
	mov	x21, x0
	tbz	w0, #31, LBB0_5
; %bb.4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_bphy_err
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMF_WSEC_PASSPHRASE,4,2      ; @BRCMF_WSEC_PASSPHRASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02x"

	.comm	_BRCMF_C_SET_WSEC_PMK,4,2       ; @BRCMF_C_SET_WSEC_PMK
l_.str.1:                               ; @.str.1
	.asciz	"failed to change PSK in firmware (len=%u)\n"

	.no_dead_strip	_brcmf_set_pmk
.subsections_via_symbols
