	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_mac_ctxt_init          ## -- Begin function iwl_mvm_mac_ctxt_init
	.p2align	4, 0x90
_iwl_mvm_mac_ctxt_init:                 ## @iwl_mvm_mac_ctxt_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_NUM_TSF_IDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, -80(%rbp)
	movl	$0, -72(%rbp)
	movl	$-1, %ebx
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	notl	%eax
	movl	%eax, -68(%rbp)
	movq	_NUM_MAC_INDEX_DRIVER@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	shll	%cl, %ebx
	notl	%ebx
	movl	%ebx, -64(%rbp)
	movq	%r12, -56(%rbp)
	movq	%r13, -48(%rbp)
	leaq	8(%r13), %rdi
	callq	_lockdep_assert_held
	movl	(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	cmpl	$0, 4(%r12)
	je	LBB0_4
LBB0_3:
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	___clear_bit
LBB0_4:
	movl	4(%r13), %edi
	movq	_IEEE80211_IFACE_ITER_RESUME_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_iwl_mvm_mac_iface_iterator@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	callq	_ieee80211_iterate_active_interfaces_atomic
	xorl	%r15d, %r15d
	cmpl	$0, -72(%rbp)
	jne	LBB0_21
## %bb.5:
	movq	_IWL_MVM_STATUS_IN_HW_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	movl	%eax, %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_21
LBB0_7:
	movl	-64(%rbp), %edi
	movq	(%r14), %rsi
	callq	_find_first_bit
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	cmpq	%rax, (%r14)
	jne	LBB0_10
## %bb.8:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_10:
	movq	-80(%rbp), %rax
	movq	_NUM_TSF_IDS@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_12
## %bb.11:
	movl	-68(%rbp), %edi
	movq	%rax, %rsi
	callq	_find_first_bit
	movq	(%r14), %rcx
LBB0_12:
	movq	%rax, 8(%rbx)
	cmpq	%rcx, %rax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movq	%r13, %rdi
	callq	_IWL_ERR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
LBB0_21:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	$0, 64(%rbx)
	movq	%rbx, %rdi
	addq	$56, %rdi
	callq	_INIT_LIST_HEAD
	movq	_TE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movl	(%r12), %eax
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_21
## %bb.15:
	cmpl	$129, %eax
	je	LBB0_17
## %bb.16:
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
LBB0_17:
	movq	_IWL_MVM_DQA_GCAST_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
LBB0_18:
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
	movq	%rax, 32(%rbx)
	movq	%rax, 24(%rbx)
	movq	_NUM_IWL_MVM_SMPS_REQ@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_21
## %bb.19:
	movq	16(%rbx), %rcx
	xorl	%r15d, %r15d
	movq	_IEEE80211_SMPS_AUTOMATIC@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %edi
	movl	%edi, (%rcx,%rsi,4)
	incq	%rsi
	movslq	(%rax), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_20
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_TSF_IDS,8,3                ## @NUM_TSF_IDS
	.comm	_NUM_MAC_INDEX_DRIVER,8,3       ## @NUM_MAC_INDEX_DRIVER
	.comm	_IEEE80211_IFACE_ITER_RESUME_ALL,4,2 ## @IEEE80211_IFACE_ITER_RESUME_ALL
	.comm	_iwl_mvm_mac_iface_iterator,4,2 ## @iwl_mvm_mac_iface_iterator
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ## @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init MAC context - no free ID!\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init MAC context - no free TSF!\n"

	.comm	_TE_MAX,4,2                     ## @TE_MAX
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ## @NL80211_IFTYPE_P2P_DEVICE
	.comm	_NL80211_IFTYPE_AP,4,2          ## @NL80211_IFTYPE_AP
	.comm	_IWL_MVM_DQA_GCAST_QUEUE,4,2    ## @IWL_MVM_DQA_GCAST_QUEUE
	.comm	_IWL_MVM_INVALID_STA,8,3        ## @IWL_MVM_INVALID_STA
	.comm	_NUM_IWL_MVM_SMPS_REQ,4,2       ## @NUM_IWL_MVM_SMPS_REQ
	.comm	_IEEE80211_SMPS_AUTOMATIC,4,2   ## @IEEE80211_SMPS_AUTOMATIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_mac_ctxt_init          ; -- Begin function iwl_mvm_mac_ctxt_init
	.p2align	2
_iwl_mvm_mac_ctxt_init:                 ; @iwl_mvm_mac_ctxt_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_iwl_mvm_vif_from_mac80211
	mov	x19, x0
Lloh0:
	adrp	x23, _NUM_TSF_IDS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NUM_TSF_IDS@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [sp, #8]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	stp	wzr, w8, [sp, #16]
Lloh2:
	adrp	x24, _NUM_MAC_INDEX_DRIVER@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NUM_MAC_INDEX_DRIVER@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w8, w9, w8
	mvn	w22, w8
	str	w22, [sp, #24]
	stp	x21, x20, [sp, #32]
	add	x0, x20, #8
	bl	_lockdep_assert_held
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_4
LBB0_3:
	mov	w0, #0
	mov	x1, x22
	bl	___clear_bit
LBB0_4:
	ldr	w0, [x20, #4]
Lloh4:
	adrp	x8, _IEEE80211_IFACE_ITER_RESUME_ALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_IFACE_ITER_RESUME_ALL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _iwl_mvm_mac_iface_iterator@GOTPAGE
Lloh8:
	ldr	x8, [x8, _iwl_mvm_mac_iface_iterator@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, sp, #8
	bl	_ieee80211_iterate_active_interfaces_atomic
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_6
LBB0_5:
	mov	w20, #0
	b	LBB0_15
LBB0_6:
Lloh10:
	adrp	x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_8
; %bb.7:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_8:
	ldr	w0, [sp, #24]
	ldr	x1, [x24]
	bl	_find_first_bit
	str	x0, [x19]
	ldr	x8, [x24]
	cmp	x8, x0
	b.ne	LBB0_10
; %bb.9:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
	ldr	x1, [sp, #8]
	ldr	x8, [x23]
	cmp	x1, x8
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [sp, #20]
	bl	_find_first_bit
	mov	x1, x0
	ldr	x8, [x23]
LBB0_12:
	str	x1, [x19, #8]
	cmp	x1, x8
	b.ne	LBB0_16
; %bb.13:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	mov	x0, x20
	bl	_IWL_ERR
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #72
	bl	_memset
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	str	xzr, [x19, #64]
	add	x0, x19, #56
	bl	_INIT_LIST_HEAD
Lloh23:
	adrp	x8, _TE_MAX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TE_MAX@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #52]
	ldr	w8, [x21]
Lloh26:
	adrp	x9, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.17:
	cmp	w8, #129
	b.eq	LBB0_19
; %bb.18:
Lloh29:
	adrp	x9, _NL80211_IFTYPE_AP@GOTPAGE
Lloh30:
	ldr	x9, [x9, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_20
LBB0_19:
Lloh32:
	adrp	x8, _IWL_MVM_DQA_GCAST_QUEUE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IWL_MVM_DQA_GCAST_QUEUE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x19, #48]
LBB0_20:
Lloh35:
	adrp	x8, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #32]
	str	x8, [x19, #24]
Lloh38:
	adrp	x8, _NUM_IWL_MVM_SMPS_REQ@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NUM_IWL_MVM_SMPS_REQ@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.21:
	mov	x9, #0
	ldr	x10, [x19, #16]
Lloh40:
	adrp	x11, _IEEE80211_SMPS_AUTOMATIC@GOTPAGE
Lloh41:
	ldr	x11, [x11, _IEEE80211_SMPS_AUTOMATIC@GOTPAGEOFF]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	w20, #0
	ldr	w12, [x11]
	str	w12, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_22
	b	LBB0_15
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_TSF_IDS,8,3                ; @NUM_TSF_IDS
	.comm	_NUM_MAC_INDEX_DRIVER,8,3       ; @NUM_MAC_INDEX_DRIVER
	.comm	_IEEE80211_IFACE_ITER_RESUME_ALL,4,2 ; @IEEE80211_IFACE_ITER_RESUME_ALL
	.comm	_iwl_mvm_mac_iface_iterator,4,2 ; @iwl_mvm_mac_iface_iterator
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ; @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init MAC context - no free ID!\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init MAC context - no free TSF!\n"

	.comm	_TE_MAX,4,2                     ; @TE_MAX
	.comm	_NL80211_IFTYPE_P2P_DEVICE,4,2  ; @NL80211_IFTYPE_P2P_DEVICE
	.comm	_NL80211_IFTYPE_AP,4,2          ; @NL80211_IFTYPE_AP
	.comm	_IWL_MVM_DQA_GCAST_QUEUE,4,2    ; @IWL_MVM_DQA_GCAST_QUEUE
	.comm	_IWL_MVM_INVALID_STA,8,3        ; @IWL_MVM_INVALID_STA
	.comm	_NUM_IWL_MVM_SMPS_REQ,4,2       ; @NUM_IWL_MVM_SMPS_REQ
	.comm	_IEEE80211_SMPS_AUTOMATIC,4,2   ; @IEEE80211_SMPS_AUTOMATIC
.subsections_via_symbols
