	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_add_key
_ieee80211_add_key:                     ## @ieee80211_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, %r15
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rsi, %rdi
	callq	_IEEE80211_DEV_TO_SUB_IF
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_ieee80211_sdata_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	(%rbx), %edi
	leal	-128(%rdi), %eax
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.4:
	movq	(%r13), %rax
	movq	8(%rax), %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.28:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENETDOWN@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_5:
	movl	(%rbx), %edi
LBB0_6:
	movl	16(%rbx), %edx
	movl	12(%rbx), %ecx
	movl	4(%rbx), %r9d
	movl	8(%rbx), %r8d
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r14d, %esi
	callq	_ieee80211_key_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.29:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.8:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_9:
	movq	(%r13), %rdi
	callq	_mutex_lock
	testq	%r15, %r15
	je	LBB0_10
## %bb.16:
	movq	%r13, %rdi
	addq	$16, %rdi
	callq	_ieee80211_vif_is_mesh
	movq	%r13, %rdi
	movq	%r15, %rsi
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	callq	_sta_info_get
	jmp	LBB0_19
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_18:
	callq	_sta_info_get_bss
LBB0_19:
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_WLAN_STA_ASSOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_test_sta_flag
	testq	%rax, %rax
	je	LBB0_21
LBB0_11:
	movl	$-131, %eax
	addl	16(%r13), %eax
	cmpl	$10, %eax
	ja	LBB0_25
## %bb.12:
	movl	$503, %ecx                      ## imm = 0x1F7
	btl	%eax, %ecx
	jae	LBB0_13
## %bb.24:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_25:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_ieee80211_key_link
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_21:
	movq	%r14, %rdi
	callq	_ieee80211_key_free_unused
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movq	(%r13), %rdi
	callq	_mutex_unlock
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	$1536, %ecx                     ## imm = 0x600
	btl	%eax, %ecx
	jae	LBB0_14
## %bb.22:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.23:
	movq	_WLAN_STA_MFP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_test_sta_flag
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_25
LBB0_14:
	movl	12(%r13), %eax
	movq	_IEEE80211_MFP_DISABLED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_25
LBB0_15:
	movq	_IEEE80211_KEY_FLAG_RX_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ENETDOWN,4,2                   ## @ENETDOWN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_WLAN_STA_ASSOC,4,2             ## @WLAN_STA_ASSOC
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IEEE80211_MFP_DISABLED,4,2     ## @IEEE80211_MFP_DISABLED
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ## @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_WLAN_STA_MFP,4,2               ## @WLAN_STA_MFP
	.comm	_IEEE80211_MESH_SEC_NONE,4,2    ## @IEEE80211_MESH_SEC_NONE
	.no_dead_strip	_ieee80211_add_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_add_key
_ieee80211_add_key:                     ; @ieee80211_add_key
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x5
	mov	x21, x4
	mov	x22, x3
	mov	x20, x2
	mov	x0, x1
	bl	_IEEE80211_DEV_TO_SUB_IF
	mov	x19, x0
	bl	_ieee80211_sdata_running
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x23]
	sub	w8, w0, #128
	cmp	w8, #2
	b.hi	LBB0_7
; %bb.2:
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _ENETDOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENETDOWN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_6:
	ldr	w0, [x23]
LBB0_7:
	ldp	w3, w2, [x23, #12]
	ldp	w5, w4, [x23, #4]
	mov	x1, x20
	bl	_ieee80211_key_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_9:
	cbz	w22, LBB0_11
; %bb.10:
Lloh4:
	adrp	x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_11:
	ldr	x0, [x19]
	bl	_mutex_lock
	cbz	x21, LBB0_16
; %bb.12:
	add	x0, x19, #16
	bl	_ieee80211_vif_is_mesh
	cbz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x21
	bl	_sta_info_get
	mov	x21, x0
	cbnz	x0, LBB0_15
	b	LBB0_20
LBB0_14:
	mov	x0, x19
	mov	x1, x21
	bl	_sta_info_get_bss
	mov	x21, x0
	cbz	x0, LBB0_20
LBB0_15:
Lloh7:
	adrp	x8, _WLAN_STA_ASSOC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WLAN_STA_ASSOC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_test_sta_flag
	cbz	x0, LBB0_20
LBB0_16:
	ldr	w8, [x19, #16]
	sub	w8, w8, #131
	cmp	w8, #10
	b.hi	LBB0_19
; %bb.17:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #503
	tst	w8, w9
	b.eq	LBB0_23
; %bb.18:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_19:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_ieee80211_key_link
	mov	x20, x0
	b	LBB0_21
LBB0_20:
	mov	x0, x20
	bl	_ieee80211_key_free_unused
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_21:
	ldr	x0, [x19]
	bl	_mutex_unlock
LBB0_22:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
	tst	w8, #0x600
	b.eq	LBB0_26
; %bb.24:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_19
; %bb.25:
Lloh13:
	adrp	x8, _WLAN_STA_MFP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WLAN_STA_MFP@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_test_sta_flag
	cbnz	x0, LBB0_27
	b	LBB0_19
LBB0_26:
	ldr	w8, [x19, #12]
Lloh16:
	adrp	x9, _IEEE80211_MFP_DISABLED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IEEE80211_MFP_DISABLED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_19
LBB0_27:
Lloh19:
	adrp	x8, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENETDOWN,4,2                   ; @ENETDOWN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_WLAN_STA_ASSOC,4,2             ; @WLAN_STA_ASSOC
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IEEE80211_MFP_DISABLED,4,2     ; @IEEE80211_MFP_DISABLED
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ; @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_WLAN_STA_MFP,4,2               ; @WLAN_STA_MFP
	.comm	_IEEE80211_MESH_SEC_NONE,4,2    ; @IEEE80211_MESH_SEC_NONE
	.no_dead_strip	_ieee80211_add_key
.subsections_via_symbols
