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

; 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 [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.230 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.MatNd_computeMinimumJerkTrajectory = external hidden unnamed_addr constant [35 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare void @print_trace() #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_setZero(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulSelf(ptr noundef, double noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_computeMinimumJerkTrajectory(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %87

21:                                               ; preds = %2
  br label %22

22:                                               ; preds = %21
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %32, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5203, ptr noundef @.str.278) #6
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.279) #6
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

32:                                               ; preds = %22
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._MatNd, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = mul i32 %37, 1
  %39 = icmp ugt i32 %38, 1296
  br i1 %39, label %40, label %45

40:                                               ; preds = %34
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._MatNd, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !9
  %44 = call ptr @MatNd_create(i32 noundef %43, i32 noundef 1)
  store ptr %44, ptr %5, align 8, !tbaa !5
  br label %86

45:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._MatNd, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !9
  %49 = mul i32 %48, 1
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %45
  br label %57

52:                                               ; preds = %45
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !9
  %56 = mul i32 %55, 1
  br label %57

57:                                               ; preds = %52, %51
  %58 = phi i32 [ 1, %51 ], [ %56, %52 ]
  store i32 %58, ptr %7, align 4, !tbaa !13
  %59 = load i32, ptr %7, align 4, !tbaa !13
  %60 = zext i32 %59 to i64
  %61 = mul i64 %60, 8
  %62 = add i64 24, %61
  %63 = alloca i8, i64 %62, align 16
  store ptr %63, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._MatNd, ptr %64, i64 1
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._MatNd, ptr %66, i32 0, i32 0
  store ptr %65, ptr %67, align 8, !tbaa !14
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._MatNd, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !9
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._MatNd, ptr %71, i32 0, i32 1
  store i32 %70, ptr %72, align 8, !tbaa !9
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._MatNd, ptr %73, i32 0, i32 2
  store i32 1, ptr %74, align 4, !tbaa !15
  %75 = load i32, ptr %7, align 4, !tbaa !13
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 3
  store i32 %75, ptr %77, align 8, !tbaa !16
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._MatNd, ptr %78, i32 0, i32 4
  store i8 1, ptr %79, align 4, !tbaa !17
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._MatNd, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !14
  %83 = load i32, ptr %7, align 4, !tbaa !13
  %84 = zext i32 %83 to i64
  %85 = mul i64 %84, 8
  call void @llvm.memset.p0.i64(ptr align 8 %82, i8 0, i64 %85, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %86

86:                                               ; preds = %57, %40
  br label %104

87:                                               ; preds = %2
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._MatNd, ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 4, !tbaa !15
  %92 = icmp ne i32 %91, 1
  br i1 %92, label %93, label %100

93:                                               ; preds = %88
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._MatNd, ptr %95, i32 0, i32 2
  %97 = load i32, ptr %96, align 4, !tbaa !15
  %98 = uitofp i32 %97 to double
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.155, ptr noundef @.str.1, ptr noundef @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5208, ptr noundef @.str.280, double noundef %98, ptr noundef @.str.230, double noundef 1.000000e+00) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

100:                                              ; preds = %88
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_setZero(ptr noundef %103)
  br label %104

104:                                              ; preds = %102, %86
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = icmp eq ptr %105, null
  br i1 %106, label %107, label %173

107:                                              ; preds = %104
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = icmp ne ptr %109, null
  br i1 %110, label %118, label %111

111:                                              ; preds = %108
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5215, ptr noundef @.str.281) #6
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.279) #6
  %116 = load ptr, ptr @stderr, align 8, !tbaa !5
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

118:                                              ; preds = %108
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._MatNd, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 8, !tbaa !9
  %124 = mul i32 %123, 1
  %125 = icmp ugt i32 %124, 1296
  br i1 %125, label %126, label %131

126:                                              ; preds = %120
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._MatNd, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 8, !tbaa !9
  %130 = call ptr @MatNd_create(i32 noundef %129, i32 noundef 1)
  store ptr %130, ptr %6, align 8, !tbaa !5
  br label %172

131:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._MatNd, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 8, !tbaa !9
  %135 = mul i32 %134, 1
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %138

137:                                              ; preds = %131
  br label %143

138:                                              ; preds = %131
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._MatNd, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 8, !tbaa !9
  %142 = mul i32 %141, 1
  br label %143

143:                                              ; preds = %138, %137
  %144 = phi i32 [ 1, %137 ], [ %142, %138 ]
  store i32 %144, ptr %8, align 4, !tbaa !13
  %145 = load i32, ptr %8, align 4, !tbaa !13
  %146 = zext i32 %145 to i64
  %147 = mul i64 %146, 8
  %148 = add i64 24, %147
  %149 = alloca i8, i64 %148, align 16
  store ptr %149, ptr %6, align 8, !tbaa !5
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._MatNd, ptr %150, i64 1
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._MatNd, ptr %152, i32 0, i32 0
  store ptr %151, ptr %153, align 8, !tbaa !14
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._MatNd, ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 8, !tbaa !9
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._MatNd, ptr %157, i32 0, i32 1
  store i32 %156, ptr %158, align 8, !tbaa !9
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._MatNd, ptr %159, i32 0, i32 2
  store i32 1, ptr %160, align 4, !tbaa !15
  %161 = load i32, ptr %8, align 4, !tbaa !13
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._MatNd, ptr %162, i32 0, i32 3
  store i32 %161, ptr %163, align 8, !tbaa !16
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._MatNd, ptr %164, i32 0, i32 4
  store i8 1, ptr %165, align 4, !tbaa !17
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._MatNd, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !14
  %169 = load i32, ptr %8, align 4, !tbaa !13
  %170 = zext i32 %169 to i64
  %171 = mul i64 %170, 8
  call void @llvm.memset.p0.i64(ptr align 8 %168, i8 0, i64 %171, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %172

172:                                              ; preds = %143, %126
  br label %190

173:                                              ; preds = %104
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._MatNd, ptr %175, i32 0, i32 2
  %177 = load i32, ptr %176, align 4, !tbaa !15
  %178 = icmp ne i32 %177, 1
  br i1 %178, label %179, label %186

179:                                              ; preds = %174
  %180 = load ptr, ptr @stderr, align 8, !tbaa !5
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._MatNd, ptr %181, i32 0, i32 2
  %183 = load i32, ptr %182, align 4, !tbaa !15
  %184 = uitofp i32 %183 to double
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.155, ptr noundef @.str.1, ptr noundef @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5220, ptr noundef @.str.282, double noundef %184, ptr noundef @.str.230, double noundef 1.000000e+00) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

186:                                              ; preds = %174
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  call void @MatNd_setZero(ptr noundef %189)
  br label %190

190:                                              ; preds = %188, %172
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._MatNd, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 8, !tbaa !9
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._MatNd, ptr %195, i32 0, i32 1
  %197 = load i32, ptr %196, align 8, !tbaa !9
  %198 = icmp ne i32 %194, %197
  br i1 %198, label %199, label %210

199:                                              ; preds = %191
  %200 = load ptr, ptr @stderr, align 8, !tbaa !5
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._MatNd, ptr %201, i32 0, i32 1
  %203 = load i32, ptr %202, align 8, !tbaa !9
  %204 = uitofp i32 %203 to double
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._MatNd, ptr %205, i32 0, i32 1
  %207 = load i32, ptr %206, align 8, !tbaa !9
  %208 = uitofp i32 %207 to double
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.155, ptr noundef @.str.1, ptr noundef @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5225, ptr noundef @.str.283, double noundef %204, ptr noundef @.str.284, double noundef %208) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

210:                                              ; preds = %191
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._MatNd, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 8, !tbaa !9
  store i32 %215, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store double 0.000000e+00, ptr %10, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 1.000000e+00, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store double 0.000000e+00, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %216

216:                                              ; preds = %249, %212
  %217 = load i32, ptr %13, align 4, !tbaa !13
  %218 = load i32, ptr %9, align 4, !tbaa !13
  %219 = icmp ult i32 %217, %218
  br i1 %219, label %221, label %220

220:                                              ; preds = %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %252

221:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %222 = load i32, ptr %13, align 4, !tbaa !13
  %223 = add i32 %222, 1
  %224 = uitofp i32 %223 to double
  %225 = load i32, ptr %9, align 4, !tbaa !13
  %226 = uitofp i32 %225 to double
  %227 = fdiv double %224, %226
  store double %227, ptr %14, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %228 = load double, ptr %14, align 8, !tbaa !18
  %229 = fsub double %228, 1.000000e+00
  %230 = load double, ptr %14, align 8, !tbaa !18
  %231 = fsub double %230, 1.000000e+00
  %232 = fmul double %229, %231
  %233 = load double, ptr %14, align 8, !tbaa !18
  %234 = fsub double %233, 0.000000e+00
  %235 = fmul double %232, %234
  %236 = load double, ptr %14, align 8, !tbaa !18
  %237 = fsub double %236, 0.000000e+00
  %238 = fmul double %235, %237
  store double %238, ptr %15, align 8, !tbaa !18
  %239 = load double, ptr %15, align 8, !tbaa !18
  %240 = load double, ptr %10, align 8, !tbaa !18
  %241 = fadd double %240, %239
  store double %241, ptr %10, align 8, !tbaa !18
  %242 = load double, ptr %15, align 8, !tbaa !18
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct._MatNd, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !14
  %246 = load i32, ptr %13, align 4, !tbaa !13
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds double, ptr %245, i64 %247
  store double %242, ptr %248, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %249

249:                                              ; preds = %221
  %250 = load i32, ptr %13, align 4, !tbaa !13
  %251 = add i32 %250, 1
  store i32 %251, ptr %13, align 4, !tbaa !13
  br label %216, !llvm.loop !20

252:                                              ; preds = %220
  %253 = load double, ptr %10, align 8, !tbaa !18
  %254 = fcmp ogt double %253, 0.000000e+00
  br i1 %254, label %255, label %259

255:                                              ; preds = %252
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = load double, ptr %10, align 8, !tbaa !18
  %258 = fdiv double 1.000000e+00, %257
  call void @MatNd_constMulSelf(ptr noundef %256, double noundef %258)
  br label %259

259:                                              ; preds = %255, %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !13
  br label %260

260:                                              ; preds = %289, %259
  %261 = load i32, ptr %16, align 4, !tbaa !13
  %262 = load i32, ptr %9, align 4, !tbaa !13
  %263 = icmp ult i32 %261, %262
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %292

265:                                              ; preds = %260
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct._MatNd, ptr %266, i32 0, i32 0
  %268 = load ptr, ptr %267, align 8, !tbaa !14
  %269 = load i32, ptr %16, align 4, !tbaa !13
  %270 = sub i32 %269, 1
  %271 = zext i32 %270 to i64
  %272 = getelementptr inbounds double, ptr %268, i64 %271
  %273 = load double, ptr %272, align 8, !tbaa !18
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct._MatNd, ptr %274, i32 0, i32 0
  %276 = load ptr, ptr %275, align 8, !tbaa !14
  %277 = load i32, ptr %16, align 4, !tbaa !13
  %278 = sub i32 %277, 1
  %279 = zext i32 %278 to i64
  %280 = getelementptr inbounds double, ptr %276, i64 %279
  %281 = load double, ptr %280, align 8, !tbaa !18
  %282 = fadd double %273, %281
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct._MatNd, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !14
  %286 = load i32, ptr %16, align 4, !tbaa !13
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds double, ptr %285, i64 %287
  store double %282, ptr %288, align 8, !tbaa !18
  br label %289

289:                                              ; preds = %265
  %290 = load i32, ptr %16, align 4, !tbaa !13
  %291 = add i32 %290, 1
  store i32 %291, ptr %16, align 4, !tbaa !13
  br label %260, !llvm.loop !22

292:                                              ; preds = %264
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = icmp eq ptr %293, null
  br i1 %294, label %295, label %297

295:                                              ; preds = %292
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %296)
  br label %297

297:                                              ; preds = %295, %292
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = icmp eq ptr %298, null
  br i1 %299, label %300, label %302

300:                                              ; preds = %297
  %301 = load ptr, ptr %6, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %301)
  br label %302

302:                                              ; preds = %300, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { 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 8}
!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, !6, i64 0}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !11, i64 16}
!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}


; 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 [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.230 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.MatNd_computeMinimumJerkTrajectory = external hidden unnamed_addr constant [35 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare void @print_trace() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_setZero(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulSelf(ptr noundef, double noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_computeMinimumJerkTrajectory(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %28

4:                                                ; preds = %2
  %.not91 = icmp eq ptr %1, null
  br i1 %.not91, label %5, label %12

5:                                                ; preds = %4
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5203, ptr noundef nonnull @.str.278) #6
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.279) #6
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.4) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

12:                                               ; preds = %4
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = icmp ugt i32 %14, 1296
  br i1 %15, label %16, label %18

16:                                               ; preds = %12
  %17 = tail call ptr @MatNd_create(i32 noundef %14, i32 noundef 1)
  br label %.thread

18:                                               ; preds = %12
  %spec.select = tail call i32 @llvm.umax.i32(i32 %14, i32 1)
  %19 = shl nuw nsw i32 %spec.select, 3
  %20 = zext nneg i32 %19 to i64
  %21 = add nuw nsw i64 %20, 24
  %22 = alloca i8, i64 %21, align 16
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  store ptr %23, ptr %22, align 16, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  store i32 %14, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %22, i64 12
  store i32 1, ptr %25, align 4, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %22, i64 16
  store i32 %spec.select, ptr %26, align 16, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %22, i64 20
  store i8 1, ptr %27, align 4, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %23, i8 0, i64 %20, i1 false)
  br label %.thread

28:                                               ; preds = %2
  %29 = getelementptr inbounds i8, ptr %0, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !14
  %.not = icmp eq i32 %30, 1
  br i1 %.not, label %35, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = uitofp i32 %30 to double
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.155, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5208, ptr noundef nonnull @.str.280, double noundef %33, ptr noundef nonnull @.str.230, double noundef 1.000000e+00) #6
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

35:                                               ; preds = %28
  tail call void @MatNd_setZero(ptr noundef nonnull %0)
  %36 = icmp eq ptr %1, null
  br i1 %36, label %37, label %.thread

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !9
  %40 = icmp ugt i32 %39, 1296
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = tail call ptr @MatNd_create(i32 noundef %39, i32 noundef 1)
  br label %60

43:                                               ; preds = %37
  %spec.select95 = tail call i32 @llvm.umax.i32(i32 %39, i32 1)
  %44 = shl nuw nsw i32 %spec.select95, 3
  %45 = zext nneg i32 %44 to i64
  %46 = add nuw nsw i64 %45, 24
  %47 = alloca i8, i64 %46, align 16
  %48 = getelementptr inbounds i8, ptr %47, i64 24
  store ptr %48, ptr %47, align 16, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %47, i64 8
  store i32 %39, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %47, i64 12
  store i32 1, ptr %50, align 4, !tbaa !14
  %51 = getelementptr inbounds i8, ptr %47, i64 16
  store i32 %spec.select95, ptr %51, align 16, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %47, i64 20
  store i8 1, ptr %52, align 4, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %48, i8 0, i64 %45, i1 false)
  br label %60

.thread:                                          ; preds = %18, %16, %35
  %.07698 = phi ptr [ %0, %35 ], [ %22, %18 ], [ %17, %16 ]
  %53 = getelementptr inbounds i8, ptr %1, i64 12
  %54 = load i32, ptr %53, align 4, !tbaa !14
  %.not92 = icmp eq i32 %54, 1
  br i1 %.not92, label %59, label %55

55:                                               ; preds = %.thread
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = uitofp i32 %54 to double
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.155, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5220, ptr noundef nonnull @.str.282, double noundef %57, ptr noundef nonnull @.str.230, double noundef 1.000000e+00) #6
  call void @print_trace() #7
  call void @exit(i32 noundef 1) #8
  unreachable

59:                                               ; preds = %.thread
  call void @MatNd_setZero(ptr noundef nonnull %1)
  br label %60

60:                                               ; preds = %59, %43, %41
  %61 = phi i1 [ true, %41 ], [ true, %43 ], [ false, %59 ]
  %.07697 = phi ptr [ %0, %41 ], [ %0, %43 ], [ %.07698, %59 ]
  %.077 = phi ptr [ %42, %41 ], [ %47, %43 ], [ %1, %59 ]
  %62 = getelementptr inbounds i8, ptr %.077, i64 8
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %.07697, i64 8
  %65 = load i32, ptr %64, align 8, !tbaa !9
  %.not94 = icmp eq i32 %63, %65
  br i1 %.not94, label %.preheader, label %70

.preheader:                                       ; preds = %60
  %.not105 = icmp eq i32 %63, 0
  br i1 %.not105, label %._crit_edge104, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %66 = uitofp i32 %63 to double
  %67 = load ptr, ptr %.077, align 8, !tbaa !13
  %wide.trip.count = zext i32 %63 to i64
  %68 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 1
  %69 = icmp eq i64 %68, 0
  br i1 %69, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %86

70:                                               ; preds = %60
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = uitofp i32 %63 to double
  %73 = uitofp i32 %65 to double
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.155, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_computeMinimumJerkTrajectory, i32 noundef 5225, ptr noundef nonnull @.str.283, double noundef %72, ptr noundef nonnull @.str.284, double noundef %73) #6
  call void @print_trace() #7
  call void @exit(i32 noundef 1) #8
  unreachable

._crit_edge.unr-lcssa:                            ; preds = %86, %.lr.ph
  %.lcssa.ph = phi double [ poison, %.lr.ph ], [ %103, %86 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %86 ]
  %.07999.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %103, %86 ]
  %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
  %75 = trunc i64 %indvars.iv.unr to i32
  %76 = add i32 %75, 1
  %77 = uitofp i32 %76 to double
  %78 = fdiv double %77, %66
  %79 = fadd double %78, -1.000000e+00
  %80 = fmul double %79, %79
  %81 = fmul double %78, %80
  %82 = fmul double %78, %81
  %83 = fadd double %.07999.unr, %82
  %84 = getelementptr inbounds double, ptr %67, i64 %indvars.iv.unr
  store double %82, ptr %84, align 8, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %83, %._crit_edge.epilog-lcssa ]
  %85 = fcmp ogt double %.lcssa, 0.000000e+00
  br i1 %85, label %105, label %107

86:                                               ; preds = %86, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %86 ]
  %.07999 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %103, %86 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %86 ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %87 = trunc nuw i64 %indvars.iv.next to i32
  %88 = uitofp i32 %87 to double
  %89 = fdiv double %88, %66
  %90 = fadd double %89, -1.000000e+00
  %91 = fmul double %90, %90
  %92 = fmul double %89, %91
  %93 = fmul double %89, %92
  %94 = fadd double %.07999, %93
  %95 = getelementptr inbounds double, ptr %67, i64 %indvars.iv
  store double %93, ptr %95, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %96 = trunc nuw i64 %indvars.iv.next.1 to i32
  %97 = uitofp i32 %96 to double
  %98 = fdiv double %97, %66
  %99 = fadd double %98, -1.000000e+00
  %100 = fmul double %99, %99
  %101 = fmul double %98, %100
  %102 = fmul double %98, %101
  %103 = fadd double %94, %102
  %104 = getelementptr inbounds double, ptr %67, i64 %indvars.iv.next
  store double %102, ptr %104, align 8, !tbaa !17
  %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.unr-lcssa, label %86, !llvm.loop !19

105:                                              ; preds = %._crit_edge
  %106 = fdiv double 1.000000e+00, %.lcssa
  call void @MatNd_constMulSelf(ptr noundef nonnull %.077, double noundef %106)
  br label %107

107:                                              ; preds = %105, %._crit_edge
  %.not114 = icmp eq i32 %63, 1
  br i1 %.not114, label %._crit_edge104, label %.lr.ph103

.lr.ph103:                                        ; preds = %107
  %108 = load ptr, ptr %.07697, align 8, !tbaa !13
  %109 = load ptr, ptr %.077, align 8, !tbaa !13
  %.pre = load double, ptr %108, align 8, !tbaa !17
  %invariant.gep = getelementptr i8, ptr %109, i64 -8
  %110 = add nsw i64 %wide.trip.count, -2
  %xtraiter117 = and i64 %68, 3
  %111 = icmp ult i64 %110, 3
  br i1 %111, label %._crit_edge104.loopexit.unr-lcssa, label %.lr.ph103.new

.lr.ph103.new:                                    ; preds = %.lr.ph103
  %unroll_iter119 = and i64 %68, -4
  %invariant.gep123 = getelementptr inbounds i8, ptr %108, i64 8
  br label %116

._crit_edge104.loopexit.unr-lcssa:                ; preds = %116, %.lr.ph103
  %.unr = phi double [ %.pre, %.lr.ph103 ], [ %127, %116 ]
  %indvars.iv107.unr = phi i64 [ 1, %.lr.ph103 ], [ %indvars.iv.next108.3, %116 ]
  %lcmp.mod118.not = icmp eq i64 %xtraiter117, 0
  br i1 %lcmp.mod118.not, label %._crit_edge104, label %.epil.preheader116

.epil.preheader116:                               ; preds = %._crit_edge104.loopexit.unr-lcssa, %.epil.preheader116
  %112 = phi double [ %114, %.epil.preheader116 ], [ %.unr, %._crit_edge104.loopexit.unr-lcssa ]
  %indvars.iv107.epil = phi i64 [ %indvars.iv.next108.epil, %.epil.preheader116 ], [ %indvars.iv107.unr, %._crit_edge104.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader116 ], [ 0, %._crit_edge104.loopexit.unr-lcssa ]
  %gep.epil = getelementptr double, ptr %invariant.gep, i64 %indvars.iv107.epil
  %113 = load double, ptr %gep.epil, align 8, !tbaa !17
  %114 = fadd double %112, %113
  %115 = getelementptr inbounds double, ptr %108, i64 %indvars.iv107.epil
  store double %114, ptr %115, align 8, !tbaa !17
  %indvars.iv.next108.epil = add nuw nsw i64 %indvars.iv107.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter117
  br i1 %epil.iter.cmp.not, label %._crit_edge104, label %.epil.preheader116, !llvm.loop !21

._crit_edge104:                                   ; preds = %._crit_edge104.loopexit.unr-lcssa, %.epil.preheader116, %.preheader, %107
  br i1 %3, label %129, label %130

116:                                              ; preds = %116, %.lr.ph103.new
  %117 = phi double [ %.pre, %.lr.ph103.new ], [ %127, %116 ]
  %indvars.iv107 = phi i64 [ 1, %.lr.ph103.new ], [ %indvars.iv.next108.3, %116 ]
  %niter120 = phi i64 [ 0, %.lr.ph103.new ], [ %niter120.next.3, %116 ]
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv107
  %118 = load double, ptr %gep, align 8, !tbaa !17
  %119 = fadd double %117, %118
  %120 = getelementptr inbounds double, ptr %108, i64 %indvars.iv107
  store double %119, ptr %120, align 8, !tbaa !17
  %gep.1 = getelementptr double, ptr %109, i64 %indvars.iv107
  %121 = load double, ptr %gep.1, align 8, !tbaa !17
  %122 = fadd double %119, %121
  %gep124 = getelementptr inbounds double, ptr %invariant.gep123, i64 %indvars.iv107
  store double %122, ptr %gep124, align 8, !tbaa !17
  %indvars.iv.next108.1 = add nuw nsw i64 %indvars.iv107, 2
  %gep.2 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next108.1
  %123 = load double, ptr %gep.2, align 8, !tbaa !17
  %124 = fadd double %122, %123
  %125 = getelementptr inbounds double, ptr %108, i64 %indvars.iv.next108.1
  store double %124, ptr %125, align 8, !tbaa !17
  %indvars.iv.next108.2 = add nuw nsw i64 %indvars.iv107, 3
  %gep.3 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next108.2
  %126 = load double, ptr %gep.3, align 8, !tbaa !17
  %127 = fadd double %124, %126
  %128 = getelementptr inbounds double, ptr %108, i64 %indvars.iv.next108.2
  store double %127, ptr %128, align 8, !tbaa !17
  %indvars.iv.next108.3 = add nuw nsw i64 %indvars.iv107, 4
  %niter120.next.3 = add i64 %niter120, 4
  %niter120.ncmp.3 = icmp eq i64 %niter120.next.3, %unroll_iter119
  br i1 %niter120.ncmp.3, label %._crit_edge104.loopexit.unr-lcssa, label %116, !llvm.loop !23

129:                                              ; preds = %._crit_edge104
  call void @MatNd_destroy(ptr noundef %.07697)
  br label %130

130:                                              ; preds = %129, %._crit_edge104
  br i1 %61, label %131, label %132

131:                                              ; preds = %130
  call void @MatNd_destroy(ptr noundef nonnull %.077)
  br label %132

132:                                              ; preds = %131, %130
  ret void
}

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!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 = !{!10, !6, i64 0}
!14 = !{!10, !11, i64 12}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !12, i64 20}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !20}


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