	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tfrc_lh_calc_i_mean
_tfrc_lh_calc_i_mean:                   ## @tfrc_lh_calc_i_mean
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_tfrc_lh_length
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.1:
	leal	-1(%rax), %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tfrc_lh_get_interval
	movl	%eax, %r15d
	movq	_tfrc_lh_weights@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %r13d
	imull	%r13d, %r15d
	movl	$1, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rcx
	imull	-4(%rcx,%rbx,4), %eax
	addl	%eax, %r12d
	incq	%rbx
	cmpq	%rbx, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_tfrc_lh_get_interval
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rcx
	movl	(%rcx,%rbx,4), %ecx
	addl	%ecx, %r13d
	imull	%eax, %ecx
	addl	%ecx, %r15d
	jmp	LBB0_4
LBB0_5:
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_max
	cltd
	idivl	%r13d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tfrc_lh_weights,8,3            ## @tfrc_lh_weights
	.no_dead_strip	_tfrc_lh_calc_i_mean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tfrc_lh_calc_i_mean
_tfrc_lh_calc_i_mean:                   ; @tfrc_lh_calc_i_mean
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_tfrc_lh_length
	cmp	w0, #2
	b.lt	LBB0_6
; %bb.1:
	sub	w23, w0, #1
	mov	w22, w0
	mov	x0, x19
	mov	w1, #0
	bl	_tfrc_lh_get_interval
	mov	x26, #0
	mov	w20, #0
Lloh0:
	adrp	x25, _tfrc_lh_weights@GOTPAGE
Lloh1:
	ldr	x25, [x25, _tfrc_lh_weights@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	w24, [x8]
	mul	w21, w24, w0
	sub	x27, x22, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	ldr	w8, [x8, x26, lsl #2]
	madd	w20, w8, w0, w20
	mov	x26, x22
	cmp	x27, x22
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x26, #1
	mov	x0, x19
	mov	x1, x22
	bl	_tfrc_lh_get_interval
	cmp	x22, x23
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	add	x8, x8, x26, lsl #2
	ldr	w8, [x8, #4]
	madd	w21, w8, w0, w21
	add	w24, w8, w24
	b	LBB0_2
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_max
	sdiv	w8, w0, w24
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_tfrc_lh_weights,8,3            ; @tfrc_lh_weights
	.no_dead_strip	_tfrc_lh_calc_i_mean
.subsections_via_symbols
