; LLVM IR from Rhoban/IKWalk :: LegIK.ll (ZN5LegIK7Frame3D10from_eulerEddd)

; 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.LegIK::Frame3D" = type { %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl" }
%"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl" = type { %"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.LegIK::Vector3D" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5LegIK7Frame3D10from_eulerEddd(ptr dead_on_unwind noalias writable sret(%"class.LegIK::Frame3D") align 8 %0, double noundef %1, double noundef %2, double noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i1, align 1
  %10 = alloca %"class.LegIK::Vector3D", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.LegIK::Vector3D", align 8
  %14 = alloca %"class.LegIK::Vector3D", align 8
  store ptr %0, ptr %5, align 8
  store double %1, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !5
  store i1 false, ptr %9, align 1
  call void @_ZN5LegIK7Frame3DC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  %15 = load double, ptr %8, align 8, !tbaa !5
  %16 = call double @cos(double noundef %15) #6
  %17 = load double, ptr %6, align 8, !tbaa !5
  %18 = call double @cos(double noundef %17) #6
  %19 = load double, ptr %8, align 8, !tbaa !5
  %20 = call double @sin(double noundef %19) #6
  %21 = load double, ptr %7, align 8, !tbaa !5
  %22 = call double @cos(double noundef %21) #6
  %23 = fmul double %20, %22
  %24 = load double, ptr %6, align 8, !tbaa !5
  %25 = call double @sin(double noundef %24) #6
  %26 = fmul double %23, %25
  %27 = fneg double %26
  %28 = call double @llvm.fmuladd.f64(double %16, double %18, double %27)
  %29 = load double, ptr %8, align 8, !tbaa !5
  %30 = call double @cos(double noundef %29) #6
  %31 = load double, ptr %6, align 8, !tbaa !5
  %32 = call double @sin(double noundef %31) #6
  %33 = load double, ptr %8, align 8, !tbaa !5
  %34 = call double @sin(double noundef %33) #6
  %35 = load double, ptr %7, align 8, !tbaa !5
  %36 = call double @cos(double noundef %35) #6
  %37 = fmul double %34, %36
  %38 = load double, ptr %6, align 8, !tbaa !5
  %39 = call double @cos(double noundef %38) #6
  %40 = fmul double %37, %39
  %41 = call double @llvm.fmuladd.f64(double %30, double %32, double %40)
  %42 = load double, ptr %8, align 8, !tbaa !5
  %43 = call double @sin(double noundef %42) #6
  %44 = load double, ptr %7, align 8, !tbaa !5
  %45 = call double @sin(double noundef %44) #6
  %46 = fmul double %43, %45
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %28, double noundef %41, double noundef %46)
          to label %47 unwind label %107

47:                                               ; preds = %4
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %49 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %50 unwind label %111

50:                                               ; preds = %47
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %51 = load double, ptr %8, align 8, !tbaa !5
  %52 = call double @sin(double noundef %51) #6
  %53 = fneg double %52
  %54 = load double, ptr %6, align 8, !tbaa !5
  %55 = call double @cos(double noundef %54) #6
  %56 = load double, ptr %8, align 8, !tbaa !5
  %57 = call double @cos(double noundef %56) #6
  %58 = load double, ptr %7, align 8, !tbaa !5
  %59 = call double @cos(double noundef %58) #6
  %60 = fmul double %57, %59
  %61 = load double, ptr %6, align 8, !tbaa !5
  %62 = call double @sin(double noundef %61) #6
  %63 = fmul double %60, %62
  %64 = fneg double %63
  %65 = call double @llvm.fmuladd.f64(double %53, double %55, double %64)
  %66 = load double, ptr %8, align 8, !tbaa !5
  %67 = call double @sin(double noundef %66) #6
  %68 = fneg double %67
  %69 = load double, ptr %6, align 8, !tbaa !5
  %70 = call double @sin(double noundef %69) #6
  %71 = load double, ptr %8, align 8, !tbaa !5
  %72 = call double @cos(double noundef %71) #6
  %73 = load double, ptr %7, align 8, !tbaa !5
  %74 = call double @cos(double noundef %73) #6
  %75 = fmul double %72, %74
  %76 = load double, ptr %6, align 8, !tbaa !5
  %77 = call double @cos(double noundef %76) #6
  %78 = fmul double %75, %77
  %79 = call double @llvm.fmuladd.f64(double %68, double %70, double %78)
  %80 = load double, ptr %8, align 8, !tbaa !5
  %81 = call double @cos(double noundef %80) #6
  %82 = load double, ptr %7, align 8, !tbaa !5
  %83 = call double @sin(double noundef %82) #6
  %84 = fmul double %81, %83
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef %65, double noundef %79, double noundef %84)
          to label %85 unwind label %116

85:                                               ; preds = %50
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %88 unwind label %120

88:                                               ; preds = %85
  call void @_ZNSt6vectorIdSaIdEED2Ev(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
  %89 = load double, ptr %7, align 8, !tbaa !5
  %90 = call double @sin(double noundef %89) #6
  %91 = load double, ptr %6, align 8, !tbaa !5
  %92 = call double @sin(double noundef %91) #6
  %93 = fmul double %90, %92
  %94 = load double, ptr %7, align 8, !tbaa !5
  %95 = call double @sin(double noundef %94) #6
  %96 = fneg double %95
  %97 = load double, ptr %6, align 8, !tbaa !5
  %98 = call double @cos(double noundef %97) #6
  %99 = fmul double %96, %98
  %100 = load double, ptr %7, align 8, !tbaa !5
  %101 = call double @cos(double noundef %100) #6
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef %93, double noundef %99, double noundef %101)
          to label %102 unwind label %125

102:                                              ; preds = %88
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #6
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %103, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %105 unwind label %129

105:                                              ; preds = %102
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  store i1 true, ptr %9, align 1
  %106 = load i1, ptr %9, align 1
  br i1 %106, label %135, label %134

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

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

115:                                              ; preds = %111, %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  br label %136

116:                                              ; preds = %50
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %124

120:                                              ; preds = %85
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %124

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

125:                                              ; preds = %88
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %11, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %12, align 4
  br label %133

129:                                              ; preds = %102
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %11, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %12, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %133

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %136

134:                                              ; preds = %105
  call void @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %135

135:                                              ; preds = %134, %105
  ret void

136:                                              ; preds = %133, %124, %115
  call void @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %11, align 8
  %139 = load i32, ptr %12, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_ZN5LegIK8Vector3DC1Eddd(ptr, double, double, double)

declare void @_ZN5LegIK7Frame3DC1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { inlinehint 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 #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 = !{!"double", !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.LegIK::Frame3D" = type { %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl" }
%"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl" = type { %"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LegIK::Vector3D, std::allocator<LegIK::Vector3D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.LegIK::Vector3D" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5LegIK7Frame3D10from_eulerEddd(ptr dead_on_unwind noalias writable sret(%"class.LegIK::Frame3D") align 8 %0, double noundef %1, double noundef %2, double noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.LegIK::Vector3D", align 8
  %6 = alloca %"class.LegIK::Vector3D", align 8
  %7 = alloca %"class.LegIK::Vector3D", align 8
  tail call void @_ZN5LegIK7Frame3DC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %8 = tail call double @cos(double noundef %3) #6
  %9 = tail call double @cos(double noundef %1) #6
  %10 = tail call double @sin(double noundef %3) #6
  %11 = tail call double @cos(double noundef %2) #6
  %12 = tail call double @sin(double noundef %1) #6
  %13 = fneg double %10
  %14 = fmul double %11, %13
  %15 = fmul double %14, %12
  %16 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %15)
  %17 = tail call double @cos(double noundef %3) #6
  %18 = tail call double @sin(double noundef %1) #6
  %19 = tail call double @sin(double noundef %3) #6
  %20 = tail call double @cos(double noundef %2) #6
  %21 = fmul double %19, %20
  %22 = tail call double @cos(double noundef %1) #6
  %23 = fmul double %21, %22
  %24 = tail call double @llvm.fmuladd.f64(double %17, double %18, double %23)
  %25 = tail call double @sin(double noundef %3) #6
  %26 = tail call double @sin(double noundef %2) #6
  %27 = fmul double %25, %26
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef %16, double noundef %24, double noundef %27)
          to label %28 unwind label %70

28:                                               ; preds = %4
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %31 unwind label %72

31:                                               ; preds = %28
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %32 = call double @sin(double noundef %3) #6
  %33 = fneg double %32
  %34 = call double @cos(double noundef %1) #6
  %35 = call double @cos(double noundef %3) #6
  %36 = call double @cos(double noundef %2) #6
  %37 = call double @sin(double noundef %1) #6
  %38 = fneg double %35
  %39 = fmul double %36, %38
  %40 = fmul double %39, %37
  %41 = call double @llvm.fmuladd.f64(double %33, double %34, double %40)
  %42 = call double @sin(double noundef %3) #6
  %43 = fneg double %42
  %44 = call double @sin(double noundef %1) #6
  %45 = call double @cos(double noundef %3) #6
  %46 = call double @cos(double noundef %2) #6
  %47 = fmul double %45, %46
  %48 = call double @cos(double noundef %1) #6
  %49 = fmul double %47, %48
  %50 = call double @llvm.fmuladd.f64(double %43, double %44, double %49)
  %51 = call double @cos(double noundef %3) #6
  %52 = call double @sin(double noundef %2) #6
  %53 = fmul double %51, %52
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef %41, double noundef %50, double noundef %53)
          to label %54 unwind label %75

54:                                               ; preds = %31
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %57 unwind label %77

57:                                               ; preds = %54
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %58 = call double @sin(double noundef %2) #6
  %59 = call double @sin(double noundef %1) #6
  %60 = fmul double %58, %59
  %61 = call double @sin(double noundef %2) #6
  %62 = fneg double %61
  %63 = call double @cos(double noundef %1) #6
  %64 = fmul double %63, %62
  %65 = call double @cos(double noundef %2) #6
  invoke void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef %60, double noundef %64, double noundef %65)
          to label %66 unwind label %80

66:                                               ; preds = %57
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #6
  %68 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5LegIK8Vector3DaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %69 unwind label %82

69:                                               ; preds = %66
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  ret void

70:                                               ; preds = %4
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %28
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %74

74:                                               ; preds = %72, %70
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %85

75:                                               ; preds = %31
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %54
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %79

79:                                               ; preds = %77, %75
  %.pn36 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %85

80:                                               ; preds = %57
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %66
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %84

84:                                               ; preds = %82, %80
  %.pn38 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %85

85:                                               ; preds = %84, %79, %74
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %84 ], [ %.pn36, %79 ], [ %.pn, %74 ]
  call void @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  resume { ptr, i32 } %.pn38.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5LegIK8Vector3DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare void @_ZN5LegIK8Vector3DC1Eddd(ptr, double, double, double) local_unnamed_addr

declare void @_ZN5LegIK7Frame3DC1Ev(ptr) local_unnamed_addr

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