	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_mac_add_interface
_iwl_mvm_mac_add_interface:             ## @iwl_mvm_mac_add_interface
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_IWL_MAC80211_GET_MVM
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	movq	%rax, %r12
	movq	%r14, 56(%rax)
	movl	48(%rax), %edi
	xorl	%esi, %esi
	callq	_RCU_INIT_POINTER
	leaq	4(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_IWL_MVM_STATUS_IN_HW_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	addq	$40, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	32(%r12), %eax
	addl	%eax, 40(%r12)
LBB0_2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_mac_ctxt_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_35
## %bb.3:
	movq	32(%r14), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	%r15, %rsi
	callq	_rcu_assign_pointer
	movl	4(%r15), %eax
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	incl	8(%r14)
LBB0_5:
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.6:
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.11:
	movl	(%rbx), %eax
	orl	%eax, 20(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_mac_ctxt_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.12:
	movq	%r14, %rdi
	callq	_iwl_mvm_power_update_mac
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_31
## %bb.13:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_iwl_mvm_disable_beacon_filter
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_31:
	movq	$0, 8(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_mac_ctxt_remove
	jmp	LBB0_32
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_alloc_bcast_sta
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_IWL_ERR
	jmp	LBB0_32
LBB0_9:
	addq	$24, %r12
	movl	4(%r15), %ecx
	movq	_IWL_STA_MULTICAST@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_iwl_mvm_allocate_int_sta
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_32:
	movl	4(%r15), %eax
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_34
## %bb.33:
	decl	8(%r14)
LBB0_34:
	movl	%ebx, %r13d
LBB0_35:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_vif_dbgfs_register
	jmp	LBB0_35
LBB0_14:
	cmpq	$0, 16(%r14)
	movl	4(%r15), %eax
	jne	LBB0_18
## %bb.15:
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.16:
	cmpl	$0, 8(%r15)
	jne	LBB0_18
## %bb.17:
	movq	%r12, 16(%r14)
	movq	_IEEE80211_VIF_BEACON_FILTER@GOTPCREL(%rip), %rcx
	movq	_IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	orl	%edx, (%r15)
LBB0_18:
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
## %bb.19:
	movq	%r14, %rdi
	callq	_iwl_mvm_get_free_phy_ctxt
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_iwl_mvm_phy_ctxt_ref
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_binding_add_vif
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
## %bb.22:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_add_p2p_bcast_sta
	testl	%eax, %eax
	je	LBB0_23
## %bb.27:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_binding_remove_vif
LBB0_28:
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	_iwl_mvm_phy_ctxt_unref
	jmp	LBB0_29
LBB0_20:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_29:
	cmpq	%r12, 16(%r14)
	jne	LBB0_31
## %bb.30:
	movq	$0, 16(%r14)
	movq	_IEEE80211_VIF_BEACON_FILTER@GOTPCREL(%rip), %rax
	movq	_IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%r15)
	jmp	LBB0_31
LBB0_23:
	movq	%r15, 24(%r14)
LBB0_24:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_tcm_add_vif
	addq	$16, %r12
	movq	_iwl_mvm_channel_switch_disconnect_wk@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_DELAYED_WORK
	movl	4(%r15), %eax
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.25:
	movl	$1, (%r14)
LBB0_26:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_iwl_mvm_vif_dbgfs_register
	xorl	%r13d, %r13d
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ## @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ## @NL80211_IFTYPE_P2P_DEVICE
	.comm	_NL80211_IFTYPE_AP,4,2          ## @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ## @NL80211_IFTYPE_ADHOC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate bcast sta\n"

	.comm	_IWL_STA_MULTICAST,4,2          ## @IWL_STA_MULTICAST
	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
	.comm	_IEEE80211_VIF_BEACON_FILTER,4,2 ## @IEEE80211_VIF_BEACON_FILTER
	.comm	_IEEE80211_VIF_SUPPORTS_CQM_RSSI,4,2 ## @IEEE80211_VIF_SUPPORTS_CQM_RSSI
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_iwl_mvm_channel_switch_disconnect_wk,4,2 ## @iwl_mvm_channel_switch_disconnect_wk
	.comm	_NL80211_IFTYPE_MONITOR,4,2     ## @NL80211_IFTYPE_MONITOR
	.no_dead_strip	_iwl_mvm_mac_add_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_mac_add_interface
_iwl_mvm_mac_add_interface:             ; @iwl_mvm_mac_add_interface
	.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	x20, x1
	mov	x24, x0
	bl	_IWL_MAC80211_GET_MVM
	mov	x21, x0
	mov	x0, x20
	bl	_iwl_mvm_vif_from_mac80211
	mov	x22, x0
	str	x21, [x0, #56]
	ldr	w0, [x0, #48]
	mov	x1, #0
	bl	_RCU_INIT_POINTER
	add	x19, x21, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x21, #40
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x22, #32]
	ldr	w9, [x22, #40]
	add	w8, w9, w8
	str	w8, [x22, #40]
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_mac_ctxt_init
	mov	x23, x0
	cbnz	w0, LBB0_15
; %bb.3:
	ldr	x8, [x21, #32]
	ldr	x9, [x22]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x20
	bl	_rcu_assign_pointer
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x25, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x21, #8]
	add	w9, w9, #1
	str	w9, [x21, #8]
LBB0_5:
Lloh5:
	adrp	x9, _NL80211_IFTYPE_AP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_alloc_bcast_sta
	cbz	w0, LBB0_12
; %bb.7:
	mov	x23, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_IWL_ERR
	b	LBB0_13
LBB0_8:
	ldr	w8, [x24]
	ldr	w9, [x22, #20]
	orr	w8, w9, w8
	str	w8, [x22, #20]
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_mac_ctxt_add
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.9:
	mov	x0, x21
	bl	_iwl_mvm_power_update_mac
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.10:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_iwl_mvm_disable_beacon_filter
	mov	x23, x0
	cbz	w0, LBB0_17
LBB0_11:
	str	xzr, [x22, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_mac_ctxt_remove
	b	LBB0_13
LBB0_12:
	add	x1, x22, #24
	ldr	w3, [x20, #4]
Lloh13:
	adrp	x8, _IWL_STA_MULTICAST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IWL_STA_MULTICAST@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_iwl_mvm_allocate_int_sta
	mov	x23, x0
	cbz	w0, LBB0_16
LBB0_13:
	ldr	w8, [x20, #4]
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_15
; %bb.14:
	ldr	w8, [x21, #8]
	sub	w8, w8, #1
	str	w8, [x21, #8]
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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_16:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_vif_dbgfs_register
	b	LBB0_15
LBB0_17:
	ldr	x9, [x21, #16]
	ldr	w8, [x20, #4]
	cbnz	x9, LBB0_21
; %bb.18:
Lloh16:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.19:
	ldr	w9, [x20, #8]
	cbnz	w9, LBB0_21
; %bb.20:
	str	x22, [x21, #16]
Lloh19:
	adrp	x9, _IEEE80211_VIF_BEACON_FILTER@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IEEE80211_VIF_BEACON_FILTER@GOTPAGEOFF]
Lloh21:
	adrp	x10, _IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x20]
	orr	w9, w9, w10
	str	w9, [x20]
LBB0_21:
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.22:
	mov	x0, x21
	bl	_iwl_mvm_get_free_phy_ctxt
	str	x0, [x22, #8]
	cbz	x0, LBB0_27
; %bb.23:
	mov	x1, x0
	mov	x0, x21
	bl	_iwl_mvm_phy_ctxt_ref
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_binding_add_vif
	mov	x23, x0
	cbnz	w0, LBB0_26
; %bb.24:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_add_p2p_bcast_sta
	cbz	w0, LBB0_30
; %bb.25:
	mov	x23, x0
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_binding_remove_vif
LBB0_26:
	ldr	x1, [x22, #8]
	mov	x0, x21
	bl	_iwl_mvm_phy_ctxt_unref
	b	LBB0_28
LBB0_27:
Lloh25:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_28:
	ldr	x8, [x21, #16]
	cmp	x8, x22
	b.ne	LBB0_11
; %bb.29:
	str	xzr, [x21, #16]
Lloh28:
	adrp	x8, _IEEE80211_VIF_BEACON_FILTER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IEEE80211_VIF_BEACON_FILTER@GOTPAGEOFF]
Lloh30:
	adrp	x9, _IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IEEE80211_VIF_SUPPORTS_CQM_RSSI@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	b	LBB0_11
LBB0_30:
	str	x20, [x21, #24]
LBB0_31:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_tcm_add_vif
	add	x0, x22, #16
Lloh34:
	adrp	x8, _iwl_mvm_channel_switch_disconnect_wk@GOTPAGE
Lloh35:
	ldr	x8, [x8, _iwl_mvm_channel_switch_disconnect_wk@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	ldr	w8, [x20, #4]
Lloh37:
	adrp	x9, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh38:
	ldr	x9, [x9, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_33
; %bb.32:
	mov	w8, #1
	str	w8, [x21]
LBB0_33:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_mvm_vif_dbgfs_register
	mov	w23, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ; @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ; @NL80211_IFTYPE_P2P_DEVICE
	.comm	_NL80211_IFTYPE_AP,4,2          ; @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ; @NL80211_IFTYPE_ADHOC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate bcast sta\n"

	.comm	_IWL_STA_MULTICAST,4,2          ; @IWL_STA_MULTICAST
	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
	.comm	_IEEE80211_VIF_BEACON_FILTER,4,2 ; @IEEE80211_VIF_BEACON_FILTER
	.comm	_IEEE80211_VIF_SUPPORTS_CQM_RSSI,4,2 ; @IEEE80211_VIF_SUPPORTS_CQM_RSSI
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_iwl_mvm_channel_switch_disconnect_wk,4,2 ; @iwl_mvm_channel_switch_disconnect_wk
	.comm	_NL80211_IFTYPE_MONITOR,4,2     ; @NL80211_IFTYPE_MONITOR
	.no_dead_strip	_iwl_mvm_mac_add_interface
.subsections_via_symbols
