; LLVM IR from tommasocerruti/algolab-2024 :: src/week06/kingdom_defense/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 i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = 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
  %21 = 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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = add nsw i32 %23, 2
  %25 = sext i32 %24 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 %25, 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 %26 unwind label %36

26:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %27 = 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 %28 unwind label %40

28:                                               ; preds = %26
  store i64 %27, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %29 = 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 %30 unwind label %44

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

31:                                               ; preds = %68, %30
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %48, label %35

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

36:                                               ; preds = %0
  %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 %148

40:                                               ; preds = %26
  %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 %147

44:                                               ; preds = %28
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %6, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %7, align 4
  br label %146

48:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %50 unwind label %71

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %52 unwind label %71

52:                                               ; preds = %50
  %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 = add nsw i32 %55, 2
  %57 = load i64, ptr %12, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %54, i32 noundef %56, i64 noundef %57)
          to label %58 unwind label %71

58:                                               ; preds = %52
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = add nsw i32 %59, 2
  %61 = load i64, ptr %9, align 8, !tbaa !9
  %62 = trunc i64 %61 to i32
  %63 = load i64, ptr %13, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %60, i32 noundef %62, i64 noundef %63)
          to label %64 unwind label %71

64:                                               ; preds = %58
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = load i64, ptr %10, align 8, !tbaa !9
  %67 = add nsw i64 %66, %65
  store i64 %67, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %68

68:                                               ; preds = %64
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %11, align 4, !tbaa !5
  br label %31, !llvm.loop !11

71:                                               ; preds = %58, %52, %50, %48
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %145

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

76:                                               ; preds = %114, %75
  %77 = load i32, ptr %14, 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 %14) #6
  br label %126

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #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) %15)
          to label %83 unwind label %117

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) %16)
          to label %85 unwind label %117

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

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %89 unwind label %117

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %90 = load i64, ptr %18, align 8, !tbaa !9
  %91 = load i64, ptr %17, align 8, !tbaa !9
  %92 = sub nsw i64 %90, %91
  store i64 %92, ptr %19, align 8, !tbaa !9
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = add nsw i32 %93, 2
  %95 = load i32, ptr %16, align 4, !tbaa !5
  %96 = add nsw i32 %95, 2
  %97 = load i64, ptr %19, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %94, i32 noundef %96, i64 noundef %97)
          to label %98 unwind label %121

98:                                               ; preds = %89
  %99 = load i64, ptr %8, align 8, !tbaa !9
  %100 = trunc i64 %99 to i32
  %101 = load i32, ptr %16, align 4, !tbaa !5
  %102 = add nsw i32 %101, 2
  %103 = load i64, ptr %17, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %100, i32 noundef %102, i64 noundef %103)
          to label %104 unwind label %121

104:                                              ; preds = %98
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = add nsw i32 %105, 2
  %107 = load i64, ptr %9, align 8, !tbaa !9
  %108 = trunc i64 %107 to i32
  %109 = load i64, ptr %17, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %106, i32 noundef %108, i64 noundef %109)
          to label %110 unwind label %121

110:                                              ; preds = %104
  %111 = load i64, ptr %17, align 8, !tbaa !9
  %112 = load i64, ptr %10, align 8, !tbaa !9
  %113 = add nsw i64 %112, %111
  store i64 %113, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %114

114:                                              ; preds = %110
  %115 = load i32, ptr %14, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %14, align 4, !tbaa !5
  br label %76, !llvm.loop !13

117:                                              ; preds = %87, %85, %83, %81
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %6, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %7, align 4
  br label %125

121:                                              ; preds = %104, %98, %89
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %6, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %125

125:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  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 %145

126:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %127 = load i64, ptr %8, align 8, !tbaa !9
  %128 = load i64, ptr %9, align 8, !tbaa !9
  %129 = 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 %127, i64 noundef %128)
          to label %130 unwind label %137

130:                                              ; preds = %126
  store i64 %129, ptr %20, align 8, !tbaa !9
  %131 = load i64, ptr %20, align 8, !tbaa !9
  %132 = load i64, ptr %10, align 8, !tbaa !9
  %133 = icmp eq i64 %131, %132
  br i1 %133, label %134, label %141

134:                                              ; preds = %130
  %135 = 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 %136 unwind label %137

136:                                              ; preds = %134
  br label %144

137:                                              ; preds = %141, %134, %126
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %6, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %145

141:                                              ; preds = %130
  %142 = 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 %143 unwind label %137

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, 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

145:                                              ; preds = %137, %125, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %146

146:                                              ; preds = %145, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %147

147:                                              ; preds = %146, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %148

148:                                              ; preds = %147, %36
  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 %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %6, align 8
  %151 = load i32, ptr %7, align 4
  %152 = insertvalue { ptr, i32 } poison, ptr %150, 0
  %153 = insertvalue { ptr, i32 } %152, i32 %151, 1
  resume { ptr, i32 } %153
}

; 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; 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 i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %12 = 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)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #6
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = add nsw i32 %14, 2
  %16 = sext i32 %15 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 %16, 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)
  %17 = 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 %18 unwind label %28

18:                                               ; preds = %0
  %19 = 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 %.preheader31 unwind label %30

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

.lr.ph:                                           ; preds = %.preheader31
  %22 = trunc i64 %17 to i32
  %23 = trunc i64 %19 to i32
  br label %32

.preheader:                                       ; preds = %41, %.preheader31
  %.024.lcssa = phi i64 [ 0, %.preheader31 ], [ %43, %41 ]
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph39, label %._crit_edge

.lr.ph39:                                         ; preds = %.preheader
  %26 = trunc i64 %17 to i32
  %27 = trunc i64 %19 to i32
  br label %50

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

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

32:                                               ; preds = %.lr.ph, %41
  %.02336 = phi i32 [ 0, %.lr.ph ], [ %44, %41 ]
  %.02435 = phi i64 [ 0, %.lr.ph ], [ %43, %41 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %34 unwind label %47

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %36 unwind label %47

36:                                               ; preds = %34
  %37 = add nuw nsw i32 %.02336, 2
  %38 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %22, i32 noundef %37, i64 noundef %38)
          to label %39 unwind label %47

39:                                               ; preds = %36
  %40 = load i64, ptr %7, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %37, i32 noundef %23, i64 noundef %40)
          to label %41 unwind label %47

41:                                               ; preds = %39
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = add nsw i64 %42, %.02435
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %44 = add nuw nsw i32 %.02336, 1
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %32, label %.preheader, !llvm.loop !11

47:                                               ; preds = %39, %36, %34, %32
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %91

._crit_edge:                                      ; preds = %74, %.preheader
  %.125.lcssa = phi i64 [ %.024.lcssa, %.preheader ], [ %76, %74 ]
  %49 = 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 %17, i64 noundef %19)
          to label %.invoke unwind label %88

50:                                               ; preds = %.lr.ph39, %74
  %.02238 = phi i32 [ 0, %.lr.ph39 ], [ %77, %74 ]
  %.12537 = phi i64 [ %.024.lcssa, %.lr.ph39 ], [ %76, %74 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %52 unwind label %80

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %54 unwind label %80

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %56 unwind label %80

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %58 unwind label %80

58:                                               ; preds = %56
  %59 = load i64, ptr %11, align 8, !tbaa !9
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = sub nsw i64 %59, %60
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = add nsw i32 %62, 2
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = add nsw i32 %64, 2
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %63, i32 noundef %65, i64 noundef %61)
          to label %66 unwind label %82

66:                                               ; preds = %58
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = add nsw i32 %67, 2
  %69 = load i64, ptr %10, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %26, i32 noundef %68, i64 noundef %69)
          to label %70 unwind label %82

70:                                               ; preds = %66
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = add nsw i32 %71, 2
  %73 = load i64, ptr %10, align 8, !tbaa !9
  invoke void @_ZN10edge_adder8add_edgeEiil(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %72, i32 noundef %27, i64 noundef %73)
          to label %74 unwind label %82

74:                                               ; preds = %70
  %75 = load i64, ptr %10, align 8, !tbaa !9
  %76 = add nsw i64 %75, %.12537
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %77 = add nuw nsw i32 %.02238, 1
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %50, label %._crit_edge, !llvm.loop !13

80:                                               ; preds = %56, %54, %52, %50
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %70, %66, %58
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %84

84:                                               ; preds = %82, %80
  %.pn = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %91

.invoke:                                          ; preds = %._crit_edge
  %85 = icmp eq i64 %49, %.125.lcssa
  %86 = select i1 %85, ptr @.str, ptr @.str.5
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %86)
          to label %90 unwind label %88

88:                                               ; preds = %.invoke, %._crit_edge
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %91

90:                                               ; 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

91:                                               ; preds = %30, %88, %84, %47, %28
  %.pn27.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %31, %30 ], [ %48, %47 ], [ %.pn, %84 ], [ %89, %88 ]
  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 } %.pn27.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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; 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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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