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

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23gqgenerategaussradaurecEPKNS_9ae_vectorES2_ddlPlPS0_S4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #1 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store double %2, ptr %12, align 8, !tbaa !9
  store double %3, ptr %13, align 8, !tbaa !9
  store i64 %4, ptr %14, align 8, !tbaa !11
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %30, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 80, i1 false)
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %20, ptr noundef %31, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %21, ptr noundef %33, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %35, align 8, !tbaa !11
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %36)
  %37 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %37)
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %40, i1 noundef zeroext true)
  %41 = load i64, ptr %14, align 8, !tbaa !11
  %42 = icmp slt i64 %41, 2
  br i1 %42, label %43, label %46

43:                                               ; preds = %9
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -1, ptr %44, align 8, !tbaa !11
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %45)
  store i32 1, ptr %29, align 4
  br label %202

46:                                               ; preds = %9
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 1, ptr %47, align 8, !tbaa !11
  %48 = load i64, ptr %14, align 8, !tbaa !11
  %49 = sub nsw i64 %48, 1
  store i64 %49, ptr %14, align 8, !tbaa !11
  %50 = load i64, ptr %14, align 8, !tbaa !11
  %51 = add nsw i64 %50, 1
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %23, i64 noundef %51, ptr noundef %52)
  %53 = load i64, ptr %14, align 8, !tbaa !11
  %54 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef %53, ptr noundef %54)
  store i64 1, ptr %22, align 8, !tbaa !11
  br label %55

55:                                               ; preds = %93, %46
  %56 = load i64, ptr %22, align 8, !tbaa !11
  %57 = load i64, ptr %14, align 8, !tbaa !11
  %58 = icmp sle i64 %56, %57
  br i1 %58, label %59, label %96

59:                                               ; preds = %55
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = load i64, ptr %22, align 8, !tbaa !11
  %63 = sub nsw i64 %62, 1
  %64 = getelementptr inbounds double, ptr %61, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = load i64, ptr %22, align 8, !tbaa !11
  %69 = sub nsw i64 %68, 1
  %70 = getelementptr inbounds double, ptr %67, i64 %69
  store double %65, ptr %70, align 8, !tbaa !9
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load i64, ptr %22, align 8, !tbaa !11
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %75, double noundef 0.000000e+00)
  br i1 %76, label %77, label %80

77:                                               ; preds = %59
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -2, ptr %78, align 8, !tbaa !11
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %79)
  store i32 1, ptr %29, align 4
  br label %202

80:                                               ; preds = %59
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !13
  %83 = load i64, ptr %22, align 8, !tbaa !11
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %85, ptr noundef %86)
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i64, ptr %22, align 8, !tbaa !11
  %91 = sub nsw i64 %90, 1
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  store double %87, ptr %92, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %80
  %94 = load i64, ptr %22, align 8, !tbaa !11
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %22, align 8, !tbaa !11
  br label %55, !llvm.loop !14

96:                                               ; preds = %55
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds double, ptr %98, i64 0
  store double 0.000000e+00, ptr %99, align 8, !tbaa !9
  store double 0.000000e+00, ptr %26, align 8, !tbaa !9
  store double 1.000000e+00, ptr %27, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !11
  br label %100

100:                                              ; preds = %126, %96
  %101 = load i64, ptr %22, align 8, !tbaa !11
  %102 = load i64, ptr %14, align 8, !tbaa !11
  %103 = icmp sle i64 %101, %102
  br i1 %103, label %104, label %129

104:                                              ; preds = %100
  %105 = load double, ptr %13, align 8, !tbaa !9
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !13
  %108 = load i64, ptr %22, align 8, !tbaa !11
  %109 = sub nsw i64 %108, 1
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !9
  %112 = fsub double %105, %111
  %113 = load double, ptr %27, align 8, !tbaa !9
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = load i64, ptr %22, align 8, !tbaa !11
  %117 = sub nsw i64 %116, 1
  %118 = getelementptr inbounds double, ptr %115, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !9
  %120 = load double, ptr %26, align 8, !tbaa !9
  %121 = fmul double %119, %120
  %122 = fneg double %121
  %123 = call double @llvm.fmuladd.f64(double %112, double %113, double %122)
  store double %123, ptr %28, align 8, !tbaa !9
  %124 = load double, ptr %27, align 8, !tbaa !9
  store double %124, ptr %26, align 8, !tbaa !9
  %125 = load double, ptr %28, align 8, !tbaa !9
  store double %125, ptr %27, align 8, !tbaa !9
  br label %126

126:                                              ; preds = %104
  %127 = load i64, ptr %22, align 8, !tbaa !11
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %22, align 8, !tbaa !11
  br label %100, !llvm.loop !16

129:                                              ; preds = %100
  %130 = load double, ptr %13, align 8, !tbaa !9
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !13
  %133 = load i64, ptr %14, align 8, !tbaa !11
  %134 = getelementptr inbounds double, ptr %132, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = load double, ptr %26, align 8, !tbaa !9
  %137 = fmul double %135, %136
  %138 = load double, ptr %27, align 8, !tbaa !9
  %139 = fdiv double %137, %138
  %140 = fsub double %130, %139
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = load i64, ptr %14, align 8, !tbaa !11
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  store double %140, ptr %144, align 8, !tbaa !9
  %145 = load i64, ptr %14, align 8, !tbaa !11
  %146 = add nsw i64 %145, 1
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  %148 = call noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorEPKS0_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %23, ptr noundef %24, i64 noundef %146, i64 noundef 3, ptr noundef %25, ptr noundef %147)
  br i1 %148, label %152, label %149

149:                                              ; preds = %129
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -3, ptr %150, align 8, !tbaa !11
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %151)
  store i32 1, ptr %29, align 4
  br label %202

152:                                              ; preds = %129
  %153 = load ptr, ptr %16, align 8, !tbaa !5
  %154 = load i64, ptr %14, align 8, !tbaa !11
  %155 = add nsw i64 %154, 1
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %153, i64 noundef %155, ptr noundef %156)
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = load i64, ptr %14, align 8, !tbaa !11
  %159 = add nsw i64 %158, 1
  %160 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %157, i64 noundef %159, ptr noundef %160)
  store i64 1, ptr %22, align 8, !tbaa !11
  br label %161

161:                                              ; preds = %197, %152
  %162 = load i64, ptr %22, align 8, !tbaa !11
  %163 = load i64, ptr %14, align 8, !tbaa !11
  %164 = add nsw i64 %163, 1
  %165 = icmp sle i64 %162, %164
  br i1 %165, label %166, label %200

166:                                              ; preds = %161
  %167 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !13
  %169 = load i64, ptr %22, align 8, !tbaa !11
  %170 = sub nsw i64 %169, 1
  %171 = getelementptr inbounds double, ptr %168, i64 %170
  %172 = load double, ptr %171, align 8, !tbaa !9
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !13
  %176 = load i64, ptr %22, align 8, !tbaa !11
  %177 = sub nsw i64 %176, 1
  %178 = getelementptr inbounds double, ptr %175, i64 %177
  store double %172, ptr %178, align 8, !tbaa !9
  %179 = load double, ptr %12, align 8, !tbaa !9
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %25, i32 0, i32 6
  %181 = load ptr, ptr %180, align 8, !tbaa !13
  %182 = getelementptr inbounds ptr, ptr %181, i64 0
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i64, ptr %22, align 8, !tbaa !11
  %185 = sub nsw i64 %184, 1
  %186 = getelementptr inbounds double, ptr %183, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = load ptr, ptr %18, align 8, !tbaa !5
  %189 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %187, ptr noundef %188)
  %190 = fmul double %179, %189
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %191, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !13
  %194 = load i64, ptr %22, align 8, !tbaa !11
  %195 = sub nsw i64 %194, 1
  %196 = getelementptr inbounds double, ptr %193, i64 %195
  store double %190, ptr %196, align 8, !tbaa !9
  br label %197

197:                                              ; preds = %166
  %198 = load i64, ptr %22, align 8, !tbaa !11
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %22, align 8, !tbaa !11
  br label %161, !llvm.loop !17

200:                                              ; preds = %161
  %201 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %201)
  store i32 0, ptr %29, align 4
  br label %202

202:                                              ; preds = %200, %149, %77, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %203 = load i32, ptr %29, align 4
  switch i32 %203, label %205 [
    i32 0, label %204
    i32 1, label %204
  ]

204:                                              ; preds = %202, %202
  ret void

205:                                              ; preds = %202
  unreachable
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorEPKS0_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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"

%"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 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23gqgenerategaussradaurecEPKNS_9ae_vectorES2_ddlPlPS0_S4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, i64 noundef %4, ptr nocapture noundef writeonly %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #1 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %15) #6
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %15, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %0, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %1, ptr noundef %8, i1 noundef zeroext true)
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %6)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %7)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  %16 = icmp slt i64 %4, 2
  br i1 %16, label %._crit_edge82.sink.split, label %17

17:                                               ; preds = %9
  store i64 1, ptr %5, align 8, !tbaa !5
  %18 = add nsw i64 %4, -1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %4, ptr noundef %8)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %18, ptr noundef %8)
  %19 = getelementptr inbounds i8, ptr %11, i64 56
  %20 = getelementptr inbounds i8, ptr %13, i64 56
  %21 = getelementptr inbounds i8, ptr %12, i64 56
  %22 = getelementptr inbounds i8, ptr %14, i64 56
  br label %23

23:                                               ; preds = %17, %34
  %.06872 = phi i64 [ 1, %17 ], [ %41, %34 ]
  %24 = load ptr, ptr %19, align 8, !tbaa !9
  %25 = add nsw i64 %.06872, -1
  %26 = getelementptr inbounds double, ptr %24, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !10
  %28 = load ptr, ptr %20, align 8, !tbaa !9
  %29 = getelementptr inbounds double, ptr %28, i64 %25
  store double %27, ptr %29, align 8, !tbaa !10
  %30 = load ptr, ptr %21, align 8, !tbaa !9
  %31 = getelementptr inbounds double, ptr %30, i64 %.06872
  %32 = load double, ptr %31, align 8, !tbaa !10
  %33 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %32, double noundef 0.000000e+00)
  br i1 %33, label %._crit_edge82.sink.split, label %34

34:                                               ; preds = %23
  %35 = load ptr, ptr %21, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %35, i64 %.06872
  %37 = load double, ptr %36, align 8, !tbaa !10
  %38 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %37, ptr noundef %8)
  %39 = load ptr, ptr %22, align 8, !tbaa !9
  %40 = getelementptr inbounds double, ptr %39, i64 %25
  store double %38, ptr %40, align 8, !tbaa !10
  %41 = add nuw nsw i64 %.06872, 1
  %exitcond.not = icmp eq i64 %41, %4
  br i1 %exitcond.not, label %.lr.ph, label %23, !llvm.loop !12

.lr.ph:                                           ; preds = %34
  %42 = load ptr, ptr %21, align 8, !tbaa !9
  store double 0.000000e+00, ptr %42, align 8, !tbaa !10
  %43 = load ptr, ptr %19, align 8, !tbaa !9
  %44 = load ptr, ptr %21, align 8, !tbaa !9
  %45 = add nsw i64 %4, -1
  %xtraiter = and i64 %45, 1
  %46 = icmp eq i64 %4, 2
  br i1 %46, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %45, -2
  br label %47

47:                                               ; preds = %47, %.lr.ph.new
  %.076 = phi double [ 1.000000e+00, %.lr.ph.new ], [ %64, %47 ]
  %.06775 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %56, %47 ]
  %.174 = phi i64 [ 1, %.lr.ph.new ], [ %65, %47 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %47 ]
  %48 = add nsw i64 %.174, -1
  %49 = getelementptr inbounds double, ptr %43, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !10
  %51 = fsub double %3, %50
  %52 = getelementptr inbounds double, ptr %44, i64 %48
  %53 = load double, ptr %52, align 8, !tbaa !10
  %54 = fneg double %53
  %55 = fmul double %.06775, %54
  %56 = call double @llvm.fmuladd.f64(double %51, double %.076, double %55)
  %57 = getelementptr inbounds double, ptr %43, i64 %.174
  %58 = load double, ptr %57, align 8, !tbaa !10
  %59 = fsub double %3, %58
  %60 = getelementptr inbounds double, ptr %44, i64 %.174
  %61 = load double, ptr %60, align 8, !tbaa !10
  %62 = fneg double %61
  %63 = fmul double %.076, %62
  %64 = call double @llvm.fmuladd.f64(double %59, double %56, double %63)
  %65 = add nuw nsw i64 %.174, 2
  %niter.next.1 = add nuw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa.loopexit, label %47, !llvm.loop !14

._crit_edge.unr-lcssa.loopexit:                   ; preds = %47
  %66 = add nuw nsw i64 %.174, 1
  br label %._crit_edge.unr-lcssa

._crit_edge.unr-lcssa:                            ; preds = %._crit_edge.unr-lcssa.loopexit, %.lr.ph
  %.076.lcssa.ph = phi double [ poison, %.lr.ph ], [ %56, %._crit_edge.unr-lcssa.loopexit ]
  %.lcssa.ph = phi double [ poison, %.lr.ph ], [ %64, %._crit_edge.unr-lcssa.loopexit ]
  %.076.unr = phi double [ 1.000000e+00, %.lr.ph ], [ %64, %._crit_edge.unr-lcssa.loopexit ]
  %.06775.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %56, %._crit_edge.unr-lcssa.loopexit ]
  %.174.unr = phi i64 [ 0, %.lr.ph ], [ %66, %._crit_edge.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %67 = getelementptr inbounds double, ptr %43, i64 %.174.unr
  %68 = load double, ptr %67, align 8, !tbaa !10
  %69 = fsub double %3, %68
  %70 = getelementptr inbounds double, ptr %44, i64 %.174.unr
  %71 = load double, ptr %70, align 8, !tbaa !10
  %72 = fneg double %71
  %73 = fmul double %.06775.unr, %72
  %74 = call double @llvm.fmuladd.f64(double %69, double %.076.unr, double %73)
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.076.lcssa = phi double [ %.076.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.076.unr, %._crit_edge.epilog-lcssa ]
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %74, %._crit_edge.epilog-lcssa ]
  %.phi.trans.insert = getelementptr inbounds double, ptr %44, i64 %18
  %.pre86 = load double, ptr %.phi.trans.insert, align 8, !tbaa !10
  %75 = fmul double %.076.lcssa, %.pre86
  %76 = fdiv double %75, %.lcssa
  %77 = fsub double %3, %76
  %78 = load ptr, ptr %20, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %78, i64 %18
  store double %77, ptr %79, align 8, !tbaa !10
  %80 = call noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorEPKS0_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %14, i64 noundef %4, i64 noundef 3, ptr noundef nonnull %15, ptr noundef %8)
  br i1 %80, label %.lr.ph81, label %._crit_edge82.sink.split

.lr.ph81:                                         ; preds = %._crit_edge
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %6, i64 noundef %4, ptr noundef %8)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %4, ptr noundef %8)
  %81 = getelementptr inbounds i8, ptr %6, i64 56
  %82 = getelementptr inbounds i8, ptr %15, i64 72
  %83 = getelementptr inbounds i8, ptr %7, i64 56
  %smax = call i64 @llvm.smax.i64(i64 %4, i64 1)
  br label %84

84:                                               ; preds = %.lr.ph81, %84
  %.279 = phi i64 [ 1, %.lr.ph81 ], [ %99, %84 ]
  %85 = load ptr, ptr %20, align 8, !tbaa !9
  %86 = add nsw i64 %.279, -1
  %87 = getelementptr inbounds double, ptr %85, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !10
  %89 = load ptr, ptr %81, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %89, i64 %86
  store double %88, ptr %90, align 8, !tbaa !10
  %91 = load ptr, ptr %82, align 8, !tbaa !9
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = getelementptr inbounds double, ptr %92, i64 %86
  %94 = load double, ptr %93, align 8, !tbaa !10
  %95 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %94, ptr noundef %8)
  %96 = fmul double %95, %2
  %97 = load ptr, ptr %83, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %97, i64 %86
  store double %96, ptr %98, align 8, !tbaa !10
  %99 = add nuw i64 %.279, 1
  %exitcond85.not = icmp eq i64 %.279, %smax
  br i1 %exitcond85.not, label %._crit_edge82, label %84, !llvm.loop !17

._crit_edge82.sink.split:                         ; preds = %23, %._crit_edge, %9
  %.sink = phi i64 [ -1, %9 ], [ -3, %._crit_edge ], [ -2, %23 ]
  store i64 %.sink, ptr %5, align 8, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %84, %._crit_edge82.sink.split
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  ret void
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

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

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 #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorEPKS0_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !13}


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