	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_set_channel
_ath_set_channel:                       ## @ath_set_channel
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movq	%r13, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %rbx
	movq	32(%r12), %r14
	movq	40(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %r15
	movslq	(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ATH_OP_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	addq	$8, %r14
	movq	8(%r13), %rcx
	testq	%rcx, %rcx
	movq	%r13, %r15
	je	LBB0_3
## %bb.4:
	subq	(%r15), %rcx
	shrq	$2, %rcx
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %ecx
LBB0_5:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r13
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rcx), %ecx
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_ath_update_survey_stats
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ath9k_cmn_get_channel
	movq	32(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.6:
	movq	16(%r12), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax,%rbx,4)
	jne	LBB0_13
## %bb.8:
	leaq	(%rax,%rbx,4), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	jmp	LBB0_13
LBB0_9:
	movq	16(%r12), %rax
	movq	24(%r12), %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rax,%rbx,4), %rdi
	cmpq	%rdi, %rcx
	je	LBB0_7
## %bb.10:
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rcx)
LBB0_12:
	movq	%rdi, 24(%r12)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r12), %rcx
	orl	%eax, (%rcx)
LBB0_13:
	movq	8(%r12), %rax
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ath_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.14:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testl	%esi, %esi
	js	LBB0_16
## %bb.15:
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ath_update_survey_nf
LBB0_16:
	cmpq	$0, (%r13)
	je	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	callq	_ath9k_hw_getrxfilter
	movq	_ATH9K_RX_FILTER_PHYRADAR@GOTPCREL(%rip), %rcx
	movq	_ATH9K_RX_FILTER_PHYERR@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ath9k_hw_setrxfilter
	movq	_DFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_ath_dbg
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_ATH_OP_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	(%r12), %rax
	movq	_SPECTRAL_CHANSCAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_ath9k_cmn_spectral_scan_trigger
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_OP_INVALID,4,2             ## @ATH_OP_INVALID
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set channel: %d MHz width: %d\n"

	.comm	_SURVEY_INFO_IN_USE,4,2         ## @SURVEY_INFO_IN_USE
	.comm	_ATH9K_RX_FILTER_PHYRADAR,4,2   ## @ATH9K_RX_FILTER_PHYRADAR
	.comm	_ATH9K_RX_FILTER_PHYERR,4,2     ## @ATH9K_RX_FILTER_PHYERR
	.comm	_DFS,4,2                        ## @DFS
L_.str.1:                               ## @.str.1
	.asciz	"DFS enabled at freq %d\n"

	.comm	_ATH_OP_SCANNING,4,2            ## @ATH_OP_SCANNING
	.comm	_SPECTRAL_CHANSCAN,8,3          ## @SPECTRAL_CHANSCAN
	.no_dead_strip	_ath_set_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_set_channel
_ath_set_channel:                       ; @ath_set_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_ath9k_hw_common
	mov	x19, x0
	ldp	x23, x22, [x20, #32]
	ldr	x26, [x23, #16]
	ldrsw	x27, [x26]
Lloh0:
	adrp	x8, _ATH_OP_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH_OP_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_2:
	add	x24, x23, #8
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x9, [x21]
	sub	x8, x8, x9
	lsr	x23, x8, #2
	b	LBB0_5
LBB0_4:
	mov	w23, #-1
LBB0_5:
Lloh6:
	adrp	x8, _CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w3, [x26, #4]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
	add	x25, x19, #4
	mov	x0, x25
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_ath_update_survey_stats
	mov	x0, x25
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	bl	_ath9k_cmn_get_channel
	ldr	x8, [x20, #32]
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.6:
	ldr	x8, [x20, #16]
LBB0_7:
	add	x0, x8, x27, lsl #2
	ldr	w8, [x0]
Lloh11:
	adrp	x9, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.8:
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	b	LBB0_13
LBB0_9:
	ldp	x8, x9, [x20, #16]
	add	x0, x8, x27, lsl #2
	cmp	x9, x0
	b.eq	LBB0_7
; %bb.10:
	cbz	x9, LBB0_12
; %bb.11:
Lloh14:
	adrp	x8, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
LBB0_12:
	str	x0, [x20, #24]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh17:
	adrp	x8, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	x9, [x20, #24]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_13:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x1, x8, x27, lsl #2
	mov	x0, x20
	bl	_ath_reset
	cbnz	w0, LBB0_19
; %bb.14:
	tbnz	w23, #31, LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x23
	bl	_ath_update_survey_nf
LBB0_16:
	ldr	x8, [x22]
	cbz	x8, LBB0_20
; %bb.17:
	mov	x0, x21
	bl	_ath9k_hw_getrxfilter
Lloh20:
	adrp	x8, _ATH9K_RX_FILTER_PHYRADAR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATH9K_RX_FILTER_PHYRADAR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _ATH9K_RX_FILTER_PHYERR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATH9K_RX_FILTER_PHYERR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
	mov	x0, x21
	bl	_ath9k_hw_setrxfilter
Lloh26:
	adrp	x8, _DFS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DFS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w3, [x26, #4]
Lloh29:
	adrp	x2, l_.str.1@PAGE
Lloh30:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
Lloh31:
	adrp	x8, _ATH_OP_SCANNING@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ATH_OP_SCANNING@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_19
; %bb.21:
	ldr	x8, [x20]
Lloh34:
	adrp	x9, _SPECTRAL_CHANSCAN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SPECTRAL_CHANSCAN@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.22:
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_cmn_spectral_scan_trigger
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_OP_INVALID,4,2             ; @ATH_OP_INVALID
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set channel: %d MHz width: %d\n"

	.comm	_SURVEY_INFO_IN_USE,4,2         ; @SURVEY_INFO_IN_USE
	.comm	_ATH9K_RX_FILTER_PHYRADAR,4,2   ; @ATH9K_RX_FILTER_PHYRADAR
	.comm	_ATH9K_RX_FILTER_PHYERR,4,2     ; @ATH9K_RX_FILTER_PHYERR
	.comm	_DFS,4,2                        ; @DFS
l_.str.1:                               ; @.str.1
	.asciz	"DFS enabled at freq %d\n"

	.comm	_ATH_OP_SCANNING,4,2            ; @ATH_OP_SCANNING
	.comm	_SPECTRAL_CHANSCAN,8,3          ; @SPECTRAL_CHANSCAN
	.no_dead_strip	_ath_set_channel
.subsections_via_symbols
