	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_htc_setup_rate
_ath9k_htc_setup_rate:                  ## @ath9k_htc_setup_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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	32(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r15
	cmpl	$0, (%r15)
	movl	$0, %r12d
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	movq	%r13, %r14
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r13
	movq	(%r14), %rax
	movq	8(%r15), %rcx
	movl	(%rax,%rcx,4), %r14d
	movl	%ebx, %edi
	callq	_BIT
	testl	%r14d, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r15), %rax
	movslq	(%rax,%rbx,4), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$33, %rax
	addl	%ecx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx), %rcx
	movslq	%r12d, %r12
	movl	%eax, (%rcx,%r12,4)
	incl	%r12d
	jmp	LBB0_4
LBB0_5:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	%r12d, 40(%r15)
	cmpq	$0, 24(%r14)
	movl	$0, %ebx
	je	LBB0_23
## %bb.6:
	movq	16(%r14), %rax
	xorl	%ecx, %ecx
	movq	_ATH_HTC_RATE_MAX@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %edi
	shrl	$3, %edi
	movl	(%rax,%rdi,4), %edi
	movl	%esi, %ebx
	andb	$7, %bl
	movzbl	%bl, %ebx
	btl	%ebx, %edi
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r15), %rdi
	movslq	%ecx, %rbx
	incl	%ecx
	movl	%esi, (%rdi,%rbx,4)
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	(%rdx), %ecx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%rsi), %edi
	cmpl	$76, %esi
	movl	%edi, %esi
	jne	LBB0_7
LBB0_11:
	movl	%ecx, 24(%r15)
	movq	_WLAN_RC_HT_FLAG@GOTPCREL(%rip), %rdx
	movl	8(%r14), %ecx
	movq	_IEEE80211_HT_CAP_RX_STBC@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	andl	%ecx, %ebx
	je	LBB0_13
## %bb.12:
	movq	_ATH_RC_TX_STBC_FLAG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
LBB0_13:
	orl	(%rdx), %ebx
	movl	4(%rax), %eax
	testl	%eax, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_15
## %bb.14:
	movq	_WLAN_RC_DS_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	orl	%eax, %ebx
	movq	_IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_18
## %bb.16:
	movq	(%r12), %rdi
	callq	_conf_is_ht40
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_WLAN_RC_40_FLAG@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_18:
	movq	(%r12), %rdi
	callq	_conf_is_ht40
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	_IEEE80211_HT_CAP_SGI_40@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	jne	LBB0_22
LBB0_20:
	movq	(%r12), %rdi
	callq	_conf_is_ht20
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	_IEEE80211_HT_CAP_SGI_20@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_23
LBB0_22:
	movq	_WLAN_RC_SGI_FLAG@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_23:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	$1, (%r15)
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movl	%eax, 4(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_HTC_RATE_MAX,4,2           ## @ATH_HTC_RATE_MAX
	.comm	_WLAN_RC_HT_FLAG,4,2            ## @WLAN_RC_HT_FLAG
	.comm	_IEEE80211_HT_CAP_RX_STBC,4,2   ## @IEEE80211_HT_CAP_RX_STBC
	.comm	_ATH_RC_TX_STBC_FLAG,4,2        ## @ATH_RC_TX_STBC_FLAG
	.comm	_WLAN_RC_DS_FLAG,4,2            ## @WLAN_RC_DS_FLAG
	.comm	_IEEE80211_HT_CAP_SUP_WIDTH_20_40,4,2 ## @IEEE80211_HT_CAP_SUP_WIDTH_20_40
	.comm	_WLAN_RC_40_FLAG,4,2            ## @WLAN_RC_40_FLAG
	.comm	_IEEE80211_HT_CAP_SGI_40,4,2    ## @IEEE80211_HT_CAP_SGI_40
	.comm	_WLAN_RC_SGI_FLAG,4,2           ## @WLAN_RC_SGI_FLAG
	.comm	_IEEE80211_HT_CAP_SGI_20,4,2    ## @IEEE80211_HT_CAP_SGI_20
	.no_dead_strip	_ath9k_htc_setup_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_htc_setup_rate
_ath9k_htc_setup_rate:                  ; @ath9k_htc_setup_rate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x1, #32]
	ldr	x8, [x0]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	ldr	x8, [x8]
	ldr	x25, [x9, x8, lsl #3]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	w24, #0
	mov	w26, #26215
	movk	w26, #26214, lsl #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x25]
	cmp	x22, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x25, #8]
	ldr	w27, [x8, x9, lsl #2]
	mov	x0, x22
	bl	_BIT
	tst	w0, w27
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25, #16]
	ldrsw	x8, [x8, x22, lsl #2]
	mul	x8, x8, x26
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #1
	ldr	x9, [x19, #32]
	str	w8, [x9, w24, sxtw #2]
	add	w24, w24, #1
	b	LBB0_2
LBB0_5:
	mov	w24, #0
LBB0_6:
	str	w24, [x19, #40]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_20
; %bb.7:
	mov	w9, #0
	mov	w10, #0
	ldr	x8, [x20, #16]
Lloh0:
	adrp	x11, _ATH_HTC_RATE_MAX@GOTPAGE
Lloh1:
	ldr	x11, [x11, _ATH_HTC_RATE_MAX@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w12, w10, #3
	ldr	w12, [x8, w12, uxtw #2]
	and	w13, w10, #0x7
	lsr	w12, w12, w13
	tbz	w12, #0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x12, [x19, #16]
	str	w10, [x12, w9, sxtw #2]
	add	w9, w9, #1
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w12, [x11]
	cmp	w9, w12
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w12, w10, #1
	cmp	w10, #76
	mov	x10, x12
	b.ne	LBB0_8
LBB0_12:
	str	w9, [x19, #24]
Lloh2:
	adrp	x9, _WLAN_RC_HT_FLAG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WLAN_RC_HT_FLAG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	w10, [x20, #8]
Lloh5:
	adrp	x11, _IEEE80211_HT_CAP_RX_STBC@GOTPAGE
Lloh6:
	ldr	x11, [x11, _IEEE80211_HT_CAP_RX_STBC@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
Lloh8:
	adrp	x12, _ATH_RC_TX_STBC_FLAG@GOTPAGE
Lloh9:
	ldr	x12, [x12, _ATH_RC_TX_STBC_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w12, [x12]
	tst	w11, w10
	csel	w11, wzr, w12, eq
	orr	w9, w11, w9
	ldr	w8, [x8, #4]
Lloh11:
	adrp	x11, _WLAN_RC_DS_FLAG@GOTPAGE
Lloh12:
	ldr	x11, [x11, _WLAN_RC_DS_FLAG@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	cmp	w8, #0
	csel	w8, wzr, w11, eq
	orr	w22, w9, w8
Lloh14:
	adrp	x8, _IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_15
; %bb.13:
	ldr	x0, [x21]
	bl	_conf_is_ht40
	cbz	x0, LBB0_15
; %bb.14:
Lloh17:
	adrp	x8, _WLAN_RC_40_FLAG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WLAN_RC_40_FLAG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_15:
	ldr	x0, [x21]
	bl	_conf_is_ht40
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w8, [x20, #8]
Lloh20:
	adrp	x9, _IEEE80211_HT_CAP_SGI_40@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IEEE80211_HT_CAP_SGI_40@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_19
LBB0_17:
	ldr	x0, [x21]
	bl	_conf_is_ht20
	cbz	x0, LBB0_21
; %bb.18:
	ldr	w8, [x20, #8]
Lloh23:
	adrp	x9, _IEEE80211_HT_CAP_SGI_20@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IEEE80211_HT_CAP_SGI_20@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_19:
Lloh26:
	adrp	x8, _WLAN_RC_SGI_FLAG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WLAN_RC_SGI_FLAG@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w22, w8, w22
	b	LBB0_21
LBB0_20:
	mov	w22, #0
LBB0_21:
	ldr	w8, [x23]
	str	w8, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x22
	bl	_cpu_to_be32
	str	w0, [x19, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_HTC_RATE_MAX,4,2           ; @ATH_HTC_RATE_MAX
	.comm	_WLAN_RC_HT_FLAG,4,2            ; @WLAN_RC_HT_FLAG
	.comm	_IEEE80211_HT_CAP_RX_STBC,4,2   ; @IEEE80211_HT_CAP_RX_STBC
	.comm	_ATH_RC_TX_STBC_FLAG,4,2        ; @ATH_RC_TX_STBC_FLAG
	.comm	_WLAN_RC_DS_FLAG,4,2            ; @WLAN_RC_DS_FLAG
	.comm	_IEEE80211_HT_CAP_SUP_WIDTH_20_40,4,2 ; @IEEE80211_HT_CAP_SUP_WIDTH_20_40
	.comm	_WLAN_RC_40_FLAG,4,2            ; @WLAN_RC_40_FLAG
	.comm	_IEEE80211_HT_CAP_SGI_40,4,2    ; @IEEE80211_HT_CAP_SGI_40
	.comm	_WLAN_RC_SGI_FLAG,4,2           ; @WLAN_RC_SGI_FLAG
	.comm	_IEEE80211_HT_CAP_SGI_20,4,2    ; @IEEE80211_HT_CAP_SGI_20
	.no_dead_strip	_ath9k_htc_setup_rate
.subsections_via_symbols
