; LLVM IR from atlantis13579/Riemann :: Src/Collision/DynamicAABBTree.ll (ZN7Riemann15DynamicAABBTree7RebuildEv)

; 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.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::DynamicAABBTree" = type <{ i32, [4 x i8], %"class.std::vector", i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::DynamicAABBTree::Node, std::allocator<Riemann::DynamicAABBTree::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::DynamicAABBTree::Node, std::allocator<Riemann::DynamicAABBTree::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::DynamicAABBTree::Node, std::allocator<Riemann::DynamicAABBTree::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::DynamicAABBTree::Node, std::allocator<Riemann::DynamicAABBTree::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Riemann::DynamicAABBTree::Node" = type <{ %union.anon, %"class.Maths::TAABB3", i32, i32, i32, ptr, i8, [7 x i8] }>
%union.anon = type { i32 }

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree4Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Riemann15DynamicAABBTree9AllocNodeEv(ptr noundef nonnull align 8 dereferenceable(44)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann15DynamicAABBTree8FreeNodeEi(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann15DynamicAABBTree7RebuildEv(ptr noundef nonnull align 8 dereferenceable(44) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.Maths::TAABB3", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.Maths::TAABB3", align 4
  %14 = alloca %"class.Maths::TAABB3", align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.Maths::TAABB3", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %24 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %26, i64 4)
  %28 = extractvalue { i64, i1 } %27, 1
  %29 = extractvalue { i64, i1 } %27, 0
  %30 = select i1 %28, i64 -1, i64 %29
  %31 = call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #8
  store ptr %31, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !16
  br label %32

32:                                               ; preds = %69, %1
  %33 = load i32, ptr %5, align 4, !tbaa !16
  %34 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 4
  %35 = load i32, ptr %34, align 4, !tbaa !17
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %72

38:                                               ; preds = %32
  %39 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %40 = load i32, ptr %5, align 4, !tbaa !16
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #7
  %43 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %42, i32 0, i32 4
  %44 = load i32, ptr %43, align 4, !tbaa !18
  %45 = icmp slt i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %38
  br label %69

47:                                               ; preds = %38
  %48 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %49 = load i32, ptr %5, align 4, !tbaa !16
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #7
  %52 = call noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree4Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(49) %51)
  br i1 %52, label %53, label %66

53:                                               ; preds = %47
  %54 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %55 = load i32, ptr %5, align 4, !tbaa !16
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #7
  %58 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %57, i32 0, i32 0
  store i32 -1, ptr %58, align 8, !tbaa !24
  %59 = load i32, ptr %5, align 4, !tbaa !16
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !16
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %60, i64 %62
  store i32 %59, ptr %63, align 4, !tbaa !16
  %64 = load i32, ptr %4, align 4, !tbaa !16
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %4, align 4, !tbaa !16
  br label %68

66:                                               ; preds = %47
  %67 = load i32, ptr %5, align 4, !tbaa !16
  call void @_ZN7Riemann15DynamicAABBTree8FreeNodeEi(ptr noundef nonnull align 8 dereferenceable(44) %23, i32 noundef %67)
  br label %68

68:                                               ; preds = %66, %53
  br label %69

69:                                               ; preds = %68, %46
  %70 = load i32, ptr %5, align 4, !tbaa !16
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %5, align 4, !tbaa !16
  br label %32, !llvm.loop !25

72:                                               ; preds = %37
  br label %73

73:                                               ; preds = %125, %72
  %74 = load i32, ptr %4, align 4, !tbaa !16
  %75 = icmp sgt i32 %74, 1
  br i1 %75, label %76, label %196

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store float 0x47EFFFFFE0000000, ptr %6, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 -1, ptr %7, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %77

77:                                               ; preds = %122, %76
  %78 = load i32, ptr %9, align 4, !tbaa !16
  %79 = load i32, ptr %4, align 4, !tbaa !16
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %125

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %83 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %9, align 4, !tbaa !16
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !16
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %89) #7
  %91 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %90, i32 0, i32 1
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(24) %91)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %92 = load i32, ptr %9, align 4, !tbaa !16
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %12, align 4, !tbaa !16
  br label %94

94:                                               ; preds = %118, %82
  %95 = load i32, ptr %12, align 4, !tbaa !16
  %96 = load i32, ptr %4, align 4, !tbaa !16
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %121

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  %100 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = load i32, ptr %12, align 4, !tbaa !16
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !16
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %106) #7
  %108 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %107, i32 0, i32 1
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(24) %108)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(24) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %109 = call noundef float @_ZNK5Maths6TAABB3IfE9GetVolumeEv(ptr noundef nonnull align 4 dereferenceable(24) %14)
  store float %109, ptr %15, align 4, !tbaa !27
  %110 = load float, ptr %15, align 4, !tbaa !27
  %111 = load float, ptr %6, align 4, !tbaa !27
  %112 = fcmp olt float %110, %111
  br i1 %112, label %113, label %117

113:                                              ; preds = %99
  %114 = load i32, ptr %9, align 4, !tbaa !16
  store i32 %114, ptr %7, align 4, !tbaa !16
  %115 = load i32, ptr %12, align 4, !tbaa !16
  store i32 %115, ptr %8, align 4, !tbaa !16
  %116 = load float, ptr %15, align 4, !tbaa !27
  store float %116, ptr %6, align 4, !tbaa !27
  br label %117

117:                                              ; preds = %113, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %12, align 4, !tbaa !16
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %12, align 4, !tbaa !16
  br label %94, !llvm.loop !28

121:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %9, align 4, !tbaa !16
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %9, align 4, !tbaa !16
  br label %77, !llvm.loop !29

125:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = load i32, ptr %7, align 4, !tbaa !16
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %126, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !16
  store i32 %130, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = load i32, ptr %8, align 4, !tbaa !16
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !16
  store i32 %135, ptr %17, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %136 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %137 = load i32, ptr %16, align 4, !tbaa !16
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %138) #7
  store ptr %139, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %140 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %141 = load i32, ptr %17, align 4, !tbaa !16
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %142) #7
  store ptr %143, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %144 = call noundef i32 @_ZN7Riemann15DynamicAABBTree9AllocNodeEv(ptr noundef nonnull align 8 dereferenceable(44) %23)
  store i32 %144, ptr %20, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %145 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 2
  %146 = load i32, ptr %20, align 4, !tbaa !16
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %147) #7
  store ptr %148, ptr %21, align 8, !tbaa !5
  %149 = load i32, ptr %16, align 4, !tbaa !16
  %150 = load ptr, ptr %21, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %150, i32 0, i32 2
  store i32 %149, ptr %151, align 4, !tbaa !30
  %152 = load i32, ptr %17, align 4, !tbaa !16
  %153 = load ptr, ptr %21, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %153, i32 0, i32 3
  store i32 %152, ptr %154, align 8, !tbaa !31
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %19, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %157, i32 0, i32 4
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %156, ptr noundef nonnull align 4 dereferenceable(4) %158)
  %160 = load i32, ptr %159, align 4, !tbaa !16
  %161 = add nsw i32 1, %160
  %162 = load ptr, ptr %21, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %162, i32 0, i32 4
  store i32 %161, ptr %163, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  %164 = load ptr, ptr %18, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %166, i32 0, i32 1
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(24) %165, ptr noundef nonnull align 4 dereferenceable(24) %167)
  %168 = load ptr, ptr %21, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %168, i32 0, i32 1
  %170 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %169, ptr noundef nonnull align 4 dereferenceable(24) %22)
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  %171 = load ptr, ptr %21, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %171, i32 0, i32 0
  store i32 -1, ptr %172, align 8, !tbaa !24
  %173 = load i32, ptr %20, align 4, !tbaa !16
  %174 = load ptr, ptr %18, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %174, i32 0, i32 0
  store i32 %173, ptr %175, align 8, !tbaa !24
  %176 = load i32, ptr %20, align 4, !tbaa !16
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.Riemann::DynamicAABBTree::Node", ptr %177, i32 0, i32 0
  store i32 %176, ptr %178, align 8, !tbaa !24
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = load i32, ptr %4, align 4, !tbaa !16
  %181 = sub nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i32, ptr %179, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !16
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = load i32, ptr %8, align 4, !tbaa !16
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %185, i64 %187
  store i32 %184, ptr %188, align 4, !tbaa !16
  %189 = load i32, ptr %20, align 4, !tbaa !16
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = load i32, ptr %7, align 4, !tbaa !16
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %190, i64 %192
  store i32 %189, ptr %193, align 4, !tbaa !16
  %194 = load i32, ptr %4, align 4, !tbaa !16
  %195 = add nsw i32 %194, -1
  store i32 %195, ptr %4, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %73, !llvm.loop !32

196:                                              ; preds = %73
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds i32, ptr %197, i64 0
  %199 = load i32, ptr %198, align 4, !tbaa !16
  %200 = getelementptr inbounds %"class.Riemann::DynamicAABBTree", ptr %23, i32 0, i32 0
  store i32 %199, ptr %200, align 8, !tbaa !33
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = icmp eq ptr %201, null
  br i1 %202, label %204, label %203

203:                                              ; preds = %196
  call void @_ZdaPv(ptr noundef %201) #9
  br label %204

204:                                              ; preds = %203, %196
  %205 = call noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree8ValidateEv(ptr noundef nonnull align 8 dereferenceable(44) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #3 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree8ValidateEv(ptr noundef nonnull align 8 dereferenceable(44)) #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !11, i64 32}
!10 = !{!"_ZTSN7Riemann15DynamicAABBTreeE", !11, i64 0, !12, i64 8, !11, i64 32, !11, i64 36, !11, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 36}
!18 = !{!19, !11, i64 36}
!19 = !{!"_ZTSN7Riemann15DynamicAABBTree4NodeE", !7, i64 0, !20, i64 4, !11, i64 28, !11, i64 32, !11, i64 36, !6, i64 40, !23, i64 48}
!20 = !{!"_ZTSN5Maths6TAABB3IfEE", !21, i64 0, !21, i64 12}
!21 = !{!"_ZTSN5Maths8TVector3IfEE", !22, i64 0, !22, i64 4, !22, i64 8}
!22 = !{!"float", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!22, !22, i64 0}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = !{!19, !11, i64 28}
!31 = !{!19, !11, i64 32}
!32 = distinct !{!32, !26}
!33 = !{!10, !11, i64 0}


; 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.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Maths::TVector3" = type { float, float, float }

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree4Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Riemann15DynamicAABBTree9AllocNodeEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann15DynamicAABBTree8FreeNodeEi(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann15DynamicAABBTree7RebuildEv(ptr noundef nonnull align 8 dereferenceable(44) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"class.Maths::TAABB3", align 4
  %3 = alloca %"class.Maths::TAABB3", align 4
  %4 = alloca %"class.Maths::TAABB3", align 4
  %5 = alloca %"class.Maths::TAABB3", align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = icmp slt i32 %7, 0
  %10 = shl nsw i64 %8, 2
  %11 = select i1 %9, i64 -1, i64 %10
  %12 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %11) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 36
  %14 = load i32, ptr %13, align 4, !tbaa !15
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge88

.lr.ph:                                           ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  br label %20

.preheader72:                                     ; preds = %36
  %invariant.gep = getelementptr i8, ptr %12, i64 -4
  %17 = icmp sgt i32 %.1, 1
  br i1 %17, label %.preheader.lr.ph, label %._crit_edge88

.preheader.lr.ph:                                 ; preds = %.preheader72
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = zext nneg i32 %.1 to i64
  br label %.preheader

20:                                               ; preds = %.lr.ph, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %36 ]
  %.074 = phi i32 [ 0, %.lr.ph ], [ %.1, %36 ]
  %21 = tail call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #7
  %22 = getelementptr inbounds i8, ptr %21, i64 36
  %23 = load i32, ptr %22, align 4, !tbaa !16
  %24 = icmp slt i32 %23, 0
  br i1 %24, label %36, label %25

25:                                               ; preds = %20
  %26 = tail call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #7
  %27 = tail call noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree4Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(49) %26)
  br i1 %27, label %28, label %34

28:                                               ; preds = %25
  %29 = tail call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #7
  store i32 -1, ptr %29, align 8, !tbaa !22
  %30 = sext i32 %.074 to i64
  %31 = getelementptr inbounds i32, ptr %12, i64 %30
  %32 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %32, ptr %31, align 4, !tbaa !23
  %33 = add nsw i32 %.074, 1
  br label %36

34:                                               ; preds = %25
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_ZN7Riemann15DynamicAABBTree8FreeNodeEi(ptr noundef nonnull align 8 dereferenceable(44) %0, i32 noundef %35)
  br label %36

36:                                               ; preds = %28, %34, %20
  %.1 = phi i32 [ %.074, %20 ], [ %33, %28 ], [ %.074, %34 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %13, align 4, !tbaa !15
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next, %38
  br i1 %39, label %20, label %.preheader72, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.lr.ph, %40
  %indvars.iv98 = phi i64 [ %19, %.preheader.lr.ph ], [ %indvars.iv.next99, %40 ]
  br label %68

40:                                               ; preds = %._crit_edge
  %41 = sext i32 %.164.lcssa to i64
  %42 = getelementptr inbounds i32, ptr %12, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !23
  %44 = sext i32 %.167.lcssa to i64
  %45 = getelementptr inbounds i32, ptr %12, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !23
  %47 = sext i32 %43 to i64
  %48 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %47) #7
  %49 = sext i32 %46 to i64
  %50 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %49) #7
  %51 = call noundef i32 @_ZN7Riemann15DynamicAABBTree9AllocNodeEv(ptr noundef nonnull align 8 dereferenceable(44) %0)
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %52) #7
  %54 = getelementptr inbounds i8, ptr %53, i64 28
  store i32 %43, ptr %54, align 4, !tbaa !26
  %55 = getelementptr inbounds i8, ptr %53, i64 32
  store i32 %46, ptr %55, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %48, i64 36
  %57 = getelementptr inbounds i8, ptr %50, i64 36
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %57)
  %59 = load i32, ptr %58, align 4, !tbaa !23
  %60 = add nsw i32 %59, 1
  %61 = getelementptr inbounds i8, ptr %53, i64 36
  store i32 %60, ptr %61, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %62 = getelementptr inbounds i8, ptr %48, i64 4
  %63 = getelementptr inbounds i8, ptr %50, i64 4
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(24) %63)
  %64 = getelementptr inbounds i8, ptr %53, i64 4
  %65 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(24) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  store i32 -1, ptr %53, align 8, !tbaa !22
  store i32 %51, ptr %48, align 8, !tbaa !22
  store i32 %51, ptr %50, align 8, !tbaa !22
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv98
  %66 = load i32, ptr %gep, align 4, !tbaa !23
  store i32 %66, ptr %45, align 4, !tbaa !23
  store i32 %51, ptr %42, align 4, !tbaa !23
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, -1
  %67 = icmp sgt i64 %indvars.iv98, 2
  br i1 %67, label %.preheader, label %._crit_edge88, !llvm.loop !28

68:                                               ; preds = %.preheader, %._crit_edge
  %indvars.iv95 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next96, %._crit_edge ]
  %indvars.iv90 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next91, %._crit_edge ]
  %.06086 = phi float [ 0x47EFFFFFE0000000, %.preheader ], [ %.161.lcssa, %._crit_edge ]
  %.06385 = phi i32 [ -1, %.preheader ], [ %.164.lcssa, %._crit_edge ]
  %.06684 = phi i32 [ -1, %.preheader ], [ %.167.lcssa, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  %69 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv95
  %70 = load i32, ptr %69, align 4, !tbaa !23
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %71) #7
  %73 = getelementptr inbounds i8, ptr %72, i64 4
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(24) %73)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %74 = icmp slt i64 %indvars.iv.next96, %indvars.iv98
  br i1 %74, label %.lr.ph79.preheader, label %._crit_edge

.lr.ph79.preheader:                               ; preds = %68
  %75 = trunc nuw nsw i64 %indvars.iv95 to i32
  br label %.lr.ph79

._crit_edge:                                      ; preds = %.lr.ph79, %68
  %.167.lcssa = phi i32 [ %.06684, %68 ], [ %.268, %.lr.ph79 ]
  %.164.lcssa = phi i32 [ %.06385, %68 ], [ %.265, %.lr.ph79 ]
  %.161.lcssa = phi float [ %.06086, %68 ], [ %.262, %.lr.ph79 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next96, %indvars.iv98
  br i1 %exitcond.not, label %40, label %68, !llvm.loop !29

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %.lr.ph79
  %indvars.iv92 = phi i64 [ %indvars.iv90, %.lr.ph79.preheader ], [ %indvars.iv.next93, %.lr.ph79 ]
  %.16178 = phi float [ %.06086, %.lr.ph79.preheader ], [ %.262, %.lr.ph79 ]
  %.16477 = phi i32 [ %.06385, %.lr.ph79.preheader ], [ %.265, %.lr.ph79 ]
  %.16776 = phi i32 [ %.06684, %.lr.ph79.preheader ], [ %.268, %.lr.ph79 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %76 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv92
  %77 = load i32, ptr %76, align 4, !tbaa !23
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #7
  %80 = getelementptr inbounds i8, ptr %79, i64 4
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(24) %80)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(24) %3)
  %81 = call noundef float @_ZNK5Maths6TAABB3IfE9GetVolumeEv(ptr noundef nonnull align 4 dereferenceable(24) %4)
  %82 = fcmp olt float %81, %.16178
  %83 = trunc nuw nsw i64 %indvars.iv92 to i32
  %.268 = select i1 %82, i32 %83, i32 %.16776
  %.265 = select i1 %82, i32 %75, i32 %.16477
  %.262 = select i1 %82, float %81, float %.16178
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %sext = shl i64 %indvars.iv.next93, 32
  %84 = ashr exact i64 %sext, 32
  %85 = icmp slt i64 %84, %indvars.iv98
  br i1 %85, label %.lr.ph79, label %._crit_edge, !llvm.loop !30

._crit_edge88:                                    ; preds = %40, %1, %.preheader72
  %86 = load i32, ptr %12, align 4, !tbaa !23
  store i32 %86, ptr %0, align 8, !tbaa !31
  call void @_ZdaPv(ptr noundef nonnull %12) #8
  %87 = call noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree8ValidateEv(ptr noundef nonnull align 8 dereferenceable(44) %0)
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKS1_S3_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #3 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann15DynamicAABBTree8ValidateEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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, !7, i64 32}
!6 = !{!"_ZTSN7Riemann15DynamicAABBTreeE", !7, i64 0, !10, i64 8, !7, i64 32, !7, i64 36, !7, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN7Riemann15DynamicAABBTree4NodeESaIS2_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN7Riemann15DynamicAABBTree4NodeESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!6, !7, i64 36}
!16 = !{!17, !7, i64 36}
!17 = !{!"_ZTSN7Riemann15DynamicAABBTree4NodeE", !8, i64 0, !18, i64 4, !7, i64 28, !7, i64 32, !7, i64 36, !14, i64 40, !21, i64 48}
!18 = !{!"_ZTSN5Maths6TAABB3IfEE", !19, i64 0, !19, i64 12}
!19 = !{!"_ZTSN5Maths8TVector3IfEE", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !8, i64 0}
!21 = !{!"bool", !8, i64 0}
!22 = !{!8, !8, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!17, !7, i64 28}
!27 = !{!17, !7, i64 32}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = !{!6, !7, i64 0}


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