; LLVM IR from Tunghohin/Competitive_Coding :: Poj (poj1236)

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

@in_degree = external dso_local global [110 x i32], align 16
@out_degree = 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
@dfn = 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
@_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 %11, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [110 x i32], ptr @in_degree, 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 %10, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [110 x i32], ptr @out_degree, 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 = %142, %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 %145

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 @in_degree, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !8
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %131

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 %141

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

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, %128
  br label %142

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

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

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

154:                                              ; preds = %145
  %155 = 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)
  %156 = load i32, ptr %155, align 4, !tbaa !8
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %156)
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %157, i8 noundef signext 10)
  br label %159

159:                                              ; preds = %154, %151
  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
  %160 = load i32, ptr %1, align 4
  ret i32 %160
}

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

@in_degree = external dso_local local_unnamed_addr global [110 x i32], align 16
@out_degree = 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
@dfn = 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
@_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) #7
  %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
  %.not40 = icmp slt i32 %17, 1
  br i1 %.not40, label %._crit_edge56, label %.lr.ph43

.preheader38:                                     ; preds = %._crit_edge
  %.not3144 = icmp slt i32 %24, 1
  br i1 %.not3144, label %._crit_edge56, label %.lr.ph46

.lr.ph43:                                         ; preds = %0, %._crit_edge
  %.02441 = phi i32 [ %23, %._crit_edge ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %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
  %.not3739 = icmp eq i32 %19, 0
  br i1 %.not3739, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph43, %.lr.ph
  %20 = phi i32 [ %22, %.lr.ph ], [ %19, %.lr.ph43 ]
  call void @_Z8add_edgeii(i32 noundef %.02441, 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
  %.not37 = icmp eq i32 %22, 0
  br i1 %.not37, label %._crit_edge, label %.lr.ph, !llvm.loop !11

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

.preheader:                                       ; preds = %31
  %.not3253 = icmp slt i32 %32, 1
  br i1 %.not3253, label %._crit_edge56, label %.lr.ph55.preheader

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

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

29:                                               ; preds = %.lr.ph46
  %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.ph46, %29
  %32 = phi i32 [ %26, %.lr.ph46 ], [ %.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.ph46, label %.preheader, !llvm.loop !14

._crit_edge56:                                    ; preds = %._crit_edge52, %0, %.preheader38, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %34 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %.not3360 = icmp slt i32 %34, 1
  br i1 %.not3360, label %._crit_edge64, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %._crit_edge56
  %35 = zext nneg i32 %34 to i64
  %xtraiter = and i64 %35, 1
  %36 = icmp eq i32 %34, 1
  br i1 %36, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63.preheader.new

.lr.ph63.preheader.new:                           ; preds = %.lr.ph63.preheader
  %unroll_iter = and i64 %35, 2147483646
  br label %.lr.ph63

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %._crit_edge52
  %indvars.iv71 = phi i64 [ 1, %.lr.ph55.preheader ], [ %indvars.iv.next72, %._crit_edge52 ]
  %37 = getelementptr inbounds [110 x i32], ptr @head, i64 0, i64 %indvars.iv71
  %.02747 = load i32, ptr %37, align 4, !tbaa !8
  %.not3448 = icmp eq i32 %.02747, 0
  br i1 %.not3448, label %._crit_edge52, label %.lr.ph51

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

._crit_edge52:                                    ; preds = %56, %.lr.ph55
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge56, label %.lr.ph55, !llvm.loop !15

42:                                               ; preds = %.lr.ph51, %56
  %.02749 = phi i32 [ %.02747, %.lr.ph51 ], [ %.027, %56 ]
  %43 = sext i32 %.02749 to i64
  %44 = getelementptr inbounds [1000010 x %struct.edge], ptr @e, i64 0, i64 %43
  %45 = load i32, ptr %44, align 8, !tbaa !16
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x i32], ptr @scc_id, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %.not35 = icmp eq i32 %39, %48
  br i1 %.not35, label %56, label %49

49:                                               ; preds = %42
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds [110 x i32], ptr @in_degree, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !8
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !8
  %54 = load i32, ptr %41, align 4, !tbaa !8
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %41, align 4, !tbaa !8
  br label %56

56:                                               ; preds = %49, %42
  %57 = getelementptr inbounds i8, ptr %44, i64 4
  %.027 = load i32, ptr %57, align 4, !tbaa !8
  %.not34 = icmp eq i32 %.027, 0
  br i1 %.not34, label %._crit_edge52, label %42, !llvm.loop !18

._crit_edge64.loopexit.unr-lcssa:                 ; preds = %96, %.lr.ph63.preheader
  %.lcssa89.ph = phi i32 [ poison, %.lr.ph63.preheader ], [ %97, %96 ]
  %.lcssa.ph = phi i32 [ poison, %.lr.ph63.preheader ], [ %98, %96 ]
  %indvars.iv74.unr = phi i64 [ 1, %.lr.ph63.preheader ], [ %indvars.iv.next75.1, %96 ]
  %.unr = phi i32 [ 0, %.lr.ph63.preheader ], [ %98, %96 ]
  %.unr92 = phi i32 [ 0, %.lr.ph63.preheader ], [ %97, %96 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge64, label %.lr.ph63.epil

.lr.ph63.epil:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa
  %58 = getelementptr inbounds [110 x i32], ptr @in_degree, i64 0, i64 %indvars.iv74.unr
  %59 = load i32, ptr %58, align 4, !tbaa !8
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %66, label %61

61:                                               ; preds = %.lr.ph63.epil
  %62 = getelementptr inbounds [110 x i32], ptr @out_degree, i64 0, i64 %indvars.iv74.unr
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = icmp eq i32 %63, 0
  %65 = zext i1 %64 to i32
  %spec.select.epil = add nsw i32 %.unr, %65
  br label %._crit_edge64

66:                                               ; preds = %.lr.ph63.epil
  %67 = add nsw i32 %.unr92, 1
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa, %66, %61, %._crit_edge56
  %.lcssa59 = phi i32 [ 0, %._crit_edge56 ], [ %.lcssa89.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %67, %66 ], [ %.unr92, %61 ]
  %.lcssa57 = phi i32 [ 0, %._crit_edge56 ], [ %.lcssa.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %.unr, %66 ], [ %spec.select.epil, %61 ]
  store i32 %.lcssa57, ptr %4, align 4, !tbaa !8
  store i32 %.lcssa59, ptr %3, align 4, !tbaa !8
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.lcssa59)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %68, i8 noundef signext 10)
  %70 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %102, label %99

.lr.ph63:                                         ; preds = %96, %.lr.ph63.preheader.new
  %indvars.iv74 = phi i64 [ 1, %.lr.ph63.preheader.new ], [ %indvars.iv.next75.1, %96 ]
  %72 = phi i32 [ 0, %.lr.ph63.preheader.new ], [ %98, %96 ]
  %73 = phi i32 [ 0, %.lr.ph63.preheader.new ], [ %97, %96 ]
  %niter = phi i64 [ 0, %.lr.ph63.preheader.new ], [ %niter.next.1, %96 ]
  %74 = getelementptr inbounds [110 x i32], ptr @in_degree, i64 0, i64 %indvars.iv74
  %75 = load i32, ptr %74, align 4, !tbaa !8
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %79

77:                                               ; preds = %.lr.ph63
  %78 = add nsw i32 %73, 1
  br label %.lr.ph63.1

79:                                               ; preds = %.lr.ph63
  %80 = getelementptr inbounds [110 x i32], ptr @out_degree, i64 0, i64 %indvars.iv74
  %81 = load i32, ptr %80, align 4, !tbaa !8
  %82 = icmp eq i32 %81, 0
  %83 = zext i1 %82 to i32
  %spec.select = add nsw i32 %72, %83
  br label %.lr.ph63.1

.lr.ph63.1:                                       ; preds = %79, %77
  %84 = phi i32 [ %78, %77 ], [ %73, %79 ]
  %85 = phi i32 [ %72, %77 ], [ %spec.select, %79 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %86 = getelementptr inbounds [110 x i32], ptr @in_degree, i64 0, i64 %indvars.iv.next75
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %94, label %89

89:                                               ; preds = %.lr.ph63.1
  %90 = getelementptr inbounds [110 x i32], ptr @out_degree, i64 0, i64 %indvars.iv.next75
  %91 = load i32, ptr %90, align 4, !tbaa !8
  %92 = icmp eq i32 %91, 0
  %93 = zext i1 %92 to i32
  %spec.select.1 = add nsw i32 %85, %93
  br label %96

94:                                               ; preds = %.lr.ph63.1
  %95 = add nsw i32 %84, 1
  br label %96

96:                                               ; preds = %94, %89
  %97 = phi i32 [ %95, %94 ], [ %84, %89 ]
  %98 = phi i32 [ %85, %94 ], [ %spec.select.1, %89 ]
  %indvars.iv.next75.1 = add nuw nsw i64 %indvars.iv74, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63, !llvm.loop !19

99:                                               ; preds = %._crit_edge64
  %100 = 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)
  %101 = load i32, ptr %100, align 4, !tbaa !8
  br label %102

102:                                              ; preds = %._crit_edge64, %99
  %.sink85 = phi i32 [ %101, %99 ], [ 0, %._crit_edge64 ]
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink85)
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %103, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  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

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 = { 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, !9, i64 0}
!17 = !{!"_ZTS4edge", !9, i64 0, !9, i64 4}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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