	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_channel_change
_ath9k_hw_channel_change:               ## @ath9k_hw_channel_change
	.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	%rsi, %rbx
	movq	%rdi, %r12
	callq	_ath9k_hw_common
	movq	$0, -56(%rbp)
	movq	_ATH9K_HW_CAP_FCC_BAND_SWITCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 24(%r12)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	16(%r12), %rax
	movq	(%rax), %rax
	xorq	(%rbx), %rax
	movq	_CHANNEL_5GHZ@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	testq	%rax, (%rcx)
	setne	%r13b
	movq	_CHANNEL_HT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	xorl	%r15d, %r15d
	testq	%rcx, %rax
	setne	%r15b
	jmp	LBB0_3
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
LBB0_3:
	movq	_AR_NUM_QCU@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jle	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_numtxpending
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	(%r14), %rbx
	jl	LBB0_5
LBB0_7:
	movq	%r12, %rdi
	callq	_ath9k_hw_rfbus_req
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:
	orl	%r13d, %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_14
## %bb.9:
	movq	%r12, %rdi
	callq	_ath9k_hw_mark_phy_inactive
	movl	$5, %edi
	callq	_udelay
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_init_pll
LBB0_11:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_fast_chan_change
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_17
LBB0_13:
	movq	_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_ath_dbg
	jmp	LBB0_18
LBB0_14:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_set_channel_regs
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_rf_set_freq
	testl	%eax, %eax
	je	LBB0_20
## %bb.15:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_17
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath_err
LBB0_18:
	xorl	%r15d, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r12, %rdi
	callq	_ath9k_hw_set_clockrate
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_ath9k_hw_apply_txpower
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_set_delta_slope
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_spur_mitigate_freq
	testl	%r13d, %r13d
	jne	LBB0_22
## %bb.21:
	cmpq	$0, -56(%rbp)
	je	LBB0_23
LBB0_22:
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	*(%rax)
LBB0_23:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_init_bb
	movq	%r12, %rdi
	callq	_ath9k_hw_rfbus_done
	movl	$1, %r15d
	testl	%r13d, %r13d
	jne	LBB0_25
## %bb.24:
	cmpq	$0, -56(%rbp)
	je	LBB0_19
LBB0_25:
	movq	_AH_FASTCC@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	orl	%eax, (%r12)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath9k_hw_init_cal
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, (%r12)
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_HW_CAP_FCC_BAND_SWITCH,4,2 ## @ATH9K_HW_CAP_FCC_BAND_SWITCH
	.comm	_CHANNEL_5GHZ,8,3               ## @CHANNEL_5GHZ
	.comm	_CHANNEL_HT,8,3                 ## @CHANNEL_HT
	.comm	_AR_NUM_QCU,8,3                 ## @AR_NUM_QCU
	.comm	_QUEUE,4,2                      ## @QUEUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transmit frames pending on queue %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not kill baseband RX\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to do fast channel change\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to set channel\n"

	.comm	_AH_FASTCC,4,2                  ## @AH_FASTCC
	.no_dead_strip	_ath9k_hw_channel_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_channel_change
_ath9k_hw_channel_change:               ; @ath9k_hw_channel_change
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_ath9k_hw_common
	mov	x21, x0
	str	xzr, [sp, #8]
	ldr	w8, [x19, #24]
Lloh0:
	adrp	x9, _ATH9K_HW_CAP_FCC_BAND_SWITCH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATH9K_HW_CAP_FCC_BAND_SWITCH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	eor	x8, x9, x8
Lloh3:
	adrp	x9, _CHANNEL_5GHZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHANNEL_5GHZ@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	tst	x8, x9
	cset	w23, ne
Lloh6:
	adrp	x9, _CHANNEL_HT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHANNEL_HT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	bics	xzr, x8, x9
	cset	w24, ne
	b	LBB0_3
LBB0_2:
	mov	w24, #0
	mov	w23, #0
LBB0_3:
Lloh9:
	adrp	x25, _AR_NUM_QCU@GOTPAGE
Lloh10:
	ldr	x25, [x25, _AR_NUM_QCU@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_ath9k_hw_numtxpending
	cbnz	x0, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	ldr	x8, [x25]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_7:
	mov	x0, x19
	bl	_ath9k_hw_rfbus_req
	cbz	w0, LBB0_16
; %bb.8:
	orr	w8, w23, w24
	cbz	w8, LBB0_14
; %bb.9:
	mov	x0, x19
	bl	_ath9k_hw_mark_phy_inactive
	mov	w0, #5
	bl	_udelay
	cbz	w23, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_init_pll
LBB0_11:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_fast_chan_change
	cbz	x0, LBB0_14
; %bb.12:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_13:
Lloh13:
	adrp	x8, _QUEUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QUEUE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	bl	_ath_dbg
	b	LBB0_18
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_set_channel_regs
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_rf_set_freq
	cbz	w0, LBB0_20
; %bb.15:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_17:
	mov	x0, x21
	bl	_ath_err
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	add	sp, sp, #96
	ret
LBB0_20:
	mov	x0, x19
	bl	_ath9k_hw_set_clockrate
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_ath9k_hw_apply_txpower
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_set_delta_slope
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_spur_mitigate_freq
	cbnz	w23, LBB0_22
; %bb.21:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_23
LBB0_22:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_init_bb
	mov	x0, x19
	bl	_ath9k_hw_rfbus_done
	cbnz	w23, LBB0_25
; %bb.24:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_26
LBB0_25:
Lloh22:
	adrp	x21, _AH_FASTCC@GOTPAGE
Lloh23:
	ldr	x21, [x21, _AH_FASTCC@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_init_cal
	ldr	w8, [x21]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_26:
	mov	w0, #1
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_HW_CAP_FCC_BAND_SWITCH,4,2 ; @ATH9K_HW_CAP_FCC_BAND_SWITCH
	.comm	_CHANNEL_5GHZ,8,3               ; @CHANNEL_5GHZ
	.comm	_CHANNEL_HT,8,3                 ; @CHANNEL_HT
	.comm	_AR_NUM_QCU,8,3                 ; @AR_NUM_QCU
	.comm	_QUEUE,4,2                      ; @QUEUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transmit frames pending on queue %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not kill baseband RX\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to do fast channel change\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to set channel\n"

	.comm	_AH_FASTCC,4,2                  ; @AH_FASTCC
	.no_dead_strip	_ath9k_hw_channel_change
.subsections_via_symbols
