	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_stf_txcore_set
_brcms_c_stf_txcore_set:                ## @brcms_c_stf_txcore_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	24(%rdi), %rax
	movq	32(%rdi), %rcx
	movl	(%rax), %edi
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rcx
	movq	%r12, %r8
	callq	_brcms_dbg_ht
	movq	%r12, %rdi
	callq	_hweight8
	movq	16(%r15), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	cmovleq	%r12, %rbx
	movq	%rbx, %rdi
	callq	_hweight8
	movq	16(%r15), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rdx), %rax
	movq	%rax, %rcx
	testq	%rbx, %rax
	movq	%rbx, %rsi
	cmoveq	%rax, %rsi
	notq	%rcx
	testq	%rcx, %rbx
	cmovneq	%rax, %rsi
	movq	%rsi, %rbx
LBB0_2:
	movq	16(%rdx), %rax
	movq	%rbx, (%rax,%r14,8)
	cmpq	$1, %r14
	jne	LBB0_5
## %bb.3:
	movq	_PHY_TXC_ANT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	movq	%rbx, 24(%rdx)
	movq	24(%r15), %rdi
	movq	%rbx, %rsi
	callq	_brcms_b_txant_set
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_brcms_c_suspend_mac_and_wait
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_brcms_c_beacon_phytxctl_txant_upd
	movq	%r15, %rdi
	callq	_brcms_c_enable_mac
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d: Nsts %d core_mask %x\n"

	.comm	_PHY_TXC_ANT_SHIFT,8,3          ## @PHY_TXC_ANT_SHIFT
	.no_dead_strip	_brcms_c_stf_txcore_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_stf_txcore_set
_brcms_c_stf_txcore_set:                ; @brcms_c_stf_txcore_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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x8, x9, [x0, #24]
	ldr	w0, [x8]
	ldr	w2, [x9]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x21
	bl	_brcms_dbg_ht
	mov	x0, x21
	bl	_hweight8
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cmp	x0, x8
	csel	x21, xzr, x21, gt
	mov	x0, x21
	bl	_hweight8
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
	cmp	x0, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x8, #8]
	bic	x10, x21, x9
	tst	x9, x21
	ccmp	x10, #0, #0, ne
	csel	x21, x9, x21, ne
LBB0_2:
	ldr	x9, [x8, #16]
	str	x21, [x9, x20, lsl #3]
	cmp	x20, #1
	b.ne	LBB0_5
; %bb.3:
Lloh2:
	adrp	x9, _PHY_TXC_ANT_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PHY_TXC_ANT_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	lsl	x1, x21, x9
	str	x1, [x8, #24]
	ldr	x0, [x19, #24]
	bl	_brcms_b_txant_set
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_brcms_c_suspend_mac_and_wait
	ldr	w1, [x19]
	mov	x0, x19
	bl	_brcms_c_beacon_phytxctl_txant_upd
	mov	x0, x19
	bl	_brcms_c_enable_mac
LBB0_5:
	mov	w0, #0
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d: Nsts %d core_mask %x\n"

	.comm	_PHY_TXC_ANT_SHIFT,8,3          ; @PHY_TXC_ANT_SHIFT
	.no_dead_strip	_brcms_c_stf_txcore_set
.subsections_via_symbols
