	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_switch_to_mimo2
_rs_switch_to_mimo2:                    ## @rs_switch_to_mimo2
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	(%rsi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	16(%rcx), %rax
	movq	(%rax), %r14
	movq	%rdx, %rdi
	callq	_conf_is_ht
	movl	$-1, %edx
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	cmpl	$0, 8(%r13)
	je	LBB0_8
## %bb.2:
	movq	(%r13), %rax
	movq	_IEEE80211_SMPS_STATIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.3:
	cmpl	$2, (%r12)
	jl	LBB0_8
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_RATE
	movq	_LQ_MIMO2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %r12
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 28(%r12)
	movl	8(%r15), %eax
	movl	%eax, 24(%r12)
	movq	$0, 16(%r12)
	movq	_IWL_MAX_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movl	4(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_iwl_is_ht40_tx_allowed
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, (%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_rs_set_expected_tpt_table
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	%r12, %rdx
	movl	%r15d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_rs_get_best_rate
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %r13
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_RATE
	movq	_IWL_RATE_INVALID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_6
## %bb.5:
	btl	%r14d, %r15d
	jae	LBB0_6
## %bb.7:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_rate_n_flags_from_tbl
	movl	%eax, 4(%r12)
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_RATE
	xorl	%edx, %edx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_RATE
	movl	$-1, %edx
LBB0_8:
	movl	%edx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_SMPS_STATIC,8,3      ## @IEEE80211_SMPS_STATIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LQ: try to switch to MIMO2\n"

	.comm	_LQ_MIMO2,4,2                   ## @LQ_MIMO2
	.comm	_IWL_MAX_SEARCH,4,2             ## @IWL_MAX_SEARCH
L_.str.1:                               ## @.str.1
	.asciz	"LQ: MIMO2 best rate %d mask %X\n"

	.comm	_IWL_RATE_INVALID,4,2           ## @IWL_RATE_INVALID
L_.str.2:                               ## @.str.2
	.asciz	"Can't switch with index %d rate mask %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"LQ: Switch to new mcs %X index is green %X\n"

	.no_dead_strip	_rs_switch_to_mimo2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_switch_to_mimo2
_rs_switch_to_mimo2:                    ; @rs_switch_to_mimo2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x5
	mov	x20, x4
	mov	x24, x3
	mov	x23, x1
	mov	x19, x0
	ldr	w21, [x1]
	ldr	x8, [x3, #16]
	ldr	x26, [x8]
	mov	x0, x2
	bl	_conf_is_ht
	cbz	w0, LBB0_8
; %bb.1:
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _IEEE80211_SMPS_STATIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_SMPS_STATIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_RATE
Lloh5:
	adrp	x8, _LQ_MIMO2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LQ_MIMO2@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldp	w25, w9, [x23, #4]
	stp	w9, w8, [x20, #24]
	str	xzr, [x20, #16]
Lloh8:
	adrp	x8, _IWL_MAX_SEARCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IWL_MAX_SEARCH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x19
	mov	x1, x26
	mov	x2, x24
	bl	_iwl_is_ht40_tx_allowed
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x20]
	mov	x0, x23
	mov	x1, x20
	bl	_rs_set_expected_tpt_table
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	mov	x3, x25
	mov	x4, x22
	bl	_rs_get_best_rate
	mov	x22, x0
	stp	x22, x25, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_RATE
Lloh13:
	adrp	x8, _IWL_RATE_INVALID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IWL_RATE_INVALID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w22, w8
	b.eq	LBB0_7
; %bb.5:
	lsr	w8, w25, w22
	tbz	w8, #0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_rate_n_flags_from_tbl
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x20, #4]
	stp	x0, x21, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_RATE
	mov	w0, #0
	b	LBB0_9
LBB0_7:
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	stp	x22, x25, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_RATE
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_SMPS_STATIC,8,3      ; @IEEE80211_SMPS_STATIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LQ: try to switch to MIMO2\n"

	.comm	_LQ_MIMO2,4,2                   ; @LQ_MIMO2
	.comm	_IWL_MAX_SEARCH,4,2             ; @IWL_MAX_SEARCH
l_.str.1:                               ; @.str.1
	.asciz	"LQ: MIMO2 best rate %d mask %X\n"

	.comm	_IWL_RATE_INVALID,4,2           ; @IWL_RATE_INVALID
l_.str.2:                               ; @.str.2
	.asciz	"Can't switch with index %d rate mask %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"LQ: Switch to new mcs %X index is green %X\n"

	.no_dead_strip	_rs_switch_to_mimo2
.subsections_via_symbols
