; LLVM IR from conradlee/network-community-benchmark :: comm_algs/GCECommunityFinder/Seed.ll (ZN4Seed19addNodeFromFrontierEi)

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

%struct.bloomGraph = type { %"class.std::vector", %"class.std::vector.29", %"class.std::vector.29", %"class.std::vector", i64, i64, %"class.std::vector.29" }
%"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.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.20" = type { i32, i32 }
%"struct.std::pair.27" = type { ptr, ptr }
%class.Seed = type { ptr, i8, %"class.std::set", %"class.std::vector", i32, i32, i8, %"class.std::map" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::pair<int, int>>, std::_Select1st<std::pair<const int, std::pair<int, int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::pair<int, int>>, std::_Select1st<std::pair<const int, std::pair<int, int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@theGlobalGraph = external global %struct.bloomGraph, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Seed19addNodeFromFrontierEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.20", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.27", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair.20", align 4
  %12 = alloca %"struct.std::pair.20", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 7
  %15 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %15, i64 8, i1 false)
  %16 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 7
  %17 = call noundef i64 @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEE5eraseERS4_(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %18 = getelementptr inbounds %"struct.std::pair.20", ptr %5, i32 0, i32 0
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = mul nsw i32 %19, 2
  %21 = call noundef i32 @_ZN4Seed16getInternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152) %13)
  %22 = add nsw i32 %20, %21
  store i32 %22, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %23 = call noundef i32 @_ZN4Seed16getExternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152) %13)
  %24 = getelementptr inbounds %"struct.std::pair.20", ptr %5, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = add nsw i32 %23, %25
  %27 = getelementptr inbounds %"struct.std::pair.20", ptr %5, i32 0, i32 0
  %28 = load i32, ptr %27, align 4, !tbaa !11
  %29 = sub nsw i32 %26, %28
  store i32 %29, ptr %7, align 4, !tbaa !9
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 4
  store i32 %30, ptr %31, align 8, !tbaa !14
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 5
  store i32 %32, ptr %33, align 4, !tbaa !33
  %34 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN4Seed7addNodeEi(ptr noundef nonnull align 8 dereferenceable(152) %13, i32 noundef %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = call { ptr, ptr } @_ZN10bloomGraphIiE10neighboursEi(ptr noundef nonnull align 8 dereferenceable(136) @theGlobalGraph, i32 noundef %35)
  %37 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %38 = extractvalue { ptr, ptr } %36, 0
  store ptr %38, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %40 = extractvalue { ptr, ptr } %36, 1
  store ptr %40, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %41 = getelementptr inbounds %"struct.std::pair.27", ptr %8, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !34
  store ptr %42, ptr %9, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %80, %2
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.std::pair.27", ptr %8, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !36
  %47 = icmp ne ptr %44, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %83

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i32, ptr %50, align 4, !tbaa !9
  store i32 %51, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = call noundef zeroext i1 @_ZN4Seed8containsEi(ptr noundef nonnull align 8 dereferenceable(152) %13, i32 noundef %52)
  br i1 %53, label %54, label %55

54:                                               ; preds = %49
  br label %79

55:                                               ; preds = %49
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = call noundef zeroext i1 @_ZN4Seed16frontierContainsEi(ptr noundef nonnull align 8 dereferenceable(152) %13, i32 noundef %56)
  br i1 %57, label %58, label %72

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %59 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 7
  %60 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %59, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %60, i64 8, i1 false)
  %61 = getelementptr inbounds %"struct.std::pair.20", ptr %11, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = add nsw i32 %62, 1
  %64 = getelementptr inbounds %"struct.std::pair.20", ptr %11, i32 0, i32 0
  store i32 %63, ptr %64, align 4, !tbaa !11
  %65 = getelementptr inbounds %"struct.std::pair.20", ptr %11, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = sub nsw i32 %66, 1
  %68 = getelementptr inbounds %"struct.std::pair.20", ptr %11, i32 0, i32 1
  store i32 %67, ptr %68, align 4, !tbaa !13
  %69 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 7
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %69, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %70, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %78

72:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = call i64 @_ZN4Seed59calculateNumberOfInternalAndExternalEdgesForNodeFromScratchEi(ptr noundef nonnull align 8 dereferenceable(152) %13, i32 noundef %73)
  store i64 %74, ptr %12, align 4
  %75 = getelementptr inbounds %class.Seed, ptr %13, i32 0, i32 7
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %75, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %76, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %78

78:                                               ; preds = %72, %58
  br label %79

79:                                               ; preds = %78, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds i32, ptr %81, i32 1
  store ptr %82, ptr %9, align 8, !tbaa !5
  br label %43, !llvm.loop !37

83:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZN10bloomGraphIiE10neighboursEi(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Seed8containsEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4Seed16getInternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4Seed16getExternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Seed16frontierContainsEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = !{!15, !10, i64 88}
!15 = !{!"_ZTS4Seed", !16, i64 8, !17, i64 16, !26, i64 64, !10, i64 88, !10, i64 92, !16, i64 96, !30, i64 104}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessIiE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !25, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSSt6vectorIiSaIiEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEE", !31, i64 0}
!31 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiS0_IiiEESt10_Select1stIS3_ESt4lessIiESaIS3_EE", !32, i64 0}
!32 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiS0_IiiEESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !20, i64 0, !22, i64 8}
!33 = !{!15, !10, i64 92}
!34 = !{!35, !6, i64 0}
!35 = !{!"_ZTSSt4pairIPiS0_E", !6, i64 0, !6, i64 8}
!36 = !{!35, !6, i64 8}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


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

%struct.bloomGraph = type { %"class.std::vector", %"class.std::vector.29", %"class.std::vector.29", %"class.std::vector", i64, i64, %"class.std::vector.29" }
%"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.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.20" = type { i32, i32 }

@theGlobalGraph = external global %struct.bloomGraph, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Seed19addNodeFromFrontierEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.20", align 4
  %6 = alloca %"struct.std::pair.20", align 8
  store i32 %1, ptr %3, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 104
  %8 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %.sroa.04.0.copyload = load i32, ptr %8, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %9 = call noundef i64 @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEE5eraseERS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %10 = shl nsw i32 %.sroa.04.0.copyload, 1
  %11 = call noundef i32 @_ZN4Seed16getInternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %12 = add nsw i32 %11, %10
  %13 = call noundef i32 @_ZN4Seed16getExternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %14 = sub i32 %.sroa.5.0.copyload, %.sroa.04.0.copyload
  %15 = add i32 %14, %13
  %16 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 %12, ptr %16, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %0, i64 92
  store i32 %15, ptr %17, align 4, !tbaa !29
  %18 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN4Seed7addNodeEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %18)
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = call { ptr, ptr } @_ZN10bloomGraphIiE10neighboursEi(ptr noundef nonnull align 8 dereferenceable(136) @theGlobalGraph, i32 noundef %19)
  %21 = extractvalue { ptr, ptr } %20, 0
  %22 = extractvalue { ptr, ptr } %20, 1
  %.not7 = icmp eq ptr %21, %22
  br i1 %.not7, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %23 = getelementptr inbounds i8, ptr %5, i64 4
  br label %24

._crit_edge:                                      ; preds = %45, %2
  ret void

24:                                               ; preds = %.lr.ph, %45
  %.08 = phi ptr [ %21, %.lr.ph ], [ %46, %45 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %25 = load i32, ptr %.08, align 4, !tbaa !5
  store i32 %25, ptr %4, align 4, !tbaa !5
  %26 = call noundef zeroext i1 @_ZN4Seed8containsEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %25)
  br i1 %26, label %45, label %27

27:                                               ; preds = %24
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = call noundef zeroext i1 @_ZN4Seed16frontierContainsEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %28)
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %32 = load i64, ptr %31, align 4
  %33 = trunc i64 %32 to i32
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %5, align 4, !tbaa !30
  %35 = lshr i64 %32, 32
  %36 = trunc nuw i64 %35 to i32
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %23, align 4, !tbaa !32
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %38, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %45

40:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = call i64 @_ZN4Seed59calculateNumberOfInternalAndExternalEdgesForNodeFromScratchEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %41)
  store i64 %42, ptr %6, align 8
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %45

45:                                               ; preds = %30, %40, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %46 = getelementptr inbounds i8, ptr %.08, i64 4
  %.not = icmp eq ptr %46, %22
  br i1 %.not, label %._crit_edge, label %24, !llvm.loop !33
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Seed8containsEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4Seed16getInternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4Seed16getExternalEdgesEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Seed16frontierContainsEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 88}
!10 = !{!"_ZTS4Seed", !11, i64 8, !12, i64 16, !22, i64 64, !6, i64 88, !6, i64 92, !11, i64 96, !26, i64 104}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessIiE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !21, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!26 = !{!"_ZTSSt3mapIiSt4pairIiiESt4lessIiESaIS0_IKiS1_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiS0_IiiEESt10_Select1stIS3_ESt4lessIiESaIS3_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiS0_IiiEESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !15, i64 0, !17, i64 8}
!29 = !{!10, !6, i64 92}
!30 = !{!31, !6, i64 0}
!31 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!32 = !{!31, !6, i64 4}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass