	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_calculate_bitrate     ## -- Begin function cfg80211_calculate_bitrate
	.p2align	4, 0x90
_cfg80211_calculate_bitrate:            ## @cfg80211_calculate_bitrate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_RATE_INFO_FLAGS_MCS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.1:
	movq	_RATE_INFO_FLAGS_VHT_MCS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_3:
	movq	_RATE_INFO_FLAGS_60G@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.10:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_cfg80211_calculate_bitrate_60g ## TAILCALL
LBB0_4:
	movq	_RATE_INFO_FLAGS_VHT_MCS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_cfg80211_calculate_bitrate_vht ## TAILCALL
LBB0_2:
	movl	4(%rbx), %eax
	jmp	LBB0_9
LBB0_5:
	xorl	%edi, %edi
	cmpl	$32, 8(%rbx)
	setge	%dil
	callq	_WARN_ON_ONCE
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.6:
	movl	(%rbx), %eax
	movl	8(%rbx), %edx
	movl	%edx, %esi
	andl	$7, %esi
	sarl	$3, %edx
	incl	%edx
	movq	_RATE_INFO_FLAGS_40_MHZ_WIDTH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	$6500000, %ecx                  ## imm = 0x632EA0
	movl	$13500000, %edi                 ## imm = 0xCDFE60
	cmovel	%ecx, %edi
	leal	3(%rsi), %ebx
	cmpl	$4, %esi
	movl	$6, %ecx
	cmovnel	%ebx, %ecx
	leal	1(%rsi), %esi
	cmovbl	%esi, %ecx
	imull	%edx, %ecx
	imull	%edi, %ecx
	movq	_RATE_INFO_FLAGS_SHORT_GI@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_8
## %bb.7:
	movslq	%ecx, %rax
	imulq	$954437177, %rax, %rax          ## imm = 0x38E38E39
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$33, %rax
	addl	%ecx, %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %ecx
LBB0_8:
	addl	$50000, %ecx                    ## imm = 0xC350
	movslq	%ecx, %rax
	imulq	$351843721, %rax, %rax          ## imm = 0x14F8B589
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$45, %rax
	addl	%ecx, %eax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_INFO_FLAGS_MCS,4,2        ## @RATE_INFO_FLAGS_MCS
	.comm	_RATE_INFO_FLAGS_VHT_MCS,4,2    ## @RATE_INFO_FLAGS_VHT_MCS
	.comm	_RATE_INFO_FLAGS_60G,4,2        ## @RATE_INFO_FLAGS_60G
	.comm	_RATE_INFO_FLAGS_40_MHZ_WIDTH,4,2 ## @RATE_INFO_FLAGS_40_MHZ_WIDTH
	.comm	_RATE_INFO_FLAGS_SHORT_GI,4,2   ## @RATE_INFO_FLAGS_SHORT_GI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_calculate_bitrate     ; -- Begin function cfg80211_calculate_bitrate
	.p2align	2
_cfg80211_calculate_bitrate:            ; @cfg80211_calculate_bitrate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RATE_INFO_FLAGS_MCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RATE_INFO_FLAGS_MCS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _RATE_INFO_FLAGS_VHT_MCS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RATE_INFO_FLAGS_VHT_MCS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_2:
Lloh6:
	adrp	x9, _RATE_INFO_FLAGS_60G@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RATE_INFO_FLAGS_60G@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cfg80211_calculate_bitrate_60g
LBB0_4:
Lloh9:
	adrp	x9, _RATE_INFO_FLAGS_VHT_MCS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RATE_INFO_FLAGS_VHT_MCS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cfg80211_calculate_bitrate_vht
LBB0_6:
	ldr	w0, [x19, #4]
	b	LBB0_12
LBB0_7:
	ldr	w8, [x19, #8]
	cmp	w8, #31
	cset	w0, gt
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19, #8]
	and	w9, w8, #0x7
	asr	w8, w8, #3
	ldr	w10, [x19]
Lloh12:
	adrp	x11, _RATE_INFO_FLAGS_40_MHZ_WIDTH@GOTPAGE
Lloh13:
	ldr	x11, [x11, _RATE_INFO_FLAGS_40_MHZ_WIDTH@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w11, w10
	mov	w11, #65120
	movk	w11, #205, lsl #16
	mov	w12, #11936
	movk	w12, #99, lsl #16
	csel	w11, w12, w11, eq
	add	w12, w9, #3
	mov	w13, #6
	cmp	w9, #4
	csel	w12, w13, w12, eq
	csinc	w9, w12, w9, hs
	madd	w8, w9, w8, w9
	mul	w8, w8, w11
Lloh15:
	adrp	x9, _RATE_INFO_FLAGS_SHORT_GI@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RATE_INFO_FLAGS_SHORT_GI@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w10
	b.eq	LBB0_11
; %bb.10:
	mov	w9, #36409
	movk	w9, #14563, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
LBB0_11:
	mov	w9, #50000
	add	w8, w8, w9
	mov	w9, #46473
	movk	w9, #5368, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #45
	add	w0, w8, w9
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_INFO_FLAGS_MCS,4,2        ; @RATE_INFO_FLAGS_MCS
	.comm	_RATE_INFO_FLAGS_VHT_MCS,4,2    ; @RATE_INFO_FLAGS_VHT_MCS
	.comm	_RATE_INFO_FLAGS_60G,4,2        ; @RATE_INFO_FLAGS_60G
	.comm	_RATE_INFO_FLAGS_40_MHZ_WIDTH,4,2 ; @RATE_INFO_FLAGS_40_MHZ_WIDTH
	.comm	_RATE_INFO_FLAGS_SHORT_GI,4,2   ; @RATE_INFO_FLAGS_SHORT_GI
.subsections_via_symbols
