; LLVM IR from Razakhel/RaZ :: src/RaZ/Data (BoundingVolumeHierarchy)

; 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.Raz::BoundingVolumeHierarchyNode" = type { %"class.Raz::AABB", %"class.std::unique_ptr", %"class.std::unique_ptr", %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo" }
%"class.Raz::AABB" = type { %"class.Raz::Shape", %"class.Raz::Vector", %"class.Raz::Vector" }
%"class.Raz::Shape" = type { ptr }
%"class.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x float] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo" = type { %"class.Raz::Triangle", ptr }
%"class.Raz::Triangle" = type <{ %"class.Raz::Shape", %"class.Raz::Vector", %"class.Raz::Vector", %"class.Raz::Vector", [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.7" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::Matrix" = type { %"struct.std::array.22" }
%"struct.std::array.22" = type { [16 x float] }
%"class.__gnu_cxx::__normal_iterator.23" = type { ptr }
%"class.Raz::Vector.36" = type { %"struct.std::array.37" }
%"struct.std::array.37" = type { [4 x float] }
%"class.Raz::BoundingVolumeHierarchy" = type { %"class.Raz::BoundingVolumeHierarchyNode" }
%"struct.Raz::Vertex" = type { %"class.Raz::Vector", %"class.Raz::Vector.34", %"class.Raz::Vector", %"class.Raz::Vector" }
%"class.Raz::Vector.34" = type { %"struct.std::array.35" }
%"struct.std::array.35" = type { [2 x float] }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz23BoundingVolumeHierarchy5buildERKSt6vectorIPNS_6EntityESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.Raz::BoundingVolumeHierarchyNode", align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.Raz::Matrix", align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.23", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.23", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"class.Raz::Triangle", align 8
  %27 = alloca %"class.Raz::Triangle", align 8
  %28 = alloca %"class.Raz::Vector", align 4
  %29 = alloca %"class.Raz::Vector.36", align 4
  %30 = alloca %"class.Raz::Vector.36", align 4
  %31 = alloca %"class.Raz::Vector", align 4
  %32 = alloca %"class.Raz::Vector.36", align 4
  %33 = alloca %"class.Raz::Vector.36", align 4
  %34 = alloca %"class.Raz::Vector", align 4
  %35 = alloca %"class.Raz::Vector.36", align 4
  %36 = alloca %"class.Raz::Vector.36", align 4
  %37 = alloca %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr %5) #7
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 104, i1 false)
  call void @_ZN3Raz27BoundingVolumeHierarchyNodeC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %5) #7
  %39 = getelementptr inbounds %"class.Raz::BoundingVolumeHierarchy", ptr %38, i32 0, i32 0
  %40 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN3Raz27BoundingVolumeHierarchyNodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(104) %39, ptr noundef nonnull align 8 dereferenceable(104) %5) #7
  call void @_ZN3Raz27BoundingVolumeHierarchyNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %5) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %41, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %8, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %9, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  br label %48

48:                                               ; preds = %69, %2
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %71

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  store ptr %53, ptr %11, align 8, !tbaa !5
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %54) #7
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_4MeshEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %57)
  br i1 %58, label %60, label %59

59:                                               ; preds = %56, %51
  store i32 3, ptr %10, align 4
  br label %66

60:                                               ; preds = %56
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3Raz6Entity12getComponentINS_4MeshEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %61)
  %63 = call noundef i64 @_ZNK3Raz4Mesh20recoverTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(64) %62)
  %64 = load i64, ptr %6, align 8, !tbaa !9
  %65 = add i64 %64, %63
  store i64 %65, ptr %6, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  br label %66

66:                                               ; preds = %60, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %67 = load i32, ptr %10, align 4
  switch i32 %67, label %289 [
    i32 0, label %68
    i32 3, label %69
  ]

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68, %66
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %48

71:                                               ; preds = %50
  %72 = load i64, ptr %6, align 8, !tbaa !9
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %71
  store i32 1, ptr %10, align 4
  br label %280

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %76 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %76)
          to label %77 unwind label %88

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %78, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %79) #7
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %16, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #7
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %17, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  br label %85

85:                                               ; preds = %271, %77
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %86, label %92, label %87

87:                                               ; preds = %85
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %276

88:                                               ; preds = %276, %75
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %13, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %14, align 4
  br label %283

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  store ptr %94, ptr %18, align 8, !tbaa !5
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %95) #7
  br i1 %96, label %97, label %101

97:                                               ; preds = %92
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = invoke noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_4MeshEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %98)
          to label %100 unwind label %102

100:                                              ; preds = %97
  br i1 %99, label %106, label %101

101:                                              ; preds = %100, %92
  store i32 5, ptr %10, align 4
  br label %268

102:                                              ; preds = %97
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %13, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %14, align 4
  br label %275

106:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = invoke noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_9TransformEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %107)
          to label %109 unwind label %134

109:                                              ; preds = %106
  %110 = zext i1 %108 to i8
  store i8 %110, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #7
  %111 = load i8, ptr %19, align 1, !tbaa !11, !range !13, !noundef !14
  %112 = trunc i8 %111 to i1
  br i1 %112, label %113, label %118

113:                                              ; preds = %109
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN3Raz6Entity12getComponentINS_9TransformEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %114)
          to label %116 unwind label %138

116:                                              ; preds = %113
  invoke void @_ZNK3Raz9Transform22computeTransformMatrixEv(ptr dead_on_unwind writable sret(%"class.Raz::Matrix") align 4 %20, ptr noundef nonnull align 8 dereferenceable(56) %115)
          to label %117 unwind label %138

117:                                              ; preds = %116
  br label %119

118:                                              ; preds = %109
  call void @llvm.memset.p0.i64(ptr align 4 %20, i8 0, i64 64, i1 false)
  call void @_ZN3Raz6MatrixIfLm4ELm4EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %20) #7
  br label %119

119:                                              ; preds = %118, %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %120 = load ptr, ptr %18, align 8, !tbaa !5
  %121 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_4MeshEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %120)
          to label %122 unwind label %142

122:                                              ; preds = %119
  %123 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz4Mesh12getSubmeshesEv(ptr noundef nonnull align 8 dereferenceable(64) %121)
          to label %124 unwind label %142

124:                                              ; preds = %122
  store ptr %123, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = call ptr @_ZNSt6vectorIN3Raz7SubmeshESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.23", ptr %22, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %128 = load ptr, ptr %21, align 8, !tbaa !5
  %129 = call ptr @_ZNSt6vectorIN3Raz7SubmeshESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #7
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.23", ptr %23, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  br label %131

131:                                              ; preds = %264, %124
  %132 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br i1 %132, label %146, label %133

133:                                              ; preds = %131
  store i32 6, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %267

134:                                              ; preds = %106
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %13, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %14, align 4
  br label %274

138:                                              ; preds = %116, %113
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %13, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %14, align 4
  br label %273

142:                                              ; preds = %122, %119
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %13, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %14, align 4
  br label %266

146:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %147 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  store ptr %147, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %148

148:                                              ; preds = %253, %146
  %149 = load i64, ptr %25, align 8, !tbaa !9
  %150 = load ptr, ptr %24, align 8, !tbaa !5
  %151 = invoke noundef i64 @_ZNK3Raz7Submesh21getTriangleIndexCountEv(ptr noundef nonnull align 8 dereferenceable(104) %150)
          to label %152 unwind label %155

152:                                              ; preds = %148
  %153 = icmp ult i64 %149, %151
  br i1 %153, label %159, label %154

154:                                              ; preds = %152
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %263

155:                                              ; preds = %148
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %13, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %14, align 4
  br label %262

159:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 48, ptr %26) #7
  %160 = load ptr, ptr %24, align 8, !tbaa !5
  %161 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %160)
          to label %162 unwind label %229

162:                                              ; preds = %159
  %163 = load ptr, ptr %24, align 8, !tbaa !5
  %164 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %163)
          to label %165 unwind label %229

165:                                              ; preds = %162
  %166 = load i64, ptr %25, align 8, !tbaa !9
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166) #7
  %168 = load i32, ptr %167, align 4, !tbaa !15
  %169 = zext i32 %168 to i64
  %170 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %169) #7
  %171 = getelementptr inbounds %"struct.Raz::Vertex", ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %24, align 8, !tbaa !5
  %173 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %172)
          to label %174 unwind label %229

174:                                              ; preds = %165
  %175 = load ptr, ptr %24, align 8, !tbaa !5
  %176 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %175)
          to label %177 unwind label %229

177:                                              ; preds = %174
  %178 = load i64, ptr %25, align 8, !tbaa !9
  %179 = add i64 %178, 1
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %179) #7
  %181 = load i32, ptr %180, align 4, !tbaa !15
  %182 = zext i32 %181 to i64
  %183 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %182) #7
  %184 = getelementptr inbounds %"struct.Raz::Vertex", ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %24, align 8, !tbaa !5
  %186 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %185)
          to label %187 unwind label %229

187:                                              ; preds = %177
  %188 = load ptr, ptr %24, align 8, !tbaa !5
  %189 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %188)
          to label %190 unwind label %229

190:                                              ; preds = %187
  %191 = load i64, ptr %25, align 8, !tbaa !9
  %192 = add i64 %191, 2
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef %192) #7
  %194 = load i32, ptr %193, align 4, !tbaa !15
  %195 = zext i32 %194 to i64
  %196 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %195) #7
  %197 = getelementptr inbounds %"struct.Raz::Vertex", ptr %196, i32 0, i32 0
  call void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 4 dereferenceable(12) %171, ptr noundef nonnull align 4 dereferenceable(12) %184, ptr noundef nonnull align 4 dereferenceable(12) %197) #7
  %198 = load i8, ptr %19, align 1, !tbaa !11, !range !13, !noundef !14
  %199 = trunc i8 %198 to i1
  br i1 %199, label %200, label %247

200:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 48, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  %201 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getFirstPosEv(ptr noundef nonnull align 8 dereferenceable(48) %26)
          to label %202 unwind label %233

202:                                              ; preds = %200
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(12) %201, float noundef 1.000000e+00) #7
  %203 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %20, ptr noundef nonnull align 4 dereferenceable(16) %30) #7
  %204 = getelementptr inbounds %"class.Raz::Vector.36", ptr %29, i32 0, i32 0
  %205 = getelementptr inbounds %"struct.std::array.37", ptr %204, i32 0, i32 0
  %206 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %205, i32 0, i32 0
  %207 = extractvalue { <2 x float>, <2 x float> } %203, 0
  store <2 x float> %207, ptr %206, align 4
  %208 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %205, i32 0, i32 1
  %209 = extractvalue { <2 x float>, <2 x float> } %203, 1
  store <2 x float> %209, ptr %208, align 4
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(16) %29) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #7
  %210 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle12getSecondPosEv(ptr noundef nonnull align 8 dereferenceable(48) %26)
          to label %211 unwind label %237

211:                                              ; preds = %202
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(12) %210, float noundef 1.000000e+00) #7
  %212 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %20, ptr noundef nonnull align 4 dereferenceable(16) %33) #7
  %213 = getelementptr inbounds %"class.Raz::Vector.36", ptr %32, i32 0, i32 0
  %214 = getelementptr inbounds %"struct.std::array.37", ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %214, i32 0, i32 0
  %216 = extractvalue { <2 x float>, <2 x float> } %212, 0
  store <2 x float> %216, ptr %215, align 4
  %217 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %214, i32 0, i32 1
  %218 = extractvalue { <2 x float>, <2 x float> } %212, 1
  store <2 x float> %218, ptr %217, align 4
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(16) %32) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #7
  %219 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getThirdPosEv(ptr noundef nonnull align 8 dereferenceable(48) %26)
          to label %220 unwind label %241

220:                                              ; preds = %211
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(12) %219, float noundef 1.000000e+00) #7
  %221 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %20, ptr noundef nonnull align 4 dereferenceable(16) %36) #7
  %222 = getelementptr inbounds %"class.Raz::Vector.36", ptr %35, i32 0, i32 0
  %223 = getelementptr inbounds %"struct.std::array.37", ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %223, i32 0, i32 0
  %225 = extractvalue { <2 x float>, <2 x float> } %221, 0
  store <2 x float> %225, ptr %224, align 4
  %226 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %223, i32 0, i32 1
  %227 = extractvalue { <2 x float>, <2 x float> } %221, 1
  store <2 x float> %227, ptr %226, align 4
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(16) %35) #7
  call void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %34) #7
  %228 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3Raz8TriangleaSEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #7
  br label %247

229:                                              ; preds = %187, %177, %174, %165, %162, %159
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %13, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %14, align 4
  br label %261

233:                                              ; preds = %200
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %13, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %14, align 4
  br label %246

237:                                              ; preds = %202
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %13, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %14, align 4
  br label %245

241:                                              ; preds = %211
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %13, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #7
  br label %245

245:                                              ; preds = %241, %237
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  br label %246

246:                                              ; preds = %245, %233
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #7
  br label %260

247:                                              ; preds = %220, %190
  call void @llvm.lifetime.start.p0(i64 56, ptr %37) #7
  %248 = getelementptr inbounds %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo", ptr %37, i32 0, i32 0
  call void @_ZN3Raz8TriangleC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %248, ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  %249 = getelementptr inbounds %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo", ptr %37, i32 0, i32 1
  %250 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %250, ptr %249, align 8, !tbaa !17
  %251 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(56) %37)
          to label %252 unwind label %256

252:                                              ; preds = %247
  call void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #7
  br label %253

253:                                              ; preds = %252
  %254 = load i64, ptr %25, align 8, !tbaa !9
  %255 = add i64 %254, 3
  store i64 %255, ptr %25, align 8, !tbaa !9
  br label %148, !llvm.loop !23

256:                                              ; preds = %247
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %13, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %14, align 4
  call void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  br label %260

260:                                              ; preds = %256, %246
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  br label %261

261:                                              ; preds = %260, %229
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #7
  br label %262

262:                                              ; preds = %261, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %266

263:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %264

264:                                              ; preds = %263
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br label %131

266:                                              ; preds = %262, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %273

267:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  store i32 0, ptr %10, align 4
  br label %268

268:                                              ; preds = %267, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %269 = load i32, ptr %10, align 4
  switch i32 %269, label %289 [
    i32 0, label %270
    i32 5, label %271
  ]

270:                                              ; preds = %268
  br label %271

271:                                              ; preds = %270, %268
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %85

273:                                              ; preds = %266, %138
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #7
  br label %274

274:                                              ; preds = %273, %134
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  br label %275

275:                                              ; preds = %274, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %283

276:                                              ; preds = %87
  %277 = getelementptr inbounds %"class.Raz::BoundingVolumeHierarchy", ptr %38, i32 0, i32 0
  %278 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZN3Raz27BoundingVolumeHierarchyNode5buildERSt6vectorINS0_12TriangleInfoESaIS2_EEmm(ptr noundef nonnull align 8 dereferenceable(104) %277, ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0, i64 noundef %278)
          to label %279 unwind label %88

279:                                              ; preds = %276
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  store i32 0, ptr %10, align 4
  br label %280

280:                                              ; preds = %279, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %281 = load i32, ptr %10, align 4
  switch i32 %281, label %289 [
    i32 0, label %282
    i32 1, label %282
  ]

282:                                              ; preds = %280, %280
  ret void

283:                                              ; preds = %275, %88
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %13, align 8
  %286 = load i32, ptr %14, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288

289:                                              ; preds = %280, %268, %66
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNodeC2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZN3Raz27BoundingVolumeHierarchyNodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3Raz6Entity12getComponentINS_4MeshEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

declare noundef i64 @_ZNK3Raz4Mesh20recoverTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(64)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZN3Raz6Entity12getComponentINS_9TransformEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

declare void @_ZNK3Raz9Transform22computeTransformMatrixEv(ptr dead_on_unwind writable sret(%"class.Raz::Matrix") align 4, ptr noundef nonnull align 8 dereferenceable(56)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6MatrixIfLm4ELm4EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_4MeshEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz4Mesh12getSubmeshesEv(ptr noundef nonnull align 8 dereferenceable(64)) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3Raz7Submesh21getTriangleIndexCountEv(ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getFirstPosEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle12getSecondPosEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getThirdPosEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN3Raz8TriangleaSEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz8TriangleC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = { 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 #6 = { "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 #7 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !6, i64 48}
!18 = !{!"_ZTSN3Raz27BoundingVolumeHierarchyNode12TriangleInfoE", !19, i64 0, !6, i64 48}
!19 = !{!"_ZTSN3Raz8TriangleE", !20, i64 0, !21, i64 8, !21, i64 20, !21, i64 32}
!20 = !{!"_ZTSN3Raz5ShapeE"}
!21 = !{!"_ZTSN3Raz6VectorIfLm3EEE", !22, i64 0}
!22 = !{!"_ZTSSt5arrayIfLm3EE", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; 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.Raz::BoundingVolumeHierarchyNode" = type { %"class.Raz::AABB", %"class.std::unique_ptr", %"class.std::unique_ptr", %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo" }
%"class.Raz::AABB" = type { %"class.Raz::Shape", %"class.Raz::Vector", %"class.Raz::Vector" }
%"class.Raz::Shape" = type { ptr }
%"class.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x float] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo" = type { %"class.Raz::Triangle", ptr }
%"class.Raz::Triangle" = type <{ %"class.Raz::Shape", %"class.Raz::Vector", %"class.Raz::Vector", %"class.Raz::Vector", [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.7" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::BoundingVolumeHierarchyNode::TriangleInfo, std::allocator<Raz::BoundingVolumeHierarchyNode::TriangleInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::Matrix" = type { %"struct.std::array.22" }
%"struct.std::array.22" = type { [16 x float] }
%"class.__gnu_cxx::__normal_iterator.23" = type { ptr }
%"class.Raz::Vector.36" = type { %"struct.std::array.37" }
%"struct.std::array.37" = type { [4 x float] }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz23BoundingVolumeHierarchy5buildERKSt6vectorIPNS_6EntityESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.Raz::BoundingVolumeHierarchyNode", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %9 = alloca %"class.Raz::Matrix", align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.23", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.23", align 8
  %12 = alloca %"class.Raz::Triangle", align 8
  %13 = alloca %"class.Raz::Triangle", align 8
  %14 = alloca %"class.Raz::Vector", align 4
  %15 = alloca %"class.Raz::Vector.36", align 8
  %16 = alloca %"class.Raz::Vector.36", align 4
  %17 = alloca %"class.Raz::Vector", align 4
  %18 = alloca %"class.Raz::Vector.36", align 8
  %19 = alloca %"class.Raz::Vector.36", align 4
  %20 = alloca %"class.Raz::Vector", align 4
  %21 = alloca %"class.Raz::Vector.36", align 8
  %22 = alloca %"class.Raz::Vector.36", align 4
  %23 = alloca %"struct.Raz::BoundingVolumeHierarchyNode::TriangleInfo", align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %3, i8 0, i64 104, i1 false)
  call void @_ZN3Raz27BoundingVolumeHierarchyNodeC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %3) #7
  %24 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN3Raz27BoundingVolumeHierarchyNodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(104) %3) #7
  call void @_ZN3Raz27BoundingVolumeHierarchyNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %3) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %25 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %25, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %26 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %26, ptr %5, align 8
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %27, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %133

._crit_edge:                                      ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %28 = icmp eq i64 %.1, 0
  br i1 %28, label %133, label %41

.lr.ph:                                           ; preds = %2, %38
  %.03750 = phi i64 [ %.1, %38 ], [ 0, %2 ]
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %30) #7
  br i1 %31, label %32, label %38

32:                                               ; preds = %.lr.ph
  %33 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_4MeshEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %30)
  br i1 %33, label %34, label %38

34:                                               ; preds = %32
  %35 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3Raz6Entity12getComponentINS_4MeshEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %30)
  %36 = call noundef i64 @_ZNK3Raz4Mesh20recoverTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(64) %35)
  %37 = add i64 %36, %.03750
  br label %38

38:                                               ; preds = %.lr.ph, %32, %34
  %.1 = phi i64 [ %37, %34 ], [ %.03750, %32 ], [ %.03750, %.lr.ph ]
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %40, label %.lr.ph, label %._crit_edge

41:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.1)
          to label %42 unwind label %50

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %43 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %43, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %44 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %44, ptr %8, align 8
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %45, label %.lr.ph59, label %._crit_edge60

.lr.ph59:                                         ; preds = %42
  %46 = getelementptr inbounds i8, ptr %15, i64 8
  %47 = getelementptr inbounds i8, ptr %18, i64 8
  %48 = getelementptr inbounds i8, ptr %21, i64 8
  %49 = getelementptr inbounds i8, ptr %23, i64 48
  br label %52

._crit_edge60:                                    ; preds = %127, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  invoke void @_ZN3Raz27BoundingVolumeHierarchyNode5buildERSt6vectorINS0_12TriangleInfoESaIS2_EEmm(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0, i64 noundef %.1)
          to label %132 unwind label %50

50:                                               ; preds = %._crit_edge60, %41
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %134

52:                                               ; preds = %.lr.ph59, %127
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %54) #7
  br i1 %55, label %56, label %127

56:                                               ; preds = %52
  %57 = invoke noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_4MeshEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %54)
          to label %58 unwind label %59

58:                                               ; preds = %56
  br i1 %57, label %61, label %127

59:                                               ; preds = %56
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %131

61:                                               ; preds = %58
  %62 = invoke noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_9TransformEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %54)
          to label %63 unwind label %75

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  br i1 %62, label %64, label %67

64:                                               ; preds = %63
  %65 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN3Raz6Entity12getComponentINS_9TransformEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %54)
          to label %66 unwind label %77

66:                                               ; preds = %64
  invoke void @_ZNK3Raz9Transform22computeTransformMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.Raz::Matrix") align 4 %9, ptr noundef nonnull align 8 dereferenceable(56) %65)
          to label %68 unwind label %77

67:                                               ; preds = %63
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN3Raz6MatrixIfLm4ELm4EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %9) #7
  br label %68

68:                                               ; preds = %66, %67
  %69 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_4MeshEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %54)
          to label %70 unwind label %79

70:                                               ; preds = %68
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz4Mesh12getSubmeshesEv(ptr noundef nonnull align 8 dereferenceable(64) %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %72 = call ptr @_ZNSt6vectorIN3Raz7SubmeshESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #7
  store ptr %72, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %73 = call ptr @_ZNSt6vectorIN3Raz7SubmeshESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #7
  store ptr %73, ptr %11, align 8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %74, label %.lr.ph56, label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge54, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  br label %127

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

77:                                               ; preds = %66, %64
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %130

79:                                               ; preds = %68
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %130

.lr.ph56:                                         ; preds = %70, %._crit_edge54
  %81 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %82 = call noundef i64 @_ZNK3Raz7Submesh21getTriangleIndexCountEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %.not = icmp eq i64 %82, 0
  br i1 %.not, label %._crit_edge54, label %.lr.ph53

._crit_edge54:                                    ; preds = %121, %.lr.ph56
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %84 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %84, label %.lr.ph56, label %._crit_edge57

.lr.ph53:                                         ; preds = %.lr.ph56, %121
  %.051 = phi i64 [ %122, %121 ], [ 0, %.lr.ph56 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %12) #7
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %.051) #7
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %89) #7
  %91 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %93 = add nuw i64 %.051, 1
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %93) #7
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %96) #7
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %99 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %100 = add i64 %.051, 2
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %100) #7
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZNKSt6vectorIN3Raz6VertexESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %103) #7
  call void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(12) %90, ptr noundef nonnull align 4 dereferenceable(12) %97, ptr noundef nonnull align 4 dereferenceable(12) %104) #7
  br i1 %62, label %105, label %119

105:                                              ; preds = %.lr.ph53
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getFirstPosEv(ptr noundef nonnull align 8 dereferenceable(48) %12)
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(12) %106, float noundef 1.000000e+00) #7
  %107 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %9, ptr noundef nonnull align 4 dereferenceable(16) %16) #7
  %108 = extractvalue { <2 x float>, <2 x float> } %107, 0
  store <2 x float> %108, ptr %15, align 8
  %109 = extractvalue { <2 x float>, <2 x float> } %107, 1
  store <2 x float> %109, ptr %46, align 8
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(16) %15) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #7
  %110 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle12getSecondPosEv(ptr noundef nonnull align 8 dereferenceable(48) %12)
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(12) %110, float noundef 1.000000e+00) #7
  %111 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %9, ptr noundef nonnull align 4 dereferenceable(16) %19) #7
  %112 = extractvalue { <2 x float>, <2 x float> } %111, 0
  store <2 x float> %112, ptr %18, align 8
  %113 = extractvalue { <2 x float>, <2 x float> } %111, 1
  store <2 x float> %113, ptr %47, align 8
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(16) %18) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #7
  %114 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getThirdPosEv(ptr noundef nonnull align 8 dereferenceable(48) %12)
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(12) %114, float noundef 1.000000e+00) #7
  %115 = call { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64) %9, ptr noundef nonnull align 4 dereferenceable(16) %22) #7
  %116 = extractvalue { <2 x float>, <2 x float> } %115, 0
  store <2 x float> %116, ptr %21, align 8
  %117 = extractvalue { <2 x float>, <2 x float> } %115, 1
  store <2 x float> %117, ptr %48, align 8
  call void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(16) %21) #7
  call void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %20) #7
  %118 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3Raz8TriangleaSEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %13) #7
  br label %119

119:                                              ; preds = %105, %.lr.ph53
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %23) #7
  call void @_ZN3Raz8TriangleC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  store ptr %54, ptr %49, align 8, !tbaa !11
  %120 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %121 unwind label %125

121:                                              ; preds = %119
  call void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #7
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #7
  %122 = add i64 %.051, 3
  %123 = call noundef i64 @_ZNK3Raz7Submesh21getTriangleIndexCountEv(ptr noundef nonnull align 8 dereferenceable(104) %81)
  %124 = icmp ult i64 %122, %123
  br i1 %124, label %.lr.ph53, label %._crit_edge54, !llvm.loop !17

125:                                              ; preds = %119
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #7
  call void @_ZN3Raz5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %130

127:                                              ; preds = %52, %58, %._crit_edge57
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %129 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %129, label %52, label %._crit_edge60

130:                                              ; preds = %79, %125, %77
  %.pn.pn = phi { ptr, i32 } [ %78, %77 ], [ %126, %125 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  br label %131

131:                                              ; preds = %75, %130, %59
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %60, %59 ], [ %.pn.pn, %130 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %134

132:                                              ; preds = %._crit_edge60
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  br label %133

133:                                              ; preds = %._crit_edge.thread, %._crit_edge, %132
  ret void

134:                                              ; preds = %131, %50
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %131 ], [ %51, %50 ]
  call void @_ZNSt6vectorIN3Raz27BoundingVolumeHierarchyNode12TriangleInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNodeC2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZN3Raz27BoundingVolumeHierarchyNodeaSEOS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3Raz6Entity12getComponentINS_4MeshEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

declare noundef i64 @_ZNK3Raz4Mesh20recoverTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZN3Raz6Entity12getComponentINS_9TransformEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

declare void @_ZNK3Raz9Transform22computeTransformMatrixEv(ptr dead_on_unwind writable sret(%"class.Raz::Matrix") align 4, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6MatrixIfLm4ELm4EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_4MeshEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz4Mesh12getSubmeshesEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3Raz7Submesh21getTriangleIndexCountEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh11getVerticesEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz7Submesh18getTriangleIndicesEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz8TriangleC2ERKNS_6VectorIfLm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3RazmlIfLm4ELm4EEENS_6VectorIT_XT1_EEERKNS_6MatrixIS2_XT0_EXT1_EEERKNS1_IS2_XT0_EEE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getFirstPosEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm3EEC2ERKNS0_IfLm4EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle12getSecondPosEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz8Triangle11getThirdPosEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN3Raz8TriangleaSEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz8TriangleC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz27BoundingVolumeHierarchyNode12TriangleInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz7SubmeshESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = { 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 #6 = { "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 #7 = { 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, !6, i64 48}
!12 = !{!"_ZTSN3Raz27BoundingVolumeHierarchyNode12TriangleInfoE", !13, i64 0, !6, i64 48}
!13 = !{!"_ZTSN3Raz8TriangleE", !14, i64 0, !15, i64 8, !15, i64 20, !15, i64 32}
!14 = !{!"_ZTSN3Raz5ShapeE"}
!15 = !{!"_ZTSN3Raz6VectorIfLm3EEE", !16, i64 0}
!16 = !{!"_ZTSSt5arrayIfLm3EE", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass