; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan (1073)

; 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.FlowGraph = type { i32, i32, i32, [400020 x %"struct.FlowGraph<long long>::edge"], [1010 x i32], i32, [1010 x i32], [1010 x i32], i32 }
%"struct.FlowGraph<long long>::edge" = type { i32, i32, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@g = external dso_local global %class.FlowGraph, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %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 i64, align 8
  store i32 0, ptr %1, align 4
  %11 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %19
  %21 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = mul nsw i32 2, %24
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = mul nsw i32 2, %27
  %29 = add nsw i32 %28, 2
  store i32 %29, ptr %5, align 4, !tbaa !8
  %30 = load i32, ptr %4, align 4, !tbaa !8
  %31 = load i32, ptr %5, align 4, !tbaa !8
  %32 = load i32, ptr %5, align 4, !tbaa !8
  %33 = load i32, ptr %2, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %30, i32 noundef %31, i32 noundef %32, i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %34

34:                                               ; preds = %50, %0
  %35 = load i32, ptr %6, align 4, !tbaa !8
  %36 = load i32, ptr %3, align 4, !tbaa !8
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %53

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %42 = load i32, ptr %7, align 4, !tbaa !8
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = add nsw i32 %42, %43
  %45 = load i32, ptr %8, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %44, i32 noundef %45, i64 noundef 4557430888798830399)
  %46 = load i32, ptr %8, align 4, !tbaa !8
  %47 = load i32, ptr %2, align 4, !tbaa !8
  %48 = add nsw i32 %46, %47
  %49 = load i32, ptr %7, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %48, i32 noundef %49, i64 noundef 4557430888798830399)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %50

50:                                               ; preds = %39
  %51 = load i32, ptr %6, align 4, !tbaa !8
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %6, align 4, !tbaa !8
  br label %34, !llvm.loop !11

53:                                               ; preds = %38
  %54 = load i32, ptr %4, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %54, i32 noundef 1, i64 noundef 4557430888798830399)
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = load i32, ptr %2, align 4, !tbaa !8
  %57 = add nsw i32 %55, %56
  %58 = load i32, ptr %5, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %57, i32 noundef %58, i64 noundef 4557430888798830399)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %59

59:                                               ; preds = %84, %53
  %60 = load i32, ptr %9, align 4, !tbaa !8
  %61 = load i32, ptr %2, align 4, !tbaa !8
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %87

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %66 = load i32, ptr %9, align 4, !tbaa !8
  %67 = icmp eq i32 %66, 1
  br i1 %67, label %72, label %68

68:                                               ; preds = %64
  %69 = load i32, ptr %9, align 4, !tbaa !8
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = icmp eq i32 %69, %70
  br i1 %71, label %72, label %77

72:                                               ; preds = %68, %64
  %73 = load i32, ptr %9, align 4, !tbaa !8
  %74 = load i32, ptr %9, align 4, !tbaa !8
  %75 = load i32, ptr %2, align 4, !tbaa !8
  %76 = add nsw i32 %74, %75
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %73, i32 noundef %76, i64 noundef 4557430888798830399)
  br label %83

77:                                               ; preds = %68
  %78 = load i32, ptr %9, align 4, !tbaa !8
  %79 = load i32, ptr %9, align 4, !tbaa !8
  %80 = load i32, ptr %2, align 4, !tbaa !8
  %81 = add nsw i32 %79, %80
  %82 = load i64, ptr %10, align 8, !tbaa !13
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %78, i32 noundef %81, i64 noundef %82)
  br label %83

83:                                               ; preds = %77, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %9, align 4, !tbaa !8
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %9, align 4, !tbaa !8
  br label %59, !llvm.loop !15

87:                                               ; preds = %63
  %88 = call noundef i64 @_ZN9FlowGraphIxE5dinicEv(ptr noundef nonnull align 8 dereferenceable(6412464) @g)
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %88)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %89, i8 noundef signext 10)
  call void @_ZN9FlowGraphIxE7get_cutEv(ptr noundef nonnull align 8 dereferenceable(6412464) @g)
  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 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %91 = load i32, ptr %1, align 4
  ret i32 %91
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464), i32 noundef, i32 noundef, i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FlowGraphIxE7get_cutEv(ptr noundef nonnull align 8 dereferenceable(6412464)) #4 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


; 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.FlowGraph = type { i32, i32, i32, [400020 x %"struct.FlowGraph<long long>::edge"], [1010 x i32], i32, [1010 x i32], [1010 x i32], i32 }
%"struct.FlowGraph<long long>::edge" = type { i32, i32, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@g = external dso_local global %class.FlowGraph, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %14
  %16 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = shl nsw i32 %19, 1
  %21 = or disjoint i32 %20, 1
  %22 = add nsw i32 %20, 2
  call void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %21, i32 noundef %22, i32 noundef %22, i32 noundef %19)
  %23 = load i32, ptr %2, align 4, !tbaa !8
  %.not19 = icmp slt i32 %23, 1
  br i1 %.not19, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %21, i32 noundef 1, i64 noundef 4557430888798830399)
  %24 = load i32, ptr %1, align 4, !tbaa !8
  %25 = shl nsw i32 %24, 1
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %25, i32 noundef %22, i64 noundef 4557430888798830399)
  %26 = load i32, ptr %1, align 4, !tbaa !8
  %.not1821 = icmp slt i32 %26, 1
  br i1 %.not1821, label %._crit_edge25, label %27

27:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  %29 = add nsw i32 %.pre, 1
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef 1, i32 noundef %29, i64 noundef 4557430888798830399)
  %.pre28 = load i32, ptr %1, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %.not18.not.peel = icmp sgt i32 %.pre28, 1
  br i1 %.not18.not.peel, label %.lr.ph24.peel.next, label %._crit_edge25

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01620 = phi i32 [ %40, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = load i32, ptr %1, align 4, !tbaa !8
  %34 = add nsw i32 %33, %32
  %35 = load i32, ptr %4, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %34, i32 noundef %35, i64 noundef 4557430888798830399)
  %36 = load i32, ptr %4, align 4, !tbaa !8
  %37 = load i32, ptr %1, align 4, !tbaa !8
  %38 = add nsw i32 %37, %36
  %39 = load i32, ptr %3, align 4, !tbaa !8
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %38, i32 noundef %39, i64 noundef 4557430888798830399)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %40 = add nuw nsw i32 %.01620, 1
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.01620, %41
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge25:                                    ; preds = %53, %27, %._crit_edge
  %42 = call noundef i64 @_ZN9FlowGraphIxE5dinicEv(ptr noundef nonnull align 8 dereferenceable(6412464) @g)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %43, i8 noundef signext 10)
  call void @_ZN9FlowGraphIxE7get_cutEv(ptr noundef nonnull align 8 dereferenceable(6412464) @g)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph24.peel.next:                               ; preds = %27, %53
  %.022 = phi i32 [ %54, %53 ], [ 2, %27 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %46 = load i32, ptr %1, align 4, !tbaa !8
  %47 = icmp eq i32 %.022, %46
  br i1 %47, label %48, label %50

48:                                               ; preds = %.lr.ph24.peel.next
  %49 = shl nuw nsw i32 %.022, 1
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %.022, i32 noundef %49, i64 noundef 4557430888798830399)
  br label %53

50:                                               ; preds = %.lr.ph24.peel.next
  %51 = add nsw i32 %46, %.022
  %52 = load i64, ptr %5, align 8, !tbaa !13
  call void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464) @g, i32 noundef %.022, i32 noundef %51, i64 noundef %52)
  br label %53

53:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %54 = add nuw nsw i32 %.022, 1
  %55 = load i32, ptr %1, align 4, !tbaa !8
  %.not18.not = icmp slt i32 %.022, %55
  br i1 %.not18.not, label %.lr.ph24.peel.next, label %._crit_edge25, !llvm.loop !15
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9FlowGraphIxE4initEiiii(ptr noundef nonnull align 8 dereferenceable(6412464), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9FlowGraphIxE8add_edgeEiix(ptr noundef nonnull align 8 dereferenceable(6412464), i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FlowGraphIxE7get_cutEv(ptr noundef nonnull align 8 dereferenceable(6412464)) local_unnamed_addr #4 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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass