; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_linAlg)

; 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._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [59 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__func__.MatNd_choleskySolve = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 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: nounwind uwtable
declare hidden double @MatNd_choleskyDecompositionSelf(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_choleskySolve(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._MatNd, ptr %21, i32 0, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %23, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._MatNd, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 8, !tbaa !14
  store i32 %26, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  br label %27

27:                                               ; preds = %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._MatNd, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !14
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MatNd, ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = icmp ne i32 %30, %33
  br i1 %34, label %35, label %46

35:                                               ; preds = %27
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._MatNd, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 8, !tbaa !14
  %40 = uitofp i32 %39 to double
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._MatNd, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !14
  %44 = uitofp i32 %43 to double
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_choleskySolve, i32 noundef 139, ptr noundef @.str.2, double noundef %40, ptr noundef @.str.3, double noundef %44) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

46:                                               ; preds = %27
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._MatNd, ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp ne i32 %52, %55
  br i1 %56, label %57, label %68

57:                                               ; preds = %49
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._MatNd, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = uitofp i32 %61 to double
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._MatNd, ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = uitofp i32 %65 to double
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_choleskySolve, i32 noundef 140, ptr noundef @.str.4, double noundef %62, ptr noundef @.str.5, double noundef %66) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

68:                                               ; preds = %49
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._MatNd, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 8, !tbaa !14
  %75 = load i32, ptr %9, align 4, !tbaa !13
  %76 = icmp ne i32 %74, %75
  br i1 %76, label %77, label %86

77:                                               ; preds = %71
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._MatNd, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !14
  %82 = uitofp i32 %81 to double
  %83 = load i32, ptr %9, align 4, !tbaa !13
  %84 = sitofp i32 %83 to double
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_choleskySolve, i32 noundef 141, ptr noundef @.str.2, double noundef %82, ptr noundef @.str.6, double noundef %84) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

86:                                               ; preds = %71
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._MatNd, ptr %89, i32 0, i32 3
  %91 = load i32, ptr %90, align 8, !tbaa !15
  %92 = icmp ugt i32 %91, 1296
  br i1 %92, label %93, label %96

93:                                               ; preds = %88
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = call ptr @MatNd_clone(ptr noundef %94)
  store ptr %95, ptr %15, align 8, !tbaa !5
  br label %136

96:                                               ; preds = %88
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._MatNd, ptr %97, i32 0, i32 3
  %99 = load i32, ptr %98, align 8, !tbaa !15
  %100 = zext i32 %99 to i64
  %101 = mul i64 %100, 8
  %102 = add i64 24, %101
  %103 = alloca i8, i64 %102, align 16
  store ptr %103, ptr %15, align 8, !tbaa !5
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._MatNd, ptr %104, i64 1
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._MatNd, ptr %106, i32 0, i32 0
  store ptr %105, ptr %107, align 8, !tbaa !16
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._MatNd, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !14
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._MatNd, ptr %111, i32 0, i32 1
  store i32 %110, ptr %112, align 8, !tbaa !14
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._MatNd, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._MatNd, ptr %116, i32 0, i32 2
  store i32 %115, ptr %117, align 4, !tbaa !9
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._MatNd, ptr %118, i32 0, i32 3
  %120 = load i32, ptr %119, align 8, !tbaa !15
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._MatNd, ptr %121, i32 0, i32 3
  store i32 %120, ptr %122, align 8, !tbaa !15
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._MatNd, ptr %123, i32 0, i32 4
  store i8 1, ptr %124, align 4, !tbaa !17
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._MatNd, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !16
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._MatNd, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !16
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._MatNd, ptr %131, i32 0, i32 3
  %133 = load i32, ptr %132, align 8, !tbaa !15
  %134 = zext i32 %133 to i64
  %135 = mul i64 %134, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %127, ptr align 8 %130, i64 %135, i1 false)
  br label %136

136:                                              ; preds = %96, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._MatNd, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !16
  store ptr %139, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._MatNd, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !16
  store ptr %142, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._MatNd, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !16
  store ptr %145, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = call double @MatNd_choleskyDecompositionSelf(ptr noundef %146)
  store double %147, ptr %19, align 8, !tbaa !18
  %148 = load double, ptr %19, align 8, !tbaa !18
  %149 = fcmp oeq double %148, 0.000000e+00
  br i1 %149, label %150, label %152

150:                                              ; preds = %136
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %151)
  store double 0.000000e+00, ptr %4, align 8
  store i32 1, ptr %20, align 4
  br label %309

152:                                              ; preds = %136
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %153

153:                                              ; preds = %303, %152
  %154 = load i32, ptr %13, align 4, !tbaa !13
  %155 = load i32, ptr %8, align 4, !tbaa !13
  %156 = icmp slt i32 %154, %155
  br i1 %156, label %157, label %306

157:                                              ; preds = %153
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %158

158:                                              ; preds = %231, %157
  %159 = load i32, ptr %10, align 4, !tbaa !13
  %160 = load i32, ptr %9, align 4, !tbaa !13
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %162, label %234

162:                                              ; preds = %158
  %163 = load i32, ptr %10, align 4, !tbaa !13
  %164 = load i32, ptr %9, align 4, !tbaa !13
  %165 = mul nsw i32 %163, %164
  store i32 %165, ptr %12, align 4, !tbaa !13
  %166 = load i32, ptr %10, align 4, !tbaa !13
  %167 = load i32, ptr %8, align 4, !tbaa !13
  %168 = mul nsw i32 %166, %167
  store i32 %168, ptr %14, align 4, !tbaa !13
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load i32, ptr %13, align 4, !tbaa !13
  %171 = load i32, ptr %14, align 4, !tbaa !13
  %172 = add nsw i32 %170, %171
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %169, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !18
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = load i32, ptr %13, align 4, !tbaa !13
  %178 = load i32, ptr %14, align 4, !tbaa !13
  %179 = add nsw i32 %177, %178
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds double, ptr %176, i64 %180
  store double %175, ptr %181, align 8, !tbaa !18
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %182

182:                                              ; preds = %212, %162
  %183 = load i32, ptr %11, align 4, !tbaa !13
  %184 = load i32, ptr %10, align 4, !tbaa !13
  %185 = icmp slt i32 %183, %184
  br i1 %185, label %186, label %215

186:                                              ; preds = %182
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  %188 = load i32, ptr %12, align 4, !tbaa !13
  %189 = load i32, ptr %11, align 4, !tbaa !13
  %190 = add nsw i32 %188, %189
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds double, ptr %187, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !18
  %194 = load ptr, ptr %18, align 8, !tbaa !5
  %195 = load i32, ptr %13, align 4, !tbaa !13
  %196 = load i32, ptr %11, align 4, !tbaa !13
  %197 = load i32, ptr %8, align 4, !tbaa !13
  %198 = mul nsw i32 %196, %197
  %199 = add nsw i32 %195, %198
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %194, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !18
  %203 = load ptr, ptr %18, align 8, !tbaa !5
  %204 = load i32, ptr %13, align 4, !tbaa !13
  %205 = load i32, ptr %14, align 4, !tbaa !13
  %206 = add nsw i32 %204, %205
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds double, ptr %203, i64 %207
  %209 = load double, ptr %208, align 8, !tbaa !18
  %210 = fneg double %193
  %211 = call double @llvm.fmuladd.f64(double %210, double %202, double %209)
  store double %211, ptr %208, align 8, !tbaa !18
  br label %212

212:                                              ; preds = %186
  %213 = load i32, ptr %11, align 4, !tbaa !13
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %11, align 4, !tbaa !13
  br label %182, !llvm.loop !20

215:                                              ; preds = %182
  %216 = load ptr, ptr %16, align 8, !tbaa !5
  %217 = load i32, ptr %12, align 4, !tbaa !13
  %218 = load i32, ptr %10, align 4, !tbaa !13
  %219 = add nsw i32 %217, %218
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds double, ptr %216, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !18
  %223 = load ptr, ptr %18, align 8, !tbaa !5
  %224 = load i32, ptr %13, align 4, !tbaa !13
  %225 = load i32, ptr %14, align 4, !tbaa !13
  %226 = add nsw i32 %224, %225
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %223, i64 %227
  %229 = load double, ptr %228, align 8, !tbaa !18
  %230 = fdiv double %229, %222
  store double %230, ptr %228, align 8, !tbaa !18
  br label %231

231:                                              ; preds = %215
  %232 = load i32, ptr %10, align 4, !tbaa !13
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %10, align 4, !tbaa !13
  br label %158, !llvm.loop !22

234:                                              ; preds = %158
  %235 = load i32, ptr %9, align 4, !tbaa !13
  %236 = sub nsw i32 %235, 1
  store i32 %236, ptr %10, align 4, !tbaa !13
  br label %237

237:                                              ; preds = %299, %234
  %238 = load i32, ptr %10, align 4, !tbaa !13
  %239 = icmp sge i32 %238, 0
  br i1 %239, label %240, label %302

240:                                              ; preds = %237
  %241 = load i32, ptr %10, align 4, !tbaa !13
  %242 = load i32, ptr %8, align 4, !tbaa !13
  %243 = mul nsw i32 %241, %242
  store i32 %243, ptr %14, align 4, !tbaa !13
  %244 = load i32, ptr %10, align 4, !tbaa !13
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %11, align 4, !tbaa !13
  br label %246

246:                                              ; preds = %278, %240
  %247 = load i32, ptr %11, align 4, !tbaa !13
  %248 = load i32, ptr %9, align 4, !tbaa !13
  %249 = icmp slt i32 %247, %248
  br i1 %249, label %250, label %281

250:                                              ; preds = %246
  %251 = load ptr, ptr %16, align 8, !tbaa !5
  %252 = load i32, ptr %11, align 4, !tbaa !13
  %253 = load i32, ptr %9, align 4, !tbaa !13
  %254 = mul nsw i32 %252, %253
  %255 = load i32, ptr %10, align 4, !tbaa !13
  %256 = add nsw i32 %254, %255
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %251, i64 %257
  %259 = load double, ptr %258, align 8, !tbaa !18
  %260 = load ptr, ptr %18, align 8, !tbaa !5
  %261 = load i32, ptr %13, align 4, !tbaa !13
  %262 = load i32, ptr %11, align 4, !tbaa !13
  %263 = load i32, ptr %8, align 4, !tbaa !13
  %264 = mul nsw i32 %262, %263
  %265 = add nsw i32 %261, %264
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds double, ptr %260, i64 %266
  %268 = load double, ptr %267, align 8, !tbaa !18
  %269 = load ptr, ptr %18, align 8, !tbaa !5
  %270 = load i32, ptr %13, align 4, !tbaa !13
  %271 = load i32, ptr %14, align 4, !tbaa !13
  %272 = add nsw i32 %270, %271
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds double, ptr %269, i64 %273
  %275 = load double, ptr %274, align 8, !tbaa !18
  %276 = fneg double %259
  %277 = call double @llvm.fmuladd.f64(double %276, double %268, double %275)
  store double %277, ptr %274, align 8, !tbaa !18
  br label %278

278:                                              ; preds = %250
  %279 = load i32, ptr %11, align 4, !tbaa !13
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %11, align 4, !tbaa !13
  br label %246, !llvm.loop !23

281:                                              ; preds = %246
  %282 = load ptr, ptr %16, align 8, !tbaa !5
  %283 = load i32, ptr %10, align 4, !tbaa !13
  %284 = load i32, ptr %9, align 4, !tbaa !13
  %285 = mul nsw i32 %283, %284
  %286 = load i32, ptr %10, align 4, !tbaa !13
  %287 = add nsw i32 %285, %286
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds double, ptr %282, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !18
  %291 = load ptr, ptr %18, align 8, !tbaa !5
  %292 = load i32, ptr %13, align 4, !tbaa !13
  %293 = load i32, ptr %14, align 4, !tbaa !13
  %294 = add nsw i32 %292, %293
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds double, ptr %291, i64 %295
  %297 = load double, ptr %296, align 8, !tbaa !18
  %298 = fdiv double %297, %290
  store double %298, ptr %296, align 8, !tbaa !18
  br label %299

299:                                              ; preds = %281
  %300 = load i32, ptr %10, align 4, !tbaa !13
  %301 = add nsw i32 %300, -1
  store i32 %301, ptr %10, align 4, !tbaa !13
  br label %237, !llvm.loop !24

302:                                              ; preds = %237
  br label %303

303:                                              ; preds = %302
  %304 = load i32, ptr %13, align 4, !tbaa !13
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %13, align 4, !tbaa !13
  br label %153, !llvm.loop !25

306:                                              ; preds = %153
  %307 = load ptr, ptr %15, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %307)
  %308 = load double, ptr %19, align 8, !tbaa !18
  store double %308, ptr %4, align 8
  store i32 1, ptr %20, align 4
  br label %309

309:                                              ; preds = %306, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %310 = load double, ptr %4, align 8
  ret double %310
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare void @print_trace() #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare ptr @MatNd_clone(ptr noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare void @MatNd_destroy(ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nounwind "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 = { "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 = { noreturn nounwind "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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !11, i64 12}
!10 = !{!"_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !6, i64 0}
!17 = !{!10, !12, i64 20}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [59 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__func__.MatNd_choleskySolve = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare hidden double @MatNd_choleskyDecompositionSelf(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_choleskySolve(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %.not = icmp eq i32 %9, %11
  br i1 %.not, label %17, label %12

12:                                               ; preds = %3
  %13 = load ptr, ptr @stderr, align 8, !tbaa !13
  %14 = uitofp i32 %9 to double
  %15 = uitofp i32 %11 to double
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_choleskySolve, i32 noundef 139, ptr noundef nonnull @.str.2, double noundef %14, ptr noundef nonnull @.str.3, double noundef %15) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

17:                                               ; preds = %3
  %18 = getelementptr inbounds i8, ptr %2, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %.not114 = icmp eq i32 %5, %19
  br i1 %.not114, label %25, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr @stderr, align 8, !tbaa !13
  %22 = uitofp i32 %5 to double
  %23 = uitofp i32 %19 to double
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_choleskySolve, i32 noundef 140, ptr noundef nonnull @.str.4, double noundef %22, ptr noundef nonnull @.str.5, double noundef %23) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

25:                                               ; preds = %17
  %.not115 = icmp eq i32 %9, %7
  br i1 %.not115, label %31, label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr @stderr, align 8, !tbaa !13
  %28 = uitofp i32 %9 to double
  %29 = sitofp i32 %7 to double
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_choleskySolve, i32 noundef 141, ptr noundef nonnull @.str.2, double noundef %28, ptr noundef nonnull @.str.6, double noundef %29) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %1, i64 16
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = icmp ugt i32 %33, 1296
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = tail call ptr @MatNd_clone(ptr noundef nonnull %1) #7
  %.pre = load ptr, ptr %36, align 8, !tbaa !15
  br label %50

37:                                               ; preds = %31
  %38 = shl nuw nsw i32 %33, 3
  %narrow = add nuw nsw i32 %38, 24
  %39 = zext nneg i32 %narrow to i64
  %40 = alloca i8, i64 %39, align 16
  %41 = getelementptr inbounds i8, ptr %40, i64 24
  store ptr %41, ptr %40, align 16, !tbaa !15
  %42 = getelementptr inbounds i8, ptr %40, i64 8
  store i32 %7, ptr %42, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %1, i64 12
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %40, i64 12
  store i32 %44, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %40, i64 16
  store i32 %33, ptr %46, align 16, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %40, i64 20
  store i8 1, ptr %47, align 4, !tbaa !16
  %48 = load ptr, ptr %1, align 8, !tbaa !15
  %49 = zext nneg i32 %38 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %41, ptr align 8 %48, i64 %49, i1 false)
  br label %50

50:                                               ; preds = %37, %35
  %51 = phi ptr [ %.pre, %35 ], [ %41, %37 ]
  %.0103 = phi ptr [ %36, %35 ], [ %40, %37 ]
  %52 = load ptr, ptr %2, align 8, !tbaa !15
  %53 = load ptr, ptr %0, align 8, !tbaa !15
  %54 = call double @MatNd_choleskyDecompositionSelf(ptr noundef nonnull %.0103)
  %55 = fcmp oeq double %54, 0.000000e+00
  br i1 %55, label %._crit_edge133, label %.preheader118

.preheader118:                                    ; preds = %50
  %56 = icmp sgt i32 %5, 0
  br i1 %56, label %.preheader117.lr.ph, label %._crit_edge133

.preheader117.lr.ph:                              ; preds = %.preheader118
  %57 = icmp sgt i32 %7, 0
  %.1116 = add i32 %7, 1
  br i1 %57, label %.preheader117.us.us.preheader, label %._crit_edge133

.preheader117.us.us.preheader:                    ; preds = %.preheader117.lr.ph
  %58 = zext nneg i32 %5 to i64
  %59 = zext nneg i32 %7 to i64
  %60 = zext nneg i32 %7 to i64
  %61 = zext nneg i32 %5 to i64
  br label %.preheader117.us.us

.preheader117.us.us:                              ; preds = %.preheader117.us.us.preheader, %._crit_edge131.us.us
  %indvars.iv160 = phi i64 [ 0, %.preheader117.us.us.preheader ], [ %indvars.iv.next161, %._crit_edge131.us.us ]
  %invariant.gep = getelementptr inbounds double, ptr %53, i64 %indvars.iv160
  br label %91

..preheader_crit_edge.us.us:                      ; preds = %..preheader_crit_edge.us.us.preheader, %._crit_edge125.us.us
  %indvar = phi i32 [ 0, %..preheader_crit_edge.us.us.preheader ], [ %indvar.next, %._crit_edge125.us.us ]
  %indvars.iv153 = phi i64 [ %60, %..preheader_crit_edge.us.us.preheader ], [ %indvars.iv.next154, %._crit_edge125.us.us ]
  %indvars.iv.next154 = add nsw i64 %indvars.iv153, -1
  %62 = mul nsw i64 %indvars.iv.next154, %61
  %63 = icmp slt i64 %indvars.iv153, %60
  %64 = add nsw i64 %62, %indvars.iv160
  br i1 %63, label %.lr.ph124.us.us, label %._crit_edge125.us.us

._crit_edge125.us.us:                             ; preds = %.prol.loopexit, %.lr.ph124.us.us.new, %..preheader_crit_edge.us.us
  %65 = trunc nuw nsw i64 %indvars.iv.next154 to i32
  %66 = mul i32 %.1116, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %51, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !17
  %70 = getelementptr inbounds double, ptr %53, i64 %64
  %71 = load double, ptr %70, align 8, !tbaa !17
  %72 = fdiv double %71, %69
  store double %72, ptr %70, align 8, !tbaa !17
  %73 = icmp sgt i64 %indvars.iv153, 1
  %indvar.next = add i32 %indvar, 1
  br i1 %73, label %..preheader_crit_edge.us.us, label %._crit_edge131.us.us, !llvm.loop !19

.lr.ph124.us.us.new:                              ; preds = %.prol.loopexit, %.lr.ph124.us.us.new
  %indvars.iv155 = phi i64 [ %indvars.iv.next156.1, %.lr.ph124.us.us.new ], [ %indvars.iv155.unr, %.prol.loopexit ]
  %74 = phi double [ %90, %.lr.ph124.us.us.new ], [ %.unr170, %.prol.loopexit ]
  %75 = mul nsw i64 %indvars.iv155, %60
  %76 = add nsw i64 %75, %indvars.iv.next154
  %77 = getelementptr inbounds double, ptr %51, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !17
  %79 = mul nsw i64 %indvars.iv155, %61
  %gep166 = getelementptr double, ptr %invariant.gep165, i64 %79
  %80 = load double, ptr %gep166, align 8, !tbaa !17
  %81 = fneg double %78
  %82 = call double @llvm.fmuladd.f64(double %81, double %80, double %74)
  store double %82, ptr %128, align 8, !tbaa !17
  %indvars.iv.next156 = add nsw i64 %indvars.iv155, 1
  %83 = mul nsw i64 %indvars.iv.next156, %60
  %84 = add nsw i64 %83, %indvars.iv.next154
  %85 = getelementptr inbounds double, ptr %51, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !17
  %87 = mul nsw i64 %indvars.iv.next156, %61
  %gep166.1 = getelementptr double, ptr %invariant.gep165, i64 %87
  %88 = load double, ptr %gep166.1, align 8, !tbaa !17
  %89 = fneg double %86
  %90 = call double @llvm.fmuladd.f64(double %89, double %88, double %82)
  store double %90, ptr %128, align 8, !tbaa !17
  %indvars.iv.next156.1 = add nsw i64 %indvars.iv155, 2
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next156.1 to i32
  %exitcond158.not.1 = icmp eq i32 %7, %lftr.wideiv.1
  br i1 %exitcond158.not.1, label %._crit_edge125.us.us, label %.lr.ph124.us.us.new, !llvm.loop !21

91:                                               ; preds = %._crit_edge.us.us, %.preheader117.us.us
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %._crit_edge.us.us ], [ 0, %.preheader117.us.us ]
  %indvars150 = trunc i64 %indvars.iv148 to i32
  %92 = mul nuw nsw i64 %indvars.iv148, %59
  %93 = mul nuw nsw i32 %7, %indvars150
  %94 = mul nuw nsw i64 %indvars.iv148, %58
  %95 = add nuw nsw i64 %94, %indvars.iv160
  %96 = getelementptr inbounds double, ptr %52, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !17
  %98 = getelementptr inbounds double, ptr %53, i64 %95
  store double %97, ptr %98, align 8, !tbaa !17
  %.not145 = icmp eq i64 %indvars.iv148, 0
  br i1 %.not145, label %._crit_edge.us.us, label %.lr.ph.us.us.preheader

.lr.ph.us.us.preheader:                           ; preds = %91
  %xtraiter = and i64 %indvars.iv148, 1
  %99 = icmp eq i64 %indvars.iv148, 1
  br i1 %99, label %._crit_edge.us.us.loopexit.unr-lcssa, label %.lr.ph.us.us.preheader.new

.lr.ph.us.us.preheader.new:                       ; preds = %.lr.ph.us.us.preheader
  %unroll_iter = and i64 %indvars.iv148, 9223372036854775806
  br label %.lr.ph.us.us

._crit_edge.us.us.loopexit.unr-lcssa:             ; preds = %.lr.ph.us.us, %.lr.ph.us.us.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph.us.us.preheader ], [ %127, %.lr.ph.us.us ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.us.us.preheader ], [ %indvars.iv.next.1, %.lr.ph.us.us ]
  %.unr = phi double [ %97, %.lr.ph.us.us.preheader ], [ %127, %.lr.ph.us.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.us.us, label %.lr.ph.us.us.epil

.lr.ph.us.us.epil:                                ; preds = %._crit_edge.us.us.loopexit.unr-lcssa
  %100 = add nuw nsw i64 %indvars.iv.unr, %92
  %101 = getelementptr inbounds double, ptr %51, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !17
  %103 = mul nuw nsw i64 %indvars.iv.unr, %58
  %gep.epil = getelementptr inbounds double, ptr %invariant.gep, i64 %103
  %104 = load double, ptr %gep.epil, align 8, !tbaa !17
  %105 = fneg double %102
  %106 = call double @llvm.fmuladd.f64(double %105, double %104, double %.unr)
  store double %106, ptr %98, align 8, !tbaa !17
  br label %._crit_edge.us.us

._crit_edge.us.us:                                ; preds = %.lr.ph.us.us.epil, %._crit_edge.us.us.loopexit.unr-lcssa, %91
  %107 = phi double [ %97, %91 ], [ %.lcssa.ph, %._crit_edge.us.us.loopexit.unr-lcssa ], [ %106, %.lr.ph.us.us.epil ]
  %108 = zext i32 %93 to i64
  %109 = add nuw nsw i64 %indvars.iv148, %108
  %110 = getelementptr inbounds double, ptr %51, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !17
  %112 = fdiv double %107, %111
  store double %112, ptr %98, align 8, !tbaa !17
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %59
  br i1 %exitcond152.not, label %..preheader_crit_edge.us.us.preheader, label %91, !llvm.loop !22

..preheader_crit_edge.us.us.preheader:            ; preds = %._crit_edge.us.us
  %invariant.gep165 = getelementptr double, ptr %53, i64 %indvars.iv160
  br label %..preheader_crit_edge.us.us

.lr.ph.us.us:                                     ; preds = %.lr.ph.us.us, %.lr.ph.us.us.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.us.us.preheader.new ], [ %indvars.iv.next.1, %.lr.ph.us.us ]
  %113 = phi double [ %97, %.lr.ph.us.us.preheader.new ], [ %127, %.lr.ph.us.us ]
  %niter = phi i64 [ 0, %.lr.ph.us.us.preheader.new ], [ %niter.next.1, %.lr.ph.us.us ]
  %114 = add nuw nsw i64 %indvars.iv, %92
  %115 = getelementptr inbounds double, ptr %51, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !17
  %117 = mul nuw nsw i64 %indvars.iv, %58
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %117
  %118 = load double, ptr %gep, align 8, !tbaa !17
  %119 = fneg double %116
  %120 = call double @llvm.fmuladd.f64(double %119, double %118, double %113)
  store double %120, ptr %98, align 8, !tbaa !17
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %121 = add nuw nsw i64 %indvars.iv.next, %92
  %122 = getelementptr inbounds double, ptr %51, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !17
  %124 = mul nuw nsw i64 %indvars.iv.next, %58
  %gep.1 = getelementptr inbounds double, ptr %invariant.gep, i64 %124
  %125 = load double, ptr %gep.1, align 8, !tbaa !17
  %126 = fneg double %123
  %127 = call double @llvm.fmuladd.f64(double %126, double %125, double %120)
  store double %127, ptr %98, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.us.loopexit.unr-lcssa, label %.lr.ph.us.us, !llvm.loop !23

.lr.ph124.us.us:                                  ; preds = %..preheader_crit_edge.us.us
  %128 = getelementptr inbounds double, ptr %53, i64 %64
  %.promoted126.us.us = load double, ptr %128, align 8, !tbaa !17
  %xtraiter168 = and i32 %indvar, 1
  %lcmp.mod169.not = icmp eq i32 %xtraiter168, 0
  br i1 %lcmp.mod169.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph124.us.us
  %129 = mul nsw i64 %indvars.iv153, %60
  %130 = add nsw i64 %129, %indvars.iv.next154
  %131 = getelementptr inbounds double, ptr %51, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !17
  %133 = mul nsw i64 %indvars.iv153, %61
  %gep166.prol = getelementptr double, ptr %invariant.gep165, i64 %133
  %134 = load double, ptr %gep166.prol, align 8, !tbaa !17
  %135 = fneg double %132
  %136 = call double @llvm.fmuladd.f64(double %135, double %134, double %.promoted126.us.us)
  store double %136, ptr %128, align 8, !tbaa !17
  %indvars.iv.next156.prol = add nsw i64 %indvars.iv153, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph124.us.us
  %indvars.iv155.unr = phi i64 [ %indvars.iv153, %.lr.ph124.us.us ], [ %indvars.iv.next156.prol, %.prol.loopexit.unr-lcssa ]
  %.unr170 = phi double [ %.promoted126.us.us, %.lr.ph124.us.us ], [ %136, %.prol.loopexit.unr-lcssa ]
  %137 = icmp eq i32 %indvar, 1
  br i1 %137, label %._crit_edge125.us.us, label %.lr.ph124.us.us.new

._crit_edge131.us.us:                             ; preds = %._crit_edge125.us.us
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %exitcond163.not = icmp eq i64 %indvars.iv.next161, %58
  br i1 %exitcond163.not, label %._crit_edge133, label %.preheader117.us.us, !llvm.loop !24

._crit_edge133:                                   ; preds = %._crit_edge131.us.us, %.preheader118, %.preheader117.lr.ph, %50
  %.0 = phi double [ 0.000000e+00, %50 ], [ %54, %.preheader117.lr.ph ], [ %54, %.preheader118 ], [ %54, %._crit_edge131.us.us ]
  call void @MatNd_destroy(ptr noundef nonnull %.0103) #7
  ret double %.0
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare ptr @MatNd_clone(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 = { nofree nounwind "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 = { "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 = { noreturn nounwind "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 nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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, !10, i64 12}
!6 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !7, i64 0}
!16 = !{!6, !11, i64 20}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


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