	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __iwl_mvm_assign_vif_chanctx
___iwl_mvm_assign_vif_chanctx:          ## @__iwl_mvm_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdx), %rax
	movq	(%rax), %rbx
	shlq	$2, %rbx
	addq	16(%rdi), %rbx
	movq	%rsi, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	movq	%rax, %r15
	leaq	8(%r14), %rdi
	callq	_lockdep_assert_held
	movq	%rbx, 16(%r15)
	movl	(%r12), %eax
	xorl	%ebx, %ebx
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_19
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	$0, 4(%r15)
	jmp	LBB0_6
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	je	LBB0_22
## %bb.20:
	negl	%r13d
	jmp	LBB0_21
LBB0_5:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	$1, 8(%r15)
	jmp	LBB0_6
LBB0_2:
	testl	%r13d, %r13d
	je	LBB0_22
## %bb.3:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	$1, (%r15)
LBB0_6:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_iwl_mvm_binding_add_vif
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.7:
	movq	%r14, %rdi
	callq	_iwl_mvm_power_update_mac
	movl	(%r12), %eax
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.8:
	movl	$1, 12(%r15)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_iwl_mvm_update_quotas
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_iwl_mvm_add_snif_sta
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_10
LBB0_18:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_iwl_mvm_binding_remove_vif
	movq	%r14, %rdi
	callq	_iwl_mvm_power_update_mac
LBB0_21:
	movq	$0, 16(%r15)
	movl	%r13d, %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r12), %eax
LBB0_11:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_iwl_mvm_update_quotas
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_iwl_mvm_mac_ctxt_changed
LBB0_13:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_22
## %bb.14:
	cmpl	$128, (%r12)
	jne	LBB0_22
## %bb.15:
	movl	$1, 4(%r15)
	movq	(%r14), %rdi
	movq	_IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fw_has_capa
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	movl	4(%r12), %eax
	leal	(%rax,%rax,2), %ecx
	movl	%eax, %r8d
	shrl	$31, %r8d
	addl	%eax, %r8d
	sarl	%r8d
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ecx, %edx
	movl	$1, %r9d
	callq	_iwl_mvm_protect_session
LBB0_17:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_iwl_mvm_update_quotas
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_22
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD,4,2 ## @IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD
	.no_dead_strip	___iwl_mvm_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 __iwl_mvm_assign_vif_chanctx
___iwl_mvm_assign_vif_chanctx:          ; @__iwl_mvm_assign_vif_chanctx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x2]
	ldr	x9, [x0, #16]
	ldr	x8, [x8]
	add	x23, x9, x8, lsl #2
	mov	x0, x1
	bl	_iwl_mvm_vif_from_mac80211
	mov	x21, x0
	add	x0, x19, #8
	bl	_lockdep_assert_held
	str	x23, [x21, #16]
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	w23, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	str	wzr, [x21, #4]
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_22
; %bb.4:
	neg	w23, w8
	b	LBB0_13
LBB0_5:
	mov	w8, #1
	str	w8, [x21, #8]
	b	LBB0_8
LBB0_6:
	cbz	w22, LBB0_22
; %bb.7:
	mov	w8, #1
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_mvm_binding_add_vif
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.9:
	mov	x0, x19
	bl	_iwl_mvm_power_update_mac
	ldr	w8, [x20]
	cmp	w8, #129
	b.ne	LBB0_15
; %bb.10:
	mov	w8, #1
	str	w8, [x21, #12]
	mov	x0, x19
	mov	w1, #0
	mov	x2, #0
	bl	_iwl_mvm_update_quotas
	mov	x23, x0
	cbnz	w0, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_mvm_add_snif_sta
	mov	x23, x0
	cbz	w0, LBB0_14
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_mvm_binding_remove_vif
	mov	x0, x19
	bl	_iwl_mvm_power_update_mac
LBB0_13:
	str	xzr, [x21, #16]
	b	LBB0_23
LBB0_14:
	ldr	w8, [x20]
LBB0_15:
	cmp	w8, #130
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	w1, #0
	mov	x2, #0
	bl	_iwl_mvm_update_quotas
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, #0
	bl	_iwl_mvm_mac_ctxt_changed
LBB0_17:
	cbz	w22, LBB0_22
; %bb.18:
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_22
; %bb.19:
	mov	w8, #1
	str	w8, [x21, #4]
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_fw_has_capa
	cbnz	w0, LBB0_21
; %bb.20:
	ldr	w8, [x20, #4]
	add	w2, w8, w8, lsl #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w4, w8, #1
	mov	x0, x19
	mov	x1, x20
	mov	x3, x2
	mov	w5, #1
	bl	_iwl_mvm_protect_session
LBB0_21:
	mov	x0, x19
	mov	w1, #0
	mov	x2, #0
	bl	_iwl_mvm_update_quotas
LBB0_22:
	mov	w23, #0
LBB0_23:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_23-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD,4,2 ; @IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD
	.no_dead_strip	___iwl_mvm_assign_vif_chanctx
.subsections_via_symbols
