	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_config
_ath9k_config:                          ## @ath9k_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, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	8(%r15), %rdi
	callq	_ath9k_hw_common
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_ath9k_ps_wakeup
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_IEEE80211_CONF_CHANGE_IDLE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_IEEE80211_CONF_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r14), %eax
	setne	%cl
	movl	%ecx, (%r15)
	movq	%r15, %rdi
	je	LBB0_3
## %bb.2:
	callq	_ath_cancel_work
	movq	%r15, %rdi
	callq	_ath9k_stop_btcoex
	jmp	LBB0_4
LBB0_3:
	callq	_ath9k_start_btcoex
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	leaq	4(%rsi), %rdx
	movq	%r15, %rdi
	callq	_ath_chanctx_set_channel
LBB0_4:
	movq	_IEEE80211_CONF_CHANGE_PS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_9
## %bb.5:
	leaq	16(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_IEEE80211_CONF_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_ath9k_enable_ps
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_ath9k_disable_ps
LBB0_8:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_9:
	movq	_IEEE80211_CONF_CHANGE_MONITOR@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_IEEE80211_CONF_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %r12
	xorl	%ebx, %ebx
	andl	(%r14), %eax
	setne	%bl
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath_dbg
	movq	8(%r15), %rax
	movl	%ebx, (%rax)
	movq	%r12, %rbx
LBB0_11:
	xorl	%eax, %eax
	callq	_ath9k_is_chanctx_enabled
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	_IEEE80211_CONF_CHANGE_CHANNEL@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_14
## %bb.13:
	movq	_IEEE80211_CONF_OFFCHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r14), %eax
	setne	%cl
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ecx, (%rsi)
	addq	$4, %r14
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_ath_chanctx_set_channel
LBB0_14:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_ath9k_ps_restore
	xorl	%eax, %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_PS,4,2   ## @IEEE80211_CONF_CHANGE_PS
	.comm	_IEEE80211_CONF_PS,4,2          ## @IEEE80211_CONF_PS
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ## @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ## @IEEE80211_CONF_MONITOR
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Monitor mode is enabled\n"

L_.str.1:                               ## @.str.1
	.asciz	"Monitor mode is disabled\n"

	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ## @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ## @IEEE80211_CONF_OFFCHANNEL
	.no_dead_strip	_ath9k_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_config
_ath9k_config:                          ; @ath9k_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	x23, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x0, [x19, #8]
	bl	_ath9k_hw_common
	mov	x24, x0
	ldr	x22, [x19, #24]
	mov	x0, x19
	bl	_ath9k_ps_wakeup
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_IDLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _IEEE80211_CONF_IDLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_CONF_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w8, w9, w8
	cset	w9, ne
	str	w9, [x19]
	mov	x0, x19
	cbz	w8, LBB0_3
; %bb.2:
	bl	_ath_cancel_work
	mov	x0, x19
	bl	_ath9k_stop_btcoex
	b	LBB0_4
LBB0_3:
	bl	_ath9k_start_btcoex
	add	x2, x22, #4
	mov	x0, x19
	mov	x1, x22
	bl	_ath_chanctx_set_channel
LBB0_4:
Lloh6:
	adrp	x8, _IEEE80211_CONF_CHANGE_PS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_PS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_9
; %bb.5:
	add	x25, x19, #16
	mov	x0, x25
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _IEEE80211_CONF_PS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_CONF_PS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	bl	_ath9k_enable_ps
	b	LBB0_8
LBB0_7:
	bl	_ath9k_disable_ps
LBB0_8:
	mov	x0, x25
	bl	_spin_unlock_irqrestore
LBB0_9:
Lloh12:
	adrp	x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_MONITOR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_11
; %bb.10:
Lloh15:
	adrp	x8, _IEEE80211_CONF_MONITOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IEEE80211_CONF_MONITOR@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w25, ne
Lloh18:
	adrp	x8, _CONFIG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, l_.str@PAGE
Lloh22:
	add	x8, x8, l_.str@PAGEOFF
Lloh23:
	adrp	x9, l_.str.1@PAGE
Lloh24:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x2, x9, x8, eq
	mov	x0, x24
	bl	_ath_dbg
	ldr	x8, [x19, #8]
	str	w25, [x8]
LBB0_11:
	bl	_ath9k_is_chanctx_enabled
	cbnz	w0, LBB0_14
; %bb.12:
Lloh25:
	adrp	x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_14
; %bb.13:
	ldr	w8, [x20], #4
Lloh28:
	adrp	x9, _IEEE80211_CONF_OFFCHANNEL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IEEE80211_CONF_OFFCHANNEL@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x22]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_ath_chanctx_set_channel
LBB0_14:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_ath9k_ps_restore
	mov	w0, #0
	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	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.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_PS,4,2   ; @IEEE80211_CONF_CHANGE_PS
	.comm	_IEEE80211_CONF_PS,4,2          ; @IEEE80211_CONF_PS
	.comm	_IEEE80211_CONF_CHANGE_MONITOR,4,2 ; @IEEE80211_CONF_CHANGE_MONITOR
	.comm	_IEEE80211_CONF_MONITOR,4,2     ; @IEEE80211_CONF_MONITOR
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Monitor mode is enabled\n"

l_.str.1:                               ; @.str.1
	.asciz	"Monitor mode is disabled\n"

	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ; @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ; @IEEE80211_CONF_OFFCHANNEL
	.no_dead_strip	_ath9k_config
.subsections_via_symbols
