	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function weighted_avg_elliott_mul5_m16
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x40a00000                      ## float 5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_weighted_avg_elliott_mul5_m16:         ## @weighted_avg_elliott_mul5_m16
	.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	%rdx, %r14
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	movl	%esi, %r15d
	leaq	(%rdi,%r15,4), %r12
	xorps	%xmm1, %xmm1
	xorl	%ebx, %ebx
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movss	%xmm1, -52(%rbp)                ## 4-byte Spill
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	movss	(%r13,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movss	(%r12,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	callq	_FFABS
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	LCPI0_0(%rip), %xmm0
	movss	-44(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm2
	movss	-56(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	mulss	-48(%rbp), %xmm2                ## 4-byte Folded Reload
	addss	%xmm2, %xmm0
	addss	(%r13,%rbx,4), %xmm1
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
## %bb.4:
	mulss	LCPI0_1(%rip), %xmm0
	jmp	LBB0_5
LBB0_1:
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
LBB0_5:
	movq	_min_weight_sum@GOTPCREL(%rip), %rax
	ucomiss	(%rax), %xmm1
	jbe	LBB0_7
## %bb.6:
	divss	%xmm1, %xmm0
	mulss	4(%r14), %xmm0
	addss	(%r14), %xmm0
	leaq	12(%r14), %rax
	jmp	LBB0_8
LBB0_7:
	movss	12(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movq	%r14, %rax
LBB0_8:
	addss	(%rax), %xmm0
	movss	%xmm0, 12(%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_min_weight_sum,4,2             ## @min_weight_sum
	.no_dead_strip	_weighted_avg_elliott_mul5_m16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function weighted_avg_elliott_mul5_m16
_weighted_avg_elliott_mul5_m16:         ; @weighted_avg_elliott_mul5_m16
	.cfi_startproc
; %bb.0:
	stp	d13, d12, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 b8, -72
	.cfi_offset b9, -80
	.cfi_offset b10, -88
	.cfi_offset b11, -96
	.cfi_offset b12, -104
	.cfi_offset b13, -112
	mov	x19, x2
	cmp	w1, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x21, #0
	mov	w8, w1
	lsl	x22, x8, #2
	add	x23, x0, x22
	movi	d9, #0000000000000000
	fmov	s10, #1.00000000
	movi	d11, #0000000000000000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s12, [x20, x21]
	ldr	s8, [x23, x21]
	fmov	s0, s8
	bl	_FFABS
	fadd	s0, s0, s10
	fdiv	s0, s8, s0
	fmadd	s11, s12, s0, s11
	ldr	s0, [x20, x21]
	fadd	s9, s9, s0
	add	x21, x21, #4
	cmp	x22, x21
	b.ne	LBB0_2
; %bb.3:
	fmov	s0, #5.00000000
	fmul	s0, s11, s0
	b	LBB0_5
LBB0_4:
	movi	d0, #0000000000000000
	movi	d9, #0000000000000000
LBB0_5:
Lloh0:
	adrp	x8, _min_weight_sum@GOTPAGE
Lloh1:
	ldr	x8, [x8, _min_weight_sum@GOTPAGEOFF]
Lloh2:
	ldr	s1, [x8]
	fcmp	s9, s1
	b.le	LBB0_7
; %bb.6:
	fdiv	s0, s0, s9
	ldp	s2, s1, [x19]
	fmadd	s0, s0, s1, s2
	add	x8, x19, #12
	b	LBB0_8
LBB0_7:
	ldr	s0, [x19, #12]
	mov	x8, x19
LBB0_8:
	ldr	s1, [x8]
	fadd	s0, s1, s0
	str	s0, [x19, #12]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp], #112            ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_min_weight_sum,4,2             ; @min_weight_sum
	.no_dead_strip	_weighted_avg_elliott_mul5_m16
.subsections_via_symbols
