	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76_init_stream_cap
_mt76_init_stream_cap:                  ## @mt76_init_stream_cap
	.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	%edx, %r15d
	movq	%rsi, %r14
	movl	(%rdi), %edi
	callq	_hweight8
	movq	_IEEE80211_HT_CAP_TX_STBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	orl	%ecx, 32(%r14)
	jmp	LBB0_3
LBB0_2:
	notl	%ecx
	andl	%ecx, 32(%r14)
LBB0_3:
	movq	_IEEE80211_HT_MCS_MASK_LEN@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_6
## %bb.4:
	movq	24(%r14), %rdx
	movslq	%eax, %rsi
	xorl	%edi, %edi
	movl	$255, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, %rdi
	movl	$0, %ecx
	cmovll	%ebx, %ecx
	movl	%ecx, (%rdx,%rdi,4)
	incq	%rdi
	movslq	(%r8), %rcx
	cmpq	%rcx, %rdi
	jl	LBB0_5
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.7:
	movq	_IEEE80211_VHT_CAP_TXSTBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.8:
	orl	%ecx, 16(%r14)
	jmp	LBB0_10
LBB0_9:
	notl	%ecx
	andl	%ecx, 16(%r14)
LBB0_10:
	movq	_IEEE80211_VHT_MCS_NOT_SUPPORTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_IEEE80211_VHT_MCS_SUPPORT_0_9@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %eax
	movl	%ebx, %edx
	cmovgl	%ecx, %edx
	cmpl	$2, %eax
	movl	%ebx, %esi
	cmovgel	%ecx, %esi
	shll	$2, %esi
	orl	%edx, %esi
	cmpl	$3, %eax
	movl	%ebx, %edx
	cmovgel	%ecx, %edx
	shll	$4, %edx
	cmpl	$4, %eax
	movl	%ebx, %edi
	cmovgel	%ecx, %edi
	shll	$6, %edi
	orl	%edx, %edi
	orl	%esi, %edi
	cmpl	$5, %eax
	movl	%ebx, %edx
	cmovgel	%ecx, %edx
	shll	$8, %edx
	cmpl	$6, %eax
	movl	%ebx, %esi
	cmovgel	%ecx, %esi
	shll	$10, %esi
	orl	%edx, %esi
	cmpl	$7, %eax
	movl	%ebx, %edx
	cmovgel	%ecx, %edx
	shll	$12, %edx
	orl	%esi, %edx
	orl	%edi, %edx
	cmpl	$8, %eax
	cmovgel	%ecx, %ebx
	shll	$14, %ebx
	orl	%edx, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r14)
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r14)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_HT_CAP_TX_STBC,4,2   ## @IEEE80211_HT_CAP_TX_STBC
	.comm	_IEEE80211_HT_MCS_MASK_LEN,4,2  ## @IEEE80211_HT_MCS_MASK_LEN
	.comm	_IEEE80211_VHT_CAP_TXSTBC,4,2   ## @IEEE80211_VHT_CAP_TXSTBC
	.comm	_IEEE80211_VHT_MCS_SUPPORT_0_9,4,2 ## @IEEE80211_VHT_MCS_SUPPORT_0_9
	.comm	_IEEE80211_VHT_MCS_NOT_SUPPORTED,4,2 ## @IEEE80211_VHT_MCS_NOT_SUPPORTED
	.no_dead_strip	_mt76_init_stream_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76_init_stream_cap
_mt76_init_stream_cap:                  ; @mt76_init_stream_cap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
	ldr	w0, [x0]
	bl	_hweight8
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _IEEE80211_HT_CAP_TX_STBC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_HT_CAP_TX_STBC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	w9, [x19, #32]
	orr	w8, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w9, [x19, #32]
	bic	w8, w9, w8
LBB0_3:
	str	w8, [x19, #32]
Lloh3:
	adrp	x8, _IEEE80211_HT_MCS_MASK_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_HT_MCS_MASK_LEN@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x9, #0
	ldr	x10, [x19, #24]
	sxtw	x11, w0
	mov	w12, #255
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x9, x11
	csel	w13, w12, wzr, lt
	str	w13, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x13, [x8]
	cmp	x9, x13
	b.lt	LBB0_5
LBB0_6:
	cbz	w20, LBB0_11
; %bb.7:
Lloh5:
	adrp	x8, _IEEE80211_VHT_CAP_TXSTBC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IEEE80211_VHT_CAP_TXSTBC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #2
	b.lt	LBB0_9
; %bb.8:
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	b	LBB0_10
LBB0_9:
	ldr	w9, [x19, #16]
	bic	w8, w9, w8
LBB0_10:
	str	w8, [x19, #16]
Lloh8:
	adrp	x8, _IEEE80211_VHT_MCS_NOT_SUPPORTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IEEE80211_VHT_MCS_NOT_SUPPORTED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _IEEE80211_VHT_MCS_SUPPORT_0_9@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IEEE80211_VHT_MCS_SUPPORT_0_9@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w0, #0
	csel	w10, w9, w8, gt
	cmp	w0, #1
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #2
	cmp	w0, #2
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #4
	cmp	w0, #3
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #6
	cmp	w0, #4
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #8
	cmp	w0, #5
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #10
	cmp	w0, #6
	csel	w11, w9, w8, gt
	orr	w10, w10, w11, lsl #12
	cmp	w0, #7
	csel	w8, w9, w8, gt
	orr	w20, w10, w8, lsl #14
	mov	x0, x20
	bl	_cpu_to_le16
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_cpu_to_le16
	str	x0, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_HT_CAP_TX_STBC,4,2   ; @IEEE80211_HT_CAP_TX_STBC
	.comm	_IEEE80211_HT_MCS_MASK_LEN,4,2  ; @IEEE80211_HT_MCS_MASK_LEN
	.comm	_IEEE80211_VHT_CAP_TXSTBC,4,2   ; @IEEE80211_VHT_CAP_TXSTBC
	.comm	_IEEE80211_VHT_MCS_SUPPORT_0_9,4,2 ; @IEEE80211_VHT_MCS_SUPPORT_0_9
	.comm	_IEEE80211_VHT_MCS_NOT_SUPPORTED,4,2 ; @IEEE80211_VHT_MCS_NOT_SUPPORTED
	.no_dead_strip	_mt76_init_stream_cap
.subsections_via_symbols
