; 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
@__func__.MatNd_interpolateFifthOrder = external hidden unnamed_addr constant [28 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [36 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) #5

; 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) #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_fromPtr(ptr dead_on_unwind noalias writable sret(%struct._MatNd) align 8, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copy(ptr noundef, ptr noundef) #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copyRow(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_interpolateFifthOrder(ptr noundef %0, ptr noundef %1, i32 noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %struct._MatNd, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca [3 x [3 x double]], align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca [3 x double], align 16
  %31 = alloca [6 x double], align 16
  %32 = alloca i32, align 4
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %3
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = icmp ugt i32 %40, 0
  br i1 %41, label %50, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_interpolateFifthOrder, i32 noundef 4695, ptr noundef @.str.252) #6
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.253, i32 noundef %46) #6
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

50:                                               ; preds = %39
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !11
  %56 = sub i32 %55, 1
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = mul i32 %56, %57
  %59 = add i32 %58, 1
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._MatNd, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !14
  call void @MatNd_reshape(ptr noundef %52, i32 noundef %59, i32 noundef %62)
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %68

65:                                               ; preds = %51
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %66, ptr noundef %67)
  br label %460

68:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._MatNd, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !11
  %72 = add i32 %71, 4
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._MatNd, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !14
  %76 = call ptr @MatNd_create(i32 noundef %72, i32 noundef %75)
  store ptr %76, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._MatNd, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._MatNd, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 4, !tbaa !14
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = call ptr @MatNd_getRowPtr(ptr noundef %83, i32 noundef 2)
  call void @MatNd_fromPtr(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %8, i32 noundef %79, i32 noundef %82, ptr noundef %84)
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %8, ptr noundef %85)
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_copyRow(ptr noundef %86, i32 noundef 1, ptr noundef %87, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = call ptr @MatNd_getRowPtr(ptr noundef %88, i32 noundef 0)
  store ptr %89, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call ptr @MatNd_getRowPtr(ptr noundef %90, i32 noundef 0)
  store ptr %91, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = call ptr @MatNd_getRowPtr(ptr noundef %92, i32 noundef 2)
  store ptr %93, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %118, %68
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._MatNd, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = icmp ult i32 %95, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %121

101:                                              ; preds = %94
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !15
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !15
  %112 = fneg double %111
  %113 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %106, double %112)
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %114, i64 %116
  store double %113, ptr %117, align 8, !tbaa !15
  br label %118

118:                                              ; preds = %101
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = add i32 %119, 1
  store i32 %120, ptr %12, align 4, !tbaa !9
  br label %94, !llvm.loop !17

121:                                              ; preds = %100
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._MatNd, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 8, !tbaa !11
  %126 = add i32 %125, 2
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._MatNd, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 8, !tbaa !11
  %131 = sub i32 %130, 2
  call void @MatNd_copyRow(ptr noundef %122, i32 noundef %126, ptr noundef %127, i32 noundef %131)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._MatNd, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 8, !tbaa !11
  %136 = add i32 %135, 3
  %137 = call ptr @MatNd_getRowPtr(ptr noundef %132, i32 noundef %136)
  store ptr %137, ptr %13, align 8, !tbaa !5
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %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 !11
  %142 = sub i32 %141, 1
  %143 = call ptr @MatNd_getRowPtr(ptr noundef %138, i32 noundef %142)
  store ptr %143, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._MatNd, ptr %145, i32 0, i32 1
  %147 = load i32, ptr %146, align 8, !tbaa !11
  %148 = sub i32 %147, 3
  %149 = call ptr @MatNd_getRowPtr(ptr noundef %144, i32 noundef %148)
  store ptr %149, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %174, %121
  %151 = load i32, ptr %15, align 4, !tbaa !9
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._MatNd, ptr %152, i32 0, i32 2
  %154 = load i32, ptr %153, align 4, !tbaa !14
  %155 = icmp ult i32 %151, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %177

157:                                              ; preds = %150
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load i32, ptr %15, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !15
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = load i32, ptr %15, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %163, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !15
  %168 = fneg double %167
  %169 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %162, double %168)
  %170 = load ptr, ptr %13, align 8, !tbaa !5
  %171 = load i32, ptr %15, align 4, !tbaa !9
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds double, ptr %170, i64 %172
  store double %169, ptr %173, align 8, !tbaa !15
  br label %174

174:                                              ; preds = %157
  %175 = load i32, ptr %15, align 4, !tbaa !9
  %176 = add i32 %175, 1
  store i32 %176, ptr %15, align 4, !tbaa !9
  br label %150, !llvm.loop !19

177:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 72, ptr %16) #6
  %178 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 0
  %179 = getelementptr inbounds [3 x double], ptr %178, i64 0, i64 0
  store double 5.000000e-01, ptr %179, align 16, !tbaa !15
  %180 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 0
  %181 = getelementptr inbounds [3 x double], ptr %180, i64 0, i64 1
  store double -3.000000e+00, ptr %181, align 8, !tbaa !15
  %182 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 0
  %183 = getelementptr inbounds [3 x double], ptr %182, i64 0, i64 2
  store double 6.000000e+00, ptr %183, align 16, !tbaa !15
  %184 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 1
  %185 = getelementptr inbounds [3 x double], ptr %184, i64 0, i64 0
  store double -1.000000e+00, ptr %185, align 8, !tbaa !15
  %186 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 1
  %187 = getelementptr inbounds [3 x double], ptr %186, i64 0, i64 1
  store double 7.000000e+00, ptr %187, align 8, !tbaa !15
  %188 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 1
  %189 = getelementptr inbounds [3 x double], ptr %188, i64 0, i64 2
  store double -1.500000e+01, ptr %189, align 8, !tbaa !15
  %190 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 2
  %191 = getelementptr inbounds [3 x double], ptr %190, i64 0, i64 0
  store double 5.000000e-01, ptr %191, align 16, !tbaa !15
  %192 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 2
  %193 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 1
  store double -4.000000e+00, ptr %193, align 8, !tbaa !15
  %194 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 2
  %195 = getelementptr inbounds [3 x double], ptr %194, i64 0, i64 2
  store double 1.000000e+01, ptr %195, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %445, %177
  %197 = load i32, ptr %17, align 4, !tbaa !9
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct._MatNd, ptr %198, i32 0, i32 2
  %200 = load i32, ptr %199, align 4, !tbaa !14
  %201 = icmp ult i32 %197, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %196
  store i32 10, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %448

203:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 2, ptr %19, align 4, !tbaa !9
  br label %204

204:                                              ; preds = %441, %203
  %205 = load i32, ptr %19, align 4, !tbaa !9
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct._MatNd, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 8, !tbaa !11
  %209 = sub i32 %208, 3
  %210 = icmp ult i32 %205, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %204
  store i32 13, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %444

212:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._MatNd, ptr %213, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8, !tbaa !20
  %216 = load i32, ptr %19, align 4, !tbaa !9
  %217 = sub i32 %216, 2
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._MatNd, ptr %218, i32 0, i32 2
  %220 = load i32, ptr %219, align 4, !tbaa !14
  %221 = mul i32 %217, %220
  %222 = load i32, ptr %17, align 4, !tbaa !9
  %223 = add i32 %221, %222
  %224 = zext i32 %223 to i64
  %225 = getelementptr inbounds double, ptr %215, i64 %224
  %226 = load double, ptr %225, align 8, !tbaa !15
  store double %226, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %227 = load ptr, ptr %7, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct._MatNd, ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %228, align 8, !tbaa !20
  %230 = load i32, ptr %19, align 4, !tbaa !9
  %231 = sub i32 %230, 1
  %232 = load ptr, ptr %7, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct._MatNd, ptr %232, i32 0, i32 2
  %234 = load i32, ptr %233, align 4, !tbaa !14
  %235 = mul i32 %231, %234
  %236 = load i32, ptr %17, align 4, !tbaa !9
  %237 = add i32 %235, %236
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds double, ptr %229, i64 %238
  %240 = load double, ptr %239, align 8, !tbaa !15
  store double %240, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._MatNd, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !20
  %244 = load i32, ptr %19, align 4, !tbaa !9
  %245 = load ptr, ptr %7, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct._MatNd, ptr %245, i32 0, i32 2
  %247 = load i32, ptr %246, align 4, !tbaa !14
  %248 = mul i32 %244, %247
  %249 = load i32, ptr %17, align 4, !tbaa !9
  %250 = add i32 %248, %249
  %251 = zext i32 %250 to i64
  %252 = getelementptr inbounds double, ptr %243, i64 %251
  %253 = load double, ptr %252, align 8, !tbaa !15
  store double %253, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct._MatNd, ptr %254, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8, !tbaa !20
  %257 = load i32, ptr %19, align 4, !tbaa !9
  %258 = add i32 %257, 1
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct._MatNd, ptr %259, i32 0, i32 2
  %261 = load i32, ptr %260, align 4, !tbaa !14
  %262 = mul i32 %258, %261
  %263 = load i32, ptr %17, align 4, !tbaa !9
  %264 = add i32 %262, %263
  %265 = zext i32 %264 to i64
  %266 = getelementptr inbounds double, ptr %256, i64 %265
  %267 = load double, ptr %266, align 8, !tbaa !15
  store double %267, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct._MatNd, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !20
  %271 = load i32, ptr %19, align 4, !tbaa !9
  %272 = add i32 %271, 2
  %273 = load ptr, ptr %7, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct._MatNd, ptr %273, i32 0, i32 2
  %275 = load i32, ptr %274, align 4, !tbaa !14
  %276 = mul i32 %272, %275
  %277 = load i32, ptr %17, align 4, !tbaa !9
  %278 = add i32 %276, %277
  %279 = zext i32 %278 to i64
  %280 = getelementptr inbounds double, ptr %270, i64 %279
  %281 = load double, ptr %280, align 8, !tbaa !15
  store double %281, ptr %24, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct._MatNd, ptr %282, i32 0, i32 0
  %284 = load ptr, ptr %283, align 8, !tbaa !20
  %285 = load i32, ptr %19, align 4, !tbaa !9
  %286 = add i32 %285, 3
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct._MatNd, ptr %287, i32 0, i32 2
  %289 = load i32, ptr %288, align 4, !tbaa !14
  %290 = mul i32 %286, %289
  %291 = load i32, ptr %17, align 4, !tbaa !9
  %292 = add i32 %290, %291
  %293 = zext i32 %292 to i64
  %294 = getelementptr inbounds double, ptr %284, i64 %293
  %295 = load double, ptr %294, align 8, !tbaa !15
  store double %295, ptr %25, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %296 = load double, ptr %23, align 8, !tbaa !15
  %297 = load double, ptr %21, align 8, !tbaa !15
  %298 = fsub double %296, %297
  %299 = fmul double 5.000000e-01, %298
  store double %299, ptr %26, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %300 = load double, ptr %24, align 8, !tbaa !15
  %301 = load double, ptr %22, align 8, !tbaa !15
  %302 = fsub double %300, %301
  %303 = fmul double 5.000000e-01, %302
  store double %303, ptr %27, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %304 = load double, ptr %24, align 8, !tbaa !15
  %305 = load double, ptr %22, align 8, !tbaa !15
  %306 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %305, double %304)
  %307 = load double, ptr %20, align 8, !tbaa !15
  %308 = fadd double %306, %307
  %309 = fmul double 2.500000e-01, %308
  store double %309, ptr %28, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %310 = load double, ptr %25, align 8, !tbaa !15
  %311 = load double, ptr %23, align 8, !tbaa !15
  %312 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %311, double %310)
  %313 = load double, ptr %21, align 8, !tbaa !15
  %314 = fadd double %312, %313
  %315 = fmul double 2.500000e-01, %314
  store double %315, ptr %29, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #6
  %316 = load double, ptr %29, align 8, !tbaa !15
  %317 = load double, ptr %28, align 8, !tbaa !15
  %318 = fsub double %316, %317
  %319 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 0
  store double %318, ptr %319, align 16, !tbaa !15
  %320 = load double, ptr %27, align 8, !tbaa !15
  %321 = load double, ptr %26, align 8, !tbaa !15
  %322 = fsub double %320, %321
  %323 = load double, ptr %28, align 8, !tbaa !15
  %324 = fsub double %322, %323
  %325 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 1
  store double %324, ptr %325, align 8, !tbaa !15
  %326 = load double, ptr %23, align 8, !tbaa !15
  %327 = load double, ptr %22, align 8, !tbaa !15
  %328 = fsub double %326, %327
  %329 = load double, ptr %28, align 8, !tbaa !15
  %330 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %329, double %328)
  %331 = load double, ptr %26, align 8, !tbaa !15
  %332 = fsub double %330, %331
  %333 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 2
  store double %332, ptr %333, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 48, ptr %31) #6
  %334 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 0
  %335 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 0
  %336 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 0
  call void @Vec3d_rotate(ptr noundef %334, ptr noundef %335, ptr noundef %336)
  %337 = load double, ptr %28, align 8, !tbaa !15
  %338 = fmul double 5.000000e-01, %337
  %339 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 3
  store double %338, ptr %339, align 8, !tbaa !15
  %340 = load double, ptr %26, align 8, !tbaa !15
  %341 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 4
  store double %340, ptr %341, align 16, !tbaa !15
  %342 = load double, ptr %22, align 8, !tbaa !15
  %343 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 5
  store double %342, ptr %343, align 8, !tbaa !15
  %344 = load ptr, ptr %5, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct._MatNd, ptr %344, i32 0, i32 0
  %346 = load ptr, ptr %345, align 8, !tbaa !20
  %347 = load i32, ptr %19, align 4, !tbaa !9
  %348 = sub i32 %347, 2
  %349 = load ptr, ptr %5, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct._MatNd, ptr %349, i32 0, i32 2
  %351 = load i32, ptr %350, align 4, !tbaa !14
  %352 = mul i32 %348, %351
  %353 = load i32, ptr %17, align 4, !tbaa !9
  %354 = add i32 %352, %353
  %355 = zext i32 %354 to i64
  %356 = getelementptr inbounds double, ptr %346, i64 %355
  %357 = load double, ptr %356, align 8, !tbaa !15
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct._MatNd, ptr %358, i32 0, i32 0
  %360 = load ptr, ptr %359, align 8, !tbaa !20
  %361 = load i32, ptr %19, align 4, !tbaa !9
  %362 = sub i32 %361, 2
  %363 = load i32, ptr %6, align 4, !tbaa !9
  %364 = mul i32 %362, %363
  %365 = load ptr, ptr %4, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct._MatNd, ptr %365, i32 0, i32 2
  %367 = load i32, ptr %366, align 4, !tbaa !14
  %368 = mul i32 %364, %367
  %369 = load i32, ptr %17, align 4, !tbaa !9
  %370 = add i32 %368, %369
  %371 = zext i32 %370 to i64
  %372 = getelementptr inbounds double, ptr %360, i64 %371
  store double %357, ptr %372, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 1, ptr %32, align 4, !tbaa !9
  br label %373

373:                                              ; preds = %437, %212
  %374 = load i32, ptr %32, align 4, !tbaa !9
  %375 = load i32, ptr %6, align 4, !tbaa !9
  %376 = icmp ult i32 %374, %375
  br i1 %376, label %378, label %377

377:                                              ; preds = %373
  store i32 16, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %440

378:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %379 = load i32, ptr %32, align 4, !tbaa !9
  %380 = uitofp i32 %379 to double
  %381 = load i32, ptr %6, align 4, !tbaa !9
  %382 = uitofp i32 %381 to double
  %383 = fdiv double %380, %382
  store double %383, ptr %33, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %384 = load double, ptr %33, align 8, !tbaa !15
  %385 = load double, ptr %33, align 8, !tbaa !15
  %386 = fmul double %384, %385
  store double %386, ptr %34, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %387 = load double, ptr %34, align 8, !tbaa !15
  %388 = load double, ptr %33, align 8, !tbaa !15
  %389 = fmul double %387, %388
  store double %389, ptr %35, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %390 = load double, ptr %34, align 8, !tbaa !15
  %391 = load double, ptr %34, align 8, !tbaa !15
  %392 = fmul double %390, %391
  store double %392, ptr %36, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  %393 = load double, ptr %36, align 8, !tbaa !15
  %394 = load double, ptr %33, align 8, !tbaa !15
  %395 = fmul double %393, %394
  store double %395, ptr %37, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %396 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 0
  %397 = load double, ptr %396, align 16, !tbaa !15
  %398 = load double, ptr %37, align 8, !tbaa !15
  %399 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 1
  %400 = load double, ptr %399, align 8, !tbaa !15
  %401 = load double, ptr %36, align 8, !tbaa !15
  %402 = fmul double %400, %401
  %403 = call double @llvm.fmuladd.f64(double %397, double %398, double %402)
  %404 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 2
  %405 = load double, ptr %404, align 16, !tbaa !15
  %406 = load double, ptr %35, align 8, !tbaa !15
  %407 = call double @llvm.fmuladd.f64(double %405, double %406, double %403)
  %408 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 3
  %409 = load double, ptr %408, align 8, !tbaa !15
  %410 = load double, ptr %34, align 8, !tbaa !15
  %411 = call double @llvm.fmuladd.f64(double %409, double %410, double %407)
  %412 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 4
  %413 = load double, ptr %412, align 16, !tbaa !15
  %414 = load double, ptr %33, align 8, !tbaa !15
  %415 = call double @llvm.fmuladd.f64(double %413, double %414, double %411)
  %416 = getelementptr inbounds [6 x double], ptr %31, i64 0, i64 5
  %417 = load double, ptr %416, align 8, !tbaa !15
  %418 = fadd double %415, %417
  store double %418, ptr %38, align 8, !tbaa !15
  %419 = load double, ptr %38, align 8, !tbaa !15
  %420 = load ptr, ptr %4, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct._MatNd, ptr %420, i32 0, i32 0
  %422 = load ptr, ptr %421, align 8, !tbaa !20
  %423 = load i32, ptr %19, align 4, !tbaa !9
  %424 = sub i32 %423, 2
  %425 = load i32, ptr %6, align 4, !tbaa !9
  %426 = mul i32 %424, %425
  %427 = load i32, ptr %32, align 4, !tbaa !9
  %428 = add i32 %426, %427
  %429 = load ptr, ptr %4, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct._MatNd, ptr %429, i32 0, i32 2
  %431 = load i32, ptr %430, align 4, !tbaa !14
  %432 = mul i32 %428, %431
  %433 = load i32, ptr %17, align 4, !tbaa !9
  %434 = add i32 %432, %433
  %435 = zext i32 %434 to i64
  %436 = getelementptr inbounds double, ptr %422, i64 %435
  store double %419, ptr %436, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %437

437:                                              ; preds = %378
  %438 = load i32, ptr %32, align 4, !tbaa !9
  %439 = add i32 %438, 1
  store i32 %439, ptr %32, align 4, !tbaa !9
  br label %373, !llvm.loop !21

440:                                              ; preds = %377
  call void @llvm.lifetime.end.p0(i64 48, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %19, align 4, !tbaa !9
  %443 = add i32 %442, 1
  store i32 %443, ptr %19, align 4, !tbaa !9
  br label %204, !llvm.loop !22

444:                                              ; preds = %211
  br label %445

445:                                              ; preds = %444
  %446 = load i32, ptr %17, align 4, !tbaa !9
  %447 = add i32 %446, 1
  store i32 %447, ptr %17, align 4, !tbaa !9
  br label %196, !llvm.loop !23

448:                                              ; preds = %202
  %449 = load ptr, ptr %4, align 8, !tbaa !5
  %450 = load ptr, ptr %4, align 8, !tbaa !5
  %451 = getelementptr inbounds %struct._MatNd, ptr %450, i32 0, i32 1
  %452 = load i32, ptr %451, align 8, !tbaa !11
  %453 = sub i32 %452, 1
  %454 = load ptr, ptr %5, align 8, !tbaa !5
  %455 = load ptr, ptr %5, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct._MatNd, ptr %455, i32 0, i32 1
  %457 = load i32, ptr %456, align 8, !tbaa !11
  %458 = sub i32 %457, 1
  call void @MatNd_copyRow(ptr noundef %449, i32 noundef %453, ptr noundef %454, i32 noundef %458)
  %459 = load ptr, ptr %7, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %459)
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #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 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %460

460:                                              ; preds = %448, %65
  ret void
}

declare void @Vec3d_rotate(ptr noundef, ptr noundef, ptr noundef) #1

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@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
@__func__.MatNd_interpolateFifthOrder = external hidden unnamed_addr constant [28 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [36 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress 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) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_fromPtr(ptr dead_on_unwind noalias writable sret(%struct._MatNd) align 8, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copy(ptr noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copyRow(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_interpolateFifthOrder(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #5 {
  %4 = alloca %struct._MatNd, align 8
  %5 = alloca [3 x [3 x double]], align 16
  %6 = alloca [3 x double], align 16
  %7 = alloca [6 x double], align 16
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %8, label %15

8:                                                ; preds = %3
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_interpolateFifthOrder, i32 noundef 4695, ptr noundef nonnull @.str.252) #7
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.253, i32 noundef 0) #7
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.4) #7
  tail call void @print_trace() #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

15:                                               ; preds = %3
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = add i32 %17, -1
  %19 = mul i32 %18, %2
  %20 = add i32 %19, 1
  %21 = getelementptr inbounds i8, ptr %1, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !13
  tail call void @MatNd_reshape(ptr noundef %0, i32 noundef %20, i32 noundef %22)
  %23 = icmp eq i32 %2, 1
  br i1 %23, label %24, label %25

24:                                               ; preds = %15
  tail call void @MatNd_copy(ptr noundef %0, ptr noundef nonnull %1)
  br label %297

25:                                               ; preds = %15
  %26 = load i32, ptr %16, align 8, !tbaa !9
  %27 = add i32 %26, 4
  %28 = load i32, ptr %21, align 4, !tbaa !13
  %29 = tail call ptr @MatNd_create(i32 noundef %27, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  %30 = load i32, ptr %16, align 8, !tbaa !9
  %31 = load i32, ptr %21, align 4, !tbaa !13
  %32 = tail call ptr @MatNd_getRowPtr(ptr noundef %29, i32 noundef 2)
  call void @MatNd_fromPtr(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %4, i32 noundef %30, i32 noundef %31, ptr noundef %32)
  call void @MatNd_copy(ptr noundef nonnull %4, ptr noundef nonnull %1)
  call void @MatNd_copyRow(ptr noundef %29, i32 noundef 1, ptr noundef nonnull %1, i32 noundef 1)
  %33 = call ptr @MatNd_getRowPtr(ptr noundef %29, i32 noundef 0)
  %34 = ptrtoint ptr %33 to i64
  %35 = call ptr @MatNd_getRowPtr(ptr noundef nonnull %1, i32 noundef 0)
  %36 = ptrtoint ptr %35 to i64
  %37 = call ptr @MatNd_getRowPtr(ptr noundef nonnull %1, i32 noundef 2)
  %38 = ptrtoint ptr %37 to i64
  %39 = getelementptr inbounds i8, ptr %0, i64 12
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %.not157 = icmp eq i32 %40, 0
  br i1 %.not157, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %25
  %wide.trip.count = zext i32 %40 to i64
  %min.iters.check = icmp ult i32 %40, 6
  br i1 %min.iters.check, label %.lr.ph.preheader227, label %vector.memcheck

.lr.ph.preheader227:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader227
  %41 = getelementptr inbounds double, ptr %35, i64 %indvars.iv.ph
  %42 = load double, ptr %41, align 8, !tbaa !14
  %43 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.ph
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = fneg double %44
  %46 = call double @llvm.fmuladd.f64(double %42, double 2.000000e+00, double %45)
  %47 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.ph
  store double %46, ptr %47, align 8, !tbaa !14
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader227
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader227 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %48 = add nsw i64 %wide.trip.count, -1
  %49 = icmp eq i64 %indvars.iv.ph, %48
  br i1 %49, label %._crit_edge, label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %50 = sub i64 %34, %36
  %diff.check = icmp ult i64 %50, 32
  %51 = sub i64 %34, %38
  %diff.check174 = icmp ult i64 %51, 32
  %conflict.rdx = or i1 %diff.check, %diff.check174
  br i1 %conflict.rdx, label %.lr.ph.preheader227, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967292
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %52 = getelementptr inbounds double, ptr %35, i64 %index
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %wide.load = load <2 x double>, ptr %52, align 8, !tbaa !14
  %wide.load175 = load <2 x double>, ptr %53, align 8, !tbaa !14
  %54 = getelementptr inbounds double, ptr %37, i64 %index
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load176 = load <2 x double>, ptr %54, align 8, !tbaa !14
  %wide.load177 = load <2 x double>, ptr %55, align 8, !tbaa !14
  %56 = fneg <2 x double> %wide.load176
  %57 = fneg <2 x double> %wide.load177
  %58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %56)
  %59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load175, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %57)
  %60 = getelementptr inbounds double, ptr %33, i64 %index
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  store <2 x double> %58, ptr %60, align 8, !tbaa !14
  store <2 x double> %59, ptr %61, align 8, !tbaa !14
  %index.next = add nuw i64 %index, 4
  %62 = icmp eq i64 %index.next, %n.vec
  br i1 %62, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader227

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %25
  %63 = load i32, ptr %16, align 8, !tbaa !9
  %64 = add i32 %63, 2
  %65 = add i32 %63, -2
  call void @MatNd_copyRow(ptr noundef %29, i32 noundef %64, ptr noundef %1, i32 noundef %65)
  %66 = load i32, ptr %16, align 8, !tbaa !9
  %67 = add i32 %66, 3
  %68 = call ptr @MatNd_getRowPtr(ptr noundef %29, i32 noundef %67)
  %69 = ptrtoint ptr %68 to i64
  %70 = load i32, ptr %16, align 8, !tbaa !9
  %71 = add i32 %70, -1
  %72 = call ptr @MatNd_getRowPtr(ptr noundef %1, i32 noundef %71)
  %73 = ptrtoint ptr %72 to i64
  %74 = load i32, ptr %16, align 8, !tbaa !9
  %75 = add i32 %74, -3
  %76 = call ptr @MatNd_getRowPtr(ptr noundef %1, i32 noundef %75)
  %77 = ptrtoint ptr %76 to i64
  %78 = load i32, ptr %39, align 4, !tbaa !13
  %.not158 = icmp eq i32 %78, 0
  br i1 %.not158, label %._crit_edge147, label %.lr.ph146.preheader

.lr.ph146.preheader:                              ; preds = %._crit_edge
  %wide.trip.count165 = zext i32 %78 to i64
  %min.iters.check184 = icmp ult i32 %78, 6
  br i1 %min.iters.check184, label %.lr.ph146.preheader226, label %vector.memcheck178

.lr.ph146.preheader226:                           ; preds = %middle.block182, %vector.memcheck178, %.lr.ph146.preheader
  %indvars.iv162.ph = phi i64 [ 0, %vector.memcheck178 ], [ 0, %.lr.ph146.preheader ], [ %n.vec187, %middle.block182 ]
  %xtraiter228 = and i64 %wide.trip.count165, 1
  %lcmp.mod229.not = icmp eq i64 %xtraiter228, 0
  br i1 %lcmp.mod229.not, label %.lr.ph146.prol.loopexit, label %.lr.ph146.prol

.lr.ph146.prol:                                   ; preds = %.lr.ph146.preheader226
  %79 = getelementptr inbounds double, ptr %72, i64 %indvars.iv162.ph
  %80 = load double, ptr %79, align 8, !tbaa !14
  %81 = getelementptr inbounds double, ptr %76, i64 %indvars.iv162.ph
  %82 = load double, ptr %81, align 8, !tbaa !14
  %83 = fneg double %82
  %84 = call double @llvm.fmuladd.f64(double %80, double 2.000000e+00, double %83)
  %85 = getelementptr inbounds double, ptr %68, i64 %indvars.iv162.ph
  store double %84, ptr %85, align 8, !tbaa !14
  %indvars.iv.next163.prol = or disjoint i64 %indvars.iv162.ph, 1
  br label %.lr.ph146.prol.loopexit

.lr.ph146.prol.loopexit:                          ; preds = %.lr.ph146.prol, %.lr.ph146.preheader226
  %indvars.iv162.unr = phi i64 [ %indvars.iv162.ph, %.lr.ph146.preheader226 ], [ %indvars.iv.next163.prol, %.lr.ph146.prol ]
  %86 = add nsw i64 %wide.trip.count165, -1
  %87 = icmp eq i64 %indvars.iv162.ph, %86
  br i1 %87, label %._crit_edge147, label %.lr.ph146

vector.memcheck178:                               ; preds = %.lr.ph146.preheader
  %88 = sub i64 %69, %73
  %diff.check179 = icmp ult i64 %88, 32
  %89 = sub i64 %69, %77
  %diff.check180 = icmp ult i64 %89, 32
  %conflict.rdx181 = or i1 %diff.check179, %diff.check180
  br i1 %conflict.rdx181, label %.lr.ph146.preheader226, label %vector.ph185

vector.ph185:                                     ; preds = %vector.memcheck178
  %n.vec187 = and i64 %wide.trip.count165, 4294967292
  br label %vector.body189

vector.body189:                                   ; preds = %vector.body189, %vector.ph185
  %index190 = phi i64 [ 0, %vector.ph185 ], [ %index.next195, %vector.body189 ]
  %90 = getelementptr inbounds double, ptr %72, i64 %index190
  %91 = getelementptr inbounds i8, ptr %90, i64 16
  %wide.load191 = load <2 x double>, ptr %90, align 8, !tbaa !14
  %wide.load192 = load <2 x double>, ptr %91, align 8, !tbaa !14
  %92 = getelementptr inbounds double, ptr %76, i64 %index190
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %wide.load193 = load <2 x double>, ptr %92, align 8, !tbaa !14
  %wide.load194 = load <2 x double>, ptr %93, align 8, !tbaa !14
  %94 = fneg <2 x double> %wide.load193
  %95 = fneg <2 x double> %wide.load194
  %96 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load191, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %94)
  %97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load192, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %95)
  %98 = getelementptr inbounds double, ptr %68, i64 %index190
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  store <2 x double> %96, ptr %98, align 8, !tbaa !14
  store <2 x double> %97, ptr %99, align 8, !tbaa !14
  %index.next195 = add nuw i64 %index190, 4
  %100 = icmp eq i64 %index.next195, %n.vec187
  br i1 %100, label %middle.block182, label %vector.body189, !llvm.loop !20

middle.block182:                                  ; preds = %vector.body189
  %cmp.n196 = icmp eq i64 %n.vec187, %wide.trip.count165
  br i1 %cmp.n196, label %._crit_edge147, label %.lr.ph146.preheader226

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %101 = getelementptr inbounds double, ptr %35, i64 %indvars.iv
  %102 = load double, ptr %101, align 8, !tbaa !14
  %103 = getelementptr inbounds double, ptr %37, i64 %indvars.iv
  %104 = load double, ptr %103, align 8, !tbaa !14
  %105 = fneg double %104
  %106 = call double @llvm.fmuladd.f64(double %102, double 2.000000e+00, double %105)
  %107 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  store double %106, ptr %107, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %108 = getelementptr inbounds double, ptr %35, i64 %indvars.iv.next
  %109 = load double, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.next
  %111 = load double, ptr %110, align 8, !tbaa !14
  %112 = fneg double %111
  %113 = call double @llvm.fmuladd.f64(double %109, double 2.000000e+00, double %112)
  %114 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next
  store double %113, ptr %114, align 8, !tbaa !14
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge147:                                   ; preds = %.lr.ph146.prol.loopexit, %.lr.ph146, %middle.block182, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #8
  store <2 x double> <double 5.000000e-01, double -3.000000e+00>, ptr %5, align 16, !tbaa !14
  %115 = getelementptr inbounds i8, ptr %5, i64 16
  store <2 x double> <double 6.000000e+00, double -1.000000e+00>, ptr %115, align 16, !tbaa !14
  %116 = getelementptr inbounds i8, ptr %5, i64 32
  store <2 x double> <double 7.000000e+00, double -1.500000e+01>, ptr %116, align 16, !tbaa !14
  %117 = getelementptr inbounds i8, ptr %5, i64 48
  store <2 x double> <double 5.000000e-01, double -4.000000e+00>, ptr %117, align 16, !tbaa !14
  %118 = getelementptr inbounds i8, ptr %5, i64 64
  store double 1.000000e+01, ptr %118, align 16, !tbaa !14
  %119 = load i32, ptr %21, align 4, !tbaa !13
  %.not159 = icmp eq i32 %119, 0
  br i1 %.not159, label %._crit_edge156, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge147
  %120 = getelementptr inbounds i8, ptr %29, i64 8
  %121 = getelementptr inbounds i8, ptr %29, i64 12
  %122 = getelementptr inbounds i8, ptr %6, i64 8
  %123 = getelementptr inbounds i8, ptr %7, i64 24
  %124 = getelementptr inbounds i8, ptr %7, i64 32
  %125 = getelementptr inbounds i8, ptr %7, i64 40
  %126 = uitofp i32 %2 to double
  %127 = getelementptr inbounds i8, ptr %7, i64 8
  %128 = getelementptr inbounds i8, ptr %7, i64 16
  %umax = call i32 @llvm.umax.i32(i32 %2, i32 2)
  %.pre = load i32, ptr %120, align 8, !tbaa !9
  %wide.trip.count170 = zext i32 %umax to i64
  %129 = add nsw i64 %wide.trip.count170, -2
  %scevgep = getelementptr inbounds i8, ptr %7, i64 48
  %130 = shl nuw nsw i64 %wide.trip.count170, 3
  %131 = add nsw i64 %wide.trip.count170, -1
  %min.iters.check203 = icmp ult i32 %2, 3
  %132 = trunc i64 %129 to i32
  %133 = icmp ugt i64 %129, 4294967295
  %n.vec206 = and i64 %131, -2
  %ind.end = or i64 %131, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %126, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %cmp.n223 = icmp eq i64 %131, %n.vec206
  br label %.preheader

.lr.ph146:                                        ; preds = %.lr.ph146.prol.loopexit, %.lr.ph146
  %indvars.iv162 = phi i64 [ %indvars.iv.next163.1, %.lr.ph146 ], [ %indvars.iv162.unr, %.lr.ph146.prol.loopexit ]
  %134 = getelementptr inbounds double, ptr %72, i64 %indvars.iv162
  %135 = load double, ptr %134, align 8, !tbaa !14
  %136 = getelementptr inbounds double, ptr %76, i64 %indvars.iv162
  %137 = load double, ptr %136, align 8, !tbaa !14
  %138 = fneg double %137
  %139 = call double @llvm.fmuladd.f64(double %135, double 2.000000e+00, double %138)
  %140 = getelementptr inbounds double, ptr %68, i64 %indvars.iv162
  store double %139, ptr %140, align 8, !tbaa !14
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %141 = getelementptr inbounds double, ptr %72, i64 %indvars.iv.next163
  %142 = load double, ptr %141, align 8, !tbaa !14
  %143 = getelementptr inbounds double, ptr %76, i64 %indvars.iv.next163
  %144 = load double, ptr %143, align 8, !tbaa !14
  %145 = fneg double %144
  %146 = call double @llvm.fmuladd.f64(double %142, double 2.000000e+00, double %145)
  %147 = getelementptr inbounds double, ptr %68, i64 %indvars.iv.next163
  store double %146, ptr %147, align 8, !tbaa !14
  %indvars.iv.next163.1 = add nuw nsw i64 %indvars.iv162, 2
  %exitcond166.not.1 = icmp eq i64 %indvars.iv.next163.1, %wide.trip.count165
  br i1 %exitcond166.not.1, label %._crit_edge147, label %.lr.ph146, !llvm.loop !22

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge154
  %148 = phi i32 [ %119, %.preheader.lr.ph ], [ %158, %._crit_edge154 ]
  %149 = phi i32 [ %.pre, %.preheader.lr.ph ], [ %159, %._crit_edge154 ]
  %.0139155 = phi i32 [ 0, %.preheader.lr.ph ], [ %160, %._crit_edge154 ]
  %150 = add i32 %.0139155, 1
  %151 = add i32 %149, -6
  %152 = icmp ult i32 %151, -3
  br i1 %152, label %.lr.ph150.preheader, label %._crit_edge154

._crit_edge156:                                   ; preds = %._crit_edge154, %._crit_edge147
  %153 = getelementptr inbounds i8, ptr %0, i64 8
  %154 = load i32, ptr %153, align 8, !tbaa !9
  %155 = add i32 %154, -1
  %156 = load i32, ptr %16, align 8, !tbaa !9
  %157 = add i32 %156, -1
  call void @MatNd_copyRow(ptr noundef %0, i32 noundef %155, ptr noundef nonnull %1, i32 noundef %157)
  call void @MatNd_destroy(ptr noundef %29)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %297

._crit_edge154:                                   ; preds = %._crit_edge151, %.preheader
  %158 = phi i32 [ %148, %.preheader ], [ %225, %._crit_edge151 ]
  %159 = phi i32 [ %149, %.preheader ], [ %270, %._crit_edge151 ]
  %160 = add nuw i32 %.0139155, 1
  %161 = icmp ult i32 %160, %158
  br i1 %161, label %.preheader, label %._crit_edge156, !llvm.loop !23

.lr.ph150.preheader:                              ; preds = %.preheader, %._crit_edge151
  %indvar = phi i32 [ %indvar.next, %._crit_edge151 ], [ 0, %.preheader ]
  %.0140152 = phi i32 [ %185, %._crit_edge151 ], [ 2, %.preheader ]
  %162 = mul i32 %indvar, %2
  %163 = add i32 %150, %162
  %164 = zext i32 %163 to i64
  %165 = shl nuw nsw i64 %164, 3
  %166 = load ptr, ptr %29, align 8, !tbaa !24
  %167 = add i32 %.0140152, -2
  %168 = load i32, ptr %121, align 4, !tbaa !13
  %169 = mul i32 %168, %167
  %170 = add i32 %169, %.0139155
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds double, ptr %166, i64 %171
  %173 = load double, ptr %172, align 8, !tbaa !14
  %174 = add i32 %.0140152, -1
  %175 = mul i32 %168, %174
  %176 = add i32 %175, %.0139155
  %177 = zext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %166, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !14
  %180 = mul i32 %168, %.0140152
  %181 = add i32 %180, %.0139155
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds double, ptr %166, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !14
  %185 = add nuw i32 %.0140152, 1
  %186 = mul i32 %168, %185
  %187 = add i32 %186, %.0139155
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds double, ptr %166, i64 %188
  %190 = load double, ptr %189, align 8, !tbaa !14
  %191 = add i32 %.0140152, 2
  %192 = mul i32 %168, %191
  %193 = add i32 %192, %.0139155
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds double, ptr %166, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !14
  %197 = add i32 %.0140152, 3
  %198 = mul i32 %168, %197
  %199 = add i32 %198, %.0139155
  %200 = zext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %166, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !14
  %203 = fsub double %190, %179
  %204 = fsub double %196, %184
  %205 = fmul double %204, 5.000000e-01
  %206 = call double @llvm.fmuladd.f64(double %184, double -2.000000e+00, double %196)
  %207 = fadd double %173, %206
  %208 = call double @llvm.fmuladd.f64(double %190, double -2.000000e+00, double %202)
  %209 = fadd double %179, %208
  %210 = fmul double %209, 2.500000e-01
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  %211 = fsub double %190, %184
  %212 = insertelement <2 x double> poison, double %207, i64 0
  %213 = insertelement <2 x double> %212, double %203, i64 1
  %214 = fmul <2 x double> %213, <double 2.500000e-01, double 5.000000e-01>
  %215 = extractelement <2 x double> %214, i64 0
  %216 = fsub double %210, %215
  store double %216, ptr %6, align 16, !tbaa !14
  %217 = extractelement <2 x double> %214, i64 1
  %218 = fsub double %205, %217
  %219 = call double @llvm.fmuladd.f64(double %215, double -5.000000e-01, double %211)
  %220 = insertelement <2 x double> poison, double %218, i64 0
  %221 = insertelement <2 x double> %220, double %219, i64 1
  %222 = fsub <2 x double> %221, %214
  store <2 x double> %222, ptr %122, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #8
  call void @Vec3d_rotate(ptr noundef nonnull %7, ptr noundef nonnull %5, ptr noundef nonnull %6) #8
  %223 = fmul double %215, 5.000000e-01
  store double %223, ptr %123, align 8, !tbaa !14
  store double %217, ptr %124, align 16, !tbaa !14
  store double %184, ptr %125, align 8, !tbaa !14
  %224 = load ptr, ptr %1, align 8, !tbaa !24
  %225 = load i32, ptr %21, align 4, !tbaa !13
  %226 = mul i32 %225, %167
  %227 = add i32 %226, %.0139155
  %228 = zext i32 %227 to i64
  %229 = getelementptr inbounds double, ptr %224, i64 %228
  %230 = load double, ptr %229, align 8, !tbaa !14
  %231 = load ptr, ptr %0, align 8, !tbaa !24
  %232 = mul i32 %167, %2
  %233 = load i32, ptr %39, align 4, !tbaa !13
  %234 = mul i32 %233, %232
  %235 = add i32 %234, %.0139155
  %236 = zext i32 %235 to i64
  %237 = getelementptr inbounds double, ptr %231, i64 %236
  store double %230, ptr %237, align 8, !tbaa !14
  br i1 %min.iters.check203, label %.lr.ph150.preheader224, label %vector.scevcheck

.lr.ph150.preheader224:                           ; preds = %middle.block201, %vector.memcheck197, %vector.scevcheck, %.lr.ph150.preheader
  %indvars.iv167.ph = phi i64 [ 1, %vector.memcheck197 ], [ 1, %vector.scevcheck ], [ 1, %.lr.ph150.preheader ], [ %ind.end, %middle.block201 ]
  br label %.lr.ph150

vector.scevcheck:                                 ; preds = %.lr.ph150.preheader
  %238 = mul i32 %indvar, %2
  %ident.check = icmp ne i32 %233, 1
  %239 = add i32 %.0139155, %238
  %240 = sub i32 -2, %239
  %241 = icmp ult i32 %240, %132
  %242 = or i1 %241, %133
  %243 = or i1 %ident.check, %242
  br i1 %243, label %.lr.ph150.preheader224, label %vector.memcheck197

vector.memcheck197:                               ; preds = %vector.scevcheck
  %scevgep198 = getelementptr i8, ptr %231, i64 %165
  %244 = getelementptr i8, ptr %231, i64 %130
  %scevgep199 = getelementptr i8, ptr %244, i64 -8
  %scevgep200 = getelementptr i8, ptr %scevgep199, i64 %165
  %bound0 = icmp ult ptr %7, %scevgep200
  %bound1 = icmp ult ptr %scevgep198, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph150.preheader224, label %vector.ph204

vector.ph204:                                     ; preds = %vector.memcheck197
  %245 = load double, ptr %125, align 8, !tbaa !14, !alias.scope !25, !noalias !28
  %broadcast.splatinsert220 = insertelement <2 x double> poison, double %245, i64 0
  %broadcast.splat221 = shufflevector <2 x double> %broadcast.splatinsert220, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body208

vector.body208:                                   ; preds = %vector.body208, %vector.ph204
  %index209 = phi i64 [ 0, %vector.ph204 ], [ %index.next222, %vector.body208 ]
  %vec.ind = phi <2 x i32> [ <i32 1, i32 2>, %vector.ph204 ], [ %vec.ind.next, %vector.body208 ]
  %246 = trunc i64 %index209 to i32
  %247 = or disjoint i32 %246, 1
  %248 = uitofp <2 x i32> %vec.ind to <2 x double>
  %249 = fdiv <2 x double> %248, %broadcast.splat
  %250 = fmul <2 x double> %249, %249
  %251 = fmul <2 x double> %249, %250
  %252 = fmul <2 x double> %250, %250
  %253 = fmul <2 x double> %249, %252
  %254 = load <2 x double>, ptr %7, align 16
  %broadcast.splat213 = shufflevector <2 x double> %254, <2 x double> poison, <2 x i32> zeroinitializer
  %255 = load <2 x double>, ptr %127, align 8
  %broadcast.splat211 = shufflevector <2 x double> %255, <2 x double> poison, <2 x i32> zeroinitializer
  %256 = fmul <2 x double> %252, %broadcast.splat211
  %257 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat213, <2 x double> %253, <2 x double> %256)
  %258 = load <2 x double>, ptr %128, align 16
  %broadcast.splat215 = shufflevector <2 x double> %258, <2 x double> poison, <2 x i32> zeroinitializer
  %259 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat215, <2 x double> %251, <2 x double> %257)
  %260 = load <2 x double>, ptr %123, align 8
  %broadcast.splat217 = shufflevector <2 x double> %260, <2 x double> poison, <2 x i32> zeroinitializer
  %261 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat217, <2 x double> %250, <2 x double> %259)
  %262 = load <2 x double>, ptr %124, align 16
  %broadcast.splat219 = shufflevector <2 x double> %262, <2 x double> poison, <2 x i32> zeroinitializer
  %263 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat219, <2 x double> %249, <2 x double> %261)
  %264 = fadd <2 x double> %broadcast.splat221, %263
  %265 = add i32 %232, %247
  %266 = add i32 %265, %.0139155
  %267 = zext i32 %266 to i64
  %268 = getelementptr inbounds double, ptr %231, i64 %267
  store <2 x double> %264, ptr %268, align 8, !tbaa !14, !alias.scope !28
  %index.next222 = add nuw i64 %index209, 2
  %vec.ind.next = add <2 x i32> %vec.ind, <i32 2, i32 2>
  %269 = icmp eq i64 %index.next222, %n.vec206
  br i1 %269, label %middle.block201, label %vector.body208, !llvm.loop !30

middle.block201:                                  ; preds = %vector.body208
  br i1 %cmp.n223, label %._crit_edge151, label %.lr.ph150.preheader224

._crit_edge151:                                   ; preds = %.lr.ph150, %middle.block201
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  %270 = load i32, ptr %120, align 8, !tbaa !9
  %271 = add i32 %270, -3
  %272 = icmp ult i32 %185, %271
  %indvar.next = add i32 %indvar, 1
  br i1 %272, label %.lr.ph150.preheader, label %._crit_edge154, !llvm.loop !31

.lr.ph150:                                        ; preds = %.lr.ph150.preheader224, %.lr.ph150
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %.lr.ph150 ], [ %indvars.iv167.ph, %.lr.ph150.preheader224 ]
  %273 = trunc nuw i64 %indvars.iv167 to i32
  %274 = uitofp i32 %273 to double
  %275 = fdiv double %274, %126
  %276 = fmul double %275, %275
  %277 = fmul double %275, %276
  %278 = fmul double %276, %276
  %279 = fmul double %275, %278
  %280 = load double, ptr %7, align 16, !tbaa !14
  %281 = load double, ptr %127, align 8, !tbaa !14
  %282 = fmul double %278, %281
  %283 = call double @llvm.fmuladd.f64(double %280, double %279, double %282)
  %284 = load double, ptr %128, align 16, !tbaa !14
  %285 = call double @llvm.fmuladd.f64(double %284, double %277, double %283)
  %286 = load double, ptr %123, align 8, !tbaa !14
  %287 = call double @llvm.fmuladd.f64(double %286, double %276, double %285)
  %288 = load double, ptr %124, align 16, !tbaa !14
  %289 = call double @llvm.fmuladd.f64(double %288, double %275, double %287)
  %290 = load double, ptr %125, align 8, !tbaa !14
  %291 = fadd double %290, %289
  %292 = add i32 %232, %273
  %293 = mul i32 %292, %233
  %294 = add i32 %293, %.0139155
  %295 = zext i32 %294 to i64
  %296 = getelementptr inbounds double, ptr %231, i64 %295
  store double %291, ptr %296, align 8, !tbaa !14
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170
  br i1 %exitcond171.not, label %._crit_edge151, label %.lr.ph150, !llvm.loop !32

297:                                              ; preds = %._crit_edge156, %24
  ret void
}

declare void @Vec3d_rotate(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { cold nounwind }
attributes #8 = { nounwind }
attributes #9 = { 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, !11, i64 12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !17, !18, !19}
!21 = distinct !{!21, !17, !18}
!22 = distinct !{!22, !17, !18}
!23 = distinct !{!23, !17}
!24 = !{!10, !6, i64 0}
!25 = !{!26}
!26 = distinct !{!26, !27}
!27 = distinct !{!27, !"LVerDomain"}
!28 = !{!29}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !17, !18, !19}
!31 = distinct !{!31, !17}
!32 = distinct !{!32, !17, !18}


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