	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_timeout_ms
_calc_timeout_ms:                       ## @calc_timeout_ms
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
	xorl	%r9d, %r9d
	testl	%edx, %edx
	jle	LBB0_15
## %bb.1:
	leal	-1(%rdx), %r8d
	cmpl	$3, %r8d
	jae	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	incq	%r8
	movq	%r8, %r9
	andq	$-4, %r9
	leaq	-4(%r9), %rcx
	movq	%rcx, %rdi
	shrq	$2, %rdi
	incq	%rdi
	movl	%edi, %eax
	andl	$3, %eax
	cmpq	$12, %rcx
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rdi
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rsi,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rsi,%rcx,8), %xmm1
	movdqu	48(%rsi,%rcx,8), %xmm3
	movdqu	64(%rsi,%rcx,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rsi,%rcx,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rsi,%rcx,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rsi,%rcx,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rcx
	addq	$-4, %rdi
	jne	LBB0_6
LBB0_7:
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	leaq	(%rsi,%rcx,8), %rcx
	addq	$16, %rcx
	shlq	$5, %rax
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rcx,%rdi), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rcx,%rdi), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rax
	jne	LBB0_9
LBB0_10:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	cmpq	%r9, %r8
	je	LBB0_14
## %bb.11:
	leaq	(%rsi,%r9,8), %rsi
LBB0_12:
	movl	%edx, %ecx
	subl	%r9d, %ecx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rsi,%rdi,8), %rax
	incq	%rdi
	cmpl	%edi, %ecx
	jne	LBB0_13
LBB0_14:
	leaq	(%rax,%rax,8), %r9
LBB0_15:
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %eax
	cltq
	addq	%r9, %rax
	leaq	(%rax,%rax,2), %rdi
	movl	$200, %esi
	callq	_DIV_ROUND_UP
	addq	$10, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_timeout_ms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_timeout_ms
_calc_timeout_ms:                       ; @calc_timeout_ms
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	subs	w8, w2, #1
	b.lt	LBB0_3
; %bb.1:
	cmp	w8, #7
	b.hs	LBB0_4
; %bb.2:
	mov	w9, #0
	mov	x11, #0
	mov	x8, x1
	b	LBB0_7
LBB0_3:
	mov	x8, #0
	b	LBB0_10
LBB0_4:
	add	x10, x8, #1
	and	x9, x10, #0x1fffffff8
	add	x8, x1, x9, lsl #3
	add	x11, x1, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x12, x12, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x11, d0
	cmp	x10, x9
	b.eq	LBB0_9
LBB0_7:
	sub	w9, w2, w9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8], #8
	add	x11, x10, x11
	subs	w9, w9, #1
	b.ne	LBB0_8
LBB0_9:
	add	x8, x11, x11, lsl #3
LBB0_10:
	add	w9, w2, w2, lsl #2
	lsl	w9, w9, #1
	add	x8, x8, w9, sxtw
	add	x0, x8, x8, lsl #1
	mov	w1, #200
	bl	_DIV_ROUND_UP
	add	x0, x0, #10
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_timeout_ms
.subsections_via_symbols
