; LLVM IR from sp-nitech/SPTK :: src/math (symmetric_matrix)

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

%"class.sptk::SymmetricMatrix" = type { ptr, i32, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; 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
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk15SymmetricMatrix6ResizeEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk15SymmetricMatrix21CholeskyDecompositionEPS0_PSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2) #2 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr null, %16
  br i1 %17, label %31, label %18

18:                                               ; preds = %3
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp eq ptr null, %19
  br i1 %20, label %31, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = icmp eq ptr %15, %22
  br i1 %23, label %31, label %24

24:                                               ; preds = %21
  %25 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 3
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef 0) #4
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 0
  %29 = load double, ptr %28, align 8, !tbaa !9
  %30 = fcmp oeq double 0.000000e+00, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %24, %21, %18, %3
  store i1 false, ptr %4, align 1
  br label %232

32:                                               ; preds = %24
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = icmp ne i32 %35, %37
  br i1 %38, label %39, label %43

39:                                               ; preds = %32
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !11
  call void @_ZN4sptk15SymmetricMatrix6ResizeEi(ptr noundef nonnull align 8 dereferenceable(64) %40, i32 noundef %42)
  br label %43

43:                                               ; preds = %39, %32
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #4
  %46 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = icmp ne i64 %45, %48
  br i1 %49, label %50, label %55

50:                                               ; preds = %43
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !11
  %54 = sext i32 %53 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %54)
  br label %55

55:                                               ; preds = %50, %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 0) #4
  store ptr %57, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 3
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef 0) #4
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %60, i64 0
  %62 = load double, ptr %61, align 8, !tbaa !9
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %63, i64 0
  store double %62, ptr %64, align 8, !tbaa !9
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %65, i32 0, i32 3
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef 0) #4
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i64 0
  store double 1.000000e+00, ptr %69, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !22
  br label %70

70:                                               ; preds = %225, %55
  %71 = load i32, ptr %9, align 4, !tbaa !22
  %72 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 1
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = icmp slt i32 %71, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %70
  store i32 2, ptr %10, align 4
  br label %228

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !22
  br label %77

77:                                               ; preds = %147, %76
  %78 = load i32, ptr %11, align 4, !tbaa !22
  %79 = load i32, ptr %9, align 4, !tbaa !22
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %150

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %83 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 3
  %84 = load i32, ptr %9, align 4, !tbaa !22
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #4
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !22
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !9
  store double %91, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !22
  br label %92

92:                                               ; preds = %127, %82
  %93 = load i32, ptr %13, align 4, !tbaa !22
  %94 = load i32, ptr %11, align 4, !tbaa !22
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %130

97:                                               ; preds = %92
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %98, i32 0, i32 3
  %100 = load i32, ptr %9, align 4, !tbaa !22
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #4
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = load i32, ptr %13, align 4, !tbaa !22
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %108, i32 0, i32 3
  %110 = load i32, ptr %11, align 4, !tbaa !22
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %111) #4
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = load i32, ptr %13, align 4, !tbaa !22
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %113, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = fmul double %107, %117
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !22
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = load double, ptr %12, align 8, !tbaa !9
  %125 = fneg double %118
  %126 = call double @llvm.fmuladd.f64(double %125, double %123, double %124)
  store double %126, ptr %12, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %97
  %128 = load i32, ptr %13, align 4, !tbaa !22
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %13, align 4, !tbaa !22
  br label %92, !llvm.loop !23

130:                                              ; preds = %96
  %131 = load double, ptr %12, align 8, !tbaa !9
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = load i32, ptr %11, align 4, !tbaa !22
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %132, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !9
  %137 = fdiv double %131, %136
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %138, i32 0, i32 3
  %140 = load i32, ptr %9, align 4, !tbaa !22
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %141) #4
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = load i32, ptr %11, align 4, !tbaa !22
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  store double %137, ptr %146, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %147

147:                                              ; preds = %130
  %148 = load i32, ptr %11, align 4, !tbaa !22
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %11, align 4, !tbaa !22
  br label %77, !llvm.loop !25

150:                                              ; preds = %81
  %151 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %15, i32 0, i32 3
  %152 = load i32, ptr %9, align 4, !tbaa !22
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %153) #4
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = load i32, ptr %9, align 4, !tbaa !22
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %155, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !9
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i32, ptr %9, align 4, !tbaa !22
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds double, ptr %160, i64 %162
  store double %159, ptr %163, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !22
  br label %164

164:                                              ; preds = %203, %150
  %165 = load i32, ptr %14, align 4, !tbaa !22
  %166 = load i32, ptr %9, align 4, !tbaa !22
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %206

169:                                              ; preds = %164
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %170, i32 0, i32 3
  %172 = load i32, ptr %9, align 4, !tbaa !22
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %173) #4
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = load i32, ptr %14, align 4, !tbaa !22
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %175, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !9
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %180, i32 0, i32 3
  %182 = load i32, ptr %9, align 4, !tbaa !22
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %183) #4
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = load i32, ptr %14, align 4, !tbaa !22
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  %189 = load double, ptr %188, align 8, !tbaa !9
  %190 = fmul double %179, %189
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = load i32, ptr %14, align 4, !tbaa !22
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !9
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = load i32, ptr %9, align 4, !tbaa !22
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds double, ptr %196, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !9
  %201 = fneg double %190
  %202 = call double @llvm.fmuladd.f64(double %201, double %195, double %200)
  store double %202, ptr %199, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %169
  %204 = load i32, ptr %14, align 4, !tbaa !22
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %14, align 4, !tbaa !22
  br label %164, !llvm.loop !26

206:                                              ; preds = %168
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = load i32, ptr %9, align 4, !tbaa !22
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds double, ptr %207, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !9
  %212 = call double @llvm.fabs.f64(double %211)
  %213 = fcmp ole double %212, 0x3D719799812DEA11
  br i1 %213, label %214, label %215

214:                                              ; preds = %206
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %228

215:                                              ; preds = %206
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %"class.sptk::SymmetricMatrix", ptr %216, i32 0, i32 3
  %218 = load i32, ptr %9, align 4, !tbaa !22
  %219 = sext i32 %218 to i64
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %217, i64 noundef %219) #4
  %221 = load ptr, ptr %220, align 8, !tbaa !5
  %222 = load i32, ptr %9, align 4, !tbaa !22
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds double, ptr %221, i64 %223
  store double 1.000000e+00, ptr %224, align 8, !tbaa !9
  br label %225

225:                                              ; preds = %215
  %226 = load i32, ptr %9, align 4, !tbaa !22
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %9, align 4, !tbaa !22
  br label %70, !llvm.loop !27

228:                                              ; preds = %214, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %229 = load i32, ptr %10, align 4
  switch i32 %229, label %231 [
    i32 2, label %230
  ]

230:                                              ; preds = %228
  store i1 true, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %231

231:                                              ; preds = %230, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %232

232:                                              ; preds = %231, %31
  %233 = load i1, ptr %4, align 1
  ret i1 %233
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind 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 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) }
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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN4sptk15SymmetricMatrixE", !13, i64 8, !14, i64 16, !18, i64 40}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!13, !13, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk15SymmetricMatrix6ResizeEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk15SymmetricMatrix21CholeskyDecompositionEPS0_PSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 align 2 {
  %4 = icmp eq ptr %1, null
  %5 = icmp eq ptr %2, null
  %or.cond = or i1 %4, %5
  %6 = icmp eq ptr %0, %1
  %or.cond3 = or i1 %6, %or.cond
  br i1 %or.cond3, label %.critedge, label %7

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #3
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = load double, ptr %10, align 8, !tbaa !9
  %12 = fcmp oeq double %11, 0.000000e+00
  br i1 %12, label %.critedge, label %13

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !11
  %.not = icmp eq i32 %15, %17
  br i1 %.not, label %19, label %18

18:                                               ; preds = %13
  tail call void @_ZN4sptk15SymmetricMatrix6ResizeEi(ptr noundef nonnull align 8 dereferenceable(64) %1, i32 noundef %17)
  br label %19

19:                                               ; preds = %18, %13
  %20 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %21 = load i32, ptr %16, align 8, !tbaa !11
  %22 = sext i32 %21 to i64
  %.not73 = icmp eq i64 %20, %22
  br i1 %.not73, label %24, label %23

23:                                               ; preds = %19
  tail call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %22)
  br label %24

24:                                               ; preds = %23, %19
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #3
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = load double, ptr %27, align 8, !tbaa !9
  store double %28, ptr %25, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %1, i64 40
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0) #3
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  store double 1.000000e+00, ptr %31, align 8, !tbaa !9
  %32 = load i32, ptr %16, align 8, !tbaa !11
  %.not7479 = icmp slt i32 %32, 2
  br i1 %.not7479, label %.critedge, label %.preheader

.preheader:                                       ; preds = %24, %81
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %81 ], [ 1, %24 ]
  br label %39

33:                                               ; preds = %._crit_edge
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv95) #3
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %35, i64 %indvars.iv95
  %37 = load double, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds double, ptr %25, i64 %indvars.iv95
  store double %37, ptr %38, align 8, !tbaa !9
  br label %66

39:                                               ; preds = %.preheader, %._crit_edge
  %indvars.iv86 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next87, %._crit_edge ]
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv95) #3
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %41, i64 %indvars.iv86
  %43 = load double, ptr %42, align 8, !tbaa !9
  %.not84 = icmp eq i64 %indvars.iv86, 0
  br i1 %.not84, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %39
  %.063.lcssa = phi double [ %43, %39 ], [ %62, %.lr.ph ]
  %44 = getelementptr inbounds double, ptr %25, i64 %indvars.iv86
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = fdiv double %.063.lcssa, %45
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv95) #3
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %48, i64 %indvars.iv86
  store double %46, ptr %49, align 8, !tbaa !9
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %indvars.iv95
  br i1 %exitcond90.not, label %33, label %39, !llvm.loop !22

.lr.ph:                                           ; preds = %39, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %39 ]
  %.06375 = phi double [ %62, %.lr.ph ], [ %43, %39 ]
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv95) #3
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv86) #3
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds double, ptr %55, i64 %indvars.iv
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %25, i64 %indvars.iv
  %59 = load double, ptr %58, align 8, !tbaa !9
  %60 = fneg double %53
  %61 = fmul double %57, %60
  %62 = tail call double @llvm.fmuladd.f64(double %61, double %59, double %.06375)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv86
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

63:                                               ; preds = %66
  %64 = tail call double @llvm.fabs.f64(double %80)
  %65 = fcmp ugt double %64, 0x3D719799812DEA11
  br i1 %65, label %81, label %.critedge

66:                                               ; preds = %33, %66
  %indvars.iv91 = phi i64 [ 0, %33 ], [ %indvars.iv.next92, %66 ]
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv95) #3
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i64 %indvars.iv91
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv95) #3
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %72, i64 %indvars.iv91
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %25, i64 %indvars.iv91
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = load double, ptr %38, align 8, !tbaa !9
  %78 = fneg double %70
  %79 = fmul double %74, %78
  %80 = tail call double @llvm.fmuladd.f64(double %79, double %76, double %77)
  store double %80, ptr %38, align 8, !tbaa !9
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next92, %indvars.iv95
  br i1 %exitcond94.not, label %63, label %66, !llvm.loop !25

81:                                               ; preds = %63
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv95) #3
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = getelementptr inbounds double, ptr %83, i64 %indvars.iv95
  store double 1.000000e+00, ptr %84, align 8, !tbaa !9
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %85 = load i32, ptr %16, align 8, !tbaa !11
  %86 = sext i32 %85 to i64
  %.not74.not = icmp slt i64 %indvars.iv.next96, %86
  br i1 %.not74.not, label %.preheader, label %.critedge, !llvm.loop !26

.critedge:                                        ; preds = %63, %81, %24, %3, %7
  %.2 = phi i1 [ false, %7 ], [ false, %3 ], [ true, %24 ], [ %65, %81 ], [ %65, %63 ]
  ret i1 %.2
}

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

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

attributes #0 = { mustprogress nounwind 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 #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 nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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, !13, i64 8}
!12 = !{!"_ZTSN4sptk15SymmetricMatrixE", !13, i64 8, !14, i64 16, !18, i64 40}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


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