	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_key_config                 ## -- Begin function ath_key_config
	.p2align	4, 0x90
_ath_key_config:                        ## @ath_key_config
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	(%r12), %eax
	cmpl	$129, %eax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jg	LBB0_3
## %bb.1:
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_6
## %bb.2:
	movq	_ATH_CIPHER_WEP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	cmpl	$130, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$131, %eax
	jne	LBB0_20
## %bb.5:
	movq	_ATH_CIPHER_AES_CCM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	testl	%eax, %eax
	jne	LBB0_20
## %bb.7:
	movq	_ATH_CIPHER_CLR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ATH_CIPHER_TKIP@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	4(%r12), %edx
	movl	%edx, -96(%rbp)
	testl	%edx, %edx
	je	LBB0_11
## %bb.10:
	movq	-88(%rbp), %rdi
	movq	8(%r12), %rsi
	callq	_memcpy
LBB0_11:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r12)
	je	LBB0_16
## %bb.12:
	movl	20(%r12), %ebx
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	testl	%ebx, %ebx
	je	LBB0_19
## %bb.13:
	testq	%rax, %rax
	jne	LBB0_20
## %bb.14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$132, (%rax)
	je	LBB0_37
## %bb.15:
	movq	(%r15), %r13
	movl	20(%r12), %ebx
	jmp	LBB0_25
LBB0_16:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	cmpl	$133, %eax
	je	LBB0_21
## %bb.17:
	cmpl	$132, %eax
	jne	LBB0_24
## %bb.18:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	jmp	LBB0_23
LBB0_19:
	testq	%rax, %rax
	je	LBB0_27
LBB0_20:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_21:
	testq	%r15, %r15
	je	LBB0_24
## %bb.22:
	movq	(%r15), %rsi
LBB0_23:
	movl	(%r14), %edx
	movq	%r13, %rdi
	callq	_memcpy
	orb	$1, (%r13)
	jmp	LBB0_28
LBB0_24:
	movl	20(%r12), %ebx
	xorl	%r13d, %r13d
LBB0_25:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testl	%ebx, %ebx
	jns	LBB0_29
LBB0_26:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_27:
	movq	(%r15), %r13
LBB0_28:
	movl	(%r12), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_ath_reserve_key_cache_slot
	movl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_26
LBB0_29:
	cmpl	$130, (%r12)
	jne	LBB0_36
## %bb.30:
	movq	8(%r12), %rdx
	xorl	%r9d, %r9d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$132, (%rax)
	sete	%r9b
	leaq	-96(%rbp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r13, %r8
	callq	_ath_setkey_tkip
	testl	%eax, %eax
	je	LBB0_37
LBB0_31:
	movl	8(%r14), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movl	(%r12), %eax
	cmpl	$131, %eax
	jne	LBB0_33
## %bb.32:
	movl	12(%r14), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movl	(%r12), %eax
LBB0_33:
	cmpl	$130, %eax
	jne	LBB0_39
## %bb.34:
	leal	64(%rbx), %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	movl	%r15d, %edi
	callq	_set_bit
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movl	%r15d, %edi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	callq	_set_bit
	movq	_ATH_CRYPT_CAP_MIC_COMBINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_39
## %bb.35:
	leal	32(%rbx), %r15d
	movl	8(%r14), %esi
	movl	%r15d, %edi
	callq	_set_bit
	leal	96(%rbx), %r12d
	movl	8(%r14), %esi
	movl	%r12d, %edi
	callq	_set_bit
	movl	4(%r14), %esi
	movl	%r15d, %edi
	callq	_set_bit
	movl	4(%r14), %esi
	movl	%r12d, %edi
	callq	_set_bit
	jmp	LBB0_39
LBB0_36:
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r13, %rcx
	callq	_ath_hw_set_keycache_entry
	testl	%eax, %eax
	jne	LBB0_31
LBB0_37:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_38:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_39:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.40:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_ATH_CIPHER_CLR,4,2             ## @ATH_CIPHER_CLR
	.comm	_ATH_CIPHER_WEP,4,2             ## @ATH_CIPHER_WEP
	.comm	_ATH_CIPHER_TKIP,4,2            ## @ATH_CIPHER_TKIP
	.comm	_ATH_CIPHER_AES_CCM,4,2         ## @ATH_CIPHER_AES_CCM
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_ATH_CRYPT_CAP_MIC_COMBINED,4,2 ## @ATH_CRYPT_CAP_MIC_COMBINED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_key_config                 ; -- Begin function ath_key_config
	.p2align	2
_ath_key_config:                        ; @ath_key_config
	.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
	sub	sp, sp, #32
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	sub	x0, x29, #96
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x20]
	cmp	w8, #129
	b.gt	LBB0_3
; %bb.1:
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_6
; %bb.2:
Lloh7:
	adrp	x8, _ATH_CIPHER_WEP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATH_CIPHER_WEP@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #131
	b.ne	LBB0_20
; %bb.5:
Lloh9:
	adrp	x8, _ATH_CIPHER_AES_CCM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATH_CIPHER_AES_CCM@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	cbnz	w8, LBB0_20
; %bb.7:
Lloh11:
	adrp	x8, _ATH_CIPHER_CLR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATH_CIPHER_CLR@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _ATH_CIPHER_TKIP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATH_CIPHER_TKIP@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	ldr	w2, [x20, #4]
	stur	w8, [x29, #-80]
	stur	w2, [x29, #-96]
	cbz	w2, LBB0_11
; %bb.10:
	ldur	x0, [x29, #-88]
	ldr	x1, [x20, #8]
	bl	_memcpy
LBB0_11:
	ldr	w8, [x20, #16]
Lloh15:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.12:
	ldr	w22, [x20, #20]
	cmp	x23, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	w22, LBB0_19
; %bb.13:
	cbnz	x0, LBB0_20
; %bb.14:
	ldr	w8, [x21]
	cmp	w8, #132
	b.eq	LBB0_36
; %bb.15:
	ldr	x22, [x23]
	ldr	w23, [x20, #20]
	tbz	w23, #31, LBB0_28
	b	LBB0_25
LBB0_16:
	ldr	w8, [x21]
	cmp	w8, #133
	b.eq	LBB0_21
; %bb.17:
	cmp	w8, #132
	b.ne	LBB0_24
; %bb.18:
	ldr	x1, [x21, #8]
	b	LBB0_23
LBB0_19:
	cbz	x0, LBB0_26
LBB0_20:
Lloh18:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_37
LBB0_21:
	cbz	x23, LBB0_24
; %bb.22:
	ldr	x1, [x23]
LBB0_23:
	ldr	w2, [x25]
	mov	x0, x22
	bl	_memcpy
	ldr	w8, [x22]
	orr	w8, w8, #0x1
	str	w8, [x22]
	b	LBB0_27
LBB0_24:
	mov	x22, #0
	ldr	w23, [x20, #20]
	tbz	w23, #31, LBB0_28
LBB0_25:
Lloh20:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_37
LBB0_26:
	ldr	x22, [x23]
LBB0_27:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ath_reserve_key_cache_slot
	mov	x23, x0
	tbnz	w23, #31, LBB0_25
LBB0_28:
	ldr	w8, [x20]
	cmp	w8, #130
	b.ne	LBB0_35
; %bb.29:
	ldr	x2, [x20, #8]
	ldr	w8, [x21]
	cmp	w8, #132
	cset	w5, eq
	sub	x3, x29, #96
	mov	x0, x19
	mov	x1, x23
	mov	x4, x22
	bl	_ath_setkey_tkip
	cbz	w0, LBB0_36
LBB0_30:
	ldr	w1, [x19, #8]
	mov	x0, x23
	bl	_set_bit
	ldr	w8, [x20]
	cmp	w8, #131
	b.ne	LBB0_32
; %bb.31:
	ldr	w1, [x19, #12]
	mov	x0, x23
	bl	_set_bit
	ldr	w8, [x20]
LBB0_32:
	cmp	w8, #130
	b.ne	LBB0_38
; %bb.33:
	add	w20, w23, #64
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_set_bit
	ldr	w1, [x19, #4]
	mov	x0, x23
	bl	_set_bit
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_set_bit
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _ATH_CRYPT_CAP_MIC_COMBINED@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ATH_CRYPT_CAP_MIC_COMBINED@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_38
; %bb.34:
	add	w20, w23, #32
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_set_bit
	add	w21, w23, #96
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_set_bit
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_set_bit
	ldr	w1, [x19, #4]
	mov	x0, x21
	bl	_set_bit
	b	LBB0_38
LBB0_35:
	sub	x2, x29, #96
	mov	x0, x19
	mov	x1, x23
	mov	x3, x22
	bl	_ath_hw_set_keycache_entry
	cbnz	w0, LBB0_30
LBB0_36:
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_37:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_38:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_40
; %bb.39:
	mov	x0, x23
	sub	sp, x29, #64
	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
LBB0_40:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_ATH_CIPHER_CLR,4,2             ; @ATH_CIPHER_CLR
	.comm	_ATH_CIPHER_WEP,4,2             ; @ATH_CIPHER_WEP
	.comm	_ATH_CIPHER_TKIP,4,2            ; @ATH_CIPHER_TKIP
	.comm	_ATH_CIPHER_AES_CCM,4,2         ; @ATH_CIPHER_AES_CCM
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_ATH_CRYPT_CAP_MIC_COMBINED,4,2 ; @ATH_CRYPT_CAP_MIC_COMBINED
.subsections_via_symbols
