	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_hwrate_to_plcp_idx
_il4965_hwrate_to_plcp_idx:             ## @il4965_hwrate_to_plcp_idx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_RATE_MCS_HT_MSK@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_1
## %bb.5:
	movzbl	%bl, %eax
	movq	_RATE_MIMO2_6M_PLCP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	cmovgel	%ecx, %edx
	subl	%edx, %eax
	movq	_IL_FIRST_OFDM_RATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	movq	_RATE_9M_IDX@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpl	(%rdx), %eax
	setge	%bl
	addl	%eax, %ebx
	cmpl	%ecx, %ebx
	jl	LBB0_7
## %bb.6:
	movq	_IL_LAST_OFDM_RATE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jle	LBB0_8
	jmp	LBB0_7
LBB0_1:
	movq	_il_rates@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.2:
	movzbl	%bl, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpl	%r15d, (%rdi,%rbx,4)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_7:
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_MCS_HT_MSK,4,2            ## @RATE_MCS_HT_MSK
	.comm	_RATE_MIMO2_6M_PLCP,4,2         ## @RATE_MIMO2_6M_PLCP
	.comm	_IL_FIRST_OFDM_RATE,4,2         ## @IL_FIRST_OFDM_RATE
	.comm	_RATE_9M_IDX,4,2                ## @RATE_9M_IDX
	.comm	_IL_LAST_OFDM_RATE,4,2          ## @IL_LAST_OFDM_RATE
	.comm	_il_rates,8,3                   ## @il_rates
	.no_dead_strip	_il4965_hwrate_to_plcp_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_hwrate_to_plcp_idx
_il4965_hwrate_to_plcp_idx:             ; @il4965_hwrate_to_plcp_idx
	.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	x20, x0
Lloh0:
	adrp	x8, _RATE_MCS_HT_MSK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RATE_MCS_HT_MSK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	and	w8, w20, #0xff
Lloh3:
	adrp	x9, _RATE_MIMO2_6M_PLCP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RATE_MIMO2_6M_PLCP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w9, wzr, w9, lt
Lloh6:
	adrp	x10, _IL_FIRST_OFDM_RATE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IL_FIRST_OFDM_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	sub	w8, w8, w9
	add	w8, w8, w10
Lloh9:
	adrp	x9, _RATE_9M_IDX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RATE_9M_IDX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	cinc	w19, w8, ge
Lloh12:
	adrp	x8, _IL_LAST_OFDM_RATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IL_LAST_OFDM_RATE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w19, w10
	ccmp	w19, w8, #0, ge
	b.gt	LBB0_6
	b	LBB0_7
LBB0_2:
Lloh15:
	adrp	x21, _il_rates@GOTPAGE
Lloh16:
	ldr	x21, [x21, _il_rates@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x19, #0
	and	w20, w20, #0xff
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	w8, [x0, x19, lsl #2]
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	bl	_ARRAY_SIZE
	cmp	x19, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
	mov	w19, #-1
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_MCS_HT_MSK,4,2            ; @RATE_MCS_HT_MSK
	.comm	_RATE_MIMO2_6M_PLCP,4,2         ; @RATE_MIMO2_6M_PLCP
	.comm	_IL_FIRST_OFDM_RATE,4,2         ; @IL_FIRST_OFDM_RATE
	.comm	_RATE_9M_IDX,4,2                ; @RATE_9M_IDX
	.comm	_IL_LAST_OFDM_RATE,4,2          ; @IL_LAST_OFDM_RATE
	.comm	_il_rates,8,3                   ; @il_rates
	.no_dead_strip	_il4965_hwrate_to_plcp_idx
.subsections_via_symbols
