	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function kalman_smoothen
LCPI0_0:
	.long	0x3f200000                      ## float 0.625
LCPI0_2:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x3fe3333333333333              ## double 0.59999999999999998
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_kalman_smoothen:                       ## @kalman_smoothen
	.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
	movl	%r8d, %r12d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	leal	-3(%r13), %esi
	callq	_FFMAX
	shlq	$2, %rax
	movq	%r15, %rbx
	subq	%rax, %rbx
	movl	(%r14), %edi
	addl	$3, %r13d
	movl	%r13d, %esi
	callq	_FFMIN
	shlq	$2, %rax
	movq	%r15, %r14
	subq	%rax, %r14
	xorps	%xmm0, %xmm0
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_avpriv_scalarproduct_float_c
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	cmovaq	%rbx, %r13
	maxss	%xmm1, %xmm0
	addq	$-4, %rbx
	cmpq	%r14, %rbx
	jae	LBB0_1
## %bb.2:
	movl	$-1, %ebx
	xorps	%xmm1, %xmm1
	ucomiss	%xmm0, %xmm1
	jae	LBB0_25
## %bb.3:
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	%r13, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_avpriv_scalarproduct_float_c
	xorps	%xmm1, %xmm1
	ucomiss	%xmm0, %xmm1
	jae	LBB0_25
## %bb.4:
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jae	LBB0_6
## %bb.5:
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	testl	%r12d, %r12d
	jg	LBB0_9
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_6:
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	mulsd	LCPI0_1(%rip), %xmm1
	addsd	%xmm0, %xmm1
	divsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	testl	%r12d, %r12d
	jle	LBB0_8
LBB0_9:
	movl	%r12d, %eax
	cmpl	$8, %r12d
	jae	LBB0_11
## %bb.10:
	xorl	%ecx, %ecx
LBB0_20:
	movq	%rcx, %rdx
	notq	%rdx
	testb	$1, %al
	jne	LBB0_22
## %bb.21:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_11:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rdx
	subq	%r15, %rdx
	xorl	%ecx, %ecx
	cmpq	$32, %rdx
	jb	LBB0_20
## %bb.12:
	movq	%rsi, %rdx
	subq	%r13, %rdx
	cmpq	$32, %rdx
	jb	LBB0_20
## %bb.13:
	movl	%eax, %ecx
	andl	$-8, %ecx
	movaps	%xmm0, %xmm1
	shufps	$0, %xmm0, %xmm1                ## xmm1 = xmm1[0,0],xmm0[0,0]
	leaq	-8(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$3, %rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.15:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%edx, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movups	(%r13,%rdx,4), %xmm2
	movups	16(%r13,%rdx,4), %xmm3
	movups	(%r15,%rdx,4), %xmm4
	movups	16(%r15,%rdx,4), %xmm5
	subps	%xmm2, %xmm4
	subps	%xmm3, %xmm5
	mulps	%xmm1, %xmm4
	addps	%xmm2, %xmm4
	mulps	%xmm1, %xmm5
	addps	%xmm3, %xmm5
	movups	%xmm4, (%rbx,%rdx,4)
	movups	%xmm5, 16(%rbx,%rdx,4)
	movups	32(%r13,%rdx,4), %xmm2
	movups	48(%r13,%rdx,4), %xmm3
	movups	32(%r15,%rdx,4), %xmm4
	movups	48(%r15,%rdx,4), %xmm5
	subps	%xmm2, %xmm4
	subps	%xmm3, %xmm5
	mulps	%xmm1, %xmm4
	addps	%xmm2, %xmm4
	mulps	%xmm1, %xmm5
	addps	%xmm3, %xmm5
	movups	%xmm4, 32(%rbx,%rdx,4)
	movups	%xmm5, 48(%rbx,%rdx,4)
	addq	$16, %rdx
	addq	$-2, %rdi
	jne	LBB0_16
	jmp	LBB0_17
LBB0_22:
	movss	(%r13,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	(%r15,%rcx,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movss	%xmm2, (%rsi,%rcx,4)
	orq	$1, %rcx
LBB0_23:
	xorl	%ebx, %ebx
	addq	%rax, %rdx
	je	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r13,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	(%r15,%rcx,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, (%rsi,%rcx,4)
	movss	4(%r13,%rcx,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	movss	4(%r15,%rcx,4), %xmm2           ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, 4(%rsi,%rcx,4)
	addq	$2, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_24
	jmp	LBB0_25
LBB0_14:
	xorl	%edx, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_17:
	testb	$1, %sil
	je	LBB0_19
## %bb.18:
	movups	(%r13,%rdx,4), %xmm2
	movups	16(%r13,%rdx,4), %xmm3
	movups	(%r15,%rdx,4), %xmm4
	movups	16(%r15,%rdx,4), %xmm5
	subps	%xmm2, %xmm4
	subps	%xmm3, %xmm5
	mulps	%xmm1, %xmm4
	addps	%xmm2, %xmm4
	mulps	%xmm1, %xmm5
	addps	%xmm3, %xmm5
	movups	%xmm4, (%rbx,%rdx,4)
	movups	%xmm5, 16(%rbx,%rdx,4)
LBB0_19:
	xorl	%ebx, %ebx
	cmpq	%rax, %rcx
	jne	LBB0_20
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_kalman_smoothen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kalman_smoothen
_kalman_smoothen:                       ; @kalman_smoothen
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x24, x0
	ldr	w0, [x0, #4]
	sub	w1, w1, #3
	bl	_FFMAX
	sub	x23, x19, x0, lsl #2
	ldr	w0, [x24]
	add	w1, w21, #3
	bl	_FFMIN
	mov	x21, #0
	sub	x24, x19, x0, lsl #2
	movi	d8, #0000000000000000
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_avpriv_scalarproduct_float_c
	fcmp	s0, s8
	fcsel	s8, s0, s8, gt
	csel	x21, x23, x21, gt
	sub	x23, x23, #4
	cmp	x23, x24
	b.hs	LBB0_1
; %bb.2:
	fcmp	s8, #0.0
	b.ls	LBB0_9
; %bb.3:
	mov	x0, x21
	mov	x1, x21
	mov	x2, x22
	bl	_avpriv_scalarproduct_float_c
	fcmp	s0, #0.0
	b.ls	LBB0_9
; %bb.4:
	fmov	s1, #0.62500000
	fcmp	s8, s0
	b.hi	LBB0_6
; %bb.5:
	fcvt	d0, s0
	fcvt	d1, s8
	mov	x8, #3689348814741910323
	movk	x8, #16355, lsl #48
	fmov	d2, x8
	fmadd	d1, d1, d2, d0
	fdiv	d0, d0, d1
	fcvt	s1, d0
LBB0_6:
	cmp	w22, #1
	b.lt	LBB0_17
; %bb.7:
	mov	w8, w22
	cmp	w22, #16
	b.hs	LBB0_10
; %bb.8:
	mov	x9, #0
	b	LBB0_15
LBB0_9:
	mov	w0, #-1
	b	LBB0_18
LBB0_10:
	mov	x9, #0
	sub	x10, x20, x19
	cmp	x10, #64
	b.lo	LBB0_15
; %bb.11:
	sub	x10, x20, x21
	cmp	x10, #64
	b.lo	LBB0_15
; %bb.12:
	and	x9, x8, #0xfffffff0
	dup.4s	v0, v1[0]
	add	x10, x20, #32
	add	x11, x21, #32
	add	x12, x19, #32
	mov	x13, x9
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x11, #-32]
	ldp	q4, q5, [x11], #64
	ldp	q6, q7, [x12, #-32]
	ldp	q16, q17, [x12], #64
	fsub.4s	v6, v6, v2
	fsub.4s	v7, v7, v3
	fsub.4s	v16, v16, v4
	fsub.4s	v17, v17, v5
	fmla.4s	v2, v6, v0
	fmla.4s	v3, v7, v0
	fmla.4s	v4, v16, v0
	fmla.4s	v5, v17, v0
	stp	q2, q3, [x10, #-32]
	stp	q4, q5, [x10], #64
	subs	x13, x13, #16
	b.ne	LBB0_13
; %bb.14:
	cmp	x9, x8
	b.eq	LBB0_17
LBB0_15:
	lsl	x12, x9, #2
	add	x10, x20, x12
	add	x11, x19, x12
	add	x12, x21, x12
	sub	x8, x8, x9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x12], #4
	ldr	s2, [x11], #4
	fsub	s2, s2, s0
	fmadd	s0, s1, s2, s0
	str	s0, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_16
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_kalman_smoothen
.subsections_via_symbols
