	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CalculateCopyStreamSleeptime
_CalculateCopyStreamSleeptime:          ## @CalculateCopyStreamSleeptime
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	%esi, %r8d
	movq	_still_sending@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imull	$1000, %esi, %esi               ## imm = 0x3E8
	addl	$-1000, %esi                    ## imm = 0xFC18
	movslq	%esi, %rax
	addq	%rdx, %rax
	testq	%rcx, %rcx
	cmoveq	%rcx, %rax
	xorl	%esi, %esi
	testl	%r8d, %r8d
	cmovneq	%rax, %rsi
	testq	%rsi, %rsi
	jle	LBB0_1
## %bb.2:
	leaq	-16(%rbp), %rdx
	leaq	-4(%rbp), %rcx
	callq	_feTimestampDifference
	movq	-16(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_3
## %bb.4:
	movslq	-4(%rbp), %rcx
	imulq	$1000, %rax, %rdx               ## imm = 0x3E8
	imulq	$274877907, %rcx, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	cltq
	addq	%rdx, %rax
	jmp	LBB0_5
LBB0_1:
	movq	$-1, %rax
	jmp	LBB0_5
LBB0_3:
	movl	$1000, %eax                     ## imm = 0x3E8
LBB0_5:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_still_sending,8,3              ## @still_sending
	.no_dead_strip	_CalculateCopyStreamSleeptime
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CalculateCopyStreamSleeptime
_CalculateCopyStreamSleeptime:          ; @CalculateCopyStreamSleeptime
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
Lloh0:
	adrp	x8, _still_sending@GOTPAGE
Lloh1:
	ldr	x8, [x8, _still_sending@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, #1000
	mul	w9, w1, w9
	sub	w9, w9, #1000
	cmp	x8, #0
	ccmp	w1, #0, #4, ne
	add	x8, x2, w9, sxtw
	csel	x1, x8, xzr, ne
	cmp	x1, #1
	b.lt	LBB0_3
; %bb.1:
	add	x2, sp, #8
	add	x3, sp, #4
	bl	_feTimestampDifference
	ldr	x8, [sp, #8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
	ldrsw	x9, [sp, #4]
	mov	w10, #1000
	mul	x8, x8, x10
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x0, x8, w9, sxtw
	b	LBB0_5
LBB0_3:
	mov	x0, #-1
	b	LBB0_5
LBB0_4:
	mov	w0, #1000
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_still_sending,8,3              ; @still_sending
	.no_dead_strip	_CalculateCopyStreamSleeptime
.subsections_via_symbols
