; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/190 Division 1/Problem B/B2.ll (Z6notallv)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global %"class.std::vector", align 8
@c = external dso_local global %"class.std::vector", align 8
@_Z3howB5cxx11 = external dso_local global [101 x %"class.std::__cxx11::basic_string"], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z6notallv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %12 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16032) #7
  %13 = load i32, ptr @m, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = add nsw i32 %13, %14
  %16 = add nsw i32 %15, 2
  invoke void @_ZN14minCostMaxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(16032) %12, i32 noundef %16)
          to label %17 unwind label %23

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

18:                                               ; preds = %32, %17
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %27, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %35

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %2, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %3, align 4
  call void @_ZdlPvm(ptr noundef %12, i64 noundef 16032) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %112

27:                                               ; preds = %18
  %28 = load ptr, ptr %1, align 8, !tbaa !9
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = add nsw i32 %30, 2
  call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %28, i32 noundef %29, i32 noundef %31, i32 noundef 1, i32 noundef 0)
  br label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %6, align 4, !tbaa !5
  br label %18, !llvm.loop !11

35:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %48, %35
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr @m, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %51

41:                                               ; preds = %36
  %42 = load ptr, ptr %1, align 8, !tbaa !9
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = add nsw i32 %43, 2
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = add nsw i32 %44, %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %42, i32 noundef %46, i32 noundef %47, i32 noundef 1, i32 noundef 0)
  br label %48

48:                                               ; preds = %41
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !5
  br label %36, !llvm.loop !13

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

52:                                               ; preds = %101, %51
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %104

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

58:                                               ; preds = %97, %57
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %100

63:                                               ; preds = %58
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @c, i64 noundef %65) #6
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @a, i64 noundef %69) #6
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp sgt i32 %67, %71
  br i1 %72, label %73, label %96

73:                                               ; preds = %63
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [101 x %"class.std::__cxx11::basic_string"], ptr @_Z3howB5cxx11, i64 0, i64 %75
  %77 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %76, ptr noundef @.str)
  br i1 %77, label %78, label %96

78:                                               ; preds = %73
  %79 = load ptr, ptr %1, align 8, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = add nsw i32 %80, 2
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = add nsw i32 %82, 2
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = add nsw i32 %83, %84
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @c, i64 noundef %87) #6
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @a, i64 noundef %91) #6
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sub nsw i32 %89, %93
  %95 = sub nsw i32 0, %94
  call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %79, i32 noundef %81, i32 noundef %85, i32 noundef 1, i32 noundef %95)
  br label %96

96:                                               ; preds = %78, %73, %63
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !5
  br label %58, !llvm.loop !14

100:                                              ; preds = %62
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %8, align 4, !tbaa !5
  br label %52, !llvm.loop !15

104:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %105 = load ptr, ptr %1, align 8, !tbaa !9
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = call i64 @_ZN14minCostMaxFlow4mcmfEiib(ptr noundef nonnull align 8 dereferenceable(16032) %105, i32 noundef %106, i32 noundef %107, i1 noundef zeroext false)
  store i64 %108, ptr %11, align 4
  %109 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %110 = load i32, ptr %109, align 4, !tbaa !16
  %111 = sub nsw i32 0, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret i32 %111

112:                                              ; preds = %23
  %113 = load ptr, ptr %2, align 8
  %114 = load i32, ptr %3, align 4
  %115 = insertvalue { ptr, i32 } poison, ptr %113, 0
  %116 = insertvalue { ptr, i32 } %115, i32 %114, 1
  resume { ptr, i32 } %116
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14minCostMaxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(16032), i32 noundef) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN14minCostMaxFlow4mcmfEiib(ptr noundef nonnull align 8 dereferenceable(16032), i32 noundef, i32 noundef, i1 noundef zeroext) #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!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 = distinct !{!15, !12}
!16 = !{!17, !6, i64 4}
!17 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@a = external dso_local global %"class.std::vector", align 8
@c = external dso_local global %"class.std::vector", align 8
@_Z3howB5cxx11 = external dso_local global [101 x %"class.std::__cxx11::basic_string"], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -2147483647, -2147483648) i32 @_Z6notallv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = tail call noalias noundef nonnull dereferenceable(16032) ptr @_Znwm(i64 noundef 16032) #4
  %2 = load i32, ptr @m, align 4, !tbaa !5
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %4 = add i32 %2, 2
  %5 = add i32 %4, %3
  tail call void @_ZN14minCostMaxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(16032) %1, i32 noundef %5)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %.preheader28

.preheader28:                                     ; preds = %.lr.ph, %0
  %8 = phi i32 [ %6, %0 ], [ %13, %.lr.ph ]
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph31, label %.preheader27

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.029 = phi i32 [ %12, %.lr.ph ], [ 0, %0 ]
  %11 = add nuw nsw i32 %.029, 2
  tail call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %1, i32 noundef 0, i32 noundef %11, i32 noundef 1, i32 noundef 0)
  %12 = add nuw nsw i32 %.029, 1
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %.lr.ph, label %.preheader28, !llvm.loop !9

.preheader27.loopexit:                            ; preds = %.lr.ph31
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader27

.preheader27:                                     ; preds = %.preheader27.loopexit, %.preheader28
  %15 = phi i32 [ %23, %.preheader27.loopexit ], [ %9, %.preheader28 ]
  %16 = phi i32 [ %.pre, %.preheader27.loopexit ], [ %8, %.preheader28 ]
  %17 = icmp sgt i32 %16, 0
  %18 = icmp sgt i32 %15, 0
  %or.cond = and i1 %17, %18
  br i1 %or.cond, label %.preheader, label %._crit_edge35

.lr.ph31:                                         ; preds = %.preheader28, %.lr.ph31
  %.02430 = phi i32 [ %22, %.lr.ph31 ], [ 0, %.preheader28 ]
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = add nuw i32 %.02430, 2
  %21 = add i32 %20, %19
  tail call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %1, i32 noundef %21, i32 noundef 1, i32 noundef 1, i32 noundef 0)
  %22 = add nuw nsw i32 %.02430, 1
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %.lr.ph31, label %.preheader27.loopexit, !llvm.loop !11

.preheader:                                       ; preds = %.preheader27, %._crit_edge
  %25 = phi i32 [ %33, %._crit_edge ], [ %16, %.preheader27 ]
  %26 = phi i32 [ %34, %._crit_edge ], [ %15, %.preheader27 ]
  %indvars.iv38 = phi i64 [ %indvars.iv.next39, %._crit_edge ], [ 0, %.preheader27 ]
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph33, label %._crit_edge

.lr.ph33:                                         ; preds = %.preheader
  %28 = getelementptr inbounds [101 x %"class.std::__cxx11::basic_string"], ptr @_Z3howB5cxx11, i64 0, i64 %indvars.iv38
  %29 = trunc i64 %indvars.iv38 to i32
  %30 = add i32 %29, 2
  br label %37

._crit_edge35:                                    ; preds = %._crit_edge, %.preheader27
  %31 = tail call i64 @_ZN14minCostMaxFlow4mcmfEiib(ptr noundef nonnull align 8 dereferenceable(16032) %1, i32 noundef 0, i32 noundef 1, i1 noundef zeroext false)
  %.sroa.3.0.extract.shift = lshr i64 %31, 32
  %.sroa.3.0.extract.trunc = trunc nuw i64 %.sroa.3.0.extract.shift to i32
  %32 = sub nsw i32 0, %.sroa.3.0.extract.trunc
  ret i32 %32

._crit_edge.loopexit:                             ; preds = %54
  %.pre41 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %33 = phi i32 [ %.pre41, %._crit_edge.loopexit ], [ %25, %.preheader ]
  %34 = phi i32 [ %55, %._crit_edge.loopexit ], [ %26, %.preheader ]
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %35 = sext i32 %33 to i64
  %36 = icmp slt i64 %indvars.iv.next39, %35
  br i1 %36, label %.preheader, label %._crit_edge35, !llvm.loop !12

37:                                               ; preds = %.lr.ph33, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph33 ], [ %indvars.iv.next, %54 ]
  %38 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @c, i64 noundef %indvars.iv) #5
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @a, i64 noundef %indvars.iv38) #5
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp sgt i32 %39, %41
  br i1 %42, label %43, label %54

43:                                               ; preds = %37
  %44 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str)
  br i1 %44, label %45, label %54

45:                                               ; preds = %43
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = trunc i64 %indvars.iv to i32
  %48 = add i32 %47, 2
  %49 = add i32 %48, %46
  %50 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @c, i64 noundef %indvars.iv) #5
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @a, i64 noundef %indvars.iv38) #5
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %.neg = sub nsw i32 %53, %51
  tail call void @_ZN14minCostMaxFlow7addEdgeEiiii(ptr noundef nonnull align 8 dereferenceable(16032) %1, i32 noundef %30, i32 noundef %49, i32 noundef 1, i32 noundef %.neg)
  br label %54

54:                                               ; preds = %37, %43, %45
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = load i32, ptr @m, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next, %56
  br i1 %57, label %37, label %._crit_edge.loopexit, !llvm.loop !14
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14minCostMaxFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(16032), i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN14minCostMaxFlow4mcmfEiib(ptr noundef nonnull align 8 dereferenceable(16032), i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { builtin allocsize(0) }
attributes #5 = { nounwind }

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

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


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