; LLVM IR from kazunetakahashi/atcoder :: 2019/0316_AGC031/E.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.MinCostFlow = type { i32, ptr, ptr, ptr, ptr, ptr, i64 }
%"class.std::basic_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@x = external dso_local global [100 x i32], align 16
@y = external dso_local global [100 x i32], align 16
@v = external dso_local global [100 x i64], align 16
@M = external dso_local global i32, align 4
@t = external dso_local global [400 x i8], align 16
@a = external dso_local global [400 x i32], align 16
@b = external dso_local global [400 x i32], align 16
@K = external dso_local global i32, align 4
@flow = external dso_local global %class.MinCostFlow, align 8
@C = external dso_local global i64, align 8
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %class.MinCostFlow, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #8
  %33 = load i32, ptr @K, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 -1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %35 unwind label %50

35:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #8
  %36 = load i32, ptr @K, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 101, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %37, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %38 unwind label %54

38:                                               ; preds = %35
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  %39 = load i32, ptr @K, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %40, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %41 unwind label %58

41:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  %42 = load i32, ptr @K, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 101, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %43, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %44 unwind label %62

44:                                               ; preds = %41
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %225, %44
  %46 = load i32, ptr %15, align 4, !tbaa !5
  %47 = load i32, ptr @M, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %66, label %49

49:                                               ; preds = %45
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %229

50:                                               ; preds = %0
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %4, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %517

54:                                               ; preds = %35
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %4, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %516

58:                                               ; preds = %38
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %4, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %515

62:                                               ; preds = %41
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %4, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %514

66:                                               ; preds = %45
  %67 = load i32, ptr %15, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [400 x i8], ptr @t, i64 0, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 76
  br i1 %72, label %73, label %104

73:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %74 = load i32, ptr %15, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %17, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %96, %73
  %79 = load i32, ptr %17, align 4, !tbaa !5
  %80 = load i32, ptr @K, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %103

83:                                               ; preds = %78
  %84 = load i32, ptr %17, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %85) #8
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %88
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %89)
          to label %91 unwind label %99

91:                                               ; preds = %83
  %92 = load i32, ptr %90, align 4, !tbaa !5
  %93 = load i32, ptr %17, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %94) #8
  store i32 %92, ptr %95, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %91
  %97 = load i32, ptr %17, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %17, align 4, !tbaa !5
  br label %78, !llvm.loop !10

99:                                               ; preds = %83
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %228

103:                                              ; preds = %82
  br label %224

104:                                              ; preds = %66
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [400 x i8], ptr @t, i64 0, i64 %106
  %108 = load i8, ptr %107, align 1, !tbaa !9
  %109 = sext i8 %108 to i32
  %110 = icmp eq i32 %109, 82
  br i1 %110, label %111, label %143

111:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %135, %111
  %113 = load i32, ptr %18, align 4, !tbaa !5
  %114 = load i32, ptr @K, align 4, !tbaa !5
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sub nsw i32 %114, %118
  %120 = icmp slt i32 %113, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %112
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %142

122:                                              ; preds = %112
  %123 = load i32, ptr %18, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %124) #8
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %127
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %125, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %130 unwind label %138

130:                                              ; preds = %122
  %131 = load i32, ptr %129, align 4, !tbaa !5
  %132 = load i32, ptr %18, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %133) #8
  store i32 %131, ptr %134, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %130
  %136 = load i32, ptr %18, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %18, align 4, !tbaa !5
  br label %112, !llvm.loop !12

138:                                              ; preds = %122
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %4, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %228

142:                                              ; preds = %121
  br label %223

143:                                              ; preds = %104
  %144 = load i32, ptr %15, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [400 x i8], ptr @t, i64 0, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !9
  %148 = sext i8 %147 to i32
  %149 = icmp eq i32 %148, 68
  br i1 %149, label %150, label %181

150:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %151 = load i32, ptr %15, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  store i32 %154, ptr %19, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %173, %150
  %156 = load i32, ptr %19, align 4, !tbaa !5
  %157 = load i32, ptr @K, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %180

160:                                              ; preds = %155
  %161 = load i32, ptr %19, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %162) #8
  %164 = load i32, ptr %15, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %165
  %167 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %163, ptr noundef nonnull align 4 dereferenceable(4) %166)
          to label %168 unwind label %176

168:                                              ; preds = %160
  %169 = load i32, ptr %167, align 4, !tbaa !5
  %170 = load i32, ptr %19, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %171) #8
  store i32 %169, ptr %172, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %168
  %174 = load i32, ptr %19, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %19, align 4, !tbaa !5
  br label %155, !llvm.loop !13

176:                                              ; preds = %160
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %4, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %228

180:                                              ; preds = %159
  br label %222

181:                                              ; preds = %143
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [400 x i8], ptr @t, i64 0, i64 %183
  %185 = load i8, ptr %184, align 1, !tbaa !9
  %186 = sext i8 %185 to i32
  %187 = icmp eq i32 %186, 85
  br i1 %187, label %188, label %220

188:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %212, %188
  %190 = load i32, ptr %20, align 4, !tbaa !5
  %191 = load i32, ptr @K, align 4, !tbaa !5
  %192 = load i32, ptr %15, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = sub nsw i32 %191, %195
  %197 = icmp slt i32 %190, %196
  br i1 %197, label %199, label %198

198:                                              ; preds = %189
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %219

199:                                              ; preds = %189
  %200 = load i32, ptr %20, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %201) #8
  %203 = load i32, ptr %15, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %204
  %206 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %202, ptr noundef nonnull align 4 dereferenceable(4) %205)
          to label %207 unwind label %215

207:                                              ; preds = %199
  %208 = load i32, ptr %206, align 4, !tbaa !5
  %209 = load i32, ptr %20, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %210) #8
  store i32 %208, ptr %211, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %207
  %213 = load i32, ptr %20, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %20, align 4, !tbaa !5
  br label %189, !llvm.loop !14

215:                                              ; preds = %199
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %4, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %228

219:                                              ; preds = %198
  br label %221

220:                                              ; preds = %181
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.2, i32 noundef 177, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #9
  unreachable

221:                                              ; preds = %219
  br label %222

222:                                              ; preds = %221, %180
  br label %223

223:                                              ; preds = %222, %142
  br label %224

224:                                              ; preds = %223, %103
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %15, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %15, align 4, !tbaa !5
  br label %45, !llvm.loop !15

228:                                              ; preds = %215, %176, %138, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %513

229:                                              ; preds = %49
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
          to label %231 unwind label %242

231:                                              ; preds = %229
  %232 = load i32, ptr @K, align 4, !tbaa !5
  %233 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %230, i32 noundef %232)
          to label %234 unwind label %242

234:                                              ; preds = %231
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %233, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %236 unwind label %242

236:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %275, %236
  %238 = load i32, ptr %21, align 4, !tbaa !5
  %239 = load i32, ptr @K, align 4, !tbaa !5
  %240 = icmp slt i32 %238, %239
  br i1 %240, label %246, label %241

241:                                              ; preds = %237
  store i32 17, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %282

242:                                              ; preds = %234, %231, %229
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %4, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %5, align 4
  br label %513

246:                                              ; preds = %237
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
          to label %248 unwind label %278

248:                                              ; preds = %246
  %249 = load i32, ptr %21, align 4, !tbaa !5
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %247, i32 noundef %249)
          to label %251 unwind label %278

251:                                              ; preds = %248
  %252 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %250, ptr noundef @.str.5)
          to label %253 unwind label %278

253:                                              ; preds = %251
  %254 = load i32, ptr %21, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %255) #8
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %252, i32 noundef %257)
          to label %259 unwind label %278

259:                                              ; preds = %253
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %258, ptr noundef @.str.6)
          to label %261 unwind label %278

261:                                              ; preds = %259
  %262 = load i32, ptr %21, align 4, !tbaa !5
  %263 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %260, i32 noundef %262)
          to label %264 unwind label %278

264:                                              ; preds = %261
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %263, ptr noundef @.str.5)
          to label %266 unwind label %278

266:                                              ; preds = %264
  %267 = load i32, ptr %21, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %268) #8
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %265, i32 noundef %270)
          to label %272 unwind label %278

272:                                              ; preds = %266
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %271, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %274 unwind label %278

274:                                              ; preds = %272
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %21, align 4, !tbaa !5
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %21, align 4, !tbaa !5
  br label %237, !llvm.loop !16

278:                                              ; preds = %272, %266, %264, %261, %259, %253, %251, %248, %246
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %4, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %513

282:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %283

283:                                              ; preds = %317, %282
  %284 = load i32, ptr %22, align 4, !tbaa !5
  %285 = load i32, ptr @K, align 4, !tbaa !5
  %286 = icmp slt i32 %284, %285
  br i1 %286, label %288, label %287

287:                                              ; preds = %283
  store i32 20, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %324

288:                                              ; preds = %283
  %289 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.7)
          to label %290 unwind label %320

290:                                              ; preds = %288
  %291 = load i32, ptr %22, align 4, !tbaa !5
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %289, i32 noundef %291)
          to label %293 unwind label %320

293:                                              ; preds = %290
  %294 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %292, ptr noundef @.str.5)
          to label %295 unwind label %320

295:                                              ; preds = %293
  %296 = load i32, ptr %22, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %297) #8
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %294, i32 noundef %299)
          to label %301 unwind label %320

301:                                              ; preds = %295
  %302 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %300, ptr noundef @.str.8)
          to label %303 unwind label %320

303:                                              ; preds = %301
  %304 = load i32, ptr %22, align 4, !tbaa !5
  %305 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %302, i32 noundef %304)
          to label %306 unwind label %320

306:                                              ; preds = %303
  %307 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %305, ptr noundef @.str.5)
          to label %308 unwind label %320

308:                                              ; preds = %306
  %309 = load i32, ptr %22, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %310) #8
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %307, i32 noundef %312)
          to label %314 unwind label %320

314:                                              ; preds = %308
  %315 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %313, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %316 unwind label %320

316:                                              ; preds = %314
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %22, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %22, align 4, !tbaa !5
  br label %283, !llvm.loop !17

320:                                              ; preds = %314, %308, %306, %303, %301, %295, %293, %290, %288
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %4, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %513

324:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #8
  invoke void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %23, i32 noundef 402)
          to label %325 unwind label %331

325:                                              ; preds = %324
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @flow, ptr align 8 %23, i64 56, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %326

326:                                              ; preds = %338, %325
  %327 = load i32, ptr %24, align 4, !tbaa !5
  %328 = load i32, ptr @K, align 4, !tbaa !5
  %329 = icmp slt i32 %327, %328
  br i1 %329, label %335, label %330

330:                                              ; preds = %326
  store i32 23, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %345

331:                                              ; preds = %324
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %4, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #8
  br label %513

335:                                              ; preds = %326
  %336 = load i32, ptr %24, align 4, !tbaa !5
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 400, i32 noundef %336, i64 noundef 1, i64 noundef 0)
          to label %337 unwind label %341

337:                                              ; preds = %335
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %24, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %24, align 4, !tbaa !5
  br label %326, !llvm.loop !23

341:                                              ; preds = %335
  %342 = landingpad { ptr, i32 }
          cleanup
  %343 = extractvalue { ptr, i32 } %342, 0
  store ptr %343, ptr %4, align 8
  %344 = extractvalue { ptr, i32 } %342, 1
  store i32 %344, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %513

345:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %346

346:                                              ; preds = %391, %345
  %347 = load i32, ptr %25, align 4, !tbaa !5
  %348 = load i32, ptr @K, align 4, !tbaa !5
  %349 = icmp slt i32 %347, %348
  br i1 %349, label %351, label %350

350:                                              ; preds = %346
  store i32 26, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %394

351:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %352

352:                                              ; preds = %387, %351
  %353 = load i32, ptr %26, align 4, !tbaa !5
  %354 = load i32, ptr @N, align 4, !tbaa !5
  %355 = icmp slt i32 %353, %354
  br i1 %355, label %357, label %356

356:                                              ; preds = %352
  store i32 29, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %390

357:                                              ; preds = %352
  %358 = load i32, ptr %25, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %359) #8
  %361 = load i32, ptr %360, align 4, !tbaa !5
  %362 = load i32, ptr %26, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [100 x i32], ptr @x, i64 0, i64 %363
  %365 = load i32, ptr %364, align 4, !tbaa !5
  %366 = icmp slt i32 %361, %365
  br i1 %366, label %367, label %386

367:                                              ; preds = %357
  %368 = load i32, ptr %26, align 4, !tbaa !5
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [100 x i32], ptr @x, i64 0, i64 %369
  %371 = load i32, ptr %370, align 4, !tbaa !5
  %372 = load i32, ptr %25, align 4, !tbaa !5
  %373 = sext i32 %372 to i64
  %374 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %373) #8
  %375 = load i32, ptr %374, align 4, !tbaa !5
  %376 = icmp slt i32 %371, %375
  br i1 %376, label %377, label %386

377:                                              ; preds = %367
  %378 = load i32, ptr %25, align 4, !tbaa !5
  %379 = load i32, ptr %26, align 4, !tbaa !5
  %380 = add nsw i32 100, %379
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %378, i32 noundef %380, i64 noundef 1, i64 noundef 0)
          to label %381 unwind label %382

381:                                              ; preds = %377
  br label %386

382:                                              ; preds = %377
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %4, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %513

386:                                              ; preds = %381, %367, %357
  br label %387

387:                                              ; preds = %386
  %388 = load i32, ptr %26, align 4, !tbaa !5
  %389 = add nsw i32 %388, 1
  store i32 %389, ptr %26, align 4, !tbaa !5
  br label %352, !llvm.loop !24

390:                                              ; preds = %356
  br label %391

391:                                              ; preds = %390
  %392 = load i32, ptr %25, align 4, !tbaa !5
  %393 = add nsw i32 %392, 1
  store i32 %393, ptr %25, align 4, !tbaa !5
  br label %346, !llvm.loop !25

394:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %395

395:                                              ; preds = %412, %394
  %396 = load i32, ptr %27, align 4, !tbaa !5
  %397 = load i32, ptr @N, align 4, !tbaa !5
  %398 = icmp slt i32 %396, %397
  br i1 %398, label %400, label %399

399:                                              ; preds = %395
  store i32 32, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %419

400:                                              ; preds = %395
  %401 = load i32, ptr %27, align 4, !tbaa !5
  %402 = add nsw i32 100, %401
  %403 = load i32, ptr %27, align 4, !tbaa !5
  %404 = add nsw i32 200, %403
  %405 = load i64, ptr @C, align 8, !tbaa !21
  %406 = load i32, ptr %27, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds [100 x i64], ptr @v, i64 0, i64 %407
  %409 = load i64, ptr %408, align 8, !tbaa !21
  %410 = sub nsw i64 %405, %409
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %402, i32 noundef %404, i64 noundef 1, i64 noundef %410)
          to label %411 unwind label %415

411:                                              ; preds = %400
  br label %412

412:                                              ; preds = %411
  %413 = load i32, ptr %27, align 4, !tbaa !5
  %414 = add nsw i32 %413, 1
  store i32 %414, ptr %27, align 4, !tbaa !5
  br label %395, !llvm.loop !26

415:                                              ; preds = %400
  %416 = landingpad { ptr, i32 }
          cleanup
  %417 = extractvalue { ptr, i32 } %416, 0
  store ptr %417, ptr %4, align 8
  %418 = extractvalue { ptr, i32 } %416, 1
  store i32 %418, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %513

419:                                              ; preds = %399
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %420

420:                                              ; preds = %466, %419
  %421 = load i32, ptr %28, align 4, !tbaa !5
  %422 = load i32, ptr @K, align 4, !tbaa !5
  %423 = icmp slt i32 %421, %422
  br i1 %423, label %425, label %424

424:                                              ; preds = %420
  store i32 35, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %469

425:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %426

426:                                              ; preds = %462, %425
  %427 = load i32, ptr %29, align 4, !tbaa !5
  %428 = load i32, ptr @N, align 4, !tbaa !5
  %429 = icmp slt i32 %427, %428
  br i1 %429, label %431, label %430

430:                                              ; preds = %426
  store i32 38, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %465

431:                                              ; preds = %426
  %432 = load i32, ptr %28, align 4, !tbaa !5
  %433 = sext i32 %432 to i64
  %434 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %433) #8
  %435 = load i32, ptr %434, align 4, !tbaa !5
  %436 = load i32, ptr %29, align 4, !tbaa !5
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [100 x i32], ptr @y, i64 0, i64 %437
  %439 = load i32, ptr %438, align 4, !tbaa !5
  %440 = icmp slt i32 %435, %439
  br i1 %440, label %441, label %461

441:                                              ; preds = %431
  %442 = load i32, ptr %29, align 4, !tbaa !5
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds [100 x i32], ptr @y, i64 0, i64 %443
  %445 = load i32, ptr %444, align 4, !tbaa !5
  %446 = load i32, ptr %28, align 4, !tbaa !5
  %447 = sext i32 %446 to i64
  %448 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %447) #8
  %449 = load i32, ptr %448, align 4, !tbaa !5
  %450 = icmp slt i32 %445, %449
  br i1 %450, label %451, label %461

451:                                              ; preds = %441
  %452 = load i32, ptr %29, align 4, !tbaa !5
  %453 = add nsw i32 200, %452
  %454 = load i32, ptr %28, align 4, !tbaa !5
  %455 = add nsw i32 300, %454
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %453, i32 noundef %455, i64 noundef 1, i64 noundef 0)
          to label %456 unwind label %457

456:                                              ; preds = %451
  br label %461

457:                                              ; preds = %451
  %458 = landingpad { ptr, i32 }
          cleanup
  %459 = extractvalue { ptr, i32 } %458, 0
  store ptr %459, ptr %4, align 8
  %460 = extractvalue { ptr, i32 } %458, 1
  store i32 %460, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %513

461:                                              ; preds = %456, %441, %431
  br label %462

462:                                              ; preds = %461
  %463 = load i32, ptr %29, align 4, !tbaa !5
  %464 = add nsw i32 %463, 1
  store i32 %464, ptr %29, align 4, !tbaa !5
  br label %426, !llvm.loop !27

465:                                              ; preds = %430
  br label %466

466:                                              ; preds = %465
  %467 = load i32, ptr %28, align 4, !tbaa !5
  %468 = add nsw i32 %467, 1
  store i32 %468, ptr %28, align 4, !tbaa !5
  br label %420, !llvm.loop !28

469:                                              ; preds = %424
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %470

470:                                              ; preds = %479, %469
  %471 = load i32, ptr %30, align 4, !tbaa !5
  %472 = load i32, ptr @K, align 4, !tbaa !5
  %473 = icmp slt i32 %471, %472
  br i1 %473, label %475, label %474

474:                                              ; preds = %470
  store i32 41, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %486

475:                                              ; preds = %470
  %476 = load i32, ptr %30, align 4, !tbaa !5
  %477 = add nsw i32 300, %476
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %477, i32 noundef 401, i64 noundef 1, i64 noundef 0)
          to label %478 unwind label %482

478:                                              ; preds = %475
  br label %479

479:                                              ; preds = %478
  %480 = load i32, ptr %30, align 4, !tbaa !5
  %481 = add nsw i32 %480, 1
  store i32 %481, ptr %30, align 4, !tbaa !5
  br label %470, !llvm.loop !29

482:                                              ; preds = %475
  %483 = landingpad { ptr, i32 }
          cleanup
  %484 = extractvalue { ptr, i32 } %483, 0
  store ptr %484, ptr %4, align 8
  %485 = extractvalue { ptr, i32 } %483, 1
  store i32 %485, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %513

486:                                              ; preds = %474
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %487 = load i32, ptr @K, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = invoke noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 400, i32 noundef 401, i64 noundef %488)
          to label %490 unwind label %503

490:                                              ; preds = %486
  store i64 %489, ptr %31, align 8, !tbaa !21
  %491 = load i64, ptr %31, align 8, !tbaa !21
  %492 = icmp sge i64 %491, 0
  br i1 %492, label %493, label %511

493:                                              ; preds = %490
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %494 = load i64, ptr @C, align 8, !tbaa !21
  %495 = load i32, ptr @K, align 4, !tbaa !5
  %496 = sext i32 %495 to i64
  %497 = mul nsw i64 %494, %496
  %498 = load i64, ptr %31, align 8, !tbaa !21
  %499 = sub nsw i64 %497, %498
  store i64 %499, ptr %32, align 8, !tbaa !21
  %500 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @ans, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %501 unwind label %507

501:                                              ; preds = %493
  %502 = load i64, ptr %500, align 8, !tbaa !21
  store i64 %502, ptr @ans, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %511

503:                                              ; preds = %486
  %504 = landingpad { ptr, i32 }
          cleanup
  %505 = extractvalue { ptr, i32 } %504, 0
  store ptr %505, ptr %4, align 8
  %506 = extractvalue { ptr, i32 } %504, 1
  store i32 %506, ptr %5, align 4
  br label %512

507:                                              ; preds = %493
  %508 = landingpad { ptr, i32 }
          cleanup
  %509 = extractvalue { ptr, i32 } %508, 0
  store ptr %509, ptr %4, align 8
  %510 = extractvalue { ptr, i32 } %508, 1
  store i32 %510, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %512

511:                                              ; preds = %501, %490
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #8
  ret void

512:                                              ; preds = %507, %503
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %513

513:                                              ; preds = %512, %482, %457, %415, %382, %341, %331, %320, %278, %242, %228
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %514

514:                                              ; preds = %513, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %515

515:                                              ; preds = %514, %58
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  br label %516

516:                                              ; preds = %515, %54
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  br label %517

517:                                              ; preds = %516, %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #8
  br label %518

518:                                              ; preds = %517
  %519 = load ptr, ptr %4, align 8
  %520 = load i32, ptr %5, align 4
  %521 = insertvalue { ptr, i32 } poison, ptr %519, 0
  %522 = insertvalue { ptr, i32 } %521, i32 %520, 1
  resume { ptr, i32 } %522
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; 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) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{i64 0, i64 4, !5, i64 8, i64 8, !19, i64 16, i64 8, !19, i64 24, i64 8, !19, i64 32, i64 8, !19, i64 40, i64 8, !19, i64 48, i64 8, !21}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, i64 0}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11}
!29 = distinct !{!29, !11}


; 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.MinCostFlow = type { i32, ptr, ptr, ptr, ptr, ptr, i64 }
%"class.std::basic_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@N = external dso_local local_unnamed_addr global i32, align 4
@x = external dso_local local_unnamed_addr global [100 x i32], align 16
@y = external dso_local local_unnamed_addr global [100 x i32], align 16
@v = external dso_local local_unnamed_addr global [100 x i64], align 16
@M = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local local_unnamed_addr global [400 x i8], align 16
@a = external dso_local global [400 x i32], align 16
@b = external dso_local local_unnamed_addr global [400 x i32], align 16
@K = external dso_local local_unnamed_addr global i32, align 4
@flow = external dso_local global %class.MinCostFlow, align 8
@C = external dso_local local_unnamed_addr global i64, align 8
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %class.MinCostFlow, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #8
  %15 = load i32, ptr @K, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 -1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %16, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %17 unwind label %30

17:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  %18 = load i32, ptr @K, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 101, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %19, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %20 unwind label %32

20:                                               ; preds = %17
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  %21 = load i32, ptr @K, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %22, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %23 unwind label %34

23:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  %24 = load i32, ptr @K, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 101, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %25, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %26 unwind label %36

26:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %27 = load i32, ptr @M, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph126, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %26
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
          to label %104 unwind label %112

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  br label %285

32:                                               ; preds = %17
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %284

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %283

36:                                               ; preds = %23
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %282

.lr.ph126:                                        ; preds = %26, %.loopexit
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %.loopexit ], [ 0, %26 ]
  %38 = getelementptr inbounds [400 x i8], ptr @t, i64 0, i64 %indvars.iv164
  %39 = load i8, ptr %38, align 1, !tbaa !9
  switch i8 %39, label %100 [
    i8 76, label %50
    i8 82, label %.preheader112
    i8 68, label %75
    i8 85, label %.preheader115
  ]

.preheader115:                                    ; preds = %.lr.ph126
  %40 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %indvars.iv164
  %41 = load i32, ptr @K, align 4, !tbaa !5
  %42 = load i32, ptr %40, align 4, !tbaa !5
  %43 = icmp sgt i32 %41, %42
  br i1 %43, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader115
  %44 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %indvars.iv164
  br label %90

.preheader112:                                    ; preds = %.lr.ph126
  %45 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %indvars.iv164
  %46 = load i32, ptr @K, align 4, !tbaa !5
  %47 = load i32, ptr %45, align 4, !tbaa !5
  %48 = icmp sgt i32 %46, %47
  br i1 %48, label %.lr.ph122, label %.loopexit

.lr.ph122:                                        ; preds = %.preheader112
  %49 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %indvars.iv164
  br label %65

50:                                               ; preds = %.lr.ph126
  %51 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %indvars.iv164
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = load i32, ptr @K, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %.lr.ph124, label %.loopexit

.lr.ph124:                                        ; preds = %50
  %55 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %indvars.iv164
  %56 = sext i32 %52 to i64
  br label %57

57:                                               ; preds = %.lr.ph124, %57
  %indvars.iv161 = phi i64 [ %56, %.lr.ph124 ], [ %indvars.iv.next162, %57 ]
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv161) #8
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv161) #8
  store i32 %60, ptr %61, align 4, !tbaa !5
  %indvars.iv.next162 = add nsw i64 %indvars.iv161, 1
  %62 = load i32, ptr @K, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next162, %63
  br i1 %64, label %57, label %.loopexit, !llvm.loop !10

65:                                               ; preds = %.lr.ph122, %65
  %indvars.iv158 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next159, %65 ]
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv158) #8
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef nonnull align 4 dereferenceable(4) %49)
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv158) #8
  store i32 %68, ptr %69, align 4, !tbaa !5
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %70 = load i32, ptr @K, align 4, !tbaa !5
  %71 = load i32, ptr %45, align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next159, %73
  br i1 %74, label %65, label %.loopexit, !llvm.loop !12

75:                                               ; preds = %.lr.ph126
  %76 = getelementptr inbounds [400 x i32], ptr @b, i64 0, i64 %indvars.iv164
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr @K, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %.lr.ph120, label %.loopexit

.lr.ph120:                                        ; preds = %75
  %80 = getelementptr inbounds [400 x i32], ptr @a, i64 0, i64 %indvars.iv164
  %81 = sext i32 %77 to i64
  br label %82

82:                                               ; preds = %.lr.ph120, %82
  %indvars.iv155 = phi i64 [ %81, %.lr.ph120 ], [ %indvars.iv.next156, %82 ]
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv155) #8
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %80)
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv155) #8
  store i32 %85, ptr %86, align 4, !tbaa !5
  %indvars.iv.next156 = add nsw i64 %indvars.iv155, 1
  %87 = load i32, ptr @K, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next156, %88
  br i1 %89, label %82, label %.loopexit, !llvm.loop !13

90:                                               ; preds = %.lr.ph, %90
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %90 ]
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %44)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  store i32 %93, ptr %94, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = load i32, ptr @K, align 4, !tbaa !5
  %96 = load i32, ptr %40, align 4, !tbaa !5
  %97 = sub nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next, %98
  br i1 %99, label %90, label %.loopexit, !llvm.loop !14

100:                                              ; preds = %.lr.ph126
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, i32 noundef 177, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #9
  unreachable

.loopexit:                                        ; preds = %90, %82, %65, %57, %.preheader115, %75, %.preheader112, %50
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %101 = load i32, ptr @M, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv.next165, %102
  br i1 %103, label %.lr.ph126, label %._crit_edge, !llvm.loop !15

104:                                              ; preds = %._crit_edge
  %105 = load i32, ptr @K, align 4, !tbaa !5
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %29, i32 noundef %105)
          to label %107 unwind label %112

107:                                              ; preds = %104
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader111 unwind label %112

.preheader111:                                    ; preds = %107
  %109 = load i32, ptr @K, align 4, !tbaa !5
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %.lr.ph128, label %._crit_edge131

.preheader110:                                    ; preds = %136
  %111 = icmp sgt i32 %137, 0
  br i1 %111, label %.lr.ph130, label %._crit_edge131

112:                                              ; preds = %107, %104, %._crit_edge
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %281

.lr.ph128:                                        ; preds = %.preheader111, %136
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %136 ], [ 0, %.preheader111 ]
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
          to label %115 unwind label %140

115:                                              ; preds = %.lr.ph128
  %116 = trunc nuw nsw i64 %indvars.iv167 to i32
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %114, i32 noundef %116)
          to label %118 unwind label %140

118:                                              ; preds = %115
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @.str.5)
          to label %120 unwind label %140

120:                                              ; preds = %118
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv167) #8
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %119, i32 noundef %122)
          to label %124 unwind label %140

124:                                              ; preds = %120
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @.str.6)
          to label %126 unwind label %140

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %125, i32 noundef %116)
          to label %128 unwind label %140

128:                                              ; preds = %126
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef nonnull @.str.5)
          to label %130 unwind label %140

130:                                              ; preds = %128
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv167) #8
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %129, i32 noundef %132)
          to label %134 unwind label %140

134:                                              ; preds = %130
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %136 unwind label %140

136:                                              ; preds = %134
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %137 = load i32, ptr @K, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = icmp slt i64 %indvars.iv.next168, %138
  br i1 %139, label %.lr.ph128, label %.preheader110, !llvm.loop !16

140:                                              ; preds = %134, %130, %128, %126, %124, %120, %118, %115, %.lr.ph128
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %281

._crit_edge131:                                   ; preds = %164, %.preheader111, %.preheader110
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #8
  invoke void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %13, i32 noundef 402)
          to label %170 unwind label %175

.lr.ph130:                                        ; preds = %.preheader110, %164
  %indvars.iv170 = phi i64 [ %indvars.iv.next171, %164 ], [ 0, %.preheader110 ]
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.7)
          to label %143 unwind label %168

143:                                              ; preds = %.lr.ph130
  %144 = trunc nuw nsw i64 %indvars.iv170 to i32
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %142, i32 noundef %144)
          to label %146 unwind label %168

146:                                              ; preds = %143
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef nonnull @.str.5)
          to label %148 unwind label %168

148:                                              ; preds = %146
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv170) #8
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %147, i32 noundef %150)
          to label %152 unwind label %168

152:                                              ; preds = %148
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef nonnull @.str.8)
          to label %154 unwind label %168

154:                                              ; preds = %152
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %153, i32 noundef %144)
          to label %156 unwind label %168

156:                                              ; preds = %154
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull @.str.5)
          to label %158 unwind label %168

158:                                              ; preds = %156
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv170) #8
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %157, i32 noundef %160)
          to label %162 unwind label %168

162:                                              ; preds = %158
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %161, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %164 unwind label %168

164:                                              ; preds = %162
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %165 = load i32, ptr @K, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = icmp slt i64 %indvars.iv.next171, %166
  br i1 %167, label %.lr.ph130, label %._crit_edge131, !llvm.loop !17

168:                                              ; preds = %162, %158, %156, %154, %152, %148, %146, %143, %.lr.ph130
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %281

170:                                              ; preds = %._crit_edge131
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) @flow, ptr noundef nonnull align 8 dereferenceable(56) %13, i64 56, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  %171 = load i32, ptr @K, align 4, !tbaa !5
  %172 = icmp sgt i32 %171, 0
  br i1 %172, label %.lr.ph134, label %.preheader109.thread

.preheader109.thread:                             ; preds = %170
  %.pre188191 = load i32, ptr @N, align 4, !tbaa !5
  br label %.preheader107

.preheader109:                                    ; preds = %177
  %173 = icmp sgt i32 %179, 0
  %.pre188 = load i32, ptr @N, align 4, !tbaa !5
  br i1 %173, label %.preheader108.lr.ph, label %.preheader107

.preheader108.lr.ph:                              ; preds = %.preheader109
  %174 = icmp sgt i32 %.pre188, 0
  br i1 %174, label %.preheader108, label %.lr.ph146.preheader

175:                                              ; preds = %._crit_edge131
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  br label %281

.lr.ph134:                                        ; preds = %170, %177
  %.082132 = phi i32 [ %178, %177 ], [ 0, %170 ]
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 400, i32 noundef %.082132, i64 noundef 1, i64 noundef 0)
          to label %177 unwind label %181

177:                                              ; preds = %.lr.ph134
  %178 = add nuw nsw i32 %.082132, 1
  %179 = load i32, ptr @K, align 4, !tbaa !5
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %.lr.ph134, label %.preheader109, !llvm.loop !23

181:                                              ; preds = %.lr.ph134
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %281

.preheader108:                                    ; preds = %.preheader108.lr.ph, %._crit_edge137
  %183 = phi i32 [ %190, %._crit_edge137 ], [ %179, %.preheader108.lr.ph ]
  %184 = phi i32 [ %191, %._crit_edge137 ], [ %.pre188, %.preheader108.lr.ph ]
  %indvars.iv176 = phi i64 [ %indvars.iv.next177, %._crit_edge137 ], [ 0, %.preheader108.lr.ph ]
  %185 = icmp sgt i32 %184, 0
  br i1 %185, label %.lr.ph136, label %._crit_edge137

.lr.ph136:                                        ; preds = %.preheader108
  %186 = trunc nuw nsw i64 %indvars.iv176 to i32
  br label %194

.preheader107:                                    ; preds = %._crit_edge137, %.preheader109.thread, %.preheader109
  %187 = phi i32 [ %179, %.preheader109 ], [ %171, %.preheader109.thread ], [ %190, %._crit_edge137 ]
  %188 = phi i32 [ %.pre188, %.preheader109 ], [ %.pre188191, %.preheader109.thread ], [ %191, %._crit_edge137 ]
  %189 = icmp sgt i32 %188, 0
  br i1 %189, label %.lr.ph140, label %.preheader106

._crit_edge137.loopexit:                          ; preds = %209
  %.pre = load i32, ptr @K, align 4, !tbaa !5
  br label %._crit_edge137

._crit_edge137:                                   ; preds = %._crit_edge137.loopexit, %.preheader108
  %190 = phi i32 [ %.pre, %._crit_edge137.loopexit ], [ %183, %.preheader108 ]
  %191 = phi i32 [ %210, %._crit_edge137.loopexit ], [ %184, %.preheader108 ]
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %192 = sext i32 %190 to i64
  %193 = icmp slt i64 %indvars.iv.next177, %192
  br i1 %193, label %.preheader108, label %.preheader107, !llvm.loop !24

194:                                              ; preds = %.lr.ph136, %209
  %indvars.iv173 = phi i64 [ 0, %.lr.ph136 ], [ %indvars.iv.next174, %209 ]
  %195 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv176) #8
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = getelementptr inbounds [100 x i32], ptr @x, i64 0, i64 %indvars.iv173
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = icmp slt i32 %196, %198
  br i1 %199, label %200, label %209

200:                                              ; preds = %194
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv176) #8
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = icmp slt i32 %198, %202
  br i1 %203, label %204, label %209

204:                                              ; preds = %200
  %205 = trunc i64 %indvars.iv173 to i32
  %206 = add i32 %205, 100
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %186, i32 noundef %206, i64 noundef 1, i64 noundef 0)
          to label %209 unwind label %207

207:                                              ; preds = %204
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %281

209:                                              ; preds = %194, %200, %204
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %210 = load i32, ptr @N, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = icmp slt i64 %indvars.iv.next174, %211
  br i1 %212, label %194, label %._crit_edge137.loopexit, !llvm.loop !26

.preheader106.loopexit:                           ; preds = %224
  %.pre189 = load i32, ptr @K, align 4, !tbaa !5
  br label %.preheader106

.preheader106:                                    ; preds = %.preheader106.loopexit, %.preheader107
  %213 = phi i32 [ %225, %.preheader106.loopexit ], [ %188, %.preheader107 ]
  %214 = phi i32 [ %.pre189, %.preheader106.loopexit ], [ %187, %.preheader107 ]
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %.preheader105.lr.ph, label %._crit_edge147

.preheader105.lr.ph:                              ; preds = %.preheader106
  %216 = icmp sgt i32 %213, 0
  br i1 %216, label %.preheader105, label %.lr.ph146.preheader

.lr.ph140:                                        ; preds = %.preheader107, %224
  %indvars.iv179 = phi i64 [ %indvars.iv.next180, %224 ], [ 0, %.preheader107 ]
  %indvars181 = trunc i64 %indvars.iv179 to i32
  %217 = add nuw nsw i32 %indvars181, 200
  %218 = load i64, ptr @C, align 8, !tbaa !21
  %219 = getelementptr inbounds [100 x i64], ptr @v, i64 0, i64 %indvars.iv179
  %220 = load i64, ptr %219, align 8, !tbaa !21
  %221 = sub nsw i64 %218, %220
  %222 = trunc i64 %indvars.iv179 to i32
  %223 = add i32 %222, 100
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %223, i32 noundef %217, i64 noundef 1, i64 noundef %221)
          to label %224 unwind label %228

224:                                              ; preds = %.lr.ph140
  %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
  %225 = load i32, ptr @N, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = icmp slt i64 %indvars.iv.next180, %226
  br i1 %227, label %.lr.ph140, label %.preheader106.loopexit, !llvm.loop !27

228:                                              ; preds = %.lr.ph140
  %229 = landingpad { ptr, i32 }
          cleanup
  br label %281

.preheader105:                                    ; preds = %.preheader105.lr.ph, %._crit_edge143
  %230 = phi i32 [ %236, %._crit_edge143 ], [ %214, %.preheader105.lr.ph ]
  %231 = phi i32 [ %237, %._crit_edge143 ], [ %213, %.preheader105.lr.ph ]
  %indvars.iv185 = phi i64 [ %indvars.iv.next186, %._crit_edge143 ], [ 0, %.preheader105.lr.ph ]
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %.lr.ph142, label %._crit_edge143

.lr.ph142:                                        ; preds = %.preheader105
  %233 = trunc i64 %indvars.iv185 to i32
  %234 = add i32 %233, 300
  br label %240

.preheader:                                       ; preds = %._crit_edge143
  %235 = icmp sgt i32 %236, 0
  br i1 %235, label %.lr.ph146.preheader, label %._crit_edge147

.lr.ph146.preheader:                              ; preds = %.preheader108.lr.ph, %.preheader105.lr.ph, %.preheader
  br label %.lr.ph146

._crit_edge143.loopexit:                          ; preds = %255
  %.pre190 = load i32, ptr @K, align 4, !tbaa !5
  br label %._crit_edge143

._crit_edge143:                                   ; preds = %._crit_edge143.loopexit, %.preheader105
  %236 = phi i32 [ %.pre190, %._crit_edge143.loopexit ], [ %230, %.preheader105 ]
  %237 = phi i32 [ %256, %._crit_edge143.loopexit ], [ %231, %.preheader105 ]
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %238 = sext i32 %236 to i64
  %239 = icmp slt i64 %indvars.iv.next186, %238
  br i1 %239, label %.preheader105, label %.preheader, !llvm.loop !28

240:                                              ; preds = %.lr.ph142, %255
  %indvars.iv182 = phi i64 [ 0, %.lr.ph142 ], [ %indvars.iv.next183, %255 ]
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv185) #8
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = getelementptr inbounds [100 x i32], ptr @y, i64 0, i64 %indvars.iv182
  %244 = load i32, ptr %243, align 4, !tbaa !5
  %245 = icmp slt i32 %242, %244
  br i1 %245, label %246, label %255

246:                                              ; preds = %240
  %247 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv185) #8
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = icmp slt i32 %244, %248
  br i1 %249, label %250, label %255

250:                                              ; preds = %246
  %251 = trunc i64 %indvars.iv182 to i32
  %252 = add i32 %251, 200
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %252, i32 noundef %234, i64 noundef 1, i64 noundef 0)
          to label %255 unwind label %253

253:                                              ; preds = %250
  %254 = landingpad { ptr, i32 }
          cleanup
  br label %281

255:                                              ; preds = %240, %246, %250
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %256 = load i32, ptr @N, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = icmp slt i64 %indvars.iv.next183, %257
  br i1 %258, label %240, label %._crit_edge143.loopexit, !llvm.loop !29

._crit_edge147:                                   ; preds = %262, %.preheader106, %.preheader
  %.lcssa = phi i32 [ %236, %.preheader ], [ %214, %.preheader106 ], [ %264, %262 ]
  %259 = sext i32 %.lcssa to i64
  %260 = invoke noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 400, i32 noundef 401, i64 noundef %259)
          to label %268 unwind label %278

.lr.ph146:                                        ; preds = %.lr.ph146.preheader, %262
  %.076145 = phi i32 [ %263, %262 ], [ 0, %.lr.ph146.preheader ]
  %261 = add nuw nsw i32 %.076145, 300
  invoke void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %261, i32 noundef 401, i64 noundef 1, i64 noundef 0)
          to label %262 unwind label %266

262:                                              ; preds = %.lr.ph146
  %263 = add nuw nsw i32 %.076145, 1
  %264 = load i32, ptr @K, align 4, !tbaa !5
  %265 = icmp slt i32 %263, %264
  br i1 %265, label %.lr.ph146, label %._crit_edge147, !llvm.loop !30

266:                                              ; preds = %.lr.ph146
  %267 = landingpad { ptr, i32 }
          cleanup
  br label %281

268:                                              ; preds = %._crit_edge147
  %269 = icmp sgt i64 %260, -1
  br i1 %269, label %270, label %280

270:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %271 = load i64, ptr @C, align 8, !tbaa !21
  %272 = load i32, ptr @K, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = mul nsw i64 %271, %273
  %275 = sub nsw i64 %274, %260
  store i64 %275, ptr %14, align 8, !tbaa !21
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @ans, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %277 = load i64, ptr %276, align 8, !tbaa !21
  store i64 %277, ptr @ans, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %280

278:                                              ; preds = %._crit_edge147
  %279 = landingpad { ptr, i32 }
          cleanup
  br label %281

280:                                              ; preds = %270, %268
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  ret void

281:                                              ; preds = %278, %266, %253, %228, %207, %181, %175, %168, %140, %112
  %.pn = phi { ptr, i32 } [ %141, %140 ], [ %169, %168 ], [ %182, %181 ], [ %208, %207 ], [ %229, %228 ], [ %254, %253 ], [ %267, %266 ], [ %279, %278 ], [ %176, %175 ], [ %113, %112 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %282

282:                                              ; preds = %281, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %281 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %283

283:                                              ; preds = %282, %34
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %282 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  br label %284

284:                                              ; preds = %283, %32
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %283 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  br label %285

285:                                              ; preds = %284, %30
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %284 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn.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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; 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 #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{i64 0, i64 4, !5, i64 8, i64 8, !19, i64 16, i64 8, !19, i64 24, i64 8, !19, i64 32, i64 8, !19, i64 40, i64 8, !19, i64 48, i64 8, !21}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, i64 0}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11, !25}
!25 = !{!"llvm.loop.unswitch.partial.disable"}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11, !25}
!29 = distinct !{!29, !11}
!30 = distinct !{!30, !11}


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