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

; 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::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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = 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 }
%"class.SESAME::GridCluster" = type <{ %"class.std::unordered_map", %"class.std::unordered_map", i32, [4 x i8] }>
%"struct.std::pair" = type { %"class.SESAME::DensityGrid", i8, [7 x i8] }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116), ptr noundef, ptr noundef nonnull align 8 dereferenceable(29), i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SESAME11GridCluster13absorbClusterES0_(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::unordered_map", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"class.std::unordered_map", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"class.SESAME::DensityGrid", align 8
  %16 = alloca %"class.std::unordered_map", align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %19 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %1, i32 0, i32 0
  %20 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %19) #5
  %21 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %7, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %21, i32 0, i32 0
  store ptr %20, ptr %22, align 8
  br label %23

23:                                               ; preds = %34, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %24 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %1, i32 0, i32 0
  %25 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %24) #5
  %26 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %8, i32 0, i32 0
  %27 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %26, i32 0, i32 0
  store ptr %25, ptr %27, align 8
  %28 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_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 %8) #5
  br i1 %28, label %29, label %46

29:                                               ; preds = %23
  %30 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %18, i32 0, i32 0
  invoke void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(56) %30)
          to label %31 unwind label %38

31:                                               ; preds = %29
  %32 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %33 = getelementptr inbounds %"struct.std::pair", ptr %32, i32 0, i32 0
  invoke void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116) %18, ptr noundef %9, ptr noundef nonnull align 8 dereferenceable(29) %33, i1 noundef zeroext false)
          to label %34 unwind label %42

34:                                               ; preds = %31
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  %35 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #5
  %36 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %12, 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
  br label %23, !llvm.loop !9

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %11, align 4
  br label %90

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %10, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %11, align 4
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  br label %90

46:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %47 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %18, i32 0, i32 0
  %48 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %47) #5
  %49 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %13, i32 0, i32 0
  %50 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %49, i32 0, i32 0
  store ptr %48, ptr %50, align 8
  br label %51

51:                                               ; preds = %69, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %52 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %18, i32 0, i32 0
  %53 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %52) #5
  %54 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %55 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %54, i32 0, i32 0
  store ptr %53, ptr %55, align 8
  %56 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br i1 %56, label %57, label %85

57:                                               ; preds = %51
  %58 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %15, ptr noundef nonnull align 8 dereferenceable(29) %59)
          to label %60 unwind label %73

60:                                               ; preds = %57
  %61 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %18, ptr noundef %15)
          to label %62 unwind label %77

62:                                               ; preds = %60
  %63 = zext i1 %61 to i8
  store i8 %63, ptr %5, align 1, !tbaa !11
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %15) #5
  invoke void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %64 unwind label %73

64:                                               ; preds = %62
  %65 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %66 = getelementptr inbounds %"struct.std::pair", ptr %65, i32 0, i32 0
  %67 = load i8, ptr %5, align 1, !tbaa !11, !range !13, !noundef !14
  %68 = trunc i8 %67 to i1
  invoke void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116) %18, ptr noundef %16, ptr noundef nonnull align 8 dereferenceable(29) %66, i1 noundef zeroext %68)
          to label %69 unwind label %81

69:                                               ; preds = %64
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  %70 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #5
  %71 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %17, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %71, i32 0, i32 0
  store ptr %70, ptr %72, align 8
  br label %51, !llvm.loop !15

73:                                               ; preds = %85, %62, %57
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %10, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %11, align 4
  br label %89

77:                                               ; preds = %60
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %10, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %11, align 4
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %15) #5
  br label %89

81:                                               ; preds = %64
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %10, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %11, align 4
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  br label %89

85:                                               ; preds = %51
  %86 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %18, i32 0, i32 0
  %87 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEaSERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %86, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %88 unwind label %73

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

89:                                               ; preds = %81, %77, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %90

90:                                               ; preds = %89, %42, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %10, align 8
  %93 = load i32, ptr %11, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEaSERKS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #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 = { "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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !10}


; 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::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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = 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 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116), ptr noundef, ptr noundef nonnull align 8 dereferenceable(29), i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SESAME11GridCluster13absorbClusterES0_(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unordered_map", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"class.std::unordered_map", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"class.SESAME::DensityGrid", align 8
  %10 = alloca %"class.std::unordered_map", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %11 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %1) #5
  store ptr %11, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %12 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %1) #5
  store ptr %12, ptr %5, align 8
  %13 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %16
  invoke void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(56) %0)
          to label %14 unwind label %20

14:                                               ; preds = %.lr.ph
  %15 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  invoke void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(29) %15, i1 noundef zeroext false)
          to label %16 unwind label %22

16:                                               ; preds = %14
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  %17 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %18 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %1) #5
  store ptr %18, ptr %5, align 8
  %19 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !5

20:                                               ; preds = %.lr.ph
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %44

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  br label %44

._crit_edge:                                      ; preds = %16, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %24 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %24, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %25 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %25, ptr %8, align 8
  %26 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_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
  br i1 %26, label %.lr.ph10, label %._crit_edge11

.lr.ph10:                                         ; preds = %._crit_edge, %33
  %27 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef nonnull align 8 dereferenceable(29) %27)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %.lr.ph10
  %29 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %9)
          to label %30 unwind label %37

30:                                               ; preds = %28
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %9) #5
  invoke void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEC2ERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %30
  %32 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  invoke void @_ZN6SESAME11GridCluster11putHashGridESt13unordered_mapINS_11DensityGridEbNS_11GridKeyHashENS_9EqualGridESaISt4pairIKS2_bEEERS6_b(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %10, ptr noundef nonnull align 8 dereferenceable(29) %32, i1 noundef zeroext %29)
          to label %33 unwind label %39

33:                                               ; preds = %31
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  %34 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %35 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %35, ptr %8, align 8
  %36 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_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
  br i1 %36, label %.lr.ph10, label %._crit_edge11, !llvm.loop !7

.loopexit:                                        ; preds = %.lr.ph10, %30
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %43

.loopexit.split-lp:                               ; preds = %._crit_edge11
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %43

37:                                               ; preds = %28
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %9) #5
  br label %43

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  br label %43

._crit_edge11:                                    ; preds = %33, %._crit_edge
  %41 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEaSERKS8_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %42 unwind label %.loopexit.split-lp

42:                                               ; preds = %._crit_edge11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #5
  ret void

43:                                               ; preds = %.loopexit, %.loopexit.split-lp, %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %44

44:                                               ; preds = %43, %22, %20
  %.pn7 = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ], [ %.pn, %43 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn7
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEaSERKS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) 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 = { "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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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