	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_htc_config
_ath9k_htc_config:                      ## @ath9k_htc_config
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	16(%rdi), %rbx
	movq	24(%rbx), %rdi
	callq	_ath9k_hw_common
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	12(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_ath9k_htc_ps_wakeup
	movq	_IEEE80211_CONF_CHANGE_IDLE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_1
## %bb.2:
	leaq	36(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_IEEE80211_CONF_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	andl	(%r15), %eax
	sete	%r14b
	setne	%cl
	movl	%ecx, (%rbx)
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	_IEEE80211_CONF_CHANGE_MONITOR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.4:
	movq	_IEEE80211_CONF_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	24(%rbx), %rax
	movq	8(%rax), %rax
	testl	%ecx, (%r15)
	je	LBB0_7
## %bb.5:
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_ath9k_htc_add_monitor_interface
	jmp	LBB0_9
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_ath9k_htc_remove_monitor_interface
LBB0_9:
	movq	_IEEE80211_CONF_CHANGE_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	orl	%r14d, %eax
	je	LBB0_12
## %bb.10:
	leaq	8(%r15), %r13
	movq	8(%r15), %rax
	movslq	(%rax), %r14
	movq	_CONFIG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	4(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath_dbg
	movq	24(%rbx), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_ath9k_cmn_get_channel
	movq	24(%rbx), %rax
	shlq	$2, %r14
	addq	(%rax), %r14
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ath9k_htc_set_channel
	testq	%rax, %rax
	js	LBB0_11
LBB0_12:
	movq	_IEEE80211_CONF_CHANGE_PS@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_16
## %bb.13:
	movq	_IEEE80211_CONF_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_15
## %bb.14:
	movq	_ATH9K_PM_NETWORK_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath9k_htc_setpower
	movl	$1, 4(%rbx)
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_15:
	movl	$0, 4(%rbx)
	leaq	32(%rbx), %rdi
	callq	_cancel_work_sync
	movq	_ATH9K_PM_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath9k_htc_setpower
LBB0_16:
	movq	_IEEE80211_CONF_CHANGE_POWER@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	testl	%r12d, (%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_18
## %bb.17:
	movl	4(%r15), %edx
	addl	%edx, %edx
	movl	%edx, 8(%rbx)
	movq	24(%rbx), %rdi
	leaq	16(%rbx), %rcx
	movl	16(%rbx), %esi
	callq	_ath9k_cmn_update_txpow
LBB0_18:
	movq	%rbx, %rdi
	callq	_ath9k_htc_ps_restore
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CONF_CHANGE_IDLE,4,2 ## @IEEE80211_CONF_CHANGE_IDLE
	.comm	_IEEE80211_CONF_IDLE,4,2        ## @IEEE80211_CONF_IDLE
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ## @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ## @IEEE80211_CONF_MONITOR
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ## @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set channel: %d MHz\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to set channel\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_CONF_CHANGE_PS,4,2   ## @IEEE80211_CONF_CHANGE_PS
	.comm	_IEEE80211_CONF_PS,4,2          ## @IEEE80211_CONF_PS
	.comm	_ATH9K_PM_NETWORK_SLEEP,4,2     ## @ATH9K_PM_NETWORK_SLEEP
	.comm	_ATH9K_PM_AWAKE,4,2             ## @ATH9K_PM_AWAKE
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ## @IEEE80211_CONF_CHANGE_POWER
	.no_dead_strip	_ath9k_htc_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_htc_config
_ath9k_htc_config:                      ; @ath9k_htc_config
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x1
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	x0, [x19, #24]
	bl	_ath9k_hw_common
	mov	x23, x0
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_ath9k_htc_ps_wakeup
Lloh0:
	adrp	x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	add	x24, x19, #36
	mov	x0, x24
	bl	_mutex_lock
Lloh3:
	adrp	x8, _IEEE80211_CONF_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_CONF_IDLE@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w25, eq
	cset	w8, ne
	str	w8, [x19]
	mov	x0, x24
	bl	_mutex_unlock
	b	LBB0_3
LBB0_2:
	mov	w25, #0
LBB0_3:
Lloh6:
	adrp	x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.4:
	ldr	w9, [x21]
Lloh9:
	adrp	x8, _IEEE80211_CONF_MONITOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IEEE80211_CONF_MONITOR@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x8]
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.5:
	cbnz	x8, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_ath9k_htc_add_monitor_interface
	b	LBB0_9
LBB0_7:
	cbz	x8, LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_ath9k_htc_remove_monitor_interface
LBB0_9:
Lloh12:
	adrp	x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w22
	orr	w8, w8, w25
	cbz	w8, LBB0_11
; %bb.10:
	mov	x24, x21
	ldr	x8, [x24, #8]!
Lloh15:
	adrp	x9, _CONFIG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CONFIG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	ldp	w25, w3, [x8]
                                        ; kill: def $w25 killed $w25 def $x25
	sxtw	x25, w25
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_ath_dbg
	ldr	x1, [x19, #24]
	mov	x0, x21
	mov	x2, x24
	bl	_ath9k_cmn_get_channel
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	add	x2, x8, x25, lsl #2
	mov	x0, x19
	mov	x1, x21
	bl	_ath9k_htc_set_channel
	tbnz	x0, #63, LBB0_14
LBB0_11:
Lloh20:
	adrp	x8, _IEEE80211_CONF_CHANGE_PS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_PS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_16
; %bb.12:
	ldr	w8, [x21]
Lloh23:
	adrp	x9, _IEEE80211_CONF_PS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IEEE80211_CONF_PS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
Lloh26:
	adrp	x8, _ATH9K_PM_NETWORK_SLEEP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATH9K_PM_NETWORK_SLEEP@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath9k_htc_setpower
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_16
LBB0_14:
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_ath_err
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_15:
	str	wzr, [x19, #4]
	add	x0, x19, #32
	bl	_cancel_work_sync
Lloh34:
	adrp	x8, _ATH9K_PM_AWAKE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ATH9K_PM_AWAKE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath9k_htc_setpower
LBB0_16:
Lloh37:
	adrp	x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_18
; %bb.17:
	ldr	w8, [x21, #4]
	lsl	w2, w8, #1
	mov	x3, x19
	ldr	w1, [x3, #16]!
	stur	w2, [x3, #-8]
	ldr	x0, [x3, #8]
	bl	_ath9k_cmn_update_txpow
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x19
	bl	_ath9k_htc_ps_restore
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CONF_CHANGE_IDLE,4,2 ; @IEEE80211_CONF_CHANGE_IDLE
	.comm	_IEEE80211_CONF_IDLE,4,2        ; @IEEE80211_CONF_IDLE
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ; @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ; @IEEE80211_CONF_MONITOR
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ; @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set channel: %d MHz\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to set channel\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_CONF_CHANGE_PS,4,2   ; @IEEE80211_CONF_CHANGE_PS
	.comm	_IEEE80211_CONF_PS,4,2          ; @IEEE80211_CONF_PS
	.comm	_ATH9K_PM_NETWORK_SLEEP,4,2     ; @ATH9K_PM_NETWORK_SLEEP
	.comm	_ATH9K_PM_AWAKE,4,2             ; @ATH9K_PM_AWAKE
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ; @IEEE80211_CONF_CHANGE_POWER
	.no_dead_strip	_ath9k_htc_config
.subsections_via_symbols
