	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_get_lower_rate
_rs_get_lower_rate:                     ## @rs_get_lower_rate
	.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	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r14
	movl	(%rsi), %edi
	callq	_is_legacy
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	testq	%r15, %r15
	je	LBB0_5
## %bb.3:
	testq	%rbx, %rbx
	je	LBB0_5
LBB0_1:
	movb	$1, %r14b
LBB0_11:
	movl	(%r12), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_rs_get_supported_rates
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	8(%r13), %rcx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	movl	16(%r13), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_14
## %bb.13:
	movq	_IWL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
LBB0_14:
	andl	%eax, %ebx
LBB0_15:
	testb	%r14b, %r14b
	jne	LBB0_17
## %bb.16:
	btl	%r15d, %ebx
	jb	LBB0_18
LBB0_17:
	movq	24(%r13), %rdi
	movl	(%r12), %ecx
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_rs_get_adjacent_rate
	movzbl	%al, %eax
	movq	_IWL_RATE_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	cmovnel	%eax, %r15d
LBB0_18:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%r13), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rate_n_flags_from_tbl          ## TAILCALL
LBB0_5:
	movq	_rs_ht_to_legacy@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r13), %rcx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	movq	_LQ_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	movq	_LQ_G@GOTPCREL(%rip), %rcx
LBB0_8:
	movq	(%rax,%r15,8), %r15
	movl	(%rcx), %eax
	movl	%eax, (%r12)
	movl	24(%r12), %edi
	callq	_num_of_ant
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.9:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_first_antenna
	movl	%eax, 24(%r12)
LBB0_10:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r12)
	movq	_IWL_MAX_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_rs_ht_to_legacy,8,3            ## @rs_ht_to_legacy
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_LQ_A,4,2                       ## @LQ_A
	.comm	_LQ_G,4,2                       ## @LQ_G
	.comm	_IWL_MAX_SEARCH,4,2             ## @IWL_MAX_SEARCH
	.comm	_IWL_FIRST_OFDM_RATE,4,2        ## @IWL_FIRST_OFDM_RATE
	.comm	_IWL_RATE_INVALID,4,2           ## @IWL_RATE_INVALID
	.no_dead_strip	_rs_get_lower_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_get_lower_rate
_rs_get_lower_rate:                     ; @rs_get_lower_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x20, [x0]
	ldr	x24, [x0, #24]
	ldr	w0, [x1]
	bl	_is_legacy
	cbnz	x0, LBB0_3
; %bb.1:
	cbz	x19, LBB0_12
; %bb.2:
	cbz	x23, LBB0_12
LBB0_3:
	mov	w24, #1
LBB0_4:
	ldr	w2, [x21]
	mov	x0, x22
	mov	x1, #0
	bl	_rs_get_supported_rates
	mov	x23, x0
	ldr	w0, [x21]
	bl	_is_legacy
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x9, [x22, #8]
Lloh0:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x22, #16]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x9, _IWL_FIRST_OFDM_RATE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IWL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
LBB0_7:
	and	w23, w8, w23
LBB0_8:
	tbnz	w24, #0, LBB0_10
; %bb.9:
	lsr	w8, w23, w19
	tbnz	w8, #0, LBB0_11
LBB0_10:
	ldr	x0, [x22, #24]
	ldr	w3, [x21]
	mov	x1, x19
	mov	x2, x23
	bl	_rs_get_adjacent_rate
	and	w8, w0, #0xff
Lloh6:
	adrp	x9, _IWL_RATE_INVALID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IWL_RATE_INVALID@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w19, w19, w8, eq
LBB0_11:
	ldr	x0, [x22, #24]
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rate_n_flags_from_tbl
LBB0_12:
Lloh9:
	adrp	x8, _rs_ht_to_legacy@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rs_ht_to_legacy@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x19, [x8, x19, lsl #3]
	ldr	x8, [x22, #8]
Lloh12:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh14:
	adrp	x10, _LQ_A@GOTPAGE
Lloh15:
	ldr	x10, [x10, _LQ_A@GOTPAGEOFF]
Lloh16:
	adrp	x11, _LQ_G@GOTPAGE
Lloh17:
	ldr	x11, [x11, _LQ_G@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	w0, [x21, #24]
	bl	_num_of_ant
	cmp	w0, #2
	b.lt	LBB0_14
; %bb.13:
	ldr	x8, [x24]
	ldr	w0, [x8]
	bl	_first_antenna
	str	w0, [x21, #24]
LBB0_14:
	mov	w24, #0
	stp	xzr, xzr, [x21, #8]
Lloh19:
	adrp	x8, _IWL_MAX_SEARCH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IWL_MAX_SEARCH@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh18
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_rs_ht_to_legacy,8,3            ; @rs_ht_to_legacy
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_LQ_A,4,2                       ; @LQ_A
	.comm	_LQ_G,4,2                       ; @LQ_G
	.comm	_IWL_MAX_SEARCH,4,2             ; @IWL_MAX_SEARCH
	.comm	_IWL_FIRST_OFDM_RATE,4,2        ; @IWL_FIRST_OFDM_RATE
	.comm	_IWL_RATE_INVALID,4,2           ; @IWL_RATE_INVALID
	.no_dead_strip	_rs_get_lower_rate
.subsections_via_symbols
