; LLVM IR from thekyria/elabtsaot2 :: powersystem/powersystem.ll (ZN9elabtsaot11Powersystem17_rebuildBrIdBimapEv)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.boost::bimaps::relation::mutant_relation" = type { %"class.boost::bimaps::relation::detail::relation_info_hook" }
%"class.boost::bimaps::relation::detail::relation_info_hook" = type { %"class.boost::bimaps::relation::detail::relation_storage" }
%"class.boost::bimaps::relation::detail::relation_storage" = type { i32, i32 }
%"struct.std::pair.95" = type <{ %"struct.boost::bimaps::detail::set_view_iterator", i8, [7 x i8] }>
%"struct.boost::bimaps::detail::set_view_iterator" = type { %"class.boost::iterators::iterator_adaptor.97" }
%"class.boost::iterators::iterator_adaptor.97" = type { %"class.boost::multi_index::detail::bidir_node_iterator" }
%"class.boost::multi_index::detail::bidir_node_iterator" = type { ptr }
%"class.elabtsaot::Powersystem" = type { %"class.std::__cxx11::basic_string", double, double, i32, %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.13", %"class.boost::bimaps::bimap", %"class.boost::bimaps::bimap", %"class.boost::bimaps::bimap", %"class.boost::bimaps::bimap", %"class.std::vector.65", %"class.std::vector.65", %"class.std::vector.65" }
%"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<elabtsaot::Bus, std::allocator<elabtsaot::Bus>>::_Vector_impl" }
%"struct.std::_Vector_base<elabtsaot::Bus, std::allocator<elabtsaot::Bus>>::_Vector_impl" = type { %"struct.std::_Vector_base<elabtsaot::Bus, std::allocator<elabtsaot::Bus>>::_Vector_impl_data" }
%"struct.std::_Vector_base<elabtsaot::Bus, std::allocator<elabtsaot::Bus>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<elabtsaot::Branch, std::allocator<elabtsaot::Branch>>::_Vector_impl" }
%"struct.std::_Vector_base<elabtsaot::Branch, std::allocator<elabtsaot::Branch>>::_Vector_impl" = type { %"struct.std::_Vector_base<elabtsaot::Branch, std::allocator<elabtsaot::Branch>>::_Vector_impl_data" }
%"struct.std::_Vector_base<elabtsaot::Branch, std::allocator<elabtsaot::Branch>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<elabtsaot::Generator, std::allocator<elabtsaot::Generator>>::_Vector_impl" }
%"struct.std::_Vector_base<elabtsaot::Generator, std::allocator<elabtsaot::Generator>>::_Vector_impl" = type { %"struct.std::_Vector_base<elabtsaot::Generator, std::allocator<elabtsaot::Generator>>::_Vector_impl_data" }
%"struct.std::_Vector_base<elabtsaot::Generator, std::allocator<elabtsaot::Generator>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<elabtsaot::Load, std::allocator<elabtsaot::Load>>::_Vector_impl" }
%"struct.std::_Vector_base<elabtsaot::Load, std::allocator<elabtsaot::Load>>::_Vector_impl" = type { %"struct.std::_Vector_base<elabtsaot::Load, std::allocator<elabtsaot::Load>>::_Vector_impl_data" }
%"struct.std::_Vector_base<elabtsaot::Load, std::allocator<elabtsaot::Load>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::bimaps::bimap" = type { %"class.boost::bimaps::views::set_view", %"class.boost::multi_index::multi_index_container", %"class.boost::bimaps::views::map_view", %"class.boost::bimaps::views::map_view.42" }
%"class.boost::bimaps::views::set_view" = type { %"class.boost::bimaps::container_adaptor::set_adaptor" }
%"class.boost::bimaps::container_adaptor::set_adaptor" = type { %"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor" }
%"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor" = type { %"class.boost::bimaps::container_adaptor::associative_container_adaptor" }
%"class.boost::bimaps::container_adaptor::associative_container_adaptor" = type { %"class.boost::bimaps::container_adaptor::container_adaptor" }
%"class.boost::bimaps::container_adaptor::container_adaptor" = type { %"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag" }
%"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag" = type { [8 x i8], ptr }
%"class.boost::multi_index::multi_index_container" = type { [8 x i8], %"struct.boost::multi_index::detail::header_holder", [8 x i8], i64 }
%"struct.boost::multi_index::detail::header_holder" = type { ptr }
%"class.boost::bimaps::views::map_view" = type { %"class.boost::bimaps::container_adaptor::map_adaptor" }
%"class.boost::bimaps::container_adaptor::map_adaptor" = type { %"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor.25" }
%"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor.25" = type { %"class.boost::bimaps::container_adaptor::associative_container_adaptor.26" }
%"class.boost::bimaps::container_adaptor::associative_container_adaptor.26" = type { %"class.boost::bimaps::container_adaptor::container_adaptor.27" }
%"class.boost::bimaps::container_adaptor::container_adaptor.27" = type { %"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag.28" }
%"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag.28" = type { ptr }
%"class.boost::bimaps::views::map_view.42" = type { %"class.boost::bimaps::container_adaptor::map_adaptor.43" }
%"class.boost::bimaps::container_adaptor::map_adaptor.43" = type { %"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor.44" }
%"class.boost::bimaps::container_adaptor::ordered_associative_container_adaptor.44" = type { %"class.boost::bimaps::container_adaptor::associative_container_adaptor.45" }
%"class.boost::bimaps::container_adaptor::associative_container_adaptor.45" = type { %"class.boost::bimaps::container_adaptor::container_adaptor.46" }
%"class.boost::bimaps::container_adaptor::container_adaptor.46" = type { %"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag.47" }
%"struct.boost::bimaps::container_adaptor::detail::data_with_functor_bag.47" = type { ptr }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<std::set<unsigned long>, std::allocator<std::set<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<unsigned long>, std::allocator<std::set<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<unsigned long>, std::allocator<std::set<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<unsigned long>, std::allocator<std::set<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.elabtsaot::Branch" = type { i32, i8, i32, i32, double, double, double, double, double, double, double, double }

; 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
declare dso_local void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9elabtsaot11Powersystem17_rebuildBrIdBimapEv(ptr noundef nonnull align 8 dereferenceable(480) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.boost::bimaps::relation::mutant_relation", align 4
  %6 = alloca %"struct.std::pair.95", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.elabtsaot::Powersystem", ptr %7, i32 0, i32 9
  call void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %9 = getelementptr inbounds %"class.elabtsaot::Powersystem", ptr %7, i32 0, i32 5
  %10 = call ptr @_ZNSt6vectorIN9elabtsaot6BranchESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %11 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  store ptr %10, ptr %11, align 8
  br label %12

12:                                               ; preds = %26, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %13 = getelementptr inbounds %"class.elabtsaot::Powersystem", ptr %7, i32 0, i32 5
  %14 = call ptr @_ZNSt6vectorIN9elabtsaot6BranchESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %15 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %14, ptr %15, align 8
  %16 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %28

18:                                               ; preds = %12
  %19 = getelementptr inbounds %"class.elabtsaot::Powersystem", ptr %7, i32 0, i32 9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %20 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %21 = getelementptr inbounds %"class.elabtsaot::Branch", ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %"class.elabtsaot::Powersystem", ptr %7, i32 0, i32 9
  %24 = call noundef i64 @_ZNK5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %25 = trunc i64 %24 to i32
  call void @_ZN5boost6bimaps8relation15mutant_relationINS0_4tags6taggedIKjNS1_9member_at4leftEEENS4_IS5_NS6_5rightEEEN4mpl_2naELb0EEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef %22, i32 noundef %25)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE6insertERKNSN_ISF_SH_SP_Lb0EEE(ptr dead_on_unwind writable sret(%"struct.std::pair.95") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %26

26:                                               ; preds = %18
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  br label %12, !llvm.loop !14

28:                                               ; preds = %17
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost6bimaps8relation15mutant_relationINS0_4tags6taggedIKjNS1_9member_at4leftEEENS4_IS5_NS6_5rightEEEN4mpl_2naELb0EEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #1 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 = { 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 = { 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 = { 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, !11, i64 0}
!10 = !{!"_ZTSN9elabtsaot6BranchE", !11, i64 0, !12, i64 4, !11, i64 8, !11, i64 12, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.boost::bimaps::relation::mutant_relation" = type { %"class.boost::bimaps::relation::detail::relation_info_hook" }
%"class.boost::bimaps::relation::detail::relation_info_hook" = type { %"class.boost::bimaps::relation::detail::relation_storage" }
%"class.boost::bimaps::relation::detail::relation_storage" = type { i32, i32 }
%"struct.std::pair.95" = type <{ %"struct.boost::bimaps::detail::set_view_iterator", i8, [7 x i8] }>
%"struct.boost::bimaps::detail::set_view_iterator" = type { %"class.boost::iterators::iterator_adaptor.97" }
%"class.boost::iterators::iterator_adaptor.97" = type { %"class.boost::multi_index::detail::bidir_node_iterator" }
%"class.boost::multi_index::detail::bidir_node_iterator" = type { ptr }

; 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
declare dso_local void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9elabtsaot11Powersystem17_rebuildBrIdBimapEv(ptr noundef nonnull align 8 dereferenceable(480) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.boost::bimaps::relation::mutant_relation", align 4
  %5 = alloca %"struct.std::pair.95", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %8 = tail call ptr @_ZNSt6vectorIN9elabtsaot6BranchESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  store ptr %8, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = tail call ptr @_ZNSt6vectorIN9elabtsaot6BranchESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  store ptr %9, ptr %3, align 8
  %10 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  ret void

.lr.ph:                                           ; preds = %1, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %11 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = call noundef i64 @_ZNK5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %14 = trunc i64 %13 to i32
  call void @_ZN5boost6bimaps8relation15mutant_relationINS0_4tags6taggedIKjNS1_9member_at4leftEEENS4_IS5_NS6_5rightEEEN4mpl_2naELb0EEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef %12, i32 noundef %14)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN5boost6bimaps17container_adaptor17container_adaptorINS_11multi_index6detail13ordered_indexINS3_6memberINS0_8relation6detail16relation_storageINS0_4tags6taggedIKjNS7_9member_at4leftEEENSB_ISC_NSD_5rightEEELb1EEEjXadL_ZNSI_4leftEEEEESt4lessIjENS4_9nth_layerILi2ENS7_15mutant_relationISF_SH_N4mpl_2naELb1EEENS0_6detail10bimap_coreIjjSP_SP_SP_E12core_indicesESaISQ_EEENS_3mpl6v_itemISE_NSX_7vector0ISP_EELi0EEENS4_18ordered_unique_tagENS4_19null_augment_policyEEENSR_17set_view_iteratorINS4_19bidir_node_iteratorINS4_18ordered_index_nodeIS13_NS4_15index_node_baseISQ_SV_EEEEEEEENSR_23const_set_view_iteratorIS1B_EENS1_7support23iterator_facade_to_baseIS1C_S1E_EESP_NS8_28get_mutable_relation_functorISQ_EENS7_7support22get_above_view_functorISQ_EENSY_INSR_20set_view_key_to_baseIjSQ_SJ_EENSY_INS1_6detail27iterator_from_base_identityINS_9iterators16reverse_iteratorIS1B_EENS15_IS1T_EES1T_NS1D_IS1T_EEEENSX_6vectorISP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_SP_EELi1EEELi1EEEE6insertERKNSN_ISF_SH_SP_Lb0EEE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.95") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %16 = call ptr @_ZNSt6vectorIN9elabtsaot6BranchESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  store ptr %16, ptr %3, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN9elabtsaot6BranchESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !12
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost6bimaps8relation15mutant_relationINS0_4tags6taggedIKjNS1_9member_at4leftEEENS4_IS5_NS6_5rightEEEN4mpl_2naELb0EEC2Ejj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #1 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 = { 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 = { 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 = { 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 0}
!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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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