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

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.Mat3d_rotateSelfAboutXYZAxis = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

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

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

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

declare void @print_trace() #3

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @Mat3d_rotateSelfAboutXYZAxis(ptr noundef %0, i32 noundef %1, double noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca [3 x [3 x double]], align 16
  %8 = alloca [3 x [3 x double]], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr %8) #6
  %9 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  call void @Mat3d_copy(ptr noundef %9, ptr noundef %10)
  %11 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %11, label %327 [
    i32 0, label %12
    i32 1, label %117
    i32 2, label %222
  ]

12:                                               ; preds = %3
  %13 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %14 = load double, ptr %6, align 8, !tbaa !11
  call void @Mat3d_setRotMatX(ptr noundef %13, double noundef %14)
  %15 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %16 = getelementptr inbounds [3 x double], ptr %15, i64 0, i64 1
  %17 = load double, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %19 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %20 = load double, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %22 = getelementptr inbounds [3 x double], ptr %21, i64 0, i64 2
  %23 = load double, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %25 = getelementptr inbounds [3 x double], ptr %24, i64 0, i64 0
  %26 = load double, ptr %25, align 16, !tbaa !11
  %27 = fmul double %23, %26
  %28 = call double @llvm.fmuladd.f64(double %17, double %20, double %27)
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds [3 x double], ptr %29, i64 1
  %31 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 0
  store double %28, ptr %31, align 8, !tbaa !11
  %32 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %33 = getelementptr inbounds [3 x double], ptr %32, i64 0, i64 1
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %36 = getelementptr inbounds [3 x double], ptr %35, i64 0, i64 1
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %39 = getelementptr inbounds [3 x double], ptr %38, i64 0, i64 2
  %40 = load double, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %42 = getelementptr inbounds [3 x double], ptr %41, i64 0, i64 1
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = fmul double %40, %43
  %45 = call double @llvm.fmuladd.f64(double %34, double %37, double %44)
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds [3 x double], ptr %46, i64 1
  %48 = getelementptr inbounds [3 x double], ptr %47, i64 0, i64 1
  store double %45, ptr %48, align 8, !tbaa !11
  %49 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %50 = getelementptr inbounds [3 x double], ptr %49, i64 0, i64 1
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %53 = getelementptr inbounds [3 x double], ptr %52, i64 0, i64 2
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %56 = getelementptr inbounds [3 x double], ptr %55, i64 0, i64 2
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %59 = getelementptr inbounds [3 x double], ptr %58, i64 0, i64 2
  %60 = load double, ptr %59, align 16, !tbaa !11
  %61 = fmul double %57, %60
  %62 = call double @llvm.fmuladd.f64(double %51, double %54, double %61)
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds [3 x double], ptr %63, i64 1
  %65 = getelementptr inbounds [3 x double], ptr %64, i64 0, i64 2
  store double %62, ptr %65, align 8, !tbaa !11
  %66 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %67 = getelementptr inbounds [3 x double], ptr %66, i64 0, i64 1
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %70 = getelementptr inbounds [3 x double], ptr %69, i64 0, i64 0
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %73 = getelementptr inbounds [3 x double], ptr %72, i64 0, i64 2
  %74 = load double, ptr %73, align 16, !tbaa !11
  %75 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %76 = getelementptr inbounds [3 x double], ptr %75, i64 0, i64 0
  %77 = load double, ptr %76, align 16, !tbaa !11
  %78 = fmul double %74, %77
  %79 = call double @llvm.fmuladd.f64(double %68, double %71, double %78)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds [3 x double], ptr %80, i64 2
  %82 = getelementptr inbounds [3 x double], ptr %81, i64 0, i64 0
  store double %79, ptr %82, align 8, !tbaa !11
  %83 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %84 = getelementptr inbounds [3 x double], ptr %83, i64 0, i64 1
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %87 = getelementptr inbounds [3 x double], ptr %86, i64 0, i64 1
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %90 = getelementptr inbounds [3 x double], ptr %89, i64 0, i64 2
  %91 = load double, ptr %90, align 16, !tbaa !11
  %92 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %93 = getelementptr inbounds [3 x double], ptr %92, i64 0, i64 1
  %94 = load double, ptr %93, align 8, !tbaa !11
  %95 = fmul double %91, %94
  %96 = call double @llvm.fmuladd.f64(double %85, double %88, double %95)
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds [3 x double], ptr %97, i64 2
  %99 = getelementptr inbounds [3 x double], ptr %98, i64 0, i64 1
  store double %96, ptr %99, align 8, !tbaa !11
  %100 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %101 = getelementptr inbounds [3 x double], ptr %100, i64 0, i64 1
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %104 = getelementptr inbounds [3 x double], ptr %103, i64 0, i64 2
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %107 = getelementptr inbounds [3 x double], ptr %106, i64 0, i64 2
  %108 = load double, ptr %107, align 16, !tbaa !11
  %109 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %110 = getelementptr inbounds [3 x double], ptr %109, i64 0, i64 2
  %111 = load double, ptr %110, align 16, !tbaa !11
  %112 = fmul double %108, %111
  %113 = call double @llvm.fmuladd.f64(double %102, double %105, double %112)
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds [3 x double], ptr %114, i64 2
  %116 = getelementptr inbounds [3 x double], ptr %115, i64 0, i64 2
  store double %113, ptr %116, align 8, !tbaa !11
  br label %338

117:                                              ; preds = %3
  %118 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %119 = load double, ptr %6, align 8, !tbaa !11
  call void @Mat3d_setRotMatY(ptr noundef %118, double noundef %119)
  %120 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %121 = getelementptr inbounds [3 x double], ptr %120, i64 0, i64 0
  %122 = load double, ptr %121, align 16, !tbaa !11
  %123 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %124 = getelementptr inbounds [3 x double], ptr %123, i64 0, i64 0
  %125 = load double, ptr %124, align 16, !tbaa !11
  %126 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %127 = getelementptr inbounds [3 x double], ptr %126, i64 0, i64 2
  %128 = load double, ptr %127, align 16, !tbaa !11
  %129 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %130 = getelementptr inbounds [3 x double], ptr %129, i64 0, i64 0
  %131 = load double, ptr %130, align 16, !tbaa !11
  %132 = fmul double %128, %131
  %133 = call double @llvm.fmuladd.f64(double %122, double %125, double %132)
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds [3 x double], ptr %134, i64 0
  %136 = getelementptr inbounds [3 x double], ptr %135, i64 0, i64 0
  store double %133, ptr %136, align 8, !tbaa !11
  %137 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %138 = getelementptr inbounds [3 x double], ptr %137, i64 0, i64 0
  %139 = load double, ptr %138, align 16, !tbaa !11
  %140 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %141 = getelementptr inbounds [3 x double], ptr %140, i64 0, i64 1
  %142 = load double, ptr %141, align 8, !tbaa !11
  %143 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %144 = getelementptr inbounds [3 x double], ptr %143, i64 0, i64 2
  %145 = load double, ptr %144, align 16, !tbaa !11
  %146 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %147 = getelementptr inbounds [3 x double], ptr %146, i64 0, i64 1
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = fmul double %145, %148
  %150 = call double @llvm.fmuladd.f64(double %139, double %142, double %149)
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds [3 x double], ptr %151, i64 0
  %153 = getelementptr inbounds [3 x double], ptr %152, i64 0, i64 1
  store double %150, ptr %153, align 8, !tbaa !11
  %154 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %155 = getelementptr inbounds [3 x double], ptr %154, i64 0, i64 0
  %156 = load double, ptr %155, align 16, !tbaa !11
  %157 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %158 = getelementptr inbounds [3 x double], ptr %157, i64 0, i64 2
  %159 = load double, ptr %158, align 16, !tbaa !11
  %160 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %161 = getelementptr inbounds [3 x double], ptr %160, i64 0, i64 2
  %162 = load double, ptr %161, align 16, !tbaa !11
  %163 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %164 = getelementptr inbounds [3 x double], ptr %163, i64 0, i64 2
  %165 = load double, ptr %164, align 16, !tbaa !11
  %166 = fmul double %162, %165
  %167 = call double @llvm.fmuladd.f64(double %156, double %159, double %166)
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds [3 x double], ptr %168, i64 0
  %170 = getelementptr inbounds [3 x double], ptr %169, i64 0, i64 2
  store double %167, ptr %170, align 8, !tbaa !11
  %171 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %172 = getelementptr inbounds [3 x double], ptr %171, i64 0, i64 0
  %173 = load double, ptr %172, align 16, !tbaa !11
  %174 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %175 = getelementptr inbounds [3 x double], ptr %174, i64 0, i64 0
  %176 = load double, ptr %175, align 16, !tbaa !11
  %177 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %178 = getelementptr inbounds [3 x double], ptr %177, i64 0, i64 2
  %179 = load double, ptr %178, align 16, !tbaa !11
  %180 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %181 = getelementptr inbounds [3 x double], ptr %180, i64 0, i64 0
  %182 = load double, ptr %181, align 16, !tbaa !11
  %183 = fmul double %179, %182
  %184 = call double @llvm.fmuladd.f64(double %173, double %176, double %183)
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds [3 x double], ptr %185, i64 2
  %187 = getelementptr inbounds [3 x double], ptr %186, i64 0, i64 0
  store double %184, ptr %187, align 8, !tbaa !11
  %188 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %189 = getelementptr inbounds [3 x double], ptr %188, i64 0, i64 0
  %190 = load double, ptr %189, align 16, !tbaa !11
  %191 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %192 = getelementptr inbounds [3 x double], ptr %191, i64 0, i64 1
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %195 = getelementptr inbounds [3 x double], ptr %194, i64 0, i64 2
  %196 = load double, ptr %195, align 16, !tbaa !11
  %197 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %198 = getelementptr inbounds [3 x double], ptr %197, i64 0, i64 1
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = fmul double %196, %199
  %201 = call double @llvm.fmuladd.f64(double %190, double %193, double %200)
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds [3 x double], ptr %202, i64 2
  %204 = getelementptr inbounds [3 x double], ptr %203, i64 0, i64 1
  store double %201, ptr %204, align 8, !tbaa !11
  %205 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %206 = getelementptr inbounds [3 x double], ptr %205, i64 0, i64 0
  %207 = load double, ptr %206, align 16, !tbaa !11
  %208 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %209 = getelementptr inbounds [3 x double], ptr %208, i64 0, i64 2
  %210 = load double, ptr %209, align 16, !tbaa !11
  %211 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 2
  %212 = getelementptr inbounds [3 x double], ptr %211, i64 0, i64 2
  %213 = load double, ptr %212, align 16, !tbaa !11
  %214 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 2
  %215 = getelementptr inbounds [3 x double], ptr %214, i64 0, i64 2
  %216 = load double, ptr %215, align 16, !tbaa !11
  %217 = fmul double %213, %216
  %218 = call double @llvm.fmuladd.f64(double %207, double %210, double %217)
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds [3 x double], ptr %219, i64 2
  %221 = getelementptr inbounds [3 x double], ptr %220, i64 0, i64 2
  store double %218, ptr %221, align 8, !tbaa !11
  br label %338

222:                                              ; preds = %3
  %223 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %224 = load double, ptr %6, align 8, !tbaa !11
  call void @Mat3d_setRotMatZ(ptr noundef %223, double noundef %224)
  %225 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %226 = getelementptr inbounds [3 x double], ptr %225, i64 0, i64 0
  %227 = load double, ptr %226, align 16, !tbaa !11
  %228 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %229 = getelementptr inbounds [3 x double], ptr %228, i64 0, i64 0
  %230 = load double, ptr %229, align 16, !tbaa !11
  %231 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %232 = getelementptr inbounds [3 x double], ptr %231, i64 0, i64 1
  %233 = load double, ptr %232, align 8, !tbaa !11
  %234 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %235 = getelementptr inbounds [3 x double], ptr %234, i64 0, i64 0
  %236 = load double, ptr %235, align 8, !tbaa !11
  %237 = fmul double %233, %236
  %238 = call double @llvm.fmuladd.f64(double %227, double %230, double %237)
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds [3 x double], ptr %239, i64 0
  %241 = getelementptr inbounds [3 x double], ptr %240, i64 0, i64 0
  store double %238, ptr %241, align 8, !tbaa !11
  %242 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %243 = getelementptr inbounds [3 x double], ptr %242, i64 0, i64 0
  %244 = load double, ptr %243, align 16, !tbaa !11
  %245 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %246 = getelementptr inbounds [3 x double], ptr %245, i64 0, i64 1
  %247 = load double, ptr %246, align 8, !tbaa !11
  %248 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %249 = getelementptr inbounds [3 x double], ptr %248, i64 0, i64 1
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %252 = getelementptr inbounds [3 x double], ptr %251, i64 0, i64 1
  %253 = load double, ptr %252, align 8, !tbaa !11
  %254 = fmul double %250, %253
  %255 = call double @llvm.fmuladd.f64(double %244, double %247, double %254)
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = getelementptr inbounds [3 x double], ptr %256, i64 0
  %258 = getelementptr inbounds [3 x double], ptr %257, i64 0, i64 1
  store double %255, ptr %258, align 8, !tbaa !11
  %259 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %260 = getelementptr inbounds [3 x double], ptr %259, i64 0, i64 0
  %261 = load double, ptr %260, align 16, !tbaa !11
  %262 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %263 = getelementptr inbounds [3 x double], ptr %262, i64 0, i64 2
  %264 = load double, ptr %263, align 16, !tbaa !11
  %265 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 0
  %266 = getelementptr inbounds [3 x double], ptr %265, i64 0, i64 1
  %267 = load double, ptr %266, align 8, !tbaa !11
  %268 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %269 = getelementptr inbounds [3 x double], ptr %268, i64 0, i64 2
  %270 = load double, ptr %269, align 8, !tbaa !11
  %271 = fmul double %267, %270
  %272 = call double @llvm.fmuladd.f64(double %261, double %264, double %271)
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = getelementptr inbounds [3 x double], ptr %273, i64 0
  %275 = getelementptr inbounds [3 x double], ptr %274, i64 0, i64 2
  store double %272, ptr %275, align 8, !tbaa !11
  %276 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %277 = getelementptr inbounds [3 x double], ptr %276, i64 0, i64 0
  %278 = load double, ptr %277, align 8, !tbaa !11
  %279 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %280 = getelementptr inbounds [3 x double], ptr %279, i64 0, i64 0
  %281 = load double, ptr %280, align 16, !tbaa !11
  %282 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %283 = getelementptr inbounds [3 x double], ptr %282, i64 0, i64 1
  %284 = load double, ptr %283, align 8, !tbaa !11
  %285 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %286 = getelementptr inbounds [3 x double], ptr %285, i64 0, i64 0
  %287 = load double, ptr %286, align 8, !tbaa !11
  %288 = fmul double %284, %287
  %289 = call double @llvm.fmuladd.f64(double %278, double %281, double %288)
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds [3 x double], ptr %290, i64 1
  %292 = getelementptr inbounds [3 x double], ptr %291, i64 0, i64 0
  store double %289, ptr %292, align 8, !tbaa !11
  %293 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %294 = getelementptr inbounds [3 x double], ptr %293, i64 0, i64 0
  %295 = load double, ptr %294, align 8, !tbaa !11
  %296 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %297 = getelementptr inbounds [3 x double], ptr %296, i64 0, i64 1
  %298 = load double, ptr %297, align 8, !tbaa !11
  %299 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %300 = getelementptr inbounds [3 x double], ptr %299, i64 0, i64 1
  %301 = load double, ptr %300, align 8, !tbaa !11
  %302 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %303 = getelementptr inbounds [3 x double], ptr %302, i64 0, i64 1
  %304 = load double, ptr %303, align 8, !tbaa !11
  %305 = fmul double %301, %304
  %306 = call double @llvm.fmuladd.f64(double %295, double %298, double %305)
  %307 = load ptr, ptr %4, align 8, !tbaa !5
  %308 = getelementptr inbounds [3 x double], ptr %307, i64 1
  %309 = getelementptr inbounds [3 x double], ptr %308, i64 0, i64 1
  store double %306, ptr %309, align 8, !tbaa !11
  %310 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %311 = getelementptr inbounds [3 x double], ptr %310, i64 0, i64 0
  %312 = load double, ptr %311, align 8, !tbaa !11
  %313 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 0
  %314 = getelementptr inbounds [3 x double], ptr %313, i64 0, i64 2
  %315 = load double, ptr %314, align 16, !tbaa !11
  %316 = getelementptr inbounds [3 x [3 x double]], ptr %7, i64 0, i64 1
  %317 = getelementptr inbounds [3 x double], ptr %316, i64 0, i64 1
  %318 = load double, ptr %317, align 8, !tbaa !11
  %319 = getelementptr inbounds [3 x [3 x double]], ptr %8, i64 0, i64 1
  %320 = getelementptr inbounds [3 x double], ptr %319, i64 0, i64 2
  %321 = load double, ptr %320, align 8, !tbaa !11
  %322 = fmul double %318, %321
  %323 = call double @llvm.fmuladd.f64(double %312, double %315, double %322)
  %324 = load ptr, ptr %4, align 8, !tbaa !5
  %325 = getelementptr inbounds [3 x double], ptr %324, i64 1
  %326 = getelementptr inbounds [3 x double], ptr %325, i64 0, i64 2
  store double %323, ptr %326, align 8, !tbaa !11
  br label %338

327:                                              ; preds = %3
  br label %328

328:                                              ; preds = %327
  %329 = load ptr, ptr @stderr, align 8, !tbaa !5
  %330 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %329, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.Mat3d_rotateSelfAboutXYZAxis, i32 noundef 847) #6
  %331 = load ptr, ptr @stderr, align 8, !tbaa !5
  %332 = load i32, ptr %5, align 4, !tbaa !9
  %333 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %331, ptr noundef @.str.4, i32 noundef %332) #6
  %334 = load ptr, ptr @stderr, align 8, !tbaa !5
  %335 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %334, ptr noundef @.str.3) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

336:                                              ; No predecessors!
  br label %337

337:                                              ; preds = %336
  br label %338

338:                                              ; preds = %337, %222, %117, %12
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #6
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; 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 [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.Mat3d_rotateSelfAboutXYZAxis = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

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

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

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

declare void @print_trace() local_unnamed_addr #3

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @Mat3d_rotateSelfAboutXYZAxis(ptr noundef %0, i32 noundef %1, double noundef %2) local_unnamed_addr #1 {
  %4 = alloca [3 x [3 x double]], align 16
  %5 = alloca [3 x [3 x double]], align 16
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #7
  call void @Mat3d_copy(ptr noundef nonnull %5, ptr noundef %0)
  switch i32 %1, label %112 [
    i32 0, label %6
    i32 1, label %44
    i32 2, label %77
  ]

6:                                                ; preds = %3
  call void @Mat3d_setRotMatX(ptr noundef nonnull %4, double noundef %2)
  %7 = getelementptr inbounds i8, ptr %4, i64 32
  %8 = load <2 x double>, ptr %7, align 16
  %9 = getelementptr inbounds i8, ptr %5, i64 24
  %10 = getelementptr inbounds i8, ptr %4, i64 40
  %11 = load <2 x double>, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr %5, i64 48
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load <2 x double>, ptr %9, align 8, !tbaa !5
  %15 = load <2 x double>, ptr %12, align 16, !tbaa !5
  %16 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> zeroinitializer
  %17 = fmul <2 x double> %16, %15
  %18 = shufflevector <2 x double> %8, <2 x double> poison, <2 x i32> zeroinitializer
  %19 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %18, <2 x double> %14, <2 x double> %17)
  store <2 x double> %19, ptr %13, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %5, i64 40
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %5, i64 64
  %23 = load double, ptr %22, align 16, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  %25 = getelementptr inbounds i8, ptr %4, i64 56
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %4, i64 64
  %28 = load double, ptr %27, align 16, !tbaa !5
  %29 = shufflevector <2 x double> %15, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %30 = insertelement <2 x double> %29, double %23, i64 0
  %31 = insertelement <2 x double> %11, double %28, i64 1
  %32 = fmul <2 x double> %30, %31
  %33 = insertelement <2 x double> %8, double %26, i64 1
  %34 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %35 = insertelement <2 x double> %34, double %21, i64 0
  %36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %35, <2 x double> %32)
  store <2 x double> %36, ptr %24, align 8, !tbaa !5
  %37 = extractelement <2 x double> %15, i64 1
  %38 = fmul double %37, %28
  %39 = extractelement <2 x double> %14, i64 1
  %40 = call double @llvm.fmuladd.f64(double %26, double %39, double %38)
  %41 = getelementptr inbounds i8, ptr %0, i64 56
  store double %40, ptr %41, align 8, !tbaa !5
  %42 = fmul double %23, %28
  %43 = call double @llvm.fmuladd.f64(double %26, double %21, double %42)
  br label %119

44:                                               ; preds = %3
  call void @Mat3d_setRotMatY(ptr noundef nonnull %4, double noundef %2)
  %45 = load double, ptr %4, align 16, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %4, i64 16
  %47 = load double, ptr %46, align 16, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %5, i64 48
  %49 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %50 = load <2 x double>, ptr %48, align 16, !tbaa !5
  %51 = insertelement <2 x double> poison, double %47, i64 0
  %52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> zeroinitializer
  %53 = fmul <2 x double> %52, %50
  %54 = insertelement <2 x double> poison, double %45, i64 0
  %55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
  %56 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %55, <2 x double> %49, <2 x double> %53)
  store <2 x double> %56, ptr %0, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %5, i64 16
  %58 = load double, ptr %57, align 16, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %5, i64 64
  %60 = load double, ptr %59, align 16, !tbaa !5
  %61 = fmul double %47, %60
  %62 = call double @llvm.fmuladd.f64(double %45, double %58, double %61)
  %63 = getelementptr inbounds i8, ptr %0, i64 16
  store double %62, ptr %63, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %4, i64 48
  %65 = load double, ptr %64, align 16, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %4, i64 64
  %67 = load double, ptr %66, align 16, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %0, i64 48
  %69 = insertelement <2 x double> poison, double %67, i64 0
  %70 = shufflevector <2 x double> %69, <2 x double> poison, <2 x i32> zeroinitializer
  %71 = fmul <2 x double> %50, %70
  %72 = insertelement <2 x double> poison, double %65, i64 0
  %73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
  %74 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %73, <2 x double> %49, <2 x double> %71)
  store <2 x double> %74, ptr %68, align 8, !tbaa !5
  %75 = fmul double %60, %67
  %76 = call double @llvm.fmuladd.f64(double %65, double %58, double %75)
  br label %119

77:                                               ; preds = %3
  call void @Mat3d_setRotMatZ(ptr noundef nonnull %4, double noundef %2)
  %78 = load <2 x double>, ptr %4, align 16
  %79 = getelementptr inbounds i8, ptr %4, i64 8
  %80 = load <2 x double>, ptr %79, align 8
  %81 = getelementptr inbounds i8, ptr %5, i64 24
  %82 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %83 = load <2 x double>, ptr %81, align 8, !tbaa !5
  %84 = shufflevector <2 x double> %80, <2 x double> poison, <2 x i32> zeroinitializer
  %85 = fmul <2 x double> %84, %83
  %86 = shufflevector <2 x double> %78, <2 x double> poison, <2 x i32> zeroinitializer
  %87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %86, <2 x double> %82, <2 x double> %85)
  store <2 x double> %87, ptr %0, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %5, i64 16
  %89 = load double, ptr %88, align 16, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %5, i64 40
  %91 = load double, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %0, i64 16
  %93 = getelementptr inbounds i8, ptr %4, i64 24
  %94 = load double, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %4, i64 32
  %96 = load double, ptr %95, align 16, !tbaa !5
  %97 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %98 = insertelement <2 x double> %97, double %91, i64 0
  %99 = insertelement <2 x double> %80, double %96, i64 1
  %100 = fmul <2 x double> %98, %99
  %101 = insertelement <2 x double> %78, double %94, i64 1
  %102 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %103 = insertelement <2 x double> %102, double %89, i64 0
  %104 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %101, <2 x double> %103, <2 x double> %100)
  store <2 x double> %104, ptr %92, align 8, !tbaa !5
  %105 = extractelement <2 x double> %83, i64 1
  %106 = fmul double %105, %96
  %107 = extractelement <2 x double> %82, i64 1
  %108 = call double @llvm.fmuladd.f64(double %94, double %107, double %106)
  %109 = getelementptr inbounds i8, ptr %0, i64 32
  store double %108, ptr %109, align 8, !tbaa !5
  %110 = fmul double %91, %96
  %111 = call double @llvm.fmuladd.f64(double %94, double %89, double %110)
  br label %119

112:                                              ; preds = %3
  %113 = load ptr, ptr @stderr, align 8, !tbaa !9
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.Mat3d_rotateSelfAboutXYZAxis, i32 noundef 847) #8
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.4, i32 noundef %1) #8
  %117 = load ptr, ptr @stderr, align 8, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef nonnull @.str.3) #8
  call void @print_trace() #7
  call void @exit(i32 noundef 1) #9
  unreachable

119:                                              ; preds = %77, %44, %6
  %.sink24 = phi i64 [ 40, %77 ], [ 64, %44 ], [ 64, %6 ]
  %.sink = phi double [ %111, %77 ], [ %76, %44 ], [ %43, %6 ]
  %120 = getelementptr inbounds i8, ptr %0, i64 %.sink24
  store double %.sink, ptr %120, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  ret void
}

; 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { cold 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass