	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_set_sharedkey
_brcmf_set_sharedkey:                   ## @brcmf_set_sharedkey
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ndev_to_prof
	movq	%rax, %r12
	movq	_CONN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	(%r14), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_brcmf_dbg
	cmpq	$0, (%r14)
	je	LBB0_13
## %bb.1:
	movl	(%rbx), %edi
	movl	(%r12), %edx
	movl	4(%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	_NL80211_WPA_VERSION_1@GOTPCREL(%rip), %rax
	movq	_NL80211_WPA_VERSION_2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r12)
	je	LBB0_2
LBB0_13:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	testb	$-127, 4(%r12)
	je	LBB0_13
## %bb.3:
	leaq	-80(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%r14), %edx
	movl	%edx, -80(%rbp)
	movq	24(%r14), %rax
	movq	%rax, -64(%rbp)
	cmpl	$5, %edx
	jb	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_13
LBB0_5:
	movl	-76(%rbp), %edi
	movl	16(%r14), %esi
	callq	_memcpy
	movq	_BRCMF_PRIMARY_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	4(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.8:
	movq	_CRYPTO_ALGO_WEP128@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_CRYPTO_ALGO_WEP1@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r8d
	movl	%r8d, -72(%rbp)
	movl	(%rbx), %edi
	movl	-80(%rbp), %edx
	movq	-64(%rbp), %rcx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	(%rbx), %edi
	movl	-76(%rbp), %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_send_key_to_dongle
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	8(%r12), %rax
	movq	_NL80211_AUTHTYPE_SHARED_KEY@GOTPCREL(%rip), %rcx
	movl	$0, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.11:
	movl	(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	_WL_AUTH_SHARED_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_brcmf_fil_bsscfg_int_set
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_bphy_err
	movl	%ebx, %r13d
	jmp	LBB0_13
LBB0_14:
	movq	8(%r14), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bphy_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CONN,4,2                       ## @CONN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"key len (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"wpa_versions 0x%x cipher_pairwise 0x%x\n"

	.comm	_NL80211_WPA_VERSION_1,4,2      ## @NL80211_WPA_VERSION_1
	.comm	_NL80211_WPA_VERSION_2,4,2      ## @NL80211_WPA_VERSION_2
L_.str.2:                               ## @.str.2
	.asciz	"Too long key length (%u)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BRCMF_PRIMARY_KEY,4,2          ## @BRCMF_PRIMARY_KEY
	.comm	_CRYPTO_ALGO_WEP1,4,2           ## @CRYPTO_ALGO_WEP1
	.comm	_CRYPTO_ALGO_WEP128,4,2         ## @CRYPTO_ALGO_WEP128
L_.str.3:                               ## @.str.3
	.asciz	"Invalid algorithm (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"key length (%d) key index (%d) algo (%d)\n"

L_.str.5:                               ## @.str.5
	.asciz	"key \"%s\"\n"

	.comm	_NL80211_AUTHTYPE_SHARED_KEY,8,3 ## @NL80211_AUTHTYPE_SHARED_KEY
L_.str.6:                               ## @.str.6
	.asciz	"set auth_type to shared key\n"

	.comm	_WL_AUTH_SHARED_KEY,4,2         ## @WL_AUTH_SHARED_KEY
L_.str.7:                               ## @.str.7
	.asciz	"auth"

L_.str.8:                               ## @.str.8
	.asciz	"set auth failed (%d)\n"

	.no_dead_strip	_brcmf_set_sharedkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_set_sharedkey
_brcmf_set_sharedkey:                   ; @brcmf_set_sharedkey
	.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	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x0]
	mov	x0, x21
	bl	_ndev_to_prof
	mov	x21, x0
Lloh0:
	adrp	x23, _CONN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CONN@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	x8, [x22]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x23]
	ldp	w8, w9, [x21]
	stp	x8, x9, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcmf_dbg
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _NL80211_WPA_VERSION_1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_WPA_VERSION_1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _NL80211_WPA_VERSION_2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NL80211_WPA_VERSION_2@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	w22, #0
LBB0_3:
	mov	x0, x22
	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
LBB0_4:
	ldrb	w8, [x21, #4]
	tst	w8, #0xffffff81
	b.eq	LBB0_2
; %bb.5:
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w2, [x22]
	str	w2, [sp, #32]
	ldr	x8, [x22, #24]
	str	x8, [sp, #48]
	cmp	w2, #5
	b.lo	LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_7:
	ldr	w0, [sp, #36]
	ldr	w1, [x22, #16]
	bl	_memcpy
Lloh14:
	adrp	x8, _BRCMF_PRIMARY_KEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BRCMF_PRIMARY_KEY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	ldr	w8, [x21, #4]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.8:
	cmp	w8, #129
	b.ne	LBB0_15
; %bb.9:
Lloh17:
	adrp	x8, _CRYPTO_ALGO_WEP128@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CRYPTO_ALGO_WEP128@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh19:
	adrp	x8, _CRYPTO_ALGO_WEP1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CRYPTO_ALGO_WEP1@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	ldr	w0, [x23]
	ldr	x9, [sp, #48]
	ldr	w10, [sp, #32]
	stp	x9, x8, [sp, #8]
	str	x10, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_brcmf_dbg
	ldr	w0, [x23]
	ldr	w8, [sp, #36]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_brcmf_dbg
	add	x1, sp, #32
	mov	x0, x20
	bl	_send_key_to_dongle
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.12:
	ldr	x8, [x21, #8]
Lloh25:
	adrp	x9, _NL80211_AUTHTYPE_SHARED_KEY@GOTPAGE
Lloh26:
	ldr	x9, [x9, _NL80211_AUTHTYPE_SHARED_KEY@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.13:
	ldr	w0, [x23]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_brcmf_dbg
Lloh30:
	adrp	x8, _WL_AUTH_SHARED_KEY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WL_AUTH_SHARED_KEY@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x1, l_.str.7@PAGE
Lloh34:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_brcmf_fil_bsscfg_int_set
	mov	x22, x0
	cbz	w0, LBB0_3
; %bb.14:
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_bphy_err
	b	LBB0_3
LBB0_15:
	ldr	x8, [x22, #8]
	ldr	w2, [x8]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_bphy_err
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_CONN,4,2                       ; @CONN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key len (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"wpa_versions 0x%x cipher_pairwise 0x%x\n"

	.comm	_NL80211_WPA_VERSION_1,4,2      ; @NL80211_WPA_VERSION_1
	.comm	_NL80211_WPA_VERSION_2,4,2      ; @NL80211_WPA_VERSION_2
l_.str.2:                               ; @.str.2
	.asciz	"Too long key length (%u)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BRCMF_PRIMARY_KEY,4,2          ; @BRCMF_PRIMARY_KEY
	.comm	_CRYPTO_ALGO_WEP1,4,2           ; @CRYPTO_ALGO_WEP1
	.comm	_CRYPTO_ALGO_WEP128,4,2         ; @CRYPTO_ALGO_WEP128
l_.str.3:                               ; @.str.3
	.asciz	"Invalid algorithm (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"key length (%d) key index (%d) algo (%d)\n"

l_.str.5:                               ; @.str.5
	.asciz	"key \"%s\"\n"

	.comm	_NL80211_AUTHTYPE_SHARED_KEY,8,3 ; @NL80211_AUTHTYPE_SHARED_KEY
l_.str.6:                               ; @.str.6
	.asciz	"set auth_type to shared key\n"

	.comm	_WL_AUTH_SHARED_KEY,4,2         ; @WL_AUTH_SHARED_KEY
l_.str.7:                               ; @.str.7
	.asciz	"auth"

l_.str.8:                               ; @.str.8
	.asciz	"set auth failed (%d)\n"

	.no_dead_strip	_brcmf_set_sharedkey
.subsections_via_symbols
