	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_find_sta_by_key_usage
_wil_find_sta_by_key_usage:             ## @wil_find_sta_by_key_usage
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	movq	_WMI_KEY_USE_TX_GROUP@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_9
## %bb.1:
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rdi, %r14
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_wil_find_cid
	jmp	LBB0_6
LBB0_3:
	movq	_WMI_KEY_USE_RX_GROUP@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_wil_find_cid_by_idx
LBB0_6:
	movl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_10
LBB0_8:
	movl	%ebx, %ebx
	shlq	$2, %rbx
	addq	(%r14), %rbx
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jns	LBB0_8
LBB0_10:
	movq	_key_usage_str@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_wil_err
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WMI_KEY_USE_TX_GROUP,4,2       ## @WMI_KEY_USE_TX_GROUP
	.comm	_WMI_KEY_USE_RX_GROUP,4,2       ## @WMI_KEY_USE_RX_GROUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No CID for %pM %s\n"

	.comm	_key_usage_str,8,3              ## @key_usage_str
	.no_dead_strip	_wil_find_sta_by_key_usage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_find_sta_by_key_usage
_wil_find_sta_by_key_usage:             ; @wil_find_sta_by_key_usage
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _WMI_KEY_USE_TX_GROUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WMI_KEY_USE_TX_GROUP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_8
LBB0_2:
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
	cbz	x3, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x2, x19
	bl	_wil_find_cid
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _WMI_KEY_USE_RX_GROUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WMI_KEY_USE_RX_GROUP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x20
	mov	w2, #0
	bl	_wil_find_cid_by_idx
LBB0_6:
	mov	x22, x0
	tbnz	w22, #31, LBB0_10
LBB0_7:
	ldr	x8, [x20]
	add	x0, x8, w22, uxtw #2
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	tbz	w22, #31, LBB0_7
LBB0_10:
Lloh9:
	adrp	x8, _key_usage_str@GOTPAGE
Lloh10:
	ldr	x8, [x8, _key_usage_str@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w3, [x8, w21, uxtw #2]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_wil_err
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WMI_KEY_USE_TX_GROUP,4,2       ; @WMI_KEY_USE_TX_GROUP
	.comm	_WMI_KEY_USE_RX_GROUP,4,2       ; @WMI_KEY_USE_RX_GROUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No CID for %pM %s\n"

	.comm	_key_usage_str,8,3              ; @key_usage_str
	.no_dead_strip	_wil_find_sta_by_key_usage
.subsections_via_symbols
