; LLVM IR from atlantis13579/Riemann :: Src/RigidBodyDynamics (KinematicsTree)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.Riemann::_Node" = type { i32, %"class.std::vector.19" }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::KinematicsTree" = type { %"class.Riemann::KinematicsDriver", float, i8, %"class.std::__cxx11::basic_string", %"class.std::vector" }
%"class.Riemann::KinematicsDriver" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::KeyframeKinematics *, std::allocator<Riemann::KeyframeKinematics *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::AnimTreeData" = type { %"class.std::vector.24" }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<Riemann::AnimTreeData::Channel, std::allocator<Riemann::AnimTreeData::Channel>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::AnimTreeData::Channel, std::allocator<Riemann::AnimTreeData::Channel>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::AnimTreeData::Channel, std::allocator<Riemann::AnimTreeData::Channel>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::AnimTreeData::Channel, std::allocator<Riemann::AnimTreeData::Channel>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Riemann::AnimTreeData::Channel" = type <{ %"class.std::__cxx11::basic_string", %"class.std::vector.29", %"class.std::vector.29", %"class.std::vector.34", i32, [4 x i8] }>
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<std::pair<int, Maths::TVector3<float>>, std::allocator<std::pair<int, Maths::TVector3<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, Maths::TVector3<float>>, std::allocator<std::pair<int, Maths::TVector3<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, Maths::TVector3<float>>, std::allocator<std::pair<int, Maths::TVector3<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, Maths::TVector3<float>>, std::allocator<std::pair<int, Maths::TVector3<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<std::pair<int, Maths::Quaternion>, std::allocator<std::pair<int, Maths::Quaternion>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, Maths::Quaternion>, std::allocator<std::pair<int, Maths::Quaternion>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, Maths::Quaternion>, std::allocator<std::pair<int, Maths::Quaternion>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, Maths::Quaternion>, std::allocator<std::pair<int, Maths::Quaternion>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::KeyframeKinematics" = type <{ %"class.Riemann::RigidBodyKinematics.base", [6 x i8], %"class.Riemann::KeyFrameAnimation", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.Riemann::RigidBodyKinematics.base" = type { %"class.Riemann::RigidBody.base" }
%"class.Riemann::RigidBody.base" = type <{ ptr, %"class.std::vector.3", i8, [7 x i8], i64, %"class.Maths::TVector3", %"class.Maths::Quaternion", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, %"class.Maths::Matrix3", i16 }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Riemann::KeyFrameAnimation" = type <{ %"struct.Riemann::Timeline", %"struct.Riemann::Timeline.8", %"class.std::vector.9", %"class.std::vector.14", i8, [7 x i8] }>
%"struct.Riemann::Timeline" = type { float, i32, i8 }
%"struct.Riemann::Timeline.8" = type { float, i32, i8 }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::TVector3<float>>, std::allocator<Riemann::Keyframe<Maths::TVector3<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Keyframe<Maths::Quaternion>, std::allocator<Riemann::Keyframe<Maths::Quaternion>>>::_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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann14KinematicsTree13BuildFlatTreeEPNS_12AnimTreeDataE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.Riemann::_Node", align 8
  %8 = alloca %"class.std::vector.42", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.Riemann::_Node", align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  %20 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  call void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.Riemann::AnimTreeData", ptr %21, i32 0, i32 0
  %23 = call noundef zeroext i1 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  br i1 %23, label %24, label %25

24:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %155

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.Riemann::AnimTreeData", ptr %26, i32 0, i32 0
  %28 = call noundef i64 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = trunc i64 %28 to i32
  store i32 %29, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  invoke void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %31)
          to label %32 unwind label %38

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %106, %32
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  store i32 2, ptr %12, align 4
  br label %110

38:                                               ; preds = %113, %25
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %154

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  %43 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %43)
          to label %44 unwind label %64

44:                                               ; preds = %42
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %46) #5
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7Riemann5_NodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.Riemann::AnimTreeData", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %52) #5
  store ptr %53, ptr %14, align 8, !tbaa !5
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.Riemann::AnimTreeData::Channel", ptr %54, i32 0, i32 4
  %56 = load i32, ptr %55, align 8, !tbaa !11
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %58, label %72

58:                                               ; preds = %44
  %59 = getelementptr inbounds %"struct.Riemann::_Node", ptr %7, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %61) #5
  store ptr %62, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN7Riemann5_NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %63 unwind label %68

63:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %102

64:                                               ; preds = %42
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %112

68:                                               ; preds = %58
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %109

72:                                               ; preds = %44
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.Riemann::AnimTreeData::Channel", ptr %73, i32 0, i32 4
  %75 = load i32, ptr %74, align 8, !tbaa !11
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = icmp eq i32 %75, %76
  br i1 %77, label %84, label %78

78:                                               ; preds = %72
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.Riemann::AnimTreeData::Channel", ptr %79, i32 0, i32 4
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = icmp sge i32 %81, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %78, %72
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %103

85:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.Riemann::AnimTreeData::Channel", ptr %86, i32 0, i32 4
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %89) #5
  store ptr %90, ptr %16, align 8, !tbaa !5
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.Riemann::_Node", ptr %91, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %93 = load i32, ptr %11, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %94) #5
  store ptr %95, ptr %17, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN7Riemann5_NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %96 unwind label %97

96:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %101

97:                                               ; preds = %85
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %109

101:                                              ; preds = %96
  br label %102

102:                                              ; preds = %101, %63
  store i32 0, ptr %12, align 4
  br label %103

103:                                              ; preds = %102, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %104 = load i32, ptr %12, align 4
  switch i32 %104, label %110 [
    i32 0, label %105
  ]

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %11, align 4, !tbaa !9
  br label %33, !llvm.loop !24

109:                                              ; preds = %97, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %112

110:                                              ; preds = %103, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %111 = load i32, ptr %12, align 4
  switch i32 %111, label %153 [
    i32 2, label %113
  ]

112:                                              ; preds = %109, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %154

113:                                              ; preds = %110
  %114 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN7Riemann8_FlattenERSt6vectorIPNS_18KeyframeKinematicsESaIS2_EEiPKNS_5_NodeEPKNS_12AnimTreeDataE(ptr noundef nonnull align 8 dereferenceable(24) %114, i32 noundef -1, ptr noundef %7, ptr noundef %115)
          to label %116 unwind label %38

116:                                              ; preds = %113
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  %119 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  %120 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #5
  %121 = trunc i64 %120 to i32
  %122 = icmp ne i32 %118, %121
  br i1 %122, label %123, label %125

123:                                              ; preds = %116
  %124 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  call void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #5
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %153

125:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 1, ptr %18, align 8, !tbaa !26
  br label %126

126:                                              ; preds = %147, %125
  %127 = load i64, ptr %18, align 8, !tbaa !26
  %128 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  %129 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #5
  %130 = icmp ult i64 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %126
  store i32 5, ptr %12, align 4
  br label %150

132:                                              ; preds = %126
  %133 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  %134 = load i64, ptr %18, align 8, !tbaa !26
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %134) #5
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.Riemann::KeyframeKinematics", ptr %136, i32 0, i32 2
  %138 = invoke noundef zeroext i1 @_ZNK7Riemann17KeyFrameAnimation13CheckAnimDataEv(ptr noundef nonnull align 8 dereferenceable(73) %137)
          to label %139 unwind label %142

139:                                              ; preds = %132
  br i1 %138, label %146, label %140

140:                                              ; preds = %139
  %141 = getelementptr inbounds %"class.Riemann::KinematicsTree", ptr %19, i32 0, i32 4
  call void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %141) #5
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %150

142:                                              ; preds = %132
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %154

146:                                              ; preds = %139
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %18, align 8, !tbaa !26
  %149 = add i64 %148, 1
  store i64 %149, ptr %18, align 8, !tbaa !26
  br label %126, !llvm.loop !27

150:                                              ; preds = %140, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %151 = load i32, ptr %12, align 4
  switch i32 %151, label %153 [
    i32 5, label %152
  ]

152:                                              ; preds = %150
  store i1 true, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %153

153:                                              ; preds = %152, %150, %123, %110
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %155

154:                                              ; preds = %142, %112, %38
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %157

155:                                              ; preds = %153, %24
  %156 = load i1, ptr %3, align 1
  ret i1 %156

157:                                              ; preds = %154
  %158 = load ptr, ptr %9, align 8
  %159 = load i32, ptr %10, align 4
  %160 = insertvalue { ptr, i32 } poison, ptr %158, 0
  %161 = insertvalue { ptr, i32 } %160, i32 %159, 1
  resume { ptr, i32 } %161
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN7Riemann5_NodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

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

declare noundef zeroext i1 @_ZNK7Riemann17KeyFrameAnimation13CheckAnimDataEv(ptr noundef nonnull align 8 dereferenceable(73)) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 104}
!12 = !{!"_ZTSN7Riemann12AnimTreeData7ChannelE", !13, i64 0, !16, i64 32, !16, i64 56, !20, i64 80, !10, i64 104}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorISt4pairIiN5Maths8TVector3IfEEESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorISt4pairIiN5Maths10QuaternionEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!15, !15, i64 0}
!27 = distinct !{!27, !25}


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

%"struct.Riemann::_Node" = type { i32, %"class.std::vector.19" }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::_Node *, std::allocator<Riemann::_Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::_Node, std::allocator<Riemann::_Node>>::_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

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

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

; 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 uwtable
declare dso_local void @_ZN7Riemann8_FlattenERSt6vectorIPNS_18KeyframeKinematicsESaIS2_EEiPKNS_5_NodeEPKNS_12AnimTreeDataE(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann14KinematicsTree13BuildFlatTreeEPNS_12AnimTreeDataE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.Riemann::_Node", align 8
  %4 = alloca %"class.std::vector.42", align 8
  %5 = alloca %"struct.Riemann::_Node", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %9 = tail call noundef zeroext i1 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  br i1 %9, label %57, label %10

10:                                               ; preds = %2
  %11 = tail call noundef i64 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %12 = trunc i64 %11 to i32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %sext = shl i64 %11, 32
  %13 = ashr exact i64 %sext, 32
  invoke void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %13)
          to label %.preheader50 unwind label %15

.preheader50:                                     ; preds = %10
  %.not4454 = icmp sgt i32 %12, 0
  br i1 %.not4454, label %.lr.ph, label %.critedge49

.lr.ph:                                           ; preds = %.preheader50
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %wide.trip.count = and i64 %11, 2147483647
  br label %17

15:                                               ; preds = %.critedge49, %10
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %56

17:                                               ; preds = %.lr.ph, %40
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %40 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  %18 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %18)
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #5
  %20 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7Riemann5_NodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %21 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #5
  %22 = getelementptr inbounds i8, ptr %21, i64 104
  %23 = load i32, ptr %22, align 8, !tbaa !5
  %24 = icmp slt i32 %23, 0
  br i1 %24, label %25, label %30

25:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #5
  store ptr %26, ptr %6, align 8, !tbaa !22
  invoke void @_ZNSt6vectorIPN7Riemann5_NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %27 unwind label %28

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %40

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %56

30:                                               ; preds = %17
  %31 = zext nneg i32 %23 to i64
  %32 = icmp ne i64 %indvars.iv, %31
  %.not = icmp slt i32 %23, %12
  %or.cond = and i1 %32, %.not
  br i1 %or.cond, label %33, label %.critedge

33:                                               ; preds = %30
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %31) #5
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #5
  store ptr %36, ptr %7, align 8, !tbaa !22
  invoke void @_ZNSt6vectorIPN7Riemann5_NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %37 unwind label %38

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %40

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %56

40:                                               ; preds = %37, %27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge49, label %17, !llvm.loop !23

.critedge49:                                      ; preds = %40, %.preheader50
  invoke void @_ZN7Riemann8_FlattenERSt6vectorIPNS_18KeyframeKinematicsESaIS2_EEiPKNS_5_NodeEPKNS_12AnimTreeDataE(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef -1, ptr noundef nonnull %3, ptr noundef nonnull %1)
          to label %41 unwind label %15

41:                                               ; preds = %.critedge49
  %42 = add nsw i32 %12, 1
  %43 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %44 = trunc i64 %43 to i32
  %.not45 = icmp eq i32 %42, %44
  br i1 %.not45, label %.preheader, label %.critedge.sink.split

.preheader:                                       ; preds = %41
  %45 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not4856 = icmp ult i64 %45, 2
  br i1 %.not4856, label %.critedge, label %.lr.ph58

46:                                               ; preds = %53
  %47 = add nuw i64 %.057, 1
  %48 = call noundef i64 @_ZNKSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not48.not = icmp ult i64 %47, %48
  br i1 %.not48.not, label %.lr.ph58, label %.critedge, !llvm.loop !25

.lr.ph58:                                         ; preds = %.preheader, %46
  %.057 = phi i64 [ %47, %46 ], [ 1, %.preheader ]
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.057) #5
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = getelementptr inbounds i8, ptr %50, i64 160
  %52 = invoke noundef zeroext i1 @_ZNK7Riemann17KeyFrameAnimation13CheckAnimDataEv(ptr noundef nonnull align 8 dereferenceable(73) %51)
          to label %53 unwind label %54

53:                                               ; preds = %.lr.ph58
  br i1 %52, label %46, label %.critedge.sink.split

54:                                               ; preds = %.lr.ph58
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %56

.critedge.sink.split:                             ; preds = %53, %41
  call void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %.critedge

.critedge:                                        ; preds = %30, %46, %.critedge.sink.split, %.preheader
  %.4 = phi i1 [ true, %.preheader ], [ false, %.critedge.sink.split ], [ true, %46 ], [ false, %30 ]
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %57

56:                                               ; preds = %28, %38, %54, %15
  %.pn46 = phi { ptr, i32 } [ %55, %54 ], [ %16, %15 ], [ %29, %28 ], [ %39, %38 ]
  call void @_ZNSt6vectorIN7Riemann5_NodeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN7Riemann5_NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn46

57:                                               ; preds = %2, %.critedge
  %.5 = phi i1 [ %.4, %.critedge ], [ false, %2 ]
  ret i1 %.5
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN7Riemann18KeyframeKinematicsESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN7Riemann12AnimTreeData7ChannelESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann5_NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN7Riemann5_NodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

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

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

declare noundef zeroext i1 @_ZNK7Riemann17KeyFrameAnimation13CheckAnimDataEv(ptr noundef nonnull align 8 dereferenceable(73)) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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, !21, i64 104}
!6 = !{!"_ZTSN7Riemann12AnimTreeData7ChannelE", !7, i64 0, !13, i64 32, !13, i64 56, !17, i64 80, !21, i64 104}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt6vectorISt4pairIiN5Maths8TVector3IfEEESaIS4_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths8TVector3IfEEESaIS4_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!17 = !{!"_ZTSSt6vectorISt4pairIiN5Maths10QuaternionEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt4pairIiN5Maths10QuaternionEESaIS3_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!21 = !{!"int", !10, i64 0}
!22 = !{!9, !9, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass