; LLVM IR from atlantis13579/Riemann :: Src/Geometry (SparseOctree)

; 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.Riemann::ListSet<int>::ListProxy" = type <{ ptr, i32, [4 x i8] }>
%"class.Riemann::SparseOctree" = type <{ %"class.std::vector", %"class.Riemann::SparseGrid3", %"class.Riemann::ListSet", %"class.std::set", %"class.std::unordered_map", %"class.Maths::TVector3", float, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::SparseGrid3" = type { %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.Riemann::ListSet" = type { %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.13" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.18" }
%"class.std::_Rb_tree.18" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.Maths::TVector3" = type { float, float, 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 noundef zeroext i1 @_ZNK7Riemann12SparseOctree9HasObjectEi(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann12SparseOctree16GetCellForObjectEi(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann12SparseOctree12InsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef, ptr noundef nonnull align 4 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann12SparseOctree5IsFitERKNS0_4CellERKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(52), ptr noundef nonnull align 4 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann12SparseOctree14ReinsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(24) %2) #1 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.Riemann::ListSet<int>::ListProxy", align 8
  %12 = alloca { ptr, i32 }, align 8
  %13 = alloca %"class.Riemann::ListSet<int>::ListProxy", align 8
  %14 = alloca { ptr, i32 }, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 -1, ptr %8, align 4, !tbaa !9
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = call noundef zeroext i1 @_ZNK7Riemann12SparseOctree9HasObjectEi(ptr noundef nonnull align 8 dereferenceable(268) %15, i32 noundef %16)
  br i1 %17, label %18, label %46

18:                                               ; preds = %3
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = call noundef i32 @_ZNK7Riemann12SparseOctree16GetCellForObjectEi(ptr noundef nonnull align 8 dereferenceable(268) %15, i32 noundef %19)
  store i32 %20, ptr %8, align 4, !tbaa !9
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp ne i32 %21, -1
  br i1 %22, label %23, label %45

23:                                               ; preds = %18
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = icmp ne i32 %24, -2
  br i1 %25, label %26, label %45

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %27 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 0
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(52) ptr @_ZNSt6vectorIN7Riemann12SparseOctree4CellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #5
  store ptr %30, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call noundef zeroext i1 @_ZNK7Riemann12SparseOctree5IsFitERKNS0_4CellERKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %15, ptr noundef nonnull align 4 dereferenceable(52) %31, ptr noundef nonnull align 4 dereferenceable(24) %32)
  br i1 %33, label %34, label %35

34:                                               ; preds = %26
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %42

35:                                               ; preds = %26
  %36 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 4
  %37 = call noundef i64 @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(56) %36, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %38 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 2
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = call { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72) %38, i32 noundef %39)
  store { ptr, i32 } %40, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 12, i1 false)
  %41 = call noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  store i32 0, ptr %10, align 4
  br label %42

42:                                               ; preds = %35, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %43 = load i32, ptr %10, align 4
  switch i32 %43, label %67 [
    i32 0, label %44
  ]

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %44, %23, %18
  br label %46

46:                                               ; preds = %45, %3
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp ne i32 %47, -1
  br i1 %48, label %49, label %63

49:                                               ; preds = %46
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = icmp eq i32 %50, -2
  br i1 %51, label %52, label %55

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 3
  %54 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %53, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br label %62

55:                                               ; preds = %49
  %56 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 4
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 -1, ptr %57, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %58 = getelementptr inbounds %"class.Riemann::SparseOctree", ptr %15, i32 0, i32 2
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = call { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72) %58, i32 noundef %59)
  store { ptr, i32 } %60, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %14, i64 12, i1 false)
  %61 = call noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %62

62:                                               ; preds = %55, %52
  br label %63

63:                                               ; preds = %62, %46
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = call noundef zeroext i1 @_ZN7Riemann12SparseOctree12InsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %15, i32 noundef %64, ptr noundef nonnull align 4 dereferenceable(24) %65)
  store i1 %66, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %67

67:                                               ; preds = %63, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %68 = load i1, ptr %4, align 1
  ret i1 %68
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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}


; 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.Riemann::ListSet<int>::ListProxy" = type <{ ptr, i32, [4 x i8] }>

; 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 noundef zeroext i1 @_ZNK7Riemann12SparseOctree9HasObjectEi(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann12SparseOctree16GetCellForObjectEi(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann12SparseOctree12InsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268), i32 noundef, ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann12SparseOctree5IsFitERKNS0_4CellERKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(52), ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann12SparseOctree14ReinsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(24) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.Riemann::ListSet<int>::ListProxy", align 8
  %7 = alloca %"class.Riemann::ListSet<int>::ListProxy", align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 -1, ptr %5, align 4, !tbaa !5
  %8 = tail call noundef zeroext i1 @_ZNK7Riemann12SparseOctree9HasObjectEi(ptr noundef nonnull align 8 dereferenceable(268) %0, i32 noundef %1)
  br i1 %8, label %9, label %thread-pre-split.thread

9:                                                ; preds = %3
  %10 = tail call noundef i32 @_ZNK7Riemann12SparseOctree16GetCellForObjectEi(ptr noundef nonnull align 8 dereferenceable(268) %0, i32 noundef %1)
  store i32 %10, ptr %5, align 4, !tbaa !5
  %or.cond = icmp ult i32 %10, -2
  br i1 %or.cond, label %11, label %thread-pre-split

11:                                               ; preds = %9
  %12 = sext i32 %10 to i64
  %13 = tail call noundef nonnull align 4 dereferenceable(52) ptr @_ZNSt6vectorIN7Riemann12SparseOctree4CellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %12) #4
  %14 = tail call noundef zeroext i1 @_ZNK7Riemann12SparseOctree5IsFitERKNS0_4CellERKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef nonnull align 4 dereferenceable(52) %13, ptr noundef nonnull align 4 dereferenceable(24) %2)
  br i1 %14, label %.critedge, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 192
  %17 = call noundef i64 @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  %19 = call { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72) %18, i32 noundef %10)
  %.fca.0.extract2 = extractvalue { ptr, i32 } %19, 0
  %.fca.1.extract3 = extractvalue { ptr, i32 } %19, 1
  store ptr %.fca.0.extract2, ptr %6, align 8
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %.fca.1.extract3, ptr %.sroa.25.0..sroa_idx, align 8
  %20 = call noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %15, %9
  switch i32 %10, label %24 [
    i32 -1, label %thread-pre-split.thread
    i32 -2, label %21
  ]

21:                                               ; preds = %thread-pre-split
  %22 = getelementptr inbounds i8, ptr %0, i64 144
  %23 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %22, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %thread-pre-split.thread

24:                                               ; preds = %thread-pre-split
  %25 = getelementptr inbounds i8, ptr %0, i64 192
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 -1, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = call { ptr, i32 } @_ZN7Riemann7ListSetIiLi8EEixEi(ptr noundef nonnull align 8 dereferenceable(72) %27, i32 noundef %28)
  %.fca.0.extract = extractvalue { ptr, i32 } %29, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %29, 1
  store ptr %.fca.0.extract, ptr %7, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %30 = call noundef i32 @_ZN7Riemann7ListSetIiLi8EE9ListProxy6removeERKi(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %thread-pre-split.thread

thread-pre-split.thread:                          ; preds = %3, %thread-pre-split, %21, %24
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = call noundef zeroext i1 @_ZN7Riemann12SparseOctree12InsertObjectEiRKN5Maths6TAABB3IfEE(ptr noundef nonnull align 8 dereferenceable(268) %0, i32 noundef %31, ptr noundef nonnull align 4 dereferenceable(24) %2)
  br label %.critedge

.critedge:                                        ; preds = %11, %thread-pre-split.thread
  %.1 = phi i1 [ %32, %thread-pre-split.thread ], [ false, %11 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret i1 %.1
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass