	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_hw_set_keycache_entry
_ath_hw_set_keycache_entry:             ## @ath_hw_set_keycache_entry
	.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	%rcx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	cmpq	%rsi, %rcx
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %r12
	movslq	(%rdx), %rdx
	leal	-128(%rdx), %esi
	cmpl	$4, %esi
	ja	LBB0_18
## %bb.3:
	movq	16(%r15), %r14
	movq	_AR_KEYTABLE_TYPE_AES@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rsi,4), %rsi
	addq	%rdx, %rsi
	jmpq	*%rsi
LBB0_10:
	movq	8(%r12), %rcx
	movq	_WLAN_KEY_LEN_WEP40@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jge	LBB0_13
## %bb.11:
	movq	_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
LBB0_19:
	callq	_ath_err
	xorl	%ebx, %ebx
	jmp	LBB0_28
LBB0_7:
	leaq	64(%r13), %rax
	cmpq	%rcx, %rax
	jge	LBB0_9
## %bb.8:
	movq	_AR_KEYTABLE_TYPE_TKIP@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_20:
	movq	_AR_KEYTABLE_TYPE_CLR@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_4:
	movq	_ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_6
## %bb.5:
	movq	_AR_KEYTABLE_TYPE_CCM@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	jmp	LBB0_19
LBB0_9:
	movq	_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%r13, %rcx
LBB0_12:
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_28
LBB0_13:
	jle	LBB0_14
## %bb.15:
	movq	_WLAN_KEY_LEN_WEP104@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jle	LBB0_16
## %bb.17:
	movq	_AR_KEYTABLE_TYPE_128@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_6:
	movq	_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_28
LBB0_14:
	movq	_AR_KEYTABLE_TYPE_40@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_16:
	movq	_AR_KEYTABLE_TYPE_104@GOTPCREL(%rip), %rax
LBB0_21:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	(%rax), %ebx
	movq	32(%r12), %rdi
	callq	_get_unaligned_le32
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	32(%r12), %rdi
	addq	$4, %rdi
	callq	_get_unaligned_le16
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	32(%r12), %rdi
	addq	$6, %rdi
	callq	_get_unaligned_le32
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	32(%r12), %rdi
	addq	$10, %rdi
	callq	_get_unaligned_le16
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	32(%r12), %rdi
	addq	$12, %rdi
	callq	_get_unaligned_le32
	movq	8(%r12), %rcx
	movq	_WLAN_KEY_LEN_WEP104@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movzbl	%al, %ecx
	cmovgl	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	_AR_KEYTABLE_TYPE_TKIP@GOTPCREL(%rip), %rax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	(%rax), %ebx
	jne	LBB0_26
## %bb.22:
	leaq	64(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY0
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	notl	%edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY1
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	notl	%edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY2
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY3
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY4
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_TYPE
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath_hw_keysetmac
	movq	_ATH_CRYPT_CAP_MIC_COMBINED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	8(%r15), %ebx
	movq	16(%r12), %rdi
	callq	_get_unaligned_le32
	movl	%eax, %r15d
	movq	16(%r12), %rdi
	addq	$4, %rdi
	callq	_get_unaligned_le32
	testl	%ebx, %ebx
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%r15d, %ebx
	je	LBB0_23
## %bb.24:
	movq	24(%r12), %rdi
	addq	$2, %rdi
	callq	_get_unaligned_le16
	movzwl	%ax, %r15d
	movq	24(%r12), %rdi
	callq	_get_unaligned_le16
	movzwl	%ax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rdi
	addq	$4, %rdi
	callq	_get_unaligned_le32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_25
LBB0_26:
	movq	%r14, %rdi
	callq	_ENABLE_REGWRITE_BUFFER
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY2
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY3
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY4
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_TYPE
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_REGWRITE_BUFFER_FLUSH
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath_hw_keysetmac
	jmp	LBB0_27
LBB0_23:
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_25:
	movq	%r14, %rdi
	callq	_ENABLE_REGWRITE_BUFFER
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_KEY0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_KEY1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_KEY2
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_KEY3
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_KEY4
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_TYPE
	movq	_AR_KEYTABLE_TYPE_CLR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_REGWRITE_BUFFER_FLUSH
	movq	%r14, %rdi
	callq	_ENABLE_REGWRITE_BUFFER
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_MAC0
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movq	%r12, %rdi
	callq	_AR_KEYTABLE_MAC1
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	callq	_AR_KEYTABLE_KEY1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_REGWRITE_BUFFER_FLUSH
LBB0_27:
	movl	$1, %ebx
LBB0_28:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_7
	.long	L0_0_set_20
	.long	L0_0_set_21
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set-entry: keycache entry %u out of range\n"

	.comm	_AR_KEYTABLE_TYPE_AES,4,2       ## @AR_KEYTABLE_TYPE_AES
	.comm	_ATH_CRYPT_CAP_CIPHER_AESCCM,4,2 ## @ATH_CRYPT_CAP_CIPHER_AESCCM
	.comm	_ANY,4,2                        ## @ANY
L_.str.1:                               ## @.str.1
	.asciz	"AES-CCM not supported by this mac rev\n"

	.comm	_AR_KEYTABLE_TYPE_CCM,4,2       ## @AR_KEYTABLE_TYPE_CCM
	.comm	_AR_KEYTABLE_TYPE_TKIP,4,2      ## @AR_KEYTABLE_TYPE_TKIP
L_.str.2:                               ## @.str.2
	.asciz	"entry %u inappropriate for TKIP\n"

	.comm	_WLAN_KEY_LEN_WEP40,8,3         ## @WLAN_KEY_LEN_WEP40
L_.str.3:                               ## @.str.3
	.asciz	"WEP key length %u too small\n"

	.comm	_AR_KEYTABLE_TYPE_40,4,2        ## @AR_KEYTABLE_TYPE_40
	.comm	_WLAN_KEY_LEN_WEP104,8,3        ## @WLAN_KEY_LEN_WEP104
	.comm	_AR_KEYTABLE_TYPE_104,4,2       ## @AR_KEYTABLE_TYPE_104
	.comm	_AR_KEYTABLE_TYPE_128,4,2       ## @AR_KEYTABLE_TYPE_128
	.comm	_AR_KEYTABLE_TYPE_CLR,4,2       ## @AR_KEYTABLE_TYPE_CLR
L_.str.4:                               ## @.str.4
	.asciz	"cipher %u not supported\n"

	.comm	_ATH_CRYPT_CAP_MIC_COMBINED,4,2 ## @ATH_CRYPT_CAP_MIC_COMBINED
	.no_dead_strip	_ath_hw_set_keycache_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_hw_set_keycache_entry
_ath_hw_set_keycache_entry:             ; @ath_hw_set_keycache_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x1
	mov	x23, x0
	ldr	x9, [x0]
	cmp	x9, x1
	b.le	LBB0_5
; %bb.1:
	mov	x25, x2
	ldrsw	x2, [x2]
	sub	w10, w2, #128
	cmp	w10, #4
	b.hi	LBB0_12
; %bb.2:
	mov	x24, x3
	ldr	x20, [x23, #16]
Lloh0:
	adrp	x8, _AR_KEYTABLE_TYPE_AES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_AES@GOTPAGEOFF]
Lloh2:
	adrp	x11, lJTI0_0@PAGE
Lloh3:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_3
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_3:
	ldr	x8, [x25, #8]
Lloh4:
	adrp	x9, _WLAN_KEY_LEN_WEP40@GOTPAGE
Lloh5:
	ldr	x9, [x9, _WLAN_KEY_LEN_WEP40@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.4:
Lloh7:
	adrp	x9, _ANY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ANY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh10:
	adrp	x2, l_.str.3@PAGE
Lloh11:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x19
LBB0_6:
	bl	_ath_err
	mov	w0, #0
	b	LBB0_26
LBB0_7:
	add	x8, x19, #64
	cmp	x8, x9
	b.ge	LBB0_13
; %bb.8:
Lloh14:
	adrp	x8, _AR_KEYTABLE_TYPE_TKIP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_TKIP@GOTPAGEOFF]
	b	LBB0_19
LBB0_9:
Lloh16:
	adrp	x8, _AR_KEYTABLE_TYPE_CLR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_CLR@GOTPAGEOFF]
	b	LBB0_19
LBB0_10:
	ldr	w8, [x23, #8]
Lloh18:
	adrp	x9, _ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATH_CRYPT_CAP_CIPHER_AESCCM@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.11:
Lloh21:
	adrp	x8, _AR_KEYTABLE_TYPE_CCM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_CCM@GOTPAGEOFF]
	b	LBB0_19
LBB0_12:
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	b	LBB0_6
LBB0_13:
Lloh25:
	adrp	x8, _ANY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ANY@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	str	x19, [sp]
Lloh28:
	adrp	x2, l_.str.2@PAGE
Lloh29:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_14:
	b.le	LBB0_18
; %bb.15:
Lloh30:
	adrp	x9, _WLAN_KEY_LEN_WEP104@GOTPAGE
Lloh31:
	ldr	x9, [x9, _WLAN_KEY_LEN_WEP104@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
Lloh33:
	adrp	x10, _AR_KEYTABLE_TYPE_104@GOTPAGE
Lloh34:
	ldr	x10, [x10, _AR_KEYTABLE_TYPE_104@GOTPAGEOFF]
Lloh35:
	adrp	x11, _AR_KEYTABLE_TYPE_128@GOTPAGE
Lloh36:
	ldr	x11, [x11, _AR_KEYTABLE_TYPE_128@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, gt
	b	LBB0_19
LBB0_16:
Lloh37:
	adrp	x8, _ANY@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ANY@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x2, l_.str.1@PAGE
Lloh41:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_17:
	mov	x0, x23
	bl	_ath_dbg
	mov	w0, #0
	b	LBB0_26
LBB0_18:
Lloh42:
	adrp	x8, _AR_KEYTABLE_TYPE_40@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_40@GOTPAGEOFF]
LBB0_19:
	ldr	w27, [x8]
	ldr	x0, [x25, #32]
	bl	_get_unaligned_le32
	mov	x28, x0
	ldr	x8, [x25, #32]
	add	x0, x8, #4
	bl	_get_unaligned_le16
	mov	x26, x0
	ldr	x8, [x25, #32]
	add	x0, x8, #6
	bl	_get_unaligned_le32
	mov	x22, x0
	ldr	x8, [x25, #32]
	add	x0, x8, #10
	bl	_get_unaligned_le16
	mov	x21, x0
	ldr	x8, [x25, #32]
	add	x0, x8, #12
	bl	_get_unaligned_le32
	ldr	x8, [x25, #8]
Lloh44:
	adrp	x9, _WLAN_KEY_LEN_WEP104@GOTPAGE
Lloh45:
	ldr	x9, [x9, _WLAN_KEY_LEN_WEP104@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	and	w10, w0, #0xff
	cmp	x8, x9
	csel	w8, w0, w10, gt
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh47:
	adrp	x8, _AR_KEYTABLE_TYPE_TKIP@GOTPAGE
Lloh48:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_TKIP@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_22
; %bb.20:
	str	w27, [sp, #16]                  ; 4-byte Folded Spill
	add	x27, x19, #64
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY0
	mov	x1, x0
	str	w28, [sp, #20]                  ; 4-byte Folded Spill
	mvn	w2, w28
	mov	x0, x20
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY1
	mov	x1, x0
	str	w26, [sp, #24]                  ; 4-byte Folded Spill
	mvn	w2, w26
	mov	x0, x20
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY2
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY3
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY4
	mov	x1, x0
	mov	x0, x20
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_TYPE
	mov	x1, x0
	mov	x0, x20
	ldr	w2, [sp, #16]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	x0, x23
	mov	x1, x19
	mov	x2, x24
	bl	_ath_hw_keysetmac
	ldr	w8, [x23, #8]
Lloh50:
	adrp	x9, _ATH_CRYPT_CAP_MIC_COMBINED@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ATH_CRYPT_CAP_MIC_COMBINED@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	and	w22, w9, w8
	ldr	x0, [x25, #16]
	bl	_get_unaligned_le32
	mov	x24, x0
	ldr	x8, [x25, #16]
	add	x0, x8, #4
	bl	_get_unaligned_le32
	mov	x21, x0
	cbz	w22, LBB0_23
; %bb.21:
	ldr	x8, [x25, #24]
	add	x0, x8, #2
	bl	_get_unaligned_le16
	and	w26, w0, #0xffff
	ldr	x0, [x25, #24]
	bl	_get_unaligned_le16
	and	w23, w0, #0xffff
	ldr	x8, [x25, #24]
	add	x0, x8, #4
	bl	_get_unaligned_le32
	mov	x22, x0
	b	LBB0_24
LBB0_22:
	mov	x0, x20
	bl	_ENABLE_REGWRITE_BUFFER
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY0
	mov	x1, x0
	mov	x0, x20
	mov	x2, x28
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY1
	mov	x1, x0
	mov	x0, x20
	mov	x2, x26
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY2
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY3
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY4
	mov	x1, x0
	mov	x0, x20
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_TYPE
	mov	x1, x0
	mov	x0, x20
	mov	x2, x27
	bl	_REG_WRITE
	mov	x0, x20
	bl	_REGWRITE_BUFFER_FLUSH
	mov	x0, x23
	mov	x1, x19
	mov	x2, x24
	bl	_ath_hw_keysetmac
	b	LBB0_25
LBB0_23:
	mov	w26, #0
	mov	w23, #0
LBB0_24:
	mov	x0, x20
	bl	_ENABLE_REGWRITE_BUFFER
	mov	x0, x27
	bl	_AR_KEYTABLE_KEY0
	mov	x1, x0
	mov	x0, x20
	mov	x2, x24
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_KEY1
	mov	x1, x0
	mov	x0, x20
	mov	x2, x26
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_KEY2
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_KEY3
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_KEY4
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_TYPE
	mov	x1, x0
Lloh53:
	adrp	x8, _AR_KEYTABLE_TYPE_CLR@GOTPAGE
Lloh54:
	ldr	x8, [x8, _AR_KEYTABLE_TYPE_CLR@GOTPAGEOFF]
Lloh55:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_WRITE
	mov	x0, x20
	bl	_REGWRITE_BUFFER_FLUSH
	mov	x0, x20
	bl	_ENABLE_REGWRITE_BUFFER
	mov	x0, x27
	bl	_AR_KEYTABLE_MAC0
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x27
	bl	_AR_KEYTABLE_MAC1
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY0
	mov	x1, x0
	mov	x0, x20
	ldr	w2, [sp, #20]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_KEY1
	mov	x1, x0
	mov	x0, x20
	ldr	w2, [sp, #24]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	x0, x20
	bl	_REGWRITE_BUFFER_FLUSH
LBB0_25:
	mov	w0, #1
LBB0_26:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_19-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set-entry: keycache entry %u out of range\n"

	.comm	_AR_KEYTABLE_TYPE_AES,4,2       ; @AR_KEYTABLE_TYPE_AES
	.comm	_ATH_CRYPT_CAP_CIPHER_AESCCM,4,2 ; @ATH_CRYPT_CAP_CIPHER_AESCCM
	.comm	_ANY,4,2                        ; @ANY
l_.str.1:                               ; @.str.1
	.asciz	"AES-CCM not supported by this mac rev\n"

	.comm	_AR_KEYTABLE_TYPE_CCM,4,2       ; @AR_KEYTABLE_TYPE_CCM
	.comm	_AR_KEYTABLE_TYPE_TKIP,4,2      ; @AR_KEYTABLE_TYPE_TKIP
l_.str.2:                               ; @.str.2
	.asciz	"entry %u inappropriate for TKIP\n"

	.comm	_WLAN_KEY_LEN_WEP40,8,3         ; @WLAN_KEY_LEN_WEP40
l_.str.3:                               ; @.str.3
	.asciz	"WEP key length %u too small\n"

	.comm	_AR_KEYTABLE_TYPE_40,4,2        ; @AR_KEYTABLE_TYPE_40
	.comm	_WLAN_KEY_LEN_WEP104,8,3        ; @WLAN_KEY_LEN_WEP104
	.comm	_AR_KEYTABLE_TYPE_104,4,2       ; @AR_KEYTABLE_TYPE_104
	.comm	_AR_KEYTABLE_TYPE_128,4,2       ; @AR_KEYTABLE_TYPE_128
	.comm	_AR_KEYTABLE_TYPE_CLR,4,2       ; @AR_KEYTABLE_TYPE_CLR
l_.str.4:                               ; @.str.4
	.asciz	"cipher %u not supported\n"

	.comm	_ATH_CRYPT_CAP_MIC_COMBINED,4,2 ; @ATH_CRYPT_CAP_MIC_COMBINED
	.no_dead_strip	_ath_hw_set_keycache_entry
.subsections_via_symbols
