	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_calc_frame_time
_brcms_c_calc_frame_time:               ## @brcms_c_calc_frame_time
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r13
	movl	%esi, %edi
	callq	_rspec2rate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_brcms_err
	movq	_BRCM_RATE_1M@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	%r12d, %edi
	callq	_is_mcs_rate
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_RSPEC_RATE_MASK@GOTPCREL(%rip), %rax
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	(%rax), %r14d
	andl	%r12d, %r14d
	movl	%r14d, %edi
	callq	_mcs_2_txstreams
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_rspec_stc
	movl	%eax, %ebx
	addl	%r13d, %ebx
	movq	_PREN_PREAMBLE@GOTPCREL(%rip), %rax
	movq	_PREN_PREAMBLE_EXT@GOTPCREL(%rip), %rcx
	imull	(%rcx), %ebx
	addl	(%rax), %ebx
	movq	_BRCMS_MM_PREAMBLE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_PREN_MM_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addl	%eax, %ebx
	movl	%r12d, %edi
	callq	_rspec_is40mhz
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_rspec_issgi
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_mcs_2_rate
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_rspec_stc
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	_APHY_SERVICE_NBITS@GOTPCREL(%rip), %rax
	shll	$3, %r15d
	addl	(%rax), %r15d
	movq	_APHY_TAIL_NBITS@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	imull	$1000, %r15d, %edi              ## imm = 0x3E8
	shll	$3, %r14d
	movl	%r14d, %esi
	callq	_CEIL
	addl	%eax, %eax
	jmp	LBB0_8
LBB0_11:
	movl	%ebx, %edi
	callq	_is_ofdm_rate
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	_APHY_PREAMBLE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_APHY_SIGNAL_TIME@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	movq	_APHY_SERVICE_NBITS@GOTPCREL(%rip), %rax
	shll	$3, %r15d
	addl	(%rax), %r15d
	addl	%ebx, %ebx
	movq	_APHY_TAIL_NBITS@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_CEIL
	movl	%eax, %ebx
	movq	_APHY_SYMBOL_TIME@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	addl	%r14d, %ebx
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	_BRCM_BAND_2G@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.13:
	movq	_DOT11_OFDM_SIGNAL_EXTENSION@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_6:
	shll	$2, %r14d
	movq	_APHY_SERVICE_NBITS@GOTPCREL(%rip), %rax
	shll	$3, %r15d
	addl	(%rax), %r15d
	movq	_APHY_TAIL_NBITS@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	imull	$1000, %r15d, %edi              ## imm = 0x3E8
	movl	%r14d, %esi
	callq	_CEIL
LBB0_8:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	_APHY_SYMBOL_TIME@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	addl	%eax, %ebx
	movq	(%rdx), %rax
	movq	(%rax), %rcx
	movq	_BRCM_BAND_2G@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.9:
	movq	_DOT11_OFDM_SIGNAL_EXTENSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addl	%eax, %ebx
	jmp	LBB0_18
LBB0_14:
	shll	$4, %r15d
	leal	(%r15,%rbx), %eax
	decl	%eax
	cltd
	idivl	%ebx
	movl	%eax, %ebx
	movq	_BRCMS_SHORT_PREAMBLE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_16
## %bb.15:
	movq	_BPHY_PLCP_SHORT_TIME@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_BPHY_PLCP_TIME@GOTPCREL(%rip), %rax
LBB0_17:
	addl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d: WAR: using rate of 1 mbps\n"

	.comm	_BRCM_RATE_1M,4,2               ## @BRCM_RATE_1M
	.comm	_RSPEC_RATE_MASK,4,2            ## @RSPEC_RATE_MASK
	.comm	_PREN_PREAMBLE,4,2              ## @PREN_PREAMBLE
	.comm	_PREN_PREAMBLE_EXT,4,2          ## @PREN_PREAMBLE_EXT
	.comm	_BRCMS_MM_PREAMBLE,4,2          ## @BRCMS_MM_PREAMBLE
	.comm	_PREN_MM_EXT,8,3                ## @PREN_MM_EXT
	.comm	_APHY_SERVICE_NBITS,4,2         ## @APHY_SERVICE_NBITS
	.comm	_APHY_TAIL_NBITS,4,2            ## @APHY_TAIL_NBITS
	.comm	_APHY_SYMBOL_TIME,4,2           ## @APHY_SYMBOL_TIME
	.comm	_BRCM_BAND_2G,8,3               ## @BRCM_BAND_2G
	.comm	_DOT11_OFDM_SIGNAL_EXTENSION,8,3 ## @DOT11_OFDM_SIGNAL_EXTENSION
	.comm	_APHY_PREAMBLE_TIME,4,2         ## @APHY_PREAMBLE_TIME
	.comm	_APHY_SIGNAL_TIME,8,3           ## @APHY_SIGNAL_TIME
	.comm	_BRCMS_SHORT_PREAMBLE,4,2       ## @BRCMS_SHORT_PREAMBLE
	.comm	_BPHY_PLCP_SHORT_TIME,8,3       ## @BPHY_PLCP_SHORT_TIME
	.comm	_BPHY_PLCP_TIME,8,3             ## @BPHY_PLCP_TIME
	.no_dead_strip	_brcms_c_calc_frame_time
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_calc_frame_time
_brcms_c_calc_frame_time:               ; @brcms_c_calc_frame_time
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_rspec2rate
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldp	x9, x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x9]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_err
Lloh2:
	adrp	x8, _BRCM_RATE_1M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BRCM_RATE_1M@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
LBB0_2:
	mov	x0, x21
	bl	_is_mcs_rate
	cbz	x0, LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _RSPEC_RATE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RSPEC_RATE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w23, w8, w21
	mov	x0, x23
	bl	_mcs_2_txstreams
	mov	x24, x0
	mov	x0, x21
	bl	_rspec_stc
	add	w8, w0, w24
Lloh8:
	adrp	x9, _PREN_PREAMBLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PREN_PREAMBLE@GOTPAGEOFF]
Lloh10:
	adrp	x10, _PREN_PREAMBLE_EXT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PREN_PREAMBLE_EXT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	ldr	w10, [x10]
	madd	w8, w10, w8, w9
Lloh14:
	adrp	x9, _BRCMS_MM_PREAMBLE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BRCMS_MM_PREAMBLE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _PREN_MM_EXT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _PREN_MM_EXT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w9, w22
	csel	w9, w10, wzr, eq
	add	w24, w8, w9
	mov	x0, x21
	bl	_rspec_is40mhz
	mov	x22, x0
	mov	x0, x21
	bl	_rspec_issgi
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_mcs_2_rate
	mov	x22, x0
	mov	x0, x21
	bl	_rspec_stc
	cbz	w0, LBB0_8
; %bb.4:
Lloh20:
	adrp	x8, _APHY_SERVICE_NBITS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _APHY_SERVICE_NBITS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _APHY_TAIL_NBITS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _APHY_TAIL_NBITS@GOTPAGEOFF]
	add	w8, w8, w20, lsl #3
Lloh25:
	ldr	w9, [x9]
	add	w8, w8, w9
	mov	w9, #1000
	mul	w0, w8, w9
	lsl	w1, w22, #3
	bl	_CEIL
	lsl	w0, w0, #1
	b	LBB0_9
LBB0_5:
	mov	x0, x23
	bl	_is_ofdm_rate
	cbz	x0, LBB0_12
; %bb.6:
Lloh26:
	adrp	x8, _APHY_PREAMBLE_TIME@GOTPAGE
Lloh27:
	ldr	x8, [x8, _APHY_PREAMBLE_TIME@GOTPAGEOFF]
Lloh28:
	adrp	x9, _APHY_SIGNAL_TIME@GOTPAGE
Lloh29:
	ldr	x9, [x9, _APHY_SIGNAL_TIME@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	ldr	w9, [x9]
	add	w21, w8, w9
	lsl	w1, w23, #1
Lloh32:
	adrp	x8, _APHY_SERVICE_NBITS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _APHY_SERVICE_NBITS@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	add	w8, w8, w20, lsl #3
Lloh35:
	adrp	x9, _APHY_TAIL_NBITS@GOTPAGE
Lloh36:
	ldr	x9, [x9, _APHY_TAIL_NBITS@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	add	w0, w8, w9
	bl	_CEIL
Lloh38:
	adrp	x8, _APHY_SYMBOL_TIME@GOTPAGE
Lloh39:
	ldr	x8, [x8, _APHY_SYMBOL_TIME@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	madd	w0, w8, w0, w21
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh41:
	adrp	x9, _BRCM_BAND_2G@GOTPAGE
Lloh42:
	ldr	x9, [x9, _BRCM_BAND_2G@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
Lloh44:
	adrp	x8, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGE
Lloh45:
	ldr	x8, [x8, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	add	w0, w0, w8
	b	LBB0_11
LBB0_8:
	lsl	w1, w22, #2
Lloh47:
	adrp	x8, _APHY_SERVICE_NBITS@GOTPAGE
Lloh48:
	ldr	x8, [x8, _APHY_SERVICE_NBITS@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	add	w8, w8, w20, lsl #3
Lloh50:
	adrp	x9, _APHY_TAIL_NBITS@GOTPAGE
Lloh51:
	ldr	x9, [x9, _APHY_TAIL_NBITS@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	add	w8, w8, w9
	mov	w9, #1000
	mul	w0, w8, w9
	bl	_CEIL
LBB0_9:
Lloh53:
	adrp	x8, _APHY_SYMBOL_TIME@GOTPAGE
Lloh54:
	ldr	x8, [x8, _APHY_SYMBOL_TIME@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	madd	w8, w8, w0, w24
	ldr	x9, [x19]
	ldr	x9, [x9]
Lloh56:
	adrp	x10, _BRCM_BAND_2G@GOTPAGE
Lloh57:
	ldr	x10, [x10, _BRCM_BAND_2G@GOTPAGEOFF]
Lloh58:
	ldr	x10, [x10]
Lloh59:
	adrp	x11, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGE
Lloh60:
	ldr	x11, [x11, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGEOFF]
Lloh61:
	ldr	w11, [x11]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
LBB0_10:
	add	w0, w8, w9
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	add	w8, w23, w20, lsl #4
	sub	w8, w8, #1
	sdiv	w8, w8, w23
Lloh62:
	adrp	x9, _BRCMS_SHORT_PREAMBLE@GOTPAGE
Lloh63:
	ldr	x9, [x9, _BRCMS_SHORT_PREAMBLE@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
	tst	w9, w22
	b.eq	LBB0_14
; %bb.13:
Lloh65:
	adrp	x9, _BPHY_PLCP_SHORT_TIME@GOTPAGE
Lloh66:
	ldr	x9, [x9, _BPHY_PLCP_SHORT_TIME@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh67:
	adrp	x9, _BPHY_PLCP_TIME@GOTPAGE
Lloh68:
	ldr	x9, [x9, _BPHY_PLCP_TIME@GOTPAGEOFF]
LBB0_15:
	ldr	w9, [x9]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh67, Lloh68
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d: WAR: using rate of 1 mbps\n"

	.comm	_BRCM_RATE_1M,4,2               ; @BRCM_RATE_1M
	.comm	_RSPEC_RATE_MASK,4,2            ; @RSPEC_RATE_MASK
	.comm	_PREN_PREAMBLE,4,2              ; @PREN_PREAMBLE
	.comm	_PREN_PREAMBLE_EXT,4,2          ; @PREN_PREAMBLE_EXT
	.comm	_BRCMS_MM_PREAMBLE,4,2          ; @BRCMS_MM_PREAMBLE
	.comm	_PREN_MM_EXT,8,3                ; @PREN_MM_EXT
	.comm	_APHY_SERVICE_NBITS,4,2         ; @APHY_SERVICE_NBITS
	.comm	_APHY_TAIL_NBITS,4,2            ; @APHY_TAIL_NBITS
	.comm	_APHY_SYMBOL_TIME,4,2           ; @APHY_SYMBOL_TIME
	.comm	_BRCM_BAND_2G,8,3               ; @BRCM_BAND_2G
	.comm	_DOT11_OFDM_SIGNAL_EXTENSION,8,3 ; @DOT11_OFDM_SIGNAL_EXTENSION
	.comm	_APHY_PREAMBLE_TIME,4,2         ; @APHY_PREAMBLE_TIME
	.comm	_APHY_SIGNAL_TIME,8,3           ; @APHY_SIGNAL_TIME
	.comm	_BRCMS_SHORT_PREAMBLE,4,2       ; @BRCMS_SHORT_PREAMBLE
	.comm	_BPHY_PLCP_SHORT_TIME,8,3       ; @BPHY_PLCP_SHORT_TIME
	.comm	_BPHY_PLCP_TIME,8,3             ; @BPHY_PLCP_TIME
	.no_dead_strip	_brcms_c_calc_frame_time
.subsections_via_symbols
