	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_stf_txchain_set        ## -- Begin function brcms_c_stf_txchain_set
	.p2align	4, 0x90
_brcms_c_stf_txchain_set:               ## @brcms_c_stf_txchain_set
	.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	(%rdi), %rax
	xorl	%r14d, %r14d
	cmpq	%rsi, (%rax)
	je	LBB0_11
## %bb.1:
	movq	%rsi, %rbx
	movq	8(%rax), %rax
	movq	%rax, %rcx
	notq	%rcx
	testq	%rsi, %rcx
	jne	LBB0_3
## %bb.2:
	andq	%rbx, %rax
	je	LBB0_3
## %bb.4:
	movq	%rdi, %r15
	movq	%rbx, %rdi
	callq	_hweight8
	movq	_MAX_STREAMS_SUPPORTED@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jbe	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %rcx
	movq	%rbx, (%rcx)
	movq	%rax, 16(%rcx)
	movq	8(%r15), %rax
	movl	4(%rax), %esi
	movq	%r15, %rdi
	callq	_brcms_c_stf_stbc_tx_set
	movq	16(%r15), %rax
	movq	_BAND_2G_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	callq	_brcms_c_stf_ss_update
	movq	16(%r15), %rax
	movq	_BAND_5G_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	callq	_brcms_c_stf_ss_update
	movq	(%r15), %rax
	cmpq	$1, 16(%rax)
	jne	LBB0_6
## %bb.7:
	movq	_ANT_TX_FORCE_0@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	movq	_ANT_TX_DEF@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rax)
	movq	%r15, %rdi
	callq	__brcms_c_stf_phy_txant_upd
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movl	(%rcx), %edi
	movq	(%rax), %rsi
	movl	24(%rax), %edx
	callq	_wlc_phy_stf_chain_set
	cmpq	$0, (%r12)
	je	LBB0_11
## %bb.9:
	movl	$1, %ebx
	movq	_txcore_default@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_brcms_c_stf_txcore_set
	incq	%rbx
	cmpq	(%r12), %rbx
	jbe	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_STREAMS_SUPPORTED,8,3      ## @MAX_STREAMS_SUPPORTED
	.comm	_BAND_2G_INDEX,8,3              ## @BAND_2G_INDEX
	.comm	_BAND_5G_INDEX,8,3              ## @BAND_5G_INDEX
	.comm	_ANT_TX_FORCE_0,4,2             ## @ANT_TX_FORCE_0
	.comm	_ANT_TX_DEF,4,2                 ## @ANT_TX_DEF
	.comm	_txcore_default,8,3             ## @txcore_default
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_stf_txchain_set        ; -- Begin function brcms_c_stf_txchain_set
	.p2align	2
_brcms_c_stf_txchain_set:               ; @brcms_c_stf_txchain_set
	.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
	ldr	x8, [x0]
	ldr	x9, [x8]
	cmp	x9, x1
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	mov	x20, x1
	ldr	x8, [x8, #8]
	bic	x9, x1, x8
	and	x8, x8, x1
	cmp	x9, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_4
; %bb.3:
	mov	x19, x0
	mov	x0, x20
	bl	_hweight8
Lloh0:
	adrp	x21, _MAX_STREAMS_SUPPORTED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_STREAMS_SUPPORTED@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ls	LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
LBB0_6:
	ldp	x8, x9, [x19]
	str	x20, [x8]
	str	x0, [x8, #16]
	ldr	w1, [x9, #4]
	mov	x0, x19
	bl	_brcms_c_stf_stbc_tx_set
	ldr	x8, [x19, #16]
Lloh5:
	adrp	x9, _BAND_2G_INDEX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BAND_2G_INDEX@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_brcms_c_stf_ss_update
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _BAND_5G_INDEX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BAND_5G_INDEX@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_brcms_c_stf_ss_update
	ldr	x8, [x19]
	ldr	x9, [x8, #16]
Lloh11:
	adrp	x10, _ANT_TX_FORCE_0@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ANT_TX_FORCE_0@GOTPAGEOFF]
Lloh13:
	adrp	x11, _ANT_TX_DEF@GOTPAGE
Lloh14:
	ldr	x11, [x11, _ANT_TX_DEF@GOTPAGEOFF]
	cmp	x9, #1
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	str	w9, [x8, #28]
	mov	x0, x19
	bl	__brcms_c_stf_phy_txant_upd
	ldp	x9, x8, [x19]
	ldr	w0, [x8]
	ldr	x1, [x9]
	ldr	w2, [x9, #24]
	bl	_wlc_phy_stf_chain_set
	ldr	x8, [x21]
	cbz	x8, LBB0_1
; %bb.7:
	mov	w20, #1
Lloh15:
	adrp	x22, _txcore_default@GOTPAGE
Lloh16:
	ldr	x22, [x22, _txcore_default@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	w2, [x8, x20, lsl #2]
	mov	x0, x19
	mov	x1, x20
	bl	_brcms_c_stf_txcore_set
	add	x20, x20, #1
	ldr	x8, [x21]
	cmp	x20, x8
	b.ls	LBB0_8
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_STREAMS_SUPPORTED,8,3      ; @MAX_STREAMS_SUPPORTED
	.comm	_BAND_2G_INDEX,8,3              ; @BAND_2G_INDEX
	.comm	_BAND_5G_INDEX,8,3              ; @BAND_5G_INDEX
	.comm	_ANT_TX_FORCE_0,4,2             ; @ANT_TX_FORCE_0
	.comm	_ANT_TX_DEF,4,2                 ; @ANT_TX_DEF
	.comm	_txcore_default,8,3             ; @txcore_default
.subsections_via_symbols
