; 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 }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

@.str.410 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.411 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.412 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.413 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.414 = 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_impl29lstfitpiecewiselinearrdpfixedEPKNS_9ae_vectorES2_llPS0_S3_PlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 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 i64, 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 i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"struct.alglib_impl::ae_vector", align 8
  %27 = alloca %"struct.alglib_impl::ae_vector", align 8
  %28 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %29 = alloca %"struct.alglib_impl::ae_vector", align 8
  %30 = alloca double, align 8
  %31 = alloca i64, align 8
  %32 = alloca double, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca %"struct.alglib_impl::ae_vector", align 8
  %38 = alloca %"struct.alglib_impl::ae_vector", align 8
  %39 = 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 i64 %3, ptr %12, align 8, !tbaa !9
  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 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %37) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %38) #4
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %40, 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 %26, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %37, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %38, i8 0, i64 64, i1 false)
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = 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 %41, ptr noundef %42, i1 noundef zeroext true)
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = 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 %43, ptr noundef %44, i1 noundef zeroext true)
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %45)
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %46)
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %47, align 8, !tbaa !9
  %48 = 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 %48, i1 noundef zeroext true)
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %27, i64 noundef 0, i64 noundef 3, ptr noundef %49, i1 noundef zeroext true)
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %28, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %50, i1 noundef zeroext true)
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %29, i64 noundef 0, i64 noundef 3, ptr noundef %51, i1 noundef zeroext true)
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %37, i64 noundef 0, i64 noundef 3, ptr noundef %52, i1 noundef zeroext true)
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %38, i64 noundef 0, i64 noundef 2, ptr noundef %53, i1 noundef zeroext true)
  %54 = load i64, ptr %11, align 8, !tbaa !9
  %55 = icmp sge i64 %54, 0
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %55, ptr noundef @.str.410, ptr noundef %56)
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = icmp sge i64 %57, 1
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.411, ptr noundef %59)
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 0
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = icmp sge i64 %61, %62
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %63, ptr noundef @.str.412, ptr noundef %64)
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = load i64, ptr %11, align 8, !tbaa !9
  %68 = icmp sge i64 %66, %67
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %68, ptr noundef @.str.413, ptr noundef %69)
  %70 = load i64, ptr %11, align 8, !tbaa !9
  %71 = icmp sle i64 %70, 1
  br i1 %71, label %72, label %75

72:                                               ; preds = %8
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %73, align 8, !tbaa !9
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %74)
  store i32 1, ptr %39, align 4
  br label %472

75:                                               ; preds = %8
  %76 = load i64, ptr %11, align 8, !tbaa !9
  %77 = 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 %26, ptr noundef %27, i64 noundef %76, ptr noundef %77)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %142, %75
  %79 = load i64, ptr %20, align 8, !tbaa !9
  %80 = load i64, ptr %11, align 8, !tbaa !9
  %81 = sub nsw i64 %80, 1
  %82 = icmp sle i64 %79, %81
  br i1 %82, label %83, label %144

83:                                               ; preds = %78
  %84 = load i64, ptr %20, align 8, !tbaa !9
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %21, align 8, !tbaa !9
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  %88 = load i64, ptr %20, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !16
  store double %90, ptr %30, align 8, !tbaa !16
  br label %91

91:                                               ; preds = %110, %83
  %92 = load i64, ptr %21, align 8, !tbaa !9
  %93 = load i64, ptr %11, align 8, !tbaa !9
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %92, %94
  br i1 %95, label %96, label %108

96:                                               ; preds = %91
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  %99 = load i64, ptr %21, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !16
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !15
  %104 = load i64, ptr %20, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !16
  %107 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %101, double noundef %106)
  br label %108

108:                                              ; preds = %96, %91
  %109 = phi i1 [ false, %91 ], [ %107, %96 ]
  br i1 %109, label %110, label %120

110:                                              ; preds = %108
  %111 = load double, ptr %30, align 8, !tbaa !16
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  %114 = load i64, ptr %21, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !16
  %117 = fadd double %111, %116
  store double %117, ptr %30, align 8, !tbaa !16
  %118 = load i64, ptr %21, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %21, align 8, !tbaa !9
  br label %91, !llvm.loop !18

120:                                              ; preds = %108
  %121 = load double, ptr %30, align 8, !tbaa !16
  %122 = load i64, ptr %21, align 8, !tbaa !9
  %123 = load i64, ptr %20, align 8, !tbaa !9
  %124 = sub nsw i64 %122, %123
  %125 = sitofp i64 %124 to double
  %126 = fdiv double %121, %125
  store double %126, ptr %30, align 8, !tbaa !16
  %127 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %127, ptr %22, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %139, %120
  %129 = load i64, ptr %22, align 8, !tbaa !9
  %130 = load i64, ptr %21, align 8, !tbaa !9
  %131 = sub nsw i64 %130, 1
  %132 = icmp sle i64 %129, %131
  br i1 %132, label %133, label %142

133:                                              ; preds = %128
  %134 = load double, ptr %30, align 8, !tbaa !16
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !15
  %137 = load i64, ptr %22, align 8, !tbaa !9
  %138 = getelementptr inbounds double, ptr %136, i64 %137
  store double %134, ptr %138, align 8, !tbaa !16
  br label %139

139:                                              ; preds = %133
  %140 = load i64, ptr %22, align 8, !tbaa !9
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %22, align 8, !tbaa !9
  br label %128, !llvm.loop !20

142:                                              ; preds = %128
  %143 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %143, ptr %20, align 8, !tbaa !9
  br label %78, !llvm.loop !21

144:                                              ; preds = %78
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !15
  %147 = load i64, ptr %11, align 8, !tbaa !9
  %148 = sub nsw i64 %147, 1
  %149 = getelementptr inbounds double, ptr %146, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !16
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !15
  %153 = getelementptr inbounds double, ptr %152, i64 0
  %154 = load double, ptr %153, align 8, !tbaa !16
  %155 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %150, double noundef %154)
  br i1 %155, label %156, label %159

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

159:                                              ; preds = %144
  %160 = load i64, ptr %11, align 8, !tbaa !9
  %161 = sub nsw i64 %160, 1
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef %18, ptr noundef %19, i64 noundef 0, i64 noundef %161, ptr noundef %31, ptr noundef %32, ptr noundef %162)
  %163 = load i64, ptr %12, align 8, !tbaa !9
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %28, i64 noundef %163, i64 noundef 4, ptr noundef %164)
  %165 = load i64, ptr %12, align 8, !tbaa !9
  %166 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %37, i64 noundef %165, ptr noundef %166)
  %167 = load i64, ptr %12, align 8, !tbaa !9
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %38, i64 noundef %167, ptr noundef %168)
  %169 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 1, ptr %169, align 8, !tbaa !9
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %171 = load ptr, ptr %170, align 8, !tbaa !15
  %172 = getelementptr inbounds ptr, ptr %171, i64 0
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = getelementptr inbounds double, ptr %173, i64 0
  store double 0.000000e+00, ptr %174, align 8, !tbaa !16
  %175 = load i64, ptr %11, align 8, !tbaa !9
  %176 = sub nsw i64 %175, 1
  %177 = sitofp i64 %176 to double
  %178 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %179 = load ptr, ptr %178, align 8, !tbaa !15
  %180 = getelementptr inbounds ptr, ptr %179, i64 0
  %181 = load ptr, ptr %180, align 8, !tbaa !5
  %182 = getelementptr inbounds double, ptr %181, i64 1
  store double %177, ptr %182, align 8, !tbaa !16
  %183 = load i64, ptr %31, align 8, !tbaa !9
  %184 = sitofp i64 %183 to double
  %185 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %186 = load ptr, ptr %185, align 8, !tbaa !15
  %187 = getelementptr inbounds ptr, ptr %186, i64 0
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = getelementptr inbounds double, ptr %188, i64 2
  store double %184, ptr %189, align 8, !tbaa !16
  %190 = load double, ptr %32, align 8, !tbaa !16
  %191 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %192 = load ptr, ptr %191, align 8, !tbaa !15
  %193 = getelementptr inbounds ptr, ptr %192, i64 0
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = getelementptr inbounds double, ptr %194, i64 3
  store double %190, ptr %195, align 8, !tbaa !16
  %196 = load double, ptr %32, align 8, !tbaa !16
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !15
  %199 = getelementptr inbounds double, ptr %198, i64 0
  store double %196, ptr %199, align 8, !tbaa !16
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %38, i32 0, i32 4
  %201 = load ptr, ptr %200, align 8, !tbaa !15
  %202 = getelementptr inbounds i64, ptr %201, i64 0
  store i64 0, ptr %202, align 8, !tbaa !9
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %204 = load ptr, ptr %203, align 8, !tbaa !15
  %205 = getelementptr inbounds ptr, ptr %204, i64 0
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  %207 = getelementptr inbounds double, ptr %206, i64 1
  %208 = load double, ptr %207, align 8, !tbaa !16
  %209 = load i64, ptr %11, align 8, !tbaa !9
  %210 = sub nsw i64 %209, 1
  %211 = sitofp i64 %210 to double
  %212 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %208, double noundef %211)
  %213 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %212, ptr noundef @.str.414, ptr noundef %213)
  br label %214

214:                                              ; preds = %226, %159
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  %216 = load i64, ptr %215, align 8, !tbaa !9
  %217 = load i64, ptr %12, align 8, !tbaa !9
  %218 = icmp slt i64 %216, %217
  br i1 %218, label %219, label %340

219:                                              ; preds = %214
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !15
  %222 = getelementptr inbounds double, ptr %221, i64 0
  %223 = load double, ptr %222, align 8, !tbaa !16
  %224 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %223, double noundef 0.000000e+00)
  br i1 %224, label %225, label %226

225:                                              ; preds = %219
  br label %340

226:                                              ; preds = %219
  %227 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %38, i32 0, i32 4
  %228 = load ptr, ptr %227, align 8, !tbaa !15
  %229 = getelementptr inbounds i64, ptr %228, i64 0
  %230 = load i64, ptr %229, align 8, !tbaa !9
  store i64 %230, ptr %22, align 8, !tbaa !9
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %232 = load ptr, ptr %231, align 8, !tbaa !15
  %233 = load i64, ptr %22, align 8, !tbaa !9
  %234 = getelementptr inbounds ptr, ptr %232, i64 %233
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  %236 = getelementptr inbounds double, ptr %235, i64 0
  %237 = load double, ptr %236, align 8, !tbaa !16
  %238 = load ptr, ptr %16, align 8, !tbaa !5
  %239 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %237, ptr noundef %238)
  store i64 %239, ptr %23, align 8, !tbaa !9
  %240 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %241 = load ptr, ptr %240, align 8, !tbaa !15
  %242 = load i64, ptr %22, align 8, !tbaa !9
  %243 = getelementptr inbounds ptr, ptr %241, i64 %242
  %244 = load ptr, ptr %243, align 8, !tbaa !5
  %245 = getelementptr inbounds double, ptr %244, i64 1
  %246 = load double, ptr %245, align 8, !tbaa !16
  %247 = load ptr, ptr %16, align 8, !tbaa !5
  %248 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %246, ptr noundef %247)
  store i64 %248, ptr %24, align 8, !tbaa !9
  %249 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %250 = load ptr, ptr %249, align 8, !tbaa !15
  %251 = load i64, ptr %22, align 8, !tbaa !9
  %252 = getelementptr inbounds ptr, ptr %250, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !5
  %254 = getelementptr inbounds double, ptr %253, i64 2
  %255 = load double, ptr %254, align 8, !tbaa !16
  %256 = load ptr, ptr %16, align 8, !tbaa !5
  %257 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %255, ptr noundef %256)
  store i64 %257, ptr %25, align 8, !tbaa !9
  %258 = load i64, ptr %23, align 8, !tbaa !9
  %259 = load i64, ptr %25, align 8, !tbaa !9
  %260 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef %18, ptr noundef %19, i64 noundef %258, i64 noundef %259, ptr noundef %33, ptr noundef %35, ptr noundef %260)
  %261 = load i64, ptr %25, align 8, !tbaa !9
  %262 = load i64, ptr %24, align 8, !tbaa !9
  %263 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef %18, ptr noundef %19, i64 noundef %261, i64 noundef %262, ptr noundef %34, ptr noundef %36, ptr noundef %263)
  %264 = load i64, ptr %23, align 8, !tbaa !9
  %265 = sitofp i64 %264 to double
  %266 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %267 = load ptr, ptr %266, align 8, !tbaa !15
  %268 = load i64, ptr %22, align 8, !tbaa !9
  %269 = getelementptr inbounds ptr, ptr %267, i64 %268
  %270 = load ptr, ptr %269, align 8, !tbaa !5
  %271 = getelementptr inbounds double, ptr %270, i64 0
  store double %265, ptr %271, align 8, !tbaa !16
  %272 = load i64, ptr %25, align 8, !tbaa !9
  %273 = sitofp i64 %272 to double
  %274 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %275 = load ptr, ptr %274, align 8, !tbaa !15
  %276 = load i64, ptr %22, align 8, !tbaa !9
  %277 = getelementptr inbounds ptr, ptr %275, i64 %276
  %278 = load ptr, ptr %277, align 8, !tbaa !5
  %279 = getelementptr inbounds double, ptr %278, i64 1
  store double %273, ptr %279, align 8, !tbaa !16
  %280 = load i64, ptr %33, align 8, !tbaa !9
  %281 = sitofp i64 %280 to double
  %282 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %283 = load ptr, ptr %282, align 8, !tbaa !15
  %284 = load i64, ptr %22, align 8, !tbaa !9
  %285 = getelementptr inbounds ptr, ptr %283, i64 %284
  %286 = load ptr, ptr %285, align 8, !tbaa !5
  %287 = getelementptr inbounds double, ptr %286, i64 2
  store double %281, ptr %287, align 8, !tbaa !16
  %288 = load double, ptr %35, align 8, !tbaa !16
  %289 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %290 = load ptr, ptr %289, align 8, !tbaa !15
  %291 = load i64, ptr %22, align 8, !tbaa !9
  %292 = getelementptr inbounds ptr, ptr %290, i64 %291
  %293 = load ptr, ptr %292, align 8, !tbaa !5
  %294 = getelementptr inbounds double, ptr %293, i64 3
  store double %288, ptr %294, align 8, !tbaa !16
  %295 = load ptr, ptr %15, align 8, !tbaa !5
  %296 = load i64, ptr %295, align 8, !tbaa !9
  %297 = load double, ptr %35, align 8, !tbaa !16
  %298 = load i64, ptr %22, align 8, !tbaa !9
  %299 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18tagheapreplacetopiEPNS_9ae_vectorES1_ldlPNS_8ae_stateE(ptr noundef %37, ptr noundef %38, i64 noundef %296, double noundef %297, i64 noundef %298, ptr noundef %299)
  %300 = load i64, ptr %25, align 8, !tbaa !9
  %301 = sitofp i64 %300 to double
  %302 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %303 = load ptr, ptr %302, align 8, !tbaa !15
  %304 = load ptr, ptr %15, align 8, !tbaa !5
  %305 = load i64, ptr %304, align 8, !tbaa !9
  %306 = getelementptr inbounds ptr, ptr %303, i64 %305
  %307 = load ptr, ptr %306, align 8, !tbaa !5
  %308 = getelementptr inbounds double, ptr %307, i64 0
  store double %301, ptr %308, align 8, !tbaa !16
  %309 = load i64, ptr %24, align 8, !tbaa !9
  %310 = sitofp i64 %309 to double
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %312 = load ptr, ptr %311, align 8, !tbaa !15
  %313 = load ptr, ptr %15, align 8, !tbaa !5
  %314 = load i64, ptr %313, align 8, !tbaa !9
  %315 = getelementptr inbounds ptr, ptr %312, i64 %314
  %316 = load ptr, ptr %315, align 8, !tbaa !5
  %317 = getelementptr inbounds double, ptr %316, i64 1
  store double %310, ptr %317, align 8, !tbaa !16
  %318 = load i64, ptr %34, align 8, !tbaa !9
  %319 = sitofp i64 %318 to double
  %320 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %321 = load ptr, ptr %320, align 8, !tbaa !15
  %322 = load ptr, ptr %15, align 8, !tbaa !5
  %323 = load i64, ptr %322, align 8, !tbaa !9
  %324 = getelementptr inbounds ptr, ptr %321, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = getelementptr inbounds double, ptr %325, i64 2
  store double %319, ptr %326, align 8, !tbaa !16
  %327 = load double, ptr %36, align 8, !tbaa !16
  %328 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %329 = load ptr, ptr %328, align 8, !tbaa !15
  %330 = load ptr, ptr %15, align 8, !tbaa !5
  %331 = load i64, ptr %330, align 8, !tbaa !9
  %332 = getelementptr inbounds ptr, ptr %329, i64 %331
  %333 = load ptr, ptr %332, align 8, !tbaa !5
  %334 = getelementptr inbounds double, ptr %333, i64 3
  store double %327, ptr %334, align 8, !tbaa !16
  %335 = load ptr, ptr %15, align 8, !tbaa !5
  %336 = load double, ptr %36, align 8, !tbaa !16
  %337 = load ptr, ptr %15, align 8, !tbaa !5
  %338 = load i64, ptr %337, align 8, !tbaa !9
  %339 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagheappushiEPNS_9ae_vectorES1_PldlPNS_8ae_stateE(ptr noundef %37, ptr noundef %38, ptr noundef %335, double noundef %336, i64 noundef %338, ptr noundef %339)
  br label %214, !llvm.loop !22

340:                                              ; preds = %225, %214
  %341 = load ptr, ptr %15, align 8, !tbaa !5
  %342 = load i64, ptr %341, align 8, !tbaa !9
  %343 = add nsw i64 %342, 1
  %344 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %343, ptr noundef %344)
  %345 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %346 = load ptr, ptr %345, align 8, !tbaa !15
  %347 = getelementptr inbounds ptr, ptr %346, i64 0
  %348 = load ptr, ptr %347, align 8, !tbaa !5
  %349 = getelementptr inbounds double, ptr %348, i64 1
  %350 = load double, ptr %349, align 8, !tbaa !16
  %351 = load ptr, ptr %16, align 8, !tbaa !5
  %352 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %350, ptr noundef %351)
  store i64 %352, ptr %22, align 8, !tbaa !9
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %353

353:                                              ; preds = %404, %340
  %354 = load i64, ptr %20, align 8, !tbaa !9
  %355 = load ptr, ptr %15, align 8, !tbaa !5
  %356 = load i64, ptr %355, align 8, !tbaa !9
  %357 = sub nsw i64 %356, 1
  %358 = icmp sle i64 %354, %357
  br i1 %358, label %359, label %407

359:                                              ; preds = %353
  %360 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %361 = load ptr, ptr %360, align 8, !tbaa !15
  %362 = load i64, ptr %20, align 8, !tbaa !9
  %363 = getelementptr inbounds ptr, ptr %361, i64 %362
  %364 = load ptr, ptr %363, align 8, !tbaa !5
  %365 = getelementptr inbounds double, ptr %364, i64 0
  %366 = load double, ptr %365, align 8, !tbaa !16
  %367 = load ptr, ptr %16, align 8, !tbaa !5
  %368 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %366, ptr noundef %367)
  %369 = sitofp i64 %368 to double
  %370 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %371 = load ptr, ptr %370, align 8, !tbaa !15
  %372 = load i64, ptr %20, align 8, !tbaa !9
  %373 = getelementptr inbounds double, ptr %371, i64 %372
  store double %369, ptr %373, align 8, !tbaa !16
  %374 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %375 = load ptr, ptr %374, align 8, !tbaa !15
  %376 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %377 = load ptr, ptr %376, align 8, !tbaa !15
  %378 = load i64, ptr %20, align 8, !tbaa !9
  %379 = getelementptr inbounds ptr, ptr %377, i64 %378
  %380 = load ptr, ptr %379, align 8, !tbaa !5
  %381 = getelementptr inbounds double, ptr %380, i64 1
  %382 = load double, ptr %381, align 8, !tbaa !16
  %383 = load ptr, ptr %16, align 8, !tbaa !5
  %384 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %382, ptr noundef %383)
  %385 = getelementptr inbounds double, ptr %375, i64 %384
  %386 = load double, ptr %385, align 8, !tbaa !16
  %387 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %388 = load ptr, ptr %387, align 8, !tbaa !15
  %389 = load i64, ptr %22, align 8, !tbaa !9
  %390 = getelementptr inbounds double, ptr %388, i64 %389
  %391 = load double, ptr %390, align 8, !tbaa !16
  %392 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %386, double noundef %391)
  br i1 %392, label %393, label %403

393:                                              ; preds = %359
  %394 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 6
  %395 = load ptr, ptr %394, align 8, !tbaa !15
  %396 = load i64, ptr %20, align 8, !tbaa !9
  %397 = getelementptr inbounds ptr, ptr %395, i64 %396
  %398 = load ptr, ptr %397, align 8, !tbaa !5
  %399 = getelementptr inbounds double, ptr %398, i64 1
  %400 = load double, ptr %399, align 8, !tbaa !16
  %401 = load ptr, ptr %16, align 8, !tbaa !5
  %402 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %400, ptr noundef %401)
  store i64 %402, ptr %22, align 8, !tbaa !9
  br label %403

403:                                              ; preds = %393, %359
  br label %404

404:                                              ; preds = %403
  %405 = load i64, ptr %20, align 8, !tbaa !9
  %406 = add nsw i64 %405, 1
  store i64 %406, ptr %20, align 8, !tbaa !9
  br label %353, !llvm.loop !23

407:                                              ; preds = %353
  %408 = load i64, ptr %22, align 8, !tbaa !9
  %409 = sitofp i64 %408 to double
  %410 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %411 = load ptr, ptr %410, align 8, !tbaa !15
  %412 = load ptr, ptr %15, align 8, !tbaa !5
  %413 = load i64, ptr %412, align 8, !tbaa !9
  %414 = getelementptr inbounds double, ptr %411, i64 %413
  store double %409, ptr %414, align 8, !tbaa !16
  %415 = load ptr, ptr %15, align 8, !tbaa !5
  %416 = load i64, ptr %415, align 8, !tbaa !9
  %417 = add nsw i64 %416, 1
  %418 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl11tagsortfastEPNS_9ae_vectorES1_lPNS_8ae_stateE(ptr noundef %29, ptr noundef %26, i64 noundef %417, ptr noundef %418)
  %419 = load ptr, ptr %13, align 8, !tbaa !5
  %420 = load ptr, ptr %15, align 8, !tbaa !5
  %421 = load i64, ptr %420, align 8, !tbaa !9
  %422 = add nsw i64 %421, 1
  %423 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %419, i64 noundef %422, ptr noundef %423)
  %424 = load ptr, ptr %14, align 8, !tbaa !5
  %425 = load ptr, ptr %15, align 8, !tbaa !5
  %426 = load i64, ptr %425, align 8, !tbaa !9
  %427 = add nsw i64 %426, 1
  %428 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %424, i64 noundef %427, ptr noundef %428)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %429

429:                                              ; preds = %467, %407
  %430 = load i64, ptr %20, align 8, !tbaa !9
  %431 = load ptr, ptr %15, align 8, !tbaa !5
  %432 = load i64, ptr %431, align 8, !tbaa !9
  %433 = icmp sle i64 %430, %432
  br i1 %433, label %434, label %470

434:                                              ; preds = %429
  %435 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %436 = load ptr, ptr %435, align 8, !tbaa !15
  %437 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %438 = load ptr, ptr %437, align 8, !tbaa !15
  %439 = load i64, ptr %20, align 8, !tbaa !9
  %440 = getelementptr inbounds double, ptr %438, i64 %439
  %441 = load double, ptr %440, align 8, !tbaa !16
  %442 = load ptr, ptr %16, align 8, !tbaa !5
  %443 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %441, ptr noundef %442)
  %444 = getelementptr inbounds double, ptr %436, i64 %443
  %445 = load double, ptr %444, align 8, !tbaa !16
  %446 = load ptr, ptr %13, align 8, !tbaa !5
  %447 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %446, i32 0, i32 4
  %448 = load ptr, ptr %447, align 8, !tbaa !15
  %449 = load i64, ptr %20, align 8, !tbaa !9
  %450 = getelementptr inbounds double, ptr %448, i64 %449
  store double %445, ptr %450, align 8, !tbaa !16
  %451 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %452 = load ptr, ptr %451, align 8, !tbaa !15
  %453 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %454 = load ptr, ptr %453, align 8, !tbaa !15
  %455 = load i64, ptr %20, align 8, !tbaa !9
  %456 = getelementptr inbounds double, ptr %454, i64 %455
  %457 = load double, ptr %456, align 8, !tbaa !16
  %458 = load ptr, ptr %16, align 8, !tbaa !5
  %459 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %457, ptr noundef %458)
  %460 = getelementptr inbounds double, ptr %452, i64 %459
  %461 = load double, ptr %460, align 8, !tbaa !16
  %462 = load ptr, ptr %14, align 8, !tbaa !5
  %463 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %462, i32 0, i32 4
  %464 = load ptr, ptr %463, align 8, !tbaa !15
  %465 = load i64, ptr %20, align 8, !tbaa !9
  %466 = getelementptr inbounds double, ptr %464, i64 %465
  store double %461, ptr %466, align 8, !tbaa !16
  br label %467

467:                                              ; preds = %434
  %468 = load i64, ptr %20, align 8, !tbaa !9
  %469 = add nsw i64 %468, 1
  store i64 %469, ptr %20, align 8, !tbaa !9
  br label %429, !llvm.loop !24

470:                                              ; preds = %429
  %471 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %471)
  store i32 0, ptr %39, align 4
  br label %472

472:                                              ; preds = %470, %156, %72
  call void @llvm.lifetime.end.p0(i64 64, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  %473 = load i32, ptr %39, align 4
  switch i32 %473, label %475 [
    i32 0, label %474
    i32 1, label %474
  ]

474:                                              ; preds = %472, %472
  ret void

475:                                              ; preds = %472
  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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare void @_ZN11alglib_impl18tagheapreplacetopiEPNS_9ae_vectorES1_ldlPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, double noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl12tagheappushiEPNS_9ae_vectorES1_PldlPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, double noundef, i64 noundef, ptr noundef) #2

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

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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !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 }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

@.str.410 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.411 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.412 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.413 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.414 = 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_impl29lstfitpiecewiselinearrdpfixedEPKNS_9ae_vectorES2_llPS0_S3_PlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr 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_matrix", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", 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 80, 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 @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %23) #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(80) %14, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %23, 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_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, 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)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %22, 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 %23, i64 noundef 0, i64 noundef 2, ptr noundef %7, i1 noundef zeroext true)
  %24 = icmp sgt i64 %2, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.410, ptr noundef %7)
  %25 = icmp sgt i64 %3, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.411, ptr noundef %7)
  %26 = load i64, ptr %10, align 8, !tbaa !9
  %27 = icmp sge i64 %26, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.412, ptr noundef %7)
  %28 = load i64, ptr %11, align 8, !tbaa !9
  %29 = icmp sge i64 %28, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.413, ptr noundef %7)
  %30 = icmp slt i64 %2, 2
  br i1 %30, label %._crit_edge171.sink.split, label %31

31:                                               ; 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)
  %32 = add nsw i64 %2, -1
  %33 = getelementptr inbounds i8, ptr %11, i64 56
  %34 = getelementptr inbounds i8, ptr %10, i64 56
  br label %35

.loopexit:                                        ; preds = %.lr.ph155.prol.loopexit, %.lr.ph155, %.critedge
  %.not.not = icmp slt i64 %.0131.lcssa, %2
  br i1 %.not.not, label %35, label %77, !llvm.loop !14

35:                                               ; preds = %31, %.loopexit
  %.0130156 = phi i64 [ 0, %31 ], [ %.0131.lcssa, %.loopexit ]
  %36 = load ptr, ptr %33, align 8, !tbaa !16
  %37 = getelementptr inbounds double, ptr %36, i64 %.0130156
  %38 = load double, ptr %37, align 8, !tbaa !17
  %.0131142 = add nsw i64 %.0130156, 1
  %.not139.not143 = icmp slt i64 %.0130156, %32
  br i1 %.not139.not143, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %35
  %39 = load ptr, ptr %34, align 8, !tbaa !16
  %40 = getelementptr inbounds double, ptr %39, i64 %.0131142
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds double, ptr %39, i64 %.0130156
  %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.ph182, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph182
  %45 = load ptr, ptr %34, align 8, !tbaa !16
  %46 = getelementptr inbounds double, ptr %45, i64 %.0131
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = getelementptr inbounds double, ptr %45, i64 %.0130156
  %49 = load double, ptr %48, align 8, !tbaa !17
  %50 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %47, double noundef %49)
  br i1 %50, label %.lr.ph182, label %.critedge, !llvm.loop !19

.lr.ph182:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.0145181 = phi double [ %54, %.lr.ph ], [ %38, %.lr.ph.preheader ]
  %.0131146180 = phi i64 [ %.0131, %.lr.ph ], [ %.0131142, %.lr.ph.preheader ]
  %51 = load ptr, ptr %33, align 8, !tbaa !16
  %52 = getelementptr inbounds double, ptr %51, i64 %.0131146180
  %53 = load double, ptr %52, align 8, !tbaa !17
  %54 = fadd double %.0145181, %53
  %.0131 = add i64 %.0131146180, 1
  %exitcond.not = icmp eq i64 %.0131, %2
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !19

.critedge:                                        ; preds = %.lr.ph182, %.lr.ph, %.lr.ph.preheader, %35
  %.0131.in.lcssa = phi i64 [ %.0130156, %35 ], [ %.0130156, %.lr.ph.preheader ], [ %.0131146180, %.lr.ph ], [ %.0131146180, %.lr.ph182 ]
  %.0.lcssa = phi double [ %38, %35 ], [ %38, %.lr.ph.preheader ], [ %54, %.lr.ph ], [ %54, %.lr.ph182 ]
  %.0131.lcssa = phi i64 [ %.0131142, %35 ], [ %.0131142, %.lr.ph.preheader ], [ %.0131, %.lr.ph ], [ %2, %.lr.ph182 ]
  %55 = sub nsw i64 %.0131.lcssa, %.0130156
  %56 = sitofp i64 %55 to double
  %57 = fdiv double %.0.lcssa, %56
  %.not140153 = icmp sgt i64 %.0130156, %.0131.in.lcssa
  br i1 %.not140153, label %.loopexit, label %.lr.ph155.preheader

.lr.ph155.preheader:                              ; preds = %.critedge
  %58 = add i64 %.0131.in.lcssa, 1
  %59 = sub i64 %58, %.0130156
  %60 = sub i64 %.0131.in.lcssa, %.0130156
  %xtraiter = and i64 %59, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph155.prol.loopexit, label %.lr.ph155.prol

.lr.ph155.prol:                                   ; preds = %.lr.ph155.preheader, %.lr.ph155.prol
  %.0132154.prol = phi i64 [ %63, %.lr.ph155.prol ], [ %.0130156, %.lr.ph155.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph155.prol ], [ 0, %.lr.ph155.preheader ]
  %61 = load ptr, ptr %33, align 8, !tbaa !16
  %62 = getelementptr inbounds double, ptr %61, i64 %.0132154.prol
  store double %57, ptr %62, align 8, !tbaa !17
  %63 = add i64 %.0132154.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.ph155.prol.loopexit, label %.lr.ph155.prol, !llvm.loop !20

.lr.ph155.prol.loopexit:                          ; preds = %.lr.ph155.prol, %.lr.ph155.preheader
  %.0132154.unr = phi i64 [ %.0130156, %.lr.ph155.preheader ], [ %63, %.lr.ph155.prol ]
  %64 = icmp ult i64 %60, 3
  br i1 %64, label %.loopexit, label %.lr.ph155

.lr.ph155:                                        ; preds = %.lr.ph155.prol.loopexit, %.lr.ph155
  %.0132154 = phi i64 [ %76, %.lr.ph155 ], [ %.0132154.unr, %.lr.ph155.prol.loopexit ]
  %65 = load ptr, ptr %33, align 8, !tbaa !16
  %66 = getelementptr inbounds double, ptr %65, i64 %.0132154
  store double %57, ptr %66, align 8, !tbaa !17
  %67 = load ptr, ptr %33, align 8, !tbaa !16
  %68 = getelementptr double, ptr %67, i64 %.0132154
  %69 = getelementptr i8, ptr %68, i64 8
  store double %57, ptr %69, align 8, !tbaa !17
  %70 = load ptr, ptr %33, align 8, !tbaa !16
  %71 = getelementptr double, ptr %70, i64 %.0132154
  %72 = getelementptr i8, ptr %71, i64 16
  store double %57, ptr %72, align 8, !tbaa !17
  %73 = add i64 %.0132154, 3
  %74 = load ptr, ptr %33, align 8, !tbaa !16
  %75 = getelementptr inbounds double, ptr %74, i64 %73
  store double %57, ptr %75, align 8, !tbaa !17
  %76 = add i64 %.0132154, 4
  %exitcond174.not.3 = icmp eq i64 %73, %.0131.in.lcssa
  br i1 %exitcond174.not.3, label %.loopexit, label %.lr.ph155, !llvm.loop !22

77:                                               ; preds = %.loopexit
  %78 = load ptr, ptr %34, align 8, !tbaa !16
  %79 = getelementptr inbounds double, ptr %78, i64 %32
  %80 = load double, ptr %79, align 8, !tbaa !17
  %81 = load double, ptr %78, align 8, !tbaa !17
  %82 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %80, double noundef %81)
  br i1 %82, label %._crit_edge171.sink.split, label %83

83:                                               ; preds = %77
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef 0, i64 noundef %32, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %3, i64 noundef 4, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %22, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %23, i64 noundef %3, ptr noundef %7)
  store i64 1, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %14, i64 72
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = load ptr, ptr %85, align 8, !tbaa !23
  store double 0.000000e+00, ptr %86, align 8, !tbaa !17
  %87 = uitofp nneg i64 %32 to double
  %88 = load ptr, ptr %84, align 8, !tbaa !16
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  store double %87, ptr %90, align 8, !tbaa !17
  %91 = load i64, ptr %16, align 8, !tbaa !5
  %92 = sitofp i64 %91 to double
  %93 = load ptr, ptr %84, align 8, !tbaa !16
  %94 = load ptr, ptr %93, align 8, !tbaa !23
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  store double %92, ptr %95, align 8, !tbaa !17
  %96 = load double, ptr %17, align 8, !tbaa !17
  %97 = load ptr, ptr %84, align 8, !tbaa !16
  %98 = load ptr, ptr %97, align 8, !tbaa !23
  %99 = getelementptr inbounds i8, ptr %98, i64 24
  store double %96, ptr %99, align 8, !tbaa !17
  %100 = getelementptr inbounds i8, ptr %22, i64 56
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  store double %96, ptr %101, align 8, !tbaa !17
  %102 = getelementptr inbounds i8, ptr %23, i64 56
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  store i64 0, ptr %103, align 8, !tbaa !5
  %104 = load ptr, ptr %84, align 8, !tbaa !16
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = load double, ptr %106, align 8, !tbaa !17
  %108 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %107, double noundef %87)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %108, ptr noundef nonnull @.str.414, ptr noundef %7)
  %109 = load i64, ptr %6, align 8, !tbaa !5
  %110 = icmp slt i64 %109, %3
  br i1 %110, label %.lr.ph157, label %._crit_edge

.lr.ph157:                                        ; preds = %83, %114
  %111 = load ptr, ptr %100, align 8, !tbaa !16
  %112 = load double, ptr %111, align 8, !tbaa !17
  %113 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %112, double noundef 0.000000e+00)
  br i1 %113, label %.lr.ph157.._crit_edge.loopexit_crit_edge, label %114

.lr.ph157.._crit_edge.loopexit_crit_edge:         ; preds = %.lr.ph157
  %.pre.pre = load i64, ptr %6, align 8, !tbaa !5
  br label %._crit_edge

114:                                              ; preds = %.lr.ph157
  %115 = load ptr, ptr %102, align 8, !tbaa !16
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = load ptr, ptr %84, align 8, !tbaa !16
  %118 = getelementptr inbounds ptr, ptr %117, i64 %116
  %119 = load ptr, ptr %118, align 8, !tbaa !23
  %120 = load double, ptr %119, align 8, !tbaa !17
  %121 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %120, ptr noundef %7)
  %122 = load ptr, ptr %84, align 8, !tbaa !16
  %123 = getelementptr inbounds ptr, ptr %122, i64 %116
  %124 = load ptr, ptr %123, align 8, !tbaa !23
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = load double, ptr %125, align 8, !tbaa !17
  %127 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %126, ptr noundef %7)
  %128 = load ptr, ptr %84, align 8, !tbaa !16
  %129 = getelementptr inbounds ptr, ptr %128, i64 %116
  %130 = load ptr, ptr %129, align 8, !tbaa !23
  %131 = getelementptr inbounds i8, ptr %130, i64 16
  %132 = load double, ptr %131, align 8, !tbaa !17
  %133 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %132, ptr noundef %7)
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %121, i64 noundef %133, ptr noundef nonnull %18, ptr noundef nonnull %20, ptr noundef %7)
  call void @_ZN11alglib_implL23lsfit_rdpanalyzesectionEPKNS_9ae_vectorES2_llPlPdPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %133, i64 noundef %127, ptr noundef nonnull %19, ptr noundef nonnull %21, ptr noundef %7)
  %134 = sitofp i64 %121 to double
  %135 = load ptr, ptr %84, align 8, !tbaa !16
  %136 = getelementptr inbounds ptr, ptr %135, i64 %116
  %137 = load ptr, ptr %136, align 8, !tbaa !23
  store double %134, ptr %137, align 8, !tbaa !17
  %138 = sitofp i64 %133 to double
  %139 = load ptr, ptr %84, align 8, !tbaa !16
  %140 = getelementptr inbounds ptr, ptr %139, i64 %116
  %141 = load ptr, ptr %140, align 8, !tbaa !23
  %142 = getelementptr inbounds i8, ptr %141, i64 8
  store double %138, ptr %142, align 8, !tbaa !17
  %143 = load i64, ptr %18, align 8, !tbaa !5
  %144 = sitofp i64 %143 to double
  %145 = load ptr, ptr %84, align 8, !tbaa !16
  %146 = getelementptr inbounds ptr, ptr %145, i64 %116
  %147 = load ptr, ptr %146, align 8, !tbaa !23
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  store double %144, ptr %148, align 8, !tbaa !17
  %149 = load double, ptr %20, align 8, !tbaa !17
  %150 = load ptr, ptr %84, align 8, !tbaa !16
  %151 = getelementptr inbounds ptr, ptr %150, i64 %116
  %152 = load ptr, ptr %151, align 8, !tbaa !23
  %153 = getelementptr inbounds i8, ptr %152, i64 24
  store double %149, ptr %153, align 8, !tbaa !17
  %154 = load i64, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl18tagheapreplacetopiEPNS_9ae_vectorES1_ldlPNS_8ae_stateE(ptr noundef nonnull %22, ptr noundef nonnull %23, i64 noundef %154, double noundef %149, i64 noundef %116, ptr noundef %7)
  %155 = load ptr, ptr %84, align 8, !tbaa !16
  %156 = load i64, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds ptr, ptr %155, i64 %156
  %158 = load ptr, ptr %157, align 8, !tbaa !23
  store double %138, ptr %158, align 8, !tbaa !17
  %159 = sitofp i64 %127 to double
  %160 = load ptr, ptr %84, align 8, !tbaa !16
  %161 = getelementptr inbounds ptr, ptr %160, i64 %156
  %162 = load ptr, ptr %161, align 8, !tbaa !23
  %163 = getelementptr inbounds i8, ptr %162, i64 8
  store double %159, ptr %163, align 8, !tbaa !17
  %164 = load i64, ptr %19, align 8, !tbaa !5
  %165 = sitofp i64 %164 to double
  %166 = load ptr, ptr %84, align 8, !tbaa !16
  %167 = getelementptr inbounds ptr, ptr %166, i64 %156
  %168 = load ptr, ptr %167, align 8, !tbaa !23
  %169 = getelementptr inbounds i8, ptr %168, i64 16
  store double %165, ptr %169, align 8, !tbaa !17
  %170 = load double, ptr %21, align 8, !tbaa !17
  %171 = load ptr, ptr %84, align 8, !tbaa !16
  %172 = getelementptr inbounds ptr, ptr %171, i64 %156
  %173 = load ptr, ptr %172, align 8, !tbaa !23
  %174 = getelementptr inbounds i8, ptr %173, i64 24
  store double %170, ptr %174, align 8, !tbaa !17
  call void @_ZN11alglib_impl12tagheappushiEPNS_9ae_vectorES1_PldlPNS_8ae_stateE(ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %6, double noundef %170, i64 noundef %156, ptr noundef %7)
  %175 = load i64, ptr %6, align 8, !tbaa !5
  %176 = icmp slt i64 %175, %3
  br i1 %176, label %.lr.ph157, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %114, %.lr.ph157.._crit_edge.loopexit_crit_edge, %83
  %177 = phi i64 [ %109, %83 ], [ %.pre.pre, %.lr.ph157.._crit_edge.loopexit_crit_edge ], [ %175, %114 ]
  %178 = add nsw i64 %177, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %178, ptr noundef %7)
  %179 = load ptr, ptr %84, align 8, !tbaa !16
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  %181 = getelementptr inbounds i8, ptr %180, i64 8
  %182 = load double, ptr %181, align 8, !tbaa !17
  %183 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %182, ptr noundef %7)
  %184 = load i64, ptr %6, align 8, !tbaa !5
  %.not.not138159 = icmp sgt i64 %184, 0
  br i1 %.not.not138159, label %.lr.ph163, label %._crit_edge164

.lr.ph163:                                        ; preds = %._crit_edge
  %185 = getelementptr inbounds i8, ptr %15, i64 56
  br label %186

186:                                              ; preds = %.lr.ph163, %215
  %.1161 = phi i64 [ 0, %.lr.ph163 ], [ %216, %215 ]
  %.1133160 = phi i64 [ %183, %.lr.ph163 ], [ %.2134, %215 ]
  %187 = load ptr, ptr %84, align 8, !tbaa !16
  %188 = getelementptr inbounds ptr, ptr %187, i64 %.1161
  %189 = load ptr, ptr %188, align 8, !tbaa !23
  %190 = load double, ptr %189, align 8, !tbaa !17
  %191 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %190, ptr noundef %7)
  %192 = sitofp i64 %191 to double
  %193 = load ptr, ptr %185, align 8, !tbaa !16
  %194 = getelementptr inbounds double, ptr %193, i64 %.1161
  store double %192, ptr %194, align 8, !tbaa !17
  %195 = load ptr, ptr %34, align 8, !tbaa !16
  %196 = load ptr, ptr %84, align 8, !tbaa !16
  %197 = getelementptr inbounds ptr, ptr %196, i64 %.1161
  %198 = load ptr, ptr %197, align 8, !tbaa !23
  %199 = getelementptr inbounds i8, ptr %198, i64 8
  %200 = load double, ptr %199, align 8, !tbaa !17
  %201 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %200, ptr noundef %7)
  %202 = getelementptr inbounds double, ptr %195, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !17
  %204 = load ptr, ptr %34, align 8, !tbaa !16
  %205 = getelementptr inbounds double, ptr %204, i64 %.1133160
  %206 = load double, ptr %205, align 8, !tbaa !17
  %207 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %203, double noundef %206)
  br i1 %207, label %208, label %215

208:                                              ; preds = %186
  %209 = load ptr, ptr %84, align 8, !tbaa !16
  %210 = getelementptr inbounds ptr, ptr %209, i64 %.1161
  %211 = load ptr, ptr %210, align 8, !tbaa !23
  %212 = getelementptr inbounds i8, ptr %211, i64 8
  %213 = load double, ptr %212, align 8, !tbaa !17
  %214 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %213, ptr noundef %7)
  br label %215

215:                                              ; preds = %186, %208
  %.2134 = phi i64 [ %214, %208 ], [ %.1133160, %186 ]
  %216 = add nuw nsw i64 %.1161, 1
  %217 = load i64, ptr %6, align 8, !tbaa !5
  %.not.not138 = icmp slt i64 %216, %217
  br i1 %.not.not138, label %186, label %._crit_edge164, !llvm.loop !25

._crit_edge164:                                   ; preds = %215, %._crit_edge
  %.1133.lcssa = phi i64 [ %183, %._crit_edge ], [ %.2134, %215 ]
  %.lcssa = phi i64 [ %184, %._crit_edge ], [ %217, %215 ]
  %218 = sitofp i64 %.1133.lcssa to double
  %219 = getelementptr inbounds i8, ptr %15, i64 56
  %220 = load ptr, ptr %219, align 8, !tbaa !16
  %221 = getelementptr inbounds double, ptr %220, i64 %.lcssa
  store double %218, ptr %221, align 8, !tbaa !17
  %222 = add nsw i64 %.lcssa, 1
  call void @_ZN11alglib_impl11tagsortfastEPNS_9ae_vectorES1_lPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %12, i64 noundef %222, ptr noundef %7)
  %223 = load i64, ptr %6, align 8, !tbaa !5
  %224 = add nsw i64 %223, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %224, ptr noundef %7)
  %225 = load i64, ptr %6, align 8, !tbaa !5
  %226 = add nsw i64 %225, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %226, ptr noundef %7)
  %227 = load i64, ptr %6, align 8, !tbaa !5
  %.not167 = icmp slt i64 %227, 0
  br i1 %.not167, label %._crit_edge171, label %.lr.ph170

.lr.ph170:                                        ; preds = %._crit_edge164
  %228 = getelementptr inbounds i8, ptr %4, i64 56
  %229 = getelementptr inbounds i8, ptr %5, i64 56
  br label %230

230:                                              ; preds = %.lr.ph170, %230
  %.2168 = phi i64 [ 0, %.lr.ph170 ], [ %249, %230 ]
  %231 = load ptr, ptr %34, align 8, !tbaa !16
  %232 = load ptr, ptr %219, align 8, !tbaa !16
  %233 = getelementptr inbounds double, ptr %232, i64 %.2168
  %234 = load double, ptr %233, align 8, !tbaa !17
  %235 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %234, ptr noundef %7)
  %236 = getelementptr inbounds double, ptr %231, i64 %235
  %237 = load double, ptr %236, align 8, !tbaa !17
  %238 = load ptr, ptr %228, align 8, !tbaa !16
  %239 = getelementptr inbounds double, ptr %238, i64 %.2168
  store double %237, ptr %239, align 8, !tbaa !17
  %240 = load ptr, ptr %33, align 8, !tbaa !16
  %241 = load ptr, ptr %219, align 8, !tbaa !16
  %242 = getelementptr inbounds double, ptr %241, i64 %.2168
  %243 = load double, ptr %242, align 8, !tbaa !17
  %244 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %243, ptr noundef %7)
  %245 = getelementptr inbounds double, ptr %240, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !17
  %247 = load ptr, ptr %229, align 8, !tbaa !16
  %248 = getelementptr inbounds double, ptr %247, i64 %.2168
  store double %246, ptr %248, align 8, !tbaa !17
  %249 = add nuw nsw i64 %.2168, 1
  %250 = load i64, ptr %6, align 8, !tbaa !5
  %.not.not172 = icmp slt i64 %.2168, %250
  br i1 %.not.not172, label %230, label %._crit_edge171, !llvm.loop !26

._crit_edge171.sink.split:                        ; preds = %77, %8
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %._crit_edge171

._crit_edge171:                                   ; preds = %230, %._crit_edge171.sink.split, %._crit_edge164
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  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 80, 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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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 = !{!13, !13, i64 0}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15}


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