	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_key_replace
_ieee80211_key_replace:                 ## @ieee80211_key_replace
	.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	%r8, %r12
	movq	%rcx, %r14
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	leaq	24(%r15), %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.4:
	movl	8(%rbx), %edi
	jmp	LBB0_5
LBB0_6:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	testq	%r14, %r14
	movq	%r14, %rax
	cmoveq	%r12, %rax
	movslq	4(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rcx,%rax,4), %edi
LBB0_5:
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
LBB0_29:
	testq	%r14, %r14
	je	LBB0_30
## %bb.31:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_list_del                       ## TAILCALL
LBB0_30:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%edi, %edi
	testq	%r14, %r14
	je	LBB0_11
## %bb.9:
	testq	%r12, %r12
	je	LBB0_11
## %bb.10:
	movl	4(%r12), %eax
	xorl	%edi, %edi
	cmpl	4(%r14), %eax
	setne	%dil
LBB0_11:
	callq	_WARN_ON
	movq	%r12, %rax
	testq	%r14, %r14
	cmovneq	%r14, %rax
	movslq	4(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.13:
	movl	12(%r15), %edi
	movl	20(%r15), %esi
	callq	_key_mtx_dereference
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	%r14, %rax
	sete	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %edi
	movl	16(%r15), %esi
	callq	_key_mtx_dereference
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%r14, %rax
	sete	%bl
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	callq	_key_mtx_dereference
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	%r14, %rax
	sete	%r13b
	testq	%r12, %r12
	jne	LBB0_16
## %bb.14:
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	movl	$-1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	___ieee80211_set_default_key
LBB0_16:
	testq	%r12, %r12
	jne	LBB0_19
## %bb.17:
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_19
## %bb.18:
	movq	%r15, %rdi
	movl	$-1, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	___ieee80211_set_default_key
LBB0_19:
	testq	%r12, %r12
	jne	LBB0_22
## %bb.20:
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_22
## %bb.21:
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	___ieee80211_set_default_mgmt_key
	jmp	LBB0_22
LBB0_12:
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
LBB0_22:
	movq	(%r15), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %edi
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
	testq	%r12, %r12
	je	LBB0_25
## %bb.23:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_25
## %bb.24:
	movl	4(%r12), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	___ieee80211_set_default_key
LBB0_25:
	testq	%r12, %r12
	sete	%al
	xorb	$1, %bl
	orb	%al, %bl
	jne	LBB0_27
## %bb.26:
	movl	4(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	___ieee80211_set_default_key
LBB0_27:
	testq	%r12, %r12
	sete	%al
	xorb	$1, %r13b
	orb	%al, %r13b
	jne	LBB0_29
## %bb.28:
	movl	4(%r12), %esi
	movq	%r15, %rdi
	callq	___ieee80211_set_default_mgmt_key
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ieee80211_key_replace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_key_replace
_ieee80211_key_replace:                 ; @ieee80211_key_replace
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	cbz	x4, LBB0_2
; %bb.1:
	add	x1, x21, #24
	mov	x0, x20
	bl	_list_add_tail
LBB0_2:
	cbz	x22, LBB0_5
; %bb.3:
	cbz	w23, LBB0_5
; %bb.4:
	ldr	w0, [x22, #8]
	b	LBB0_7
LBB0_5:
	cbz	x22, LBB0_11
; %bb.6:
	cmp	x19, #0
	csel	x8, x20, x19, eq
	ldrsw	x8, [x8, #4]
	ldr	x9, [x22]
	ldr	w0, [x9, x8, lsl #2]
LBB0_7:
	mov	x1, x20
	bl	_rcu_assign_pointer
LBB0_8:
	cbz	x19, LBB0_10
; %bb.9:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_list_del
LBB0_10:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w0, #0
	cbz	x19, LBB0_14
; %bb.12:
	cbz	x20, LBB0_14
; %bb.13:
	ldr	w8, [x20, #4]
	ldr	w9, [x19, #4]
	cmp	w8, w9
	cset	w0, ne
LBB0_14:
	bl	_WARN_ON
	cmp	x19, #0
	csel	x8, x19, x20, ne
	ldrsw	x26, [x8, #4]
	cbz	x19, LBB0_24
; %bb.15:
	ldr	w0, [x21, #12]
	ldr	w1, [x21, #20]
	bl	_key_mtx_dereference
	mov	x24, x0
	cmp	x0, x19
	cset	w28, eq
	ldp	w0, w1, [x21, #12]
	bl	_key_mtx_dereference
	mov	x23, x0
	cmp	x0, x19
	cset	w27, eq
	ldp	w1, w0, [x21, #8]
	bl	_key_mtx_dereference
	mov	x22, x0
	cmp	x0, x19
	cset	w25, eq
	cbnz	x20, LBB0_18
; %bb.16:
	cmp	x24, x19
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x21
	mov	w1, #-1
	mov	w2, #1
	mov	w3, #0
	bl	___ieee80211_set_default_key
LBB0_18:
	cbnz	x20, LBB0_21
; %bb.19:
	cmp	x23, x19
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x21
	mov	w1, #-1
	mov	w2, #0
	mov	w3, #1
	bl	___ieee80211_set_default_key
LBB0_21:
	cbnz	x20, LBB0_25
; %bb.22:
	cmp	x22, x19
	b.ne	LBB0_25
; %bb.23:
	mov	x0, x21
	mov	w1, #-1
	bl	___ieee80211_set_default_mgmt_key
	b	LBB0_25
LBB0_24:
	mov	w25, #0
	mov	w28, #0
	mov	w27, #0
LBB0_25:
	ldr	x8, [x21]
	ldr	w0, [x8, x26, lsl #2]
	mov	x1, x20
	bl	_rcu_assign_pointer
	cbz	x20, LBB0_28
; %bb.26:
	cbz	w28, LBB0_28
; %bb.27:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	w2, #1
	mov	w3, #0
	bl	___ieee80211_set_default_key
LBB0_28:
	cmp	x20, #0
	cset	w8, eq
	eor	w9, w27, #0x1
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_30
; %bb.29:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #1
	bl	___ieee80211_set_default_key
LBB0_30:
	cmp	x20, #0
	cset	w8, eq
	eor	w9, w25, #0x1
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_8
; %bb.31:
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	___ieee80211_set_default_mgmt_key
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ieee80211_key_replace
.subsections_via_symbols
