	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_redirect_queue
_iwl_mvm_redirect_queue:                ## @iwl_mvm_redirect_queue
	.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
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	%esi, -80(%rbp)
	movq	_SCD_CFG_DISABLE_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	callq	_iwl_mvm_has_new_tx_api
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_2:
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movq	8(%r13), %rax
	movslq	%ebx, %r15
	shlq	$4, %r15
	movl	(%rax,%r15), %ecx
	cmpl	$0, 16(%rbp)
	movq	%r13, %rdi
	jne	LBB0_5
## %bb.3:
	cmpl	%r14d, %ecx
	jl	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_TX_QUEUES
	jmp	LBB0_12
LBB0_5:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movslq	%ecx, %rcx
	movl	12(%rax,%r15), %edx
	movl	%edx, -72(%rbp)
	movq	%rdi, %r12
	movq	_iwl_mvm_ac_to_tx_fifo@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, -68(%rbp)
	movl	4(%rax,%r15), %ecx
	movl	%ecx, -76(%rbp)
	movl	8(%rax,%r15), %edi
	callq	_hweight16
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r13), %rax
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movslq	%r14d, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_TX_QUEUES
	movq	24(%rbp), %rax
	movl	$1, (%rax)
	movq	%r12, %r14
	movl	(%r12), %r12d
	movl	%ebx, %edi
	callq	_BIT
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_iwl_trans_wait_tx_queues_empty
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_IWL_ERR
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	24(%rbp), %r15
	jmp	LBB0_11
LBB0_7:
	movl	(%r14), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_iwl_trans_txq_disable
	movq	_SCD_QUEUE_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %r8
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$20, %ecx
	callq	_iwl_mvm_send_cmd_pdu
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_IWL_ERR
LBB0_9:
	movl	(%r14), %edi
	movl	%ebx, %esi
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	callq	_iwl_trans_txq_enable_cfg
	movq	8(%r14), %rax
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, 4(%rax,%r15)
	movq	_iwl_mvm_ac_to_tx_fifo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %edx
	movl	-72(%rbp), %ecx
	movq	_IWL_FRAME_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r12d, (%rsp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_iwl_mvm_reconfig_scd
	movq	8(%r14), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%r15)
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	movq	24(%rbp), %r15
	jl	LBB0_11
## %bb.10:
	movl	(%r14), %edi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_iwl_trans_txq_set_shared_mode
LBB0_11:
	movl	$0, (%r15)
LBB0_12:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCD_CFG_DISABLE_QUEUE,4,2      ## @SCD_CFG_DISABLE_QUEUE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No redirection needed on TXQ #%d\n"

	.comm	_iwl_mvm_ac_to_tx_fifo,8,3      ## @iwl_mvm_ac_to_tx_fifo
L_.str.1:                               ## @.str.1
	.asciz	"Redirecting TXQ #%d to FIFO #%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error draining queue %d before reconfig\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SCD_QUEUE_CFG,4,2              ## @SCD_QUEUE_CFG
L_.str.3:                               ## @.str.3
	.asciz	"Failed SCD disable TXQ %d (ret=%d)\n"

	.comm	_IWL_FRAME_LIMIT,4,2            ## @IWL_FRAME_LIMIT
	.no_dead_strip	_iwl_mvm_redirect_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_redirect_queue
_iwl_mvm_redirect_queue:                ; @iwl_mvm_redirect_queue
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x26, x6
	mov	x25, x5
	mov	x23, x4
	mov	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _SCD_CFG_DISABLE_QUEUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCD_CFG_DISABLE_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w1, [sp, #24]
	str	w8, [sp, #40]
	bl	_iwl_mvm_has_new_tx_api
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_12
LBB0_2:
	ldr	x8, [x21, #8]
	sbfiz	x9, x20, #4, #32
	ldr	w9, [x8, x9]
	cbnz	w26, LBB0_5
; %bb.3:
	cmp	w9, w22
	b.lt	LBB0_5
; %bb.4:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_DEBUG_TX_QUEUES
	mov	w27, #0
	b	LBB0_12
LBB0_5:
	sxtw	x28, w20
	sxtw	x9, w9
	add	x8, x8, x28, lsl #4
	ldr	w10, [x8, #12]
	str	w10, [sp, #32]
Lloh8:
	adrp	x27, _iwl_mvm_ac_to_tx_fifo@GOTPAGE
Lloh9:
	ldr	x27, [x27, _iwl_mvm_ac_to_tx_fifo@GOTPAGEOFF]
	ldr	x10, [x27]
	ldr	w9, [x10, x9, lsl #2]
	str	w9, [sp, #36]
	ldr	w9, [x8, #4]
	str	w9, [sp, #28]
	ldr	w0, [x8, #8]
	bl	_hweight16
	mov	x26, x0
	ldr	x8, [x27]
	ldr	w8, [x8, w22, sxtw #2]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_DEBUG_TX_QUEUES
	mov	w8, #1
	str	w8, [x19]
	ldr	w27, [x21]
	mov	x0, x20
	bl	_BIT
	mov	x1, x0
	mov	x0, x27
	bl	_iwl_trans_wait_tx_queues_empty
	cbz	w0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_ERR
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_11
LBB0_7:
	sxtw	x8, w22
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	w0, [x21]
	mov	x1, x20
	mov	w2, #0
	bl	_iwl_trans_txq_disable
Lloh17:
	adrp	x8, _SCD_QUEUE_CFG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCD_QUEUE_CFG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x4, sp, #24
	mov	x0, x21
	mov	w2, #0
	mov	w3, #20
	bl	_iwl_mvm_send_cmd_pdu
	mov	x27, x0
	cbz	w0, LBB0_9
; %bb.8:
	str	x27, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_IWL_ERR
LBB0_9:
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x23
	mov	x3, #0
	mov	x4, x25
	bl	_iwl_trans_txq_enable_cfg
	ldr	x8, [x21, #8]
	lsl	x25, x28, #4
	add	x8, x8, x25
	str	w24, [x8, #4]
Lloh22:
	adrp	x8, _iwl_mvm_ac_to_tx_fifo@GOTPAGE
Lloh23:
	ldr	x8, [x8, _iwl_mvm_ac_to_tx_fifo@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w2, [x8, x9, lsl #2]
	ldr	w3, [sp, #32]
Lloh25:
	adrp	x8, _IWL_FRAME_LIMIT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IWL_FRAME_LIMIT@GOTPAGEOFF]
Lloh27:
	ldr	w5, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x4, x24
	mov	x6, x23
	bl	_iwl_mvm_reconfig_scd
	ldr	x8, [x21, #8]
	str	w22, [x8, x25]
	cmp	w26, #2
	b.lt	LBB0_11
; %bb.10:
	ldr	w0, [x21]
	mov	x1, x20
	mov	w2, #1
	bl	_iwl_trans_txq_set_shared_mode
LBB0_11:
	str	wzr, [x19]
LBB0_12:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SCD_CFG_DISABLE_QUEUE,4,2      ; @SCD_CFG_DISABLE_QUEUE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No redirection needed on TXQ #%d\n"

	.comm	_iwl_mvm_ac_to_tx_fifo,8,3      ; @iwl_mvm_ac_to_tx_fifo
l_.str.1:                               ; @.str.1
	.asciz	"Redirecting TXQ #%d to FIFO #%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error draining queue %d before reconfig\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SCD_QUEUE_CFG,4,2              ; @SCD_QUEUE_CFG
l_.str.3:                               ; @.str.3
	.asciz	"Failed SCD disable TXQ %d (ret=%d)\n"

	.comm	_IWL_FRAME_LIMIT,4,2            ; @IWL_FRAME_LIMIT
	.no_dead_strip	_iwl_mvm_redirect_queue
.subsections_via_symbols
