	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function lin_calc
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_lin_calc:                              ## @lin_calc
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $esi killed $esi def $rsi
	mulss	LCPI0_0(%rip), %xmm0
	movl	(%rdi), %eax
	cmpl	%edx, %eax
	cmovll	%eax, %edx
	movl	%edx, %r8d
	subl	%esi, %r8d
	shll	$8, %ecx
	movl	%r8d, %r13d
	movq	8(%rdi), %r15
	movslq	%ecx, %r10
	andl	$65532, %r13d                   ## imm = 0xFFFC
	je	LBB0_11
## %bb.1:
	leaq	(%r15,%r10,4), %rbx
	movq	16(%rdi), %r11
	movslq	%esi, %r14
	leal	-4(%r13), %r12d
	xorl	%ecx, %ecx
	cmpl	$12, %r12d
	jae	LBB0_3
## %bb.2:
	movq	%rbx, %r9
	jmp	LBB0_9
LBB0_3:
	leaq	(%r11,%r14,4), %rax
	leaq	(%r12,%r10), %rcx
	leaq	(%r15,%rcx,4), %rcx
	addq	$16, %rcx
	cmpq	%rcx, %rax
	jae	LBB0_6
## %bb.4:
	leaq	(%r12,%r14), %rcx
	leaq	(%r11,%rcx,4), %rcx
	addq	$16, %rcx
	cmpq	%rcx, %rbx
	jae	LBB0_6
## %bb.5:
	movq	%rbx, %r9
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_6:
	movq	%r11, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	shrl	$2, %r12d
	incl	%r12d
	movl	%r12d, %r11d
	andl	$-4, %r11d
	leaq	(%r14,%r11,4), %r14
	movq	%r11, %r9
	shlq	$4, %r9
	addq	%rbx, %r9
	leal	(,%r11,4), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movaps	%xmm0, %xmm8
	shufps	$0, %xmm0, %xmm8                ## xmm8 = xmm8[0,0],xmm0[0,0]
	xorl	%r15d, %r15d
	movq	%r11, %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rbx,%r15), %xmm9
	movups	16(%rbx,%r15), %xmm2
	movups	32(%rbx,%r15), %xmm7
	movups	48(%rbx,%r15), %xmm1
	movaps	%xmm1, %xmm4
	movlhps	%xmm7, %xmm4                    ## xmm4 = xmm4[0],xmm7[0]
	movaps	%xmm9, %xmm10
	unpcklps	%xmm2, %xmm10                   ## xmm10 = xmm10[0],xmm2[0],xmm10[1],xmm2[1]
	shufps	$36, %xmm4, %xmm10              ## xmm10 = xmm10[0,1],xmm4[2,0]
	movaps	%xmm2, %xmm5
	insertps	$76, %xmm9, %xmm5               ## xmm5 = xmm9[1],xmm5[1],zero,zero
	movaps	%xmm7, %xmm4
	unpcklps	%xmm1, %xmm4                    ## xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
	blendps	$3, %xmm5, %xmm4                ## xmm4 = xmm5[0,1],xmm4[2,3]
	movaps	%xmm9, %xmm6
	unpckhps	%xmm2, %xmm6                    ## xmm6 = xmm6[2],xmm2[2],xmm6[3],xmm2[3]
	movaps	%xmm7, %xmm5
	insertps	$179, %xmm1, %xmm5              ## xmm5 = zero,zero,xmm5[2],xmm1[2]
	blendps	$3, %xmm6, %xmm5                ## xmm5 = xmm6[0,1],xmm5[2,3]
	unpckhps	%xmm1, %xmm7                    ## xmm7 = xmm7[2],xmm1[2],xmm7[3],xmm1[3]
	shufps	$51, %xmm9, %xmm2               ## xmm2 = xmm2[3,0],xmm9[3,0]
	shufps	$226, %xmm7, %xmm2              ## xmm2 = xmm2[2,0],xmm7[2,3]
	movss	(%rax,%r15), %xmm1              ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rax,%r15), %xmm7             ## xmm7 = mem[0],zero,zero,zero
	movss	8(%rax,%r15), %xmm3             ## xmm3 = mem[0],zero,zero,zero
	movss	12(%rax,%r15), %xmm6            ## xmm6 = mem[0],zero,zero,zero
	insertps	$16, 16(%rax,%r15), %xmm1       ## xmm1 = xmm1[0],mem[0],xmm1[2,3]
	insertps	$32, 32(%rax,%r15), %xmm1       ## xmm1 = xmm1[0,1],mem[0],xmm1[3]
	insertps	$48, 48(%rax,%r15), %xmm1       ## xmm1 = xmm1[0,1,2],mem[0]
	mulps	%xmm8, %xmm10
	addps	%xmm1, %xmm10
	insertps	$16, 20(%rax,%r15), %xmm7       ## xmm7 = xmm7[0],mem[0],xmm7[2,3]
	insertps	$32, 36(%rax,%r15), %xmm7       ## xmm7 = xmm7[0,1],mem[0],xmm7[3]
	insertps	$48, 52(%rax,%r15), %xmm7       ## xmm7 = xmm7[0,1,2],mem[0]
	mulps	%xmm8, %xmm4
	addps	%xmm7, %xmm4
	insertps	$16, 24(%rax,%r15), %xmm3       ## xmm3 = xmm3[0],mem[0],xmm3[2,3]
	insertps	$32, 40(%rax,%r15), %xmm3       ## xmm3 = xmm3[0,1],mem[0],xmm3[3]
	insertps	$48, 56(%rax,%r15), %xmm3       ## xmm3 = xmm3[0,1,2],mem[0]
	mulps	%xmm8, %xmm5
	addps	%xmm3, %xmm5
	insertps	$16, 28(%rax,%r15), %xmm6       ## xmm6 = xmm6[0],mem[0],xmm6[2,3]
	insertps	$32, 44(%rax,%r15), %xmm6       ## xmm6 = xmm6[0,1],mem[0],xmm6[3]
	insertps	$48, 60(%rax,%r15), %xmm6       ## xmm6 = xmm6[0,1,2],mem[0]
	mulps	%xmm8, %xmm2
	addps	%xmm6, %xmm2
	movaps	%xmm2, %xmm1
	movlhps	%xmm5, %xmm1                    ## xmm1 = xmm1[0],xmm5[0]
	movaps	%xmm10, %xmm3
	unpcklps	%xmm4, %xmm3                    ## xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
	shufps	$36, %xmm1, %xmm3               ## xmm3 = xmm3[0,1],xmm1[2,0]
	movaps	%xmm4, %xmm1
	insertps	$76, %xmm10, %xmm1              ## xmm1 = xmm10[1],xmm1[1],zero,zero
	movaps	%xmm5, %xmm6
	unpcklps	%xmm2, %xmm6                    ## xmm6 = xmm6[0],xmm2[0],xmm6[1],xmm2[1]
	blendps	$3, %xmm1, %xmm6                ## xmm6 = xmm1[0,1],xmm6[2,3]
	movaps	%xmm10, %xmm1
	unpckhps	%xmm4, %xmm1                    ## xmm1 = xmm1[2],xmm4[2],xmm1[3],xmm4[3]
	movaps	%xmm5, %xmm7
	insertps	$179, %xmm2, %xmm7              ## xmm7 = zero,zero,xmm7[2],xmm2[2]
	blendps	$3, %xmm1, %xmm7                ## xmm7 = xmm1[0,1],xmm7[2,3]
	unpckhps	%xmm2, %xmm5                    ## xmm5 = xmm5[2],xmm2[2],xmm5[3],xmm2[3]
	shufps	$51, %xmm10, %xmm4              ## xmm4 = xmm4[3,0],xmm10[3,0]
	shufps	$226, %xmm5, %xmm4              ## xmm4 = xmm4[2,0],xmm5[2,3]
	movups	%xmm4, 48(%rax,%r15)
	movups	%xmm7, 32(%rax,%r15)
	movups	%xmm6, 16(%rax,%r15)
	movups	%xmm3, (%rax,%r15)
	addq	$64, %r15
	addq	$-4, %r11
	jne	LBB0_7
## %bb.8:
	cmpq	%r12, %rcx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r11                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_11
LBB0_9:
	leaq	(%r11,%r14,4), %rax
	addq	$12, %rax
	movl	%ecx, %r11d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r9,%rbx,4), %xmm1             ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	-12(%rax,%rbx,4), %xmm1
	movss	%xmm1, -12(%rax,%rbx,4)
	movss	4(%r9,%rbx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	-8(%rax,%rbx,4), %xmm1
	movss	%xmm1, -8(%rax,%rbx,4)
	movss	8(%r9,%rbx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	-4(%rax,%rbx,4), %xmm1
	movss	%xmm1, -4(%rax,%rbx,4)
	movss	12(%r9,%rbx,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	(%rax,%rbx,4), %xmm1
	movss	%xmm1, (%rax,%rbx,4)
	addq	$4, %rbx
	leal	(%r11,%rbx), %ecx
	cmpl	%r13d, %ecx
	jb	LBB0_10
LBB0_11:
	cmpl	%r8d, %r13d
	jge	LBB0_25
## %bb.12:
	movl	%r13d, %ebx
	leaq	(%r15,%rbx,4), %rax
	leaq	(%rax,%r10,4), %rcx
	leal	(%rsi,%r13), %eax
	movq	%r15, %r11
	movq	16(%rdi), %r15
	movslq	%eax, %r14
	notl	%esi
	addl	%esi, %edx
	subl	%r13d, %edx
	cmpl	$7, %edx
	jb	LBB0_23
## %bb.13:
	leaq	(%r15,%r14,4), %rax
	addq	%r10, %rbx
	leaq	(%rbx,%rdx), %rsi
	movq	%r11, %r9
	leaq	(%r11,%rsi,4), %rsi
	addq	$4, %rsi
	cmpq	%rsi, %rax
	jae	LBB0_15
## %bb.14:
	leaq	(%r14,%rdx), %rax
	leaq	(%r15,%rax,4), %rax
	addq	$4, %rax
	cmpq	%rax, %rcx
	jb	LBB0_23
LBB0_15:
	incq	%rdx
	movq	%rdx, %r10
	andq	$-8, %r10
	movaps	%xmm0, %xmm1
	shufps	$0, %xmm0, %xmm1                ## xmm1 = xmm1[0,0],xmm0[0,0]
	leaq	-8(%r10), %rax
	movq	%rax, %r11
	shrq	$3, %r11
	incq	%r11
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%r11, %rdi
	andq	$-2, %rdi
	leaq	(%r9,%rbx,4), %rbx
	addq	$48, %rbx
	leaq	(%r15,%r14,4), %rax
	addq	$48, %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movups	-48(%rbx,%rsi,4), %xmm2
	movups	-32(%rbx,%rsi,4), %xmm3
	mulps	%xmm1, %xmm2
	movups	-48(%rax,%rsi,4), %xmm4
	addps	%xmm2, %xmm4
	movups	-32(%rax,%rsi,4), %xmm2
	movups	-16(%rax,%rsi,4), %xmm5
	movups	(%rax,%rsi,4), %xmm6
	mulps	%xmm1, %xmm3
	addps	%xmm2, %xmm3
	movups	%xmm4, -48(%rax,%rsi,4)
	movups	%xmm3, -32(%rax,%rsi,4)
	movups	-16(%rbx,%rsi,4), %xmm2
	movups	(%rbx,%rsi,4), %xmm3
	mulps	%xmm1, %xmm2
	addps	%xmm5, %xmm2
	mulps	%xmm1, %xmm3
	addps	%xmm6, %xmm3
	movups	%xmm2, -16(%rax,%rsi,4)
	movups	%xmm3, (%rax,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_18
## %bb.19:
	testb	$1, %r11b
	je	LBB0_21
LBB0_20:
	leaq	(%rsi,%r14), %rax
	movups	(%rcx,%rsi,4), %xmm2
	movups	16(%rcx,%rsi,4), %xmm3
	movups	(%r15,%rax,4), %xmm4
	movups	16(%r15,%rax,4), %xmm5
	mulps	%xmm1, %xmm2
	addps	%xmm4, %xmm2
	mulps	%xmm1, %xmm3
	addps	%xmm5, %xmm3
	movups	%xmm2, (%r15,%rax,4)
	movups	%xmm3, 16(%r15,%rax,4)
LBB0_21:
	cmpq	%r10, %rdx
	je	LBB0_25
## %bb.22:
	addq	%r10, %r14
	leaq	(%rcx,%r10,4), %rcx
	addl	%r10d, %r13d
LBB0_23:
	leaq	(%r15,%r14,4), %rax
	movl	%r13d, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rsi,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	(%rax,%rsi,4), %xmm1
	movss	%xmm1, (%rax,%rsi,4)
	incq	%rsi
	leal	(%rdx,%rsi), %edi
	cmpl	%r8d, %edi
	jl	LBB0_24
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%esi, %esi
	testb	$1, %r11b
	jne	LBB0_20
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lin_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lin_calc
_lin_calc:                              ; @lin_calc
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	ldr	w8, [x0]
	cmp	w8, w2
	csel	w12, w8, w2, lt
	sub	w8, w12, w1
	ldr	x10, [x0, #8]
	lsl	w9, w3, #8
	sxtw	x11, w9
	ands	w9, w8, #0xfffc
	b.eq	LBB0_9
; %bb.1:
	add	x17, x10, x11, lsl #2
	ldr	x15, [x0, #16]
	sxtw	x16, w1
	sub	w13, w9, #4
	cmp	w13, #12
	b.lo	LBB0_6
; %bb.2:
	add	x2, x15, x16, lsl #2
	add	x14, x13, x16
	add	x14, x15, x14, lsl #2
	add	x14, x14, #16
	add	x3, x13, x11
	add	x3, x10, x3, lsl #2
	add	x3, x3, #16
	cmp	x2, x3
	ccmp	x17, x14, #2, lo
	b.lo	LBB0_6
; %bb.3:
	lsr	w13, w13, #2
	add	w3, w13, #1
	and	x4, x3, #0x7ffffffc
	add	x16, x16, x4, lsl #2
	add	x14, x17, x4, lsl #4
	lsl	w13, w4, #2
	dup.4s	v1, v0[0]
	mov	x5, x4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ld4.4s	{ v2, v3, v4, v5 }, [x17], #64
	ld4.4s	{ v16, v17, v18, v19 }, [x2]
	fmla.4s	v16, v2, v1
	fmla.4s	v17, v3, v1
	fmla.4s	v18, v4, v1
	fmla.4s	v19, v5, v1
	st4.4s	{ v16, v17, v18, v19 }, [x2], #64
	subs	x5, x5, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x4, x3
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w13, #0
	mov	x14, x17
LBB0_7:
	add	x15, x15, x16, lsl #2
	add	x15, x15, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x14]
	ldp	s2, s3, [x15, #-8]
	fmadd	s1, s0, s1, s2
	stur	s1, [x15, #-8]
	ldr	s1, [x14, #4]
	fmadd	s1, s0, s1, s3
	stur	s1, [x15, #-4]
	ldr	s1, [x14, #8]
	ldp	s2, s3, [x15]
	fmadd	s1, s0, s1, s2
	str	s1, [x15]
	ldr	s1, [x14, #12]
	fmadd	s1, s0, s1, s3
	str	s1, [x15, #4]
	add	w13, w13, #4
	add	x15, x15, #16
	add	x14, x14, #16
	cmp	w13, w9
	b.lo	LBB0_8
LBB0_9:
	cmp	w9, w8
	b.ge	LBB0_17
; %bb.10:
	add	x13, x10, w9, uxtw #2
	add	x13, x13, x11, lsl #2
	add	w15, w9, w1
	ldr	x14, [x0, #16]
	sxtw	x15, w15
	mvn	w16, w1
	add	w12, w12, w16
	sub	w12, w12, w9
	cmp	w12, #15
	b.lo	LBB0_15
; %bb.11:
	add	x16, x14, x15, lsl #2
	add	x17, x15, x12
	add	x17, x14, x17, lsl #2
	add	x0, x17, #4
	add	x17, x9, x11
	add	x11, x17, x12
	add	x11, x10, x11, lsl #2
	add	x11, x11, #4
	cmp	x16, x11
	ccmp	x13, x0, #2, lo
	b.lo	LBB0_15
; %bb.12:
	add	x11, x12, #1
	and	x12, x11, #0x1fffffff0
	add	x15, x12, x15
	add	x13, x13, x12, lsl #2
	add	w9, w9, w12
	dup.4s	v1, v0[0]
	add	x16, x16, #32
	add	x10, x10, x17, lsl #2
	add	x10, x10, #32
	mov	x17, x12
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x10, #-32]
	ldp	q4, q5, [x10], #64
	ldp	q6, q7, [x16, #-32]
	ldp	q16, q17, [x16]
	fmla.4s	v6, v2, v1
	fmla.4s	v7, v3, v1
	fmla.4s	v16, v4, v1
	fmla.4s	v17, v5, v1
	stp	q6, q7, [x16, #-32]
	stp	q16, q17, [x16], #64
	subs	x17, x17, #16
	b.ne	LBB0_13
; %bb.14:
	cmp	x11, x12
	b.eq	LBB0_17
LBB0_15:
	add	x10, x14, x15, lsl #2
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x13], #4
	ldr	s2, [x10]
	fmadd	s1, s0, s1, s2
	str	s1, [x10], #4
	add	w9, w9, #1
	cmp	w9, w8
	b.lt	LBB0_16
LBB0_17:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lin_calc
.subsections_via_symbols
