; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/University CodeSprint 2016/Problem E (E)

; 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::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 }
%"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 }
%"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" }
%"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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::allocator" = type { i8 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [10000 x %"class.std::vector"], align 16
@best = external dso_local global [10000 x i32], align 16
@c = external dso_local global i32, align 4
@path = external dso_local global %"class.std::vector", align 8
@ans = external dso_local global %"class.std::vector", align 8
@edges = external dso_local global [10000 x %"class.std::unordered_set"], 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 @_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
declare dso_local void @_Z3dfsi(i32 noundef) #1

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

; Function Attrs: 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 noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #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)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #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)) #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 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 %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %"class.std::vector", align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %38 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %39 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %40 = getelementptr i8, ptr %39, i64 -24
  %41 = load i64, ptr %40, align 8
  %42 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %41
  %43 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %42, ptr noundef null)
  %44 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %45 = getelementptr i8, ptr %44, i64 -24
  %46 = load i64, ptr %45, align 8
  %47 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %46
  %48 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %47, ptr noundef null)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %85, %0
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = load i32, ptr @m, align 4, !tbaa !8
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %88

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %57 = 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)
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %3, align 4, !tbaa !8
  %61 = load i32, ptr %4, align 4, !tbaa !8
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %4, align 4, !tbaa !8
  %63 = load i32, ptr %3, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %64
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %66 = load i32, ptr %4, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %67
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %69 = load i32, ptr %3, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %70
  %72 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %71, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %73 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 0
  %74 = extractvalue { ptr, i8 } %72, 0
  store ptr %74, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 1
  %76 = extractvalue { ptr, i8 } %72, 1
  store i8 %76, ptr %75, align 8
  %77 = load i32, ptr %4, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %78
  %80 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %81 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %82 = extractvalue { ptr, i8 } %80, 0
  store ptr %82, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %84 = extractvalue { ptr, i8 } %80, 1
  store i8 %84, ptr %83, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %85

85:                                               ; preds = %56
  %86 = load i32, ptr %2, align 4, !tbaa !8
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %2, align 4, !tbaa !8
  br label %51, !llvm.loop !11

88:                                               ; preds = %55
  %89 = call i64 @time(ptr noundef null) #8
  %90 = trunc i64 %89 to i32
  call void @srand(i32 noundef %90) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %91

91:                                               ; preds = %111, %88
  %92 = load i32, ptr %7, align 4, !tbaa !8
  %93 = load i32, ptr @n, align 4, !tbaa !8
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %114

96:                                               ; preds = %91
  %97 = load i32, ptr %7, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %98
  %100 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  %102 = load i32, ptr %7, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %103
  %105 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #8
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %105, ptr %106, align 8
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8
  call void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %108, ptr %110)
  br label %111

111:                                              ; preds = %96
  %112 = load i32, ptr %7, align 4, !tbaa !8
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !8
  br label %91, !llvm.loop !13

114:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 150, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %115

115:                                              ; preds = %172, %114
  %116 = load i32, ptr %11, align 4, !tbaa !8
  %117 = load i32, ptr %10, align 4, !tbaa !8
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 8, ptr %12, align 4
  br label %175

120:                                              ; preds = %115
  %121 = load i32, ptr @c, align 4, !tbaa !8
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr @c, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %123 = call i32 @rand() #8
  %124 = load i32, ptr @n, align 4, !tbaa !8
  %125 = srem i32 %123, %124
  call void @_Z3dfsi(i32 noundef %125)
  %126 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %128 = icmp ugt i64 %126, %127
  br i1 %128, label %129, label %131

129:                                              ; preds = %120
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) @path)
  br label %131

131:                                              ; preds = %129, %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %132 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %133 = trunc i64 %132 to i32
  store i32 %133, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %160, %131
  %135 = load i32, ptr %14, align 4, !tbaa !8
  %136 = load i32, ptr %13, align 4, !tbaa !8
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %163

139:                                              ; preds = %134
  %140 = load i32, ptr %14, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @path, i64 noundef %141) #8
  %143 = load i32, ptr %142, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [10000 x i32], ptr @best, i64 0, i64 %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %146 = load i32, ptr %13, align 4, !tbaa !8
  %147 = load i32, ptr %14, align 4, !tbaa !8
  %148 = sub nsw i32 %146, %147
  store i32 %148, ptr %15, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %149 = load i32, ptr %14, align 4, !tbaa !8
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %16, align 4, !tbaa !8
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %151)
  %153 = load i32, ptr %152, align 4, !tbaa !8
  %154 = load i32, ptr %14, align 4, !tbaa !8
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @path, i64 noundef %155) #8
  %157 = load i32, ptr %156, align 4, !tbaa !8
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [10000 x i32], ptr @best, i64 0, i64 %158
  store i32 %153, ptr %159, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %160

160:                                              ; preds = %139
  %161 = load i32, ptr %14, align 4, !tbaa !8
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %14, align 4, !tbaa !8
  br label %134, !llvm.loop !14

163:                                              ; preds = %138
  %164 = load i32, ptr %13, align 4, !tbaa !8
  %165 = load i32, ptr @n, align 4, !tbaa !8
  %166 = icmp eq i32 %164, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %163
  store i32 8, ptr %12, align 4
  br label %169

168:                                              ; preds = %163
  store i32 0, ptr %12, align 4
  br label %169

169:                                              ; preds = %168, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %170 = load i32, ptr %12, align 4
  switch i32 %170, label %175 [
    i32 0, label %171
  ]

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %11, align 4, !tbaa !8
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %11, align 4, !tbaa !8
  br label %115, !llvm.loop !15

175:                                              ; preds = %169, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %176

176:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  %177 = load i32, ptr @n, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %178, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %179 unwind label %187

179:                                              ; preds = %176
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr @ans, ptr %22, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %180 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %181 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %180, ptr %181, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %182 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %183 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %182, ptr %183, align 8
  br label %184

184:                                              ; preds = %197, %179
  %185 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %185, label %191, label %186

186:                                              ; preds = %184
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %199

187:                                              ; preds = %176
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %20, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %21, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %445

191:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  store ptr %192, ptr %25, align 8, !tbaa !16
  %193 = load ptr, ptr %25, align 8, !tbaa !16
  %194 = load i32, ptr %193, align 4, !tbaa !8
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %195) #8
  store i32 1, ptr %196, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %197

197:                                              ; preds = %191
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br label %184

199:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !8
  br label %200

200:                                              ; preds = %301, %199
  %201 = load i32, ptr %26, align 4, !tbaa !8
  %202 = load i32, ptr @n, align 4, !tbaa !8
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %205, label %204

204:                                              ; preds = %200
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %304

205:                                              ; preds = %200
  %206 = load i32, ptr %26, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %207) #8
  %209 = load i32, ptr %208, align 4, !tbaa !8
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %212

211:                                              ; preds = %205
  br label %301

212:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 1, ptr %27, align 4, !tbaa !8
  br label %213

213:                                              ; preds = %295, %212
  %214 = load i32, ptr %27, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %217 = icmp ult i64 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %213
  store i32 19, ptr %12, align 4
  br label %298

219:                                              ; preds = %213
  %220 = load i32, ptr %27, align 4, !tbaa !8
  %221 = sub nsw i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %222) #8
  %224 = load i32, ptr %223, align 4, !tbaa !8
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %225
  %227 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %226, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %228 unwind label %246

228:                                              ; preds = %219
  %229 = icmp ne i64 %227, 0
  br i1 %229, label %230, label %294

230:                                              ; preds = %228
  %231 = load i32, ptr %26, align 4, !tbaa !8
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %232
  %234 = load i32, ptr %27, align 4, !tbaa !8
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %235) #8
  %237 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %233, ptr noundef nonnull align 4 dereferenceable(4) %236)
          to label %238 unwind label %246

238:                                              ; preds = %230
  %239 = icmp ne i64 %237, 0
  br i1 %239, label %240, label %294

240:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !8
  br label %241

241:                                              ; preds = %255, %240
  %242 = load i32, ptr %29, align 4, !tbaa !8
  %243 = load i32, ptr %27, align 4, !tbaa !8
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %250, label %245

245:                                              ; preds = %241
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %262

246:                                              ; preds = %230, %219
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %20, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %21, align 4
  br label %299

250:                                              ; preds = %241
  %251 = load i32, ptr %29, align 4, !tbaa !8
  %252 = sext i32 %251 to i64
  %253 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %252) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(4) %253)
          to label %254 unwind label %258

254:                                              ; preds = %250
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %29, align 4, !tbaa !8
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %29, align 4, !tbaa !8
  br label %241, !llvm.loop !18

258:                                              ; preds = %250
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %20, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %293

262:                                              ; preds = %245
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %263 unwind label %271

263:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %264 = load i32, ptr %27, align 4, !tbaa !8
  store i32 %264, ptr %30, align 4, !tbaa !8
  br label %265

265:                                              ; preds = %280, %263
  %266 = load i32, ptr %30, align 4, !tbaa !8
  %267 = sext i32 %266 to i64
  %268 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %269 = icmp ult i64 %267, %268
  br i1 %269, label %275, label %270

270:                                              ; preds = %265
  store i32 25, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %287

271:                                              ; preds = %287, %262
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %20, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %21, align 4
  br label %293

275:                                              ; preds = %265
  %276 = load i32, ptr %30, align 4, !tbaa !8
  %277 = sext i32 %276 to i64
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %277) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(4) %278)
          to label %279 unwind label %283

279:                                              ; preds = %275
  br label %280

280:                                              ; preds = %279
  %281 = load i32, ptr %30, align 4, !tbaa !8
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %30, align 4, !tbaa !8
  br label %265, !llvm.loop !19

283:                                              ; preds = %275
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %20, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %293

287:                                              ; preds = %270
  %288 = load i32, ptr %26, align 4, !tbaa !8
  %289 = sext i32 %288 to i64
  %290 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %289) #8
  store i32 1, ptr %290, align 4, !tbaa !8
  %291 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %292 unwind label %271

292:                                              ; preds = %287
  store i32 19, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  br label %298

293:                                              ; preds = %283, %271, %258
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  br label %299

294:                                              ; preds = %238, %228
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %27, align 4, !tbaa !8
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %27, align 4, !tbaa !8
  br label %213, !llvm.loop !20

298:                                              ; preds = %292, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %300

299:                                              ; preds = %293, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %444

300:                                              ; preds = %298
  br label %301

301:                                              ; preds = %300, %211
  %302 = load i32, ptr %26, align 4, !tbaa !8
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %26, align 4, !tbaa !8
  br label %200, !llvm.loop !21

304:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !8
  br label %305

305:                                              ; preds = %406, %304
  %306 = load i32, ptr %31, align 4, !tbaa !8
  %307 = load i32, ptr @n, align 4, !tbaa !8
  %308 = icmp slt i32 %306, %307
  br i1 %308, label %310, label %309

309:                                              ; preds = %305
  store i32 28, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %409

310:                                              ; preds = %305
  %311 = load i32, ptr %31, align 4, !tbaa !8
  %312 = sext i32 %311 to i64
  %313 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %312) #8
  %314 = load i32, ptr %313, align 4, !tbaa !8
  %315 = icmp ne i32 %314, 0
  br i1 %315, label %316, label %317

316:                                              ; preds = %310
  br label %406

317:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store i32 1, ptr %32, align 4, !tbaa !8
  br label %318

318:                                              ; preds = %400, %317
  %319 = load i32, ptr %32, align 4, !tbaa !8
  %320 = sext i32 %319 to i64
  %321 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %322 = icmp ult i64 %320, %321
  br i1 %322, label %324, label %323

323:                                              ; preds = %318
  store i32 31, ptr %12, align 4
  br label %403

324:                                              ; preds = %318
  %325 = load i32, ptr %32, align 4, !tbaa !8
  %326 = sub nsw i32 %325, 1
  %327 = sext i32 %326 to i64
  %328 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %327) #8
  %329 = load i32, ptr %328, align 4, !tbaa !8
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %330
  %332 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %331, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %333 unwind label %351

333:                                              ; preds = %324
  %334 = icmp ne i64 %332, 0
  br i1 %334, label %335, label %399

335:                                              ; preds = %333
  %336 = load i32, ptr %31, align 4, !tbaa !8
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %337
  %339 = load i32, ptr %32, align 4, !tbaa !8
  %340 = sext i32 %339 to i64
  %341 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %340) #8
  %342 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %338, ptr noundef nonnull align 4 dereferenceable(4) %341)
          to label %343 unwind label %351

343:                                              ; preds = %335
  %344 = icmp ne i64 %342, 0
  br i1 %344, label %345, label %399

345:                                              ; preds = %343
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  store i32 0, ptr %34, align 4, !tbaa !8
  br label %346

346:                                              ; preds = %360, %345
  %347 = load i32, ptr %34, align 4, !tbaa !8
  %348 = load i32, ptr %32, align 4, !tbaa !8
  %349 = icmp slt i32 %347, %348
  br i1 %349, label %355, label %350

350:                                              ; preds = %346
  store i32 34, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %367

351:                                              ; preds = %335, %324
  %352 = landingpad { ptr, i32 }
          cleanup
  %353 = extractvalue { ptr, i32 } %352, 0
  store ptr %353, ptr %20, align 8
  %354 = extractvalue { ptr, i32 } %352, 1
  store i32 %354, ptr %21, align 4
  br label %404

355:                                              ; preds = %346
  %356 = load i32, ptr %34, align 4, !tbaa !8
  %357 = sext i32 %356 to i64
  %358 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %357) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %358)
          to label %359 unwind label %363

359:                                              ; preds = %355
  br label %360

360:                                              ; preds = %359
  %361 = load i32, ptr %34, align 4, !tbaa !8
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr %34, align 4, !tbaa !8
  br label %346, !llvm.loop !22

363:                                              ; preds = %355
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %20, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %398

367:                                              ; preds = %350
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %368 unwind label %376

368:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %369 = load i32, ptr %32, align 4, !tbaa !8
  store i32 %369, ptr %35, align 4, !tbaa !8
  br label %370

370:                                              ; preds = %385, %368
  %371 = load i32, ptr %35, align 4, !tbaa !8
  %372 = sext i32 %371 to i64
  %373 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %374 = icmp ult i64 %372, %373
  br i1 %374, label %380, label %375

375:                                              ; preds = %370
  store i32 37, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %392

376:                                              ; preds = %392, %367
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %20, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %21, align 4
  br label %398

380:                                              ; preds = %370
  %381 = load i32, ptr %35, align 4, !tbaa !8
  %382 = sext i32 %381 to i64
  %383 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %382) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %383)
          to label %384 unwind label %388

384:                                              ; preds = %380
  br label %385

385:                                              ; preds = %384
  %386 = load i32, ptr %35, align 4, !tbaa !8
  %387 = add nsw i32 %386, 1
  store i32 %387, ptr %35, align 4, !tbaa !8
  br label %370, !llvm.loop !23

388:                                              ; preds = %380
  %389 = landingpad { ptr, i32 }
          cleanup
  %390 = extractvalue { ptr, i32 } %389, 0
  store ptr %390, ptr %20, align 8
  %391 = extractvalue { ptr, i32 } %389, 1
  store i32 %391, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %398

392:                                              ; preds = %375
  %393 = load i32, ptr %31, align 4, !tbaa !8
  %394 = sext i32 %393 to i64
  %395 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %394) #8
  store i32 1, ptr %395, align 4, !tbaa !8
  %396 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %397 unwind label %376

397:                                              ; preds = %392
  store i32 31, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #8
  br label %403

398:                                              ; preds = %388, %376, %363
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #8
  br label %404

399:                                              ; preds = %343, %333
  br label %400

400:                                              ; preds = %399
  %401 = load i32, ptr %32, align 4, !tbaa !8
  %402 = add nsw i32 %401, 1
  store i32 %402, ptr %32, align 4, !tbaa !8
  br label %318, !llvm.loop !24

403:                                              ; preds = %397, %323
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %405

404:                                              ; preds = %398, %351
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %444

405:                                              ; preds = %403
  br label %406

406:                                              ; preds = %405, %316
  %407 = load i32, ptr %31, align 4, !tbaa !8
  %408 = add nsw i32 %407, 1
  store i32 %408, ptr %31, align 4, !tbaa !8
  br label %305, !llvm.loop !25

409:                                              ; preds = %309
  %410 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %411 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %410)
          to label %412 unwind label %422

412:                                              ; preds = %409
  %413 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %411, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %414 unwind label %422

414:                                              ; preds = %412
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %415 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %416 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %36, i32 0, i32 0
  store ptr %415, ptr %416, align 8
  br label %417

417:                                              ; preds = %434, %414
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %418 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %419 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  %420 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br i1 %420, label %426, label %421

421:                                              ; preds = %417
  store i32 40, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %440

422:                                              ; preds = %440, %412, %409
  %423 = landingpad { ptr, i32 }
          cleanup
  %424 = extractvalue { ptr, i32 } %423, 0
  store ptr %424, ptr %20, align 8
  %425 = extractvalue { ptr, i32 } %423, 1
  store i32 %425, ptr %21, align 4
  br label %444

426:                                              ; preds = %417
  %427 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  %428 = load i32, ptr %427, align 4, !tbaa !8
  %429 = add nsw i32 %428, 1
  %430 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %429)
          to label %431 unwind label %436

431:                                              ; preds = %426
  %432 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %430, i8 noundef signext 32)
          to label %433 unwind label %436

433:                                              ; preds = %431
  br label %434

434:                                              ; preds = %433
  %435 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  br label %417, !llvm.loop !26

436:                                              ; preds = %431, %426
  %437 = landingpad { ptr, i32 }
          cleanup
  %438 = extractvalue { ptr, i32 } %437, 0
  store ptr %438, ptr %20, align 8
  %439 = extractvalue { ptr, i32 } %437, 1
  store i32 %439, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %444

440:                                              ; preds = %421
  %441 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %442 unwind label %422

442:                                              ; preds = %440
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  %443 = load i32, ptr %1, align 4
  ret i32 %443

444:                                              ; preds = %436, %422, %404, %299
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %445

445:                                              ; preds = %444, %187
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %446

446:                                              ; preds = %445
  %447 = load ptr, ptr %20, align 8
  %448 = load i32, ptr %21, align 4
  %449 = insertvalue { ptr, i32 } poison, ptr %447, 0
  %450 = insertvalue { ptr, i32 } %449, i32 %448, 1
  resume { ptr, i32 } %450
}

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

; 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)) #5

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #6

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #7

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

; Function Attrs: nounwind
declare i32 @rand() #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

; 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) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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 "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 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !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"

%"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 }
%"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 }
%"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::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [10000 x %"class.std::vector"], align 16
@best = external dso_local global [10000 x i32], align 16
@c = external dso_local local_unnamed_addr global i32, align 4
@path = external dso_local global %"class.std::vector", align 8
@ans = external dso_local global %"class.std::vector", align 8
@edges = external dso_local global [10000 x %"class.std::unordered_set"], 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 @_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
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #1

; 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

; 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 noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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: 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 #3

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

; 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 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::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %29 = load i32, ptr @m, align 4, !tbaa !8
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %31 = call i64 @time(ptr noundef null) #8
  %32 = trunc i64 %31 to i32
  call void @srand(i32 noundef %32) #8
  %33 = load i32, ptr @n, align 4, !tbaa !8
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph101, label %.preheader93.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.05598 = phi i32 [ %54, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %35 = 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)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %37 = load i32, ptr %1, align 4, !tbaa !8
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %1, align 4, !tbaa !8
  %39 = load i32, ptr %2, align 4, !tbaa !8
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %2, align 4, !tbaa !8
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %41
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %44
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %46 = load i32, ptr %1, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %47
  %49 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %51
  %53 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %54 = add nuw nsw i32 %.05598, 1
  %55 = load i32, ptr @m, align 4, !tbaa !8
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph101:                                        ; preds = %._crit_edge, %.lr.ph101
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph101 ], [ 0, %._crit_edge ]
  %57 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv
  %58 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #8
  %59 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #8
  call void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %58, ptr %59)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr @n, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %.lr.ph101, label %.preheader93.preheader, !llvm.loop !13

.preheader93.preheader:                           ; preds = %.lr.ph101, %._crit_edge
  br label %.preheader93

.preheader93:                                     ; preds = %.preheader93.preheader, %._crit_edge105
  %.066106 = phi i32 [ %78, %._crit_edge105 ], [ 0, %.preheader93.preheader ]
  %63 = load i32, ptr @c, align 4, !tbaa !8
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr @c, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %65 = call i32 @rand() #8
  %66 = load i32, ptr @n, align 4, !tbaa !8
  %67 = srem i32 %65, %66
  call void @_Z3dfsi(i32 noundef %67)
  %68 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %69 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %70 = icmp ugt i64 %68, %69
  br i1 %70, label %71, label %73

71:                                               ; preds = %.preheader93
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) @path)
  br label %73

73:                                               ; preds = %71, %.preheader93
  %74 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @path) #8
  %75 = trunc i64 %74 to i32
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph104.preheader, label %._crit_edge105

.lr.ph104.preheader:                              ; preds = %73
  %wide.trip.count = and i64 %74, 2147483647
  br label %.lr.ph104

._crit_edge105:                                   ; preds = %.lr.ph104, %73
  %77 = load i32, ptr @n, align 4, !tbaa !8
  %.not = icmp eq i32 %77, %75
  %78 = add nuw nsw i32 %.066106, 1
  %exitcond141.not = icmp eq i32 %78, 150
  %or.cond = select i1 %.not, i1 true, i1 %exitcond141.not
  br i1 %or.cond, label %93, label %.preheader93, !llvm.loop !14

.lr.ph104:                                        ; preds = %.lr.ph104.preheader, %.lr.ph104
  %indvars.iv138 = phi i64 [ 0, %.lr.ph104.preheader ], [ %indvars.iv.next139, %.lr.ph104 ]
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @path, i64 noundef %indvars.iv138) #8
  %80 = load i32, ptr %79, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [10000 x i32], ptr @best, i64 0, i64 %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %83 = sub i64 %74, %indvars.iv138
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %85 = trunc nuw nsw i64 %indvars.iv.next139 to i32
  store i32 %85, ptr %4, align 4, !tbaa !8
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %82, ptr noundef nonnull align 4 dereferenceable(4) %86)
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @path, i64 noundef %indvars.iv138) #8
  %90 = load i32, ptr %89, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [10000 x i32], ptr @best, i64 0, i64 %91
  store i32 %88, ptr %92, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %exitcond.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge105, label %.lr.ph104, !llvm.loop !15

93:                                               ; preds = %._crit_edge105
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %94 = sext i32 %77 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %94, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %95 unwind label %101

95:                                               ; preds = %93
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %96 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %96, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %97 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %97, ptr %9, align 8
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %98, label %.lr.ph108, label %._crit_edge109

._crit_edge109:                                   ; preds = %.lr.ph108, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  %99 = load i32, ptr @n, align 4, !tbaa !8
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %.lr.ph118, label %._crit_edge119.thread

._crit_edge119.thread:                            ; preds = %._crit_edge109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  br label %._crit_edge129

101:                                              ; preds = %93
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %241

.lr.ph108:                                        ; preds = %95, %.lr.ph108
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %104 = load i32, ptr %103, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %105) #8
  store i32 1, ptr %106, align 4, !tbaa !8
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %108 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %108, label %.lr.ph108, label %._crit_edge109

._crit_edge119:                                   ; preds = %.loopexit92
  %109 = icmp sgt i32 %161, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 0, ptr %12, align 4, !tbaa !8
  br i1 %109, label %.lr.ph128, label %._crit_edge129

.lr.ph118:                                        ; preds = %._crit_edge109, %.loopexit92
  %storemerge116 = phi i32 [ %160, %.loopexit92 ], [ 0, %._crit_edge109 ]
  %110 = sext i32 %storemerge116 to i64
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %110) #8
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %.not81 = icmp eq i32 %112, 0
  br i1 %.not81, label %.preheader91, label %.loopexit92

.preheader91:                                     ; preds = %.lr.ph118
  %113 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %114 = icmp ugt i64 %113, 1
  br i1 %114, label %.lr.ph111, label %.loopexit92

.lr.ph111:                                        ; preds = %.preheader91, %155
  %indvars.iv148 = phi i32 [ %indvars.iv.next149, %155 ], [ 1, %.preheader91 ]
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %155 ], [ 1, %.preheader91 ]
  %115 = add nsw i64 %indvars.iv142, -1
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %115) #8
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %118
  %120 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %119, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %121 unwind label %134

121:                                              ; preds = %.lr.ph111
  %.not82 = icmp eq i64 %120, 0
  br i1 %.not82, label %155, label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %10, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %124
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv142) #8
  %127 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %125, ptr noundef nonnull align 4 dereferenceable(4) %126)
          to label %128 unwind label %134

128:                                              ; preds = %122
  %.not83 = icmp eq i64 %127, 0
  br i1 %.not83, label %155, label %129

129:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %wide.trip.count152 = zext i32 %indvars.iv148 to i64
  br label %136

130:                                              ; preds = %138
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %.preheader90 unwind label %145

.preheader90:                                     ; preds = %130
  %131 = and i64 %indvars.iv142, 4294967295
  %132 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %133 = icmp ugt i64 %132, %131
  br i1 %133, label %.lr.ph114, label %._crit_edge115

134:                                              ; preds = %122, %.lr.ph111
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %158

136:                                              ; preds = %129, %138
  %indvars.iv145 = phi i64 [ 0, %129 ], [ %indvars.iv.next146, %138 ]
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv145) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %137)
          to label %138 unwind label %139

138:                                              ; preds = %136
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %exitcond153.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count152
  br i1 %exitcond153.not, label %130, label %136, !llvm.loop !16

139:                                              ; preds = %136
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %154

._crit_edge115:                                   ; preds = %148, %.preheader90
  %141 = load i32, ptr %10, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %142) #8
  store i32 1, ptr %143, align 4, !tbaa !8
  %144 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %153 unwind label %145

145:                                              ; preds = %._crit_edge115, %130
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %154

.lr.ph114:                                        ; preds = %.preheader90, %148
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %148 ], [ %indvars.iv142, %.preheader90 ]
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv156) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %147)
          to label %148 unwind label %151

148:                                              ; preds = %.lr.ph114
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %149 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %150 = icmp ugt i64 %149, %indvars.iv.next157
  br i1 %150, label %.lr.ph114, label %._crit_edge115, !llvm.loop !17

151:                                              ; preds = %.lr.ph114
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %154

153:                                              ; preds = %._crit_edge115
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  br label %.loopexit92

154:                                              ; preds = %151, %145, %139
  %.pn84 = phi { ptr, i32 } [ %140, %139 ], [ %152, %151 ], [ %146, %145 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  br label %158

155:                                              ; preds = %121, %128
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %156 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %157 = icmp ugt i64 %156, %indvars.iv.next143
  %indvars.iv.next149 = add nuw i32 %indvars.iv148, 1
  br i1 %157, label %.lr.ph111, label %.loopexit92, !llvm.loop !18

158:                                              ; preds = %154, %134
  %.pn84.pn = phi { ptr, i32 } [ %.pn84, %154 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %240

.loopexit92:                                      ; preds = %155, %.preheader91, %153, %.lr.ph118
  %159 = load i32, ptr %10, align 4, !tbaa !8
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %10, align 4, !tbaa !8
  %161 = load i32, ptr @n, align 4, !tbaa !8
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %.lr.ph118, label %._crit_edge119, !llvm.loop !19

._crit_edge129:                                   ; preds = %.loopexit, %._crit_edge119.thread, %._crit_edge119
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  %163 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %163)
          to label %218 unwind label %225

.lr.ph128:                                        ; preds = %._crit_edge119, %.loopexit
  %storemerge75126 = phi i32 [ %215, %.loopexit ], [ 0, %._crit_edge119 ]
  %165 = sext i32 %storemerge75126 to i64
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %165) #8
  %167 = load i32, ptr %166, align 4, !tbaa !8
  %.not76 = icmp eq i32 %167, 0
  br i1 %.not76, label %.preheader89, label %.loopexit

.preheader89:                                     ; preds = %.lr.ph128
  %168 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %169 = icmp ugt i64 %168, 1
  br i1 %169, label %.lr.ph121, label %.loopexit

.lr.ph121:                                        ; preds = %.preheader89, %210
  %indvars.iv165 = phi i32 [ %indvars.iv.next166, %210 ], [ 1, %.preheader89 ]
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %210 ], [ 1, %.preheader89 ]
  %170 = add nsw i64 %indvars.iv159, -1
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %170) #8
  %172 = load i32, ptr %171, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %173
  %175 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %174, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %176 unwind label %189

176:                                              ; preds = %.lr.ph121
  %.not77 = icmp eq i64 %175, 0
  br i1 %.not77, label %210, label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %12, align 4, !tbaa !8
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [10000 x %"class.std::unordered_set"], ptr @edges, i64 0, i64 %179
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv159) #8
  %182 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %180, ptr noundef nonnull align 4 dereferenceable(4) %181)
          to label %183 unwind label %189

183:                                              ; preds = %177
  %.not78 = icmp eq i64 %182, 0
  br i1 %.not78, label %210, label %184

184:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %wide.trip.count169 = zext i32 %indvars.iv165 to i64
  br label %191

185:                                              ; preds = %193
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %.preheader unwind label %200

.preheader:                                       ; preds = %185
  %186 = and i64 %indvars.iv159, 4294967295
  %187 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %188 = icmp ugt i64 %187, %186
  br i1 %188, label %.lr.ph124, label %._crit_edge125

189:                                              ; preds = %177, %.lr.ph121
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %213

191:                                              ; preds = %184, %193
  %indvars.iv162 = phi i64 [ 0, %184 ], [ %indvars.iv.next163, %193 ]
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv162) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %192)
          to label %193 unwind label %194

193:                                              ; preds = %191
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count169
  br i1 %exitcond170.not, label %185, label %191, !llvm.loop !20

194:                                              ; preds = %191
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %209

._crit_edge125:                                   ; preds = %203, %.preheader
  %196 = load i32, ptr %12, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %197) #8
  store i32 1, ptr %198, align 4, !tbaa !8
  %199 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %208 unwind label %200

200:                                              ; preds = %._crit_edge125, %185
  %201 = landingpad { ptr, i32 }
          cleanup
  br label %209

.lr.ph124:                                        ; preds = %.preheader, %203
  %indvars.iv173 = phi i64 [ %indvars.iv.next174, %203 ], [ %indvars.iv159, %.preheader ]
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ans, i64 noundef %indvars.iv173) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %202)
          to label %203 unwind label %206

203:                                              ; preds = %.lr.ph124
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %204 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %205 = icmp ugt i64 %204, %indvars.iv.next174
  br i1 %205, label %.lr.ph124, label %._crit_edge125, !llvm.loop !21

206:                                              ; preds = %.lr.ph124
  %207 = landingpad { ptr, i32 }
          cleanup
  br label %209

208:                                              ; preds = %._crit_edge125
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %.loopexit

209:                                              ; preds = %206, %200, %194
  %.pn = phi { ptr, i32 } [ %195, %194 ], [ %207, %206 ], [ %201, %200 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %213

210:                                              ; preds = %176, %183
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %211 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  %212 = icmp ugt i64 %211, %indvars.iv.next160
  %indvars.iv.next166 = add nuw i32 %indvars.iv165, 1
  br i1 %212, label %.lr.ph121, label %.loopexit, !llvm.loop !22

213:                                              ; preds = %209, %189
  %.pn.pn = phi { ptr, i32 } [ %.pn, %209 ], [ %190, %189 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %240

.loopexit:                                        ; preds = %210, %.preheader89, %208, %.lr.ph128
  %214 = load i32, ptr %12, align 4, !tbaa !8
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %12, align 4, !tbaa !8
  %216 = load i32, ptr @n, align 4, !tbaa !8
  %217 = icmp slt i32 %215, %216
  br i1 %217, label %.lr.ph128, label %._crit_edge129, !llvm.loop !23

218:                                              ; preds = %._crit_edge129
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %220 unwind label %225

220:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %221 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %221, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %222 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %222, ptr %15, align 8
  %223 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br i1 %223, label %.lr.ph131, label %._crit_edge132

._crit_edge132:                                   ; preds = %233, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %239 unwind label %225

225:                                              ; preds = %._crit_edge132, %218, %._crit_edge129
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %240

.lr.ph131:                                        ; preds = %220, %233
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %228 = load i32, ptr %227, align 4, !tbaa !8
  %229 = add nsw i32 %228, 1
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %229)
          to label %231 unwind label %237

231:                                              ; preds = %.lr.ph131
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %230, i8 noundef signext 32)
          to label %233 unwind label %237

233:                                              ; preds = %231
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %235 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #8
  store ptr %235, ptr %15, align 8
  %236 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br i1 %236, label %.lr.ph131, label %._crit_edge132, !llvm.loop !24

237:                                              ; preds = %231, %.lr.ph131
  %238 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %240

239:                                              ; preds = %._crit_edge132
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  ret i32 0

240:                                              ; preds = %237, %225, %213, %158
  %.pn84.pn.pn = phi { ptr, i32 } [ %.pn84.pn, %158 ], [ %.pn.pn, %213 ], [ %238, %237 ], [ %226, %225 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %241

241:                                              ; preds = %240, %101
  %.pn84.pn.pn.pn = phi { ptr, i32 } [ %.pn84.pn.pn, %240 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn84.pn.pn.pn
}

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

; 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 #5

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #7

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #6

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 #4 = { 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 #5 = { "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 "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 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}


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