; LLVM IR from xirc/cp-algorithm :: atcoder/abc137/E/main.ll (Z5solvev)

; 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<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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.__gnu_cxx::__normal_iterator.14" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.17" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%struct.edge = type { i32, i32, i32 }

@N = external dso_local global i32, align 4
@edges = external dso_local global %"class.std::vector", align 8
@G = external dso_local global %"class.std::vector.0", align 8
@H = external dso_local global %"class.std::vector.0", align 8
@from = external dso_local global %"class.std::vector.5", align 8
@to = external dso_local global %"class.std::vector.5", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dfs_fromi(i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dfs_toi(i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector.9", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.9", align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::vector.15", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::allocator.17", align 1
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"struct.std::_Bit_reference", align 8
  %26 = alloca %"struct.std::_Bit_reference", align 8
  %27 = alloca %"struct.std::_Bit_reference", align 8
  %28 = alloca %"struct.std::_Bit_reference", align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = sub nsw i32 %32, 1
  store i32 %33, ptr %3, align 4, !tbaa !5
  %34 = load i32, ptr @N, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %35, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %36 unwind label %51

36:                                               ; preds = %0
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  %37 = load i32, ptr @N, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @H, i64 noundef %38, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %39 unwind label %55

39:                                               ; preds = %36
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  %40 = load i32, ptr @N, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 0, ptr %8, align 1, !tbaa !9
  call void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %42 = load i32, ptr @N, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr @edges, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %44 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %11, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %46 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %12, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  br label %48

48:                                               ; preds = %75, %39
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %49, label %59, label %50

50:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %77

51:                                               ; preds = %0
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  br label %268

55:                                               ; preds = %36
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %5, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %6, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %268

59:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %60 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  store ptr %60, ptr %13, align 8, !tbaa !11
  %61 = load ptr, ptr %13, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.edge, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %64) #5
  %66 = load ptr, ptr %13, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.edge, ptr %66, i32 0, i32 1
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %68 = load ptr, ptr %13, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.edge, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !15
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @H, i64 noundef %71) #5
  %73 = load ptr, ptr %13, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.edge, ptr %73, i32 0, i32 0
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 4 dereferenceable(4) %74)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %75

75:                                               ; preds = %59
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %48

77:                                               ; preds = %50
  call void @_Z8dfs_fromi(i32 noundef 0)
  %78 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z6dfs_toi(i32 noundef %78)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 1000000000000000000, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %79 = load i32, ptr @N, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 -1000000000000000000, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %80, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %81 unwind label %88

81:                                               ; preds = %77
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  store i8 0, ptr %18, align 1, !tbaa !9
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0) #5
  store i64 0, ptr %82, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %239, %81
  %84 = load i32, ptr %19, align 4, !tbaa !5
  %85 = load i32, ptr @N, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %92, label %87

87:                                               ; preds = %83
  store i32 4, ptr %20, align 4
  br label %242

88:                                               ; preds = %77
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %5, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %267

92:                                               ; preds = %83
  store i8 0, ptr %18, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store ptr @edges, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %93 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %22, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %95 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %23, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  br label %97

97:                                               ; preds = %231, %92
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  store i32 7, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %234

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %101 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  store ptr %101, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %102 = load ptr, ptr %24, align 8, !tbaa !11
  %103 = getelementptr inbounds %struct.edge, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 4, !tbaa !13
  %105 = sext i32 %104 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %106 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %105)
          to label %107 unwind label %129

107:                                              ; preds = %100
  %108 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %109 = extractvalue { ptr, i64 } %106, 0
  store ptr %109, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %111 = extractvalue { ptr, i64 } %106, 1
  store i64 %111, ptr %110, align 8
  %112 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  br i1 %112, label %113, label %126

113:                                              ; preds = %107
  %114 = load ptr, ptr %24, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.edge, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 4, !tbaa !15
  %117 = sext i32 %116 to i64
  %118 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %117)
          to label %119 unwind label %133

119:                                              ; preds = %113
  %120 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %121 = extractvalue { ptr, i64 } %118, 0
  store ptr %121, ptr %120, align 8
  %122 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %123 = extractvalue { ptr, i64 } %118, 1
  store i64 %123, ptr %122, align 8
  %124 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  %125 = xor i1 %124, true
  br label %126

126:                                              ; preds = %119, %107
  %127 = phi i1 [ true, %107 ], [ %125, %119 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br i1 %127, label %128, label %138

128:                                              ; preds = %126
  store i32 8, ptr %20, align 4
  br label %228

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

133:                                              ; preds = %113
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %5, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %233

138:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %139 = load ptr, ptr %24, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct.edge, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 4, !tbaa !13
  %142 = sext i32 %141 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %143 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %142)
          to label %144 unwind label %166

144:                                              ; preds = %138
  %145 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %146 = extractvalue { ptr, i64 } %143, 0
  store ptr %146, ptr %145, align 8
  %147 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %148 = extractvalue { ptr, i64 } %143, 1
  store i64 %148, ptr %147, align 8
  %149 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  br i1 %149, label %150, label %163

150:                                              ; preds = %144
  %151 = load ptr, ptr %24, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.edge, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !15
  %154 = sext i32 %153 to i64
  %155 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %154)
          to label %156 unwind label %170

156:                                              ; preds = %150
  %157 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 0
  %158 = extractvalue { ptr, i64 } %155, 0
  store ptr %158, ptr %157, align 8
  %159 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 1
  %160 = extractvalue { ptr, i64 } %155, 1
  store i64 %160, ptr %159, align 8
  %161 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %28) #5
  %162 = xor i1 %161, true
  br label %163

163:                                              ; preds = %156, %144
  %164 = phi i1 [ true, %144 ], [ %162, %156 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  br i1 %164, label %165, label %175

165:                                              ; preds = %163
  store i32 8, ptr %20, align 4
  br label %228

166:                                              ; preds = %138
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %5, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %6, align 4
  br label %174

170:                                              ; preds = %150
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %5, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br label %174

174:                                              ; preds = %170, %166
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  br label %233

175:                                              ; preds = %163
  %176 = load ptr, ptr %24, align 8, !tbaa !11
  %177 = getelementptr inbounds %struct.edge, ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !13
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %179) #5
  %181 = load i64, ptr %180, align 8, !tbaa !16
  %182 = icmp eq i64 %181, -1000000000000000000
  br i1 %182, label %183, label %184

183:                                              ; preds = %175
  store i32 8, ptr %20, align 4
  br label %228

184:                                              ; preds = %175
  %185 = load ptr, ptr %24, align 8, !tbaa !11
  %186 = getelementptr inbounds %struct.edge, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !15
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %188) #5
  %190 = load i64, ptr %189, align 8, !tbaa !16
  %191 = load ptr, ptr %24, align 8, !tbaa !11
  %192 = getelementptr inbounds %struct.edge, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !13
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %194) #5
  %196 = load i64, ptr %195, align 8, !tbaa !16
  %197 = load ptr, ptr %24, align 8, !tbaa !11
  %198 = getelementptr inbounds %struct.edge, ptr %197, i32 0, i32 2
  %199 = load i32, ptr %198, align 4, !tbaa !18
  %200 = sext i32 %199 to i64
  %201 = add nsw i64 %196, %200
  %202 = icmp slt i64 %190, %201
  br i1 %202, label %203, label %227

203:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store i64 -1000000000000000000, ptr %29, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %204 = load ptr, ptr %24, align 8, !tbaa !11
  %205 = getelementptr inbounds %struct.edge, ptr %204, i32 0, i32 0
  %206 = load i32, ptr %205, align 4, !tbaa !13
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %207) #5
  %209 = load i64, ptr %208, align 8, !tbaa !16
  %210 = load ptr, ptr %24, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.edge, ptr %210, i32 0, i32 2
  %212 = load i32, ptr %211, align 4, !tbaa !18
  %213 = sext i32 %212 to i64
  %214 = add nsw i64 %209, %213
  store i64 %214, ptr %30, align 8, !tbaa !16
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %216 unwind label %223

216:                                              ; preds = %203
  %217 = load i64, ptr %215, align 8, !tbaa !16
  %218 = load ptr, ptr %24, align 8, !tbaa !11
  %219 = getelementptr inbounds %struct.edge, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !15
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %221) #5
  store i64 %217, ptr %222, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %227

223:                                              ; preds = %203
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %5, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %233

227:                                              ; preds = %216, %184
  store i32 0, ptr %20, align 4
  br label %228

228:                                              ; preds = %227, %183, %165, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %229 = load i32, ptr %20, align 4
  switch i32 %229, label %274 [
    i32 0, label %230
    i32 8, label %231
  ]

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230, %228
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  br label %97

233:                                              ; preds = %223, %174, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %266

234:                                              ; preds = %99
  %235 = load i8, ptr %18, align 1, !tbaa !9, !range !19, !noundef !20
  %236 = trunc i8 %235 to i1
  br i1 %236, label %238, label %237

237:                                              ; preds = %234
  store i32 4, ptr %20, align 4
  br label %242

238:                                              ; preds = %234
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %19, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %19, align 4, !tbaa !5
  br label %83, !llvm.loop !21

242:                                              ; preds = %237, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %243

243:                                              ; preds = %242
  %244 = load i8, ptr %18, align 1, !tbaa !9, !range !19, !noundef !20
  %245 = trunc i8 %244 to i1
  br i1 %245, label %252, label %246

246:                                              ; preds = %243
  %247 = load i32, ptr %3, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %248) #5
  %250 = load i64, ptr %249, align 8, !tbaa !16
  %251 = icmp eq i64 %250, -1000000000000000000
  br i1 %251, label %252, label %253

252:                                              ; preds = %246, %243
  store i64 -1, ptr %1, align 8
  store i32 1, ptr %20, align 4
  br label %264

253:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store i64 0, ptr %31, align 8, !tbaa !16
  %254 = load i32, ptr %3, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %255) #5
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %256)
          to label %258 unwind label %260

258:                                              ; preds = %253
  %259 = load i64, ptr %257, align 8, !tbaa !16
  store i64 %259, ptr %1, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  store i32 1, ptr %20, align 4
  br label %264

260:                                              ; preds = %253
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %5, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %266

264:                                              ; preds = %258, %252
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %265 = load i64, ptr %1, align 8
  ret i64 %265

266:                                              ; preds = %260, %233
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %267

267:                                              ; preds = %266, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %268

268:                                              ; preds = %267, %55, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr %5, align 8
  %271 = load i32, ptr %6, align 4
  %272 = insertvalue { ptr, i32 } poison, ptr %270, 0
  %273 = insertvalue { ptr, i32 } %272, i32 %271, 1
  resume { ptr, i32 } %273

274:                                              ; preds = %228
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #0 align 2

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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.__gnu_cxx::__normal_iterator.14" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.17" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@N = external dso_local local_unnamed_addr global i32, align 4
@edges = external dso_local global %"class.std::vector", align 8
@G = external dso_local global %"class.std::vector.0", align 8
@H = external dso_local global %"class.std::vector.0", align 8
@from = external dso_local global %"class.std::vector.5", align 8
@to = external dso_local global %"class.std::vector.5", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dfs_fromi(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dfs_toi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.9", align 8
  %2 = alloca %"class.std::vector.9", align 8
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %7 = alloca %"class.std::vector.15", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::allocator.17", align 1
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = load i32, ptr @N, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  %21 = sext i32 %19 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %21, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %22 unwind label %35

22:                                               ; preds = %0
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  %23 = load i32, ptr @N, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @H, i64 noundef %24, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %25 unwind label %37

25:                                               ; preds = %22
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  %26 = load i32, ptr @N, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %30 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %30, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %31 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %31, ptr %6, align 8
  %32 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @_Z8dfs_fromi(i32 noundef 0)
  call void @_Z6dfs_toi(i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %33 = load i32, ptr @N, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 -1000000000000000000, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %49 unwind label %61

35:                                               ; preds = %0
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  br label %159

37:                                               ; preds = %22
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  br label %159

.lr.ph:                                           ; preds = %25, %.lr.ph
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %41) #5
  %43 = getelementptr inbounds i8, ptr %39, i64 4
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %44 = load i32, ptr %43, align 4, !tbaa !15
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @H, i64 noundef %45) #5
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %48 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %48, label %.lr.ph, label %._crit_edge

49:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #5
  store i64 0, ptr %50, align 8, !tbaa !11
  %51 = load i32, ptr @N, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph54, label %._crit_edge55.thread

.lr.ph54:                                         ; preds = %49
  %53 = getelementptr inbounds i8, ptr %12, i64 8
  %54 = getelementptr inbounds i8, ptr %13, i64 8
  %55 = getelementptr inbounds i8, ptr %14, i64 8
  %56 = getelementptr inbounds i8, ptr %15, i64 8
  br label %63

57:                                               ; preds = %._crit_edge51
  %58 = add nuw nsw i32 %.02752, 1
  %59 = load i32, ptr @N, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %63, label %._crit_edge55, !llvm.loop !16

61:                                               ; preds = %._crit_edge
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %158

63:                                               ; preds = %.lr.ph54, %57
  %.02752 = phi i32 [ 0, %.lr.ph54 ], [ %58, %57 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %64 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %64, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %65 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %65, ptr %11, align 8
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %66, label %.lr.ph50, label %._crit_edge55.thread62

._crit_edge55.thread62:                           ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %._crit_edge55.thread

._crit_edge51:                                    ; preds = %144
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %67 = trunc nuw i8 %.331 to i1
  br i1 %67, label %57, label %._crit_edge55

.lr.ph50:                                         ; preds = %63, %144
  %.12948 = phi i8 [ %.331, %144 ], [ 0, %63 ]
  %68 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %69 = load i32, ptr %68, align 4, !tbaa !13
  %70 = sext i32 %69 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %71 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %70)
          to label %72 unwind label %85

72:                                               ; preds = %.lr.ph50
  %73 = extractvalue { ptr, i64 } %71, 0
  store ptr %73, ptr %12, align 8
  %74 = extractvalue { ptr, i64 } %71, 1
  store i64 %74, ptr %53, align 8
  %75 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  br i1 %75, label %76, label %.critedge

76:                                               ; preds = %72
  %77 = getelementptr inbounds i8, ptr %68, i64 4
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = sext i32 %78 to i64
  %80 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @from, i64 noundef %79)
          to label %81 unwind label %87

81:                                               ; preds = %76
  %82 = extractvalue { ptr, i64 } %80, 0
  store ptr %82, ptr %13, align 8
  %83 = extractvalue { ptr, i64 } %80, 1
  store i64 %83, ptr %54, align 8
  %84 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br i1 %84, label %90, label %144

.critedge:                                        ; preds = %72
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %144

85:                                               ; preds = %.lr.ph50
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %89

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

89:                                               ; preds = %87, %85
  %.pn = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %147

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %91 = load i32, ptr %68, align 4, !tbaa !13
  %92 = sext i32 %91 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  %93 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %92)
          to label %94 unwind label %106

94:                                               ; preds = %90
  %95 = extractvalue { ptr, i64 } %93, 0
  store ptr %95, ptr %14, align 8
  %96 = extractvalue { ptr, i64 } %93, 1
  store i64 %96, ptr %55, align 8
  %97 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br i1 %97, label %98, label %.critedge2

98:                                               ; preds = %94
  %99 = load i32, ptr %77, align 4, !tbaa !15
  %100 = sext i32 %99 to i64
  %101 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) @to, i64 noundef %100)
          to label %102 unwind label %108

102:                                              ; preds = %98
  %103 = extractvalue { ptr, i64 } %101, 0
  store ptr %103, ptr %15, align 8
  %104 = extractvalue { ptr, i64 } %101, 1
  store i64 %104, ptr %56, align 8
  %105 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br i1 %105, label %111, label %144

.critedge2:                                       ; preds = %94
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %144

106:                                              ; preds = %90
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %110

108:                                              ; preds = %98
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %110

110:                                              ; preds = %108, %106
  %.pn39 = phi { ptr, i32 } [ %109, %108 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %147

111:                                              ; preds = %102
  %112 = load i32, ptr %68, align 4, !tbaa !13
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %113) #5
  %115 = load i64, ptr %114, align 8, !tbaa !11
  %116 = icmp eq i64 %115, -1000000000000000000
  br i1 %116, label %144, label %117

117:                                              ; preds = %111
  %118 = load i32, ptr %77, align 4, !tbaa !15
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %119) #5
  %121 = load i64, ptr %120, align 8, !tbaa !11
  %122 = load i32, ptr %68, align 4, !tbaa !13
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %123) #5
  %125 = load i64, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds i8, ptr %68, i64 8
  %127 = load i32, ptr %126, align 4, !tbaa !18
  %128 = sext i32 %127 to i64
  %129 = add nsw i64 %125, %128
  %130 = icmp slt i64 %121, %129
  br i1 %130, label %131, label %144

131:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  store i64 -1000000000000000000, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  %132 = load i32, ptr %68, align 4, !tbaa !13
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %133) #5
  %135 = load i64, ptr %134, align 8, !tbaa !11
  %136 = load i32, ptr %126, align 4, !tbaa !18
  %137 = sext i32 %136 to i64
  %138 = add nsw i64 %135, %137
  store i64 %138, ptr %17, align 8, !tbaa !11
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = load i32, ptr %77, align 4, !tbaa !15
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %142) #5
  store i64 %140, ptr %143, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %144

144:                                              ; preds = %117, %131, %111, %102, %.critedge2, %81, %.critedge
  %.331 = phi i8 [ %.12948, %.critedge ], [ %.12948, %81 ], [ %.12948, %.critedge2 ], [ %.12948, %102 ], [ %.12948, %111 ], [ 1, %131 ], [ %.12948, %117 ]
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %146 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %146, label %.lr.ph50, label %._crit_edge51

147:                                              ; preds = %110, %89
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %110 ], [ %.pn, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %158

._crit_edge55:                                    ; preds = %57, %._crit_edge51
  %148 = trunc nuw i8 %.331 to i1
  br i1 %148, label %157, label %._crit_edge55.thread

._crit_edge55.thread:                             ; preds = %49, %._crit_edge55.thread62, %._crit_edge55
  %149 = sext i32 %20 to i64
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %149) #5
  %151 = load i64, ptr %150, align 8, !tbaa !11
  %152 = icmp eq i64 %151, -1000000000000000000
  br i1 %152, label %157, label %153

153:                                              ; preds = %._crit_edge55.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  store i64 0, ptr %18, align 8, !tbaa !11
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %149) #5
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %154)
  %156 = load i64, ptr %155, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %157

157:                                              ; preds = %._crit_edge55, %._crit_edge55.thread, %153
  %.0 = phi i64 [ %156, %153 ], [ -1, %._crit_edge55.thread ], [ -1, %._crit_edge55 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  ret i64 %.0

158:                                              ; preds = %147, %61
  %.pn39.pn.pn = phi { ptr, i32 } [ %.pn39.pn, %147 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %159

159:                                              ; preds = %158, %37, %35
  %.pn39.pn.pn.pn = phi { ptr, i32 } [ %.pn39.pn.pn, %158 ], [ %38, %37 ], [ %36, %35 ]
  resume { ptr, i32 } %.pn39.pn.pn.pn
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6assignEmRKb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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


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