; LLVM IR from intellistream/Sesame :: src/Algorithm/DataStructure (GridCluster)

; 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.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl" }
%"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl" = type { %"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.SESAME::DensityGrid" = type <{ %"class.std::vector", i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.SESAME::GridCluster" = type <{ %"class.std::unordered_map", %"class.std::unordered_map", i32, [4 x i8] }>
%"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 }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 8 dereferenceable(29)) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::vector.11", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.SESAME::DensityGrid", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  call void @_ZNK6SESAME11DensityGrid13getNeighboursEv(ptr dead_on_unwind writable sret(%"class.std::vector.11") align 8 %6, ptr noundef nonnull align 8 dereferenceable(29) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr %6, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = call ptr @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %19 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call ptr @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  br label %23

23:                                               ; preds = %52, %2
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %24, label %26, label %25

25:                                               ; preds = %23
  store i32 2, ptr %10, align 4
  br label %55

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %27 = call noundef nonnull align 8 dereferenceable(29) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %11, ptr noundef nonnull align 8 dereferenceable(29) %27)
          to label %28 unwind label %40

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %29 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %16, i32 0, i32 0
  %30 = invoke ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(29) %11)
          to label %31 unwind label %44

31:                                               ; preds = %28
  %32 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %33 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %32, i32 0, i32 0
  store ptr %30, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %34 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %16, i32 0, i32 0
  %35 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %34) #5
  %36 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %36, i32 0, i32 0
  store ptr %35, ptr %37, align 8
  %38 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br i1 %38, label %39, label %48

39:                                               ; preds = %31
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %49

40:                                               ; preds = %26
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %12, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %13, align 4
  br label %54

44:                                               ; preds = %28
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %12, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %11) #5
  br label %54

48:                                               ; preds = %31
  store i32 0, ptr %10, align 4
  br label %49

49:                                               ; preds = %48, %39
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  %50 = load i32, ptr %10, align 4
  switch i32 %50, label %55 [
    i32 0, label %51
  ]

51:                                               ; preds = %49
  br label %52

52:                                               ; preds = %51
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %23

54:                                               ; preds = %44, %40
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %60

55:                                               ; preds = %49, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %56 = load i32, ptr %10, align 4
  switch i32 %56, label %58 [
    i32 2, label %57
  ]

57:                                               ; preds = %55
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %58

58:                                               ; preds = %57, %55
  call void @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  %59 = load i1, ptr %3, align 1
  ret i1 %59

60:                                               ; preds = %54
  %61 = load ptr, ptr %12, align 8
  %62 = load i32, ptr %13, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

declare void @_ZNK6SESAME11DensityGrid13getNeighboursEv(ptr dead_on_unwind writable sret(%"class.std::vector.11") align 8, ptr noundef nonnull align 8 dereferenceable(29)) #2

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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"}


; 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.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl" }
%"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl" = type { %"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SESAME::DensityGrid, std::allocator<SESAME::DensityGrid>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.SESAME::DensityGrid" = type <{ %"class.std::vector", i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 8 dereferenceable(29)) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.11", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.SESAME::DensityGrid", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNK6SESAME11DensityGrid13getNeighboursEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.11") align 8 %3, ptr noundef nonnull align 8 dereferenceable(29) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %9 = call ptr @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %9, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %10 = call ptr @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %10, ptr %5, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %11, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %2, %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %12 = call noundef nonnull align 8 dereferenceable(29) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull align 8 dereferenceable(29) %12)
          to label %13 unwind label %18

13:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %14 = invoke ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(29) %6)
          to label %15 unwind label %20

15:                                               ; preds = %13
  store ptr %14, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %16 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %16, ptr %8, align 8
  %17 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br i1 %17, label %26, label %22

18:                                               ; preds = %.lr.ph
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %25

20:                                               ; preds = %13
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %6) #5
  br label %25

22:                                               ; preds = %15
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN6SESAME11DensityGridESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %24, label %.lr.ph, label %.critedge

25:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn

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

.critedge:                                        ; preds = %22, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %27

27:                                               ; preds = %26, %.critedge
  %.3 = phi i1 [ false, %26 ], [ true, %.critedge ]
  call void @_ZNSt6vectorIN6SESAME11DensityGridESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i1 %.3
}

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

declare void @_ZNK6SESAME11DensityGrid13getNeighboursEv(ptr dead_on_unwind writable sret(%"class.std::vector.11") align 8, ptr noundef nonnull align 8 dereferenceable(29)) local_unnamed_addr #2

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass