; LLVM IR from ravireddy07/cpp-book :: src/Code-Chef/VBR_Vibrating-Paths.ll (Z5erasei)

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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<Edge, Edge, std::_Identity<Edge>, std::less<Edge>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Edge, Edge, std::_Identity<Edge>, std::less<Edge>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%struct.Edge = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@G = external dso_local global [100005 x %"class.std::set"], align 16
@val = external dso_local global [100005 x i32], align 16
@ans = external dso_local global %"class.std::vector", align 8
@vis = external dso_local global [100005 x i32], align 16
@dgr = external dso_local global [100005 x i32], align 16
@Sum = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [46 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1
@__PRETTY_FUNCTION__._Z5erasei = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5erasei(i32 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Edge, align 4
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %struct.Edge, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %struct.Edge, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca %struct.Edge, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %26
  %28 = call noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  br i1 %28, label %43, label %29

29:                                               ; preds = %1
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %31
  %33 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %32) #6
  %34 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %3, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  %35 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %36 = getelementptr inbounds %struct.Edge, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100005 x i32], ptr @dgr, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp slt i32 %37, %41
  br label %43

43:                                               ; preds = %29, %1
  %44 = phi i1 [ false, %1 ], [ %42, %29 ]
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  br label %48

46:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 67, ptr noundef @__PRETTY_FUNCTION__._Z5erasei) #7
  unreachable

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %49 unwind label %61

49:                                               ; preds = %48
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %50 unwind label %61

50:                                               ; preds = %49
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100005 x i32], ptr @val, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr @Sum, align 4, !tbaa !5
  %56 = add nsw i32 %55, %54
  store i32 %56, ptr @Sum, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %147, %50
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = icmp sle i32 %58, 255
  br i1 %59, label %65, label %60

60:                                               ; preds = %57
  store i32 2, ptr %8, align 4
  br label %151

61:                                               ; preds = %49, %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %6, align 4
  br label %192

65:                                               ; preds = %57
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %67
  %69 = call noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %68) #6
  br i1 %69, label %70, label %71

70:                                               ; preds = %65
  store i32 2, ptr %8, align 4
  br label %151

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %73
  %75 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %74) #6
  %76 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %77, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %78 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !12
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %71
  store i32 2, ptr %8, align 4
  br label %144

85:                                               ; preds = %71
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %90
  %92 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %91) #6
  %93 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %95 = invoke noundef i64 @_ZNSt3setI4EdgeSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %88, ptr noundef nonnull align 4 dereferenceable(8) %94)
          to label %96 unwind label %121

96:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %97 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !12
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %101 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = load i32, ptr %2, align 4, !tbaa !5
  invoke void @_ZN4EdgeC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %12, i32 noundef %102, i32 noundef %103)
          to label %104 unwind label %125

104:                                              ; preds = %96
  %105 = invoke noundef i64 @_ZNSt3setI4EdgeSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %100, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %106 unwind label %125

106:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %107 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 1
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %107)
          to label %108 unwind label %129

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %110
  store ptr %111, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %112 = load ptr, ptr %13, align 8, !tbaa !13
  %113 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %112) #6
  %114 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %115 = load ptr, ptr %13, align 8, !tbaa !13
  %116 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %115) #6
  %117 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  br label %118

118:                                              ; preds = %139, %108
  %119 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %119, label %133, label %120

120:                                              ; preds = %118
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %141

121:                                              ; preds = %85
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %5, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %150

125:                                              ; preds = %104, %96
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %5, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %150

129:                                              ; preds = %106
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %5, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %6, align 4
  br label %150

133:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %134 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %134, i64 8, i1 false), !tbaa.struct !11
  %135 = getelementptr inbounds %struct.Edge, ptr %16, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !12
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %137
  store i32 1, ptr %138, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %139

139:                                              ; preds = %133
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI4EdgeEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %118

141:                                              ; preds = %120
  %142 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !12
  store i32 %143, ptr %2, align 4, !tbaa !5
  store i32 0, ptr %8, align 4
  br label %144

144:                                              ; preds = %141, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %145 = load i32, ptr %8, align 4
  switch i32 %145, label %151 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %7, align 4, !tbaa !5
  br label %57, !llvm.loop !15

150:                                              ; preds = %129, %125, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %192

151:                                              ; preds = %144, %70, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %152

152:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store ptr %4, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %153 = load ptr, ptr %17, align 8, !tbaa !13
  %154 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %153) #6
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %154, ptr %155, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %156 = load ptr, ptr %17, align 8, !tbaa !13
  %157 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #6
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  br label %159

159:                                              ; preds = %189, %152
  %160 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br i1 %160, label %162, label %161

161:                                              ; preds = %159
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %191

162:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %164 = load i32, ptr %163, align 4, !tbaa !5
  store i32 %164, ptr %20, align 4, !tbaa !5
  %165 = load i32, ptr %20, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %166
  store i32 0, ptr %167, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %168 = load i32, ptr %20, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %169
  store ptr %170, ptr %21, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %171 = load ptr, ptr %21, align 8, !tbaa !13
  %172 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %171) #6
  %173 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %172, ptr %173, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %174 = load ptr, ptr %21, align 8, !tbaa !13
  %175 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %174) #6
  %176 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %175, ptr %176, align 8
  br label %177

177:                                              ; preds = %186, %162
  %178 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %178, label %180, label %179

179:                                              ; preds = %177
  store i32 9, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %188

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %181 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %181, i64 8, i1 false), !tbaa.struct !11
  %182 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 1
  %183 = load i32, ptr %182, align 4, !tbaa !12
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %184
  store i32 0, ptr %185, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %186

186:                                              ; preds = %180
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI4EdgeEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %177

188:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %189

189:                                              ; preds = %188
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br label %159

191:                                              ; preds = %161
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  ret void

192:                                              ; preds = %150, %61
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %5, align 8
  %195 = load i32, ptr %6, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setI4EdgeSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4EdgeC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI4EdgeEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn nounwind "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 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4}
!11 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!12 = !{!10, !6, i64 4}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<Edge, Edge, std::_Identity<Edge>, std::less<Edge>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Edge, Edge, std::_Identity<Edge>, std::less<Edge>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%struct.Edge = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@G = external dso_local global [100005 x %"class.std::set"], align 16
@val = external dso_local local_unnamed_addr global [100005 x i32], align 16
@ans = external dso_local global %"class.std::vector", align 8
@vis = external dso_local local_unnamed_addr global [100005 x i32], align 16
@dgr = external dso_local local_unnamed_addr global [100005 x i32], align 16
@Sum = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [46 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1
@__PRETTY_FUNCTION__._Z5erasei = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5erasei(i32 noundef %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %struct.Edge, align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %struct.Edge, align 4
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %0 to i64
  %16 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %15
  %17 = tail call noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  br i1 %17, label %.critedge, label %18

18:                                               ; preds = %1
  %19 = tail call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %16) #5
  store ptr %19, ptr %3, align 8
  %20 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = getelementptr inbounds [100005 x i32], ptr @dgr, i64 0, i64 %15
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp slt i32 %21, %23
  br i1 %24, label %25, label %.critedge

.critedge:                                        ; preds = %1, %18
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 67, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5erasei) #6
  unreachable

25:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %26 unwind label %35

26:                                               ; preds = %25
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %27 unwind label %35

27:                                               ; preds = %26
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100005 x i32], ptr @val, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = load i32, ptr @Sum, align 4, !tbaa !5
  %33 = add nsw i32 %32, %31
  store i32 %33, ptr @Sum, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %5, i64 4
  br label %37

35:                                               ; preds = %26, %25
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %106

37:                                               ; preds = %27, %._crit_edge
  %38 = phi i32 [ %28, %27 ], [ %85, %._crit_edge ]
  %.01622 = phi i32 [ 1, %27 ], [ %86, %._crit_edge ]
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %39
  %41 = call noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %40) #5
  br i1 %41, label %.loopexit, label %42

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %44
  %46 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %45) #5
  store ptr %46, ptr %6, align 8
  %47 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %48 = load i64, ptr %47, align 4
  store i64 %48, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %49 = ashr i64 %48, 32
  %50 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %.not = icmp eq i32 %51, 0
  br i1 %.not, label %52, label %.critedge21

52:                                               ; preds = %42
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %56 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %55) #5
  store ptr %56, ptr %7, align 8
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %58 = invoke noundef i64 @_ZNSt3setI4EdgeSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %55, ptr noundef nonnull align 4 dereferenceable(8) %57)
          to label %59 unwind label %74

59:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %60 = load i32, ptr %34, align 4, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %63 = load i32, ptr %5, align 8, !tbaa !9
  %64 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN4EdgeC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %8, i32 noundef %63, i32 noundef %64)
  %65 = invoke noundef i64 @_ZNSt3setI4EdgeSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %62, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %66 unwind label %76

66:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %67 unwind label %78

67:                                               ; preds = %66
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %69
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %71 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %70) #5
  store ptr %71, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %72 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %70) #5
  store ptr %72, ptr %10, align 8
  %73 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %73, label %.lr.ph, label %._crit_edge

74:                                               ; preds = %52
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %87

76:                                               ; preds = %59
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %87

78:                                               ; preds = %66
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %87

.lr.ph:                                           ; preds = %67, %.lr.ph
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %.sroa.36.0..sroa_idx = getelementptr inbounds i8, ptr %80, i64 4
  %.sroa.36.0.copyload = load i32, ptr %.sroa.36.0..sroa_idx, align 4, !tbaa !5
  %81 = sext i32 %.sroa.36.0.copyload to i64
  %82 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %81
  store i32 1, ptr %82, align 4, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI4EdgeEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %84 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %84, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %85 = load i32, ptr %34, align 4, !tbaa !11
  store i32 %85, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %86 = add nuw nsw i32 %.01622, 1
  %exitcond.not = icmp eq i32 %86, 256
  br i1 %exitcond.not, label %.loopexit, label %37, !llvm.loop !12

87:                                               ; preds = %78, %76, %74
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %106

.critedge21:                                      ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %.loopexit

.loopexit:                                        ; preds = %37, %._crit_edge, %.critedge21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %88 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %88, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %89 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %89, ptr %12, align 8
  %90 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %90, label %.lr.ph27, label %._crit_edge28

._crit_edge28:                                    ; preds = %._crit_edge25, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void

.lr.ph27:                                         ; preds = %.loopexit, %._crit_edge25
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %93
  store i32 0, ptr %94, align 4, !tbaa !5
  %95 = getelementptr inbounds [100005 x %"class.std::set"], ptr @G, i64 0, i64 %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %96 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %95) #5
  store ptr %96, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %97 = call ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %95) #5
  store ptr %97, ptr %14, align 8
  %98 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %98, label %.lr.ph24, label %._crit_edge25

._crit_edge25:                                    ; preds = %.lr.ph24, %.lr.ph27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %100 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %100, label %.lr.ph27, label %._crit_edge28

.lr.ph24:                                         ; preds = %.lr.ph27, %.lr.ph24
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 4
  %.sroa.3.0.copyload = load i32, ptr %.sroa.3.0..sroa_idx, align 4, !tbaa !5
  %102 = sext i32 %.sroa.3.0.copyload to i64
  %103 = getelementptr inbounds [100005 x i32], ptr @vis, i64 0, i64 %102
  store i32 0, ptr %103, align 4, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorI4EdgeEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %105 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %105, label %.lr.ph24, label %._crit_edge25

106:                                              ; preds = %87, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %36, %35 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; 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 nounwind uwtable
declare dso_local ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorI4EdgeEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; 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 uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4EdgeC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setI4EdgeSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI4EdgeES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 = { noreturn nounwind "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 4}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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