	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_calc_rate_ewma
_minstrel_calc_rate_ewma:               ## @minstrel_calc_rate_ewma
	.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
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	$0, 40(%rbx)
	movq	(%rbx), %rsi
	movq	24(%rbx), %rdi
	callq	_MINSTREL_FRAC
	movl	%eax, 52(%rbx)
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.3:
	movl	56(%rbx), %edi
	movq	_EWMA_LEVEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_minstrel_ewma
	movl	%eax, 56(%rbx)
	movq	8(%rbx), %rdx
	jmp	LBB0_4
LBB0_5:
	incq	40(%rbx)
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	jmp	LBB0_6
LBB0_2:
	movl	%eax, 56(%rbx)
	xorl	%edx, %edx
LBB0_4:
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	addq	%rax, %rdx
	movq	%rdx, 8(%rbx)
	addl	%ecx, 48(%rbx)
LBB0_6:
	movq	%rcx, 32(%rbx)
	movq	%rax, 16(%rbx)
	movq	$0, 24(%rbx)
	movq	$0, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EWMA_LEVEL,4,2                 ## @EWMA_LEVEL
	.no_dead_strip	_minstrel_calc_rate_ewma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_calc_rate_ewma
_minstrel_calc_rate_ewma:               ; @minstrel_calc_rate_ewma
	.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	x8, [x0]
	cmp	x8, #0
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	str	xzr, [x19, #40]
	ldr	x0, [x19, #24]
	ldr	x1, [x19]
	bl	_MINSTREL_FRAC
	mov	x1, x0
	str	w0, [x19, #52]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w0, [x19, #56]
Lloh0:
	adrp	x8, _EWMA_LEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EWMA_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_minstrel_ewma
	str	w0, [x19, #56]
	ldr	x9, [x19, #8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x19, #40]
	add	x8, x8, #1
	str	x8, [x19, #40]
	ldr	x9, [x19, #24]
	ldr	x8, [x19]
	b	LBB0_6
LBB0_4:
	mov	x9, #0
	str	w1, [x19, #56]
LBB0_5:
	ldr	x8, [x19]
	add	x9, x9, x8
	str	x9, [x19, #8]
	ldr	x9, [x19, #24]
	ldr	w10, [x19, #48]
	add	w10, w10, w9
	str	w10, [x19, #48]
LBB0_6:
	stp	xzr, x9, [x19, #24]
	str	x8, [x19, #16]
	str	xzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EWMA_LEVEL,4,2                 ; @EWMA_LEVEL
	.no_dead_strip	_minstrel_calc_rate_ewma
.subsections_via_symbols
