	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_phytxctl1_calc
_brcms_c_phytxctl1_calc:                ## @brcms_c_phytxctl1_calc
	.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	%rsi, %r14
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_BRCMS_ISLCNPHY
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_PHY_TXC1_BW_20MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	callq	_rspec_get_bw
	movl	%eax, %r12d
	movq	_PHY_TXC1_BW_20MHZ@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jge	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_brcms_err
	movl	(%rbx), %r12d
LBB0_4:
	movq	%r14, %rdi
	callq	_is_mcs_rate
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_RSPEC_RATE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	andq	%r14, %rbx
	movq	%r14, %rdi
	callq	_rspec_phytxbyte2
	movl	%eax, %r12d
	movq	_mcs_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %ebx
	shll	$8, %ebx
	jmp	LBB0_13
LBB0_6:
	movq	%r14, %rdi
	callq	_is_cck_rate
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movl	8(%r15), %edi
	callq	_BRCMS_ISLCNPHY
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movl	8(%r15), %edi
	callq	_BRCMS_ISSSLPNPHY
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_rspec2rate
	movl	%eax, %edi
	callq	_brcms_c_rate_legacy_phyctl
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.11:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_brcms_err
LBB0_12:
	shll	$8, %ebx
	orl	%r12d, %ebx
	movq	%r14, %rdi
	callq	_rspec_stf
	movl	%eax, %r12d
	movq	_PHY_TXC1_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
LBB0_13:
	orl	%ebx, %r12d
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	callq	_rspec_stf
	movl	%eax, %ebx
	movq	_PHY_TXC1_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_TXC1_BW_20MHZ,4,2          ## @PHY_TXC1_BW_20MHZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phytxctl1_calc: bw %d is not supported yet, set to 20L\n"

	.comm	_RSPEC_RATE_MASK,8,3            ## @RSPEC_RATE_MASK
	.comm	_mcs_table,8,3                  ## @mcs_table
	.comm	_PHY_TXC1_MODE_SHIFT,4,2        ## @PHY_TXC1_MODE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"phytxctl1_calc: wrong legacy OFDM/CCK rate\n"

	.no_dead_strip	_brcms_c_phytxctl1_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_phytxctl1_calc
_brcms_c_phytxctl1_calc:                ; @brcms_c_phytxctl1_calc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_BRCMS_ISLCNPHY
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PHY_TXC1_BW_20MHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_TXC1_BW_20MHZ@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_rspec_get_bw
	mov	x20, x0
Lloh3:
	adrp	x22, _PHY_TXC1_BW_20MHZ@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PHY_TXC1_BW_20MHZ@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ge	LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	w0, [x8]
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_err
	ldr	w20, [x22]
LBB0_4:
	mov	x0, x19
	bl	_is_mcs_rate
	cbz	x0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _RSPEC_RATE_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RSPEC_RATE_MASK@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	and	x21, x8, x19
	mov	x0, x19
	bl	_rspec_phytxbyte2
	mov	x20, x0
Lloh10:
	adrp	x8, _mcs_table@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mcs_table@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w8, [x8, x21, lsl #2]
	lsl	w21, w8, #8
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_is_cck_rate
	cbz	x0, LBB0_9
; %bb.7:
	ldr	w0, [x21, #8]
	bl	_BRCMS_ISLCNPHY
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x21, #8]
	bl	_BRCMS_ISSSLPNPHY
	cbz	w0, LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_rspec2rate
	bl	_brcms_c_rate_legacy_phyctl
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcms_err
	mov	w0, #0
LBB0_11:
	orr	w21, w20, w0, lsl #8
	mov	x0, x19
	bl	_rspec_stf
Lloh15:
	adrp	x8, _PHY_TXC1_MODE_SHIFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PHY_TXC1_MODE_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	lsl	w20, w0, w8
LBB0_12:
	orr	w0, w21, w20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	mov	x0, x19
	bl	_rspec_stf
Lloh18:
	adrp	x8, _PHY_TXC1_MODE_SHIFT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PHY_TXC1_MODE_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w21, w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_TXC1_BW_20MHZ,4,2          ; @PHY_TXC1_BW_20MHZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phytxctl1_calc: bw %d is not supported yet, set to 20L\n"

	.comm	_RSPEC_RATE_MASK,8,3            ; @RSPEC_RATE_MASK
	.comm	_mcs_table,8,3                  ; @mcs_table
	.comm	_PHY_TXC1_MODE_SHIFT,4,2        ; @PHY_TXC1_MODE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"phytxctl1_calc: wrong legacy OFDM/CCK rate\n"

	.no_dead_strip	_brcms_c_phytxctl1_calc
.subsections_via_symbols
