	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getmaxrate
_getmaxrate:                            ## @getmaxrate
	.cfi_startproc
## %bb.0:
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_IEEE80211_RATE_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%esi, %ecx
	cmpl	$8, %esi
	jae	LBB0_4
## %bb.3:
	movl	$-1, %esi
	xorl	%edx, %edx
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	retq
LBB0_4:
	movl	%ecx, %edx
	andl	$-8, %edx
	movd	%r9d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rdx), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r8, %rax
	andq	$-2, %rax
	pcmpeqd	%xmm3, %xmm3
	xorl	%esi, %esi
	pcmpeqd	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rsi,4), %xmm5
	movdqu	16(%rdi,%rsi,4), %xmm6
	movdqu	32(%rdi,%rsi,4), %xmm1
	movdqu	48(%rdi,%rsi,4), %xmm2
	pand	%xmm0, %xmm5
	pmaxsd	%xmm3, %xmm5
	pand	%xmm0, %xmm6
	pmaxsd	%xmm4, %xmm6
	pand	%xmm0, %xmm1
	pmaxsd	%xmm5, %xmm1
	pand	%xmm0, %xmm2
	pmaxsd	%xmm6, %xmm2
	addq	$16, %rsi
	movdqa	%xmm1, %xmm3
	movdqa	%xmm2, %xmm4
	addq	$-2, %rax
	jne	LBB0_7
## %bb.8:
	testb	$1, %r8b
	je	LBB0_10
LBB0_9:
	movdqu	(%rdi,%rsi,4), %xmm3
	movdqu	16(%rdi,%rsi,4), %xmm4
	pand	%xmm0, %xmm3
	pmaxsd	%xmm3, %xmm1
	pand	%xmm0, %xmm4
	pmaxsd	%xmm4, %xmm2
LBB0_10:
	pmaxsd	%xmm2, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	pmaxsd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	pmaxsd	%xmm0, %xmm1
	movd	%xmm1, %esi
	cmpq	%rcx, %rdx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rdx,4), %eax
	andl	%r9d, %eax
	cmpl	%esi, %eax
	cmovgl	%eax, %esi
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_11
LBB0_12:
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	popq	%rbp
	retq
LBB0_5:
	pcmpeqd	%xmm1, %xmm1
	xorl	%esi, %esi
	pcmpeqd	%xmm2, %xmm2
	testb	$1, %r8b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_RATE_VAL,4,2         ## @IEEE80211_RATE_VAL
	.no_dead_strip	_getmaxrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getmaxrate
_getmaxrate:                            ; @getmaxrate
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _IEEE80211_RATE_VAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_RATE_VAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, w1
	cmp	w1, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	w11, #-1
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
	and	x10, x9, #0xfffffff0
	dup.4s	v0, w8
	add	x11, x0, #32
	movi.2d	v1, #0xffffffffffffffff
	mov	x12, x10
	movi.2d	v2, #0xffffffffffffffff
	movi.2d	v3, #0xffffffffffffffff
	movi.2d	v4, #0xffffffffffffffff
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x11, #-32]
	ldp	q7, q16, [x11], #64
	and.16b	v5, v0, v5
	and.16b	v6, v0, v6
	and.16b	v7, v0, v7
	and.16b	v16, v0, v16
	smax.4s	v1, v5, v1
	smax.4s	v2, v6, v2
	smax.4s	v3, v7, v3
	smax.4s	v4, v16, v4
	subs	x12, x12, #16
	b.ne	LBB0_5
; %bb.6:
	smax.4s	v0, v1, v2
	smax.4s	v0, v0, v3
	smax.4s	v0, v0, v4
	smaxv.4s	s0, v0
	fmov	w11, s0
	cmp	x10, x9
	b.eq	LBB0_9
LBB0_7:
	add	x12, x0, x10, lsl #2
	sub	x9, x9, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x12], #4
	and	w10, w8, w10
	cmp	w10, w11
	csel	w11, w10, w11, gt
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	cmp	w11, #0
	cinc	w8, w11, lt
	asr	w0, w8, #1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_RATE_VAL,4,2         ; @IEEE80211_RATE_VAL
	.no_dead_strip	_getmaxrate
.subsections_via_symbols
