	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function fit_line
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.space	8
LCPI0_2:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fit_line:                              ## @fit_line
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %r10d
	leal	-1(%rsi), %eax
	cltq
	leaq	(%rax,%rax,2), %rax
	shlq	$5, %rax
	movl	4(%rdi,%rax), %r9d
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	(%r8), %r8d
	movl	%esi, %eax
	shlq	$5, %rax
	leaq	(%rax,%rax,2), %r11
	xorpd	%xmm9, %xmm9
	xorpd	%xmm10, %xmm10
	xorl	%ebx, %ebx
	movsd	LCPI0_0(%rip), %xmm8            ## xmm8 = mem[0],zero
	xorpd	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rdi,%rbx), %r12d
	movl	12(%rdi,%rbx), %ecx
	leal	(%rcx,%r12), %eax
	imull	%r8d, %eax
	leal	1(%rcx), %esi
	cltd
	idivl	%esi
	xorps	%xmm4, %xmm4
	cvtsi2sd	%eax, %xmm4
	xorps	%xmm5, %xmm5
	cvtsi2sdq	88(%rdi,%rbx), %xmm5
	movsd	16(%rdi,%rbx), %xmm6            ## xmm6 = mem[0],zero
	xorps	%xmm7, %xmm7
	cvtsi2sdq	80(%rdi,%rbx), %xmm7
	xorps	%xmm0, %xmm0
	cvtsi2sdq	72(%rdi,%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	56(%rdi,%rbx), %xmm1
	unpcklpd	%xmm7, %xmm0                    ## xmm0 = xmm0[0],xmm7[0]
	xorps	%xmm7, %xmm7
	cvtsi2sd	%r12d, %xmm7
	addsd	%xmm8, %xmm4
	unpcklpd	%xmm1, %xmm7                    ## xmm7 = xmm7[0],xmm1[0]
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ecx, %xmm1
	mulsd	%xmm4, %xmm6
	movsd	32(%rdi,%rbx), %xmm2            ## xmm2 = mem[0],zero
	movhpd	24(%rdi,%rbx), %xmm2            ## xmm2 = xmm2[0],mem[0]
	addsd	%xmm5, %xmm6
	movhpd	48(%rdi,%rbx), %xmm1            ## xmm1 = xmm1[0],mem[0]
	movddup	%xmm4, %xmm4                    ## xmm4 = xmm4[0,0]
	addsd	%xmm6, %xmm10
	mulpd	%xmm4, %xmm1
	addpd	%xmm7, %xmm1
	mulpd	%xmm4, %xmm2
	addpd	%xmm1, %xmm9
	addpd	%xmm0, %xmm2
	addpd	%xmm2, %xmm3
	addq	$96, %rbx
	cmpq	%rbx, %r11
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorpd	%xmm9, %xmm9
	xorpd	%xmm10, %xmm10
	xorpd	%xmm3, %xmm3
LBB0_4:
	movl	(%r15), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r10d, %xmm0
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movl	%r10d, %ecx
	imull	%r10d, %ecx
	movd	%ecx, %xmm1
	pinsrd	$1, %eax, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	addsd	%xmm0, %xmm10
	imull	%r10d, %eax
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	movapd	LCPI0_1(%rip), %xmm4            ## xmm4 = <1.0E+0,u>
	unpcklpd	%xmm2, %xmm4                    ## xmm4 = xmm4[0],xmm2[0]
	addpd	%xmm1, %xmm3
	addpd	%xmm4, %xmm9
LBB0_6:
	movl	(%r14), %eax
	xorps	%xmm5, %xmm5
	cvtsi2sd	%r9d, %xmm5
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movl	%r9d, %ecx
	imull	%r9d, %ecx
	movd	%ecx, %xmm1
	pinsrd	$1, %eax, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	addsd	%xmm5, %xmm10
	imull	%r9d, %eax
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	movapd	LCPI0_1(%rip), %xmm4            ## xmm4 = <1.0E+0,u>
	unpcklpd	%xmm2, %xmm4                    ## xmm4 = xmm4[0],xmm2[0]
	addpd	%xmm1, %xmm3
	addpd	%xmm4, %xmm9
LBB0_8:
	movapd	%xmm10, %xmm1
	mulsd	%xmm10, %xmm1
	movapd	%xmm9, %xmm4
	mulsd	%xmm3, %xmm4
	subsd	%xmm1, %xmm4
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	LBB0_16
## %bb.9:
	movapd	LCPI0_2(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0]
	xorpd	%xmm10, %xmm1
	movapd	%xmm9, %xmm6
	unpckhpd	%xmm9, %xmm6                    ## xmm6 = xmm6[1],xmm9[1]
	mulsd	%xmm6, %xmm10
	movapd	%xmm3, %xmm2
	unpckhpd	%xmm3, %xmm2                    ## xmm2 = xmm2[1],xmm3[1]
	movapd	%xmm2, %xmm7
	mulsd	%xmm3, %xmm7
	subsd	%xmm10, %xmm7
	divsd	%xmm4, %xmm7
	movapd	%xmm7, -80(%rbp)                ## 16-byte Spill
	mulsd	%xmm1, %xmm2
	mulsd	%xmm9, %xmm6
	addsd	%xmm2, %xmm6
	divsd	%xmm4, %xmm6
	movapd	%xmm6, -64(%rbp)                ## 16-byte Spill
	mulsd	%xmm6, %xmm0
	addsd	%xmm7, %xmm0
	movsd	%xmm5, -40(%rbp)                ## 8-byte Spill
	callq	_rint
	movl	%eax, (%r15)
	movapd	-64(%rbp), %xmm0                ## 16-byte Reload
	mulsd	-40(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	-80(%rbp), %xmm0                ## 16-byte Folded Reload
	callq	_rint
	movl	%eax, (%r14)
	movl	(%r15), %ecx
	cmpl	$1024, %ecx                     ## imm = 0x400
	jge	LBB0_10
## %bb.11:
	cmpl	$1024, %eax                     ## imm = 0x400
	jge	LBB0_12
LBB0_13:
	testl	%ecx, %ecx
	js	LBB0_14
LBB0_15:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jns	LBB0_18
	jmp	LBB0_17
LBB0_16:
	movl	$0, (%r15)
	movl	$1, %ecx
LBB0_17:
	movl	$0, (%r14)
LBB0_18:
	movl	%ecx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$1023, (%r15)                   ## imm = 0x3FF
	movl	(%r14), %eax
	movl	$1023, %ecx                     ## imm = 0x3FF
	cmpl	$1024, %eax                     ## imm = 0x400
	jl	LBB0_13
LBB0_12:
	movl	$1023, (%r14)                   ## imm = 0x3FF
	movl	(%r15), %ecx
	movl	$1023, %eax                     ## imm = 0x3FF
	testl	%ecx, %ecx
	jns	LBB0_15
LBB0_14:
	movl	$0, (%r15)
	movl	(%r14), %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_fit_line
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fit_line
_fit_line:                              ; @fit_line
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	.cfi_offset b10, -56
	.cfi_offset b11, -64
	mov	x19, x3
	mov	x20, x2
	ldr	w8, [x0]
	mov	w9, #96
	smaddl	x9, w1, w9, x0
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	w10, [x4]
	mov	w11, w1
	add	x12, x0, #48
	movi	d1, #0000000000000000
	fmov	d5, #1.00000000
	movi	d3, #0000000000000000
	movi	d4, #0000000000000000
	movi	d2, #0000000000000000
	movi	d0, #0000000000000000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w13, w14, [x12, #-40]
	add	w15, w14, w13
	mul	w15, w15, w10
	add	w16, w14, #1
	sdiv	w15, w15, w16
	scvtf	d6, w15
	ldr	d7, [x12, #40]
	scvtf	d7, d7
	ldp	d16, d17, [x12, #-32]
	fadd	d6, d6, d5
	fmadd	d7, d16, d6, d7
	ldp	d18, d16, [x12, #24]
	scvtf	d16, d16
	fmadd	d16, d17, d6, d16
	fadd	d1, d1, d7
	fadd	d3, d3, d16
	scvtf	d7, d18
	ldur	d16, [x12, #-16]
	fmadd	d7, d16, d6, d7
	fadd	d4, d4, d7
	ldp	d7, d16, [x12], #96
	scvtf	d16, d16
	fmadd	d7, d7, d6, d16
	scvtf	d16, w13
	fadd	d2, d2, d7
	scvtf	d7, w14
	fmadd	d6, d7, d6, d16
	fadd	d0, d0, d6
	subs	x11, x11, #1
	b.ne	LBB0_2
	b	LBB0_4
LBB0_3:
	movi	d0, #0000000000000000
	movi	d2, #0000000000000000
	movi	d4, #0000000000000000
	movi	d3, #0000000000000000
	movi	d1, #0000000000000000
LBB0_4:
	ldur	w9, [x9, #-92]
	ldr	w10, [x20]
	scvtf	d5, w8
	tbnz	w10, #31, LBB0_6
; %bb.5:
	scvtf	d6, w10
	fadd	d1, d1, d5
	fadd	d3, d3, d6
	mul	w11, w8, w8
	scvtf	d6, w11
	fadd	d4, d4, d6
	mul	w8, w10, w8
	scvtf	d6, w8
	fadd	d2, d2, d6
	fmov	d6, #1.00000000
	fadd	d0, d0, d6
LBB0_6:
	ldr	w8, [x19]
	scvtf	d8, w9
	tbnz	w8, #31, LBB0_8
; %bb.7:
	scvtf	d6, w8
	fadd	d1, d1, d8
	fadd	d3, d3, d6
	mul	w10, w9, w9
	scvtf	d6, w10
	fadd	d4, d4, d6
	mul	w8, w8, w9
	scvtf	d6, w8
	fadd	d2, d2, d6
	fmov	d6, #1.00000000
	fadd	d0, d0, d6
LBB0_8:
	fneg	d6, d1
	fmul	d7, d1, d6
	fmadd	d7, d0, d4, d7
	fcmp	d7, #0.0
	b.le	LBB0_13
; %bb.9:
	fneg	d16, d2
	fmul	d1, d1, d16
	fmadd	d1, d3, d4, d1
	fdiv	d9, d1, d7
	fmul	d1, d3, d6
	fmadd	d0, d0, d2, d1
	fdiv	d10, d0, d7
	fmadd	d0, d10, d5, d9
	bl	_rint
	str	w0, [x20]
	fmadd	d0, d10, d8, d9
	bl	_rint
	str	w0, [x19]
	ldr	w8, [x20]
	cmp	w8, #1024
	b.ge	LBB0_16
; %bb.10:
	cmp	w0, #1024
	b.ge	LBB0_17
LBB0_11:
	tbnz	w8, #31, LBB0_18
LBB0_12:
	mov	w8, #0
	mov	w1, #0
	tbz	w0, #31, LBB0_15
	b	LBB0_14
LBB0_13:
	str	wzr, [x20]
	mov	w8, #1
LBB0_14:
	str	wzr, [x19]
	mov	x1, x8
LBB0_15:
	mov	x0, x1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w8, #1023
	str	w8, [x20]
	ldr	w0, [x19]
	cmp	w0, #1024
	b.lt	LBB0_11
LBB0_17:
	mov	w0, #1023
	str	w0, [x19]
	ldr	w8, [x20]
	tbz	w8, #31, LBB0_12
LBB0_18:
	str	wzr, [x20]
	ldr	w0, [x19]
	b	LBB0_12
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_fit_line
.subsections_via_symbols
