	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_key_link             ## -- Begin function ieee80211_key_link
	.p2align	4, 0x90
_ieee80211_key_link:                    ## @ieee80211_key_link
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	24(%rbx), %r12d
	movslq	28(%rbx), %r13
	movq	(%r14), %rdi
	movq	%rdi, 16(%rbx)
	movq	%r14, 8(%rbx)
	movq	%r15, (%rbx)
	callq	_mutex_lock
	movq	(%r14), %rdi
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:
	leaq	8(%r15), %r13
	jmp	LBB0_6
LBB0_3:
	shlq	$2, %r13
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	addq	(%r15), %r13
	jmp	LBB0_6
LBB0_5:
	addq	8(%r14), %r13
LBB0_6:
	movl	(%r13), %esi
	callq	_key_mtx_dereference
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_increment_tailroom_need_count
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movq	%r13, %rcx
	movq	%rbx, %r8
	callq	_ieee80211_key_replace
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_ieee80211_key_destroy
	movq	%rbx, %rdi
	callq	_ieee80211_debugfs_key_add
	movq	%rbx, %rdi
	callq	_ieee80211_key_enable_hw_accel
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ieee80211_key_free
LBB0_8:
	movq	(%r14), %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_key_link             ; -- Begin function ieee80211_key_link
	.p2align	2
_ieee80211_key_link:                    ; @ieee80211_key_link
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	cmp	x1, #0
	cset	w0, eq
	bl	_BUG_ON
	cmp	x20, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh0:
	adrp	x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w23, [x20, #24]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	and	w22, w8, w9
	ldr	x0, [x19]
	stp	x19, x0, [x20, #8]
	str	x21, [x20]
	bl	_mutex_lock
	ldr	x0, [x19]
	cbz	x21, LBB0_3
; %bb.1:
	cbz	w22, LBB0_3
; %bb.2:
	add	x8, x21, #8
	b	LBB0_7
LBB0_3:
	cbz	x21, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #8]
LBB0_6:
	add	x8, x8, x23, lsl #2
LBB0_7:
	ldr	w1, [x8]
	bl	_key_mtx_dereference
	mov	x23, x0
	mov	x0, x19
	bl	_increment_tailroom_need_count
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x20
	bl	_ieee80211_key_replace
	mov	x0, x23
	mov	w1, #1
	bl	_ieee80211_key_destroy
	mov	x0, x20
	bl	_ieee80211_debugfs_key_add
	mov	x0, x20
	bl	_ieee80211_key_enable_hw_accel
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	w1, #1
	bl	_ieee80211_key_free
LBB0_9:
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
.subsections_via_symbols
