	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_reserve_sta_stream
_iwl_mvm_reserve_sta_stream:            ## @iwl_mvm_reserve_sta_stream
	.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	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_iwl_mvm_sta_from_mac80211
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_iwl_mvm_has_new_tx_api
	movl	%eax, %edi
	callq	_WARN_ON
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_iwl_mvm_inactivity_check
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_5
## %bb.2:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.3:
	movq	(%r12), %rcx
	movq	_IWL_MVM_DQA_BSS_CLIENT_QUEUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, 4(%rcx,%rax,8)
	jne	LBB0_5
## %bb.4:
	movl	(%rcx,%rax,8), %ecx
	movq	_IWL_MVM_QUEUE_FREE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_6
LBB0_5:
	movl	4(%r15), %esi
	movq	_IWL_MVM_DQA_MIN_DATA_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IWL_MVM_DQA_MAX_DATA_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_iwl_mvm_find_free_queue
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_iwl_mvm_inactivity_check
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_8
LBB0_9:
	movq	_IWL_MVM_QUEUE_RESERVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%r12), %rdx
	movl	%eax, %esi
	movl	%ecx, (%rdx,%rsi,8)
	movl	%eax, (%r15)
	movl	4(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_IWL_DEBUG_TX_QUEUES
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_MVM_INVALID_STA,4,2        ## @IWL_MVM_INVALID_STA
	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
	.comm	_IWL_MVM_DQA_BSS_CLIENT_QUEUE,8,3 ## @IWL_MVM_DQA_BSS_CLIENT_QUEUE
	.comm	_IWL_MVM_QUEUE_FREE,4,2         ## @IWL_MVM_QUEUE_FREE
	.comm	_IWL_MVM_DQA_MIN_DATA_QUEUE,4,2 ## @IWL_MVM_DQA_MIN_DATA_QUEUE
	.comm	_IWL_MVM_DQA_MAX_DATA_QUEUE,4,2 ## @IWL_MVM_DQA_MAX_DATA_QUEUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No available queues for new station\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_IWL_MVM_QUEUE_RESERVED,4,2     ## @IWL_MVM_QUEUE_RESERVED
L_.str.1:                               ## @.str.1
	.asciz	"Reserving data queue #%d for sta_id %d\n"

	.no_dead_strip	_iwl_mvm_reserve_sta_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_reserve_sta_stream
_iwl_mvm_reserve_sta_stream:            ; @iwl_mvm_reserve_sta_stream
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_iwl_mvm_sta_from_mac80211
	mov	x20, x0
	mov	x0, x19
	bl	_iwl_mvm_has_new_tx_api
	bl	_WARN_ON
	cbnz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iwl_mvm_inactivity_check
Lloh3:
	adrp	x8, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x21]
	cbnz	w8, LBB0_5
; %bb.3:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _IWL_MVM_DQA_BSS_CLIENT_QUEUE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IWL_MVM_DQA_BSS_CLIENT_QUEUE@GOTPAGEOFF]
Lloh8:
	ldr	x2, [x9]
	add	x9, x8, x2, lsl #3
	ldr	w9, [x9, #4]
	cbnz	w9, LBB0_5
; %bb.4:
	lsl	x9, x2, #3
	ldr	w8, [x8, x9]
Lloh9:
	adrp	x9, _IWL_MVM_QUEUE_FREE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IWL_MVM_QUEUE_FREE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_6
LBB0_5:
	ldr	w1, [x20, #4]
Lloh12:
	adrp	x8, _IWL_MVM_DQA_MIN_DATA_QUEUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IWL_MVM_DQA_MIN_DATA_QUEUE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _IWL_MVM_DQA_MAX_DATA_QUEUE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IWL_MVM_DQA_MAX_DATA_QUEUE@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_iwl_mvm_find_free_queue
	mov	x2, x0
LBB0_6:
	tbz	w2, #31, LBB0_8
; %bb.7:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_iwl_mvm_inactivity_check
	mov	x2, x0
	tbnz	w0, #31, LBB0_11
LBB0_8:
Lloh18:
	adrp	x8, _IWL_MVM_QUEUE_RESERVED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IWL_MVM_QUEUE_RESERVED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	x9, [x19]
	mov	w10, w2
	lsl	x10, x10, #3
	str	w8, [x9, x10]
	str	w2, [x20]
	ldr	w3, [x20, #4]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_IWL_DEBUG_TX_QUEUES
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
Lloh25:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_MVM_INVALID_STA,4,2        ; @IWL_MVM_INVALID_STA
	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
	.comm	_IWL_MVM_DQA_BSS_CLIENT_QUEUE,8,3 ; @IWL_MVM_DQA_BSS_CLIENT_QUEUE
	.comm	_IWL_MVM_QUEUE_FREE,4,2         ; @IWL_MVM_QUEUE_FREE
	.comm	_IWL_MVM_DQA_MIN_DATA_QUEUE,4,2 ; @IWL_MVM_DQA_MIN_DATA_QUEUE
	.comm	_IWL_MVM_DQA_MAX_DATA_QUEUE,4,2 ; @IWL_MVM_DQA_MAX_DATA_QUEUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No available queues for new station\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_IWL_MVM_QUEUE_RESERVED,4,2     ; @IWL_MVM_QUEUE_RESERVED
l_.str.1:                               ; @.str.1
	.asciz	"Reserving data queue #%d for sta_id %d\n"

	.no_dead_strip	_iwl_mvm_reserve_sta_stream
.subsections_via_symbols
