	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_set_key
_ath9k_set_key:                         ## @ath9k_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r13
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	movq	8(%rbx), %rdi
	callq	_ath9k_hw_common
	movq	_ath9k_modparam_nohwcrypt@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_41
LBB0_3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdx
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_5
## %bb.4:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_9
LBB0_5:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	movq	_WLAN_CIPHER_SUITE_TKIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_7
## %bb.6:
	movq	_WLAN_CIPHER_SUITE_CCMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_9
LBB0_7:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testl	%edx, 8(%rcx)
	je	LBB0_8
LBB0_9:
	movq	%r12, %r15
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_ath9k_ps_wakeup
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %r12
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	callq	_ath_dbg
	testq	%r13, %r13
	je	LBB0_10
## %bb.11:
	movq	(%r13), %rax
	jmp	LBB0_12
LBB0_10:
	xorl	%eax, %eax
LBB0_12:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	%r12, %rdi
	cmpl	$129, %r14d
	je	LBB0_32
## %bb.13:
	cmpl	$128, %r14d
	jne	LBB0_39
## %bb.14:
	testq	%r13, %r13
	je	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_ath9k_del_ps_key
	movq	%r12, %rdi
LBB0_16:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	$0, 12(%r15)
	movq	%rbx, %rsi
	movq	%r15, %rbx
	movq	%r13, %rdx
	movq	%r15, %rcx
	callq	_ath_key_config
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movl	%r14d, 12(%rbx)
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	movl	8(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rcx
	movq	_WLAN_CIPHER_SUITE_TKIP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_20
## %bb.19:
	movq	_IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 8(%rbx)
LBB0_20:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r15), %rdx
	xorl	%r14d, %r14d
	cmpl	$0, (%rdx)
	je	LBB0_23
## %bb.21:
	movq	_WLAN_CIPHER_SUITE_CCMP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_23
## %bb.22:
	movq	_IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_23
LBB0_32:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_ath_key_delete
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_38
## %bb.33:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_38
## %bb.34:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movl	(%rdi,%rbx,4), %eax
	cmpl	12(%r14), %eax
	je	LBB0_36
## %bb.37:                              ##   in Loop: Header=BB0_35 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_35
	jmp	LBB0_38
LBB0_39:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_40
LBB0_17:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_23:
	testq	%r13, %r13
	je	LBB0_40
## %bb.24:
	cmpl	$0, 12(%rbx)
	je	LBB0_40
## %bb.25:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_26
## %bb.27:
	movq	%rbx, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	$0, (%rdi,%rbx,4)
	je	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_28 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_28
	jmp	LBB0_31
LBB0_8:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_36:
	movl	$0, (%rdi,%rbx,4)
LBB0_38:
	movl	$0, 12(%r14)
	xorl	%r14d, %r14d
	jmp	LBB0_40
LBB0_26:
	xorl	%ebx, %ebx
	jmp	LBB0_31
LBB0_29:
	movl	12(%r12), %eax
	movl	%eax, (%rdi,%rbx,4)
LBB0_31:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	sete	%dil
	callq	_WARN_ON
LBB0_40:
	movq	%r15, %rdi
	callq	_ath9k_ps_restore
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_41:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ath9k_modparam_nohwcrypt,8,3   ## @ath9k_modparam_nohwcrypt
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ## @NL80211_IFTYPE_MESH_POINT
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ## @WLAN_CIPHER_SUITE_TKIP
	.comm	_WLAN_CIPHER_SUITE_CCMP,8,3     ## @WLAN_CIPHER_SUITE_CCMP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set HW Key %d\n"

	.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	_ath9k_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_set_key
_ath9k_set_key:                         ; @ath9k_set_key
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	ldr	x19, [x0]
	ldr	x0, [x19, #8]
	bl	_ath9k_hw_common
Lloh0:
	adrp	x8, _ath9k_modparam_nohwcrypt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ath9k_modparam_nohwcrypt@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_37
LBB0_3:
	mov	x23, x0
	ldr	x8, [x22]
Lloh5:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _WLAN_CIPHER_SUITE_TKIP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WLAN_CIPHER_SUITE_TKIP@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x10, _WLAN_CIPHER_SUITE_CCMP@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_CCMP@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x20, #8]
Lloh17:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_30
LBB0_6:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_ath9k_ps_wakeup
Lloh20:
	adrp	x8, _CONFIG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x24
	bl	_ath_dbg
	cbz	x21, LBB0_23
; %bb.7:
	ldr	x25, [x21]
	cmp	w24, #129
	b.eq	LBB0_24
LBB0_8:
	cmp	w24, #128
	b.ne	LBB0_29
; %bb.9:
	cbz	x21, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_ath9k_del_ps_key
LBB0_11:
	str	wzr, [x20, #12]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_ath_key_config
	mov	x21, x0
	tbnz	w0, #31, LBB0_17
; %bb.12:
Lloh25:
	adrp	x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	stp	w8, w21, [x20, #8]
	ldr	x9, [x20]
Lloh28:
	adrp	x10, _WLAN_CIPHER_SUITE_TKIP@GOTPAGE
Lloh29:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_TKIP@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_14
; %bb.13:
Lloh31:
	adrp	x10, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGE
Lloh32:
	ldr	x10, [x10, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x20, #8]
LBB0_14:
	mov	w21, #0
	ldr	x10, [x19, #8]
	ldr	w10, [x10]
	cbz	w10, LBB0_17
; %bb.15:
Lloh34:
	adrp	x10, _WLAN_CIPHER_SUITE_CCMP@GOTPAGE
Lloh35:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_CCMP@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.16:
	mov	w21, #0
Lloh37:
	adrp	x9, _IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPAGE
Lloh38:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_SW_MGMT_TX@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20, #8]
LBB0_17:
	cbz	x25, LBB0_36
; %bb.18:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_36
; %bb.19:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_33
; %bb.20:
	mov	x22, #0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	w8, [x0, x22, lsl #2]
	cbz	w8, LBB0_34
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_21
	b	LBB0_35
LBB0_23:
	mov	x25, #0
	cmp	w24, #129
	b.ne	LBB0_8
LBB0_24:
	mov	x0, x23
	mov	x1, x20
	bl	_ath_key_delete
	cbz	x25, LBB0_32
; %bb.25:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_32
; %bb.26:
	mov	x21, #0
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	w8, [x0, x21, lsl #2]
	ldr	w9, [x20, #12]
	cmp	w8, w9
	b.eq	LBB0_31
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_27
	b	LBB0_32
LBB0_29:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_36
LBB0_30:
Lloh43:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_2
LBB0_31:
	str	wzr, [x0, x21, lsl #2]
LBB0_32:
	mov	w21, #0
	str	wzr, [x20, #12]
	b	LBB0_36
LBB0_33:
	mov	w22, #0
	b	LBB0_35
LBB0_34:
	ldr	w8, [x20, #12]
	str	w8, [x0, x22, lsl #2]
LBB0_35:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	cset	w0, eq
	bl	_WARN_ON
LBB0_36:
	mov	x0, x19
	bl	_ath9k_ps_restore
	mov	x0, x19
	bl	_mutex_unlock
LBB0_37:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_ath9k_modparam_nohwcrypt,8,3   ; @ath9k_modparam_nohwcrypt
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ; @NL80211_IFTYPE_MESH_POINT
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ; @WLAN_CIPHER_SUITE_TKIP
	.comm	_WLAN_CIPHER_SUITE_CCMP,8,3     ; @WLAN_CIPHER_SUITE_CCMP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set HW Key %d\n"

	.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	_ath9k_set_key
.subsections_via_symbols
