; LLVM IR from Dev-XYS/Algorithms :: Bigraph-Matching(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, i32, i8 }
%struct.edge = type { i32, i32, i32 }

@V = external dso_local global [10000 x %struct.vertex], align 16
@E = external dso_local global [100000 x %struct.edge], align 16
@ans = external dso_local global i32, align 4
@hp = external dso_local global i32, align 4
@tp = external dso_local global i32, align 4

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

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

; Function Attrs: mustprogress nounwind 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
  %11 = 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) #2
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %12

12:                                               ; preds = %187, %2
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %22, %12
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = icmp slt i32 %14, 10000
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  br label %25

17:                                               ; preds = %13
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %19
  %21 = getelementptr inbounds %struct.vertex, ptr %20, i32 0, i32 4
  store i8 0, ptr %21, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %6, align 4, !tbaa !5
  br label %13, !llvm.loop !13

25:                                               ; preds = %16
  store i32 0, ptr @tp, align 4, !tbaa !5
  store i32 0, ptr @hp, align 4, !tbaa !5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7enqueuei(i32 noundef %26)
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %28
  %30 = getelementptr inbounds %struct.vertex, ptr %29, i32 0, i32 4
  store i8 1, ptr %30, align 4, !tbaa !11
  br label %31

31:                                               ; preds = %185, %25
  %32 = load i32, ptr @hp, align 4, !tbaa !5
  %33 = load i32, ptr @tp, align 4, !tbaa !5
  %34 = icmp ne i32 %32, %33
  br i1 %34, label %35, label %186

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  %36 = call noundef i32 @_Z7dequeuev()
  store i32 %36, ptr %7, align 4, !tbaa !5
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = icmp eq i32 %37, %38
  br i1 %39, label %40, label %113

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  %41 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %41, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  store i32 1000000000, ptr %9, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %68, %40
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = icmp ne i32 %43, %44
  br i1 %45, label %46, label %74

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %48
  %50 = getelementptr inbounds %struct.vertex, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %52
  %54 = getelementptr inbounds %struct.edge, ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !16
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %58, label %68

58:                                               ; preds = %46
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %60
  %62 = getelementptr inbounds %struct.vertex, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.edge, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !16
  store i32 %67, ptr %9, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %58, %46
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.vertex, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !18
  store i32 %73, ptr %8, align 4, !tbaa !5
  br label %42, !llvm.loop !19

74:                                               ; preds = %42
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = load i32, ptr @ans, align 4, !tbaa !5
  %77 = add nsw i32 %76, %75
  store i32 %77, ptr @ans, align 4, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %78, ptr %8, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %83, %74
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = icmp ne i32 %80, %81
  br i1 %82, label %83, label %112

83:                                               ; preds = %79
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %86
  %88 = getelementptr inbounds %struct.vertex, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !15
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.edge, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !16
  %94 = sub nsw i32 %93, %84
  store i32 %94, ptr %92, align 4, !tbaa !16
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.vertex, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !15
  %101 = xor i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %102
  %104 = getelementptr inbounds %struct.edge, ptr %103, i32 0, i32 2
  %105 = load i32, ptr %104, align 4, !tbaa !16
  %106 = add nsw i32 %105, %95
  store i32 %106, ptr %104, align 4, !tbaa !16
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.vertex, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !18
  store i32 %111, ptr %8, align 4, !tbaa !5
  br label %79, !llvm.loop !20

112:                                              ; preds = %79
  store i8 1, ptr %5, align 1, !tbaa !9
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  br label %183

113:                                              ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %115
  %117 = getelementptr inbounds %struct.vertex, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 4, !tbaa !21
  store i32 %118, ptr %11, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %176, %113
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  br label %182

123:                                              ; preds = %119
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.edge, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 4, !tbaa !22
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.vertex, ptr %130, i32 0, i32 4
  %132 = load i8, ptr %131, align 4, !tbaa !11, !range !23, !noundef !24
  %133 = trunc i8 %132 to i1
  %134 = zext i1 %133 to i32
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %175

136:                                              ; preds = %123
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.edge, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 4, !tbaa !16
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %175

143:                                              ; preds = %136
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.edge, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 4, !tbaa !22
  call void @_Z7enqueuei(i32 noundef %148)
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %150
  %152 = getelementptr inbounds %struct.edge, ptr %151, i32 0, i32 0
  %153 = load i32, ptr %152, align 4, !tbaa !22
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.vertex, ptr %155, i32 0, i32 4
  store i8 1, ptr %156, align 4, !tbaa !11
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %159
  %161 = getelementptr inbounds %struct.edge, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !22
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %163
  %165 = getelementptr inbounds %struct.vertex, ptr %164, i32 0, i32 1
  store i32 %157, ptr %165, align 4, !tbaa !18
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %168
  %170 = getelementptr inbounds %struct.edge, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 4, !tbaa !22
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %172
  %174 = getelementptr inbounds %struct.vertex, ptr %173, i32 0, i32 2
  store i32 %166, ptr %174, align 4, !tbaa !15
  br label %175

175:                                              ; preds = %143, %136, %123
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %11, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %178
  %180 = getelementptr inbounds %struct.edge, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !25
  store i32 %181, ptr %11, align 4, !tbaa !5
  br label %119, !llvm.loop !26

182:                                              ; preds = %122
  store i32 0, ptr %10, align 4
  br label %183

183:                                              ; preds = %182, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  %184 = load i32, ptr %10, align 4
  switch i32 %184, label %193 [
    i32 0, label %185
    i32 8, label %186
  ]

185:                                              ; preds = %183
  br label %31, !llvm.loop !27

186:                                              ; preds = %183, %31
  br label %187

187:                                              ; preds = %186
  %188 = load i8, ptr %5, align 1, !tbaa !9, !range !23, !noundef !24
  %189 = trunc i8 %188 to i1
  %190 = zext i1 %189 to i32
  %191 = icmp eq i32 %190, 1
  br i1 %191, label %12, label %192, !llvm.loop !28

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

193:                                              ; preds = %183
  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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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, !10, i64 16}
!12 = !{!"_ZTS6vertex", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !6, i64 8}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = !{!12, !6, i64 4}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = !{!12, !6, i64 0}
!22 = !{!17, !6, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!17, !6, i64 4}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}


; 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, i32, i8 }
%struct.edge = type { i32, i32, i32 }

@V = external dso_local local_unnamed_addr global [10000 x %struct.vertex], align 16
@E = external dso_local local_unnamed_addr global [100000 x %struct.edge], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@hp = external dso_local local_unnamed_addr global i32, align 4
@tp = external dso_local local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z12Edmonds_Karpii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = sext i32 %0 to i64
  %4 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %3, i32 4
  %.not4863 = icmp eq i32 %1, %0
  br label %.thread

5:                                                ; preds = %.thread
  store i32 0, ptr @tp, align 4, !tbaa !5
  store i32 0, ptr @hp, align 4, !tbaa !5
  tail call void @_Z7enqueuei(i32 noundef %0)
  store i8 1, ptr %4, align 4, !tbaa !9
  %6 = load i32, ptr @hp, align 4, !tbaa !5
  %7 = load i32, ptr @tp, align 4, !tbaa !5
  %.not.not59 = icmp eq i32 %6, %7
  br i1 %.not.not59, label %.critedge, label %.lr.ph61

.thread:                                          ; preds = %.thread.backedge, %2
  %indvars.iv = phi i64 [ 1, %2 ], [ %indvars.iv.be, %.thread.backedge ]
  %8 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %indvars.iv, i32 4
  store i8 0, ptr %8, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 10000
  br i1 %exitcond.not, label %5, label %.thread.backedge

.thread.backedge:                                 ; preds = %.lr.ph70, %.thread, %._crit_edge.thread, %._crit_edge
  %indvars.iv.be = phi i64 [ %indvars.iv.next, %.thread ], [ 1, %._crit_edge.thread ], [ 1, %._crit_edge ], [ 1, %.lr.ph70 ]
  br label %.thread, !llvm.loop !12

.loopexit:                                        ; preds = %61, %41
  %9 = load i32, ptr @hp, align 4, !tbaa !5
  %10 = load i32, ptr @tp, align 4, !tbaa !5
  %.not.not = icmp eq i32 %9, %10
  br i1 %.not.not, label %.critedge, label %.lr.ph61

.lr.ph61:                                         ; preds = %5, %.loopexit
  %11 = tail call noundef i32 @_Z7dequeuev()
  %12 = icmp eq i32 %11, %1
  br i1 %12, label %.preheader, label %41

.preheader:                                       ; preds = %.lr.ph61
  br i1 %.not4863, label %._crit_edge.thread, label %.lr.ph66

._crit_edge.thread:                               ; preds = %.preheader
  %13 = load i32, ptr @ans, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1000000000
  store i32 %14, ptr @ans, align 4, !tbaa !5
  br label %.thread.backedge

.lr.ph66:                                         ; preds = %.preheader, %.lr.ph66
  %.03765 = phi i32 [ %spec.select, %.lr.ph66 ], [ 1000000000, %.preheader ]
  %.03864 = phi i32 [ %23, %.lr.ph66 ], [ %1, %.preheader ]
  %15 = sext i32 %.03864 to i64
  %16 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %15
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i32, ptr %17, align 4, !tbaa !14
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %19, i32 2
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %spec.select = tail call i32 @llvm.smin.i32(i32 %21, i32 %.03765)
  %22 = getelementptr inbounds i8, ptr %16, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !17
  %.not48 = icmp eq i32 %23, %0
  br i1 %.not48, label %._crit_edge, label %.lr.ph66, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph66
  %24 = load i32, ptr @ans, align 4, !tbaa !5
  %25 = add nsw i32 %24, %spec.select
  store i32 %25, ptr @ans, align 4, !tbaa !5
  br i1 %.not4863, label %.thread.backedge, label %.lr.ph70

.lr.ph70:                                         ; preds = %._crit_edge, %.lr.ph70
  %.13968 = phi i32 [ %40, %.lr.ph70 ], [ %1, %._crit_edge ]
  %26 = sext i32 %.13968 to i64
  %27 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %26
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %30, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = sub nsw i32 %32, %spec.select
  store i32 %33, ptr %31, align 4, !tbaa !15
  %34 = xor i32 %29, 1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %35, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = add nsw i32 %37, %spec.select
  store i32 %38, ptr %36, align 4, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %27, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %.not49 = icmp eq i32 %40, %0
  br i1 %.not49, label %.thread.backedge, label %.lr.ph70, !llvm.loop !19

41:                                               ; preds = %.lr.ph61
  %42 = sext i32 %11 to i64
  %43 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %42
  %.056 = load i32, ptr %43, align 4, !tbaa !5
  %.not4757 = icmp eq i32 %.056, 0
  br i1 %.not4757, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %41, %61
  %.058 = phi i32 [ %.0, %61 ], [ %.056, %41 ]
  %44 = sext i32 %.058 to i64
  %45 = getelementptr inbounds [100000 x %struct.edge], ptr @E, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !20
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %47, i32 4
  %49 = load i8, ptr %48, align 4, !tbaa !9, !range !21, !noundef !22
  %50 = icmp eq i8 %49, 0
  br i1 %50, label %51, label %61

51:                                               ; preds = %.lr.ph
  %52 = getelementptr inbounds i8, ptr %45, i64 8
  %53 = load i32, ptr %52, align 4, !tbaa !15
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %51
  tail call void @_Z7enqueuei(i32 noundef %46)
  %56 = load i32, ptr %45, align 4, !tbaa !20
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %57, i32 4
  store i8 1, ptr %58, align 4, !tbaa !9
  %59 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %57, i32 1
  store i32 %11, ptr %59, align 4, !tbaa !17
  %60 = getelementptr inbounds [10000 x %struct.vertex], ptr @V, i64 0, i64 %57, i32 2
  store i32 %.058, ptr %60, align 4, !tbaa !14
  br label %61

61:                                               ; preds = %.lr.ph, %51, %55
  %62 = getelementptr inbounds i8, ptr %45, i64 4
  %.0 = load i32, ptr %62, align 4, !tbaa !5
  %.not47 = icmp eq i32 %.0, 0
  br i1 %.not47, label %.loopexit, label %.lr.ph, !llvm.loop !23

.critedge:                                        ; preds = %5, %.loopexit
  ret void
}

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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


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