; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (interpolation)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.414 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.415 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.416 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24lstfitpiecewiselinearrdpEPNS_9ae_vectorES1_ldS1_S1_PlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, double noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca %"struct.alglib_impl::ae_vector", align 8
  %26 = alloca %"struct.alglib_impl::ae_vector", align 8
  %27 = alloca double, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store double %3, ptr %12, align 8, !tbaa !11
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %30, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 64, i1 false)
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %18, ptr noundef %31, ptr noundef %32, i1 noundef zeroext true)
  store ptr %18, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %19, ptr noundef %33, ptr noundef %34, i1 noundef zeroext true)
  store ptr %19, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %35)
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %36)
  %37 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %37, align 8, !tbaa !9
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 3, ptr noundef %40, i1 noundef zeroext true)
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %26, i64 noundef 0, i64 noundef 3, ptr noundef %41, i1 noundef zeroext true)
  %42 = load i64, ptr %11, align 8, !tbaa !9
  %43 = icmp sge i64 %42, 0
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.414, ptr noundef %44)
  %45 = load double, ptr %12, align 8, !tbaa !11
  %46 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %45, double noundef 0.000000e+00)
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.415, ptr noundef %47)
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = icmp sge i64 %50, %51
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.416, ptr noundef %53)
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !13
  %57 = load i64, ptr %11, align 8, !tbaa !9
  %58 = icmp sge i64 %56, %57
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.417, ptr noundef %59)
  %60 = load i64, ptr %11, align 8, !tbaa !9
  %61 = icmp sle i64 %60, 1
  br i1 %61, label %62, label %65

62:                                               ; preds = %8
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %63, align 8, !tbaa !9
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %64)
  store i32 1, ptr %29, align 4
  br label %249

65:                                               ; preds = %8
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load i64, ptr %11, align 8, !tbaa !9
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %66, ptr noundef %67, ptr noundef %23, ptr noundef %24, i64 noundef %68, ptr noundef %69)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %139, %65
  %71 = load i64, ptr %20, align 8, !tbaa !9
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = icmp sle i64 %71, %73
  br i1 %74, label %75, label %141

75:                                               ; preds = %70
  %76 = load i64, ptr %20, align 8, !tbaa !9
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %21, align 8, !tbaa !9
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !17
  %81 = load i64, ptr %20, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !11
  store double %83, ptr %27, align 8, !tbaa !11
  br label %84

84:                                               ; preds = %105, %75
  %85 = load i64, ptr %21, align 8, !tbaa !9
  %86 = load i64, ptr %11, align 8, !tbaa !9
  %87 = sub nsw i64 %86, 1
  %88 = icmp sle i64 %85, %87
  br i1 %88, label %89, label %103

89:                                               ; preds = %84
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load i64, ptr %21, align 8, !tbaa !9
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !17
  %99 = load i64, ptr %20, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !11
  %102 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %95, double noundef %101)
  br label %103

103:                                              ; preds = %89, %84
  %104 = phi i1 [ false, %84 ], [ %102, %89 ]
  br i1 %104, label %105, label %116

105:                                              ; preds = %103
  %106 = load double, ptr %27, align 8, !tbaa !11
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = fadd double %106, %112
  store double %113, ptr %27, align 8, !tbaa !11
  %114 = load i64, ptr %21, align 8, !tbaa !9
  %115 = add nsw i64 %114, 1
  store i64 %115, ptr %21, align 8, !tbaa !9
  br label %84, !llvm.loop !18

116:                                              ; preds = %103
  %117 = load double, ptr %27, align 8, !tbaa !11
  %118 = load i64, ptr %21, align 8, !tbaa !9
  %119 = load i64, ptr %20, align 8, !tbaa !9
  %120 = sub nsw i64 %118, %119
  %121 = sitofp i64 %120 to double
  %122 = fdiv double %117, %121
  store double %122, ptr %27, align 8, !tbaa !11
  %123 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %123, ptr %22, align 8, !tbaa !9
  br label %124

124:                                              ; preds = %136, %116
  %125 = load i64, ptr %22, align 8, !tbaa !9
  %126 = load i64, ptr %21, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 1
  %128 = icmp sle i64 %125, %127
  br i1 %128, label %129, label %139

129:                                              ; preds = %124
  %130 = load double, ptr %27, align 8, !tbaa !11
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = load i64, ptr %22, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  store double %130, ptr %135, align 8, !tbaa !11
  br label %136

136:                                              ; preds = %129
  %137 = load i64, ptr %22, align 8, !tbaa !9
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %22, align 8, !tbaa !9
  br label %124, !llvm.loop !20

139:                                              ; preds = %124
  %140 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %140, ptr %20, align 8, !tbaa !9
  br label %70, !llvm.loop !21

141:                                              ; preds = %70
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !17
  %145 = load i64, ptr %11, align 8, !tbaa !9
  %146 = sub nsw i64 %145, 1
  %147 = getelementptr inbounds double, ptr %144, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  %152 = getelementptr inbounds double, ptr %151, i64 0
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %148, double noundef %153)
  br i1 %154, label %155, label %158

155:                                              ; preds = %141
  %156 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %156, align 8, !tbaa !9
  %157 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %157)
  store i32 1, ptr %29, align 4
  br label %249

158:                                              ; preds = %141
  %159 = load i64, ptr %11, align 8, !tbaa !9
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %159, ptr noundef %160)
  %161 = load i64, ptr %11, align 8, !tbaa !9
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %26, i64 noundef %161, ptr noundef %162)
  store i64 2, ptr %28, align 8, !tbaa !9
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !17
  %166 = getelementptr inbounds double, ptr %165, i64 0
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  %170 = getelementptr inbounds double, ptr %169, i64 0
  store double %167, ptr %170, align 8, !tbaa !11
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %171, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = getelementptr inbounds double, ptr %173, i64 0
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !17
  %178 = getelementptr inbounds double, ptr %177, i64 0
  store double %175, ptr %178, align 8, !tbaa !11
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %179, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !17
  %182 = load i64, ptr %11, align 8, !tbaa !9
  %183 = sub nsw i64 %182, 1
  %184 = getelementptr inbounds double, ptr %181, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !11
  %186 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !17
  %188 = getelementptr inbounds double, ptr %187, i64 1
  store double %185, ptr %188, align 8, !tbaa !11
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %189, i32 0, i32 4
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  %192 = load i64, ptr %11, align 8, !tbaa !9
  %193 = sub nsw i64 %192, 1
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !11
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !17
  %198 = getelementptr inbounds double, ptr %197, i64 1
  store double %195, ptr %198, align 8, !tbaa !11
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = load i64, ptr %11, align 8, !tbaa !9
  %202 = sub nsw i64 %201, 1
  %203 = load double, ptr %12, align 8, !tbaa !11
  %204 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL18lsfit_rdprecursiveEPNS_9ae_vectorES1_lldS1_S1_PlPNS_8ae_stateE(ptr noundef %199, ptr noundef %200, i64 noundef 0, i64 noundef %202, double noundef %203, ptr noundef %25, ptr noundef %26, ptr noundef %28, ptr noundef %204)
  %205 = load i64, ptr %28, align 8, !tbaa !9
  %206 = sub nsw i64 %205, 1
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 %206, ptr %207, align 8, !tbaa !9
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = load i64, ptr %28, align 8, !tbaa !9
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %208, i64 noundef %209, ptr noundef %210)
  %211 = load ptr, ptr %14, align 8, !tbaa !5
  %212 = load i64, ptr %28, align 8, !tbaa !9
  %213 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %211, i64 noundef %212, ptr noundef %213)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %214

214:                                              ; preds = %240, %158
  %215 = load i64, ptr %20, align 8, !tbaa !9
  %216 = load ptr, ptr %15, align 8, !tbaa !5
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = icmp sle i64 %215, %217
  br i1 %218, label %219, label %243

219:                                              ; preds = %214
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !17
  %222 = load i64, ptr %20, align 8, !tbaa !9
  %223 = getelementptr inbounds double, ptr %221, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !11
  %225 = load ptr, ptr %13, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %225, i32 0, i32 4
  %227 = load ptr, ptr %226, align 8, !tbaa !17
  %228 = load i64, ptr %20, align 8, !tbaa !9
  %229 = getelementptr inbounds double, ptr %227, i64 %228
  store double %224, ptr %229, align 8, !tbaa !11
  %230 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %231 = load ptr, ptr %230, align 8, !tbaa !17
  %232 = load i64, ptr %20, align 8, !tbaa !9
  %233 = getelementptr inbounds double, ptr %231, i64 %232
  %234 = load double, ptr %233, align 8, !tbaa !11
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %235, i32 0, i32 4
  %237 = load ptr, ptr %236, align 8, !tbaa !17
  %238 = load i64, ptr %20, align 8, !tbaa !9
  %239 = getelementptr inbounds double, ptr %237, i64 %238
  store double %234, ptr %239, align 8, !tbaa !11
  br label %240

240:                                              ; preds = %219
  %241 = load i64, ptr %20, align 8, !tbaa !9
  %242 = add nsw i64 %241, 1
  store i64 %242, ptr %20, align 8, !tbaa !9
  br label %214, !llvm.loop !22

243:                                              ; preds = %214
  %244 = load ptr, ptr %13, align 8, !tbaa !5
  %245 = load ptr, ptr %14, align 8, !tbaa !5
  %246 = load i64, ptr %28, align 8, !tbaa !9
  %247 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %244, ptr noundef %245, ptr noundef %23, ptr noundef %24, i64 noundef %246, ptr noundef %247)
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %248)
  store i32 0, ptr %29, align 4
  br label %249

249:                                              ; preds = %243, %155, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  %250 = load i32, ptr %29, align 4
  switch i32 %250, label %252 [
    i32 0, label %251
    i32 1, label %251
  ]

251:                                              ; preds = %249, %249
  ret void

252:                                              ; preds = %249
  unreachable
}

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL18lsfit_rdprecursiveEPNS_9ae_vectorES1_lldS1_S1_PlPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.414 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.415 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.416 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24lstfitpiecewiselinearrdpEPNS_9ae_vectorES1_ldS1_S1_PlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, double noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %0, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %1, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  %17 = icmp sgt i64 %2, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.414, ptr noundef %7)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %3, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.415, ptr noundef %7)
  %19 = load i64, ptr %10, align 8, !tbaa !9
  %20 = icmp sge i64 %19, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.416, ptr noundef %7)
  %21 = load i64, ptr %11, align 8, !tbaa !9
  %22 = icmp sge i64 %21, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.417, ptr noundef %7)
  %23 = icmp slt i64 %2, 2
  br i1 %23, label %24, label %25

24:                                               ; preds = %8
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %140

25:                                               ; preds = %8
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, i64 noundef %2, ptr noundef %7)
  %26 = add nsw i64 %2, -1
  %27 = getelementptr inbounds i8, ptr %11, i64 56
  %28 = getelementptr inbounds i8, ptr %10, i64 56
  br label %29

.loopexit:                                        ; preds = %.lr.ph113.prol.loopexit, %.lr.ph113, %.critedge
  %.not.not = icmp slt i64 %.093.lcssa, %2
  br i1 %.not.not, label %29, label %71, !llvm.loop !14

29:                                               ; preds = %25, %.loopexit
  %.094114 = phi i64 [ 0, %25 ], [ %.093.lcssa, %.loopexit ]
  %30 = load ptr, ptr %27, align 8, !tbaa !16
  %31 = getelementptr inbounds double, ptr %30, i64 %.094114
  %32 = load double, ptr %31, align 8, !tbaa !17
  %.093100 = add nsw i64 %.094114, 1
  %.not98.not101 = icmp slt i64 %.094114, %26
  br i1 %.not98.not101, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %29
  %33 = load ptr, ptr %28, align 8, !tbaa !16
  %34 = getelementptr inbounds double, ptr %33, i64 %.093100
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds double, ptr %33, i64 %.094114
  %37 = load double, ptr %36, align 8, !tbaa !17
  %38 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %35, double noundef %37)
  br i1 %38, label %.lr.ph123, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph123
  %39 = load ptr, ptr %28, align 8, !tbaa !16
  %40 = getelementptr inbounds double, ptr %39, i64 %.093
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds double, ptr %39, i64 %.094114
  %43 = load double, ptr %42, align 8, !tbaa !17
  %44 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %41, double noundef %43)
  br i1 %44, label %.lr.ph123, label %.critedge, !llvm.loop !19

.lr.ph123:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.0103122 = phi double [ %48, %.lr.ph ], [ %32, %.lr.ph.preheader ]
  %.093104121 = phi i64 [ %.093, %.lr.ph ], [ %.093100, %.lr.ph.preheader ]
  %45 = load ptr, ptr %27, align 8, !tbaa !16
  %46 = getelementptr inbounds double, ptr %45, i64 %.093104121
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = fadd double %.0103122, %47
  %.093 = add i64 %.093104121, 1
  %exitcond.not = icmp eq i64 %.093, %2
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !19

.critedge:                                        ; preds = %.lr.ph123, %.lr.ph, %.lr.ph.preheader, %29
  %.093.in.lcssa = phi i64 [ %.094114, %29 ], [ %.094114, %.lr.ph.preheader ], [ %.093104121, %.lr.ph ], [ %.093104121, %.lr.ph123 ]
  %.0.lcssa = phi double [ %32, %29 ], [ %32, %.lr.ph.preheader ], [ %48, %.lr.ph ], [ %48, %.lr.ph123 ]
  %.093.lcssa = phi i64 [ %.093100, %29 ], [ %.093100, %.lr.ph.preheader ], [ %.093, %.lr.ph ], [ %2, %.lr.ph123 ]
  %49 = sub nsw i64 %.093.lcssa, %.094114
  %50 = sitofp i64 %49 to double
  %51 = fdiv double %.0.lcssa, %50
  %.not99111 = icmp sgt i64 %.094114, %.093.in.lcssa
  br i1 %.not99111, label %.loopexit, label %.lr.ph113.preheader

.lr.ph113.preheader:                              ; preds = %.critedge
  %52 = add i64 %.093.in.lcssa, 1
  %53 = sub i64 %52, %.094114
  %54 = sub i64 %.093.in.lcssa, %.094114
  %xtraiter = and i64 %53, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph113.prol.loopexit, label %.lr.ph113.prol

.lr.ph113.prol:                                   ; preds = %.lr.ph113.preheader, %.lr.ph113.prol
  %.092112.prol = phi i64 [ %57, %.lr.ph113.prol ], [ %.094114, %.lr.ph113.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph113.prol ], [ 0, %.lr.ph113.preheader ]
  %55 = load ptr, ptr %27, align 8, !tbaa !16
  %56 = getelementptr inbounds double, ptr %55, i64 %.092112.prol
  store double %51, ptr %56, align 8, !tbaa !17
  %57 = add i64 %.092112.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph113.prol.loopexit, label %.lr.ph113.prol, !llvm.loop !20

.lr.ph113.prol.loopexit:                          ; preds = %.lr.ph113.prol, %.lr.ph113.preheader
  %.092112.unr = phi i64 [ %.094114, %.lr.ph113.preheader ], [ %57, %.lr.ph113.prol ]
  %58 = icmp ult i64 %54, 3
  br i1 %58, label %.loopexit, label %.lr.ph113

.lr.ph113:                                        ; preds = %.lr.ph113.prol.loopexit, %.lr.ph113
  %.092112 = phi i64 [ %70, %.lr.ph113 ], [ %.092112.unr, %.lr.ph113.prol.loopexit ]
  %59 = load ptr, ptr %27, align 8, !tbaa !16
  %60 = getelementptr inbounds double, ptr %59, i64 %.092112
  store double %51, ptr %60, align 8, !tbaa !17
  %61 = load ptr, ptr %27, align 8, !tbaa !16
  %62 = getelementptr double, ptr %61, i64 %.092112
  %63 = getelementptr i8, ptr %62, i64 8
  store double %51, ptr %63, align 8, !tbaa !17
  %64 = load ptr, ptr %27, align 8, !tbaa !16
  %65 = getelementptr double, ptr %64, i64 %.092112
  %66 = getelementptr i8, ptr %65, i64 16
  store double %51, ptr %66, align 8, !tbaa !17
  %67 = add i64 %.092112, 3
  %68 = load ptr, ptr %27, align 8, !tbaa !16
  %69 = getelementptr inbounds double, ptr %68, i64 %67
  store double %51, ptr %69, align 8, !tbaa !17
  %70 = add i64 %.092112, 4
  %exitcond119.not.3 = icmp eq i64 %67, %.093.in.lcssa
  br i1 %exitcond119.not.3, label %.loopexit, label %.lr.ph113, !llvm.loop !22

71:                                               ; preds = %.loopexit
  %72 = load ptr, ptr %28, align 8, !tbaa !16
  %73 = getelementptr inbounds double, ptr %72, i64 %26
  %74 = load double, ptr %73, align 8, !tbaa !17
  %75 = load double, ptr %72, align 8, !tbaa !17
  %76 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %74, double noundef %75)
  br i1 %76, label %77, label %78

77:                                               ; preds = %71
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %140

78:                                               ; preds = %71
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %2, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %2, ptr noundef %7)
  store i64 2, ptr %16, align 8, !tbaa !5
  %79 = load ptr, ptr %28, align 8, !tbaa !16
  %80 = load double, ptr %79, align 8, !tbaa !17
  %81 = getelementptr inbounds i8, ptr %14, i64 56
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  store double %80, ptr %82, align 8, !tbaa !17
  %83 = load ptr, ptr %27, align 8, !tbaa !16
  %84 = load double, ptr %83, align 8, !tbaa !17
  %85 = getelementptr inbounds i8, ptr %15, i64 56
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  store double %84, ptr %86, align 8, !tbaa !17
  %87 = load ptr, ptr %28, align 8, !tbaa !16
  %88 = getelementptr inbounds double, ptr %87, i64 %26
  %89 = load double, ptr %88, align 8, !tbaa !17
  %90 = load ptr, ptr %81, align 8, !tbaa !16
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  store double %89, ptr %91, align 8, !tbaa !17
  %92 = load ptr, ptr %27, align 8, !tbaa !16
  %93 = getelementptr inbounds double, ptr %92, i64 %26
  %94 = load double, ptr %93, align 8, !tbaa !17
  %95 = load ptr, ptr %85, align 8, !tbaa !16
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  store double %94, ptr %96, align 8, !tbaa !17
  call void @_ZN11alglib_implL18lsfit_rdprecursiveEPNS_9ae_vectorES1_lldS1_S1_PlPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef 0, i64 noundef %26, double noundef %3, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %7)
  %97 = load i64, ptr %16, align 8, !tbaa !5
  %98 = add nsw i64 %97, -1
  store i64 %98, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %97, ptr noundef %7)
  %99 = load i64, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %99, ptr noundef %7)
  %100 = load i64, ptr %6, align 8, !tbaa !5
  %.not115 = icmp slt i64 %100, 0
  br i1 %.not115, label %._crit_edge, label %.lr.ph117

.lr.ph117:                                        ; preds = %78
  %101 = getelementptr inbounds i8, ptr %4, i64 56
  %102 = getelementptr inbounds i8, ptr %5, i64 56
  %103 = icmp eq i64 %100, 0
  br i1 %103, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph117.new

.lr.ph117.new:                                    ; preds = %.lr.ph117
  %104 = add nuw i64 %100, 1
  %unroll_iter = and i64 %104, -2
  br label %105

105:                                              ; preds = %105, %.lr.ph117.new
  %.1116 = phi i64 [ 0, %.lr.ph117.new ], [ %127, %105 ]
  %niter = phi i64 [ 0, %.lr.ph117.new ], [ %niter.next.1, %105 ]
  %106 = load ptr, ptr %81, align 8, !tbaa !16
  %107 = getelementptr inbounds double, ptr %106, i64 %.1116
  %108 = load double, ptr %107, align 8, !tbaa !17
  %109 = load ptr, ptr %101, align 8, !tbaa !16
  %110 = getelementptr inbounds double, ptr %109, i64 %.1116
  store double %108, ptr %110, align 8, !tbaa !17
  %111 = load ptr, ptr %85, align 8, !tbaa !16
  %112 = getelementptr inbounds double, ptr %111, i64 %.1116
  %113 = load double, ptr %112, align 8, !tbaa !17
  %114 = load ptr, ptr %102, align 8, !tbaa !16
  %115 = getelementptr inbounds double, ptr %114, i64 %.1116
  store double %113, ptr %115, align 8, !tbaa !17
  %116 = or disjoint i64 %.1116, 1
  %117 = load ptr, ptr %81, align 8, !tbaa !16
  %118 = getelementptr inbounds double, ptr %117, i64 %116
  %119 = load double, ptr %118, align 8, !tbaa !17
  %120 = load ptr, ptr %101, align 8, !tbaa !16
  %121 = getelementptr inbounds double, ptr %120, i64 %116
  store double %119, ptr %121, align 8, !tbaa !17
  %122 = load ptr, ptr %85, align 8, !tbaa !16
  %123 = getelementptr inbounds double, ptr %122, i64 %116
  %124 = load double, ptr %123, align 8, !tbaa !17
  %125 = load ptr, ptr %102, align 8, !tbaa !16
  %126 = getelementptr inbounds double, ptr %125, i64 %116
  store double %124, ptr %126, align 8, !tbaa !17
  %127 = add nuw i64 %.1116, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %105, !llvm.loop !23

._crit_edge.loopexit.unr-lcssa:                   ; preds = %105, %.lr.ph117
  %.1116.unr = phi i64 [ 0, %.lr.ph117 ], [ %127, %105 ]
  %128 = and i64 %100, 1
  %lcmp.mod130.not.not = icmp eq i64 %128, 0
  br i1 %lcmp.mod130.not.not, label %._crit_edge.loopexit.epilog-lcssa, label %._crit_edge

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %129 = load ptr, ptr %81, align 8, !tbaa !16
  %130 = getelementptr inbounds double, ptr %129, i64 %.1116.unr
  %131 = load double, ptr %130, align 8, !tbaa !17
  %132 = load ptr, ptr %101, align 8, !tbaa !16
  %133 = getelementptr inbounds double, ptr %132, i64 %.1116.unr
  store double %131, ptr %133, align 8, !tbaa !17
  %134 = load ptr, ptr %85, align 8, !tbaa !16
  %135 = getelementptr inbounds double, ptr %134, i64 %.1116.unr
  %136 = load double, ptr %135, align 8, !tbaa !17
  %137 = load ptr, ptr %102, align 8, !tbaa !16
  %138 = getelementptr inbounds double, ptr %137, i64 %.1116.unr
  store double %136, ptr %138, align 8, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %78
  %139 = load i64, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %4, ptr noundef %5, ptr noundef nonnull %12, ptr noundef nonnull %13, i64 noundef %139, ptr noundef %7)
  br label %140

140:                                              ; preds = %._crit_edge, %77, %24
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL18lsfit_rdprecursiveEPNS_9ae_vectorES1_lldS1_S1_PlPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 24, !7, i64 56}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass