	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_mac_bitrate_mask_get_single_rate
_ath10k_mac_bitrate_mask_get_single_rate: ## @ath10k_mac_bitrate_mask_get_single_rate
	.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, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r15
	testl	%r9d, %r9d
	je	LBB0_7
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
LBB0_2:
	movq	(%r15), %rax
	leaq	(,%r13,2), %r14
	addq	%r13, %r14
	movq	(%rax,%r14,8), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_hweight16
	cmpl	$1, %eax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_ARRAY_SIZE
	cltq
	addl	$16, %r12d
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_7:
	movq	%rdi, %r12
	movq	(%r15), %rax
	movl	%esi, %r13d
	leaq	(,%r13,2), %r14
	addq	%r13, %r14
	movl	16(%rax,%r14,8), %edi
	callq	_hweight32
	movq	(%r15), %rcx
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.8:
	movq	%rbx, %r15
	movl	16(%rcx,%r14,8), %eax
	bsfl	%eax, %ecx
	movl	$-1, %eax
	cmovnel	%ecx, %eax
	movq	_WHAL_WLAN_11A_CAPABILITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r12), %ecx
	je	LBB0_10
## %bb.9:
	movq	_ATH10K_MAC_FIRST_OFDM_RATE_IDX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_10:
	addl	%eax, %ecx
	movq	_ath10k_wmi_legacy_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,8), %ebx
	movl	4(%rax,%rcx,8), %edi
	callq	_ath10k_mac_bitrate_is_cck
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:
	movq	_WMI_RATE_PREAMBLE_OFDM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_12:
	leal	1(%rbx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_WMI_RATE_PREAMBLE_VHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$6, %eax
	orl	%r12d, %eax
	movq	(%r15), %rcx
	movq	(%rcx,%r14,8), %rcx
	jmp	LBB0_20
LBB0_13:
	movq	8(%rcx,%r14,8), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.14:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	8(%rax,%r14,8), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_hweight8
	cmpl	$1, %eax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	movq	(%r15), %rax
	movq	8(%rax,%r14,8), %rdi
	callq	_ARRAY_SIZE
	cltq
	addl	$16, %r12d
	cmpq	%rax, %rbx
	jl	LBB0_15
	jmp	LBB0_2
LBB0_17:
	movq	_WMI_RATE_PREAMBLE_CCK@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, (%rcx)
	shll	$6, %eax
	orl	%ebx, %eax
	movl	%eax, (%r15)
	jmp	LBB0_21
LBB0_19:
	leal	1(%rbx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_WMI_RATE_PREAMBLE_HT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$6, %eax
	orl	%r12d, %eax
	movq	(%r15), %rcx
	movq	8(%rcx,%r14,8), %rcx
LBB0_20:
	movl	(%rcx,%rbx,4), %ecx
	bsfl	%ecx, %ecx
	movl	$-1, %edx
	cmovnel	%ecx, %edx
	orl	%eax, %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%edx, (%rax)
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WHAL_WLAN_11A_CAPABILITY,4,2   ## @WHAL_WLAN_11A_CAPABILITY
	.comm	_ATH10K_MAC_FIRST_OFDM_RATE_IDX,8,3 ## @ATH10K_MAC_FIRST_OFDM_RATE_IDX
	.comm	_ath10k_wmi_legacy_rates,8,3    ## @ath10k_wmi_legacy_rates
	.comm	_WMI_RATE_PREAMBLE_CCK,4,2      ## @WMI_RATE_PREAMBLE_CCK
	.comm	_WMI_RATE_PREAMBLE_OFDM,4,2     ## @WMI_RATE_PREAMBLE_OFDM
	.comm	_WMI_RATE_PREAMBLE_HT,4,2       ## @WMI_RATE_PREAMBLE_HT
	.comm	_WMI_RATE_PREAMBLE_VHT,4,2      ## @WMI_RATE_PREAMBLE_VHT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ath10k_mac_bitrate_mask_get_single_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_mac_bitrate_mask_get_single_rate
_ath10k_mac_bitrate_mask_get_single_rate: ; @ath10k_mac_bitrate_mask_get_single_rate
	.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	x19, x3
	mov	x21, x2
	cbz	w5, LBB0_7
; %bb.1:
	mov	w23, w1
LBB0_2:
	ldr	x8, [x21]
	mov	w9, #24
	mul	x9, x23, x9
	ldr	x0, [x8, x9]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w24, #0
	mov	x22, #0
	mov	w25, #24
	mul	x26, x23, x25
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8, x26]
	ldr	w0, [x8, x22, lsl #2]
	bl	_hweight16
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x8, [x21]
	mul	x9, x23, x25
	ldr	x0, [x8, x9]
	bl	_ARRAY_SIZE
	add	w24, w24, #16
	cmp	x22, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_7:
	mov	x22, x0
	ldr	x8, [x21]
	mov	w23, w1
	mov	w9, #24
	umaddl	x8, w1, w9, x8
	ldr	w0, [x8, #16]
	bl	_hweight32
	ldr	x8, [x21]
	mov	w9, #24
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.8:
	madd	x8, x23, x9, x8
	ldr	w8, [x8, #16]
	rbit	w9, w8
	clz	w9, w9
	cmp	w8, #0
	csinv	w8, w9, wzr, ne
	ldr	w9, [x22]
Lloh3:
	adrp	x10, _WHAL_WLAN_11A_CAPABILITY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WHAL_WLAN_11A_CAPABILITY@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _ATH10K_MAC_FIRST_OFDM_RATE_IDX@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ATH10K_MAC_FIRST_OFDM_RATE_IDX@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	add	w8, w9, w8
Lloh9:
	adrp	x9, _ath10k_wmi_legacy_rates@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ath10k_wmi_legacy_rates@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x8, x9, w8, sxtw #3
	ldp	w21, w0, [x8]
	bl	_ath10k_mac_bitrate_is_cck
	mov	x8, x0
	mov	w0, #0
Lloh12:
	adrp	x9, _WMI_RATE_PREAMBLE_OFDM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WMI_RATE_PREAMBLE_OFDM@GOTPAGEOFF]
Lloh14:
	adrp	x10, _WMI_RATE_PREAMBLE_CCK@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WMI_RATE_PREAMBLE_CCK@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	mov	w9, #1
	str	w9, [x20]
	orr	w8, w21, w8, lsl #6
	b	LBB0_16
LBB0_9:
	mov	w0, #0
	add	w8, w22, #1
	str	w8, [x20]
Lloh16:
	adrp	x8, _WMI_RATE_PREAMBLE_VHT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WMI_RATE_PREAMBLE_VHT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w8, w24, w8, lsl #6
	ldr	x9, [x21]
	mov	w10, #24
	mul	x10, x23, x10
	ldr	x9, [x9, x10]
	b	LBB0_15
LBB0_10:
	madd	x8, x23, x9, x8
	ldr	x0, [x8, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.11:
	mov	w24, #0
	mov	x22, #0
	mov	w25, #24
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	madd	x8, x23, x25, x8
	ldr	x8, [x8, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_hweight8
	cmp	w0, #1
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x22, x22, #1
	ldr	x8, [x21]
	madd	x8, x23, x25, x8
	ldr	x0, [x8, #8]
	bl	_ARRAY_SIZE
	add	w24, w24, #16
	cmp	x22, w0, sxtw
	b.lt	LBB0_12
	b	LBB0_2
LBB0_14:
	mov	w0, #0
	add	w8, w22, #1
	str	w8, [x20]
Lloh19:
	adrp	x8, _WMI_RATE_PREAMBLE_HT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WMI_RATE_PREAMBLE_HT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w8, w24, w8, lsl #6
	ldr	x9, [x21]
	mov	w10, #24
	madd	x9, x23, x10, x9
	ldr	x9, [x9, #8]
LBB0_15:
	ldr	w9, [x9, x22, lsl #2]
	rbit	w10, w9
	clz	w10, w10
	cmp	w9, #0
	csinv	w9, w10, wzr, ne
	orr	w8, w8, w9
LBB0_16:
	str	w8, [x19]
LBB0_17:
	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	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_WHAL_WLAN_11A_CAPABILITY,4,2   ; @WHAL_WLAN_11A_CAPABILITY
	.comm	_ATH10K_MAC_FIRST_OFDM_RATE_IDX,8,3 ; @ATH10K_MAC_FIRST_OFDM_RATE_IDX
	.comm	_ath10k_wmi_legacy_rates,8,3    ; @ath10k_wmi_legacy_rates
	.comm	_WMI_RATE_PREAMBLE_CCK,4,2      ; @WMI_RATE_PREAMBLE_CCK
	.comm	_WMI_RATE_PREAMBLE_OFDM,4,2     ; @WMI_RATE_PREAMBLE_OFDM
	.comm	_WMI_RATE_PREAMBLE_HT,4,2       ; @WMI_RATE_PREAMBLE_HT
	.comm	_WMI_RATE_PREAMBLE_VHT,4,2      ; @WMI_RATE_PREAMBLE_VHT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ath10k_mac_bitrate_mask_get_single_rate
.subsections_via_symbols
