; LLVM IR from Tunghohin/Competitive_Coding :: Luogu (p2341)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.edge = type { 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" }

@out_degree = external dso_local global [10010 x i32], align 16
@e = external dso_local global [100010 x %struct.edge], align 16
@head = external dso_local global [10010 x i32], align 16
@scc_cnt = external dso_local global i32, align 4
@scc_id = external dso_local global [10010 x i32], align 16
@scc_size = external dso_local global [10010 x i32], align 16
@dfn = external dso_local global [10010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6tarjani(i32 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

30:                                               ; preds = %40, %0
  %31 = load i32, ptr %4, align 4, !tbaa !8
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %36 = 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)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %38 = load i32, ptr %5, align 4, !tbaa !8
  %39 = load i32, ptr %6, align 4, !tbaa !8
  call void @_Z8add_edgeii(i32 noundef %38, i32 noundef %39)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %40

40:                                               ; preds = %35
  %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 %30, !llvm.loop !11

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

44:                                               ; preds = %58, %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %61

49:                                               ; preds = %44
  %50 = load i32, ptr %7, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [10010 x i32], ptr @dfn, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !8
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %57, label %55

55:                                               ; preds = %49
  %56 = load i32, ptr %7, align 4, !tbaa !8
  call void @_Z6tarjani(i32 noundef %56)
  br label %57

57:                                               ; preds = %55, %49
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %7, align 4, !tbaa !8
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !8
  br label %44, !llvm.loop !13

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %62

62:                                               ; preds = %107, %61
  %63 = load i32, ptr %8, align 4, !tbaa !8
  %64 = load i32, ptr %2, align 4, !tbaa !8
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %68 = load i32, ptr %8, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [10010 x i32], ptr @head, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !8
  store i32 %71, ptr %10, align 4, !tbaa !8
  br label %72

72:                                               ; preds = %100, %67
  %73 = load i32, ptr %10, align 4, !tbaa !8
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %76, label %75

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

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %77 = load i32, ptr %10, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100010 x %struct.edge], ptr @e, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.edge, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !14
  store i32 %81, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %82 = load i32, ptr %8, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [10010 x i32], ptr @scc_id, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !8
  store i32 %85, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %86 = load i32, ptr %11, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [10010 x i32], ptr @scc_id, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !8
  store i32 %89, ptr %13, align 4, !tbaa !8
  %90 = load i32, ptr %12, align 4, !tbaa !8
  %91 = load i32, ptr %13, align 4, !tbaa !8
  %92 = icmp ne i32 %90, %91
  br i1 %92, label %93, label %99

93:                                               ; preds = %76
  %94 = load i32, ptr %12, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [10010 x i32], ptr @out_degree, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %96, align 4, !tbaa !8
  br label %99

99:                                               ; preds = %93, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %10, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100010 x %struct.edge], ptr @e, i64 0, i64 %102
  %104 = getelementptr inbounds %struct.edge, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !16
  store i32 %105, ptr %10, align 4, !tbaa !8
  br label %72, !llvm.loop !17

106:                                              ; preds = %75
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %8, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %8, align 4, !tbaa !8
  br label %62, !llvm.loop !18

110:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !8
  br label %111

111:                                              ; preds = %136, %110
  %112 = load i32, ptr %16, align 4, !tbaa !8
  %113 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %114 = icmp sle i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 14, ptr %9, align 4
  br label %139

116:                                              ; preds = %111
  %117 = load i32, ptr %16, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [10010 x i32], ptr @out_degree, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !8
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %135, label %122

122:                                              ; preds = %116
  %123 = load i32, ptr %14, align 4, !tbaa !8
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %14, align 4, !tbaa !8
  %125 = load i32, ptr %16, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [10010 x i32], ptr @scc_size, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !8
  %129 = load i32, ptr %15, align 4, !tbaa !8
  %130 = add nsw i32 %129, %128
  store i32 %130, ptr %15, align 4, !tbaa !8
  %131 = load i32, ptr %14, align 4, !tbaa !8
  %132 = icmp sgt i32 %131, 1
  br i1 %132, label %133, label %134

133:                                              ; preds = %122
  store i32 0, ptr %15, align 4, !tbaa !8
  store i32 14, ptr %9, align 4
  br label %139

134:                                              ; preds = %122
  br label %135

135:                                              ; preds = %134, %116
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %16, align 4, !tbaa !8
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %16, align 4, !tbaa !8
  br label %111, !llvm.loop !19

139:                                              ; preds = %133, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %15, align 4, !tbaa !8
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %141)
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %142, i8 noundef signext 10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %144 = load i32, ptr %1, align 4
  ret i32 %144
}

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

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

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

; 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

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

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

%struct.edge = type { 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" }

@out_degree = external dso_local local_unnamed_addr global [10010 x i32], align 16
@e = external dso_local local_unnamed_addr global [100010 x %struct.edge], align 16
@head = external dso_local local_unnamed_addr global [10010 x i32], align 16
@scc_cnt = external dso_local local_unnamed_addr global i32, align 4
@scc_id = external dso_local local_unnamed_addr global [10010 x i32], align 16
@scc_size = external dso_local local_unnamed_addr global [10010 x i32], align 16
@dfn = external dso_local local_unnamed_addr global [10010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6tarjani(i32 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %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) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %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 %2, align 4, !tbaa !8
  %.not44 = icmp slt i32 %18, 1
  br i1 %.not44, label %.preheader43, label %.lr.ph

.preheader43:                                     ; preds = %.lr.ph, %0
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %.not3546 = icmp slt i32 %19, 1
  br i1 %.not3546, label %.preheader, label %.lr.ph48

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02945 = phi i32 [ %24, %.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
  %20 = 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)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %22 = load i32, ptr %3, align 4, !tbaa !8
  %23 = load i32, ptr %4, align 4, !tbaa !8
  call void @_Z8add_edgeii(i32 noundef %22, i32 noundef %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %24 = add nuw nsw i32 %.02945, 1
  %25 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.02945, %25
  br i1 %.not.not, label %.lr.ph, label %.preheader43, !llvm.loop !11

.preheader42:                                     ; preds = %32
  %.not3653 = icmp slt i32 %33, 1
  br i1 %.not3653, label %.preheader, label %.lr.ph55.preheader

.lr.ph55.preheader:                               ; preds = %.preheader42
  %26 = add nuw i32 %33, 1
  %wide.trip.count = zext i32 %26 to i64
  br label %.lr.ph55

.lr.ph48:                                         ; preds = %.preheader43, %32
  %27 = phi i32 [ %33, %32 ], [ %19, %.preheader43 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 1, %.preheader43 ]
  %28 = getelementptr inbounds [10010 x i32], ptr @dfn, i64 0, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !8
  %.not41 = icmp eq i32 %29, 0
  br i1 %.not41, label %30, label %32

30:                                               ; preds = %.lr.ph48
  %31 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z6tarjani(i32 noundef %31)
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %32

32:                                               ; preds = %.lr.ph48, %30
  %33 = phi i32 [ %27, %.lr.ph48 ], [ %.pre, %30 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = sext i32 %33 to i64
  %.not35.not = icmp slt i64 %indvars.iv, %34
  br i1 %.not35.not, label %.lr.ph48, label %.preheader42, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge, %.preheader43, %.preheader42
  %35 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %.not3756 = icmp slt i32 %35, 1
  br i1 %.not3756, label %._crit_edge61, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %.preheader
  %36 = add nuw i32 %35, 1
  %wide.trip.count73 = zext i32 %36 to i64
  br label %.lr.ph60

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %._crit_edge
  %indvars.iv67 = phi i64 [ 1, %.lr.ph55.preheader ], [ %indvars.iv.next68, %._crit_edge ]
  %37 = getelementptr inbounds [10010 x i32], ptr @head, i64 0, i64 %indvars.iv67
  %.03149 = load i32, ptr %37, align 4, !tbaa !8
  %.not3950 = icmp eq i32 %.03149, 0
  br i1 %.not3950, label %._crit_edge, label %.lr.ph52

.lr.ph52:                                         ; preds = %.lr.ph55
  %38 = getelementptr inbounds [10010 x i32], ptr @scc_id, i64 0, i64 %indvars.iv67
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [10010 x i32], ptr @out_degree, i64 0, i64 %40
  br label %42

._crit_edge:                                      ; preds = %52, %.lr.ph55
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next68, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph55, !llvm.loop !14

42:                                               ; preds = %.lr.ph52, %52
  %.03151 = phi i32 [ %.03149, %.lr.ph52 ], [ %.031, %52 ]
  %43 = sext i32 %.03151 to i64
  %44 = getelementptr inbounds [100010 x %struct.edge], ptr @e, i64 0, i64 %43
  %45 = load i32, ptr %44, align 8, !tbaa !15
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [10010 x i32], ptr @scc_id, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %.not40 = icmp eq i32 %39, %48
  br i1 %.not40, label %52, label %49

49:                                               ; preds = %42
  %50 = load i32, ptr %41, align 4, !tbaa !8
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %41, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %49, %42
  %53 = getelementptr inbounds i8, ptr %44, i64 4
  %.031 = load i32, ptr %53, align 4, !tbaa !8
  %.not39 = icmp eq i32 %.031, 0
  br i1 %.not39, label %._crit_edge, label %42, !llvm.loop !17

.lr.ph60:                                         ; preds = %.lr.ph60.preheader, %61
  %indvars.iv70 = phi i64 [ 1, %.lr.ph60.preheader ], [ %indvars.iv.next71, %61 ]
  %.02658 = phi i32 [ 0, %.lr.ph60.preheader ], [ %.1, %61 ]
  %.02757 = phi i32 [ 0, %.lr.ph60.preheader ], [ %.128, %61 ]
  %54 = getelementptr inbounds [10010 x i32], ptr @out_degree, i64 0, i64 %indvars.iv70
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %.not38 = icmp eq i32 %55, 0
  br i1 %.not38, label %56, label %61

56:                                               ; preds = %.lr.ph60
  %57 = getelementptr inbounds [10010 x i32], ptr @scc_size, i64 0, i64 %indvars.iv70
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = add nsw i32 %58, %.02658
  %60 = icmp sgt i32 %.02757, 0
  br i1 %60, label %._crit_edge61, label %61

61:                                               ; preds = %.lr.ph60, %56
  %.128 = phi i32 [ %.02757, %.lr.ph60 ], [ 1, %56 ]
  %.1 = phi i32 [ %.02658, %.lr.ph60 ], [ %59, %56 ]
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %._crit_edge61, label %.lr.ph60, !llvm.loop !18

._crit_edge61:                                    ; preds = %61, %56, %.preheader
  %.2 = phi i32 [ 0, %.preheader ], [ 0, %56 ], [ %.1, %61 ]
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.2)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %62, i8 noundef signext 10)
  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
}

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

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

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 #4

; 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

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

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


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