	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function airtime_link_metric_get
_airtime_link_metric_get:               ## @airtime_link_metric_get
	.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
	movq	_ARITH_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	$1, %r15d
	shll	%cl, %r15d
	movq	_TEST_FRAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	shll	%cl, %r12d
	cmpl	$100, (%rsi)
	jge	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	addq	$4, %rsi
	leaq	-48(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_sta_set_rate_info_tx
	movq	%r14, %rdi
	callq	_cfg80211_calculate_bitrate
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_MAX_METRIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_3:
	movl	(%rbx), %eax
	movl	(%r13), %ecx
	shll	%cl, %eax
	cltq
	imulq	$-1374389535, %rax, %rdi        ## imm = 0xAE147AE1
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$37, %rdi
	addl	%eax, %edi
	addl	%r12d, %r12d
	leal	(%r12,%r12,4), %eax
	cltd
	idivl	%r14d
	movl	%eax, %esi
	addl	%ecx, %ecx
	movl	$1, %eax
	shll	%cl, %eax
	addl	%r15d, %esi
	addl	%r15d, %edi
	cltd
	idivl	%edi
	imull	%esi, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARITH_SHIFT,4,2                ## @ARITH_SHIFT
	.comm	_TEST_FRAME_LEN,4,2             ## @TEST_FRAME_LEN
	.comm	_MAX_METRIC,4,2                 ## @MAX_METRIC
	.no_dead_strip	_airtime_link_metric_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function airtime_link_metric_get
_airtime_link_metric_get:               ; @airtime_link_metric_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x1]
	cmp	w8, #100
	b.ge	LBB0_2
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x21, _ARITH_SHIFT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ARITH_SHIFT@GOTPAGEOFF]
	ldr	w22, [x21]
Lloh2:
	adrp	x8, _TEST_FRAME_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TEST_FRAME_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	add	x1, x1, #4
	add	x2, sp, #8
	mov	x0, x19
	bl	_sta_set_rate_info_tx
	add	x0, sp, #8
	bl	_cfg80211_calculate_bitrate
	mov	x20, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _MAX_METRIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_METRIC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_4
LBB0_3:
	mov	w8, #1
	lsl	w8, w8, w22
	lsl	w9, w23, w22
	ldr	w10, [x19]
	ldr	w11, [x21]
	lsl	w10, w10, w11
	mov	w12, #31457
	movk	w12, #44564, lsl #16
	smull	x10, w10, w12
	lsr	x12, x10, #63
	asr	x10, x10, #37
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #1
	sdiv	w9, w9, w20
	add	w9, w9, w8
	lsl	w11, w11, #1
	mov	w13, #1
	lsl	w13, w13, w11
	add	w10, w10, w12
	add	w8, w10, w8
	sdiv	w8, w13, w8
	mul	w8, w9, w8
	asr	w0, w8, w11
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ARITH_SHIFT,4,2                ; @ARITH_SHIFT
	.comm	_TEST_FRAME_LEN,4,2             ; @TEST_FRAME_LEN
	.comm	_MAX_METRIC,4,2                 ; @MAX_METRIC
	.no_dead_strip	_airtime_link_metric_get
.subsections_via_symbols
