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

; 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" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@mod = external dso_local global i32, align 4
@f = external dso_local global [100010 x i32], align 16
@g = external dso_local global [100010 x i32], align 16
@e = external dso_local global [2000010 x %struct.edge], align 16
@head = external dso_local global [100010 x i32], align 16
@head_scc = external dso_local global [100010 x i32], align 16
@scc_cnt = external dso_local global i32, align 4
@dfn = external dso_local global [100010 x i32], align 16
@scc_id = external dso_local global [100010 x i32], align 16
@scc_size = external dso_local global [100010 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_edgePiii(ptr noundef, 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 personality ptr @__gxx_personality_v0 {
  %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 %"class.std::unordered_set", align 8
  %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 i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %32 = getelementptr i8, ptr %31, i64 -24
  %33 = load i64, ptr %32, align 8
  %34 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %33
  %35 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %34, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %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) %2)
  %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) %3)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) @mod)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %49, %0
  %40 = load i32, ptr %4, align 4, !tbaa !8
  %41 = load i32, ptr %3, align 4, !tbaa !8
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %52

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %45 = 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)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %47 = load i32, ptr %5, align 4, !tbaa !8
  %48 = load i32, ptr %6, align 4, !tbaa !8
  call void @_Z8add_edgePiii(ptr noundef @head, i32 noundef %47, i32 noundef %48)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %49

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

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

53:                                               ; preds = %67, %52
  %54 = load i32, ptr %7, align 4, !tbaa !8
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %70

58:                                               ; preds = %53
  %59 = load i32, ptr %7, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100010 x i32], ptr @dfn, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !8
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %66, label %64

64:                                               ; preds = %58
  %65 = load i32, ptr %7, align 4, !tbaa !8
  call void @_Z6tarjani(i32 noundef %65)
  br label %66

66:                                               ; preds = %64, %58
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %7, align 4, !tbaa !8
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !8
  br label %53, !llvm.loop !13

70:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #7
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %71

71:                                               ; preds = %133, %70
  %72 = load i32, ptr %9, align 4, !tbaa !8
  %73 = load i32, ptr %2, align 4, !tbaa !8
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %136

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %77 = load i32, ptr %9, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100010 x i32], ptr @head, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !8
  store i32 %80, ptr %11, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %126, %76
  %82 = load i32, ptr %11, align 4, !tbaa !8
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %85, label %84

84:                                               ; preds = %81
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %132

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %86 = load i32, ptr %11, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.edge, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !14
  store i32 %90, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %91 = load i32, ptr %9, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100010 x i32], ptr @scc_id, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  store i32 %94, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %95 = load i32, ptr %12, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100010 x i32], ptr @scc_id, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !8
  store i32 %98, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %99 = load i32, ptr %13, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %100, 1000000
  %102 = load i32, ptr %14, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = add nsw i64 %101, %103
  store i64 %104, ptr %15, align 8, !tbaa !16
  %105 = load i32, ptr %13, align 4, !tbaa !8
  %106 = load i32, ptr %14, align 4, !tbaa !8
  %107 = icmp ne i32 %105, %106
  br i1 %107, label %108, label %125

108:                                              ; preds = %85
  %109 = invoke noundef i64 @_ZNKSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %110 unwind label %121

110:                                              ; preds = %108
  %111 = icmp ne i64 %109, 0
  br i1 %111, label %125, label %112

112:                                              ; preds = %110
  %113 = load i32, ptr %13, align 4, !tbaa !8
  %114 = load i32, ptr %14, align 4, !tbaa !8
  call void @_Z8add_edgePiii(ptr noundef @head_scc, i32 noundef %113, i32 noundef %114)
  %115 = invoke { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %116 unwind label %121

116:                                              ; preds = %112
  %117 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %118 = extractvalue { ptr, i8 } %115, 0
  store ptr %118, ptr %117, align 8
  %119 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %120 = extractvalue { ptr, i8 } %115, 1
  store i8 %120, ptr %119, align 8
  br label %125

121:                                              ; preds = %112, %108
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %16, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  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 %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %309

125:                                              ; preds = %116, %110, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %11, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %128
  %130 = getelementptr inbounds %struct.edge, ptr %129, i32 0, i32 1
  %131 = load i32, ptr %130, align 4, !tbaa !18
  store i32 %131, ptr %11, align 4, !tbaa !8
  br label %81, !llvm.loop !19

132:                                              ; preds = %84
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %9, align 4, !tbaa !8
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %9, align 4, !tbaa !8
  br label %71, !llvm.loop !20

136:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %137 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  store i32 %137, ptr %19, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %247, %136
  %139 = load i32, ptr %19, align 4, !tbaa !8
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %142, label %141

141:                                              ; preds = %138
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %250

142:                                              ; preds = %138
  %143 = load i32, ptr %19, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !8
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %159, label %148

148:                                              ; preds = %142
  %149 = load i32, ptr %19, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !8
  %153 = load i32, ptr %19, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %154
  store i32 %152, ptr %155, align 4, !tbaa !8
  %156 = load i32, ptr %19, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %157
  store i32 1, ptr %158, align 4, !tbaa !8
  br label %159

159:                                              ; preds = %148, %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %160 = load i32, ptr %19, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100010 x i32], ptr @head_scc, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !8
  store i32 %163, ptr %20, align 4, !tbaa !8
  br label %164

164:                                              ; preds = %240, %159
  %165 = load i32, ptr %20, align 4, !tbaa !8
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %246

168:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %169 = load i32, ptr %20, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %170
  %172 = getelementptr inbounds %struct.edge, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 8, !tbaa !14
  store i32 %173, ptr %21, align 4, !tbaa !8
  %174 = load i32, ptr %21, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !8
  %178 = load i32, ptr %19, align 4, !tbaa !8
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !8
  %182 = load i32, ptr %21, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !8
  %186 = add nsw i32 %181, %185
  %187 = icmp slt i32 %177, %186
  br i1 %187, label %188, label %208

188:                                              ; preds = %168
  %189 = load i32, ptr %19, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !8
  %193 = load i32, ptr %21, align 4, !tbaa !8
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !8
  %197 = add nsw i32 %192, %196
  %198 = load i32, ptr %21, align 4, !tbaa !8
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %199
  store i32 %197, ptr %200, align 4, !tbaa !8
  %201 = load i32, ptr %19, align 4, !tbaa !8
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !8
  %205 = load i32, ptr %21, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %206
  store i32 %204, ptr %207, align 4, !tbaa !8
  br label %239

208:                                              ; preds = %168
  %209 = load i32, ptr %21, align 4, !tbaa !8
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !8
  %213 = load i32, ptr %19, align 4, !tbaa !8
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !8
  %217 = load i32, ptr %21, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !8
  %221 = add nsw i32 %216, %220
  %222 = icmp eq i32 %212, %221
  br i1 %222, label %223, label %238

223:                                              ; preds = %208
  %224 = load i32, ptr %19, align 4, !tbaa !8
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !8
  %228 = load i32, ptr %21, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !8
  %232 = add nsw i32 %227, %231
  %233 = load i32, ptr @mod, align 4, !tbaa !8
  %234 = srem i32 %232, %233
  %235 = load i32, ptr %21, align 4, !tbaa !8
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %236
  store i32 %234, ptr %237, align 4, !tbaa !8
  br label %238

238:                                              ; preds = %223, %208
  br label %239

239:                                              ; preds = %238, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %20, align 4, !tbaa !8
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %242
  %244 = getelementptr inbounds %struct.edge, ptr %243, i32 0, i32 1
  %245 = load i32, ptr %244, align 4, !tbaa !18
  store i32 %245, ptr %20, align 4, !tbaa !8
  br label %164, !llvm.loop !21

246:                                              ; preds = %167
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %19, align 4, !tbaa !8
  %249 = add nsw i32 %248, -1
  store i32 %249, ptr %19, align 4, !tbaa !8
  br label %138, !llvm.loop !22

250:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 1, ptr %24, align 4, !tbaa !8
  br label %251

251:                                              ; preds = %290, %250
  %252 = load i32, ptr %24, align 4, !tbaa !8
  %253 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %254 = icmp sle i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %293

256:                                              ; preds = %251
  %257 = load i32, ptr %24, align 4, !tbaa !8
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !8
  %261 = load i32, ptr %22, align 4, !tbaa !8
  %262 = icmp sgt i32 %260, %261
  br i1 %262, label %263, label %272

263:                                              ; preds = %256
  %264 = load i32, ptr %24, align 4, !tbaa !8
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !8
  store i32 %267, ptr %22, align 4, !tbaa !8
  %268 = load i32, ptr %24, align 4, !tbaa !8
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %269
  %271 = load i32, ptr %270, align 4, !tbaa !8
  store i32 %271, ptr %23, align 4, !tbaa !8
  br label %289

272:                                              ; preds = %256
  %273 = load i32, ptr %24, align 4, !tbaa !8
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !8
  %277 = load i32, ptr %22, align 4, !tbaa !8
  %278 = icmp eq i32 %276, %277
  br i1 %278, label %279, label %288

279:                                              ; preds = %272
  %280 = load i32, ptr %23, align 4, !tbaa !8
  %281 = load i32, ptr %24, align 4, !tbaa !8
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !8
  %285 = add nsw i32 %280, %284
  %286 = load i32, ptr @mod, align 4, !tbaa !8
  %287 = srem i32 %285, %286
  store i32 %287, ptr %23, align 4, !tbaa !8
  br label %288

288:                                              ; preds = %279, %272
  br label %289

289:                                              ; preds = %288, %263
  br label %290

290:                                              ; preds = %289
  %291 = load i32, ptr %24, align 4, !tbaa !8
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %24, align 4, !tbaa !8
  br label %251, !llvm.loop !23

293:                                              ; preds = %255
  %294 = load i32, ptr %22, align 4, !tbaa !8
  %295 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %294)
          to label %296 unwind label %305

296:                                              ; preds = %293
  %297 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %295, i8 noundef signext 10)
          to label %298 unwind label %305

298:                                              ; preds = %296
  %299 = load i32, ptr %23, align 4, !tbaa !8
  %300 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %299)
          to label %301 unwind label %305

301:                                              ; preds = %298
  %302 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %300, i8 noundef signext 10)
          to label %303 unwind label %305

303:                                              ; preds = %301
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %304 = load i32, ptr %1, align 4
  ret i32 %304

305:                                              ; preds = %301, %298, %296, %293
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %16, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %309

309:                                              ; preds = %305, %121
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %310

310:                                              ; preds = %309
  %311 = load ptr, ptr %16, align 8
  %312 = load i32, ptr %17, align 4
  %313 = insertvalue { ptr, i32 } poison, ptr %311, 0
  %314 = insertvalue { ptr, i32 } %313, i32 %312, 1
  resume { ptr, i32 } %314
}

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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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 void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

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 = !{!15, !9, i64 0}
!15 = !{!"_ZTS4edge", !9, i64 0, !9, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !10, i64 0}
!18 = !{!15, !9, i64 4}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !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" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@mod = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [100010 x i32], align 16
@g = external dso_local local_unnamed_addr global [100010 x i32], align 16
@e = external dso_local local_unnamed_addr global [2000010 x %struct.edge], align 16
@head = external dso_local global [100010 x i32], align 16
@head_scc = external dso_local global [100010 x i32], align 16
@scc_cnt = external dso_local local_unnamed_addr global i32, align 4
@dfn = external dso_local local_unnamed_addr global [100010 x i32], align 16
@scc_id = external dso_local local_unnamed_addr global [100010 x i32], align 16
@scc_size = external dso_local local_unnamed_addr global [100010 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_edgePiii(ptr noundef, 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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::unordered_set", align 8
  %6 = alloca i64, align 8
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %15
  %17 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  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) %1)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) @mod)
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %.not88 = icmp slt i32 %21, 1
  br i1 %.not88, label %.preheader87, label %.lr.ph

.preheader87:                                     ; preds = %.lr.ph, %0
  %22 = load i32, ptr %1, align 4, !tbaa !8
  %.not7690 = icmp slt i32 %22, 1
  br i1 %.not7690, label %._crit_edge, label %.lr.ph92

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.06389 = phi i32 [ %27, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %23 = 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)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = load i32, ptr %3, align 4, !tbaa !8
  %26 = load i32, ptr %4, align 4, !tbaa !8
  call void @_Z8add_edgePiii(ptr noundef nonnull @head, i32 noundef %25, i32 noundef %26)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %27 = add nuw nsw i32 %.06389, 1
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.06389, %28
  br i1 %.not.not, label %.lr.ph, label %.preheader87, !llvm.loop !11

._crit_edge:                                      ; preds = %35, %.preheader87
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #7
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  %29 = load i32, ptr %1, align 4, !tbaa !8
  %.not7799 = icmp slt i32 %29, 1
  br i1 %.not7799, label %._crit_edge103, label %.lr.ph102

.lr.ph92:                                         ; preds = %.preheader87, %35
  %30 = phi i32 [ %36, %35 ], [ %22, %.preheader87 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ 1, %.preheader87 ]
  %31 = getelementptr inbounds [100010 x i32], ptr @dfn, i64 0, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !8
  %.not86 = icmp eq i32 %32, 0
  br i1 %.not86, label %33, label %35

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

35:                                               ; preds = %.lr.ph92, %33
  %36 = phi i32 [ %30, %.lr.ph92 ], [ %.pre, %33 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = sext i32 %36 to i64
  %.not76.not = icmp slt i64 %indvars.iv, %37
  br i1 %.not76.not, label %.lr.ph92, label %._crit_edge, !llvm.loop !13

._crit_edge103:                                   ; preds = %._crit_edge98, %._crit_edge
  %38 = load i32, ptr @scc_cnt, align 4, !tbaa !8
  %.not78110 = icmp eq i32 %38, 0
  br i1 %.not78110, label %._crit_edge119, label %.lr.ph113

.lr.ph113:                                        ; preds = %._crit_edge103
  %39 = load i32, ptr @mod, align 4
  %40 = sext i32 %38 to i64
  br label %69

.lr.ph102:                                        ; preds = %._crit_edge, %._crit_edge98
  %41 = phi i32 [ %44, %._crit_edge98 ], [ %29, %._crit_edge ]
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %._crit_edge98 ], [ 1, %._crit_edge ]
  %42 = getelementptr inbounds [100010 x i32], ptr @head, i64 0, i64 %indvars.iv122
  %.06893 = load i32, ptr %42, align 4, !tbaa !8
  %.not8294 = icmp eq i32 %.06893, 0
  br i1 %.not8294, label %._crit_edge98, label %.lr.ph97

.lr.ph97:                                         ; preds = %.lr.ph102
  %43 = getelementptr inbounds [100010 x i32], ptr @scc_id, i64 0, i64 %indvars.iv122
  br label %46

._crit_edge98.loopexit:                           ; preds = %65
  %.pre131 = load i32, ptr %1, align 4, !tbaa !8
  br label %._crit_edge98

._crit_edge98:                                    ; preds = %._crit_edge98.loopexit, %.lr.ph102
  %44 = phi i32 [ %.pre131, %._crit_edge98.loopexit ], [ %41, %.lr.ph102 ]
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %45 = sext i32 %44 to i64
  %.not77.not = icmp slt i64 %indvars.iv122, %45
  br i1 %.not77.not, label %.lr.ph102, label %._crit_edge103, !llvm.loop !14

46:                                               ; preds = %.lr.ph97, %65
  %.06895 = phi i32 [ %.06893, %.lr.ph97 ], [ %.068, %65 ]
  %47 = sext i32 %.06895 to i64
  %48 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %47
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = load i32, ptr %43, align 4, !tbaa !8
  %51 = sext i32 %49 to i64
  %52 = getelementptr inbounds [100010 x i32], ptr @scc_id, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %54 = sext i32 %50 to i64
  %55 = mul nsw i64 %54, 1000000
  %56 = sext i32 %53 to i64
  %57 = add nsw i64 %55, %56
  store i64 %57, ptr %6, align 8, !tbaa !17
  %.not83 = icmp eq i32 %50, %53
  br i1 %.not83, label %65, label %58

58:                                               ; preds = %46
  %59 = invoke noundef i64 @_ZNKSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %60 unwind label %63

60:                                               ; preds = %58
  %.not84 = icmp eq i64 %59, 0
  br i1 %.not84, label %61, label %65

61:                                               ; preds = %60
  call void @_Z8add_edgePiii(ptr noundef nonnull @head_scc, i32 noundef %50, i32 noundef %53)
  %62 = invoke { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %65 unwind label %63

63:                                               ; preds = %61, %58
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %129

65:                                               ; preds = %61, %60, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %66 = getelementptr inbounds i8, ptr %48, i64 4
  %.068 = load i32, ptr %66, align 4, !tbaa !8
  %.not82 = icmp eq i32 %.068, 0
  br i1 %.not82, label %._crit_edge98.loopexit, label %46, !llvm.loop !19

.preheader:                                       ; preds = %._crit_edge109
  %.not79114 = icmp slt i32 %38, 1
  br i1 %.not79114, label %._crit_edge119, label %.lr.ph118

.lr.ph118:                                        ; preds = %.preheader
  %67 = load i32, ptr @mod, align 4
  %68 = add nuw i32 %38, 1
  %wide.trip.count = zext i32 %68 to i64
  br label %105

69:                                               ; preds = %.lr.ph113, %._crit_edge109
  %indvars.iv125 = phi i64 [ %40, %.lr.ph113 ], [ %indvars.iv.next126, %._crit_edge109 ]
  %70 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv125
  %71 = load i32, ptr %70, align 4, !tbaa !8
  %.not80 = icmp eq i32 %71, 0
  br i1 %.not80, label %72, label %76

72:                                               ; preds = %69
  %73 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %indvars.iv125
  %74 = load i32, ptr %73, align 4, !tbaa !8
  store i32 %74, ptr %70, align 4, !tbaa !8
  %75 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %indvars.iv125
  store i32 1, ptr %75, align 4, !tbaa !8
  br label %76

76:                                               ; preds = %72, %69
  %77 = getelementptr inbounds [100010 x i32], ptr @head_scc, i64 0, i64 %indvars.iv125
  %.061104 = load i32, ptr %77, align 4, !tbaa !8
  %.not81105 = icmp eq i32 %.061104, 0
  br i1 %.not81105, label %._crit_edge109, label %.lr.ph108

.lr.ph108:                                        ; preds = %76
  %78 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %indvars.iv125
  br label %79

._crit_edge109:                                   ; preds = %102, %76
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, -1
  %.not78 = icmp eq i64 %indvars.iv.next126, 0
  br i1 %.not78, label %.preheader, label %69, !llvm.loop !20

79:                                               ; preds = %.lr.ph108, %102
  %.061106 = phi i32 [ %.061104, %.lr.ph108 ], [ %.061, %102 ]
  %80 = sext i32 %.061106 to i64
  %81 = getelementptr inbounds [2000010 x %struct.edge], ptr @e, i64 0, i64 %80
  %82 = load i32, ptr %81, align 8, !tbaa !15
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !8
  %86 = load i32, ptr %70, align 4, !tbaa !8
  %87 = getelementptr inbounds [100010 x i32], ptr @scc_size, i64 0, i64 %83
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = add nsw i32 %88, %86
  %90 = icmp slt i32 %85, %89
  br i1 %90, label %91, label %94

91:                                               ; preds = %79
  store i32 %89, ptr %84, align 4, !tbaa !8
  %92 = load i32, ptr %78, align 4, !tbaa !8
  %93 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %83
  store i32 %92, ptr %93, align 4, !tbaa !8
  br label %102

94:                                               ; preds = %79
  %95 = icmp eq i32 %85, %89
  br i1 %95, label %96, label %102

96:                                               ; preds = %94
  %97 = load i32, ptr %78, align 4, !tbaa !8
  %98 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %83
  %99 = load i32, ptr %98, align 4, !tbaa !8
  %100 = add nsw i32 %99, %97
  %101 = srem i32 %100, %39
  store i32 %101, ptr %98, align 4, !tbaa !8
  br label %102

102:                                              ; preds = %94, %96, %91
  %103 = getelementptr inbounds i8, ptr %81, i64 4
  %.061 = load i32, ptr %103, align 4, !tbaa !8
  %.not81 = icmp eq i32 %.061, 0
  br i1 %.not81, label %._crit_edge109, label %79, !llvm.loop !21

._crit_edge119:                                   ; preds = %119, %._crit_edge103, %.preheader
  %.059.lcssa = phi i32 [ 0, %.preheader ], [ 0, %._crit_edge103 ], [ %.160, %119 ]
  %.058.lcssa = phi i32 [ 0, %.preheader ], [ 0, %._crit_edge103 ], [ %.1, %119 ]
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.059.lcssa)
          to label %120 unwind label %127

105:                                              ; preds = %.lr.ph118, %119
  %indvars.iv128 = phi i64 [ 1, %.lr.ph118 ], [ %indvars.iv.next129, %119 ]
  %.058116 = phi i32 [ 0, %.lr.ph118 ], [ %.1, %119 ]
  %.059115 = phi i32 [ 0, %.lr.ph118 ], [ %.160, %119 ]
  %106 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv128
  %107 = load i32, ptr %106, align 4, !tbaa !8
  %108 = icmp sgt i32 %107, %.059115
  br i1 %108, label %109, label %112

109:                                              ; preds = %105
  %110 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %indvars.iv128
  %111 = load i32, ptr %110, align 4, !tbaa !8
  br label %119

112:                                              ; preds = %105
  %113 = icmp eq i32 %107, %.059115
  br i1 %113, label %114, label %119

114:                                              ; preds = %112
  %115 = getelementptr inbounds [100010 x i32], ptr @g, i64 0, i64 %indvars.iv128
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = add nsw i32 %116, %.058116
  %118 = srem i32 %117, %67
  br label %119

119:                                              ; preds = %109, %114, %112
  %.160 = phi i32 [ %107, %109 ], [ %.059115, %114 ], [ %.059115, %112 ]
  %.1 = phi i32 [ %111, %109 ], [ %118, %114 ], [ %.058116, %112 ]
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next129, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge119, label %105, !llvm.loop !22

120:                                              ; preds = %._crit_edge119
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %104, i8 noundef signext 10)
          to label %122 unwind label %127

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.058.lcssa)
          to label %124 unwind label %127

124:                                              ; preds = %122
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %123, i8 noundef signext 10)
          to label %126 unwind label %127

126:                                              ; preds = %124
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

127:                                              ; preds = %124, %122, %120, %._crit_edge119
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %129

129:                                              ; preds = %127, %63
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %128, %127 ]
  call void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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 void @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

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


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