; LLVM IR from Dimandragon/non-parametric-dsp :: 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.415 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.416 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.418 = 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_impl24lstfitpiecewiselinearrdpEPKNS_9ae_vectorES2_ldPS0_S3_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_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %18, ptr noundef %31, ptr noundef %32, i1 noundef zeroext true)
  %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_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %19, ptr noundef %33, ptr noundef %34, i1 noundef zeroext true)
  %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.415, 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.416, ptr noundef %47)
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 0
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = load i64, ptr %11, align 8, !tbaa !9
  %51 = icmp sge i64 %49, %50
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.417, ptr noundef %52)
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 0
  %54 = load i64, ptr %53, align 8, !tbaa !13
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = icmp sge i64 %54, %55
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.418, ptr noundef %57)
  %58 = load i64, ptr %11, align 8, !tbaa !9
  %59 = icmp sle i64 %58, 1
  br i1 %59, label %60, label %63

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

63:                                               ; preds = %8
  %64 = load i64, ptr %11, align 8, !tbaa !9
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %18, ptr noundef %19, ptr noundef %23, ptr noundef %24, i64 noundef %64, ptr noundef %65)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %130, %63
  %67 = load i64, ptr %20, align 8, !tbaa !9
  %68 = load i64, ptr %11, align 8, !tbaa !9
  %69 = sub nsw i64 %68, 1
  %70 = icmp sle i64 %67, %69
  br i1 %70, label %71, label %132

71:                                               ; preds = %66
  %72 = load i64, ptr %20, align 8, !tbaa !9
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %21, align 8, !tbaa !9
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = load i64, ptr %20, align 8, !tbaa !9
  %77 = getelementptr inbounds double, ptr %75, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  store double %78, ptr %27, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %98, %71
  %80 = load i64, ptr %21, align 8, !tbaa !9
  %81 = load i64, ptr %11, align 8, !tbaa !9
  %82 = sub nsw i64 %81, 1
  %83 = icmp sle i64 %80, %82
  br i1 %83, label %84, label %96

84:                                               ; preds = %79
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !17
  %87 = load i64, ptr %21, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = load i64, ptr %20, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !11
  %95 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %89, double noundef %94)
  br label %96

96:                                               ; preds = %84, %79
  %97 = phi i1 [ false, %79 ], [ %95, %84 ]
  br i1 %97, label %98, label %108

98:                                               ; preds = %96
  %99 = load double, ptr %27, align 8, !tbaa !11
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = load i64, ptr %21, align 8, !tbaa !9
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = fadd double %99, %104
  store double %105, ptr %27, align 8, !tbaa !11
  %106 = load i64, ptr %21, align 8, !tbaa !9
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %21, align 8, !tbaa !9
  br label %79, !llvm.loop !18

108:                                              ; preds = %96
  %109 = load double, ptr %27, align 8, !tbaa !11
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = load i64, ptr %20, align 8, !tbaa !9
  %112 = sub nsw i64 %110, %111
  %113 = sitofp i64 %112 to double
  %114 = fdiv double %109, %113
  store double %114, ptr %27, align 8, !tbaa !11
  %115 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %115, ptr %22, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %127, %108
  %117 = load i64, ptr %22, align 8, !tbaa !9
  %118 = load i64, ptr %21, align 8, !tbaa !9
  %119 = sub nsw i64 %118, 1
  %120 = icmp sle i64 %117, %119
  br i1 %120, label %121, label %130

121:                                              ; preds = %116
  %122 = load double, ptr %27, align 8, !tbaa !11
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !17
  %125 = load i64, ptr %22, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %124, i64 %125
  store double %122, ptr %126, align 8, !tbaa !11
  br label %127

127:                                              ; preds = %121
  %128 = load i64, ptr %22, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %22, align 8, !tbaa !9
  br label %116, !llvm.loop !20

130:                                              ; preds = %116
  %131 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %131, ptr %20, align 8, !tbaa !9
  br label %66, !llvm.loop !21

132:                                              ; preds = %66
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !17
  %135 = load i64, ptr %11, align 8, !tbaa !9
  %136 = sub nsw i64 %135, 1
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  %138 = load double, ptr %137, align 8, !tbaa !11
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  %141 = getelementptr inbounds double, ptr %140, i64 0
  %142 = load double, ptr %141, align 8, !tbaa !11
  %143 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %138, double noundef %142)
  br i1 %143, label %144, label %147

144:                                              ; preds = %132
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %145, align 8, !tbaa !9
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %146)
  store i32 1, ptr %29, align 4
  br label %232

147:                                              ; preds = %132
  %148 = load i64, ptr %11, align 8, !tbaa !9
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %148, ptr noundef %149)
  %150 = load i64, ptr %11, align 8, !tbaa !9
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %26, i64 noundef %150, ptr noundef %151)
  store i64 2, ptr %28, align 8, !tbaa !9
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = getelementptr inbounds double, ptr %153, i64 0
  %155 = load double, ptr %154, align 8, !tbaa !11
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !17
  %158 = getelementptr inbounds double, ptr %157, i64 0
  store double %155, ptr %158, align 8, !tbaa !11
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !17
  %161 = getelementptr inbounds double, ptr %160, i64 0
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !17
  %165 = getelementptr inbounds double, ptr %164, i64 0
  store double %162, ptr %165, align 8, !tbaa !11
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !17
  %168 = load i64, ptr %11, align 8, !tbaa !9
  %169 = sub nsw i64 %168, 1
  %170 = getelementptr inbounds double, ptr %167, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !11
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = getelementptr inbounds double, ptr %173, i64 1
  store double %171, ptr %174, align 8, !tbaa !11
  %175 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !17
  %177 = load i64, ptr %11, align 8, !tbaa !9
  %178 = sub nsw i64 %177, 1
  %179 = getelementptr inbounds double, ptr %176, i64 %178
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !17
  %183 = getelementptr inbounds double, ptr %182, i64 1
  store double %180, ptr %183, align 8, !tbaa !11
  %184 = load i64, ptr %11, align 8, !tbaa !9
  %185 = sub nsw i64 %184, 1
  %186 = load double, ptr %12, align 8, !tbaa !11
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL18lsfit_rdprecursiveEPKNS_9ae_vectorES2_lldPS0_S3_PlPNS_8ae_stateE(ptr noundef %18, ptr noundef %19, i64 noundef 0, i64 noundef %185, double noundef %186, ptr noundef %25, ptr noundef %26, ptr noundef %28, ptr noundef %187)
  %188 = load i64, ptr %28, align 8, !tbaa !9
  %189 = sub nsw i64 %188, 1
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 %189, ptr %190, align 8, !tbaa !9
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  %192 = load i64, ptr %28, align 8, !tbaa !9
  %193 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %191, i64 noundef %192, ptr noundef %193)
  %194 = load ptr, ptr %14, align 8, !tbaa !5
  %195 = load i64, ptr %28, align 8, !tbaa !9
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %194, i64 noundef %195, ptr noundef %196)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %197

197:                                              ; preds = %223, %147
  %198 = load i64, ptr %20, align 8, !tbaa !9
  %199 = load ptr, ptr %15, align 8, !tbaa !5
  %200 = load i64, ptr %199, align 8, !tbaa !9
  %201 = icmp sle i64 %198, %200
  br i1 %201, label %202, label %226

202:                                              ; preds = %197
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %204 = load ptr, ptr %203, align 8, !tbaa !17
  %205 = load i64, ptr %20, align 8, !tbaa !9
  %206 = getelementptr inbounds double, ptr %204, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %208, i32 0, i32 4
  %210 = load ptr, ptr %209, align 8, !tbaa !17
  %211 = load i64, ptr %20, align 8, !tbaa !9
  %212 = getelementptr inbounds double, ptr %210, i64 %211
  store double %207, ptr %212, align 8, !tbaa !11
  %213 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %214 = load ptr, ptr %213, align 8, !tbaa !17
  %215 = load i64, ptr %20, align 8, !tbaa !9
  %216 = getelementptr inbounds double, ptr %214, i64 %215
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %218, i32 0, i32 4
  %220 = load ptr, ptr %219, align 8, !tbaa !17
  %221 = load i64, ptr %20, align 8, !tbaa !9
  %222 = getelementptr inbounds double, ptr %220, i64 %221
  store double %217, ptr %222, align 8, !tbaa !11
  br label %223

223:                                              ; preds = %202
  %224 = load i64, ptr %20, align 8, !tbaa !9
  %225 = add nsw i64 %224, 1
  store i64 %225, ptr %20, align 8, !tbaa !9
  br label %197, !llvm.loop !22

226:                                              ; preds = %197
  %227 = load ptr, ptr %13, align 8, !tbaa !5
  %228 = load ptr, ptr %14, align 8, !tbaa !5
  %229 = load i64, ptr %28, align 8, !tbaa !9
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %227, ptr noundef %228, ptr noundef %23, ptr noundef %24, i64 noundef %229, ptr noundef %230)
  %231 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %231)
  store i32 0, ptr %29, align 4
  br label %232

232:                                              ; preds = %226, %144, %60
  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
  %233 = load i32, ptr %29, align 4
  switch i32 %233, label %235 [
    i32 0, label %234
    i32 1, label %234
  ]

234:                                              ; preds = %232, %232
  ret void

235:                                              ; preds = %232
  unreachable
}

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

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 void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr 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_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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL18lsfit_rdprecursiveEPKNS_9ae_vectorES2_lldPS0_S3_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.415 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.416 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.418 = 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_impl24lstfitpiecewiselinearrdpEPKNS_9ae_vectorES2_ldPS0_S3_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_vectorEPKS0_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_vectorEPKS0_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.415, 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.416, 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.417, 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.418, 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.ph96.prol.loopexit, %.lr.ph96, %.critedge
  %.not.not = icmp slt i64 %.076.lcssa, %2
  br i1 %.not.not, label %29, label %71, !llvm.loop !14

29:                                               ; preds = %25, %.loopexit
  %.07797 = phi i64 [ 0, %25 ], [ %.076.lcssa, %.loopexit ]
  %30 = load ptr, ptr %27, align 8, !tbaa !16
  %31 = getelementptr inbounds double, ptr %30, i64 %.07797
  %32 = load double, ptr %31, align 8, !tbaa !17
  %.07683 = add nsw i64 %.07797, 1
  %.not81.not84 = icmp slt i64 %.07797, %26
  br i1 %.not81.not84, 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 %.07683
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds double, ptr %33, i64 %.07797
  %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.ph106, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph106
  %39 = load ptr, ptr %28, align 8, !tbaa !16
  %40 = getelementptr inbounds double, ptr %39, i64 %.076
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds double, ptr %39, i64 %.07797
  %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.ph106, label %.critedge, !llvm.loop !19

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

.critedge:                                        ; preds = %.lr.ph106, %.lr.ph, %.lr.ph.preheader, %29
  %.076.in.lcssa = phi i64 [ %.07797, %29 ], [ %.07797, %.lr.ph.preheader ], [ %.07687104, %.lr.ph ], [ %.07687104, %.lr.ph106 ]
  %.0.lcssa = phi double [ %32, %29 ], [ %32, %.lr.ph.preheader ], [ %48, %.lr.ph ], [ %48, %.lr.ph106 ]
  %.076.lcssa = phi i64 [ %.07683, %29 ], [ %.07683, %.lr.ph.preheader ], [ %.076, %.lr.ph ], [ %2, %.lr.ph106 ]
  %49 = sub nsw i64 %.076.lcssa, %.07797
  %50 = sitofp i64 %49 to double
  %51 = fdiv double %.0.lcssa, %50
  %.not8294 = icmp sgt i64 %.07797, %.076.in.lcssa
  br i1 %.not8294, label %.loopexit, label %.lr.ph96.preheader

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

.lr.ph96.prol:                                    ; preds = %.lr.ph96.preheader, %.lr.ph96.prol
  %.07595.prol = phi i64 [ %57, %.lr.ph96.prol ], [ %.07797, %.lr.ph96.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph96.prol ], [ 0, %.lr.ph96.preheader ]
  %55 = load ptr, ptr %27, align 8, !tbaa !16
  %56 = getelementptr inbounds double, ptr %55, i64 %.07595.prol
  store double %51, ptr %56, align 8, !tbaa !17
  %57 = add i64 %.07595.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.ph96.prol.loopexit, label %.lr.ph96.prol, !llvm.loop !20

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

.lr.ph96:                                         ; preds = %.lr.ph96.prol.loopexit, %.lr.ph96
  %.07595 = phi i64 [ %70, %.lr.ph96 ], [ %.07595.unr, %.lr.ph96.prol.loopexit ]
  %59 = load ptr, ptr %27, align 8, !tbaa !16
  %60 = getelementptr inbounds double, ptr %59, i64 %.07595
  store double %51, ptr %60, align 8, !tbaa !17
  %61 = load ptr, ptr %27, align 8, !tbaa !16
  %62 = getelementptr double, ptr %61, i64 %.07595
  %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 %.07595
  %66 = getelementptr i8, ptr %65, i64 16
  store double %51, ptr %66, align 8, !tbaa !17
  %67 = add i64 %.07595, 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 %.07595, 4
  %exitcond102.not.3 = icmp eq i64 %67, %.076.in.lcssa
  br i1 %exitcond102.not.3, label %.loopexit, label %.lr.ph96, !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_rdprecursiveEPKNS_9ae_vectorES2_lldPS0_S3_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
  %.not98 = icmp slt i64 %100, 0
  br i1 %.not98, label %._crit_edge, label %.lr.ph100

.lr.ph100:                                        ; 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.ph100.new

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

105:                                              ; preds = %105, %.lr.ph100.new
  %.199 = phi i64 [ 0, %.lr.ph100.new ], [ %127, %105 ]
  %niter = phi i64 [ 0, %.lr.ph100.new ], [ %niter.next.1, %105 ]
  %106 = load ptr, ptr %81, align 8, !tbaa !16
  %107 = getelementptr inbounds double, ptr %106, i64 %.199
  %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 %.199
  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 %.199
  %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 %.199
  store double %113, ptr %115, align 8, !tbaa !17
  %116 = or disjoint i64 %.199, 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 %.199, 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.ph100
  %.199.unr = phi i64 [ 0, %.lr.ph100 ], [ %127, %105 ]
  %128 = and i64 %100, 1
  %lcmp.mod113.not.not = icmp eq i64 %128, 0
  br i1 %lcmp.mod113.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 %.199.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 %.199.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 %.199.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 %.199.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_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #2

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 void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr 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_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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL18lsfit_rdprecursiveEPKNS_9ae_vectorES2_lldPS0_S3_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