	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_hw_keysetmac
_ath_hw_keysetmac:                      ## @ath_hw_keysetmac
	.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	%rsi, %r15
	cmpq	%rsi, (%rdi)
	jle	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	_AR_KEYTABLE_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%rdi), %r14
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	testb	$1, (%rbx)
	cmovnel	%eax, %ecx
	movq	%rbx, %rdi
	movl	%ecx, %r12d
	callq	_get_unaligned_le32
	movl	%eax, %r13d
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_get_unaligned_le16
	movl	%r12d, %ecx
	movl	%eax, %ebx
	sarl	%r13d
	movl	%eax, %r12d
	shll	$31, %r12d
	orl	%r13d, %r12d
	sarl	%ebx
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_ath_err
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
LBB0_5:
	orl	%ecx, %ebx
	movq	%r14, %rdi
	callq	_ENABLE_REGWRITE_BUFFER
	movq	%r15, %rdi
	callq	_AR_KEYTABLE_MAC0
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_REG_WRITE
	movq	%r15, %rdi
	callq	_AR_KEYTABLE_MAC1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_REGWRITE_BUFFER_FLUSH
	movl	$1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_KEYTABLE_VALID,4,2          ## @AR_KEYTABLE_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"keysetmac: keycache entry %u out of range\n"

	.no_dead_strip	_ath_hw_keysetmac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_hw_keysetmac
_ath_hw_keysetmac:                      ; @ath_hw_keysetmac
	.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	x19, x1
	ldr	x8, [x0]
	cmp	x8, x1
	b.le	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AR_KEYTABLE_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_KEYTABLE_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x20, [x0, #8]
	cbz	x2, LBB0_4
; %bb.2:
	mov	x21, x2
	ldr	w8, [x21], #16
	tst	w8, #0x1
	csel	w23, w23, wzr, eq
	mov	x0, x2
	bl	_get_unaligned_le32
	mov	x22, x0
	mov	x0, x21
	bl	_get_unaligned_le16
	lsl	w8, w0, #31
	orr	w21, w8, w22, asr #1
	asr	w22, w0, #1
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_ath_err
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	mov	w22, #0
	mov	w21, #0
LBB0_5:
	mov	x0, x20
	bl	_ENABLE_REGWRITE_BUFFER
	mov	x0, x19
	bl	_AR_KEYTABLE_MAC0
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_KEYTABLE_MAC1
	mov	x1, x0
	orr	w2, w23, w22
	mov	x0, x20
	bl	_REG_WRITE
	mov	x0, x20
	bl	_REGWRITE_BUFFER_FLUSH
	mov	w0, #1
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_KEYTABLE_VALID,4,2          ; @AR_KEYTABLE_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"keysetmac: keycache entry %u out of range\n"

	.no_dead_strip	_ath_hw_keysetmac
.subsections_via_symbols
