	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_key_enable_hw_accel
_ieee80211_key_enable_hw_accel:         ## @ieee80211_key_enable_hw_accel
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_might_sleep
	movq	16(%rbx), %rdi
	movq	8(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_18
## %bb.1:
	callq	_assert_key_lock
	movq	32(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.2:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	16(%rbx), %rax
	movq	_IEEE80211_HW_SUPPORTS_PER_STA_GTK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_18
LBB0_4:
	cmpl	$0, 4(%r12)
	je	LBB0_18
LBB0_5:
	movq	24(%rbx), %r15
	movq	8(%r15), %rax
	movq	_NL80211_IFTYPE_AP_VLAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_18
LBB0_7:
	movq	16(%rbx), %rdi
	movq	_SET_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%rbx, %r8
	callq	_drv_set_key
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_18
## %bb.14:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_18
## %bb.15:
	movl	8(%rbx), %edx
	testq	%r12, %r12
	jne	LBB0_17
## %bb.16:
	movq	_bcast_addr@GOTPCREL(%rip), %r12
LBB0_17:
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %r8d
	callq	_sdata_err
LBB0_18:
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	jb	LBB0_20
## %bb.19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_8:
	movq	_KEY_FLAG_UPLOADED_TO_HARDWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	movl	(%rbx), %eax
	movq	_IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.9:
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.10:
	movq	_IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.11:
	decl	(%r15)
LBB0_12:
	movq	_IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%cl
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	xorl	%r14d, %r14d
LBB0_20:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_IEEE80211_HW_SUPPORTS_PER_STA_GTK,4,2 ## @IEEE80211_HW_SUPPORTS_PER_STA_GTK
	.comm	_NL80211_IFTYPE_AP_VLAN,8,3     ## @NL80211_IFTYPE_AP_VLAN
	.comm	_SET_KEY,4,2                    ## @SET_KEY
	.comm	_KEY_FLAG_UPLOADED_TO_HARDWARE,4,2 ## @KEY_FLAG_UPLOADED_TO_HARDWARE
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,2 ## @IEEE80211_KEY_FLAG_PUT_IV_SPACE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set key (%d, %pM) to hardware (%d)\n"

	.comm	_bcast_addr,4,2                 ## @bcast_addr
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ieee80211_key_enable_hw_accel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_key_enable_hw_accel
_ieee80211_key_enable_hw_accel:         ; @ieee80211_key_enable_hw_accel
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_might_sleep
	ldr	x0, [x19, #16]
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.1:
	bl	_assert_key_lock
	ldr	x21, [x19, #32]
	cbz	x21, LBB0_5
; %bb.2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IEEE80211_HW_SUPPORTS_PER_STA_GTK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_HW_SUPPORTS_PER_STA_GTK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_4:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_11
LBB0_5:
	ldr	x20, [x19, #24]
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _NL80211_IFTYPE_AP_VLAN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_IFTYPE_AP_VLAN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_7:
	ldr	x0, [x19, #16]
Lloh12:
	adrp	x8, _SET_KEY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SET_KEY@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x2, x20
	mov	x3, x21
	mov	x4, x19
	bl	_drv_set_key
	cbz	w0, LBB0_13
; %bb.8:
	mov	x4, x0
Lloh15:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_11
; %bb.9:
Lloh18:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmn	w4, w8
	b.eq	LBB0_11
; %bb.10:
	ldr	w2, [x19, #8]
Lloh21:
	adrp	x8, _bcast_addr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _bcast_addr@GOTPAGEOFF]
	cmp	x21, #0
	csel	x8, x8, x21, eq
	ldr	w3, [x8]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_sdata_err
LBB0_11:
	ldr	w8, [x19, #4]
	sub	w8, w8, #128
	cmp	w8, #5
	b.lo	LBB0_18
; %bb.12:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_13:
Lloh28:
	adrp	x8, _KEY_FLAG_UPLOADED_TO_HARDWARE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _KEY_FLAG_UPLOADED_TO_HARDWARE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
	ldr	w8, [x19]
Lloh31:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGEOFF]
Lloh33:
	ldr	w11, [x9]
Lloh34:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh35:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh36:
	adrp	x10, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGE
Lloh37:
	ldr	x10, [x10, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGEOFF]
	tst	w11, w8
	b.ne	LBB0_17
; %bb.14:
	ldr	w11, [x9]
	tst	w11, w8
	b.ne	LBB0_17
; %bb.15:
	ldr	w11, [x10]
	tst	w11, w8
	b.ne	LBB0_17
; %bb.16:
	ldr	w11, [x20]
	sub	w11, w11, #1
	str	w11, [x20]
LBB0_17:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w10, ne
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	and	w0, w10, w8
	bl	_WARN_ON
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_IEEE80211_HW_SUPPORTS_PER_STA_GTK,4,2 ; @IEEE80211_HW_SUPPORTS_PER_STA_GTK
	.comm	_NL80211_IFTYPE_AP_VLAN,8,3     ; @NL80211_IFTYPE_AP_VLAN
	.comm	_SET_KEY,4,2                    ; @SET_KEY
	.comm	_KEY_FLAG_UPLOADED_TO_HARDWARE,4,2 ; @KEY_FLAG_UPLOADED_TO_HARDWARE
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,2 ; @IEEE80211_KEY_FLAG_PUT_IV_SPACE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set key (%d, %pM) to hardware (%d)\n"

	.comm	_bcast_addr,4,2                 ; @bcast_addr
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ieee80211_key_enable_hw_accel
.subsections_via_symbols
