	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_change_chanctx
_iwl_mvm_change_chanctx:                ## @iwl_mvm_change_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	callq	_IWL_MAC80211_GET_MVM
	movq	%rax, %rbx
	movq	24(%r14), %rax
	movq	8(%rbx), %r15
	movq	(%rax), %r13
	shlq	$4, %r13
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iwl_mvm_is_ftm_responder_chanctx
	testl	%eax, %eax
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15,%r13), %edx
	xorl	%edi, %edi
	cmpl	$2, %edx
	jl	LBB0_2
## %bb.1:
	movq	_IEEE80211_CHANCTX_CHANGE_WIDTH@GOTPCREL(%rip), %rax
	movq	_IEEE80211_CHANCTX_CHANGE_RX_CHAINS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IEEE80211_CHANCTX_CHANGE_RADAR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	xorl	%edi, %edi
	testl	%r12d, %ecx
	setne	%dil
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	callq	_WARN_ONCE
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %al
	leaq	(%r14,%rax,8), %r15
	addq	$8, %r15
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	movq	%r15, %r12
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_7
## %bb.4:
	movq	8(%r15,%r13), %rcx
	movq	(%r12), %rax
	cmpq	%rax, %rcx
	je	LBB0_8
## %bb.5:
	movq	_NL80211_CHAN_WIDTH_20@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jg	LBB0_7
## %bb.6:
	cmpq	%rdx, %rax
	jle	LBB0_8
LBB0_7:
	addq	%r13, %r15
	movq	%rbx, %rdi
	callq	_iwl_mvm_bt_coex_vif_change
	movl	(%r14), %r8d
	movl	4(%r14), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_iwl_mvm_phy_ctxt_changed
LBB0_8:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CHANCTX_CHANGE_WIDTH,4,2 ## @IEEE80211_CHANCTX_CHANGE_WIDTH
	.comm	_IEEE80211_CHANCTX_CHANGE_RX_CHAINS,4,2 ## @IEEE80211_CHANCTX_CHANGE_RX_CHAINS
	.comm	_IEEE80211_CHANCTX_CHANGE_RADAR,4,2 ## @IEEE80211_CHANCTX_CHANGE_RADAR
	.comm	_IEEE80211_CHANCTX_CHANGE_MIN_WIDTH,4,2 ## @IEEE80211_CHANCTX_CHANGE_MIN_WIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot change PHY. Ref=%d, changed=0x%X\n"

	.comm	_NL80211_CHAN_WIDTH_20,8,3      ## @NL80211_CHAN_WIDTH_20
	.no_dead_strip	_iwl_mvm_change_chanctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_change_chanctx
_iwl_mvm_change_chanctx:                ; @iwl_mvm_change_chanctx
	.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, x2
	mov	x20, x1
	bl	_IWL_MAC80211_GET_MVM
	mov	x19, x0
	ldr	x8, [x20, #24]
	ldr	x24, [x0, #8]
	ldr	x25, [x8]
	add	x21, x24, x25, lsl #4
	mov	x1, x20
	bl	_iwl_mvm_is_ftm_responder_chanctx
	add	x8, x20, #16
	add	x9, x20, #8
	cmp	w0, #0
	csel	x22, x9, x8, eq
	ldr	w2, [x21]
	cmp	w2, #2
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IEEE80211_CHANCTX_CHANGE_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CHANCTX_CHANGE_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IEEE80211_CHANCTX_CHANGE_RX_CHAINS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_CHANCTX_CHANGE_RX_CHAINS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _IEEE80211_CHANCTX_CHANGE_RADAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_CHANCTX_CHANGE_RADAR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bics	wzr, w23, w8
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	bl	_WARN_ONCE
	cbz	x0, LBB0_5
; %bb.4:
	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
LBB0_5:
	mov	x0, x19
	bl	_mutex_lock
Lloh14:
	adrp	x8, _IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IEEE80211_CHANCTX_CHANGE_MIN_WIDTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_8
; %bb.6:
	add	x8, x24, x25, lsl #4
	ldr	x8, [x8, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.7:
Lloh17:
	adrp	x10, _NL80211_CHAN_WIDTH_20@GOTPAGE
Lloh18:
	ldr	x10, [x10, _NL80211_CHAN_WIDTH_20@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x9, x10, #0, le
	b.le	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_iwl_mvm_bt_coex_vif_change
	ldp	w4, w3, [x20]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_iwl_mvm_phy_ctxt_changed
LBB0_9:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CHANCTX_CHANGE_WIDTH,4,2 ; @IEEE80211_CHANCTX_CHANGE_WIDTH
	.comm	_IEEE80211_CHANCTX_CHANGE_RX_CHAINS,4,2 ; @IEEE80211_CHANCTX_CHANGE_RX_CHAINS
	.comm	_IEEE80211_CHANCTX_CHANGE_RADAR,4,2 ; @IEEE80211_CHANCTX_CHANGE_RADAR
	.comm	_IEEE80211_CHANCTX_CHANGE_MIN_WIDTH,4,2 ; @IEEE80211_CHANCTX_CHANGE_MIN_WIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot change PHY. Ref=%d, changed=0x%X\n"

	.comm	_NL80211_CHAN_WIDTH_20,8,3      ; @NL80211_CHAN_WIDTH_20
	.no_dead_strip	_iwl_mvm_change_chanctx
.subsections_via_symbols
