; LLVM IR from thekyria/elabtsaot2 :: auxiliary/graph.ll (ZN9elabtsaot5graph12countIslandsERKNS_11PowersystemE)

; 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.boost::adjacency_list.59" = type { %"class.boost::vec_adj_list_impl.60", %"class.boost::scoped_ptr" }
%"class.boost::vec_adj_list_impl.60" = type { %"class.std::__cxx11::list.63", %"class.std::vector.68" }
%"class.std::__cxx11::list.63" = type { %"class.std::__cxx11::_List_base.64" }
%"class.std::__cxx11::_List_base.64" = type { %"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::no_property>, std::allocator<boost::list_edge<unsigned long, boost::no_property>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::no_property>, std::allocator<boost::list_edge<unsigned long, boost::no_property>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::vector.68" = type { %"struct.std::_Vector_base.69" }
%"struct.std::_Vector_base.69" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::scoped_ptr" = type { ptr }
%"struct.boost::no_property" = type { i8 }
%"struct.std::pair.8" = type <{ %"class.boost::detail::edge_desc_impl", i8, [7 x i8] }>
%"class.boost::detail::edge_desc_impl" = type { %"struct.boost::detail::edge_base", ptr }
%"struct.boost::detail::edge_base" = type { i64, i64 }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.20" = type { i8 }
%"struct.boost::graph::detail::no_parameter" = type { i8 }
%"class.elabtsaot::Branch" = type { i32, i8, i32, i32, double, double, double, double, double, double, double, double }

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorImSaImEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9elabtsaot5graph12countIslandsERKNS_11PowersystemE(ptr noundef nonnull align 8 dereferenceable(480) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.boost::adjacency_list.59", align 8
  %4 = alloca %"struct.boost::no_property", align 1
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair.8", align 8
  %14 = alloca %"class.std::vector.18", align 8
  %15 = alloca %"class.std::allocator.20", align 1
  %16 = alloca i64, align 8
  %17 = alloca %"struct.boost::graph::detail::no_parameter", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = invoke noundef i64 @_ZNK9elabtsaot11Powersystem14getBranchCountEv(ptr noundef nonnull align 8 dereferenceable(480) %18)
          to label %20 unwind label %26

20:                                               ; preds = %1
  store i64 %19, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %63, %20
  %22 = load i64, ptr %8, align 8, !tbaa !9
  %23 = load i64, ptr %5, align 8, !tbaa !9
  %24 = icmp ne i64 %22, %23
  br i1 %24, label %30, label %25

25:                                               ; preds = %21
  store i32 2, ptr %9, align 4
  br label %81

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %6, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %7, align 4
  br label %104

30:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = invoke noundef ptr @_ZNK9elabtsaot11Powersystem9getBranchEm(ptr noundef nonnull align 8 dereferenceable(480) %31, i64 noundef %32)
          to label %34 unwind label %38

34:                                               ; preds = %30
  store ptr %33, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %42, label %37

37:                                               ; preds = %34
  store i32 2, ptr %9, align 4
  br label %60

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  br label %80

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.elabtsaot::Branch", ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !11
  %47 = invoke noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480) %43, i32 noundef %46)
          to label %48 unwind label %66

48:                                               ; preds = %42
  store i32 %47, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.elabtsaot::Branch", ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !17
  %53 = invoke noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480) %49, i32 noundef %52)
          to label %54 unwind label %70

54:                                               ; preds = %48
  store i32 %53, ptr %12, align 4, !tbaa !16
  %55 = load i32, ptr %11, align 4, !tbaa !16
  %56 = sext i32 %55 to i64
  %57 = load i32, ptr %12, align 4, !tbaa !16
  %58 = sext i32 %57 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  invoke void @_ZN5boost8add_edgeINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEENS_6detail12adj_list_genIS6_S2_S2_S3_S4_S4_S4_S5_E6configENS_23undirected_graph_helperISA_EEEESt4pairINT0_15edge_descriptorEbENSE_17vertex_descriptorESH_RNS_17vec_adj_list_implIT_SE_T1_EE(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %13, i64 noundef %56, i64 noundef %58, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %59 unwind label %74

59:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  store i32 0, ptr %9, align 4
  br label %60

60:                                               ; preds = %59, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %61 = load i32, ptr %9, align 4
  switch i32 %61, label %81 [
    i32 0, label %62
  ]

62:                                               ; preds = %60
  br label %63

63:                                               ; preds = %62
  %64 = load i64, ptr %8, align 8, !tbaa !9
  %65 = add i64 %64, 1
  store i64 %65, ptr %8, align 8, !tbaa !9
  br label %21, !llvm.loop !18

66:                                               ; preds = %42
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %6, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %7, align 4
  br label %79

70:                                               ; preds = %48
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %6, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %7, align 4
  br label %78

74:                                               ; preds = %54
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %78

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

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

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

81:                                               ; preds = %60, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %82

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %83 = invoke noundef i64 @_ZN5boost12num_verticesINS_6detail12adj_list_genINS_14adjacency_listINS_4vecSES4_NS_11undirectedSENS_11no_propertyES6_S6_NS_5listSEEES4_S4_S5_S6_S6_S6_S7_E6configENS_23undirected_graph_helperISA_EEEENT_18vertices_size_typeERKNS_15adj_list_helperISD_T0_EE(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %84 unwind label %91

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt6vectorImSaImEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %83, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %85 unwind label %95

85:                                               ; preds = %84
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #6
  %87 = invoke noundef i64 @_ZN5boost20connected_componentsINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEEPmEENS_15property_traitsIT0_E10value_typeERKT_S9_NS_11enable_if_cIXsr19is_base_and_derivedINS_21vertex_list_graph_tagENS_12graph_traitsISC_E18traversal_categoryEEE5valueENS_5graph6detail12no_parameterEE4typeE(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef %86)
          to label %88 unwind label %99

88:                                               ; preds = %85
  store i64 %87, ptr %16, align 8, !tbaa !9
  %89 = load i64, ptr %16, align 8, !tbaa !9
  %90 = trunc i64 %89 to i32
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  ret i32 %90

91:                                               ; preds = %82
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %103

95:                                               ; preds = %84
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %103

99:                                               ; preds = %85
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %103

103:                                              ; preds = %99, %95, %91
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %104

104:                                              ; preds = %103, %80, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %6, align 8
  %107 = load i32, ptr %7, 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 void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare noundef i64 @_ZNK9elabtsaot11Powersystem14getBranchCountEv(ptr noundef nonnull align 8 dereferenceable(480)) #3

declare noundef ptr @_ZNK9elabtsaot11Powersystem9getBranchEm(ptr noundef nonnull align 8 dereferenceable(480), i64 noundef) #3

declare noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480), i32 noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost12num_verticesINS_6detail12adj_list_genINS_14adjacency_listINS_4vecSES4_NS_11undirectedSENS_11no_propertyES6_S6_NS_5listSEEES4_S4_S5_S6_S6_S6_S7_E6configENS_23undirected_graph_helperISA_EEEENT_18vertices_size_typeERKNS_15adj_list_helperISD_T0_EE(ptr noundef nonnull align 1 dereferenceable(1)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost20connected_componentsINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEEPmEENS_15property_traitsIT0_E10value_typeERKT_S9_NS_11enable_if_cIXsr19is_base_and_derivedINS_21vertex_list_graph_tagENS_12graph_traitsISC_E18traversal_categoryEEE5valueENS_5graph6detail12no_parameterEE4typeE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 #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 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN9elabtsaot6BranchE", !13, i64 0, !14, i64 4, !13, i64 8, !13, i64 12, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !13, i64 12}
!18 = distinct !{!18, !19}
!19 = !{!"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"

%"class.boost::adjacency_list.59" = type { %"class.boost::vec_adj_list_impl.60", %"class.boost::scoped_ptr" }
%"class.boost::vec_adj_list_impl.60" = type { %"class.std::__cxx11::list.63", %"class.std::vector.68" }
%"class.std::__cxx11::list.63" = type { %"class.std::__cxx11::_List_base.64" }
%"class.std::__cxx11::_List_base.64" = type { %"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::no_property>, std::allocator<boost::list_edge<unsigned long, boost::no_property>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::no_property>, std::allocator<boost::list_edge<unsigned long, boost::no_property>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::vector.68" = type { %"struct.std::_Vector_base.69" }
%"struct.std::_Vector_base.69" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>::config::stored_vertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::scoped_ptr" = type { ptr }
%"struct.boost::no_property" = type { i8 }
%"struct.std::pair.8" = type <{ %"class.boost::detail::edge_desc_impl", i8, [7 x i8] }>
%"class.boost::detail::edge_desc_impl" = type { %"struct.boost::detail::edge_base", ptr }
%"struct.boost::detail::edge_base" = type { i64, i64 }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.20" = type { i8 }

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorImSaImEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9elabtsaot5graph12countIslandsERKNS_11PowersystemE(ptr noundef nonnull align 8 dereferenceable(480) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.boost::adjacency_list.59", align 8
  %3 = alloca %"struct.boost::no_property", align 1
  %4 = alloca %"struct.std::pair.8", align 8
  %5 = alloca %"class.std::vector.18", align 8
  %6 = alloca %"class.std::allocator.20", align 1
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %7 = invoke noundef i64 @_ZNK9elabtsaot11Powersystem14getBranchCountEv(ptr noundef nonnull align 8 dereferenceable(480) %0)
          to label %.preheader unwind label %8

.preheader:                                       ; preds = %1
  %.not31 = icmp eq i64 %7, 0
  br i1 %.not31, label %.critedge, label %.lr.ph

8:                                                ; preds = %1
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %47

.lr.ph:                                           ; preds = %.preheader, %25
  %.02132 = phi i64 [ %26, %25 ], [ 0, %.preheader ]
  %10 = invoke noundef ptr @_ZNK9elabtsaot11Powersystem9getBranchEm(ptr noundef nonnull align 8 dereferenceable(480) %0, i64 noundef %.02132)
          to label %11 unwind label %12

11:                                               ; preds = %.lr.ph
  %.not24.not = icmp eq ptr %10, null
  br i1 %.not24.not, label %.critedge, label %14

12:                                               ; preds = %.lr.ph
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %47

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %10, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = invoke noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480) %0, i32 noundef %16)
          to label %18 unwind label %27

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %10, i64 12
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = invoke noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480) %0, i32 noundef %20)
          to label %22 unwind label %29

22:                                               ; preds = %18
  %23 = sext i32 %17 to i64
  %24 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  invoke void @_ZN5boost8add_edgeINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEENS_6detail12adj_list_genIS6_S2_S2_S3_S4_S4_S4_S5_E6configENS_23undirected_graph_helperISA_EEEESt4pairINT0_15edge_descriptorEbENSE_17vertex_descriptorESH_RNS_17vec_adj_list_implIT_SE_T1_EE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %4, i64 noundef %23, i64 noundef %24, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %25 unwind label %31

25:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %26 = add nuw i64 %.02132, 1
  %.not = icmp eq i64 %26, %7
  br i1 %.not, label %.critedge, label %.lr.ph, !llvm.loop !13

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %47

29:                                               ; preds = %18
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %47

31:                                               ; preds = %22
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %47

.critedge:                                        ; preds = %25, %11, %.preheader
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %33 = invoke noundef i64 @_ZN5boost12num_verticesINS_6detail12adj_list_genINS_14adjacency_listINS_4vecSES4_NS_11undirectedSENS_11no_propertyES6_S6_NS_5listSEEES4_S4_S5_S6_S6_S6_S7_E6configENS_23undirected_graph_helperISA_EEEENT_18vertices_size_typeERKNS_15adj_list_helperISD_T0_EE(ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %34 unwind label %40

34:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaImEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorImSaImEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %35 unwind label %42

35:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #6
  %37 = invoke noundef i64 @_ZN5boost20connected_componentsINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEEPmEENS_15property_traitsIT0_E10value_typeERKT_S9_NS_11enable_if_cIXsr19is_base_and_derivedINS_21vertex_list_graph_tagENS_12graph_traitsISC_E18traversal_categoryEEE5valueENS_5graph6detail12no_parameterEE4typeE(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull %36)
          to label %38 unwind label %44

38:                                               ; preds = %35
  %39 = trunc i64 %37 to i32
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  ret i32 %39

40:                                               ; preds = %.critedge
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %46

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %46

44:                                               ; preds = %35
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %46

46:                                               ; preds = %44, %42, %40
  %.pn28 = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %47

47:                                               ; preds = %12, %29, %31, %27, %46, %8
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %46 ], [ %9, %8 ], [ %13, %12 ], [ %28, %27 ], [ %32, %31 ], [ %30, %29 ]
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_11undirectedSENS_11no_propertyES3_S3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn28.pn
}

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

declare noundef i64 @_ZNK9elabtsaot11Powersystem14getBranchCountEv(ptr noundef nonnull align 8 dereferenceable(480)) local_unnamed_addr #3

declare noundef ptr @_ZNK9elabtsaot11Powersystem9getBranchEm(ptr noundef nonnull align 8 dereferenceable(480), i64 noundef) local_unnamed_addr #3

declare noundef i32 @_ZNK9elabtsaot11Powersystem12getBus_intIdEj(ptr noundef nonnull align 8 dereferenceable(480), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost12num_verticesINS_6detail12adj_list_genINS_14adjacency_listINS_4vecSES4_NS_11undirectedSENS_11no_propertyES6_S6_NS_5listSEEES4_S4_S5_S6_S6_S6_S7_E6configENS_23undirected_graph_helperISA_EEEENT_18vertices_size_typeERKNS_15adj_list_helperISD_T0_EE(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost20connected_componentsINS_14adjacency_listINS_4vecSES2_NS_11undirectedSENS_11no_propertyES4_S4_NS_5listSEEEPmEENS_15property_traitsIT0_E10value_typeERKT_S9_NS_11enable_if_cIXsr19is_base_and_derivedINS_21vertex_list_graph_tagENS_12graph_traitsISC_E18traversal_categoryEEE5valueENS_5graph6detail12no_parameterEE4typeE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorImED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTSN9elabtsaot6BranchE", !7, i64 0, !10, i64 4, !7, i64 8, !7, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !7, i64 12}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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