; LLVM IR from vmartinv/eldiego :: flow/min.cost.max.flow.ll (Z4flowii)

; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.edge = type { i32, i32, i64, i64, i64 }

@nodes = external dso_local global i32, align 4
@G = external dso_local global [10000 x %"class.std::vector"], align 16
@e = external dso_local global %"class.std::vector.0", align 8
@dist = external dso_local global [10000 x i64], align 16
@mnCost = external dso_local global i64, align 8
@pre = external dso_local global [10000 x i32], align 16
@cap = external dso_local global [10000 x i64], align 16
@mxFlow = external dso_local global i64, align 8
@in_queue = external dso_local global [10000 x i8], align 16
@_ZL8INFCOSTO = external hidden constant i64, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4flowii(i32 noundef %0, i32 noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @in_queue, i8 0, i64 10000, i1 false)
  store i64 0, ptr @mnCost, align 8, !tbaa !9
  store i64 0, ptr @mxFlow, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %232, %2
  %18 = load i32, ptr @nodes, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds i64, ptr @dist, i64 %19
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @dist, ptr noundef %20, ptr noundef nonnull align 8 dereferenceable(8) @_ZL8INFCOSTO)
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %22
  store i64 0, ptr %23, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @pre, i8 -1, i64 40000, i1 false)
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %25
  store i32 0, ptr %26, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @cap, i8 0, i64 80000, i1 false)
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %28
  store i64 100000000000000, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #6
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %30 unwind label %59

30:                                               ; preds = %17
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %32
  store i8 1, ptr %33, align 1, !tbaa !11
  br label %34

34:                                               ; preds = %159, %30
  %35 = invoke noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %36 unwind label %59

36:                                               ; preds = %34
  %37 = trunc i64 %35 to i32
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %161

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %41 unwind label %63

41:                                               ; preds = %39
  %42 = load i32, ptr %40, align 4, !tbaa !5
  store i32 %42, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %43 unwind label %63

43:                                               ; preds = %41
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %45
  store i8 0, ptr %46, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @G, i64 0, i64 %48
  store ptr %49, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %50 = load ptr, ptr %9, align 8, !tbaa !13
  %51 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %53 = load ptr, ptr %9, align 8, !tbaa !13
  %54 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  br label %56

56:                                               ; preds = %156, %43
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %57, label %67, label %58

58:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %159

59:                                               ; preds = %34, %17
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  br label %233

63:                                               ; preds = %41, %39
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  br label %160

67:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %69 = load i32, ptr %68, align 4, !tbaa !5
  store i32 %69, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %71) #6
  store ptr %72, ptr %13, align 8, !tbaa !13
  %73 = load ptr, ptr %13, align 8, !tbaa !13
  %74 = invoke noundef i64 @_ZN4edge3remEv(ptr noundef nonnull align 8 dereferenceable(32) %73)
          to label %75 unwind label %146

75:                                               ; preds = %67
  %76 = icmp ne i64 %74, 0
  br i1 %76, label %77, label %155

77:                                               ; preds = %75
  %78 = load ptr, ptr %13, align 8, !tbaa !13
  %79 = getelementptr inbounds %struct.edge, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 4, !tbaa !15
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = sitofp i64 %83 to double
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = load ptr, ptr %13, align 8, !tbaa !13
  %90 = getelementptr inbounds %struct.edge, ptr %89, i32 0, i32 4
  %91 = load i64, ptr %90, align 8, !tbaa !17
  %92 = add nsw i64 %88, %91
  %93 = sitofp i64 %92 to double
  %94 = fadd double %93, 1.000000e-09
  %95 = fcmp ogt double %84, %94
  br i1 %95, label %96, label %155

96:                                               ; preds = %77
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %13, align 8, !tbaa !13
  %102 = getelementptr inbounds %struct.edge, ptr %101, i32 0, i32 4
  %103 = load i64, ptr %102, align 8, !tbaa !17
  %104 = add nsw i64 %100, %103
  %105 = load ptr, ptr %13, align 8, !tbaa !13
  %106 = getelementptr inbounds %struct.edge, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !15
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %108
  store i64 %104, ptr %109, align 8, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !13
  %112 = getelementptr inbounds %struct.edge, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !15
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %114
  store i32 %110, ptr %115, align 4, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %119 = load ptr, ptr %13, align 8, !tbaa !13
  %120 = invoke noundef i64 @_ZN4edge3remEv(ptr noundef nonnull align 8 dereferenceable(32) %119)
          to label %121 unwind label %150

121:                                              ; preds = %96
  store i64 %120, ptr %14, align 8, !tbaa !9
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %123 unwind label %150

123:                                              ; preds = %121
  %124 = load i64, ptr %122, align 8, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !13
  %126 = getelementptr inbounds %struct.edge, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 4, !tbaa !15
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %128
  store i64 %124, ptr %129, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %130 = load ptr, ptr %13, align 8, !tbaa !13
  %131 = getelementptr inbounds %struct.edge, ptr %130, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !15
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %133
  %135 = load i8, ptr %134, align 1, !tbaa !11, !range !18, !noundef !19
  %136 = trunc i8 %135 to i1
  br i1 %136, label %154, label %137

137:                                              ; preds = %123
  %138 = load ptr, ptr %13, align 8, !tbaa !13
  %139 = getelementptr inbounds %struct.edge, ptr %138, i32 0, i32 1
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %139)
          to label %140 unwind label %146

140:                                              ; preds = %137
  %141 = load ptr, ptr %13, align 8, !tbaa !13
  %142 = getelementptr inbounds %struct.edge, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !15
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %144
  store i8 1, ptr %145, align 1, !tbaa !11
  br label %154

146:                                              ; preds = %137, %67
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %6, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %7, align 4
  br label %158

150:                                              ; preds = %121, %96
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %6, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %158

154:                                              ; preds = %140, %123
  br label %155

155:                                              ; preds = %154, %77, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %156

156:                                              ; preds = %155
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %56

158:                                              ; preds = %150, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %160

159:                                              ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %34, !llvm.loop !20

160:                                              ; preds = %158, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %233

161:                                              ; preds = %36
  %162 = load i32, ptr %4, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = icmp eq i32 %165, -1
  br i1 %166, label %167, label %168

167:                                              ; preds = %161
  store i32 3, ptr %15, align 4
  br label %230

168:                                              ; preds = %161
  %169 = load i32, ptr %4, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !9
  %173 = load i64, ptr @mxFlow, align 8, !tbaa !9
  %174 = add nsw i64 %173, %172
  store i64 %174, ptr @mxFlow, align 8, !tbaa !9
  %175 = load i32, ptr %4, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = load i32, ptr %4, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !9
  %183 = mul nsw i64 %178, %182
  %184 = load i64, ptr @mnCost, align 8, !tbaa !9
  %185 = add nsw i64 %184, %183
  store i64 %185, ptr @mnCost, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %186 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %186, ptr %16, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %220, %168
  %188 = load i32, ptr %16, align 4, !tbaa !5
  %189 = load i32, ptr %3, align 4, !tbaa !5
  %190 = icmp ne i32 %188, %189
  br i1 %190, label %192, label %191

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

192:                                              ; preds = %187
  %193 = load i32, ptr %4, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !9
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %201) #6
  %203 = getelementptr inbounds %struct.edge, ptr %202, i32 0, i32 3
  %204 = load i64, ptr %203, align 8, !tbaa !22
  %205 = add nsw i64 %204, %196
  store i64 %205, ptr %203, align 8, !tbaa !22
  %206 = load i32, ptr %4, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %207
  %209 = load i64, ptr %208, align 8, !tbaa !9
  %210 = load i32, ptr %16, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = xor i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %215) #6
  %217 = getelementptr inbounds %struct.edge, ptr %216, i32 0, i32 3
  %218 = load i64, ptr %217, align 8, !tbaa !22
  %219 = sub nsw i64 %218, %209
  store i64 %219, ptr %217, align 8, !tbaa !22
  br label %220

220:                                              ; preds = %192
  %221 = load i32, ptr %16, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %225) #6
  %227 = getelementptr inbounds %struct.edge, ptr %226, i32 0, i32 0
  %228 = load i32, ptr %227, align 8, !tbaa !23
  store i32 %228, ptr %16, align 4, !tbaa !5
  br label %187, !llvm.loop !24

229:                                              ; preds = %191
  store i32 0, ptr %15, align 4
  br label %230

230:                                              ; preds = %229, %167
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  %231 = load i32, ptr %15, align 4
  switch i32 %231, label %240 [
    i32 0, label %232
    i32 3, label %234
  ]

232:                                              ; preds = %230
  br label %17, !llvm.loop !25

233:                                              ; preds = %160, %59
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #6
  br label %235

234:                                              ; preds = %230
  ret void

235:                                              ; preds = %233
  %236 = load ptr, ptr %6, align 8
  %237 = load i32, ptr %7, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %230
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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)) #5

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

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

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

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

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

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

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

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

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


; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@nodes = external dso_local local_unnamed_addr global i32, align 4
@G = external dso_local global [10000 x %"class.std::vector"], align 16
@e = external dso_local global %"class.std::vector.0", align 8
@dist = external dso_local global [10000 x i64], align 16
@mnCost = external dso_local local_unnamed_addr global i64, align 8
@pre = external dso_local local_unnamed_addr global [10000 x i32], align 16
@cap = external dso_local global [10000 x i64], align 16
@mxFlow = external dso_local local_unnamed_addr global i64, align 8
@in_queue = external dso_local local_unnamed_addr global [10000 x i8], align 16
@_ZL8INFCOSTO = external hidden constant i64, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4flowii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::queue", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i64, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(10000) @in_queue, i8 0, i64 10000, i1 false)
  store i64 0, ptr @mnCost, align 8, !tbaa !9
  store i64 0, ptr @mxFlow, align 8, !tbaa !9
  %8 = sext i32 %1 to i64
  %9 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %8
  %10 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %8
  %11 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %8
  br label %12

12:                                               ; preds = %._crit_edge49, %2
  %13 = load i32, ptr @nodes, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds i64, ptr @dist, i64 %14
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @dist, ptr noundef nonnull %15, ptr noundef nonnull align 8 dereferenceable(8) @_ZL8INFCOSTO)
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %17
  store i64 0, ptr %18, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40000) @pre, i8 -1, i64 40000, i1 false)
  %19 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %17
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000) @cap, i8 0, i64 80000, i1 false)
  %20 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %17
  store i64 100000000000000, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #6
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %21 unwind label %39

21:                                               ; preds = %12
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %23
  store i8 1, ptr %24, align 1, !tbaa !11
  %25 = call noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %26 = and i64 %25, 4294967295
  %.not41 = icmp eq i64 %26, 0
  br i1 %.not41, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %21, %._crit_edge
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %28 = load i32, ptr %27, align 4, !tbaa !5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %29
  store i8 0, ptr %30, align 1, !tbaa !11
  %31 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @G, i64 0, i64 %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %32 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  store ptr %32, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %33 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  store ptr %33, ptr %6, align 8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph43
  %35 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %29
  %36 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %29
  br label %41

._crit_edge:                                      ; preds = %79, %.lr.ph43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %37 = call noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %38 = and i64 %37, 4294967295
  %.not = icmp eq i64 %38, 0
  br i1 %.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !13

39:                                               ; preds = %12
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %115

41:                                               ; preds = %.lr.ph, %79
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %44) #6
  %46 = call noundef i64 @_ZN4edge3remEv(ptr noundef nonnull align 8 dereferenceable(32) %45)
  %.not37 = icmp eq i64 %46, 0
  br i1 %.not37, label %79, label %47

47:                                               ; preds = %41
  %48 = getelementptr inbounds i8, ptr %45, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !15
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [10000 x i64], ptr @dist, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = sitofp i64 %52 to double
  %54 = load i64, ptr %35, align 8, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %45, i64 24
  %56 = load i64, ptr %55, align 8, !tbaa !17
  %57 = add nsw i64 %56, %54
  %58 = sitofp i64 %57 to double
  %59 = fadd double %58, 1.000000e-09
  %60 = fcmp olt double %59, %53
  br i1 %60, label %61, label %79

61:                                               ; preds = %47
  store i64 %57, ptr %51, align 8, !tbaa !9
  %62 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %50
  store i32 %43, ptr %62, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %63 = call noundef i64 @_ZN4edge3remEv(ptr noundef nonnull align 8 dereferenceable(32) %45)
  store i64 %63, ptr %7, align 8, !tbaa !9
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = load i32, ptr %48, align 4, !tbaa !15
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [10000 x i64], ptr @cap, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %69 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %67
  %70 = load i8, ptr %69, align 1, !tbaa !11, !range !18, !noundef !19
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %79, label %72

72:                                               ; preds = %61
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %73 unwind label %77

73:                                               ; preds = %72
  %74 = load i32, ptr %48, align 4, !tbaa !15
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [10000 x i8], ptr @in_queue, i64 0, i64 %75
  store i8 1, ptr %76, align 1, !tbaa !11
  br label %79

77:                                               ; preds = %72
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %115

79:                                               ; preds = %61, %73, %47, %41
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %81, label %41, label %._crit_edge

._crit_edge44:                                    ; preds = %._crit_edge, %21
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = icmp eq i32 %82, -1
  br i1 %83, label %116, label %84

84:                                               ; preds = %._crit_edge44
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = load i64, ptr @mxFlow, align 8, !tbaa !9
  %87 = add nsw i64 %86, %85
  store i64 %87, ptr @mxFlow, align 8, !tbaa !9
  %88 = load i64, ptr %11, align 8, !tbaa !9
  %89 = mul nsw i64 %88, %85
  %90 = load i64, ptr @mnCost, align 8, !tbaa !9
  %91 = add nsw i64 %90, %89
  store i64 %91, ptr @mnCost, align 8, !tbaa !9
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %.not3645 = icmp eq i32 %92, %1
  br i1 %.not3645, label %._crit_edge49, label %.lr.ph48

.lr.ph48:                                         ; preds = %84, %.lr.ph48
  %.046 = phi i32 [ %113, %.lr.ph48 ], [ %1, %84 ]
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = sext i32 %.046 to i64
  %95 = getelementptr inbounds [10000 x i32], ptr @pre, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %97) #6
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  %100 = load i64, ptr %99, align 8, !tbaa !20
  %101 = add nsw i64 %100, %93
  store i64 %101, ptr %99, align 8, !tbaa !20
  %102 = load i64, ptr %10, align 8, !tbaa !9
  %103 = load i32, ptr %95, align 4, !tbaa !5
  %104 = xor i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %105) #6
  %107 = getelementptr inbounds i8, ptr %106, i64 16
  %108 = load i64, ptr %107, align 8, !tbaa !20
  %109 = sub nsw i64 %108, %102
  store i64 %109, ptr %107, align 8, !tbaa !20
  %110 = load i32, ptr %95, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %111) #6
  %113 = load i32, ptr %112, align 8, !tbaa !21
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %.not36 = icmp eq i32 %113, %114
  br i1 %.not36, label %._crit_edge49, label %.lr.ph48, !llvm.loop !22

._crit_edge49:                                    ; preds = %.lr.ph48, %84
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  br label %12

115:                                              ; preds = %77, %39
  %.pn = phi { ptr, i32 } [ %78, %77 ], [ %40, %39 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn

116:                                              ; preds = %._crit_edge44
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #6
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 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 #5

; 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 #4 align 2

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

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

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

; 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 #4 align 2

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass