	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __wlcore_switch_vif_chan
___wlcore_switch_vif_chan:              ## @__wlcore_switch_vif_chan
	.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	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rdx), %r15
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rax
	movl	4(%rax), %edi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rbx), %r12d
	movl	32(%rbx), %r13d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_cfg80211_get_chandef_type
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	8(%rbx), %rax
	movq	_BSS_TYPE_AP_BSS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	_WLVIF_FLAG_BEACON_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%rbx), %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	cmpl	$0, 16(%rbx)
	je	LBB0_3
## %bb.2:
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_wlcore_hw_set_cac
	movl	$0, 16(%rbx)
LBB0_3:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	%r12d, (%rbx)
	movq	%r14, %rdi
	callq	_cfg80211_get_chandef_type
	movl	%eax, 20(%rbx)
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.4:
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_wlcore_hw_set_cac
	movl	$1, 16(%rbx)
LBB0_5:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_MAC80211,4,2             ## @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"switch vif (role %d) %d -> %d chan_type: %d"

	.comm	_BSS_TYPE_AP_BSS,8,3            ## @BSS_TYPE_AP_BSS
	.comm	_WLVIF_FLAG_BEACON_DISABLED,4,2 ## @WLVIF_FLAG_BEACON_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"Stop radar detection"

L_.str.2:                               ## @.str.2
	.asciz	"Start radar detection"

	.no_dead_strip	___wlcore_switch_vif_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __wlcore_switch_vif_chan
___wlcore_switch_vif_chan:              ; @__wlcore_switch_vif_chan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x22, x2
	ldr	x8, [x22, #8]!
	ldr	w0, [x8, #4]
	bl	_ieee80211_frequency_to_channel
	mov	x23, x0
Lloh0:
	adrp	x25, _DEBUG_MAC80211@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DEBUG_MAC80211@GOTPAGEOFF]
	ldr	w24, [x25]
	ldr	w26, [x19, #32]
	ldr	w27, [x19]
	mov	x0, x22
	bl	_cfg80211_get_chandef_type
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp, #16]
	stp	x26, x27, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_wl1271_debug
	ldr	x8, [x19, #8]
Lloh4:
	adrp	x9, _BSS_TYPE_AP_BSS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BSS_TYPE_AP_BSS@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_5
; %bb.1:
Lloh7:
	adrp	x8, _WLVIF_FLAG_BEACON_DISABLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WLVIF_FLAG_BEACON_DISABLED@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_test_bit
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	w0, [x25]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1271_debug
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_wlcore_hw_set_cac
	str	wzr, [x19, #16]
LBB0_3:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	w23, [x19]
	mov	x0, x22
	bl	_cfg80211_get_chandef_type
	str	w0, [x19, #20]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x25]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wl1271_debug
	mov	w21, #1
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_wlcore_hw_set_cac
	str	w21, [x19, #16]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"switch vif (role %d) %d -> %d chan_type: %d"

	.comm	_BSS_TYPE_AP_BSS,8,3            ; @BSS_TYPE_AP_BSS
	.comm	_WLVIF_FLAG_BEACON_DISABLED,4,2 ; @WLVIF_FLAG_BEACON_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"Stop radar detection"

l_.str.2:                               ; @.str.2
	.asciz	"Start radar detection"

	.no_dead_strip	___wlcore_switch_vif_chan
.subsections_via_symbols
