	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_calc_frame_len
_brcms_c_calc_frame_len:                ## @brcms_c_calc_frame_len
	.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
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	%esi, %edi
	callq	_rspec2rate
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_is_mcs_rate
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_RSPEC_RATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	%ebx, %r15d
	movl	%r15d, %edi
	callq	_mcs_2_txstreams
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_rspec_stc
	addl	%r13d, %eax
	movq	_PREN_PREAMBLE@GOTPCREL(%rip), %rcx
	movq	_PREN_PREAMBLE_EXT@GOTPCREL(%rip), %rdx
	imull	(%rdx), %eax
	movq	(%r12), %rdx
	movq	(%rdx), %rsi
	movq	_BRCM_BAND_2G@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	cmpq	(%rdi), %rsi
	jne	LBB0_3
## %bb.2:
	movq	_DOT11_OFDM_SIGNAL_EXTENSION@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_3:
	addl	(%rcx), %eax
	addl	%edx, %eax
	subl	%eax, %r14d
	movl	%ebx, %edi
	callq	_rspec_is40mhz
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_rspec_issgi
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mcs_2_rate
	movl	%eax, %ecx
	movq	_APHY_SYMBOL_TIME@GOTPCREL(%rip), %rsi
	movl	%r14d, %eax
	cltd
	idivl	(%rsi)
                                        ## kill: def $eax killed $eax def $rax
	movq	_APHY_SERVICE_NBITS@GOTPCREL(%rip), %rdx
	movq	_APHY_TAIL_NBITS@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	addl	(%rdx), %esi
	imull	%ecx, %eax
	imull	$-1000, %esi, %ecx              ## imm = 0xFC18
	leal	(%rcx,%rax,4), %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$41, %rax
	addl	%ecx, %eax
	jmp	LBB0_10
LBB0_4:
	movl	%ebx, %edi
	callq	_is_ofdm_rate
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_APHY_PREAMBLE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_APHY_SIGNAL_TIME@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	subl	%eax, %r14d
	movq	_APHY_SYMBOL_TIME@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	imull	%eax, %r15d
	addl	%r15d, %r15d
	movq	_APHY_SERVICE_NBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_APHY_TAIL_NBITS@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	subl	%eax, %r15d
	leal	7(%r15), %eax
	testl	%r15d, %r15d
	cmovnsl	%r15d, %eax
	sarl	$3, %eax
	jmp	LBB0_10
LBB0_6:
	movq	_BRCMS_SHORT_PREAMBLE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_BPHY_PLCP_TIME@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_BPHY_PLCP_SHORT_TIME@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %r14d
	imull	%r15d, %r14d
	leal	15(%r14), %eax
	testl	%r14d, %r14d
	cmovnsl	%r14d, %eax
	sarl	$4, %eax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSPEC_RATE_MASK,4,2            ## @RSPEC_RATE_MASK
	.comm	_PREN_PREAMBLE,8,3              ## @PREN_PREAMBLE
	.comm	_PREN_PREAMBLE_EXT,4,2          ## @PREN_PREAMBLE_EXT
	.comm	_BRCM_BAND_2G,8,3               ## @BRCM_BAND_2G
	.comm	_DOT11_OFDM_SIGNAL_EXTENSION,8,3 ## @DOT11_OFDM_SIGNAL_EXTENSION
	.comm	_APHY_SYMBOL_TIME,4,2           ## @APHY_SYMBOL_TIME
	.comm	_APHY_SERVICE_NBITS,4,2         ## @APHY_SERVICE_NBITS
	.comm	_APHY_TAIL_NBITS,4,2            ## @APHY_TAIL_NBITS
	.comm	_APHY_PREAMBLE_TIME,8,3         ## @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_len
.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_len
_brcms_c_calc_frame_len:                ; @brcms_c_calc_frame_len
	.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	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_rspec2rate
	mov	x21, x0
	mov	x0, x20
	bl	_is_mcs_rate
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _RSPEC_RATE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSPEC_RATE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w21, w8, w20
	mov	x0, x21
	bl	_mcs_2_txstreams
	mov	x23, x0
	mov	x0, x20
	bl	_rspec_stc
Lloh3:
	adrp	x8, _PREN_PREAMBLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PREN_PREAMBLE@GOTPAGEOFF]
	add	w9, w0, w23
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _PREN_PREAMBLE_EXT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PREN_PREAMBLE_EXT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldr	x11, [x22]
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _BRCM_BAND_2G@GOTPAGE
Lloh10:
	ldr	x12, [x12, _BRCM_BAND_2G@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGE
Lloh13:
	ldr	x13, [x13, _DOT11_OFDM_SIGNAL_EXTENSION@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	cmp	x11, x12
	csel	w11, w13, wzr, eq
	madd	w8, w10, w9, w8
	add	w8, w8, w11
	sub	w22, w19, w8
	mov	x0, x20
	bl	_rspec_is40mhz
	mov	x19, x0
	mov	x0, x20
	bl	_rspec_issgi
	mov	x2, x0
	mov	x0, x21
	mov	x1, x19
	bl	_mcs_2_rate
Lloh15:
	adrp	x8, _APHY_SYMBOL_TIME@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APHY_SYMBOL_TIME@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	sdiv	w8, w22, w8
	mul	w8, w0, w8
Lloh18:
	adrp	x9, _APHY_SERVICE_NBITS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _APHY_SERVICE_NBITS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _APHY_TAIL_NBITS@GOTPAGE
Lloh22:
	ldr	x10, [x10, _APHY_TAIL_NBITS@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	add	w9, w10, w9
	mov	w10, #-1000
	mul	w9, w9, w10
	add	w8, w9, w8, lsl #2
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #41
	add	w0, w8, w9
	b	LBB0_5
LBB0_2:
	mov	x0, x20
	bl	_is_ofdm_rate
	cbz	x0, LBB0_4
; %bb.3:
Lloh24:
	adrp	x8, _APHY_PREAMBLE_TIME@GOTPAGE
Lloh25:
	ldr	x8, [x8, _APHY_PREAMBLE_TIME@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _APHY_SIGNAL_TIME@GOTPAGE
Lloh28:
	ldr	x9, [x9, _APHY_SIGNAL_TIME@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w8, w19, w8
Lloh30:
	adrp	x9, _APHY_SYMBOL_TIME@GOTPAGE
Lloh31:
	ldr	x9, [x9, _APHY_SYMBOL_TIME@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	mul	w8, w21, w8
	lsl	w8, w8, #1
Lloh33:
	adrp	x9, _APHY_SERVICE_NBITS@GOTPAGE
Lloh34:
	ldr	x9, [x9, _APHY_SERVICE_NBITS@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _APHY_TAIL_NBITS@GOTPAGE
Lloh37:
	ldr	x10, [x10, _APHY_TAIL_NBITS@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	add	w9, w9, w10
	sub	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	b	LBB0_5
LBB0_4:
Lloh39:
	adrp	x8, _BRCMS_SHORT_PREAMBLE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BRCMS_SHORT_PREAMBLE@GOTPAGEOFF]
Lloh41:
	adrp	x9, _BPHY_PLCP_TIME@GOTPAGE
Lloh42:
	ldr	x9, [x9, _BPHY_PLCP_TIME@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x10, _BPHY_PLCP_SHORT_TIME@GOTPAGE
Lloh45:
	ldr	x10, [x10, _BPHY_PLCP_SHORT_TIME@GOTPAGEOFF]
	tst	w8, w23
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	sub	w8, w19, w8
	mul	w8, w8, w21
	add	w9, w8, #15
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #4
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_RSPEC_RATE_MASK,4,2            ; @RSPEC_RATE_MASK
	.comm	_PREN_PREAMBLE,8,3              ; @PREN_PREAMBLE
	.comm	_PREN_PREAMBLE_EXT,4,2          ; @PREN_PREAMBLE_EXT
	.comm	_BRCM_BAND_2G,8,3               ; @BRCM_BAND_2G
	.comm	_DOT11_OFDM_SIGNAL_EXTENSION,8,3 ; @DOT11_OFDM_SIGNAL_EXTENSION
	.comm	_APHY_SYMBOL_TIME,4,2           ; @APHY_SYMBOL_TIME
	.comm	_APHY_SERVICE_NBITS,4,2         ; @APHY_SERVICE_NBITS
	.comm	_APHY_TAIL_NBITS,4,2            ; @APHY_TAIL_NBITS
	.comm	_APHY_PREAMBLE_TIME,8,3         ; @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_len
.subsections_via_symbols
