; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (optimization)

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

@.str.1376 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1377 = external hidden unnamed_addr constant [34 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 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) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10linreglineEPKNS_9ae_vectorES2_lPdS3_S3_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, 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 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !11
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %30, align 8, !tbaa !11
  %31 = load i64, ptr %10, align 8, !tbaa !9
  %32 = icmp sge i64 %31, 2
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.1376, ptr noundef %33)
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %68, %7
  %35 = load i64, ptr %15, align 8, !tbaa !9
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = sub nsw i64 %36, 1
  %38 = icmp sle i64 %35, %37
  br i1 %38, label %39, label %71

39:                                               ; preds = %34
  %40 = load double, ptr %16, align 8, !tbaa !11
  %41 = fadd double %40, 1.000000e+00
  store double %41, ptr %16, align 8, !tbaa !11
  %42 = load double, ptr %17, align 8, !tbaa !11
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = load i64, ptr %15, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %45, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = fadd double %42, %48
  store double %49, ptr %17, align 8, !tbaa !11
  %50 = load double, ptr %19, align 8, !tbaa !11
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load i64, ptr %15, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %53, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !11
  %57 = fadd double %50, %56
  store double %57, ptr %19, align 8, !tbaa !11
  %58 = load double, ptr %18, align 8, !tbaa !11
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = load i64, ptr %15, align 8, !tbaa !9
  %63 = getelementptr inbounds double, ptr %61, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !11
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %64, ptr noundef %65)
  %67 = fadd double %58, %66
  store double %67, ptr %18, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %39
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %15, align 8, !tbaa !9
  br label %34, !llvm.loop !14

71:                                               ; preds = %34
  %72 = load double, ptr %17, align 8, !tbaa !11
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %72, ptr noundef %73)
  %75 = load double, ptr %16, align 8, !tbaa !11
  %76 = load double, ptr %18, align 8, !tbaa !11
  %77 = fsub double %75, %76
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %77, ptr noundef %78)
  %80 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %74, double %79)
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %80, ptr noundef %81)
  store double %82, ptr %23, align 8, !tbaa !11
  %83 = load double, ptr %16, align 8, !tbaa !11
  %84 = load double, ptr %18, align 8, !tbaa !11
  %85 = fadd double %83, %84
  %86 = load double, ptr %23, align 8, !tbaa !11
  %87 = fadd double %85, %86
  %88 = fmul double 5.000000e-01, %87
  store double %88, ptr %21, align 8, !tbaa !11
  %89 = load double, ptr %16, align 8, !tbaa !11
  %90 = load double, ptr %18, align 8, !tbaa !11
  %91 = fadd double %89, %90
  %92 = load double, ptr %23, align 8, !tbaa !11
  %93 = fsub double %91, %92
  %94 = fmul double 5.000000e-01, %93
  store double %94, ptr %22, align 8, !tbaa !11
  %95 = load double, ptr %21, align 8, !tbaa !11
  %96 = load double, ptr %22, align 8, !tbaa !11
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %95, double noundef %96, ptr noundef %97)
  %99 = load double, ptr %21, align 8, !tbaa !11
  %100 = load double, ptr %22, align 8, !tbaa !11
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %99, double noundef %100, ptr noundef %101)
  %103 = fmul double 5.000000e-13, %102
  %104 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %98, double noundef %103)
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %104, ptr noundef @.str.1377, ptr noundef %105)
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %106, align 8, !tbaa !11
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  store double 0.000000e+00, ptr %107, align 8, !tbaa !11
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %140, %71
  %109 = load i64, ptr %15, align 8, !tbaa !9
  %110 = load i64, ptr %10, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = icmp sle i64 %109, %111
  br i1 %112, label %113, label %143

113:                                              ; preds = %108
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = load i64, ptr %15, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = load double, ptr %17, align 8, !tbaa !11
  %121 = load double, ptr %16, align 8, !tbaa !11
  %122 = fdiv double %120, %121
  %123 = fsub double %119, %122
  store double %123, ptr %23, align 8, !tbaa !11
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = load double, ptr %23, align 8, !tbaa !11
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !13
  %130 = load i64, ptr %15, align 8, !tbaa !9
  %131 = getelementptr inbounds double, ptr %129, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !11
  %133 = call double @llvm.fmuladd.f64(double %126, double %132, double %125)
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  store double %133, ptr %134, align 8, !tbaa !11
  %135 = load double, ptr %20, align 8, !tbaa !11
  %136 = load double, ptr %23, align 8, !tbaa !11
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %136, ptr noundef %137)
  %139 = fadd double %135, %138
  store double %139, ptr %20, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %113
  %141 = load i64, ptr %15, align 8, !tbaa !9
  %142 = add nsw i64 %141, 1
  store i64 %142, ptr %15, align 8, !tbaa !9
  br label %108, !llvm.loop !16

143:                                              ; preds = %108
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  %145 = load double, ptr %144, align 8, !tbaa !11
  %146 = load double, ptr %20, align 8, !tbaa !11
  %147 = fdiv double %145, %146
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  store double %147, ptr %148, align 8, !tbaa !11
  %149 = load double, ptr %19, align 8, !tbaa !11
  %150 = load double, ptr %17, align 8, !tbaa !11
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = fneg double %150
  %154 = call double @llvm.fmuladd.f64(double %153, double %152, double %149)
  %155 = load double, ptr %16, align 8, !tbaa !11
  %156 = fdiv double %154, %155
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  store double %156, ptr %157, align 8, !tbaa !11
  %158 = load double, ptr %17, align 8, !tbaa !11
  %159 = load i64, ptr %10, align 8, !tbaa !9
  %160 = sitofp i64 %159 to double
  %161 = fdiv double %158, %160
  store double %161, ptr %26, align 8, !tbaa !11
  %162 = load double, ptr %19, align 8, !tbaa !11
  %163 = load i64, ptr %10, align 8, !tbaa !9
  %164 = sitofp i64 %163 to double
  %165 = fdiv double %162, %164
  store double %165, ptr %27, align 8, !tbaa !11
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %166, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %167

167:                                              ; preds = %229, %143
  %168 = load i64, ptr %15, align 8, !tbaa !9
  %169 = load i64, ptr %10, align 8, !tbaa !9
  %170 = sub nsw i64 %169, 1
  %171 = icmp sle i64 %168, %170
  br i1 %171, label %172, label %232

172:                                              ; preds = %167
  %173 = load double, ptr %24, align 8, !tbaa !11
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %174, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !13
  %177 = load i64, ptr %15, align 8, !tbaa !9
  %178 = getelementptr inbounds double, ptr %176, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = load double, ptr %26, align 8, !tbaa !11
  %181 = fsub double %179, %180
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = load i64, ptr %15, align 8, !tbaa !9
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = load double, ptr %26, align 8, !tbaa !11
  %189 = fsub double %187, %188
  %190 = call double @llvm.fmuladd.f64(double %181, double %189, double %173)
  store double %190, ptr %24, align 8, !tbaa !11
  %191 = load double, ptr %25, align 8, !tbaa !11
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %192, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !13
  %195 = load i64, ptr %15, align 8, !tbaa !9
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  %197 = load double, ptr %196, align 8, !tbaa !11
  %198 = load double, ptr %27, align 8, !tbaa !11
  %199 = fsub double %197, %198
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %200, i32 0, i32 4
  %202 = load ptr, ptr %201, align 8, !tbaa !13
  %203 = load i64, ptr %15, align 8, !tbaa !9
  %204 = getelementptr inbounds double, ptr %202, i64 %203
  %205 = load double, ptr %204, align 8, !tbaa !11
  %206 = load double, ptr %27, align 8, !tbaa !11
  %207 = fsub double %205, %206
  %208 = call double @llvm.fmuladd.f64(double %199, double %207, double %191)
  store double %208, ptr %25, align 8, !tbaa !11
  %209 = load ptr, ptr %13, align 8, !tbaa !5
  %210 = load double, ptr %209, align 8, !tbaa !11
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %211, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !13
  %214 = load i64, ptr %15, align 8, !tbaa !9
  %215 = getelementptr inbounds double, ptr %213, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !11
  %217 = load double, ptr %26, align 8, !tbaa !11
  %218 = fsub double %216, %217
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %219, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !13
  %222 = load i64, ptr %15, align 8, !tbaa !9
  %223 = getelementptr inbounds double, ptr %221, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !11
  %225 = load double, ptr %27, align 8, !tbaa !11
  %226 = fsub double %224, %225
  %227 = call double @llvm.fmuladd.f64(double %218, double %226, double %210)
  %228 = load ptr, ptr %13, align 8, !tbaa !5
  store double %227, ptr %228, align 8, !tbaa !11
  br label %229

229:                                              ; preds = %172
  %230 = load i64, ptr %15, align 8, !tbaa !9
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %15, align 8, !tbaa !9
  br label %167, !llvm.loop !17

232:                                              ; preds = %167
  %233 = load ptr, ptr %13, align 8, !tbaa !5
  %234 = load double, ptr %233, align 8, !tbaa !11
  %235 = load double, ptr %24, align 8, !tbaa !11
  %236 = load double, ptr %25, align 8, !tbaa !11
  %237 = fmul double %235, %236
  %238 = load ptr, ptr %14, align 8, !tbaa !5
  %239 = call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %237, double noundef 1.000000e+00, ptr noundef %238)
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %239, ptr noundef %240)
  %242 = fdiv double %234, %241
  %243 = load ptr, ptr %13, align 8, !tbaa !5
  store double %242, ptr %243, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; 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"

@.str.1376 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1377 = external hidden unnamed_addr constant [34 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #0

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10linreglineEPKNS_9ae_vectorES2_lPdS3_S3_PNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef %4, ptr nocapture noundef writeonly %5, ptr noundef %6) local_unnamed_addr #2 {
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  %8 = icmp sgt i64 %2, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.1376, ptr noundef %6)
  %.not.not108 = icmp sgt i64 %2, 0
  br i1 %.not.not108, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  %10 = getelementptr inbounds i8, ptr %1, i64 56
  br label %11

11:                                               ; preds = %.lr.ph, %11
  %.0113 = phi i64 [ 0, %.lr.ph ], [ %25, %11 ]
  %.098112 = phi double [ 0.000000e+00, %.lr.ph ], [ %13, %11 ]
  %.0102110 = phi double [ 0.000000e+00, %.lr.ph ], [ %24, %11 ]
  %12 = phi <2 x double> [ zeroinitializer, %.lr.ph ], [ %22, %11 ]
  %13 = fadd double %.098112, 1.000000e+00
  %14 = load ptr, ptr %9, align 8, !tbaa !9
  %15 = getelementptr inbounds double, ptr %14, i64 %.0113
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = load ptr, ptr %10, align 8, !tbaa !9
  %18 = getelementptr inbounds double, ptr %17, i64 %.0113
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = insertelement <2 x double> poison, double %19, i64 0
  %21 = insertelement <2 x double> %20, double %16, i64 1
  %22 = fadd <2 x double> %12, %21
  %23 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %16, ptr noundef %6)
  %24 = fadd double %.0102110, %23
  %25 = add nuw nsw i64 %.0113, 1
  %exitcond.not = icmp eq i64 %25, %2
  br i1 %exitcond.not, label %._crit_edge, label %11, !llvm.loop !10

._crit_edge:                                      ; preds = %11, %7
  %.0102.lcssa = phi double [ 0.000000e+00, %7 ], [ %24, %11 ]
  %.098.lcssa = phi double [ 0.000000e+00, %7 ], [ %13, %11 ]
  %26 = phi <2 x double> [ zeroinitializer, %7 ], [ %22, %11 ]
  %27 = extractelement <2 x double> %26, i64 1
  %28 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %27, ptr noundef %6)
  %29 = fsub double %.098.lcssa, %.0102.lcssa
  %30 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %29, ptr noundef %6)
  %31 = tail call double @llvm.fmuladd.f64(double %28, double 4.000000e+00, double %30)
  %32 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %31, ptr noundef %6)
  %33 = fadd double %.0102.lcssa, %.098.lcssa
  %34 = fadd double %33, %32
  %35 = fmul double %34, 5.000000e-01
  %36 = fsub double %33, %32
  %37 = fmul double %36, 5.000000e-01
  %38 = tail call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %35, double noundef %37, ptr noundef %6)
  %39 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %35, double noundef %37, ptr noundef %6)
  %40 = fmul double %39, 5.000000e-13
  %41 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %38, double noundef %40)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef nonnull @.str.1377, ptr noundef %6)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  br i1 %.not.not108, label %.lr.ph121, label %._crit_edge122

.lr.ph121:                                        ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %0, i64 56
  %43 = fdiv double %27, %.098.lcssa
  %44 = getelementptr inbounds i8, ptr %1, i64 56
  br label %45

45:                                               ; preds = %.lr.ph121, %45
  %.1119 = phi i64 [ 0, %.lr.ph121 ], [ %57, %45 ]
  %.0103118 = phi double [ 0.000000e+00, %.lr.ph121 ], [ %56, %45 ]
  %46 = load ptr, ptr %42, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %46, i64 %.1119
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fsub double %48, %43
  %50 = load double, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %44, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %51, i64 %.1119
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = tail call double @llvm.fmuladd.f64(double %49, double %53, double %50)
  store double %54, ptr %4, align 8, !tbaa !5
  %55 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %49, ptr noundef %6)
  %56 = fadd double %.0103118, %55
  %57 = add nuw nsw i64 %.1119, 1
  %exitcond139.not = icmp eq i64 %57, %2
  br i1 %exitcond139.not, label %._crit_edge122.loopexit, label %45, !llvm.loop !12

._crit_edge122.loopexit:                          ; preds = %45
  %.pre = load double, ptr %4, align 8, !tbaa !5
  %58 = fdiv double %.pre, %56
  br label %._crit_edge122

._crit_edge122:                                   ; preds = %._crit_edge122.loopexit, %._crit_edge
  %59 = phi double [ 0x7FF8000000000000, %._crit_edge ], [ %58, %._crit_edge122.loopexit ]
  store double %59, ptr %4, align 8, !tbaa !5
  %60 = fneg double %27
  %61 = extractelement <2 x double> %26, i64 0
  %62 = tail call double @llvm.fmuladd.f64(double %60, double %59, double %61)
  %63 = fdiv double %62, %.098.lcssa
  store double %63, ptr %3, align 8, !tbaa !5
  %64 = sitofp i64 %2 to double
  %65 = insertelement <2 x double> poison, double %64, i64 0
  %66 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> zeroinitializer
  %67 = fdiv <2 x double> %26, %66
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  br i1 %.not.not108, label %.lr.ph129, label %._crit_edge130

.lr.ph129:                                        ; preds = %._crit_edge122
  %68 = getelementptr inbounds i8, ptr %0, i64 56
  %69 = getelementptr inbounds i8, ptr %1, i64 56
  br label %70

70:                                               ; preds = %.lr.ph129, %70
  %.2127 = phi i64 [ 0, %.lr.ph129 ], [ %86, %70 ]
  %.0100125 = phi double [ 0.000000e+00, %.lr.ph129 ], [ %82, %70 ]
  %71 = phi <2 x double> [ zeroinitializer, %.lr.ph129 ], [ %84, %70 ]
  %72 = load ptr, ptr %68, align 8, !tbaa !9
  %73 = getelementptr inbounds double, ptr %72, i64 %.2127
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = load ptr, ptr %69, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %75, i64 %.2127
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = insertelement <2 x double> poison, double %77, i64 0
  %79 = insertelement <2 x double> %78, double %74, i64 1
  %80 = fsub <2 x double> %79, %67
  %81 = extractelement <2 x double> %80, i64 1
  %82 = tail call double @llvm.fmuladd.f64(double %81, double %81, double %.0100125)
  %83 = shufflevector <2 x double> %80, <2 x double> poison, <2 x i32> zeroinitializer
  %84 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %83, <2 x double> %80, <2 x double> %71)
  %85 = extractelement <2 x double> %84, i64 1
  store double %85, ptr %5, align 8, !tbaa !5
  %86 = add nuw nsw i64 %.2127, 1
  %exitcond140.not = icmp eq i64 %86, %2
  br i1 %exitcond140.not, label %._crit_edge130.loopexit, label %70, !llvm.loop !13

._crit_edge130.loopexit:                          ; preds = %70
  %87 = extractelement <2 x double> %84, i64 0
  %88 = fmul double %82, %87
  br label %._crit_edge130

._crit_edge130:                                   ; preds = %._crit_edge130.loopexit, %._crit_edge122
  %89 = phi double [ 0.000000e+00, %._crit_edge122 ], [ %85, %._crit_edge130.loopexit ]
  %90 = phi double [ 0.000000e+00, %._crit_edge122 ], [ %88, %._crit_edge130.loopexit ]
  %91 = tail call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %90, double noundef 1.000000e+00, ptr noundef %6)
  %92 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %91, ptr noundef %6)
  %93 = fdiv double %89, %92
  store double %93, ptr %5, align 8, !tbaa !5
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


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