; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/matrix (quatern)

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

%class.Matrix = type { ptr, ptr, i32, i32 }
%class.Quaternion = type { %class.Vector }
%class.Vector = type { %class.Matrix, ptr }

declare void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN10Quaternion7setQuatEdRK6Vector(ptr noundef nonnull align 8 dereferenceable(32), double noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: nounwind
declare void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

declare void @_ZNK6MatrixplERKS_(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK10QuaternionmlERKS_(ptr dead_on_unwind noalias writable sret(%class.Quaternion) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca %class.Vector, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.Vector, align 8
  %12 = alloca %class.Vector, align 8
  %13 = alloca %class.Matrix, align 8
  %14 = alloca %class.Matrix, align 8
  %15 = alloca %class.Matrix, align 8
  %16 = alloca %class.Matrix, align 8
  %17 = alloca %class.Vector, align 8
  %18 = alloca %class.Matrix, align 8
  %19 = alloca %class.Matrix, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  call void @_ZN10QuaternionC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %21 unwind label %61

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %22 unwind label %65

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %23 unwind label %69

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %24 = getelementptr inbounds %class.Quaternion, ptr %20, i32 0, i32 0
  invoke void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %24, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %25 unwind label %73

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %27 unwind label %77

27:                                               ; preds = %25
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %class.Quaternion, ptr %28, i32 0, i32 0
  invoke void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %29, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %30 unwind label %82

30:                                               ; preds = %27
  %31 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %32 unwind label %86

32:                                               ; preds = %30
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  invoke void (ptr, ptr, ptr, ...) @_Z5crossRK6VectorS1_z(ptr dead_on_unwind writable sret(%class.Vector) align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %33 unwind label %91

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %34 = getelementptr inbounds %class.Quaternion, ptr %20, i32 0, i32 0
  %35 = invoke noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %34, i32 noundef 1)
          to label %36 unwind label %95

36:                                               ; preds = %33
  invoke void @_ZNK6MatrixmlEd(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %11, double noundef %35)
          to label %37 unwind label %95

37:                                               ; preds = %36
  invoke void @_ZNK6MatrixplERKS_(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %38 unwind label %99

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.Quaternion, ptr %39, i32 0, i32 0
  %41 = invoke noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %40, i32 noundef 1)
          to label %42 unwind label %103

42:                                               ; preds = %38
  invoke void @_ZNK6MatrixmlEd(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef %41)
          to label %43 unwind label %103

43:                                               ; preds = %42
  invoke void @_ZNK6MatrixplERKS_(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %44 unwind label %107

44:                                               ; preds = %43
  %45 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %46 unwind label %111

46:                                               ; preds = %44
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  %47 = getelementptr inbounds %class.Quaternion, ptr %20, i32 0, i32 0
  %48 = invoke noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %47, i32 noundef 1)
          to label %49 unwind label %120

49:                                               ; preds = %46
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %class.Quaternion, ptr %50, i32 0, i32 0
  %52 = invoke noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %51, i32 noundef 1)
          to label %53 unwind label %120

53:                                               ; preds = %49
  %54 = invoke noundef double @_Z3dotRK6MatrixS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %55 unwind label %120

55:                                               ; preds = %53
  %56 = fneg double %54
  %57 = call double @llvm.fmuladd.f64(double %48, double %52, double %56)
  %58 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN10Quaternion7setQuatEdRK6Vector(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %57, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %59 unwind label %120

59:                                               ; preds = %55
  store i1 true, ptr %7, align 1
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %60 = load i1, ptr %7, align 1
  br i1 %60, label %129, label %128

61:                                               ; preds = %3
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %9, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %10, align 4
  br label %127

65:                                               ; preds = %21
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  br label %126

69:                                               ; preds = %22
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %9, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %10, align 4
  br label %125

73:                                               ; preds = %23
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %81

77:                                               ; preds = %25
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %81

81:                                               ; preds = %77, %73
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %124

82:                                               ; preds = %27
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  br label %90

86:                                               ; preds = %30
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %124

91:                                               ; preds = %32
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %119

95:                                               ; preds = %36, %33
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  br label %118

99:                                               ; preds = %37
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %9, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %10, align 4
  br label %117

103:                                              ; preds = %42, %38
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %9, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %10, align 4
  br label %116

107:                                              ; preds = %43
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %9, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %10, align 4
  br label %115

111:                                              ; preds = %44
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %9, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %10, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %115

115:                                              ; preds = %111, %107
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br label %116

116:                                              ; preds = %115, %103
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %117

117:                                              ; preds = %116, %99
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %118

118:                                              ; preds = %117, %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %119

119:                                              ; preds = %118, %91
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %124

120:                                              ; preds = %55, %53, %49, %46
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  br label %124

124:                                              ; preds = %120, %119, %90, %81
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %125

125:                                              ; preds = %124, %69
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %126

126:                                              ; preds = %125, %65
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %127

127:                                              ; preds = %126, %61
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @_ZN10QuaternionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %130

128:                                              ; preds = %59
  call void @_ZN10QuaternionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %129

129:                                              ; preds = %128, %59
  ret void

130:                                              ; preds = %127
  %131 = load ptr, ptr %9, align 8
  %132 = load i32, ptr %10, align 4
  %133 = insertvalue { ptr, i32 } poison, ptr %131, 0
  %134 = insertvalue { ptr, i32 } %133, i32 %132, 1
  resume { ptr, i32 } %134
}

declare void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare void @_Z5crossRK6VectorS1_z(ptr dead_on_unwind writable sret(%class.Vector) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ...) #0

declare void @_ZNK6MatrixmlEd(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #0

declare noundef double @_Z3dotRK6MatrixS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZN10QuaternionC1Ev(ptr)

declare void @_ZN10QuaternionD1Ev(ptr)

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


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

%class.Matrix = type { ptr, ptr, i32, i32 }
%class.Quaternion = type { %class.Vector }
%class.Vector = type { %class.Matrix, ptr }

declare void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN10Quaternion7setQuatEdRK6Vector(ptr noundef nonnull align 8 dereferenceable(32), double noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: nounwind
declare void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

declare void @_ZNK6MatrixplERKS_(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK10QuaternionmlERKS_(ptr dead_on_unwind noalias writable sret(%class.Quaternion) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Vector, align 8
  %5 = alloca %class.Vector, align 8
  %6 = alloca %class.Vector, align 8
  %7 = alloca %class.Matrix, align 8
  %8 = alloca %class.Matrix, align 8
  %9 = alloca %class.Matrix, align 8
  %10 = alloca %class.Matrix, align 8
  %11 = alloca %class.Vector, align 8
  %12 = alloca %class.Matrix, align 8
  %13 = alloca %class.Matrix, align 8
  tail call void @_ZN10QuaternionC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %14 unwind label %40

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %15 unwind label %42

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  invoke void @_ZN6VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %16 unwind label %44

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %17 unwind label %46

17:                                               ; preds = %16
  %18 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %19 unwind label %48

19:                                               ; preds = %17
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  invoke void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 1)
          to label %20 unwind label %51

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %22 unwind label %53

22:                                               ; preds = %20
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  invoke void (ptr, ptr, ptr, ...) @_Z5crossRK6VectorS1_z(ptr dead_on_unwind nonnull writable sret(%class.Vector) align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %23 unwind label %56

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  %24 = call noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  invoke void @_ZNK6MatrixmlEd(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef %24)
          to label %25 unwind label %58

25:                                               ; preds = %23
  invoke void @_ZNK6MatrixplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %26 unwind label %60

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  %27 = call noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 1)
  invoke void @_ZNK6MatrixmlEd(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %27)
          to label %28 unwind label %62

28:                                               ; preds = %26
  invoke void @_ZNK6MatrixplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %29 unwind label %64

29:                                               ; preds = %28
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6VectoraSERK6Matrix(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %31 unwind label %66

31:                                               ; preds = %29
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  %32 = call noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %33 = call noundef double @_ZNK6VectorclEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 1)
  %34 = invoke noundef double @_Z3dotRK6MatrixS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %35 unwind label %73

35:                                               ; preds = %31
  %36 = fneg double %34
  %37 = call double @llvm.fmuladd.f64(double %32, double %33, double %36)
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN10Quaternion7setQuatEdRK6Vector(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %37, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %39 unwind label %73

39:                                               ; preds = %35
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  ret void

40:                                               ; preds = %3
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %78

42:                                               ; preds = %14
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %77

44:                                               ; preds = %15
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %76

46:                                               ; preds = %16
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %17
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %75

51:                                               ; preds = %19
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %20
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %55

55:                                               ; preds = %53, %51
  %.pn18 = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %75

56:                                               ; preds = %22
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %72

58:                                               ; preds = %23
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %71

60:                                               ; preds = %25
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %70

62:                                               ; preds = %26
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %69

64:                                               ; preds = %28
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

66:                                               ; preds = %29
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %68

68:                                               ; preds = %66, %64
  %.pn20 = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %69

69:                                               ; preds = %68, %62
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %68 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %70

70:                                               ; preds = %69, %60
  %.pn20.pn.pn = phi { ptr, i32 } [ %.pn20.pn, %69 ], [ %61, %60 ]
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %71

71:                                               ; preds = %70, %58
  %.pn20.pn.pn.pn = phi { ptr, i32 } [ %.pn20.pn.pn, %70 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %72

72:                                               ; preds = %71, %56
  %.pn20.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn20.pn.pn.pn, %71 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %75

73:                                               ; preds = %35, %31
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %75

75:                                               ; preds = %73, %72, %55, %50
  %.pn26 = phi { ptr, i32 } [ %74, %73 ], [ %.pn20.pn.pn.pn.pn, %72 ], [ %.pn18, %55 ], [ %.pn, %50 ]
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %76

76:                                               ; preds = %75, %44
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %75 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %77

77:                                               ; preds = %76, %42
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %76 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN6VectorD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %78

78:                                               ; preds = %77, %40
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %77 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN10QuaternionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  resume { ptr, i32 } %.pn26.pn.pn.pn
}

declare void @_ZNK6Matrix8getBlockEiiii(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @_Z5crossRK6VectorS1_z(ptr dead_on_unwind writable sret(%class.Vector) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ...) local_unnamed_addr #0

declare void @_ZNK6MatrixmlEd(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #0

declare noundef double @_Z3dotRK6MatrixS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZN10QuaternionC1Ev(ptr) local_unnamed_addr

declare void @_ZN10QuaternionD1Ev(ptr) local_unnamed_addr

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass