; LLVM IR from tommasocerruti/algolab-2024 :: src/week11/asterix_in_switzerland/solution.ll (Z5solvev)

; 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.boost::adjacency_list" = type { %"class.boost::vec_adj_list_impl", %"class.boost::scoped_ptr" }
%"class.boost::vec_adj_list_impl" = type { %"class.std::__cxx11::list", %"class.std::vector" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, std::allocator<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, std::allocator<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>>>::_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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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 }
%class.edge_adder = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.boost::adjacency_list", align 8
  %4 = alloca %"struct.boost::no_property", align 1
  %5 = alloca %class.edge_adder, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, i64 noundef %21, 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
  invoke void @_ZN10edge_adderC2ERN5boost14adjacency_listINS0_4vecSES2_NS0_9directedSENS0_11no_propertyENS0_8propertyINS0_15edge_capacity_tElNS5_INS0_24edge_residual_capacity_tElNS5_INS0_14edge_reverse_tENS0_6detail14edge_desc_implINS0_12directed_tagEmEES4_EEEEEES4_NS0_5listSEEE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %22 unwind label %32

22:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %23 = invoke noundef i64 @_ZN5boost10add_vertexINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEENS9_12adj_list_genISH_S2_S2_S3_S4_SF_S4_SG_E6configENS_21directed_graph_helperISK_EEEENT0_17vertex_descriptorERNS_17vec_adj_list_implIT_SN_T1_EE(ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %24 unwind label %36

24:                                               ; preds = %22
  store i64 %23, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %25 = invoke noundef i64 @_ZN5boost10add_vertexINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEENS9_12adj_list_genISH_S2_S2_S3_S4_SF_S4_SG_E6configENS_21directed_graph_helperISK_EEEENT0_17vertex_descriptorERNS_17vec_adj_list_implIT_SN_T1_EE(ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %26 unwind label %40

26:                                               ; preds = %24
  store i64 %25, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %72, %26
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %44, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %75

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  br label %123

36:                                               ; preds = %22
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %122

40:                                               ; preds = %24
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  br label %121

44:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %46 unwind label %59

46:                                               ; preds = %44
  %47 = load i32, ptr %12, align 4, !tbaa !5
  %48 = icmp sge i32 %47, 0
  br i1 %48, label %49, label %63

49:                                               ; preds = %46
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = add nsw i32 %51, %50
  store i32 %52, ptr %10, align 4, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = trunc i64 %53 to i32
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %54, i32 noundef %55, i64 noundef %57)
          to label %58 unwind label %59

58:                                               ; preds = %49
  br label %71

59:                                               ; preds = %63, %49, %44
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %120

63:                                               ; preds = %46
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = load i64, ptr %9, align 8, !tbaa !9
  %66 = trunc i64 %65 to i32
  %67 = load i32, ptr %12, align 4, !tbaa !5
  %68 = sub nsw i32 0, %67
  %69 = sext i32 %68 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %64, i32 noundef %66, i64 noundef %69)
          to label %70 unwind label %59

70:                                               ; preds = %63
  br label %71

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

72:                                               ; preds = %71
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %11, align 4, !tbaa !5
  br label %27, !llvm.loop !11

75:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %93, %75
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %100

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %82 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %83 unwind label %96

83:                                               ; preds = %81
  %84 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %85 unwind label %96

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %87 unwind label %96

87:                                               ; preds = %85
  %88 = load i32, ptr %14, align 4, !tbaa !5
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = load i32, ptr %16, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %88, i32 noundef %89, i64 noundef %91)
          to label %92 unwind label %96

92:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %13, align 4, !tbaa !5
  br label %76, !llvm.loop !13

96:                                               ; preds = %87, %85, %83, %81
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %6, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %120

100:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %101 = load i64, ptr %8, align 8, !tbaa !9
  %102 = load i64, ptr %9, align 8, !tbaa !9
  %103 = invoke noundef i64 @_ZN5boost21push_relabel_max_flowINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEEEENS_15property_traitsINS_12property_mapIT_S6_vE10const_typeEE10value_typeERSK_NS_12graph_traitsISK_E17vertex_descriptorESS_(ptr noundef nonnull align 8 dereferenceable(56) %3, i64 noundef %101, i64 noundef %102)
          to label %104 unwind label %112

104:                                              ; preds = %100
  store i64 %103, ptr %17, align 8, !tbaa !9
  %105 = load i64, ptr %17, align 8, !tbaa !9
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %105, %107
  br i1 %108, label %109, label %116

109:                                              ; preds = %104
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %111 unwind label %112

111:                                              ; preds = %109
  br label %119

112:                                              ; preds = %116, %109, %100
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %6, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %120

116:                                              ; preds = %104
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
          to label %118 unwind label %112

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

120:                                              ; preds = %112, %96, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %121

121:                                              ; preds = %120, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %122

122:                                              ; preds = %121, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %123

123:                                              ; preds = %122, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %6, align 8
  %126 = load i32, ptr %7, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 nounwind uwtable
declare dso_local void @_ZN10edge_adderC2ERN5boost14adjacency_listINS0_4vecSES2_NS0_9directedSENS0_11no_propertyENS0_8propertyINS0_15edge_capacity_tElNS5_INS0_24edge_residual_capacity_tElNS5_INS0_14edge_reverse_tENS0_6detail14edge_desc_implINS0_12directed_tagEmEES4_EEEEEES4_NS0_5listSEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i64 noundef) #0 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.boost::adjacency_list" = type { %"class.boost::vec_adj_list_impl", %"class.boost::scoped_ptr" }
%"class.boost::vec_adj_list_impl" = type { %"class.std::__cxx11::list", %"class.std::vector" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, std::allocator<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, std::allocator<boost::list_edge<unsigned long, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>>>::_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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, boost::no_property, boost::listS>::config::stored_vertex, std::allocator<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>>, boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_capacity_t, long, boost::property<boost::edge_residual_capacity_t, long, boost::property<boost::edge_reverse_t, boost::detail::edge_desc_impl<boost::directed_tag, unsigned long>>>>, 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 }
%class.edge_adder = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.boost::adjacency_list", align 8
  %4 = alloca %"struct.boost::no_property", align 1
  %5 = alloca %class.edge_adder, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #6
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, i64 noundef %13, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN10edge_adderC2ERN5boost14adjacency_listINS0_4vecSES2_NS0_9directedSENS0_11no_propertyENS0_8propertyINS0_15edge_capacity_tElNS5_INS0_24edge_residual_capacity_tElNS5_INS0_14edge_reverse_tENS0_6detail14edge_desc_implINS0_12directed_tagEmEES4_EEEEEES4_NS0_5listSEEE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(56) %3)
  %14 = invoke noundef i64 @_ZN5boost10add_vertexINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEENS9_12adj_list_genISH_S2_S2_S3_S4_SF_S4_SG_E6configENS_21directed_graph_helperISK_EEEENT0_17vertex_descriptorERNS_17vec_adj_list_implIT_SN_T1_EE(ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %15 unwind label %24

15:                                               ; preds = %0
  %16 = invoke noundef i64 @_ZN5boost10add_vertexINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEENS9_12adj_list_genISH_S2_S2_S3_S4_SF_S4_SG_E6configENS_21directed_graph_helperISK_EEEENT0_17vertex_descriptorERNS_17vec_adj_list_implIT_SN_T1_EE(ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %.preheader26 unwind label %26

.preheader26:                                     ; preds = %15
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader26
  %19 = trunc i64 %16 to i32
  %20 = trunc i64 %14 to i32
  br label %28

.preheader.loopexit:                              ; preds = %41
  %21 = zext nneg i32 %.117 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader26
  %.016.lcssa = phi i64 [ 0, %.preheader26 ], [ %21, %.preheader.loopexit ]
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph31, label %._crit_edge

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

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %68

28:                                               ; preds = %.lr.ph, %41
  %.01529 = phi i32 [ 0, %.lr.ph ], [ %42, %41 ]
  %.01628 = phi i32 [ 0, %.lr.ph ], [ %.117, %41 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %30 unwind label %36

30:                                               ; preds = %28
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, -1
  br i1 %32, label %33, label %38

33:                                               ; preds = %30
  %34 = add nuw nsw i32 %31, %.01628
  %35 = zext nneg i32 %31 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %20, i32 noundef %.01529, i64 noundef %35)
          to label %41 unwind label %36

36:                                               ; preds = %38, %33, %28
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %68

38:                                               ; preds = %30
  %39 = sub nsw i32 0, %31
  %40 = zext nneg i32 %39 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %.01529, i32 noundef %19, i64 noundef %40)
          to label %41 unwind label %36

41:                                               ; preds = %38, %33
  %.117 = phi i32 [ %34, %33 ], [ %.01628, %38 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %42 = add nuw nsw i32 %.01529, 1
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %28, label %.preheader.loopexit, !llvm.loop !9

._crit_edge:                                      ; preds = %56, %.preheader
  %45 = invoke noundef i64 @_ZN5boost21push_relabel_max_flowINS_14adjacency_listINS_4vecSES2_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS5_INS_24edge_residual_capacity_tElNS5_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES4_EEEEEES4_NS_5listSEEEEENS_15property_traitsINS_12property_mapIT_S6_vE10const_typeEE10value_typeERSK_NS_12graph_traitsISK_E17vertex_descriptorESS_(ptr noundef nonnull align 8 dereferenceable(56) %3, i64 noundef %14, i64 noundef %16)
          to label %.invoke unwind label %65

.lr.ph31:                                         ; preds = %.preheader, %56
  %.01430 = phi i32 [ %57, %56 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %47 unwind label %60

47:                                               ; preds = %.lr.ph31
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %49 unwind label %60

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %51 unwind label %60

51:                                               ; preds = %49
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %52, i32 noundef %53, i64 noundef %55)
          to label %56 unwind label %60

56:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %57 = add nuw nsw i32 %.01430, 1
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %.lr.ph31, label %._crit_edge, !llvm.loop !11

60:                                               ; preds = %51, %49, %47, %.lr.ph31
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %68

.invoke:                                          ; preds = %._crit_edge
  %62 = icmp slt i64 %45, %.016.lcssa
  %63 = select i1 %62, ptr @.str, ptr @.str.5
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %63)
          to label %67 unwind label %65

65:                                               ; preds = %.invoke, %._crit_edge
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %68

67:                                               ; preds = %.invoke
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

68:                                               ; preds = %26, %65, %60, %36, %24
  %.pn.pn.pn = phi { ptr, i32 } [ %25, %24 ], [ %27, %26 ], [ %37, %36 ], [ %61, %60 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost14adjacency_listINS_4vecSES1_NS_9directedSENS_11no_propertyENS_8propertyINS_15edge_capacity_tElNS4_INS_24edge_residual_capacity_tElNS4_INS_14edge_reverse_tENS_6detail14edge_desc_implINS_12directed_tagEmEES3_EEEEEES3_NS_5listSEEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 nounwind uwtable
declare dso_local void @_ZN10edge_adderC2ERN5boost14adjacency_listINS0_4vecSES2_NS0_9directedSENS0_11no_propertyENS0_8propertyINS0_15edge_capacity_tElNS5_INS0_24edge_residual_capacity_tElNS5_INS0_14edge_reverse_tENS0_6detail14edge_desc_implINS0_12directed_tagEmEES4_EEEEEES4_NS0_5listSEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass