; LLVM IR from Dev-XYS/Algorithms :: Edmonds-Karp.ll (Z12Edmonds_Karpii)

; 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"

%struct.vertex = type { i32, i32, i32 }
%struct.edge = type { i32, i32, i32 }

@V = external dso_local global [210 x %struct.vertex], align 16
@vis = external dso_local global [210 x i8], align 16
@E = external dso_local global [20000 x %struct.edge], align 16
@maxflow = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12Edmonds_Karpii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %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
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  br label %11

11:                                               ; preds = %182, %2
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 210, i1 false)
  call void @_Z5emptyv()
  %12 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7enqueuei(i32 noundef %12)
  br label %13

13:                                               ; preds = %179, %11
  %14 = call noundef zeroext i1 @_Z7isemptyv()
  %15 = xor i1 %14, true
  br i1 %15, label %16, label %180

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %17 = call noundef i32 @_Z7dequeuev()
  store i32 %17, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %19
  %21 = getelementptr inbounds %struct.vertex, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %22, ptr %7, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %168, %16
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 6, ptr %8, align 4
  br label %174

27:                                               ; preds = %23
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.edge, ptr %30, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !13
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %34, label %167

34:                                               ; preds = %27
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %36
  %38 = getelementptr inbounds %struct.edge, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 4, !tbaa !15
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp eq i32 %39, %40
  br i1 %41, label %42, label %122

42:                                               ; preds = %34
  store i8 1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %43 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %43, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.edge, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !13
  store i32 %48, ptr %10, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %52, %42
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = icmp ne i32 %50, 1
  br i1 %51, label %52, label %69

52:                                               ; preds = %49
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %55
  %57 = getelementptr inbounds %struct.vertex, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !16
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %59
  %61 = getelementptr inbounds %struct.edge, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !13
  %63 = call noundef i32 @_Z3minii(i32 noundef %53, i32 noundef %62)
  store i32 %63, ptr %10, align 4, !tbaa !5
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.vertex, ptr %66, i32 0, i32 2
  %68 = load i32, ptr %67, align 4, !tbaa !17
  store i32 %68, ptr %9, align 4, !tbaa !5
  br label %49, !llvm.loop !18

69:                                               ; preds = %49
  %70 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %70, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.edge, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = sub nsw i32 %76, %71
  store i32 %77, ptr %75, align 4, !tbaa !13
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = xor i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.edge, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = add nsw i32 %84, %78
  store i32 %85, ptr %83, align 4, !tbaa !13
  br label %86

86:                                               ; preds = %89, %69
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 1
  br i1 %88, label %89, label %118

89:                                               ; preds = %86
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.vertex, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !16
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.edge, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !13
  %100 = sub nsw i32 %99, %90
  store i32 %100, ptr %98, align 4, !tbaa !13
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.vertex, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !16
  %107 = xor i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.edge, ptr %109, i32 0, i32 2
  %111 = load i32, ptr %110, align 4, !tbaa !13
  %112 = add nsw i32 %111, %101
  store i32 %112, ptr %110, align 4, !tbaa !13
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.vertex, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 4, !tbaa !17
  store i32 %117, ptr %9, align 4, !tbaa !5
  br label %86, !llvm.loop !20

118:                                              ; preds = %86
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = load i32, ptr @maxflow, align 4, !tbaa !5
  %121 = add nsw i32 %120, %119
  store i32 %121, ptr @maxflow, align 4, !tbaa !5
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %174

122:                                              ; preds = %34
  %123 = load i32, ptr %7, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.edge, ptr %125, i32 0, i32 0
  %127 = load i32, ptr %126, align 4, !tbaa !15
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [210 x i8], ptr @vis, i64 0, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !9, !range !21, !noundef !22
  %131 = trunc i8 %130 to i1
  %132 = zext i1 %131 to i32
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %165

134:                                              ; preds = %122
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %137
  %139 = getelementptr inbounds %struct.edge, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !15
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.vertex, ptr %142, i32 0, i32 1
  store i32 %135, ptr %143, align 4, !tbaa !16
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = load i32, ptr %7, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.edge, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !15
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %150
  %152 = getelementptr inbounds %struct.vertex, ptr %151, i32 0, i32 2
  store i32 %144, ptr %152, align 4, !tbaa !17
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.edge, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 4, !tbaa !15
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [210 x i8], ptr @vis, i64 0, i64 %158
  store i8 1, ptr %159, align 1, !tbaa !9
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.edge, ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !15
  call void @_Z7enqueuei(i32 noundef %164)
  br label %165

165:                                              ; preds = %134, %122
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166, %27
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %170
  %172 = getelementptr inbounds %struct.edge, ptr %171, i32 0, i32 1
  %173 = load i32, ptr %172, align 4, !tbaa !23
  store i32 %173, ptr %7, align 4, !tbaa !5
  br label %23, !llvm.loop !24

174:                                              ; preds = %118, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %175 = load i32, ptr %8, align 4
  switch i32 %175, label %177 [
    i32 6, label %176
  ]

176:                                              ; preds = %174
  store i32 0, ptr %8, align 4
  br label %177

177:                                              ; preds = %176, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %178 = load i32, ptr %8, align 4
  switch i32 %178, label %188 [
    i32 0, label %179
    i32 13, label %181
  ]

179:                                              ; preds = %177
  br label %13, !llvm.loop !25

180:                                              ; preds = %13
  br label %181

181:                                              ; preds = %180, %177
  br label %182

182:                                              ; preds = %181
  %183 = load i8, ptr %5, align 1, !tbaa !9, !range !21, !noundef !22
  %184 = trunc i8 %183 to i1
  %185 = zext i1 %184 to i32
  %186 = icmp eq i32 %185, 1
  br i1 %186, label %11, label %187, !llvm.loop !26

187:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret void

188:                                              ; preds = %177
  unreachable
}

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

; 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 nounwind uwtable
declare dso_local void @_Z5emptyv() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z7enqueuei(i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7isemptyv() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7dequeuev() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3minii(i32 noundef, i32 noundef) #3

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS6vertex", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{!14, !6, i64 0}
!16 = !{!12, !6, i64 4}
!17 = !{!12, !6, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!14, !6, i64 4}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}


; 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"

%struct.vertex = type { i32, i32, i32 }
%struct.edge = type { i32, i32, i32 }

@V = external dso_local local_unnamed_addr global [210 x %struct.vertex], align 16
@vis = external dso_local local_unnamed_addr global [210 x i8], align 16
@E = external dso_local local_unnamed_addr global [20000 x %struct.edge], align 16
@maxflow = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z12Edmonds_Karpii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(210) @vis, i8 0, i64 210, i1 false)
  tail call void @_Z5emptyv()
  tail call void @_Z7enqueuei(i32 noundef %0)
  %3 = tail call noundef zeroext i1 @_Z7isemptyv()
  br i1 %3, label %.critedge, label %.lr.ph58

.loopexit:                                        ; preds = %60, %.lr.ph58
  %4 = tail call noundef zeroext i1 @_Z7isemptyv()
  br i1 %4, label %.critedge, label %.lr.ph58.backedge

.lr.ph58.backedge:                                ; preds = %.loopexit, %.thread
  br label %.lr.ph58

.lr.ph58:                                         ; preds = %2, %.lr.ph58.backedge
  %5 = tail call noundef i32 @_Z7dequeuev()
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %6
  %.03755 = load i32, ptr %7, align 4, !tbaa !5
  %.not56 = icmp eq i32 %.03755, 0
  br i1 %.not56, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph58, %60
  %.03757 = phi i32 [ %.037, %60 ], [ %.03755, %.lr.ph58 ]
  %8 = sext i32 %.03757 to i64
  %9 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %8
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %13, label %60

13:                                               ; preds = %.lr.ph
  %14 = load i32, ptr %9, align 4, !tbaa !11
  %15 = icmp eq i32 %14, %1
  br i1 %15, label %.loopexit47, label %52

.loopexit47:                                      ; preds = %13
  %16 = getelementptr inbounds i8, ptr %9, i64 8
  %.not4260 = icmp eq i32 %5, 1
  br i1 %.not4260, label %._crit_edge, label %.lr.ph63

.lr.ph63:                                         ; preds = %.loopexit47, %.lr.ph63
  %.062 = phi i32 [ %24, %.lr.ph63 ], [ %11, %.loopexit47 ]
  %.03561 = phi i32 [ %26, %.lr.ph63 ], [ %5, %.loopexit47 ]
  %17 = sext i32 %.03561 to i64
  %18 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %17
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %21, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = tail call noundef i32 @_Z3minii(i32 noundef %.062, i32 noundef %23)
  %25 = getelementptr inbounds i8, ptr %18, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %.not42 = icmp eq i32 %26, 1
  br i1 %.not42, label %._crit_edge.loopexit, label %.lr.ph63, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %.lr.ph63
  %.pre = load i32, ptr %16, align 4, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit47
  %27 = phi i32 [ %11, %.loopexit47 ], [ %.pre, %._crit_edge.loopexit ]
  %.0.lcssa = phi i32 [ %11, %.loopexit47 ], [ %24, %._crit_edge.loopexit ]
  %28 = sub nsw i32 %27, %.0.lcssa
  store i32 %28, ptr %16, align 4, !tbaa !9
  %29 = xor i32 %.03757, 1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %30, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = add nsw i32 %32, %.0.lcssa
  store i32 %33, ptr %31, align 4, !tbaa !9
  br i1 %.not4260, label %.thread, label %.lr.ph67

.lr.ph67:                                         ; preds = %._crit_edge, %.lr.ph67
  %.165 = phi i32 [ %48, %.lr.ph67 ], [ %5, %._crit_edge ]
  %34 = sext i32 %.165 to i64
  %35 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %34
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !12
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %38, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = sub nsw i32 %40, %.0.lcssa
  store i32 %41, ptr %39, align 4, !tbaa !9
  %42 = xor i32 %37, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [20000 x %struct.edge], ptr @E, i64 0, i64 %43, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = add nsw i32 %45, %.0.lcssa
  store i32 %46, ptr %44, align 4, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %35, i64 8
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %.not43 = icmp eq i32 %48, 1
  br i1 %.not43, label %.thread, label %.lr.ph67, !llvm.loop !17

.thread:                                          ; preds = %.lr.ph67, %._crit_edge
  %49 = load i32, ptr @maxflow, align 4, !tbaa !5
  %50 = add nsw i32 %49, %.0.lcssa
  store i32 %50, ptr @maxflow, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(210) @vis, i8 0, i64 210, i1 false)
  tail call void @_Z5emptyv()
  tail call void @_Z7enqueuei(i32 noundef %0)
  %51 = tail call noundef zeroext i1 @_Z7isemptyv()
  br i1 %51, label %.critedge, label %.lr.ph58.backedge

52:                                               ; preds = %13
  %53 = sext i32 %14 to i64
  %54 = getelementptr inbounds [210 x i8], ptr @vis, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !18, !range !20, !noundef !21
  %56 = icmp eq i8 %55, 0
  br i1 %56, label %57, label %60

57:                                               ; preds = %52
  %58 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %53, i32 1
  store i32 %.03757, ptr %58, align 4, !tbaa !12
  %59 = getelementptr inbounds [210 x %struct.vertex], ptr @V, i64 0, i64 %53, i32 2
  store i32 %5, ptr %59, align 4, !tbaa !14
  store i8 1, ptr %54, align 1, !tbaa !18
  tail call void @_Z7enqueuei(i32 noundef %14)
  br label %60

60:                                               ; preds = %.lr.ph, %52, %57
  %61 = getelementptr inbounds i8, ptr %9, i64 4
  %.037 = load i32, ptr %61, align 4, !tbaa !5
  %.not = icmp eq i32 %.037, 0
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !22

.critedge:                                        ; preds = %.thread, %.loopexit, %2
  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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z5emptyv() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z7enqueuei(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7isemptyv() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7dequeuev() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3minii(i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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" }

!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, !6, i64 8}
!10 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 0}
!12 = !{!13, !6, i64 4}
!13 = !{!"_ZTS6vertex", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass