; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SNACKDOWN/17/Elimination/E/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.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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@g = external dso_local global [110 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %37, %0
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %35
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  br label %37

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %28, !llvm.loop !9

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

41:                                               ; preds = %52, %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %55

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %50
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %52

52:                                               ; preds = %46
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !11

55:                                               ; preds = %45
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([110 x %"class.std::vector"], ptr @g, i64 0, i64 1)) #8
  %59 = icmp ugt i64 %57, %58
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %8, align 4
  br label %185

63:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  br label %66

66:                                               ; preds = %172, %63
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %173

71:                                               ; preds = %66
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = add nsw i32 %72, %73
  %75 = sdiv i32 %74, 2
  store i32 %75, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = load i32, ptr %11, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  %79 = mul nsw i32 %76, %78
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %81 = load i32, ptr %12, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %83 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 112) #9
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = load i32, ptr %13, align 4, !tbaa !5
  invoke void @_ZN9DinicFlowC2Eiii(ptr noundef nonnull align 8 dereferenceable(108) %83, i32 noundef %84, i32 noundef %85, i32 noundef %86)
          to label %87 unwind label %93

87:                                               ; preds = %71
  store ptr %83, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %138, %87
  %89 = load i32, ptr %17, align 4, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %97, label %92

92:                                               ; preds = %88
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %141

93:                                               ; preds = %71
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %15, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %83, i64 noundef 112) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  br label %188

97:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %134, %97
  %99 = load i32, ptr %18, align 4, !tbaa !5
  %100 = load i32, ptr %1, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %137

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %104 = load i32, ptr %18, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %105
  store ptr %106, ptr %19, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %107 = load ptr, ptr %19, align 8, !tbaa !12
  %108 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #8
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %108, ptr %109, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %110 = load ptr, ptr %19, align 8, !tbaa !12
  %111 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #8
  %112 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %111, ptr %112, align 8
  br label %113

113:                                              ; preds = %131, %103
  %114 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  br i1 %114, label %116, label %115

115:                                              ; preds = %113
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %133

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr %22, align 4, !tbaa !5
  %119 = load ptr, ptr %14, align 8, !tbaa !12
  %120 = load i32, ptr %17, align 4, !tbaa !5
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = mul nsw i32 %120, %121
  %123 = load i32, ptr %18, align 4, !tbaa !5
  %124 = add nsw i32 %122, %123
  %125 = load i32, ptr %17, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  %127 = load i32, ptr %1, align 4, !tbaa !5
  %128 = mul nsw i32 %126, %127
  %129 = load i32, ptr %22, align 4, !tbaa !5
  %130 = add nsw i32 %128, %129
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %119, i32 noundef %124, i32 noundef %130, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %131

131:                                              ; preds = %116
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  br label %113

133:                                              ; preds = %115
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %18, align 4, !tbaa !5
  br label %98, !llvm.loop !14

137:                                              ; preds = %102
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %17, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %17, align 4, !tbaa !5
  br label %88, !llvm.loop !15

141:                                              ; preds = %92
  %142 = load ptr, ptr %14, align 8, !tbaa !12
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %142, i32 noundef %143, i32 noundef 1, i32 noundef %144)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %159, %141
  %146 = load i32, ptr %23, align 4, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = icmp sle i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 18, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %162

150:                                              ; preds = %145
  %151 = load ptr, ptr %14, align 8, !tbaa !12
  %152 = load i32, ptr %23, align 4, !tbaa !5
  %153 = load i32, ptr %1, align 4, !tbaa !5
  %154 = mul nsw i32 %152, %153
  %155 = load i32, ptr %1, align 4, !tbaa !5
  %156 = add nsw i32 %154, %155
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = load i32, ptr %23, align 4, !tbaa !5
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %151, i32 noundef %156, i32 noundef %157, i32 noundef %158)
  br label %159

159:                                              ; preds = %150
  %160 = load i32, ptr %23, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %23, align 4, !tbaa !5
  br label %145, !llvm.loop !16

162:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %163 = load ptr, ptr %14, align 8, !tbaa !12
  %164 = call noundef i32 @_ZN9DinicFlow7maxFlowEv(ptr noundef nonnull align 8 dereferenceable(108) %163)
  store i32 %164, ptr %24, align 4, !tbaa !5
  %165 = load i32, ptr %24, align 4, !tbaa !5
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %170

168:                                              ; preds = %162
  %169 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %169, ptr %9, align 4, !tbaa !5
  br label %172

170:                                              ; preds = %162
  %171 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %171, ptr %10, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %170, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %66, !llvm.loop !17

173:                                              ; preds = %66
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = load i32, ptr %1, align 4, !tbaa !5
  %176 = icmp sge i32 %174, %175
  br i1 %176, label %177, label %180

177:                                              ; preds = %173
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %184

180:                                              ; preds = %173
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %181)
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %184

184:                                              ; preds = %180, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  store i32 0, ptr %8, align 4
  br label %185

185:                                              ; preds = %184, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  %186 = load i32, ptr %8, align 4
  switch i32 %186, label %193 [
    i32 0, label %187
    i32 1, label %187
  ]

187:                                              ; preds = %185, %185
  ret void

188:                                              ; preds = %93
  %189 = load ptr, ptr %15, align 8
  %190 = load i32, ptr %16, align 4
  %191 = insertvalue { ptr, i32 } poison, ptr %189, 0
  %192 = insertvalue { ptr, i32 } %191, i32 %190, 1
  resume { ptr, i32 } %192

193:                                              ; preds = %185
  unreachable
}

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9DinicFlow7maxFlowEv(ptr noundef nonnull align 8 dereferenceable(108)) #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 #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 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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::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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@g = external dso_local global [110 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %.not59 = icmp slt i32 %11, 1
  br i1 %.not59, label %.preheader56, label %.lr.ph

.preheader56:                                     ; preds = %.lr.ph, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %.not5161 = icmp slt i32 %12, 1
  br i1 %.not5161, label %._crit_edge, label %.lr.ph63

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %13 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %.not.not = icmp slt i64 %indvars.iv, %15
  br i1 %.not.not, label %.lr.ph, label %.preheader56, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph63, %.preheader56
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @g, i64 24)) #9
  %19 = icmp ult i64 %18, %17
  br i1 %19, label %73, label %27

.lr.ph63:                                         ; preds = %.preheader56, %.lr.ph63
  %.04462 = phi i32 [ %25, %.lr.ph63 ], [ 1, %.preheader56 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %23
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %25 = add nuw nsw i32 %.04462, 1
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %.not51.not = icmp slt i32 %.04462, %26
  br i1 %.not51.not, label %.lr.ph63, label %._crit_edge, !llvm.loop !11

27:                                               ; preds = %._crit_edge
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = icmp sgt i32 %28, 0
  br i1 %30, label %.lr.ph81, label %._crit_edge82

.lr.ph81:                                         ; preds = %27, %._crit_edge77
  %.04779 = phi i32 [ %..047, %._crit_edge77 ], [ 0, %27 ]
  %.04878 = phi i32 [ %.048., %._crit_edge77 ], [ %29, %27 ]
  %31 = add i32 %.04779, %.04878
  %32 = lshr i32 %31, 1
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = add nuw nsw i32 %32, 1
  %35 = mul nsw i32 %33, %34
  %36 = add nsw i32 %35, 1
  %37 = add nsw i32 %35, 2
  %38 = call noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #10
  invoke void @_ZN9DinicFlowC2Eiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %37, i32 noundef %36, i32 noundef %37)
          to label %.preheader55 unwind label %45

.preheader55:                                     ; preds = %.lr.ph81
  %.not = icmp ult i32 %31, 2
  br i1 %.not, label %._crit_edge72.thread, label %.preheader.lr.ph

._crit_edge72.thread:                             ; preds = %.preheader55
  %39 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %36, i32 noundef 1, i32 noundef %39)
  br label %._crit_edge77

.preheader.lr.ph:                                 ; preds = %.preheader55
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 1
  br i1 %41, label %._crit_edge72.thread93, label %.preheader.preheader

._crit_edge72.thread93:                           ; preds = %.preheader.lr.ph
  %42 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %36, i32 noundef 1, i32 noundef %42)
  br label %.lr.ph76.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %umax = call i32 @llvm.umax.i32(i32 %32, i32 1)
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge70
  %43 = phi i32 [ %47, %._crit_edge70 ], [ %40, %.preheader.preheader ]
  %.04671 = phi i32 [ %.pre92, %._crit_edge70 ], [ 0, %.preheader.preheader ]
  %.not5467 = icmp slt i32 %43, 1
  %.pre92 = add nuw nsw i32 %.04671, 1
  br i1 %.not5467, label %._crit_edge70, label %.lr.ph69

._crit_edge72:                                    ; preds = %._crit_edge70
  %44 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %36, i32 noundef 1, i32 noundef %44)
  br i1 %.not, label %._crit_edge77, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %._crit_edge72.thread93, %._crit_edge72
  %umax90 = call i32 @llvm.umax.i32(i32 %32, i32 1)
  br label %.lr.ph76

45:                                               ; preds = %.lr.ph81
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 112) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  resume { ptr, i32 } %46

._crit_edge70:                                    ; preds = %._crit_edge66, %.preheader
  %47 = phi i32 [ %43, %.preheader ], [ %53, %._crit_edge66 ]
  %exitcond.not = icmp eq i32 %.pre92, %umax
  br i1 %exitcond.not, label %._crit_edge72, label %.preheader, !llvm.loop !12

.lr.ph69:                                         ; preds = %.preheader, %._crit_edge66
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %._crit_edge66 ], [ 1, %.preheader ]
  %48 = getelementptr inbounds [110 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %49 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #9
  store ptr %49, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %50 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #9
  store ptr %50, ptr %7, align 8
  %51 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  br i1 %51, label %.lr.ph65.preheader, label %._crit_edge66

.lr.ph65.preheader:                               ; preds = %.lr.ph69
  %52 = trunc nuw nsw i64 %indvars.iv87 to i32
  br label %.lr.ph65

._crit_edge66:                                    ; preds = %.lr.ph65, %.lr.ph69
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %.not54.not = icmp slt i64 %indvars.iv87, %54
  br i1 %.not54.not, label %.lr.ph69, label %._crit_edge70, !llvm.loop !14

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %.lr.ph65
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = mul nsw i32 %57, %.04671
  %59 = add nsw i32 %58, %52
  %60 = mul nsw i32 %57, %.pre92
  %61 = add nsw i32 %60, %56
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %59, i32 noundef %61, i32 noundef 1)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  %63 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  br i1 %63, label %.lr.ph65, label %._crit_edge66

._crit_edge77:                                    ; preds = %.lr.ph76, %._crit_edge72.thread, %._crit_edge72
  %64 = call noundef i32 @_ZN9DinicFlow7maxFlowEv(ptr noundef nonnull align 8 dereferenceable(108) %38)
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  %.048. = select i1 %66, i32 %.04878, i32 %32
  %..047 = select i1 %66, i32 %32, i32 %.04779
  %67 = add nuw nsw i32 %..047, 1
  %68 = icmp slt i32 %67, %.048.
  br i1 %68, label %.lr.ph81, label %._crit_edge82.loopexit, !llvm.loop !15

.lr.ph76:                                         ; preds = %.lr.ph76.preheader, %.lr.ph76
  %.04374 = phi i32 [ %70, %.lr.ph76 ], [ 1, %.lr.ph76.preheader ]
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = add nuw i32 %.04374, 1
  %71 = mul i32 %69, %70
  call void @_ZN9DinicFlow7addEdgeEiii(ptr noundef nonnull align 8 dereferenceable(108) %38, i32 noundef %71, i32 noundef %37, i32 noundef %.04374)
  %exitcond91.not = icmp eq i32 %.04374, %umax90
  br i1 %exitcond91.not, label %._crit_edge77, label %.lr.ph76, !llvm.loop !16

._crit_edge82.loopexit:                           ; preds = %._crit_edge77
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge82.loopexit, %27
  %72 = phi i32 [ %28, %27 ], [ %.pre, %._crit_edge82.loopexit ]
  %.048.lcssa = phi i32 [ %29, %27 ], [ %.048., %._crit_edge82.loopexit ]
  %.047.lcssa = phi i32 [ 0, %27 ], [ %..047, %._crit_edge82.loopexit ]
  %.not52 = icmp slt i32 %.047.lcssa, %72
  %.048.lcssa. = select i1 %.not52, i32 %.048.lcssa, i32 -1
  br label %73

73:                                               ; preds = %._crit_edge82, %._crit_edge
  %.sink96 = phi i32 [ -1, %._crit_edge ], [ %.048.lcssa., %._crit_edge82 ]
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink96)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret void
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9DinicFlowC2Eiii(ptr noundef nonnull align 8 dereferenceable(108), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9DinicFlow7maxFlowEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #8

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


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