; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Random/Bike Racers (A)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@d = external dso_local global [300 x [300 x i64]], align 16
@s = external dso_local global %"class.std::set", align 8
@t = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca [300 x i32], align 16
  %3 = alloca [300 x i32], align 16
  %4 = alloca [300 x i32], align 16
  %5 = alloca [300 x i32], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %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 i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1200, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 1200, ptr %5) #7
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %48, %0
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %51

39:                                               ; preds = %34
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %45
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %46)
  br label %48

48:                                               ; preds = %39
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %6, align 4, !tbaa !5
  br label %34, !llvm.loop !9

51:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %66, %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %69

57:                                               ; preds = %52
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %59
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [300 x i32], ptr %5, i64 0, i64 %63
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 4 dereferenceable(4) %64)
  br label %66

66:                                               ; preds = %57
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %7, align 4, !tbaa !5
  br label %52, !llvm.loop !11

69:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %148, %69
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %151

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %144, %75
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = load i32, ptr @m, align 4, !tbaa !5
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %147

81:                                               ; preds = %76
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sub nsw i32 %85, %89
  %91 = sext i32 %90 to i64
  %92 = mul nsw i64 1, %91
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sub nsw i32 %96, %100
  %102 = sext i32 %101 to i64
  %103 = mul nsw i64 %92, %102
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [300 x i32], ptr %5, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sub nsw i32 %107, %111
  %113 = sext i32 %112 to i64
  %114 = mul nsw i64 1, %113
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [300 x i32], ptr %5, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sub nsw i32 %118, %122
  %124 = sext i32 %123 to i64
  %125 = mul nsw i64 %114, %124
  %126 = add nsw i64 %103, %125
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [300 x [300 x i64]], ptr @d, i64 0, i64 %128
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [300 x i64], ptr %129, i64 0, i64 %131
  store i64 %126, ptr %132, align 8, !tbaa !12
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [300 x [300 x i64]], ptr @d, i64 0, i64 %134
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [300 x i64], ptr %135, i64 0, i64 %137
  %139 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(8) %138)
  %140 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %141 = extractvalue { ptr, i8 } %139, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %143 = extractvalue { ptr, i8 } %139, 1
  store i8 %143, ptr %142, align 8
  br label %144

144:                                              ; preds = %81
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !5
  br label %76, !llvm.loop !14

147:                                              ; preds = %80
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %8, align 4, !tbaa !5
  br label %70, !llvm.loop !15

151:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %152 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #7
  %153 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  br label %154

154:                                              ; preds = %161, %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %155 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #7
  %156 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %164

159:                                              ; preds = %154
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @t, ptr noundef nonnull align 8 dereferenceable(8) %160)
  br label %161

161:                                              ; preds = %159
  %162 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 0) #7
  %163 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  br label %154, !llvm.loop !16

164:                                              ; preds = %158
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %165 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @t) #7
  %166 = trunc i64 %165 to i32
  store i32 %166, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %167 = load i32, ptr %15, align 4, !tbaa !5
  %168 = sub nsw i32 %167, 1
  store i32 %168, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %169 = load i32, ptr @n, align 4, !tbaa !5
  %170 = load i32, ptr @m, align 4, !tbaa !5
  %171 = add nsw i32 %169, %170
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %175 = load i32, ptr %20, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %21, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %280, %164
  %178 = load i32, ptr %16, align 4, !tbaa !5
  %179 = load i32, ptr %17, align 4, !tbaa !5
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %181, label %281

181:                                              ; preds = %177
  %182 = load i32, ptr %16, align 4, !tbaa !5
  %183 = load i32, ptr %17, align 4, !tbaa !5
  %184 = add nsw i32 %182, %183
  %185 = ashr i32 %184, 1
  store i32 %185, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %186 = load i32, ptr %18, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @t, i64 noundef %187) #7
  %189 = load i64, ptr %188, align 8, !tbaa !12
  store i64 %189, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %190 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 17712) #8
  %191 = load i32, ptr @n, align 4, !tbaa !5
  %192 = load i32, ptr @m, align 4, !tbaa !5
  %193 = add nsw i32 %191, %192
  %194 = add nsw i32 %193, 3
  invoke void @_ZN7maxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(17712) %190, i32 noundef %194)
          to label %195 unwind label %205

195:                                              ; preds = %181
  store ptr %190, ptr %23, align 8, !tbaa !17
  %196 = load ptr, ptr %23, align 8, !tbaa !17
  %197 = load i32, ptr %19, align 4, !tbaa !5
  %198 = load i32, ptr %21, align 4, !tbaa !5
  %199 = load i32, ptr @k, align 4, !tbaa !5
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %196, i32 noundef %197, i32 noundef %198, i32 noundef %199)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %213, %195
  %201 = load i32, ptr %26, align 4, !tbaa !5
  %202 = load i32, ptr @n, align 4, !tbaa !5
  %203 = icmp sle i32 %201, %202
  br i1 %203, label %209, label %204

204:                                              ; preds = %200
  store i32 19, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %216

205:                                              ; preds = %181
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %24, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %25, align 4
  call void @_ZdlPvm(ptr noundef %190, i64 noundef 17712) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %2) #7
  br label %288

209:                                              ; preds = %200
  %210 = load ptr, ptr %23, align 8, !tbaa !17
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = load i32, ptr %26, align 4, !tbaa !5
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %210, i32 noundef %211, i32 noundef %212, i32 noundef 1)
  br label %213

213:                                              ; preds = %209
  %214 = load i32, ptr %26, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %26, align 4, !tbaa !5
  br label %200, !llvm.loop !19

216:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %228, %216
  %218 = load i32, ptr %27, align 4, !tbaa !5
  %219 = load i32, ptr @m, align 4, !tbaa !5
  %220 = icmp sle i32 %218, %219
  br i1 %220, label %222, label %221

221:                                              ; preds = %217
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %231

222:                                              ; preds = %217
  %223 = load ptr, ptr %23, align 8, !tbaa !17
  %224 = load i32, ptr @n, align 4, !tbaa !5
  %225 = load i32, ptr %27, align 4, !tbaa !5
  %226 = add nsw i32 %224, %225
  %227 = load i32, ptr %20, align 4, !tbaa !5
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %223, i32 noundef %226, i32 noundef %227, i32 noundef 1)
  br label %228

228:                                              ; preds = %222
  %229 = load i32, ptr %27, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %27, align 4, !tbaa !5
  br label %217, !llvm.loop !20

231:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %264, %231
  %233 = load i32, ptr %28, align 4, !tbaa !5
  %234 = load i32, ptr @n, align 4, !tbaa !5
  %235 = icmp sle i32 %233, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %232
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %267

237:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 1, ptr %29, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %260, %237
  %239 = load i32, ptr %29, align 4, !tbaa !5
  %240 = load i32, ptr @m, align 4, !tbaa !5
  %241 = icmp sle i32 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  store i32 28, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %263

243:                                              ; preds = %238
  %244 = load i32, ptr %28, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [300 x [300 x i64]], ptr @d, i64 0, i64 %245
  %247 = load i32, ptr %29, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [300 x i64], ptr %246, i64 0, i64 %248
  %250 = load i64, ptr %249, align 8, !tbaa !12
  %251 = load i64, ptr %22, align 8, !tbaa !12
  %252 = icmp sle i64 %250, %251
  br i1 %252, label %253, label %259

253:                                              ; preds = %243
  %254 = load ptr, ptr %23, align 8, !tbaa !17
  %255 = load i32, ptr %28, align 4, !tbaa !5
  %256 = load i32, ptr @n, align 4, !tbaa !5
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = add nsw i32 %256, %257
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %254, i32 noundef %255, i32 noundef %258, i32 noundef 1)
  br label %259

259:                                              ; preds = %253, %243
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %29, align 4, !tbaa !5
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %29, align 4, !tbaa !5
  br label %238, !llvm.loop !21

263:                                              ; preds = %242
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %28, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %28, align 4, !tbaa !5
  br label %232, !llvm.loop !22

267:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %268 = load ptr, ptr %23, align 8, !tbaa !17
  %269 = load i32, ptr %19, align 4, !tbaa !5
  %270 = load i32, ptr %20, align 4, !tbaa !5
  %271 = call noundef i32 @_ZN7maxFlow7maxflowEii(ptr noundef nonnull align 8 dereferenceable(17712) %268, i32 noundef %269, i32 noundef %270)
  store i32 %271, ptr %30, align 4, !tbaa !5
  %272 = load i32, ptr %30, align 4, !tbaa !5
  %273 = load i32, ptr @k, align 4, !tbaa !5
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %275, label %278

275:                                              ; preds = %267
  %276 = load i32, ptr %18, align 4, !tbaa !5
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %16, align 4, !tbaa !5
  br label %280

278:                                              ; preds = %267
  %279 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %279, ptr %17, align 4, !tbaa !5
  br label %280

280:                                              ; preds = %278, %275
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %177, !llvm.loop !23

281:                                              ; preds = %177
  %282 = load i32, ptr %17, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @t, i64 noundef %283) #7
  %285 = load i64, ptr %284, align 8, !tbaa !12
  %286 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %285)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %2) #7
  %287 = load i32, ptr %1, align 4
  ret i32 %287

288:                                              ; preds = %205
  %289 = load ptr, ptr %24, align 8
  %290 = load i32, ptr %25, align 4
  %291 = insertvalue { ptr, i32 } poison, ptr %289, 0
  %292 = insertvalue { ptr, i32 } %291, i32 %290, 1
  resume { ptr, i32 } %292
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7maxFlow7maxflowEii(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef, i32 noundef) #3 align 2

declare i32 @printf(ptr noundef, ...) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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 #5 = { nobuiltin allocsize(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 = { nobuiltin 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@d = external dso_local global [300 x [300 x i64]], align 16
@s = external dso_local global %"class.std::set", align 8
@t = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca [300 x i32], align 16
  %2 = alloca [300 x i32], align 16
  %3 = alloca [300 x i32], align 16
  %4 = alloca [300 x i32], align 16
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %4) #8
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not89 = icmp slt i32 %10, 1
  br i1 %.not89, label %.preheader87, label %.lr.ph

.preheader87:                                     ; preds = %.lr.ph, %0
  %11 = phi i32 [ %10, %0 ], [ %17, %.lr.ph ]
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %.not7591 = icmp slt i32 %12, 1
  br i1 %.not7591, label %.preheader86, label %.lr.ph93

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %13 = getelementptr inbounds [300 x i32], ptr %1, i64 0, i64 %indvars.iv
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %indvars.iv
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %.not.not = icmp slt i64 %indvars.iv, %18
  br i1 %.not.not, label %.lr.ph, label %.preheader87, !llvm.loop !9

.preheader86.loopexit:                            ; preds = %.lr.ph93
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader86

.preheader86:                                     ; preds = %.preheader86.loopexit, %.preheader87
  %19 = phi i32 [ %26, %.preheader86.loopexit ], [ %12, %.preheader87 ]
  %20 = phi i32 [ %.pre, %.preheader86.loopexit ], [ %11, %.preheader87 ]
  %.not7697 = icmp slt i32 %20, 1
  %21 = icmp slt i32 %19, 1
  %or.cond = or i1 %.not7697, %21
  br i1 %or.cond, label %._crit_edge99, label %.preheader85

.lr.ph93:                                         ; preds = %.preheader87, %.lr.ph93
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.lr.ph93 ], [ 1, %.preheader87 ]
  %22 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %indvars.iv126
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %24 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %indvars.iv126
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %26 = load i32, ptr @m, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %.not75.not = icmp slt i64 %indvars.iv126, %27
  br i1 %.not75.not, label %.lr.ph93, label %.preheader86.loopexit, !llvm.loop !11

.preheader85:                                     ; preds = %.preheader86, %._crit_edge
  %28 = phi i32 [ %35, %._crit_edge ], [ %20, %.preheader86 ]
  %29 = phi i32 [ %36, %._crit_edge ], [ %19, %.preheader86 ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %._crit_edge ], [ 1, %.preheader86 ]
  %.not8294 = icmp slt i32 %29, 1
  br i1 %.not8294, label %._crit_edge, label %.lr.ph96

.lr.ph96:                                         ; preds = %.preheader85
  %30 = getelementptr inbounds [300 x i32], ptr %1, i64 0, i64 %indvars.iv132
  %31 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %indvars.iv132
  br label %38

._crit_edge99:                                    ; preds = %._crit_edge, %.preheader86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %32 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  store ptr %32, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %33 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  store ptr %33, ptr %6, align 8
  %34 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br i1 %34, label %.lr.ph101, label %._crit_edge102

._crit_edge.loopexit:                             ; preds = %38
  %.pre141 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader85
  %35 = phi i32 [ %.pre141, %._crit_edge.loopexit ], [ %28, %.preheader85 ]
  %36 = phi i32 [ %54, %._crit_edge.loopexit ], [ %29, %.preheader85 ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %37 = sext i32 %35 to i64
  %.not76.not = icmp slt i64 %indvars.iv132, %37
  br i1 %.not76.not, label %.preheader85, label %._crit_edge99, !llvm.loop !12

38:                                               ; preds = %.lr.ph96, %38
  %indvars.iv129 = phi i64 [ 1, %.lr.ph96 ], [ %indvars.iv.next130, %38 ]
  %39 = load i32, ptr %30, align 4, !tbaa !5
  %40 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %indvars.iv129
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sub nsw i32 %39, %41
  %43 = sext i32 %42 to i64
  %44 = mul nsw i64 %43, %43
  %45 = load i32, ptr %31, align 4, !tbaa !5
  %46 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %indvars.iv129
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sub nsw i32 %45, %47
  %49 = sext i32 %48 to i64
  %50 = mul nsw i64 %49, %49
  %51 = add nuw nsw i64 %50, %44
  %52 = getelementptr inbounds [300 x [300 x i64]], ptr @d, i64 0, i64 %indvars.iv132, i64 %indvars.iv129
  store i64 %51, ptr %52, align 8, !tbaa !14
  %53 = call { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(8) %52)
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %.not82.not = icmp slt i64 %indvars.iv129, %55
  br i1 %.not82.not, label %38, label %._crit_edge.loopexit, !llvm.loop !16

._crit_edge102:                                   ; preds = %.lr.ph101, %._crit_edge99
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZNSt3setIxSt4lessIxESaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  %56 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @t) #8
  %57 = trunc i64 %56 to i32
  %58 = add nsw i32 %57, -1
  %59 = load i32, ptr @n, align 4, !tbaa !5
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = add nsw i32 %60, %59
  %62 = add nsw i32 %61, 1
  %63 = add nsw i32 %61, 2
  %64 = add nsw i32 %61, 3
  %65 = icmp sgt i32 %57, 1
  br i1 %65, label %.lr.ph120, label %._crit_edge121

.lr.ph101:                                        ; preds = %._crit_edge99, %.lr.ph101
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @t, ptr noundef nonnull align 8 dereferenceable(8) %66)
  %67 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %68 = call ptr @_ZNKSt3setIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  store ptr %68, ptr %6, align 8
  %69 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br i1 %69, label %.lr.ph101, label %._crit_edge102, !llvm.loop !17

.lr.ph120:                                        ; preds = %._crit_edge102, %._crit_edge116
  %.072118 = phi i32 [ %.1, %._crit_edge116 ], [ 0, %._crit_edge102 ]
  %.073117 = phi i32 [ %.174, %._crit_edge116 ], [ %58, %._crit_edge102 ]
  %70 = add nuw nsw i32 %.072118, %.073117
  %71 = lshr i32 %70, 1
  %72 = zext nneg i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @t, i64 noundef %72) #8
  %74 = load i64, ptr %73, align 8, !tbaa !14
  %75 = call noalias noundef nonnull dereferenceable(17712) ptr @_Znwm(i64 noundef 17712) #9
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = load i32, ptr @m, align 4, !tbaa !5
  %78 = add i32 %76, 3
  %79 = add i32 %78, %77
  invoke void @_ZN7maxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %79)
          to label %80 unwind label %85

80:                                               ; preds = %.lr.ph120
  %81 = load i32, ptr @k, align 4, !tbaa !5
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %62, i32 noundef %64, i32 noundef %81)
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %.not77103 = icmp slt i32 %82, 1
  br i1 %.not77103, label %.preheader84, label %.lr.ph106

.preheader84:                                     ; preds = %.lr.ph106, %80
  %83 = phi i32 [ %82, %80 ], [ %88, %.lr.ph106 ]
  %84 = load i32, ptr @m, align 4, !tbaa !5
  %.not78107 = icmp slt i32 %84, 1
  br i1 %.not78107, label %.preheader83, label %.lr.ph109

85:                                               ; preds = %.lr.ph120
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %75, i64 noundef 17712) #10
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %1) #8
  resume { ptr, i32 } %86

.lr.ph106:                                        ; preds = %80, %.lr.ph106
  %.067104 = phi i32 [ %87, %.lr.ph106 ], [ 1, %80 ]
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %64, i32 noundef %.067104, i32 noundef 1)
  %87 = add nuw nsw i32 %.067104, 1
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %.not77.not = icmp slt i32 %.067104, %88
  br i1 %.not77.not, label %.lr.ph106, label %.preheader84, !llvm.loop !18

.preheader83.loopexit:                            ; preds = %.lr.ph109
  %.pre142 = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader83

.preheader83:                                     ; preds = %.preheader83.loopexit, %.preheader84
  %89 = phi i32 [ %95, %.preheader83.loopexit ], [ %84, %.preheader84 ]
  %90 = phi i32 [ %.pre142, %.preheader83.loopexit ], [ %83, %.preheader84 ]
  %.not79114 = icmp slt i32 %90, 1
  %91 = icmp slt i32 %89, 1
  %or.cond152 = or i1 %.not79114, %91
  br i1 %or.cond152, label %._crit_edge116, label %.preheader

.lr.ph109:                                        ; preds = %.preheader84, %.lr.ph109
  %.066108 = phi i32 [ %94, %.lr.ph109 ], [ 1, %.preheader84 ]
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = add nsw i32 %92, %.066108
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %93, i32 noundef %63, i32 noundef 1)
  %94 = add nuw nsw i32 %.066108, 1
  %95 = load i32, ptr @m, align 4, !tbaa !5
  %.not78.not = icmp slt i32 %.066108, %95
  br i1 %.not78.not, label %.lr.ph109, label %.preheader83.loopexit, !llvm.loop !19

.preheader:                                       ; preds = %.preheader83, %._crit_edge113
  %96 = phi i32 [ %105, %._crit_edge113 ], [ %90, %.preheader83 ]
  %97 = phi i32 [ %106, %._crit_edge113 ], [ %89, %.preheader83 ]
  %98 = phi i32 [ %107, %._crit_edge113 ], [ %89, %.preheader83 ]
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %._crit_edge113 ], [ 1, %.preheader83 ]
  %.not80110 = icmp slt i32 %98, 1
  br i1 %.not80110, label %._crit_edge113, label %.lr.ph112

.lr.ph112:                                        ; preds = %.preheader
  %99 = trunc nuw nsw i64 %indvars.iv138 to i32
  br label %109

._crit_edge116:                                   ; preds = %._crit_edge113, %.preheader83
  %100 = call noundef i32 @_ZN7maxFlow7maxflowEii(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %62, i32 noundef %63)
  %101 = load i32, ptr @k, align 4, !tbaa !5
  %102 = icmp slt i32 %100, %101
  %103 = add nuw nsw i32 %71, 1
  %.174 = select i1 %102, i32 %.073117, i32 %71
  %.1 = select i1 %102, i32 %103, i32 %.072118
  %104 = icmp slt i32 %.1, %.174
  br i1 %104, label %.lr.ph120, label %._crit_edge121, !llvm.loop !20

._crit_edge113.loopexit:                          ; preds = %117
  %.pre144 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge113

._crit_edge113:                                   ; preds = %._crit_edge113.loopexit, %.preheader
  %105 = phi i32 [ %.pre144, %._crit_edge113.loopexit ], [ %96, %.preheader ]
  %106 = phi i32 [ %118, %._crit_edge113.loopexit ], [ %97, %.preheader ]
  %107 = phi i32 [ %118, %._crit_edge113.loopexit ], [ %98, %.preheader ]
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %108 = sext i32 %105 to i64
  %.not79.not = icmp slt i64 %indvars.iv138, %108
  br i1 %.not79.not, label %.preheader, label %._crit_edge116, !llvm.loop !21

109:                                              ; preds = %.lr.ph112, %117
  %110 = phi i32 [ %97, %.lr.ph112 ], [ %118, %117 ]
  %indvars.iv135 = phi i64 [ 1, %.lr.ph112 ], [ %indvars.iv.next136, %117 ]
  %111 = getelementptr inbounds [300 x [300 x i64]], ptr @d, i64 0, i64 %indvars.iv138, i64 %indvars.iv135
  %112 = load i64, ptr %111, align 8, !tbaa !14
  %.not81 = icmp sgt i64 %112, %74
  br i1 %.not81, label %117, label %113

113:                                              ; preds = %109
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = trunc nuw nsw i64 %indvars.iv135 to i32
  %116 = add nsw i32 %114, %115
  call void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712) %75, i32 noundef %99, i32 noundef %116, i32 noundef 1)
  %.pre143 = load i32, ptr @m, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %109, %113
  %118 = phi i32 [ %110, %109 ], [ %.pre143, %113 ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %119 = sext i32 %118 to i64
  %.not80.not = icmp slt i64 %indvars.iv135, %119
  br i1 %.not80.not, label %109, label %._crit_edge113.loopexit, !llvm.loop !22

._crit_edge121:                                   ; preds = %._crit_edge116, %._crit_edge102
  %.073.lcssa = phi i32 [ %58, %._crit_edge102 ], [ %.174, %._crit_edge116 ]
  %120 = sext i32 %.073.lcssa to i64
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @t, i64 noundef %120) #8
  %122 = load i64, ptr %121, align 8, !tbaa !14
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %122)
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %1) #8
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maxFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7maxFlow7maxflowEii(ptr noundef nonnull align 8 dereferenceable(17712), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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 #5 = { nobuiltin allocsize(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 = { nobuiltin 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 #7 = { nofree 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !13}
!22 = distinct !{!22, !10}


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