	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_setup_htrates        ## -- Begin function ieee80211_setup_htrates
	.p2align	4, 0x90
_ieee80211_setup_htrates:               ## @ieee80211_setup_htrates
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	24(%rdi), %rcx
	movl	(%rcx), %esi
	movq	_IEEE80211_HTC_TXUNEQUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	testl	%eax, 4(%rcx)
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	cmpl	$2, %esi
	movl	$38, %ecx
	cmovll	%eax, %ecx
	movl	$52, %eax
	cmovlel	%ecx, %eax
	cmpl	$4, %esi
	movl	$76, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_3:
	movq	16(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	testq	%r13, %r13
	je	LBB0_17
## %bb.4:
	movq	_IEEE80211_HTRATE_MAXSIZE@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_17
## %bb.5:
	shll	$3, -48(%rbp)                   ## 4-byte Folded Spill
	movq	(%r13), %rax
	movq	_IEEE80211_ELEMID_VENDOR@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	sete	%r14b
	shlq	$2, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_IEEE80211_HTC_TXMCS32@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, 4(%rcx)
	je	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r15), %rax
	leal	1(%r8), %ecx
	movl	%ecx, (%r15)
	movl	%ebx, (%rax,%r8,4)
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jge	LBB0_17
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r14,8), %edi
	movl	%ebx, %esi
	callq	_isclr
	testq	%rax, %rax
	jne	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%r15), %r8
	cmpl	(%r12), %r8d
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$31, %ebx
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_16
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$32, %ebx
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	ja	LBB0_16
	jmp	LBB0_15
LBB0_8:
	movq	_IEEE80211_MSG_XRATE@GOTPCREL(%rip), %rax
	movq	_IEEE80211_MSG_11N@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rdx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_IEEE80211_NOTE
	incl	(%rbx)
LBB0_17:
	movq	%r15, %rdi
	movq	%r15, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_fix_rate             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_HTC_TXUNEQUAL,4,2    ## @IEEE80211_HTC_TXUNEQUAL
	.comm	_IEEE80211_ELEMID_VENDOR,8,3    ## @IEEE80211_ELEMID_VENDOR
	.comm	_IEEE80211_HTRATE_MAXSIZE,4,2   ## @IEEE80211_HTRATE_MAXSIZE
	.comm	_IEEE80211_MSG_XRATE,4,2        ## @IEEE80211_MSG_XRATE
	.comm	_IEEE80211_MSG_11N,4,2          ## @IEEE80211_MSG_11N
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING, HT rate set too large; only using %u rates"

	.comm	_IEEE80211_HTC_TXMCS32,4,2      ## @IEEE80211_HTC_TXMCS32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_setup_htrates        ; -- Begin function ieee80211_setup_htrates
	.p2align	2
_ieee80211_setup_htrates:               ; @ieee80211_setup_htrates
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	ldp	x21, x24, [x0, #16]
	ldp	w27, w8, [x24]
Lloh0:
	adrp	x9, _IEEE80211_HTC_TXUNEQUAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_HTC_TXUNEQUAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #38
	cmp	w27, #1
	csel	w10, w10, wzr, gt
	mov	w11, #52
	cmp	w27, #2
	csel	w10, w11, w10, gt
	mov	w11, #76
	cmp	w27, #3
	csel	w10, w11, w10, gt
	tst	w9, w8
	csel	w25, wzr, w10, eq
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	cbz	x23, LBB0_14
; %bb.1:
Lloh3:
	adrp	x26, _IEEE80211_HTRATE_MAXSIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _IEEE80211_HTRATE_MAXSIZE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	w22, #0
	lsl	w27, w27, #3
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _IEEE80211_ELEMID_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IEEE80211_ELEMID_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	add	x23, x23, x8, lsl #5
Lloh8:
	adrp	x28, _IEEE80211_HTC_TXMCS32@GOTPAGE
Lloh9:
	ldr	x28, [x28, _IEEE80211_HTC_TXMCS32@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x24, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #8]
	add	w9, w4, #1
	str	w9, [x20]
	str	w22, [x8, x4, lsl #2]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
	ldr	w8, [x26]
	cmp	w22, w8
	b.ge	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	mov	x1, x22
	bl	_isclr
	cbnz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x4, [x20]
	ldr	w8, [x26]
	cmp	w4, w8
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #31
	b.hi	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, w27
	b.ge	LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #32
	b.eq	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #33
	b.lo	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, w25
	b.hi	LBB0_5
	b	LBB0_4
LBB0_13:
Lloh10:
	adrp	x8, _IEEE80211_MSG_XRATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IEEE80211_MSG_XRATE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _IEEE80211_MSG_11N@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IEEE80211_MSG_11N@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_IEEE80211_NOTE
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_14:
	mov	x0, x20
	mov	x1, x20
	mov	x2, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ieee80211_fix_rate
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_HTC_TXUNEQUAL,4,2    ; @IEEE80211_HTC_TXUNEQUAL
	.comm	_IEEE80211_ELEMID_VENDOR,8,3    ; @IEEE80211_ELEMID_VENDOR
	.comm	_IEEE80211_HTRATE_MAXSIZE,4,2   ; @IEEE80211_HTRATE_MAXSIZE
	.comm	_IEEE80211_MSG_XRATE,4,2        ; @IEEE80211_MSG_XRATE
	.comm	_IEEE80211_MSG_11N,4,2          ; @IEEE80211_MSG_11N
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING, HT rate set too large; only using %u rates"

	.comm	_IEEE80211_HTC_TXMCS32,4,2      ; @IEEE80211_HTC_TXMCS32
.subsections_via_symbols
