; LLVM IR from spirosmaggioros/AlgoPlus :: examples/graph (negativeCycles)

; 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.weighted_graph = type { %"class.std::unordered_map", %"class.std::__cxx11::basic_string", %"class.std::unordered_set" }
%"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 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.5" }
%"class.std::_Hashtable.5" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.21" = type { %"class.std::_Hashtable.22" }
%"class.std::_Hashtable.22" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i8, double }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.weighted_graph, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::unordered_map.21", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 144, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %14 unwind label %39

14:                                               ; preds = %0
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  invoke void @_ZN14weighted_graphIcEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt4pairIS8_IccElESaISA_EE(ptr noundef nonnull align 8 dereferenceable(144) %2, ptr noundef %3, ptr noundef %7)
          to label %15 unwind label %43

15:                                               ; preds = %14
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 97, i8 noundef signext 98, i64 noundef 1)
          to label %16 unwind label %48

16:                                               ; preds = %15
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 98, i8 noundef signext 99, i64 noundef 1)
          to label %17 unwind label %48

17:                                               ; preds = %16
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 98, i8 noundef signext 102, i64 noundef 4)
          to label %18 unwind label %48

18:                                               ; preds = %17
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 98, i8 noundef signext 103, i64 noundef 4)
          to label %19 unwind label %48

19:                                               ; preds = %18
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 99, i8 noundef signext 101, i64 noundef 1)
          to label %20 unwind label %48

20:                                               ; preds = %19
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 100, i8 noundef signext 99, i64 noundef 1)
          to label %21 unwind label %48

21:                                               ; preds = %20
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 101, i8 noundef signext 100, i64 noundef -3)
          to label %22 unwind label %48

22:                                               ; preds = %21
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 102, i8 noundef signext 103, i64 noundef 5)
          to label %23 unwind label %48

23:                                               ; preds = %22
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 102, i8 noundef signext 104, i64 noundef 3)
          to label %24 unwind label %48

24:                                               ; preds = %23
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext 103, i8 noundef signext 104, i64 noundef 4)
          to label %25 unwind label %48

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  store i8 97, ptr %8, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %9) #8
  %26 = load i8, ptr %8, align 1, !tbaa !5
  invoke void @_ZN14weighted_graphIcE12bellman_fordEc(ptr dead_on_unwind writable sret(%"class.std::unordered_map.21") align 8 %9, ptr noundef nonnull align 8 dereferenceable(144) %2, i8 noundef signext %26)
          to label %27 unwind label %52

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store ptr %9, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %28 = load ptr, ptr %10, align 8, !tbaa !8
  %29 = call ptr @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %28) #8
  %30 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %11, i32 0, i32 0
  %31 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %30, i32 0, i32 0
  store ptr %29, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %32 = load ptr, ptr %10, align 8, !tbaa !8
  %33 = call ptr @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %32) #8
  %34 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %12, i32 0, i32 0
  %35 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %34, i32 0, i32 0
  store ptr %33, ptr %35, align 8
  br label %36

36:                                               ; preds = %67, %27
  %37 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKcdELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %37, label %56, label %38

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %73

39:                                               ; preds = %0
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  br label %47

43:                                               ; preds = %14
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %5, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %6, align 4
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %47

47:                                               ; preds = %43, %39
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  br label %77

48:                                               ; preds = %24, %23, %22, %21, %20, %19, %18, %17, %16, %15
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  br label %76

52:                                               ; preds = %25
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  br label %75

56:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKcdELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %57, i64 16, i1 false)
  %58 = load i8, ptr %8, align 1, !tbaa !5
  %59 = sext i8 %58 to i32
  %60 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %61 = load i8, ptr %60, align 8, !tbaa !10
  %62 = sext i8 %61 to i32
  %63 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %64 = load double, ptr %63, align 8, !tbaa !13
  %65 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %59, i32 noundef %62, double noundef %64)
          to label %66 unwind label %69

66:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br label %67

67:                                               ; preds = %66
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKcdELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %36

69:                                               ; preds = %56
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %5, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #8
  br label %75

73:                                               ; preds = %38
  store i32 0, ptr %1, align 4
  call void @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @_ZN14weighted_graphIcED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %2) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr %2) #8
  %74 = load i32, ptr %1, align 4
  ret i32 %74

75:                                               ; preds = %69, %52
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  br label %76

76:                                               ; preds = %75, %48
  call void @_ZN14weighted_graphIcED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %2) #8
  br label %77

77:                                               ; preds = %76, %47
  call void @llvm.lifetime.end.p0(i64 144, ptr %2) #8
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %5, align 8
  %80 = load i32, ptr %6, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144), i8 noundef signext, i8 noundef signext, i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14weighted_graphIcE12bellman_fordEc(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map.21") align 8, ptr noundef nonnull align 8 dereferenceable(144), i8 noundef signext) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKcdELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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) #5

declare i32 @printf(ptr noundef, ...) #6

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

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "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 #7 = { 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 #8 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"_ZTSSt4pairIKcdE", !6, i64 0, !12, i64 8}
!12 = !{!"double", !6, i64 0}
!13 = !{!11, !12, i64 8}


; 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.weighted_graph = type { %"class.std::unordered_map", %"class.std::__cxx11::basic_string", %"class.std::unordered_set" }
%"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 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.5" }
%"class.std::_Hashtable.5" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<char, char>, long>, std::allocator<std::pair<std::pair<char, char>, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.21" = type { %"class.std::_Hashtable.22" }
%"class.std::_Hashtable.22" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.weighted_graph, align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.2", align 1
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::unordered_map.21", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %8 unwind label %24

8:                                                ; preds = %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZN14weighted_graphIcEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt4pairIS8_IccElESaISA_EE(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull %2, ptr noundef nonnull %4)
          to label %9 unwind label %26

9:                                                ; preds = %8
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 97, i8 noundef signext 98, i64 noundef 1)
          to label %10 unwind label %29

10:                                               ; preds = %9
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 98, i8 noundef signext 99, i64 noundef 1)
          to label %11 unwind label %29

11:                                               ; preds = %10
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 98, i8 noundef signext 102, i64 noundef 4)
          to label %12 unwind label %29

12:                                               ; preds = %11
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 98, i8 noundef signext 103, i64 noundef 4)
          to label %13 unwind label %29

13:                                               ; preds = %12
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 99, i8 noundef signext 101, i64 noundef 1)
          to label %14 unwind label %29

14:                                               ; preds = %13
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 100, i8 noundef signext 99, i64 noundef 1)
          to label %15 unwind label %29

15:                                               ; preds = %14
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 101, i8 noundef signext 100, i64 noundef -3)
          to label %16 unwind label %29

16:                                               ; preds = %15
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 102, i8 noundef signext 103, i64 noundef 5)
          to label %17 unwind label %29

17:                                               ; preds = %16
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 102, i8 noundef signext 104, i64 noundef 3)
          to label %18 unwind label %29

18:                                               ; preds = %17
  invoke void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 103, i8 noundef signext 104, i64 noundef 4)
          to label %19 unwind label %29

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #7
  invoke void @_ZN14weighted_graphIcE12bellman_fordEc(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map.21") align 8 %5, ptr noundef nonnull align 8 dereferenceable(144) %1, i8 noundef signext 97)
          to label %20 unwind label %31

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %21 = call ptr @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  store ptr %21, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %22 = call ptr @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  store ptr %22, ptr %7, align 8
  %23 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKcdELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt13unordered_mapIcdSt4hashIcESt8equal_toIcESaISt4pairIKcdEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  call void @_ZN14weighted_graphIcED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %1) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %1) #7
  ret i32 0

24:                                               ; preds = %0
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %8
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIS0_IccElESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %39

29:                                               ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %38

31:                                               ; preds = %19
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  br label %38

.lr.ph:                                           ; preds = %20, %.lr.ph
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKcdELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %.sroa.0.0.copyload = load i8, ptr %33, align 8
  %.sroa.41.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 8
  %.sroa.41.0.copyload = load double, ptr %.sroa.41.0..sroa_idx, align 8
  %34 = sext i8 %.sroa.0.0.copyload to i32
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 97, i32 noundef %34, double noundef %.sroa.41.0.copyload)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKcdELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %37 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKcdELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %37, label %.lr.ph, label %._crit_edge

38:                                               ; preds = %31, %29
  %.pn11 = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @_ZN14weighted_graphIcED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %1) #7
  br label %39

39:                                               ; preds = %38, %28
  %.pn11.pn = phi { ptr, i32 } [ %.pn11, %38 ], [ %.pn, %28 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn11.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZN14weighted_graphIcE8add_edgeEccl(ptr noundef nonnull align 8 dereferenceable(144), i8 noundef signext, i8 noundef signext, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14weighted_graphIcE12bellman_fordEc(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map.21") align 8, ptr noundef nonnull align 8 dereferenceable(144), i8 noundef signext) local_unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nofree nounwind "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 = { 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 #7 = { nounwind }

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

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


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