	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_set_key
_ath5k_set_key:                         ## @ath5k_set_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	%r8, %r14
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_ath5k_hw_common
	movq	_ath5k_modparam_nohwcrypt@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ecx
	movq	_IEEE80211_KEY_FLAG_RX_MGMT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_3
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%rbx), %rdx
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rsi
	movl	4(%r14), %edi
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.4:
	movl	%edi, %edx
	andl	$-2, %edx
	cmpl	$130, %edx
	jne	LBB0_6
## %bb.5:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_1
LBB0_6:
	leal	-128(%rdi), %ecx
	cmpl	$3, %ecx
	jae	LBB0_7
LBB0_9:
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$133, %r12d
	je	LBB0_17
## %bb.10:
	cmpl	$132, %r12d
	jne	LBB0_18
## %bb.11:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_ath_key_config
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_19
## %bb.12:
	movl	%ebx, 8(%r14)
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	movl	(%r14), %eax
	orl	(%rcx), %eax
	movl	4(%r14), %ecx
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	cmpl	$131, %ecx
	je	LBB0_16
## %bb.13:
	cmpl	$130, %ecx
	jne	LBB0_19
## %bb.14:
	movq	_IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_7:
	cmpl	$131, %edi
	jne	LBB0_1
## %bb.8:
	movq	_ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_9
	jmp	LBB0_1
LBB0_17:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath_key_delete
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_16:
	movq	_IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPCREL(%rip), %rcx
LBB0_15:
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_19:
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ath5k_modparam_nohwcrypt,8,3   ## @ath5k_modparam_nohwcrypt
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ## @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_ATH_CRYPT_CAP_CIPHER_AESCCM,4,2 ## @ATH_CRYPT_CAP_CIPHER_AESCCM
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_SW_MGMT_TX,4,2 ## @IEEE80211_KEY_FLAG_SW_MGMT_TX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ath5k_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_set_key
_ath5k_set_key:                         ; @ath5k_set_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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_ath5k_hw_common
Lloh0:
	adrp	x8, _ath5k_modparam_nohwcrypt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ath5k_modparam_nohwcrypt@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	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
LBB0_4:
	mov	x23, x0
	ldr	x10, [x22]
Lloh9:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x9]
	ldr	w9, [x20, #4]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.5:
	and	w10, w9, #0xfffffffe
	cmp	w10, #130
	b.ne	LBB0_7
; %bb.6:
Lloh12:
	adrp	x10, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_2
LBB0_7:
	sub	w8, w9, #128
	cmp	w8, #3
	b.hs	LBB0_14
LBB0_8:
	mov	x0, x19
	bl	_mutex_lock
	cmp	w24, #133
	b.eq	LBB0_16
; %bb.9:
	cmp	w24, #132
	b.ne	LBB0_17
; %bb.10:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_ath_key_config
	mov	x21, x0
	tbnz	w0, #31, LBB0_18
; %bb.11:
	str	w21, [x20, #8]
Lloh15:
	adrp	x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldp	w10, w9, [x20]
	orr	w8, w10, w8
	str	w8, [x20]
	cmp	w9, #131
	b.eq	LBB0_19
; %bb.12:
	cmp	w9, #130
	b.ne	LBB0_20
; %bb.13:
	mov	w21, #0
Lloh18:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_18
LBB0_14:
	cmp	w9, #131
	b.ne	LBB0_2
; %bb.15:
	ldr	w8, [x23]
Lloh21:
	adrp	x9, _ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
	b	LBB0_2
LBB0_16:
	mov	x0, x23
	mov	x1, x20
	bl	_ath_key_delete
	mov	w21, #0
	b	LBB0_18
LBB0_17:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_18:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_3
LBB0_19:
	mov	w21, #0
Lloh27:
	adrp	x9, _IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
	b	LBB0_18
LBB0_20:
	mov	w21, #0
	b	LBB0_18
	.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 AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ath5k_modparam_nohwcrypt,8,3   ; @ath5k_modparam_nohwcrypt
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ; @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_ATH_CRYPT_CAP_CIPHER_AESCCM,4,2 ; @ATH_CRYPT_CAP_CIPHER_AESCCM
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_SW_MGMT_TX,4,2 ; @IEEE80211_KEY_FLAG_SW_MGMT_TX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ath5k_set_key
.subsections_via_symbols
