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

; 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" }

@din = external dso_local global [110 x i32], align 16
@dout = external dso_local global [110 x i32], align 16
@e = external dso_local global [1000010 x %struct.edge], align 16
@head = external dso_local global [110 x i32], align 16
@scc_cnt = external dso_local global i32, align 4
@scc_id = external dso_local global [110 x i32], align 16
@dfn = external dso_local global [110 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
  store i32 0, ptr %1, align 4
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %26 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %27

27:                                               ; preds = %41, %0
  %28 = load i32, ptr %3, align 4, !tbaa !8
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %44

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  br label %33

33:                                               ; preds = %37, %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %35 = load i32, ptr %4, align 4, !tbaa !8
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %33
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = load i32, ptr %4, align 4, !tbaa !8
  call void @_Z8add_edgeii(i32 noundef %38, i32 noundef %39)
  br label %33, !llvm.loop !11

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

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

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

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

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %62

50:                                               ; preds = %45
  %51 = load i32, ptr %5, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [110 x i32], ptr @dfn, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !8
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %58, label %56

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

58:                                               ; preds = %56, %50
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %5, align 4, !tbaa !8
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !8
  br label %45, !llvm.loop !14

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

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

67:                                               ; preds = %63
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %116

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

73:                                               ; preds = %106, %68
  %74 = load i32, ptr %8, align 4, !tbaa !8
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %112

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

94:                                               ; preds = %77
  %95 = load i32, ptr %10, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [110 x i32], ptr @dout, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !8
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %97, align 4, !tbaa !8
  %100 = load i32, ptr %11, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [110 x i32], ptr @din, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 4, !tbaa !8
  br label %105

105:                                              ; preds = %94, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %8, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1000010 x %struct.edge], ptr @e, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.edge, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !17
  store i32 %111, ptr %8, align 4, !tbaa !8
  br label %73, !llvm.loop !18

112:                                              ; preds = %76
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %6, align 4, !tbaa !8
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %6, align 4, !tbaa !8
  br label %63, !llvm.loop !19

116:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %117

117:                                              ; preds = %141, %116
  %118 = load i32, ptr %14, align 4, !tbaa !8
  %119 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %120 = icmp sle i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %144

122:                                              ; preds = %117
  %123 = load i32, ptr %14, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [110 x i32], ptr @din, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !8
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %131, label %128

128:                                              ; preds = %122
  %129 = load i32, ptr %12, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %12, align 4, !tbaa !8
  br label %131

131:                                              ; preds = %128, %122
  %132 = load i32, ptr %14, align 4, !tbaa !8
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [110 x i32], ptr @dout, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !8
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %140, label %137

137:                                              ; preds = %131
  %138 = load i32, ptr %13, align 4, !tbaa !8
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !8
  br label %140

140:                                              ; preds = %137, %131
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %14, align 4, !tbaa !8
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %14, align 4, !tbaa !8
  br label %117, !llvm.loop !20

144:                                              ; preds = %121
  %145 = load i32, ptr %12, align 4, !tbaa !8
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %145)
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %146, i8 noundef signext 10)
  %148 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %150, label %153

150:                                              ; preds = %144
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %151, i8 noundef signext 10)
  br label %158

153:                                              ; preds = %144
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %155 = load i32, ptr %154, align 4, !tbaa !8
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %155)
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %156, i8 noundef signext 10)
  br label %158

158:                                              ; preds = %153, %150
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %159 = load i32, ptr %1, align 4
  ret i32 %159
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!16, !9, i64 4}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !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" }

@din = external dso_local local_unnamed_addr global [110 x i32], align 16
@dout = external dso_local local_unnamed_addr global [110 x i32], align 16
@e = external dso_local local_unnamed_addr global [1000010 x %struct.edge], align 16
@head = external dso_local local_unnamed_addr global [110 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 [110 x i32], align 16
@dfn = external dso_local local_unnamed_addr global [110 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) #8
  %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 = load i32, ptr %1, align 4, !tbaa !8
  %.not42 = icmp slt i32 %17, 1
  br i1 %.not42, label %._crit_edge58, label %.lr.ph45

.preheader40:                                     ; preds = %._crit_edge
  %.not3146 = icmp slt i32 %24, 1
  br i1 %.not3146, label %._crit_edge58, label %.lr.ph48

.lr.ph45:                                         ; preds = %0, %._crit_edge
  %.02443 = phi i32 [ %23, %._crit_edge ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %18 = 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)
  %19 = load i32, ptr %2, align 4, !tbaa !8
  %.not3941 = icmp eq i32 %19, 0
  br i1 %.not3941, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph45, %.lr.ph
  %20 = phi i32 [ %22, %.lr.ph ], [ %19, %.lr.ph45 ]
  call void @_Z8add_edgeii(i32 noundef %.02443, i32 noundef %20)
  %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 = load i32, ptr %2, align 4, !tbaa !8
  %.not39 = icmp eq i32 %22, 0
  br i1 %.not39, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %23 = add nuw nsw i32 %.02443, 1
  %24 = load i32, ptr %1, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.02443, %24
  br i1 %.not.not, label %.lr.ph45, label %.preheader40, !llvm.loop !13

.preheader:                                       ; preds = %31
  %.not3255 = icmp slt i32 %32, 1
  br i1 %.not3255, label %._crit_edge58, label %.lr.ph57.preheader

.lr.ph57.preheader:                               ; preds = %.preheader
  %25 = add nuw i32 %32, 1
  %wide.trip.count = zext i32 %25 to i64
  br label %.lr.ph57

.lr.ph48:                                         ; preds = %.preheader40, %31
  %26 = phi i32 [ %32, %31 ], [ %24, %.preheader40 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %31 ], [ 1, %.preheader40 ]
  %27 = getelementptr inbounds [110 x i32], ptr @dfn, i64 0, i64 %indvars.iv
  %28 = load i32, ptr %27, align 4, !tbaa !8
  %.not38 = icmp eq i32 %28, 0
  br i1 %.not38, label %29, label %31

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

31:                                               ; preds = %.lr.ph48, %29
  %32 = phi i32 [ %26, %.lr.ph48 ], [ %.pre, %29 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = sext i32 %32 to i64
  %.not31.not = icmp slt i64 %indvars.iv, %33
  br i1 %.not31.not, label %.lr.ph48, label %.preheader, !llvm.loop !14

._crit_edge58:                                    ; preds = %._crit_edge54, %0, %.preheader40, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %34 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %.not3362 = icmp slt i32 %34, 1
  br i1 %.not3362, label %._crit_edge66, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %._crit_edge58
  %35 = add nuw i32 %34, 1
  %wide.trip.count78 = zext i32 %35 to i64
  %36 = zext nneg i32 %34 to i64
  %min.iters.check = icmp ult i32 %34, 8
  br i1 %min.iters.check, label %.lr.ph65.preheader96, label %vector.ph

.lr.ph65.preheader96:                             ; preds = %middle.block, %.lr.ph65.preheader
  %indvars.iv75.ph = phi i64 [ 1, %.lr.ph65.preheader ], [ %ind.end, %middle.block ]
  %.ph = phi i32 [ 0, %.lr.ph65.preheader ], [ %54, %middle.block ]
  %.ph97 = phi i32 [ 0, %.lr.ph65.preheader ], [ %55, %middle.block ]
  br label %.lr.ph65

vector.ph:                                        ; preds = %.lr.ph65.preheader
  %n.vec = and i64 %36, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %43, %vector.body ]
  %vec.phi88 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %44, %vector.body ]
  %vec.phi89 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %51, %vector.body ]
  %vec.phi90 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %52, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %37 = getelementptr inbounds [110 x i32], ptr @din, i64 0, i64 %offset.idx
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load = load <4 x i32>, ptr %37, align 4, !tbaa !8
  %wide.load91 = load <4 x i32>, ptr %38, align 4, !tbaa !8
  %39 = icmp eq <4 x i32> %wide.load, zeroinitializer
  %40 = icmp eq <4 x i32> %wide.load91, zeroinitializer
  %41 = zext <4 x i1> %39 to <4 x i32>
  %42 = zext <4 x i1> %40 to <4 x i32>
  %43 = add <4 x i32> %vec.phi, %41
  %44 = add <4 x i32> %vec.phi88, %42
  %45 = getelementptr inbounds [110 x i32], ptr @dout, i64 0, i64 %offset.idx
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %wide.load92 = load <4 x i32>, ptr %45, align 4, !tbaa !8
  %wide.load93 = load <4 x i32>, ptr %46, align 4, !tbaa !8
  %47 = icmp eq <4 x i32> %wide.load92, zeroinitializer
  %48 = icmp eq <4 x i32> %wide.load93, zeroinitializer
  %49 = zext <4 x i1> %47 to <4 x i32>
  %50 = zext <4 x i1> %48 to <4 x i32>
  %51 = add <4 x i32> %vec.phi89, %49
  %52 = add <4 x i32> %vec.phi90, %50
  %index.next = add nuw i64 %index, 8
  %53 = icmp eq i64 %index.next, %n.vec
  br i1 %53, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %44, %43
  %54 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %bin.rdx94 = add <4 x i32> %52, %51
  %55 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx94)
  %cmp.n = icmp eq i64 %n.vec, %36
  br i1 %cmp.n, label %._crit_edge66, label %.lr.ph65.preheader96

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %._crit_edge54
  %indvars.iv72 = phi i64 [ 1, %.lr.ph57.preheader ], [ %indvars.iv.next73, %._crit_edge54 ]
  %56 = getelementptr inbounds [110 x i32], ptr @head, i64 0, i64 %indvars.iv72
  %.02649 = load i32, ptr %56, align 4, !tbaa !8
  %.not3650 = icmp eq i32 %.02649, 0
  br i1 %.not3650, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %.lr.ph57
  %57 = getelementptr inbounds [110 x i32], ptr @scc_id, i64 0, i64 %indvars.iv72
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [110 x i32], ptr @dout, i64 0, i64 %59
  br label %61

._crit_edge54:                                    ; preds = %75, %.lr.ph57
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !18

61:                                               ; preds = %.lr.ph53, %75
  %.02651 = phi i32 [ %.02649, %.lr.ph53 ], [ %.026, %75 ]
  %62 = sext i32 %.02651 to i64
  %63 = getelementptr inbounds [1000010 x %struct.edge], ptr @e, i64 0, i64 %62
  %64 = load i32, ptr %63, align 8, !tbaa !19
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [110 x i32], ptr @scc_id, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !8
  %.not37 = icmp eq i32 %58, %67
  br i1 %.not37, label %75, label %68

68:                                               ; preds = %61
  %69 = load i32, ptr %60, align 4, !tbaa !8
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %60, align 4, !tbaa !8
  %71 = sext i32 %67 to i64
  %72 = getelementptr inbounds [110 x i32], ptr @din, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !8
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !8
  br label %75

75:                                               ; preds = %68, %61
  %76 = getelementptr inbounds i8, ptr %63, i64 4
  %.026 = load i32, ptr %76, align 4, !tbaa !8
  %.not36 = icmp eq i32 %.026, 0
  br i1 %.not36, label %._crit_edge54, label %61, !llvm.loop !21

._crit_edge66:                                    ; preds = %.lr.ph65, %middle.block, %._crit_edge58
  %.lcssa61 = phi i32 [ 0, %._crit_edge58 ], [ %55, %middle.block ], [ %89, %.lr.ph65 ]
  %.lcssa59 = phi i32 [ 0, %._crit_edge58 ], [ %54, %middle.block ], [ %spec.select, %.lr.ph65 ]
  store i32 %.lcssa59, ptr %3, align 4, !tbaa !8
  store i32 %.lcssa61, ptr %4, align 4, !tbaa !8
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.lcssa59)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %77, i8 noundef signext 10)
  %79 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %93, label %90

.lr.ph65:                                         ; preds = %.lr.ph65.preheader96, %.lr.ph65
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.lr.ph65 ], [ %indvars.iv75.ph, %.lr.ph65.preheader96 ]
  %81 = phi i32 [ %spec.select, %.lr.ph65 ], [ %.ph, %.lr.ph65.preheader96 ]
  %82 = phi i32 [ %89, %.lr.ph65 ], [ %.ph97, %.lr.ph65.preheader96 ]
  %83 = getelementptr inbounds [110 x i32], ptr @din, i64 0, i64 %indvars.iv75
  %84 = load i32, ptr %83, align 4, !tbaa !8
  %.not34 = icmp eq i32 %84, 0
  %85 = zext i1 %.not34 to i32
  %spec.select = add nuw nsw i32 %81, %85
  %86 = getelementptr inbounds [110 x i32], ptr @dout, i64 0, i64 %indvars.iv75
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %.not35 = icmp eq i32 %87, 0
  %88 = zext i1 %.not35 to i32
  %89 = add nuw nsw i32 %82, %88
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %._crit_edge66, label %.lr.ph65, !llvm.loop !22

90:                                               ; preds = %._crit_edge66
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %92 = load i32, ptr %91, align 4, !tbaa !8
  br label %93

93:                                               ; preds = %._crit_edge66, %90
  %.sink85 = phi i32 [ %92, %90 ], [ 0, %._crit_edge66 ]
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink85)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %94, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !12}
!19 = !{!20, !9, i64 0}
!20 = !{!"_ZTS4edge", !9, i64 0, !9, i64 4}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12, !17, !16}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass