	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_cmn_setup_ht_cap         ## -- Begin function ath9k_cmn_setup_ht_cap
	.p2align	4, 0x90
_ath9k_cmn_setup_ht_cap:                ## @ath9k_cmn_setup_ht_cap
	.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, %r14
	movq	%rdi, %r13
	callq	_ath9k_hw_common
	movl	$1, (%r14)
	movq	_IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPCREL(%rip), %rdx
	movq	_IEEE80211_HT_CAP_SM_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	%rax, %rbx
	movq	_IEEE80211_HT_CAP_SGI_40@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IEEE80211_HT_CAP_DSSSCCK40@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%r14)
	movl	8(%r13), %eax
	movq	_ATH9K_HW_CAP_LDPC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_IEEE80211_HT_CAP_LDPC_CODING@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%r14)
LBB0_2:
	movq	_ATH9K_HW_CAP_SGI_20@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_4
## %bb.3:
	movq	_IEEE80211_HT_CAP_SGI_20@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%r14)
LBB0_4:
	movq	_IEEE80211_HT_MAX_AMPDU_64K@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	_IEEE80211_HT_MPDU_DENSITY_8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r13, %rdi
	callq	_AR_SREV_9271
	movl	$1, %r12d
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_AR_SREV_9330
	testq	%rax, %rax
	jne	LBB0_5
## %bb.8:
	movq	%r13, %rdi
	callq	_AR_SREV_9485
	testq	%rax, %rax
	jne	LBB0_5
## %bb.10:
	movq	%r13, %rdi
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:
	xorl	%r15d, %r15d
LBB0_14:
	movq	%r13, %rdi
	callq	_AR_SREV_9280_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_19
## %bb.15:
	testb	%r15b, %r15b
	je	LBB0_17
## %bb.16:
	movq	_IEEE80211_HT_CAP_TX_STBC@GOTPCREL(%rip), %rcx
	movl	4(%r14), %eax
	orl	(%rcx), %eax
	jmp	LBB0_18
LBB0_17:
	movl	4(%r14), %eax
LBB0_18:
	movq	_IEEE80211_HT_CAP_RX_STBC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, 4(%r14)
LBB0_19:
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	4(%r13), %edi
	movl	%r12d, %esi
	callq	_ath9k_cmn_count_streams
	movl	%r12d, %esi
	movl	%eax, %r12d
	movl	(%r13), %edi
	callq	_ath9k_cmn_count_streams
	movl	%eax, %ebx
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_ath_dbg
	cmpl	%ebx, %r12d
	je	LBB0_21
## %bb.20:
	movq	_IEEE80211_HT_MCS_TX_RX_DIFF@GOTPCREL(%rip), %rax
	movq	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	(%r15), %edx
	decl	%r12d
	shll	%cl, %r12d
	orl	(%rax), %edx
	orl	%edx, %r12d
	movl	%r12d, (%r15)
LBB0_21:
	testl	%ebx, %ebx
	jle	LBB0_23
## %bb.22:
	movq	16(%r14), %rdi
	movl	%ebx, %edx
	shlq	$2, %rdx
	leaq	L_.memset_pattern(%rip), %rsi
	callq	_memset_pattern16
LBB0_23:
	movq	_IEEE80211_HT_MCS_TX_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r13, %rdi
	callq	_AR_SREV_9462
	movl	$2, %r12d
	movb	$1, %r15b
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	cmpq	$1, %rax
	movl	$3, %r12d
	sbbl	$0, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_HT_CAP_SUP_WIDTH_20_40,4,2 ## @IEEE80211_HT_CAP_SUP_WIDTH_20_40
	.comm	_IEEE80211_HT_CAP_SM_PS,4,2     ## @IEEE80211_HT_CAP_SM_PS
	.comm	_IEEE80211_HT_CAP_SGI_40,4,2    ## @IEEE80211_HT_CAP_SGI_40
	.comm	_IEEE80211_HT_CAP_DSSSCCK40,4,2 ## @IEEE80211_HT_CAP_DSSSCCK40
	.comm	_ATH9K_HW_CAP_LDPC,4,2          ## @ATH9K_HW_CAP_LDPC
	.comm	_IEEE80211_HT_CAP_LDPC_CODING,4,2 ## @IEEE80211_HT_CAP_LDPC_CODING
	.comm	_ATH9K_HW_CAP_SGI_20,4,2        ## @ATH9K_HW_CAP_SGI_20
	.comm	_IEEE80211_HT_CAP_SGI_20,4,2    ## @IEEE80211_HT_CAP_SGI_20
	.comm	_IEEE80211_HT_MAX_AMPDU_64K,4,2 ## @IEEE80211_HT_MAX_AMPDU_64K
	.comm	_IEEE80211_HT_MPDU_DENSITY_8,4,2 ## @IEEE80211_HT_MPDU_DENSITY_8
	.comm	_IEEE80211_HT_CAP_TX_STBC,4,2   ## @IEEE80211_HT_CAP_TX_STBC
	.comm	_IEEE80211_HT_CAP_RX_STBC_SHIFT,4,2 ## @IEEE80211_HT_CAP_RX_STBC_SHIFT
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX streams %d, RX streams: %d\n"

	.comm	_IEEE80211_HT_MCS_TX_RX_DIFF,4,2 ## @IEEE80211_HT_MCS_TX_RX_DIFF
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT,4,2 ## @IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT
	.comm	_IEEE80211_HT_MCS_TX_DEFINED,4,2 ## @IEEE80211_HT_MCS_TX_DEFINED
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_cmn_setup_ht_cap         ; -- Begin function ath9k_cmn_setup_ht_cap
	.p2align	2
_ath9k_cmn_setup_ht_cap:                ; @ath9k_cmn_setup_ht_cap
	.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
	mov	x21, x0
	bl	_ath9k_hw_common
	mov	x20, x0
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x8, _IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_HT_CAP_SUP_WIDTH_20_40@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IEEE80211_HT_CAP_SM_PS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_HT_CAP_SM_PS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _IEEE80211_HT_CAP_SGI_40@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_HT_CAP_SGI_40@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _IEEE80211_HT_CAP_DSSSCCK40@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_HT_CAP_DSSSCCK40@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w9, [x21, #8]
Lloh12:
	adrp	x10, _ATH9K_HW_CAP_LDPC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ATH9K_HW_CAP_LDPC@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh15:
	adrp	x10, _IEEE80211_HT_CAP_LDPC_CODING@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IEEE80211_HT_CAP_LDPC_CODING@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x19, #4]
LBB0_2:
Lloh18:
	adrp	x10, _ATH9K_HW_CAP_SGI_20@GOTPAGE
Lloh19:
	ldr	x10, [x10, _ATH9K_HW_CAP_SGI_20@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
Lloh21:
	adrp	x9, _IEEE80211_HT_CAP_SGI_20@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IEEE80211_HT_CAP_SGI_20@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #4]
LBB0_4:
Lloh24:
	adrp	x8, _IEEE80211_HT_MAX_AMPDU_64K@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IEEE80211_HT_MAX_AMPDU_64K@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _IEEE80211_HT_MPDU_DENSITY_8@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IEEE80211_HT_MPDU_DENSITY_8@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	mov	x0, x21
	bl	_AR_SREV_9271
	cbnz	x0, LBB0_8
; %bb.5:
	mov	x0, x21
	bl	_AR_SREV_9330
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_AR_SREV_9485
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_AR_SREV_9565
	cbz	x0, LBB0_19
LBB0_8:
	mov	w23, #0
	mov	w22, #1
LBB0_9:
	mov	x0, x21
	bl	_AR_SREV_9280_20_OR_LATER
	cbz	x0, LBB0_14
; %bb.10:
	tbz	w23, #0, LBB0_12
; %bb.11:
Lloh30:
	adrp	x8, _IEEE80211_HT_CAP_TX_STBC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IEEE80211_HT_CAP_TX_STBC@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	b	LBB0_13
LBB0_12:
	ldr	w8, [x19, #4]
LBB0_13:
Lloh33:
	adrp	x9, _IEEE80211_HT_CAP_RX_STBC_SHIFT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _IEEE80211_HT_CAP_RX_STBC_SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w8, w9
	str	w8, [x19, #4]
LBB0_14:
	add	x23, x19, #8
	mov	x0, x23
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [x21, #4]
	mov	x1, x22
	bl	_ath9k_cmn_count_streams
	mov	x24, x0
	ldr	w0, [x21]
	mov	x1, x22
	bl	_ath9k_cmn_count_streams
	mov	x21, x0
Lloh36:
	adrp	x8, _CONFIG@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x2, l_.str@PAGE
Lloh40:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x24
	mov	x4, x21
	bl	_ath_dbg
	cmp	w24, w21
	b.eq	LBB0_16
; %bb.15:
Lloh41:
	adrp	x8, _IEEE80211_HT_MCS_TX_RX_DIFF@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IEEE80211_HT_MCS_TX_RX_DIFF@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	sub	w9, w24, #1
Lloh44:
	adrp	x10, _IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPAGE
Lloh45:
	ldr	x10, [x10, _IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x23]
LBB0_16:
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.17:
	ldr	x0, [x19, #16]
	mov	w8, w21
	lsl	x2, x8, #2
Lloh47:
	adrp	x1, l_.memset_pattern@PAGE
Lloh48:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	bl	_memset_pattern16
LBB0_18:
Lloh49:
	adrp	x8, _IEEE80211_HT_MCS_TX_DEFINED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _IEEE80211_HT_MCS_TX_DEFINED@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x23]
	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
LBB0_19:
	mov	x0, x21
	bl	_AR_SREV_9462
	mov	w22, #2
	cbnz	x0, LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_AR_SREV_9300_20_OR_LATER
	cmp	x0, #0
	cinc	w22, w22, ne
LBB0_21:
	mov	w23, #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_HT_CAP_SUP_WIDTH_20_40,4,2 ; @IEEE80211_HT_CAP_SUP_WIDTH_20_40
	.comm	_IEEE80211_HT_CAP_SM_PS,4,2     ; @IEEE80211_HT_CAP_SM_PS
	.comm	_IEEE80211_HT_CAP_SGI_40,4,2    ; @IEEE80211_HT_CAP_SGI_40
	.comm	_IEEE80211_HT_CAP_DSSSCCK40,4,2 ; @IEEE80211_HT_CAP_DSSSCCK40
	.comm	_ATH9K_HW_CAP_LDPC,4,2          ; @ATH9K_HW_CAP_LDPC
	.comm	_IEEE80211_HT_CAP_LDPC_CODING,4,2 ; @IEEE80211_HT_CAP_LDPC_CODING
	.comm	_ATH9K_HW_CAP_SGI_20,4,2        ; @ATH9K_HW_CAP_SGI_20
	.comm	_IEEE80211_HT_CAP_SGI_20,4,2    ; @IEEE80211_HT_CAP_SGI_20
	.comm	_IEEE80211_HT_MAX_AMPDU_64K,4,2 ; @IEEE80211_HT_MAX_AMPDU_64K
	.comm	_IEEE80211_HT_MPDU_DENSITY_8,4,2 ; @IEEE80211_HT_MPDU_DENSITY_8
	.comm	_IEEE80211_HT_CAP_TX_STBC,4,2   ; @IEEE80211_HT_CAP_TX_STBC
	.comm	_IEEE80211_HT_CAP_RX_STBC_SHIFT,4,2 ; @IEEE80211_HT_CAP_RX_STBC_SHIFT
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX streams %d, RX streams: %d\n"

	.comm	_IEEE80211_HT_MCS_TX_RX_DIFF,4,2 ; @IEEE80211_HT_MCS_TX_RX_DIFF
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT,4,2 ; @IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT
	.comm	_IEEE80211_HT_MCS_TX_DEFINED,4,2 ; @IEEE80211_HT_MCS_TX_DEFINED
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

.subsections_via_symbols
