; LLVM IR from xtaci/algorithms :: src (edmonds_karp_demo)

; 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.alg::EdmondsKarp" = type { ptr, %"class.alg::Array2D", %"class.alg::HashTable", ptr, %"class.alg::HashTable", %"class.alg::HashTable" }
%"class.alg::Array2D" = type { i32, i32, ptr }
%"class.alg::HashTable" = type { i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.alg::EdmondsKarp", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %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 %1, align 4
  %12 = call i64 @time(ptr noundef null) #7
  %13 = trunc i64 %12 to i32
  call void @srand(i32 noundef %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 6, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = call noundef ptr @_ZN3alg13DirectedGraph9randgraphEi(i32 noundef %14)
  store ptr %15, ptr %3, align 8, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !9
  call void @_ZNK3alg5Graph8printdotEv(ptr noundef nonnull align 8 dereferenceable(36) %16)
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 104, ptr %4) #7
  %18 = load ptr, ptr %3, align 8, !tbaa !9
  call void @_ZN3alg11EdmondsKarpC2ERKNS_5GraphE(ptr noundef nonnull align 8 dereferenceable(104) %4, ptr noundef nonnull align 8 dereferenceable(36) %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %19 = invoke noundef i32 @_ZN3alg11EdmondsKarp3runEii(ptr noundef nonnull align 8 dereferenceable(104) %4, i32 noundef 0, i32 noundef 5)
          to label %20 unwind label %35

20:                                               ; preds = %0
  store i32 %19, ptr %5, align 4, !tbaa !5
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %21)
          to label %23 unwind label %35

23:                                               ; preds = %20
  %24 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %25 unwind label %35

25:                                               ; preds = %23
  %26 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3)
          to label %27 unwind label %35

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %52, %27
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = load ptr, ptr %3, align 8, !tbaa !9
  %31 = invoke noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %30)
          to label %32 unwind label %39

32:                                               ; preds = %28
  %33 = icmp ult i32 %29, %31
  br i1 %33, label %43, label %34

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

35:                                               ; preds = %55, %25, %23, %20, %0
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %6, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %7, align 4
  br label %118

39:                                               ; preds = %48, %45, %43, %28
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %118

43:                                               ; preds = %32
  %44 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104) %4)
          to label %45 unwind label %39

45:                                               ; preds = %43
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg9HashTableIiiNS_9hash_codeIiEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %44, i32 noundef %46)
          to label %48 unwind label %39

48:                                               ; preds = %45
  %49 = load i32, ptr %47, align 4, !tbaa !5
  %50 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %49)
          to label %51 unwind label %39

51:                                               ; preds = %48
  br label %52

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

55:                                               ; preds = %34
  %56 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5)
          to label %57 unwind label %35

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %105, %57
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = load ptr, ptr %3, align 8, !tbaa !9
  %61 = invoke noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %60)
          to label %62 unwind label %65

62:                                               ; preds = %58
  %63 = icmp ult i32 %59, %61
  br i1 %63, label %69, label %64

64:                                               ; preds = %62
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %109

65:                                               ; preds = %102, %74, %71, %69, %58
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  br label %108

69:                                               ; preds = %62
  %70 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104) %4)
          to label %71 unwind label %65

71:                                               ; preds = %69
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg9HashTableIiiNS_9hash_codeIiEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %70, i32 noundef %72)
          to label %74 unwind label %65

74:                                               ; preds = %71
  %75 = load i32, ptr %73, align 4, !tbaa !5
  %76 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %75)
          to label %77 unwind label %65

77:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %99, %77
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = load ptr, ptr %3, align 8, !tbaa !9
  %81 = invoke noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %80)
          to label %82 unwind label %85

82:                                               ; preds = %78
  %83 = icmp ult i32 %79, %81
  br i1 %83, label %89, label %84

84:                                               ; preds = %82
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %102

85:                                               ; preds = %95, %91, %89, %78
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %108

89:                                               ; preds = %82
  %90 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3alg11EdmondsKarp8residualEv(ptr noundef nonnull align 8 dereferenceable(104) %4)
          to label %91 unwind label %85

91:                                               ; preds = %89
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(16) %90, i32 noundef %92, i32 noundef %93)
          to label %95 unwind label %85

95:                                               ; preds = %91
  %96 = load i32, ptr %94, align 4, !tbaa !5
  %97 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %96)
          to label %98 unwind label %85

98:                                               ; preds = %95
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = add i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !5
  br label %78, !llvm.loop !13

102:                                              ; preds = %84
  %103 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5)
          to label %104 unwind label %65

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = add i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !5
  br label %58, !llvm.loop !14

108:                                              ; preds = %85, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %118

109:                                              ; preds = %64
  %110 = load ptr, ptr %3, align 8, !tbaa !9
  %111 = icmp eq ptr %110, null
  br i1 %111, label %116, label %112

112:                                              ; preds = %109
  %113 = load ptr, ptr %110, align 8, !tbaa !15
  %114 = getelementptr inbounds ptr, ptr %113, i64 1
  %115 = load ptr, ptr %114, align 8
  call void %115(ptr noundef nonnull align 8 dereferenceable(36) %110) #7
  br label %116

116:                                              ; preds = %112, %109
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @_ZN3alg11EdmondsKarpD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %4) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %117 = load i32, ptr %1, align 4
  ret i32 %117

118:                                              ; preds = %108, %39, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @_ZN3alg11EdmondsKarpD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %4) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %6, align 8
  %121 = load i32, ptr %7, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #1

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3alg13DirectedGraph9randgraphEi(i32 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3alg11EdmondsKarpC2ERKNS_5GraphE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104)) #6 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3alg11EdmondsKarp8residualEv(ptr noundef nonnull align 8 dereferenceable(104)) #6 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 = { 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 #7 = { 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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


; 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.alg::EdmondsKarp" = type { ptr, %"class.alg::Array2D", %"class.alg::HashTable", ptr, %"class.alg::HashTable", %"class.alg::HashTable" }
%"class.alg::Array2D" = type { i32, i32, ptr }
%"class.alg::HashTable" = type { i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.alg::EdmondsKarp", align 8
  %2 = tail call i64 @time(ptr noundef null) #7
  %3 = trunc i64 %2 to i32
  tail call void @srand(i32 noundef %3) #7
  %4 = tail call noundef ptr @_ZN3alg13DirectedGraph9randgraphEi(i32 noundef 6)
  tail call void @_ZNK3alg5Graph8printdotEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %1) #7
  call void @_ZN3alg11EdmondsKarpC2ERKNS_5GraphE(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(36) %4)
  %6 = invoke noundef i32 @_ZN3alg11EdmondsKarp3runEii(ptr noundef nonnull align 8 dereferenceable(104) %1, i32 noundef 0, i32 noundef 5)
          to label %7 unwind label %14

7:                                                ; preds = %0
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6)
  %9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %11 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %20, %7
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %13 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %.not34 = icmp eq i32 %13, 0
  br i1 %.not34, label %._crit_edge33, label %.lr.ph32

14:                                               ; preds = %0
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %48

16:                                               ; preds = %.lr.ph
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %48

.lr.ph:                                           ; preds = %7, %20
  %.02125 = phi i32 [ %23, %20 ], [ 0, %7 ]
  %18 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %19 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg9HashTableIiiNS_9hash_codeIiEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %.02125)
          to label %20 unwind label %16

20:                                               ; preds = %.lr.ph
  %21 = load i32, ptr %19, align 4, !tbaa !5
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %21)
  %23 = add nuw i32 %.02125, 1
  %24 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %25 = icmp ult i32 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !9

26:                                               ; preds = %.lr.ph32
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %48

.lr.ph32:                                         ; preds = %._crit_edge, %._crit_edge29
  %.02030 = phi i32 [ %35, %._crit_edge29 ], [ 0, %._crit_edge ]
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %29 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg9HashTableIiiNS_9hash_codeIiEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef %.02030)
          to label %30 unwind label %26

30:                                               ; preds = %.lr.ph32
  %31 = load i32, ptr %29, align 4, !tbaa !5
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %31)
  %33 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %.not35 = icmp eq i32 %33, 0
  br i1 %.not35, label %._crit_edge29, label %.lr.ph28

._crit_edge29:                                    ; preds = %.lr.ph28, %30
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %35 = add nuw i32 %.02030, 1
  %36 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %37 = icmp ult i32 %35, %36
  br i1 %37, label %.lr.ph32, label %._crit_edge33, !llvm.loop !11

.lr.ph28:                                         ; preds = %30, %.lr.ph28
  %.026 = phi i32 [ %42, %.lr.ph28 ], [ 0, %30 ]
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3alg11EdmondsKarp8residualEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(16) %38, i32 noundef %.02030, i32 noundef %.026)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %40)
  %42 = add nuw i32 %.026, 1
  %43 = call noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36) %4)
  %44 = icmp ult i32 %42, %43
  br i1 %44, label %.lr.ph28, label %._crit_edge29, !llvm.loop !12

._crit_edge33:                                    ; preds = %._crit_edge29, %._crit_edge
  %45 = load ptr, ptr %4, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load ptr, ptr %46, align 8
  call void %47(ptr noundef nonnull align 8 dereferenceable(36) %4) #7
  call void @_ZN3alg11EdmondsKarpD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %1) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %1) #7
  ret i32 0

48:                                               ; preds = %26, %16, %14
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %27, %26 ], [ %15, %14 ]
  call void @_ZN3alg11EdmondsKarpD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %1) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3alg13DirectedGraph9randgraphEi(i32 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3alg11EdmondsKarpC2ERKNS_5GraphE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3alg5Graph12vertex_countEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3alg11EdmondsKarp4rmapEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3alg11EdmondsKarp8residualEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6 align 2

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

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

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

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

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


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