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

; 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.Graph = type { i32, [10000 x %"struct.Graph<int>::edge"], [2500 x i32], i32, [2500 x i32], [2500 x i8], [2500 x i8] }
%"struct.Graph<int>::edge" = type { i32, i32, i32 }
%"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.Graph, align 4
@_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
  store i32 0, ptr %1, align 4
  %10 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %21 = 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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %23 = load i32, ptr %2, align 4, !tbaa !8
  call void @_ZN5GraphIiE4initEi(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %24

24:                                               ; preds = %40, %0
  %25 = load i32, ptr %4, align 4, !tbaa !8
  %26 = load i32, ptr %3, align 4, !tbaa !8
  %27 = icmp sle i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %43

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %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) %5)
  %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) %6)
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %33 = load i32, ptr %5, align 4, !tbaa !8
  %34 = sub nsw i32 %33, 1
  %35 = mul nsw i32 %32, %34
  %36 = load i32, ptr %6, align 4, !tbaa !8
  %37 = add nsw i32 %35, %36
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (%class.Graph, ptr @g, i32 0, i32 6), i64 0, i64 %38
  store i8 1, ptr %39, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %40

40:                                               ; preds = %29
  %41 = load i32, ptr %4, align 4, !tbaa !8
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %4, align 4, !tbaa !8
  br label %24, !llvm.loop !13

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

44:                                               ; preds = %128, %43
  %45 = load i32, ptr %7, align 4, !tbaa !8
  %46 = load i32, ptr %2, align 4, !tbaa !8
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %131

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %50

50:                                               ; preds = %124, %49
  %51 = load i32, ptr %9, align 4, !tbaa !8
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %127

55:                                               ; preds = %50
  %56 = load i32, ptr %2, align 4, !tbaa !8
  %57 = load i32, ptr %7, align 4, !tbaa !8
  %58 = sub nsw i32 %57, 1
  %59 = mul nsw i32 %56, %58
  %60 = load i32, ptr %9, align 4, !tbaa !8
  %61 = add nsw i32 %59, %60
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (%class.Graph, ptr @g, i32 0, i32 6), i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !11, !range !15, !noundef !16
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %67

66:                                               ; preds = %55
  br label %124

67:                                               ; preds = %55
  %68 = load i32, ptr %9, align 4, !tbaa !8
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %97

71:                                               ; preds = %67
  %72 = load i32, ptr %2, align 4, !tbaa !8
  %73 = load i32, ptr %7, align 4, !tbaa !8
  %74 = sub nsw i32 %73, 1
  %75 = mul nsw i32 %72, %74
  %76 = load i32, ptr %9, align 4, !tbaa !8
  %77 = add nsw i32 %75, %76
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (%class.Graph, ptr @g, i32 0, i32 6), i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !11, !range !15, !noundef !16
  %82 = trunc i8 %81 to i1
  br i1 %82, label %97, label %83

83:                                               ; preds = %71
  %84 = load i32, ptr %2, align 4, !tbaa !8
  %85 = load i32, ptr %7, align 4, !tbaa !8
  %86 = sub nsw i32 %85, 1
  %87 = mul nsw i32 %84, %86
  %88 = load i32, ptr %9, align 4, !tbaa !8
  %89 = add nsw i32 %87, %88
  %90 = load i32, ptr %2, align 4, !tbaa !8
  %91 = load i32, ptr %7, align 4, !tbaa !8
  %92 = sub nsw i32 %91, 1
  %93 = mul nsw i32 %90, %92
  %94 = load i32, ptr %9, align 4, !tbaa !8
  %95 = add nsw i32 %93, %94
  %96 = add nsw i32 %95, 1
  call void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %89, i32 noundef %96, i32 noundef 1)
  br label %97

97:                                               ; preds = %83, %71, %67
  %98 = load i32, ptr %7, align 4, !tbaa !8
  %99 = load i32, ptr %2, align 4, !tbaa !8
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %123

101:                                              ; preds = %97
  %102 = load i32, ptr %2, align 4, !tbaa !8
  %103 = load i32, ptr %7, align 4, !tbaa !8
  %104 = mul nsw i32 %102, %103
  %105 = load i32, ptr %9, align 4, !tbaa !8
  %106 = add nsw i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (%class.Graph, ptr @g, i32 0, i32 6), i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !11, !range !15, !noundef !16
  %110 = trunc i8 %109 to i1
  br i1 %110, label %123, label %111

111:                                              ; preds = %101
  %112 = load i32, ptr %2, align 4, !tbaa !8
  %113 = load i32, ptr %7, align 4, !tbaa !8
  %114 = sub nsw i32 %113, 1
  %115 = mul nsw i32 %112, %114
  %116 = load i32, ptr %9, align 4, !tbaa !8
  %117 = add nsw i32 %115, %116
  %118 = load i32, ptr %2, align 4, !tbaa !8
  %119 = load i32, ptr %7, align 4, !tbaa !8
  %120 = mul nsw i32 %118, %119
  %121 = load i32, ptr %9, align 4, !tbaa !8
  %122 = add nsw i32 %120, %121
  call void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %117, i32 noundef %122, i32 noundef 1)
  br label %123

123:                                              ; preds = %111, %101, %97
  br label %124

124:                                              ; preds = %123, %66
  %125 = load i32, ptr %9, align 4, !tbaa !8
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %9, align 4, !tbaa !8
  br label %50, !llvm.loop !17

127:                                              ; preds = %54
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %7, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %7, align 4, !tbaa !8
  br label %44, !llvm.loop !18

131:                                              ; preds = %48
  %132 = call noundef i32 @_ZN5GraphIiE5matchEv(ptr noundef nonnull align 4 dereferenceable(145008) @g)
  %133 = mul nsw i32 %132, 2
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %133)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %135 = load i32, ptr %1, align 4
  ret i32 %135
}

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 @_ZN5GraphIiE4initEi(ptr noundef nonnull align 4 dereferenceable(145008), i32 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 nounwind uwtable
declare dso_local void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008), i32 noundef, i32 noundef, i32 noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5GraphIiE5matchEv(ptr noundef nonnull align 4 dereferenceable(145008)) #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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !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"

%class.Graph = type { i32, [10000 x %"struct.Graph<int>::edge"], [2500 x i32], i32, [2500 x i32], [2500 x i8], [2500 x i8] }
%"struct.Graph<int>::edge" = type { i32, i32, i32 }
%"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.Graph, align 4
@_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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %16 = 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)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %18 = load i32, ptr %1, align 4, !tbaa !8
  call void @_ZN5GraphIiE4initEi(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %18)
  %19 = load i32, ptr %2, align 4, !tbaa !8
  %.not30 = icmp slt i32 %19, 1
  br i1 %.not30, label %..preheader29_crit_edge, label %.lr.ph

..preheader29_crit_edge:                          ; preds = %0
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %.preheader29

.preheader29:                                     ; preds = %.lr.ph, %..preheader29_crit_edge
  %20 = phi i32 [ %.pre, %..preheader29_crit_edge ], [ %23, %.lr.ph ]
  %.not2735 = icmp slt i32 %20, 1
  br i1 %.not2735, label %._crit_edge37, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02431 = phi i32 [ %31, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %21 = 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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = load i32, ptr %3, align 4, !tbaa !8
  %25 = add nsw i32 %24, -1
  %26 = mul nsw i32 %25, %23
  %27 = load i32, ptr %4, align 4, !tbaa !8
  %28 = add nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (i8, ptr @g, i64 142508), i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  %31 = add nuw nsw i32 %.02431, 1
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.02431, %32
  br i1 %.not.not, label %.lr.ph, label %.preheader29, !llvm.loop !13

.preheader:                                       ; preds = %.preheader29, %._crit_edge
  %33 = phi i32 [ %38, %._crit_edge ], [ %20, %.preheader29 ]
  %.02336 = phi i32 [ %39, %._crit_edge ], [ 1, %.preheader29 ]
  %.not2832 = icmp slt i32 %33, 1
  br i1 %.not2832, label %._crit_edge, label %.lr.ph34

.lr.ph34:                                         ; preds = %.preheader
  %34 = add nsw i32 %.02336, -1
  br label %40

._crit_edge37:                                    ; preds = %._crit_edge, %.preheader29
  %35 = call noundef i32 @_ZN5GraphIiE5matchEv(ptr noundef nonnull align 4 dereferenceable(145008) @g)
  %36 = shl nsw i32 %35, 1
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %36)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

._crit_edge:                                      ; preds = %72, %.preheader
  %38 = phi i32 [ %33, %.preheader ], [ %73, %72 ]
  %39 = add nuw nsw i32 %.02336, 1
  %.not27.not = icmp slt i32 %.02336, %38
  br i1 %.not27.not, label %.preheader, label %._crit_edge37, !llvm.loop !15

40:                                               ; preds = %.lr.ph34, %72
  %41 = phi i32 [ %33, %.lr.ph34 ], [ %73, %72 ]
  %42 = phi i32 [ %33, %.lr.ph34 ], [ %74, %72 ]
  %.033 = phi i32 [ 1, %.lr.ph34 ], [ %75, %72 ]
  %43 = mul nsw i32 %42, %34
  %44 = add nsw i32 %43, %.033
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (i8, ptr @g, i64 142508), i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !11, !range !17, !noundef !18
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %72, label %49

49:                                               ; preds = %40
  %50 = icmp slt i32 %.033, %42
  br i1 %50, label %51, label %58

51:                                               ; preds = %49
  %52 = add nsw i32 %44, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (i8, ptr @g, i64 142508), i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !11, !range !17, !noundef !18
  %56 = trunc nuw i8 %55 to i1
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  call void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %44, i32 noundef %52, i32 noundef 1)
  %.pre39 = load i32, ptr %1, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %57, %51, %49
  %59 = phi i32 [ %.pre39, %57 ], [ %41, %51 ], [ %41, %49 ]
  %60 = phi i32 [ %.pre39, %57 ], [ %42, %51 ], [ %42, %49 ]
  %61 = icmp slt i32 %.02336, %60
  br i1 %61, label %62, label %72

62:                                               ; preds = %58
  %63 = mul nsw i32 %60, %.02336
  %64 = add nsw i32 %63, %.033
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [2500 x i8], ptr getelementptr inbounds (i8, ptr @g, i64 142508), i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !11, !range !17, !noundef !18
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %72, label %69

69:                                               ; preds = %62
  %70 = mul nsw i32 %60, %34
  %71 = add nsw i32 %70, %.033
  call void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008) @g, i32 noundef %71, i32 noundef %64, i32 noundef 1)
  %.pre40 = load i32, ptr %1, align 4, !tbaa !8
  br label %72

72:                                               ; preds = %58, %62, %69, %40
  %73 = phi i32 [ %59, %58 ], [ %59, %62 ], [ %.pre40, %69 ], [ %41, %40 ]
  %74 = phi i32 [ %60, %58 ], [ %60, %62 ], [ %.pre40, %69 ], [ %42, %40 ]
  %75 = add nuw nsw i32 %.033, 1
  %.not28.not = icmp slt i32 %.033, %74
  br i1 %.not28.not, label %40, label %._crit_edge, !llvm.loop !19
}

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 @_ZN5GraphIiE4initEi(ptr noundef nonnull align 4 dereferenceable(145008), i32 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 nounwind uwtable
declare dso_local void @_ZN5GraphIiE8add_edgeEiii(ptr noundef nonnull align 4 dereferenceable(145008), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5GraphIiE5matchEv(ptr noundef nonnull align 4 dereferenceable(145008)) 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !14}


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