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

; 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_addConstToDiag(ptr noundef, double noundef) #1

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #2

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

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

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

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

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

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

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

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

declare void @Vec3d_set(ptr noundef, double noundef, double noundef, double noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @Mat3d_slerp(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca [3 x [3 x double]], align 16
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca [3 x [3 x double]], align 16
  %13 = alloca [3 x double], align 16
  %14 = alloca [3 x [3 x double]], align 16
  %15 = alloca [3 x [3 x double]], align 16
  %16 = alloca [3 x [3 x double]], align 16
  %17 = alloca [3 x [3 x double]], align 16
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %20 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @Mat3d_mulTranspose(ptr noundef %20, ptr noundef %21, ptr noundef %22)
  %23 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  %24 = getelementptr inbounds [3 x double], ptr %23, i64 0, i64 0
  %25 = load double, ptr %24, align 16, !tbaa !9
  %26 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 1
  %27 = getelementptr inbounds [3 x double], ptr %26, i64 0, i64 1
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fadd double %25, %28
  %30 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 2
  %31 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 2
  %32 = load double, ptr %31, align 16, !tbaa !9
  %33 = fadd double %29, %32
  %34 = fsub double %33, 1.000000e+00
  %35 = fdiv double %34, 2.000000e+00
  %36 = call double @Math_acos(double noundef %35)
  store double %36, ptr %10, align 8, !tbaa !9
  %37 = load double, ptr %10, align 8, !tbaa !9
  %38 = fcmp oeq double %37, 0.000000e+00
  br i1 %38, label %39, label %42

39:                                               ; preds = %4
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  call void @Mat3d_copy(ptr noundef %40, ptr noundef %41)
  store i32 1, ptr %11, align 4
  br label %126

42:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #5
  %43 = getelementptr inbounds [3 x [3 x double]], ptr %12, i64 0, i64 0
  %44 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  call void @Mat3d_transpose(ptr noundef %43, ptr noundef %44)
  %45 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 0
  %46 = getelementptr inbounds [3 x [3 x double]], ptr %12, i64 0, i64 0
  %47 = getelementptr inbounds [3 x [3 x double]], ptr %9, i64 0, i64 0
  call void @Mat3d_sub(ptr noundef %45, ptr noundef %46, ptr noundef %47)
  %48 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 0
  %49 = load double, ptr %10, align 8, !tbaa !9
  %50 = call double @sin(double noundef %49) #5
  %51 = fmul double 2.000000e+00, %50
  %52 = fdiv double 1.000000e+00, %51
  call void @Mat3d_constMulSelf(ptr noundef %48, double noundef %52)
  %53 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  %54 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 2
  %55 = getelementptr inbounds [3 x double], ptr %54, i64 0, i64 1
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 0
  %58 = getelementptr inbounds [3 x double], ptr %57, i64 0, i64 2
  %59 = load double, ptr %58, align 16, !tbaa !9
  %60 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 1
  %61 = getelementptr inbounds [3 x double], ptr %60, i64 0, i64 0
  %62 = load double, ptr %61, align 8, !tbaa !9
  call void @Vec3d_set(ptr noundef %53, double noundef %56, double noundef %59, double noundef %62)
  %63 = getelementptr inbounds [3 x [3 x double]], ptr %15, i64 0, i64 0
  %64 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  call void @Vec3d_outerProductSelf(ptr noundef %63, ptr noundef %64)
  %65 = getelementptr inbounds [3 x [3 x double]], ptr %15, i64 0, i64 0
  call void @Mat3d_addConstToDiag(ptr noundef %65, double noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %116, %42
  %67 = load i32, ptr %18, align 4, !tbaa !11
  %68 = icmp slt i32 %67, 3
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %119

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

71:                                               ; preds = %112, %70
  %72 = load i32, ptr %19, align 4, !tbaa !11
  %73 = icmp slt i32 %72, 3
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %115

75:                                               ; preds = %71
  %76 = load i32, ptr %18, align 4, !tbaa !11
  %77 = load i32, ptr %19, align 4, !tbaa !11
  %78 = icmp eq i32 %76, %77
  %79 = zext i1 %78 to i64
  %80 = select i1 %78, double 1.000000e+00, double 0.000000e+00
  %81 = load i32, ptr %18, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [3 x [3 x double]], ptr %14, i64 0, i64 %82
  %84 = load i32, ptr %19, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [3 x double], ptr %83, i64 0, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !9
  %88 = load double, ptr %10, align 8, !tbaa !9
  %89 = load double, ptr %8, align 8, !tbaa !9
  %90 = fmul double %88, %89
  %91 = call double @sin(double noundef %90) #5
  %92 = call double @llvm.fmuladd.f64(double %87, double %91, double %80)
  %93 = load i32, ptr %18, align 4, !tbaa !11
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [3 x [3 x double]], ptr %15, i64 0, i64 %94
  %96 = load i32, ptr %19, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [3 x double], ptr %95, i64 0, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !9
  %100 = load double, ptr %10, align 8, !tbaa !9
  %101 = load double, ptr %8, align 8, !tbaa !9
  %102 = fmul double %100, %101
  %103 = call double @cos(double noundef %102) #5
  %104 = fsub double 1.000000e+00, %103
  %105 = call double @llvm.fmuladd.f64(double %99, double %104, double %92)
  %106 = load i32, ptr %18, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 %107
  %109 = load i32, ptr %19, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [3 x double], ptr %108, i64 0, i64 %110
  store double %105, ptr %111, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %75
  %113 = load i32, ptr %19, align 4, !tbaa !11
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %19, align 4, !tbaa !11
  br label %71, !llvm.loop !13

115:                                              ; preds = %74
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %18, align 4, !tbaa !11
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %18, align 4, !tbaa !11
  br label %66, !llvm.loop !15

119:                                              ; preds = %69
  %120 = getelementptr inbounds [3 x [3 x double]], ptr %17, i64 0, i64 0
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  call void @Mat3d_transpose(ptr noundef %120, ptr noundef %121)
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds [3 x [3 x double]], ptr %17, i64 0, i64 0
  %124 = getelementptr inbounds [3 x [3 x double]], ptr %16, i64 0, i64 0
  call void @Mat3d_mul(ptr noundef %122, ptr noundef %123, ptr noundef %124)
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  call void @Mat3d_transposeSelf(ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #5
  store i32 0, ptr %11, align 4
  br label %126

126:                                              ; preds = %119, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #5
  %127 = load i32, ptr %11, align 4
  switch i32 %127, label %129 [
    i32 0, label %128
    i32 1, label %128
  ]

128:                                              ; preds = %126, %126
  ret void

129:                                              ; preds = %126
  unreachable
}

declare double @Math_acos(double noundef) #4

declare void @Vec3d_outerProductSelf(ptr noundef, ptr noundef) #4

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

; Function Attrs: mustprogress 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_addConstToDiag(ptr noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @Mat3d_mul(ptr noundef, 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) #3

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

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

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

declare void @Vec3d_set(ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @Mat3d_slerp(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3) local_unnamed_addr #1 {
  %5 = alloca [3 x [3 x double]], align 16
  %6 = alloca [3 x [3 x double]], align 16
  %7 = alloca [3 x double], align 16
  %8 = alloca [3 x [3 x double]], align 16
  %9 = alloca [3 x [3 x double]], align 16
  %10 = alloca [3 x [3 x double]], align 16
  %11 = alloca [3 x [3 x double]], align 16
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #5
  call void @Mat3d_mulTranspose(ptr noundef nonnull %5, ptr noundef %2, ptr noundef %1)
  %12 = load double, ptr %5, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %5, i64 32
  %14 = load double, ptr %13, align 16, !tbaa !5
  %15 = fadd double %12, %14
  %16 = getelementptr inbounds i8, ptr %5, i64 64
  %17 = load double, ptr %16, align 16, !tbaa !5
  %18 = fadd double %15, %17
  %19 = fadd double %18, -1.000000e+00
  %20 = fmul double %19, 5.000000e-01
  %21 = call double @Math_acos(double noundef %20) #5
  %22 = fcmp oeq double %21, 0.000000e+00
  br i1 %22, label %23, label %.preheader

23:                                               ; preds = %4
  call void @Mat3d_copy(ptr noundef %0, ptr noundef %1)
  br label %118

.preheader:                                       ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #5
  call void @Mat3d_transpose(ptr noundef nonnull %6, ptr noundef nonnull %5)
  call void @Mat3d_sub(ptr noundef nonnull %8, ptr noundef nonnull %6, ptr noundef nonnull %5)
  %24 = call double @sin(double noundef %21) #5
  %25 = fmul double %24, 2.000000e+00
  %26 = fdiv double 1.000000e+00, %25
  call void @Mat3d_constMulSelf(ptr noundef nonnull %8, double noundef %26)
  %27 = getelementptr inbounds i8, ptr %8, i64 56
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %8, i64 16
  %30 = load double, ptr %29, align 16, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %8, i64 24
  %32 = load double, ptr %31, align 8, !tbaa !5
  call void @Vec3d_set(ptr noundef nonnull %7, double noundef %28, double noundef %30, double noundef %32) #5
  call void @Vec3d_outerProductSelf(ptr noundef nonnull %9, ptr noundef nonnull %7) #5
  call void @Mat3d_addConstToDiag(ptr noundef nonnull %9, double noundef -1.000000e+00)
  %33 = fmul double %21, %3
  %34 = load double, ptr %8, align 16, !tbaa !5
  %35 = call double @sin(double noundef %33) #5
  %36 = call double @llvm.fmuladd.f64(double %34, double %35, double 1.000000e+00)
  %37 = load double, ptr %9, align 16, !tbaa !5
  %38 = call double @cos(double noundef %33) #5
  %39 = fsub double 1.000000e+00, %38
  %40 = call double @llvm.fmuladd.f64(double %37, double %39, double %36)
  store double %40, ptr %10, align 16, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %8, i64 8
  %42 = load double, ptr %41, align 8, !tbaa !5
  %43 = call double @sin(double noundef %33) #5
  %44 = call double @llvm.fmuladd.f64(double %42, double %43, double 0.000000e+00)
  %45 = getelementptr inbounds i8, ptr %9, i64 8
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = call double @cos(double noundef %33) #5
  %48 = fsub double 1.000000e+00, %47
  %49 = call double @llvm.fmuladd.f64(double %46, double %48, double %44)
  %50 = getelementptr inbounds i8, ptr %10, i64 8
  store double %49, ptr %50, align 8, !tbaa !5
  %51 = load double, ptr %29, align 16, !tbaa !5
  %52 = call double @sin(double noundef %33) #5
  %53 = call double @llvm.fmuladd.f64(double %51, double %52, double 0.000000e+00)
  %54 = getelementptr inbounds i8, ptr %9, i64 16
  %55 = load double, ptr %54, align 16, !tbaa !5
  %56 = call double @cos(double noundef %33) #5
  %57 = fsub double 1.000000e+00, %56
  %58 = call double @llvm.fmuladd.f64(double %55, double %57, double %53)
  %59 = getelementptr inbounds i8, ptr %10, i64 16
  store double %58, ptr %59, align 16, !tbaa !5
  %60 = load double, ptr %31, align 8, !tbaa !5
  %61 = call double @sin(double noundef %33) #5
  %62 = call double @llvm.fmuladd.f64(double %60, double %61, double 0.000000e+00)
  %63 = getelementptr inbounds i8, ptr %9, i64 24
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = call double @cos(double noundef %33) #5
  %66 = fsub double 1.000000e+00, %65
  %67 = call double @llvm.fmuladd.f64(double %64, double %66, double %62)
  %68 = getelementptr inbounds i8, ptr %10, i64 24
  store double %67, ptr %68, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %8, i64 32
  %70 = load double, ptr %69, align 16, !tbaa !5
  %71 = call double @sin(double noundef %33) #5
  %72 = call double @llvm.fmuladd.f64(double %70, double %71, double 1.000000e+00)
  %73 = getelementptr inbounds i8, ptr %9, i64 32
  %74 = load double, ptr %73, align 16, !tbaa !5
  %75 = call double @cos(double noundef %33) #5
  %76 = fsub double 1.000000e+00, %75
  %77 = call double @llvm.fmuladd.f64(double %74, double %76, double %72)
  %78 = getelementptr inbounds i8, ptr %10, i64 32
  store double %77, ptr %78, align 16, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %8, i64 40
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = call double @sin(double noundef %33) #5
  %82 = call double @llvm.fmuladd.f64(double %80, double %81, double 0.000000e+00)
  %83 = getelementptr inbounds i8, ptr %9, i64 40
  %84 = load double, ptr %83, align 8, !tbaa !5
  %85 = call double @cos(double noundef %33) #5
  %86 = fsub double 1.000000e+00, %85
  %87 = call double @llvm.fmuladd.f64(double %84, double %86, double %82)
  %88 = getelementptr inbounds i8, ptr %10, i64 40
  store double %87, ptr %88, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %8, i64 48
  %90 = load double, ptr %89, align 16, !tbaa !5
  %91 = call double @sin(double noundef %33) #5
  %92 = call double @llvm.fmuladd.f64(double %90, double %91, double 0.000000e+00)
  %93 = getelementptr inbounds i8, ptr %9, i64 48
  %94 = load double, ptr %93, align 16, !tbaa !5
  %95 = call double @cos(double noundef %33) #5
  %96 = fsub double 1.000000e+00, %95
  %97 = call double @llvm.fmuladd.f64(double %94, double %96, double %92)
  %98 = getelementptr inbounds i8, ptr %10, i64 48
  store double %97, ptr %98, align 16, !tbaa !5
  %99 = load double, ptr %27, align 8, !tbaa !5
  %100 = call double @sin(double noundef %33) #5
  %101 = call double @llvm.fmuladd.f64(double %99, double %100, double 0.000000e+00)
  %102 = getelementptr inbounds i8, ptr %9, i64 56
  %103 = load double, ptr %102, align 8, !tbaa !5
  %104 = call double @cos(double noundef %33) #5
  %105 = fsub double 1.000000e+00, %104
  %106 = call double @llvm.fmuladd.f64(double %103, double %105, double %101)
  %107 = getelementptr inbounds i8, ptr %10, i64 56
  store double %106, ptr %107, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %8, i64 64
  %109 = load double, ptr %108, align 16, !tbaa !5
  %110 = call double @sin(double noundef %33) #5
  %111 = call double @llvm.fmuladd.f64(double %109, double %110, double 1.000000e+00)
  %112 = getelementptr inbounds i8, ptr %9, i64 64
  %113 = load double, ptr %112, align 16, !tbaa !5
  %114 = call double @cos(double noundef %33) #5
  %115 = fsub double 1.000000e+00, %114
  %116 = call double @llvm.fmuladd.f64(double %113, double %115, double %111)
  %117 = getelementptr inbounds i8, ptr %10, i64 64
  store double %116, ptr %117, align 16, !tbaa !5
  call void @Mat3d_transpose(ptr noundef nonnull %11, ptr noundef %1)
  call void @Mat3d_mul(ptr noundef %0, ptr noundef nonnull %11, ptr noundef nonnull %10)
  call void @Mat3d_transposeSelf(ptr noundef %0)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  br label %118

118:                                              ; preds = %.preheader, %23
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #5
  ret void
}

declare double @Math_acos(double noundef) local_unnamed_addr #4

declare void @Vec3d_outerProductSelf(ptr noundef, ptr noundef) local_unnamed_addr #4

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 = { mustprogress nofree nounwind willreturn memory(write) "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 speculatable willreturn memory(none) }
attributes #4 = { "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 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass