	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_rttavg
_calc_rttavg:                           ## @calc_rttavg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movslq	%edx, %rax
	movq	_RTTSCALE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	(%rdi), %rdx
	movq	8(%rdi), %r8
	movq	%rdx, %r9
	sarq	%cl, %r9
	subq	%r9, %rax
	addq	%rax, %rdx
	movq	%rdx, (%rdi)
	movq	%rax, %rdx
	negq	%rdx
	cmovsq	%rax, %rdx
	movq	_RTTDSCALE@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	addq	%r8, %rdx
	sarq	%cl, %r8
	subq	%r8, %rdx
	movq	%rdx, 8(%rdi)
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	(%rsi), %rax
	cmpq	8(%rsi), %rax
	jge	LBB0_7
## %bb.2:
	cmpq	16(%rsi), %rax
	jge	LBB0_4
## %bb.3:
	incq	%rax
	movq	%rax, (%rsi)
	popq	%rbp
	retq
LBB0_4:
	cmpq	%rax, 24(%rsi)
	jne	LBB0_7
## %bb.5:
	subq	$1, 32(%rsi)
	jae	LBB0_7
## %bb.6:
	incq	%rax
	movq	%rax, (%rsi)
	movq	%rax, 32(%rsi)
LBB0_7:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTTSCALE,8,3                   ## @RTTSCALE
	.comm	_RTTDSCALE,8,3                  ## @RTTDSCALE
	.no_dead_strip	_calc_rttavg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_rttavg
_calc_rttavg:                           ; @calc_rttavg
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x8, w2
Lloh0:
	adrp	x9, _RTTSCALE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RTTSCALE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldp	x10, x11, [x0]
	asr	x9, x10, x9
	subs	x8, x8, x9
	add	x9, x8, x10
	str	x9, [x0]
Lloh3:
	adrp	x9, _RTTDSCALE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RTTDSCALE@GOTPAGEOFF]
	cneg	x8, x8, mi
Lloh5:
	ldr	x9, [x9]
	asr	x9, x11, x9
	add	x8, x8, x11
	sub	x8, x8, x9
	str	x8, [x0, #8]
	cbz	x1, LBB0_6
; %bb.1:
	ldp	x8, x9, [x1]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.2:
	ldr	x9, [x1, #16]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.3:
	add	x8, x8, #1
	str	x8, [x1]
	ret
LBB0_4:
	ldr	x9, [x1, #24]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldr	x9, [x1, #32]
	sub	x10, x9, #1
	str	x10, [x1, #32]
	cbz	x9, LBB0_7
LBB0_6:
	ret
LBB0_7:
	add	x8, x8, #1
	str	x8, [x1]
	str	x8, [x1, #32]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RTTSCALE,8,3                   ; @RTTSCALE
	.comm	_RTTDSCALE,8,3                  ; @RTTDSCALE
	.no_dead_strip	_calc_rttavg
.subsections_via_symbols
