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

; 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::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

; 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 i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK6SESAME11GridClustereqERS0_(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(116) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #2
  store i8 0, ptr %5, align 1, !tbaa !9
  %7 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %6, i32 0, i32 2
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %9, i32 0, i32 2
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = icmp eq i32 %8, %11
  br i1 %12, label %13, label %28

13:                                               ; preds = %2
  %14 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %6, i32 0, i32 0
  %15 = call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %14) #2
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %16, i32 0, i32 0
  %18 = call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %17) #2
  %19 = icmp eq i64 %15, %18
  br i1 %19, label %20, label %28

20:                                               ; preds = %13
  %21 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %6, i32 0, i32 1
  %22 = call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %21) #2
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.SESAME::GridCluster", ptr %23, i32 0, i32 1
  %25 = call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %24) #2
  %26 = icmp eq i64 %22, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  store i8 1, ptr %5, align 1, !tbaa !9
  br label %28

28:                                               ; preds = %27, %20, %13, %2
  %29 = load i8, ptr %5, align 1, !tbaa !9, !range !20, !noundef !21
  %30 = trunc i8 %29 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #2
  ret i1 %30
}

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 = { 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 = !{!12, !19, i64 112}
!12 = !{!"_ZTSN6SESAME11GridClusterE", !13, i64 0, !13, i64 56, !19, i64 112}
!13 = !{!"_ZTSSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableIN6SESAME11DensityGridESt4pairIKS1_bESaIS4_ENSt8__detail10_Select1stENS0_9EqualGridENS0_11GridKeyHashENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !6, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}


; 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"

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK6SESAME11GridClustereqERS0_(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(116) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 112
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 112
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %4, %6
  br i1 %7, label %8, label %18

8:                                                ; preds = %2
  %9 = tail call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #1
  %10 = tail call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %1) #1
  %11 = icmp eq i64 %9, %10
  br i1 %11, label %12, label %18

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 56
  %14 = tail call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %13) #1
  %15 = getelementptr inbounds i8, ptr %1, i64 56
  %16 = tail call noundef i64 @_ZNKSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %15) #1
  %17 = icmp eq i64 %14, %16
  br label %18

18:                                               ; preds = %12, %8, %2
  %.0 = phi i1 [ false, %8 ], [ false, %2 ], [ %17, %12 ]
  ret i1 %.0
}

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 = { 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, !16, i64 112}
!6 = !{!"_ZTSN6SESAME11GridClusterE", !7, i64 0, !7, i64 56, !16, i64 112}
!7 = !{!"_ZTSSt13unordered_mapIN6SESAME11DensityGridEbNS0_11GridKeyHashENS0_9EqualGridESaISt4pairIKS1_bEEE", !8, i64 0}
!8 = !{!"_ZTSSt10_HashtableIN6SESAME11DensityGridESt4pairIKS1_bESaIS4_ENSt8__detail10_Select1stENS0_9EqualGridENS0_11GridKeyHashENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb1ELb0ELb1EEEE", !9, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !9, i64 48}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !9, i64 0}
!14 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !12, i64 8}
!15 = !{!"float", !10, i64 0}
!16 = !{!"int", !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass