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

; 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; 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 noundef zeroext i1 @_ZNSt8__detailneERKNS_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 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 void @_ZN6SESAME11GridCluster7addGridERKNS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(29) %1) #4 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.SESAME::DensityGrid", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca %"struct.std::pair.8", align 8
  %12 = alloca %"struct.std::pair.5", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca %"class.SESAME::DensityGrid", align 8
  %19 = alloca %"class.SESAME::DensityGrid", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull align 8 dereferenceable(29) %21)
  %22 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %20, ptr noundef %6)
          to label %23 unwind label %42

23:                                               ; preds = %2
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %6) #5
  %24 = zext i1 %22 to i8
  store i8 %24, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %25 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %20, i32 0, i32 0
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(29) %26)
  %28 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %9, i32 0, i32 0
  %29 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %28, i32 0, i32 0
  store ptr %27, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %30 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %20, i32 0, i32 0
  %31 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %30) #5
  %32 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %10, i32 0, i32 0
  %33 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %32, i32 0, i32 0
  store ptr %31, ptr %33, align 8
  %34 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br i1 %34, label %35, label %46

35:                                               ; preds = %23
  %36 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %37 = trunc i8 %36 to i1
  %38 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %20, i32 0, i32 0
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull align 8 dereferenceable(29) %39)
  %41 = zext i1 %37 to i8
  store i8 %41, ptr %40, align 1, !tbaa !9
  br label %59

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %6) #5
  br label %104

46:                                               ; preds = %23
  %47 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %20, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #5
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZSt9make_pairIRKN6SESAME11DensityGridERbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %11, ptr noundef nonnull align 8 dereferenceable(29) %48, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %49 = invoke { ptr, i8 } @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_OT_EE5valueES4_INSt8__detail14_Node_iteratorIS6_Lb0ELb1EEEbEE4typeESD_(ptr noundef nonnull align 8 dereferenceable(56) %47, ptr noundef nonnull align 8 dereferenceable(33) %11)
          to label %50 unwind label %55

50:                                               ; preds = %46
  %51 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %52 = extractvalue { ptr, i8 } %49, 0
  store ptr %52, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %54 = extractvalue { ptr, i8 } %49, 1
  store i8 %54, ptr %53, align 8
  call void @_ZNSt4pairIN6SESAME11DensityGridEbED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  br label %59

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @_ZNSt4pairIN6SESAME11DensityGridEbED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  br label %103

59:                                               ; preds = %50, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %60 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %20, i32 0, i32 0
  store ptr %60, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %61) #5
  %63 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %63, i32 0, i32 0
  store ptr %62, ptr %64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #5
  %67 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %68 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %67, i32 0, i32 0
  store ptr %66, ptr %68, align 8
  br label %69

69:                                               ; preds = %100, %59
  %70 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %70, label %72, label %71

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %102

72:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %73 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  store ptr %73, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 1
  %76 = load i8, ptr %75, align 8, !tbaa !13, !range !11, !noundef !12
  %77 = trunc i8 %76 to i1
  %78 = zext i1 %77 to i8
  store i8 %78, ptr %17, align 1, !tbaa !9
  %79 = load i8, ptr %17, align 1, !tbaa !9, !range !11, !noundef !12
  %80 = trunc i8 %79 to i1
  br i1 %80, label %99, label %81

81:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 0
  call void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %18, ptr noundef nonnull align 8 dereferenceable(29) %83)
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %19, ptr noundef nonnull align 8 dereferenceable(29) %18)
          to label %84 unwind label %90

84:                                               ; preds = %81
  %85 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %20, ptr noundef %19)
          to label %86 unwind label %94

86:                                               ; preds = %84
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.std::pair", ptr %87, i32 0, i32 1
  %89 = zext i1 %85 to i8
  store i8 %89, ptr %88, align 8, !tbaa !13
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %19) #5
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %99

90:                                               ; preds = %81
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  br label %98

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %19) #5
  br label %98

98:                                               ; preds = %94, %90
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %103

99:                                               ; preds = %86, %72
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %100

100:                                              ; preds = %99
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %69

102:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

103:                                              ; preds = %98, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %104

104:                                              ; preds = %103, %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %7, align 8
  %107 = load i32, ptr %8, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109
}

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

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_OT_EE5valueES4_INSt8__detail14_Node_iteratorIS6_Lb0ELb1EEEbEE4typeESD_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(33)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRKN6SESAME11DensityGridERbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 1 dereferenceable(1)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !10, i64 32}
!14 = !{!"_ZTSSt4pairIKN6SESAME11DensityGridEbE", !15, i64 0, !10, i64 32}
!15 = !{!"_ZTSN6SESAME11DensityGridE", !16, i64 0, !20, i64 24, !10, i64 28}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"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.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 }
%"struct.std::pair.8" = type { %"class.SESAME::DensityGrid", i8, [7 x i8] }

; 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 nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; 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 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 #1

; 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 void @_ZN6SESAME11GridCluster7addGridERKNS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(29) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i8, align 1
  %4 = alloca %"class.SESAME::DensityGrid", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::pair.8", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"class.SESAME::DensityGrid", align 8
  %11 = alloca %"class.SESAME::DensityGrid", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %4, ptr noundef nonnull align 8 dereferenceable(29) %1)
  %12 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %4)
          to label %13 unwind label %20

13:                                               ; preds = %2
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %4) #5
  %14 = zext i1 %12 to i8
  store i8 %14, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %15 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(29) %1)
  store ptr %15, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %16 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %16, ptr %6, align 8
  %17 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %17, label %18, label %22

18:                                               ; preds = %13
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(29) %1)
  store i8 %14, ptr %19, align 1, !tbaa !5
  br label %27

20:                                               ; preds = %2
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %4) #5
  br label %49

22:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  call void @_ZSt9make_pairIRKN6SESAME11DensityGridERbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %7, ptr noundef nonnull align 8 dereferenceable(29) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %23 = invoke { ptr, i8 } @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_OT_EE5valueES4_INSt8__detail14_Node_iteratorIS6_Lb0ELb1EEEbEE4typeESD_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(33) %7)
          to label %24 unwind label %25

24:                                               ; preds = %22
  call void @_ZNSt4pairIN6SESAME11DensityGridEbED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %27

25:                                               ; preds = %22
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN6SESAME11DensityGridEbED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %48

27:                                               ; preds = %24, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %28 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %28, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %29 = call ptr @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  store ptr %29, ptr %9, align 8
  %30 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %30, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %45, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  ret void

.lr.ph:                                           ; preds = %27, %45
  %31 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %32 = getelementptr inbounds i8, ptr %31, i64 32
  %33 = load i8, ptr %32, align 8, !tbaa !9, !range !18, !noundef !19
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %45, label %35

35:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef nonnull align 8 dereferenceable(29) %31)
  invoke void @_ZN6SESAME11DensityGridC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(29) %11, ptr noundef nonnull align 8 dereferenceable(29) %10)
          to label %36 unwind label %40

36:                                               ; preds = %35
  %37 = invoke noundef zeroext i1 @_ZN6SESAME11GridCluster8isInsideENS_11DensityGridE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull %11)
          to label %38 unwind label %42

38:                                               ; preds = %36
  %39 = zext i1 %37 to i8
  store i8 %39, ptr %32, align 8, !tbaa !9
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %11) #5
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %45

40:                                               ; preds = %35
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %36
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %11) #5
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @_ZN6SESAME11DensityGridD2Ev(ptr noundef nonnull align 8 dereferenceable(29) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %48

45:                                               ; preds = %38, %.lr.ph
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %47 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN6SESAME11DensityGridEbELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %47, label %.lr.ph, label %._crit_edge

48:                                               ; preds = %44, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %49

49:                                               ; preds = %48, %20
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %48 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_OT_EE5valueES4_INSt8__detail14_Node_iteratorIS6_Lb0ELb1EEEbEE4typeESD_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRKN6SESAME11DensityGridERbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN6SESAME11DensityGridEbELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTSSt4pairIKN6SESAME11DensityGridEbE", !11, i64 0, !6, i64 32}
!11 = !{!"_ZTSN6SESAME11DensityGridE", !12, i64 0, !17, i64 24, !6, i64 28}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}


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