	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlcore_op_assign_vif_chanctx
_wlcore_op_assign_vif_chanctx:          ## @wlcore_op_assign_vif_chanctx
	.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	%rdx, %r14
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_wl12xx_vif_to_data
	movq	%rax, %rbx
	movq	(%r14), %rax
	movl	12(%rax), %edi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, %r15d
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	20(%rbx), %r12d
	movq	%r14, %rdi
	callq	_cfg80211_get_chandef_type
	movq	(%r14), %rcx
	movq	8(%r14), %r9
	movq	(%rcx), %rcx
	movq	%rcx, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edi
	movl	%r12d, %edx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_wl1271_debug
	leaq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_WLCORE_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	_WLVIF_FLAG_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	16(%rax), %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	12(%rbx), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	(%r14), %rax
	movl	8(%rax), %eax
	movl	%eax, 12(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_cfg80211_get_chandef_type
	movl	%eax, 8(%r13)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_wl1271_set_band_rate
	cmpq	$0, 8(%r14)
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_NL80211_DFS_USABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_wlcore_hw_set_cac
	movl	$1, 4(%r13)
LBB0_7:
	movl	12(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	12(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_8
LBB0_3:
	movl	12(%rbx), %edi
	callq	_pm_runtime_put_noidle
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DEBUG_MAC80211,4,2             ## @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac80211 assign chanctx (role %d) %d (type %d) (radar %d dfs_state %d)"

	.comm	_WLCORE_STATE_ON,8,3            ## @WLCORE_STATE_ON
	.comm	_WLVIF_FLAG_INITIALIZED,4,2     ## @WLVIF_FLAG_INITIALIZED
	.comm	_NL80211_DFS_USABLE,8,3         ## @NL80211_DFS_USABLE
L_.str.1:                               ## @.str.1
	.asciz	"Start radar detection"

	.no_dead_strip	_wlcore_op_assign_vif_chanctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlcore_op_assign_vif_chanctx
_wlcore_op_assign_vif_chanctx:          ; @wlcore_op_assign_vif_chanctx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x22, x2
	ldr	x19, [x0]
	mov	x0, x1
	bl	_wl12xx_vif_to_data
	mov	x20, x0
	ldr	x8, [x22]
	ldr	w0, [x8, #12]
	bl	_ieee80211_frequency_to_channel
	mov	x23, x0
Lloh0:
	adrp	x24, _DEBUG_MAC80211@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DEBUG_MAC80211@GOTPAGEOFF]
	ldr	w21, [x24]
	ldr	w25, [x20, #20]
	mov	x0, x22
	bl	_cfg80211_get_chandef_type
                                        ; kill: def $w0 killed $w0 def $x0
	ldp	x9, x8, [x22]
	ldr	x9, [x9]
	stp	x8, x9, [sp, #24]
	stp	x23, x0, [sp, #8]
	str	x25, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_wl1271_debug
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _WLCORE_STATE_ON@GOTPAGE
Lloh5:
	ldr	x9, [x9, _WLCORE_STATE_ON@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.1:
Lloh7:
	adrp	x8, _WLVIF_FLAG_INITIALIZED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WLVIF_FLAG_INITIALIZED@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x20, #16
	bl	_test_bit
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [x22]
	ldr	w8, [x8, #8]
	str	w8, [x20, #12]
	str	w23, [x20]
	mov	x0, x22
	bl	_cfg80211_get_chandef_type
	str	w0, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_wl1271_set_band_rate
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _NL80211_DFS_USABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NL80211_DFS_USABLE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x24]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1271_debug
	mov	w22, #1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_wlcore_hw_set_cac
	str	w22, [x20, #4]
LBB0_6:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_noidle
LBB0_8:
	mov	x0, x21
	bl	_mutex_unlock
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac80211 assign chanctx (role %d) %d (type %d) (radar %d dfs_state %d)"

	.comm	_WLCORE_STATE_ON,8,3            ; @WLCORE_STATE_ON
	.comm	_WLVIF_FLAG_INITIALIZED,4,2     ; @WLVIF_FLAG_INITIALIZED
	.comm	_NL80211_DFS_USABLE,8,3         ; @NL80211_DFS_USABLE
l_.str.1:                               ; @.str.1
	.asciz	"Start radar detection"

	.no_dead_strip	_wlcore_op_assign_vif_chanctx
.subsections_via_symbols
