	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lbs_cfg_add_key
_lbs_cfg_add_key:                       ## @lbs_cfg_add_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r13
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_wiphy_priv
	cmpq	%r14, 16(%rax)
	je	LBB0_11
## %bb.1:
	movq	%rax, %r14
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_lbs_deb_assoc
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_lbs_deb_assoc
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.2:
	movq	_LBS_DEB_CFG80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_lbs_deb_hex
LBB0_3:
	movl	12(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_lbs_deb_assoc
	movl	12(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:
	movq	_LBS_DEB_CFG80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_lbs_deb_hex
LBB0_5:
	movl	(%rbx), %edx
	leal	-130(%rdx), %eax
	cmpl	$2, %eax
	jb	LBB0_12
## %bb.6:
	leal	-128(%rdx), %eax
	cmpl	$1, %eax
	ja	LBB0_14
## %bb.7:
	movq	8(%r14), %rax
	movl	(%rax,%r15,4), %edx
	movl	4(%rbx), %ecx
	cmpl	%ecx, %edx
	jne	LBB0_10
## %bb.8:
	movq	(%r14), %rax
	movl	(%rax,%r15,4), %edi
	movl	8(%rbx), %esi
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_21
## %bb.9:
	movl	4(%rbx), %ecx
	movq	8(%r14), %rax
LBB0_10:
	movl	%ecx, (%rax,%r15,4)
	movq	(%r14), %rax
	movl	(%rax,%r15,4), %edi
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	callq	_memcpy
	movq	%r14, %rdi
	callq	_lbs_set_wep_keys
	jmp	LBB0_21
LBB0_11:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_12:
	movq	_KEY_INFO_WPA_ENABLED@GOTPCREL(%rip), %rcx
	testq	%r15, %r15
	jne	LBB0_16
## %bb.13:
	movq	_KEY_INFO_WPA_UNICAST@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wiphy_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_16:
	movq	_KEY_INFO_WPA_MCAST@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	orl	(%rcx), %eax
	cmpl	$130, %edx
	jne	LBB0_19
## %bb.18:
	movq	_KEY_TYPE_ID_TKIP@GOTPCREL(%rip), %rcx
	jmp	LBB0_20
LBB0_19:
	movq	_KEY_TYPE_ID_AES@GOTPCREL(%rip), %rcx
LBB0_20:
	movl	(%rcx), %esi
	movl	4(%rbx), %r8d
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_lbs_set_key_material
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add_key: cipher 0x%x, mac_addr %pM\n"

L_.str.1:                               ## @.str.1
	.asciz	"add_key: key index %d, key len %d\n"

	.comm	_LBS_DEB_CFG80211,4,2           ## @LBS_DEB_CFG80211
L_.str.2:                               ## @.str.2
	.asciz	"KEY"

L_.str.3:                               ## @.str.3
	.asciz	"add_key: seq len %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"SEQ"

	.comm	_KEY_INFO_WPA_ENABLED,4,2       ## @KEY_INFO_WPA_ENABLED
	.comm	_KEY_INFO_WPA_UNICAST,4,2       ## @KEY_INFO_WPA_UNICAST
	.comm	_KEY_INFO_WPA_MCAST,4,2         ## @KEY_INFO_WPA_MCAST
	.comm	_KEY_TYPE_ID_TKIP,4,2           ## @KEY_TYPE_ID_TKIP
	.comm	_KEY_TYPE_ID_AES,4,2            ## @KEY_TYPE_ID_AES
L_.str.5:                               ## @.str.5
	.asciz	"unhandled cipher 0x%x\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_lbs_cfg_add_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lbs_cfg_add_key
_lbs_cfg_add_key:                       ; @lbs_cfg_add_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x4
	mov	x21, x2
	mov	x24, x1
	mov	x22, x0
	bl	_wiphy_priv
	ldr	x8, [x0, #16]
	cmp	x8, x24
	b.eq	LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	w1, [x20]
	str	x23, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lbs_deb_assoc
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_lbs_deb_assoc
	ldr	w3, [x20, #4]
Lloh4:
	adrp	x23, _LBS_DEB_CFG80211@GOTPAGE
Lloh5:
	ldr	x23, [x23, _LBS_DEB_CFG80211@GOTPAGEOFF]
	cbz	w3, LBB0_3
; %bb.2:
	ldr	w0, [x23]
	ldr	w2, [x20, #8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_lbs_deb_hex
LBB0_3:
	ldr	w1, [x20, #12]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_lbs_deb_assoc
	ldr	w3, [x20, #12]
	cbz	w3, LBB0_5
; %bb.4:
	ldr	w0, [x23]
	ldr	w2, [x20, #16]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_lbs_deb_hex
LBB0_5:
	ldr	w2, [x20]
	sub	w8, w2, #130
	cmp	w8, #2
	b.lo	LBB0_12
; %bb.6:
	sub	w8, w2, #128
	cmp	w8, #1
	b.hi	LBB0_13
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x21, lsl #2]
	ldr	w9, [x20, #4]
	cmp	w2, w9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19]
	ldr	w0, [x8, x21, lsl #2]
	ldr	w1, [x20, #8]
	bl	_memcmp
	cbz	w0, LBB0_15
; %bb.9:
	ldr	w9, [x20, #4]
	ldr	x8, [x19, #8]
LBB0_10:
	lsl	x10, x21, #2
	str	w9, [x8, x10]
	ldr	x8, [x19]
	ldr	w0, [x8, x10]
	ldp	w2, w1, [x20, #4]
	bl	_memcpy
	mov	x0, x19
	bl	_lbs_set_wep_keys
	mov	w0, #0
	b	LBB0_15
LBB0_11:
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x8, _KEY_INFO_WPA_ENABLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KEY_INFO_WPA_ENABLED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _KEY_INFO_WPA_UNICAST@GOTPAGE
Lloh18:
	ldr	x9, [x9, _KEY_INFO_WPA_UNICAST@GOTPAGEOFF]
Lloh19:
	adrp	x10, _KEY_INFO_WPA_MCAST@GOTPAGE
Lloh20:
	ldr	x10, [x10, _KEY_INFO_WPA_MCAST@GOTPAGEOFF]
	cmp	x21, #0
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _KEY_TYPE_ID_TKIP@GOTPAGE
Lloh22:
	ldr	x10, [x10, _KEY_TYPE_ID_TKIP@GOTPAGEOFF]
Lloh23:
	adrp	x11, _KEY_TYPE_ID_AES@GOTPAGE
Lloh24:
	ldr	x11, [x11, _KEY_TYPE_ID_AES@GOTPAGEOFF]
	orr	w8, w9, w8
	cmp	w2, #130
	csel	x9, x10, x11, eq
	ldr	w1, [x9]
	ldp	w4, w3, [x20, #4]
	mov	x0, x19
	mov	x2, x8
	bl	_lbs_set_key_material
	mov	w0, #0
	b	LBB0_15
LBB0_13:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x22
	bl	_wiphy_err
Lloh27:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add_key: cipher 0x%x, mac_addr %pM\n"

l_.str.1:                               ; @.str.1
	.asciz	"add_key: key index %d, key len %d\n"

	.comm	_LBS_DEB_CFG80211,4,2           ; @LBS_DEB_CFG80211
l_.str.2:                               ; @.str.2
	.asciz	"KEY"

l_.str.3:                               ; @.str.3
	.asciz	"add_key: seq len %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"SEQ"

	.comm	_KEY_INFO_WPA_ENABLED,4,2       ; @KEY_INFO_WPA_ENABLED
	.comm	_KEY_INFO_WPA_UNICAST,4,2       ; @KEY_INFO_WPA_UNICAST
	.comm	_KEY_INFO_WPA_MCAST,4,2         ; @KEY_INFO_WPA_MCAST
	.comm	_KEY_TYPE_ID_TKIP,4,2           ; @KEY_TYPE_ID_TKIP
	.comm	_KEY_TYPE_ID_AES,4,2            ; @KEY_TYPE_ID_AES
l_.str.5:                               ; @.str.5
	.asciz	"unhandled cipher 0x%x\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_lbs_cfg_add_key
.subsections_via_symbols
