	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar5008_hw_set_channel_regs
_ar5008_hw_set_channel_regs:            ## @ar5008_hw_set_channel_regs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_AR_SREV_9285_12_OR_LATER
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_AR_PHY_TURBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	_AR_PHY_FC_ENABLE_DAC_FIFO@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	jmp	LBB0_3
LBB0_1:
	xorl	%ebx, %ebx
LBB0_3:
	movq	_AR_PHY_FC_HT_EN@GOTPCREL(%rip), %rax
	movq	_AR_PHY_FC_SHORT_GI_40@GOTPCREL(%rip), %rcx
	movq	_AR_PHY_FC_SINGLE_HT_LTF1@GOTPCREL(%rip), %rdx
	movq	_AR_PHY_FC_WALSH@GOTPCREL(%rip), %rsi
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	orl	(%rsi), %ebx
	movq	%r14, %rdi
	callq	_IS_CHAN_HT40
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_AR_PHY_FC_DYN2040_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_IS_CHAN_HT40PLUS
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_AR_PHY_FC_DYN2040_PRI_CH@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_ENABLE_REGWRITE_BUFFER
	movq	_AR_PHY_TURBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_REG_WRITE
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ath9k_hw_set11nmac2040
	movq	_AR_GTXTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_GTXTO_TIMEOUT_LIMIT_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$25, %edx
	shll	%cl, %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
	movq	_AR_CST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_CST_TIMEOUT_LIMIT_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$15, %edx
	shll	%cl, %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REGWRITE_BUFFER_FLUSH          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_TURBO,4,2               ## @AR_PHY_TURBO
	.comm	_AR_PHY_FC_ENABLE_DAC_FIFO,4,2  ## @AR_PHY_FC_ENABLE_DAC_FIFO
	.comm	_AR_PHY_FC_HT_EN,4,2            ## @AR_PHY_FC_HT_EN
	.comm	_AR_PHY_FC_SHORT_GI_40,4,2      ## @AR_PHY_FC_SHORT_GI_40
	.comm	_AR_PHY_FC_SINGLE_HT_LTF1,4,2   ## @AR_PHY_FC_SINGLE_HT_LTF1
	.comm	_AR_PHY_FC_WALSH,4,2            ## @AR_PHY_FC_WALSH
	.comm	_AR_PHY_FC_DYN2040_EN,4,2       ## @AR_PHY_FC_DYN2040_EN
	.comm	_AR_PHY_FC_DYN2040_PRI_CH,4,2   ## @AR_PHY_FC_DYN2040_PRI_CH
	.comm	_AR_GTXTO,4,2                   ## @AR_GTXTO
	.comm	_AR_GTXTO_TIMEOUT_LIMIT_S,4,2   ## @AR_GTXTO_TIMEOUT_LIMIT_S
	.comm	_AR_CST,4,2                     ## @AR_CST
	.comm	_AR_CST_TIMEOUT_LIMIT_S,4,2     ## @AR_CST_TIMEOUT_LIMIT_S
	.no_dead_strip	_ar5008_hw_set_channel_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar5008_hw_set_channel_regs
_ar5008_hw_set_channel_regs:            ; @ar5008_hw_set_channel_regs
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_AR_SREV_9285_12_OR_LATER
Lloh0:
	adrp	x22, _AR_PHY_TURBO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AR_PHY_TURBO@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_REG_READ
Lloh2:
	adrp	x8, _AR_PHY_FC_ENABLE_DAC_FIFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_PHY_FC_ENABLE_DAC_FIFO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
Lloh5:
	adrp	x9, _AR_PHY_FC_HT_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR_PHY_FC_HT_EN@GOTPAGEOFF]
Lloh7:
	adrp	x10, _AR_PHY_FC_SHORT_GI_40@GOTPAGE
Lloh8:
	ldr	x10, [x10, _AR_PHY_FC_SHORT_GI_40@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _AR_PHY_FC_SINGLE_HT_LTF1@GOTPAGE
Lloh12:
	ldr	x11, [x11, _AR_PHY_FC_SINGLE_HT_LTF1@GOTPAGEOFF]
Lloh13:
	adrp	x12, _AR_PHY_FC_WALSH@GOTPAGE
Lloh14:
	ldr	x12, [x12, _AR_PHY_FC_WALSH@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
Lloh16:
	ldr	w12, [x12]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w21, w8, w12
	mov	x0, x20
	bl	_IS_CHAN_HT40
	cbz	x0, LBB0_6
; %bb.4:
Lloh17:
	adrp	x8, _AR_PHY_FC_DYN2040_EN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AR_PHY_FC_DYN2040_EN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w21, w8, w21
	mov	x0, x20
	bl	_IS_CHAN_HT40PLUS
	cbz	x0, LBB0_6
; %bb.5:
Lloh20:
	adrp	x8, _AR_PHY_FC_DYN2040_PRI_CH@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AR_PHY_FC_DYN2040_PRI_CH@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_6:
	mov	x0, x19
	bl	_ENABLE_REGWRITE_BUFFER
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WRITE
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_set11nmac2040
Lloh23:
	adrp	x8, _AR_GTXTO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AR_GTXTO@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _AR_GTXTO_TIMEOUT_LIMIT_S@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AR_GTXTO_TIMEOUT_LIMIT_S@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	mov	w9, #25
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_REG_WRITE
Lloh29:
	adrp	x8, _AR_CST@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AR_CST@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _AR_CST_TIMEOUT_LIMIT_S@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AR_CST_TIMEOUT_LIMIT_S@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	mov	w9, #15
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_REG_WRITE
	mov	x0, x19
	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	_REGWRITE_BUFFER_FLUSH
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_TURBO,4,2               ; @AR_PHY_TURBO
	.comm	_AR_PHY_FC_ENABLE_DAC_FIFO,4,2  ; @AR_PHY_FC_ENABLE_DAC_FIFO
	.comm	_AR_PHY_FC_HT_EN,4,2            ; @AR_PHY_FC_HT_EN
	.comm	_AR_PHY_FC_SHORT_GI_40,4,2      ; @AR_PHY_FC_SHORT_GI_40
	.comm	_AR_PHY_FC_SINGLE_HT_LTF1,4,2   ; @AR_PHY_FC_SINGLE_HT_LTF1
	.comm	_AR_PHY_FC_WALSH,4,2            ; @AR_PHY_FC_WALSH
	.comm	_AR_PHY_FC_DYN2040_EN,4,2       ; @AR_PHY_FC_DYN2040_EN
	.comm	_AR_PHY_FC_DYN2040_PRI_CH,4,2   ; @AR_PHY_FC_DYN2040_PRI_CH
	.comm	_AR_GTXTO,4,2                   ; @AR_GTXTO
	.comm	_AR_GTXTO_TIMEOUT_LIMIT_S,4,2   ; @AR_GTXTO_TIMEOUT_LIMIT_S
	.comm	_AR_CST,4,2                     ; @AR_CST
	.comm	_AR_CST_TIMEOUT_LIMIT_S,4,2     ; @AR_CST_TIMEOUT_LIMIT_S
	.no_dead_strip	_ar5008_hw_set_channel_regs
.subsections_via_symbols
