; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/372 Division 1/Problem B (B)

; 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<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.12" }
%"class.std::_Rb_tree.12" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.16" = type { %"class.std::_Rb_tree.17" }
%"class.std::_Rb_tree.17" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::basic_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"struct.std::pair.5" = type { i64, %"struct.std::pair.3" }
%"struct.std::pair.3" = type { i64, i64 }
%"struct.std::pair.31" = type { %"struct.std::pair.3", %"struct.std::pair.3" }

@g = external dso_local global [1010 x %"class.std::vector"], align 16
@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@erased = external dso_local global [10100 x i8], align 16
@len1 = external dso_local global [1010 x i64], align 16
@len2 = external dso_local global [1010 x i64], align 16
@cost = external dso_local global [10100 x i64], align 16
@edges = external dso_local global %"class.std::vector.7", align 8
@ids = external dso_local global %"class.std::map", align 8
@onpath = external dso_local global %"class.std::set.16", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL3INF = external hidden constant i64, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3sp2xxx(i64 noundef, i64 noundef, i64 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2spxxx(i64 noundef, i64 noundef, i64 noundef) #0

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

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

48:                                               ; preds = %100, %0
  %49 = load i64, ptr %5, align 8, !tbaa !8
  %50 = load i64, ptr @m, align 8, !tbaa !8
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %103

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %57 = load i64, ptr %6, align 8, !tbaa !8
  %58 = getelementptr inbounds [1010 x %"class.std::vector"], ptr @g, i64 0, i64 %57
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %59 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %60 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %61 = extractvalue { i64, i64 } %59, 0
  store i64 %61, ptr %60, align 8
  %62 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %63 = extractvalue { i64, i64 } %59, 1
  store i64 %63, ptr %62, align 8
  call void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.5") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @_ZNSt6vectorISt4pairIxS0_IxxEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  %64 = load i64, ptr %7, align 8, !tbaa !8
  %65 = getelementptr inbounds [1010 x %"class.std::vector"], ptr @g, i64 0, i64 %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %66 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %67 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %68 = extractvalue { i64, i64 } %66, 0
  store i64 %68, ptr %67, align 8
  %69 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %70 = extractvalue { i64, i64 } %66, 1
  store i64 %70, ptr %69, align 8
  call void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.5") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @_ZNSt6vectorISt4pairIxS0_IxxEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  %71 = load i64, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %72 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %73 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %74 = extractvalue { i64, i64 } %72, 0
  store i64 %74, ptr %73, align 8
  %75 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %76 = extractvalue { i64, i64 } %72, 1
  store i64 %76, ptr %75, align 8
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ids, ptr noundef nonnull align 8 dereferenceable(16) %13)
  store i64 %71, ptr %77, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  %78 = load i64, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %79 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %80 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %81 = extractvalue { i64, i64 } %79, 0
  store i64 %81, ptr %80, align 8
  %82 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %83 = extractvalue { i64, i64 } %79, 1
  store i64 %83, ptr %82, align 8
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ids, ptr noundef nonnull align 8 dereferenceable(16) %14)
  store i64 %78, ptr %84, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  %85 = load i64, ptr %8, align 8, !tbaa !8
  %86 = icmp eq i64 %85, 0
  %87 = load i64, ptr %5, align 8, !tbaa !8
  %88 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %87
  %89 = zext i1 %86 to i8
  store i8 %89, ptr %88, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %90 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %91 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %92 = extractvalue { i64, i64 } %90, 0
  store i64 %92, ptr %91, align 8
  %93 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %94 = extractvalue { i64, i64 } %90, 1
  store i64 %94, ptr %93, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %95 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %96 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %97 = extractvalue { i64, i64 } %95, 0
  store i64 %97, ptr %96, align 8
  %98 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %99 = extractvalue { i64, i64 } %95, 1
  store i64 %99, ptr %98, align 8
  call void @_ZSt9make_pairISt4pairIxxES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr dead_on_unwind writable sret(%"struct.std::pair.31") align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @edges, ptr noundef nonnull align 8 dereferenceable(32) %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %100

100:                                              ; preds = %53
  %101 = load i64, ptr %5, align 8, !tbaa !8
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %5, align 8, !tbaa !8
  br label %48, !llvm.loop !13

103:                                              ; preds = %52
  %104 = load i64, ptr %3, align 8, !tbaa !8
  call void @_Z3sp1xPx(i64 noundef %104, ptr noundef @len1)
  %105 = load i64, ptr %4, align 8, !tbaa !8
  %106 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = load i64, ptr %2, align 8, !tbaa !8
  %109 = icmp slt i64 %107, %108
  br i1 %109, label %110, label %113

110:                                              ; preds = %103
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  br label %322

113:                                              ; preds = %103
  %114 = load i64, ptr %4, align 8, !tbaa !8
  %115 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !8
  %117 = load i64, ptr %2, align 8, !tbaa !8
  %118 = icmp eq i64 %116, %117
  br i1 %118, label %119, label %163

119:                                              ; preds = %113
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !8
  br label %122

122:                                              ; preds = %159, %119
  %123 = load i64, ptr %19, align 8, !tbaa !8
  %124 = load i64, ptr @m, align 8, !tbaa !8
  %125 = icmp slt i64 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %162

127:                                              ; preds = %122
  %128 = load i64, ptr %19, align 8, !tbaa !8
  %129 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !11, !range !15, !noundef !16
  %131 = trunc i8 %130 to i1
  br i1 %131, label %132, label %137

132:                                              ; preds = %127
  %133 = load i64, ptr %19, align 8, !tbaa !8
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %133) #7
  %135 = getelementptr inbounds %"struct.std::pair.31", ptr %134, i32 0, i32 1
  %136 = getelementptr inbounds %"struct.std::pair.3", ptr %135, i32 0, i32 0
  store i64 10000000000000, ptr %136, align 8, !tbaa !17
  br label %137

137:                                              ; preds = %132, %127
  %138 = load i64, ptr %19, align 8, !tbaa !8
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %138) #7
  %140 = getelementptr inbounds %"struct.std::pair.31", ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %"struct.std::pair.3", ptr %140, i32 0, i32 0
  %142 = load i64, ptr %141, align 8, !tbaa !20
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %142)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %143, i8 noundef signext 32)
  %145 = load i64, ptr %19, align 8, !tbaa !8
  %146 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %145) #7
  %147 = getelementptr inbounds %"struct.std::pair.31", ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %"struct.std::pair.3", ptr %147, i32 0, i32 1
  %149 = load i64, ptr %148, align 8, !tbaa !21
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %144, i64 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %150, i8 noundef signext 32)
  %152 = load i64, ptr %19, align 8, !tbaa !8
  %153 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %152) #7
  %154 = getelementptr inbounds %"struct.std::pair.31", ptr %153, i32 0, i32 1
  %155 = getelementptr inbounds %"struct.std::pair.3", ptr %154, i32 0, i32 0
  %156 = load i64, ptr %155, align 8, !tbaa !17
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %151, i64 noundef %156)
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %157, i8 noundef signext 10)
  br label %159

159:                                              ; preds = %137
  %160 = load i64, ptr %19, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %19, align 8, !tbaa !8
  br label %122, !llvm.loop !22

162:                                              ; preds = %126
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  br label %322

163:                                              ; preds = %113
  br label %164

164:                                              ; preds = %163
  %165 = load i64, ptr %4, align 8, !tbaa !8
  call void @_Z3sp1xPx(i64 noundef %165, ptr noundef @len2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %166

166:                                              ; preds = %233, %164
  %167 = load i64, ptr %20, align 8, !tbaa !8
  %168 = load i64, ptr @m, align 8, !tbaa !8
  %169 = icmp slt i64 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %236

171:                                              ; preds = %166
  %172 = load i64, ptr %20, align 8, !tbaa !8
  %173 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %172
  %174 = load i8, ptr %173, align 1, !tbaa !11, !range !15, !noundef !16
  %175 = trunc i8 %174 to i1
  br i1 %175, label %177, label %176

176:                                              ; preds = %171
  br label %233

177:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %178 = load i64, ptr %20, align 8, !tbaa !8
  %179 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %178) #7
  %180 = getelementptr inbounds %"struct.std::pair.31", ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds %"struct.std::pair.3", ptr %180, i32 0, i32 0
  %182 = load i64, ptr %181, align 8, !tbaa !20
  store i64 %182, ptr %21, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %183 = load i64, ptr %20, align 8, !tbaa !8
  %184 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %183) #7
  %185 = getelementptr inbounds %"struct.std::pair.31", ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds %"struct.std::pair.3", ptr %185, i32 0, i32 1
  %187 = load i64, ptr %186, align 8, !tbaa !21
  store i64 %187, ptr %22, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %188 = load i64, ptr %20, align 8, !tbaa !8
  %189 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %188) #7
  %190 = getelementptr inbounds %"struct.std::pair.31", ptr %189, i32 0, i32 1
  %191 = getelementptr inbounds %"struct.std::pair.3", ptr %190, i32 0, i32 1
  %192 = load i64, ptr %191, align 8, !tbaa !23
  store i64 %192, ptr %23, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %193 = load i64, ptr %21, align 8, !tbaa !8
  %194 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !8
  %196 = load i64, ptr %22, align 8, !tbaa !8
  %197 = getelementptr inbounds [1010 x i64], ptr @len2, i64 0, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !8
  %199 = add nsw i64 %195, %198
  store i64 %199, ptr %24, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %200 = load i64, ptr %22, align 8, !tbaa !8
  %201 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !8
  %203 = load i64, ptr %21, align 8, !tbaa !8
  %204 = getelementptr inbounds [1010 x i64], ptr @len2, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !8
  %206 = add nsw i64 %202, %205
  store i64 %206, ptr %25, align 8, !tbaa !8
  %207 = load i64, ptr %24, align 8, !tbaa !8
  %208 = load i64, ptr %25, align 8, !tbaa !8
  %209 = icmp sle i64 %207, %208
  br i1 %209, label %210, label %218

210:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %211 = load i64, ptr %2, align 8, !tbaa !8
  %212 = load i64, ptr %24, align 8, !tbaa !8
  %213 = sub nsw i64 %211, %212
  store i64 %213, ptr %26, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store i64 1, ptr %27, align 8, !tbaa !8
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %215 = load i64, ptr %214, align 8, !tbaa !8
  %216 = load i64, ptr %23, align 8, !tbaa !8
  %217 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %216
  store i64 %215, ptr %217, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %226

218:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %219 = load i64, ptr %2, align 8, !tbaa !8
  %220 = load i64, ptr %25, align 8, !tbaa !8
  %221 = sub nsw i64 %219, %220
  store i64 %221, ptr %28, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store i64 1, ptr %29, align 8, !tbaa !8
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %223 = load i64, ptr %222, align 8, !tbaa !8
  %224 = load i64, ptr %23, align 8, !tbaa !8
  %225 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %224
  store i64 %223, ptr %225, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %226

226:                                              ; preds = %218, %210
  %227 = load i64, ptr %23, align 8, !tbaa !8
  %228 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %227
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef nonnull align 8 dereferenceable(8) @_ZL3INF)
  %230 = load i64, ptr %229, align 8, !tbaa !8
  %231 = load i64, ptr %23, align 8, !tbaa !8
  %232 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %231
  store i64 %230, ptr %232, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %233

233:                                              ; preds = %226, %176
  %234 = load i64, ptr %20, align 8, !tbaa !8
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %20, align 8, !tbaa !8
  br label %166, !llvm.loop !24

236:                                              ; preds = %170
  %237 = load i64, ptr %3, align 8, !tbaa !8
  %238 = load i64, ptr %4, align 8, !tbaa !8
  %239 = load i64, ptr %2, align 8, !tbaa !8
  call void @_Z3sp2xxx(i64 noundef %237, i64 noundef %238, i64 noundef %239)
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %241 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %240, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  store i64 0, ptr %30, align 8, !tbaa !8
  br label %242

242:                                              ; preds = %284, %236
  %243 = load i64, ptr %30, align 8, !tbaa !8
  %244 = load i64, ptr @m, align 8, !tbaa !8
  %245 = icmp slt i64 %243, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %242
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %287

247:                                              ; preds = %242
  %248 = load i64, ptr %30, align 8, !tbaa !8
  %249 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %248
  %250 = load i8, ptr %249, align 1, !tbaa !11, !range !15, !noundef !16
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %283

252:                                              ; preds = %247
  %253 = load i64, ptr %30, align 8, !tbaa !8
  %254 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %253) #7
  %255 = getelementptr inbounds %"struct.std::pair.31", ptr %254, i32 0, i32 1
  %256 = getelementptr inbounds %"struct.std::pair.3", ptr %255, i32 0, i32 1
  %257 = load i64, ptr %256, align 8, !tbaa !23
  %258 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %257
  %259 = load i64, ptr %258, align 8, !tbaa !8
  %260 = load i64, ptr %30, align 8, !tbaa !8
  %261 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %260) #7
  %262 = getelementptr inbounds %"struct.std::pair.31", ptr %261, i32 0, i32 1
  %263 = getelementptr inbounds %"struct.std::pair.3", ptr %262, i32 0, i32 0
  store i64 %259, ptr %263, align 8, !tbaa !17
  %264 = load i64, ptr %30, align 8, !tbaa !8
  %265 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %264) #7
  %266 = getelementptr inbounds %"struct.std::pair.31", ptr %265, i32 0, i32 1
  %267 = getelementptr inbounds %"struct.std::pair.3", ptr %266, i32 0, i32 1
  %268 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(48) @onpath, ptr noundef nonnull align 8 dereferenceable(8) %267)
  %269 = icmp ne i64 %268, 0
  br i1 %269, label %275, label %270

270:                                              ; preds = %252
  %271 = load i64, ptr %30, align 8, !tbaa !8
  %272 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %271) #7
  %273 = getelementptr inbounds %"struct.std::pair.31", ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %"struct.std::pair.3", ptr %273, i32 0, i32 0
  store i64 10000000000000, ptr %274, align 8, !tbaa !17
  br label %275

275:                                              ; preds = %270, %252
  %276 = load i64, ptr %30, align 8, !tbaa !8
  %277 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %276) #7
  %278 = getelementptr inbounds %"struct.std::pair.31", ptr %277, i32 0, i32 1
  %279 = getelementptr inbounds %"struct.std::pair.3", ptr %278, i32 0, i32 0
  %280 = load i64, ptr %279, align 8, !tbaa !17
  %281 = load i64, ptr %30, align 8, !tbaa !8
  %282 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %281
  store i64 %280, ptr %282, align 8, !tbaa !8
  br label %283

283:                                              ; preds = %275, %247
  br label %284

284:                                              ; preds = %283
  %285 = load i64, ptr %30, align 8, !tbaa !8
  %286 = add nsw i64 %285, 1
  store i64 %286, ptr %30, align 8, !tbaa !8
  br label %242, !llvm.loop !25

287:                                              ; preds = %246
  %288 = load i64, ptr %3, align 8, !tbaa !8
  %289 = load i64, ptr %4, align 8, !tbaa !8
  %290 = load i64, ptr %2, align 8, !tbaa !8
  call void @_Z2spxxx(i64 noundef %288, i64 noundef %289, i64 noundef %290)
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store i64 0, ptr %31, align 8, !tbaa !8
  br label %291

291:                                              ; preds = %318, %287
  %292 = load i64, ptr %31, align 8, !tbaa !8
  %293 = load i64, ptr @m, align 8, !tbaa !8
  %294 = icmp slt i64 %292, %293
  br i1 %294, label %296, label %295

295:                                              ; preds = %291
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %321

296:                                              ; preds = %291
  %297 = load i64, ptr %31, align 8, !tbaa !8
  %298 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %297) #7
  %299 = getelementptr inbounds %"struct.std::pair.31", ptr %298, i32 0, i32 0
  %300 = getelementptr inbounds %"struct.std::pair.3", ptr %299, i32 0, i32 0
  %301 = load i64, ptr %300, align 8, !tbaa !20
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %301)
  %303 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %302, i8 noundef signext 32)
  %304 = load i64, ptr %31, align 8, !tbaa !8
  %305 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %304) #7
  %306 = getelementptr inbounds %"struct.std::pair.31", ptr %305, i32 0, i32 0
  %307 = getelementptr inbounds %"struct.std::pair.3", ptr %306, i32 0, i32 1
  %308 = load i64, ptr %307, align 8, !tbaa !21
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %303, i64 noundef %308)
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %309, i8 noundef signext 32)
  %311 = load i64, ptr %31, align 8, !tbaa !8
  %312 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %311) #7
  %313 = getelementptr inbounds %"struct.std::pair.31", ptr %312, i32 0, i32 1
  %314 = getelementptr inbounds %"struct.std::pair.3", ptr %313, i32 0, i32 0
  %315 = load i64, ptr %314, align 8, !tbaa !17
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %310, i64 noundef %315)
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %316, i8 noundef signext 10)
  br label %318

318:                                              ; preds = %296
  %319 = load i64, ptr %31, align 8, !tbaa !8
  %320 = add nsw i64 %319, 1
  store i64 %320, ptr %31, align 8, !tbaa !8
  br label %291, !llvm.loop !26

321:                                              ; preds = %295
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  br label %322

322:                                              ; preds = %321, %162, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %323 = load i32, ptr %1, align 4
  ret i32 %323
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.5") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIxxES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.31") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #0 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 = { 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 #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


; 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<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, std::pair<long long, long long>>, std::allocator<std::pair<long long, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>, std::allocator<std::pair<std::pair<long long, long long>, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.12" }
%"class.std::_Rb_tree.12" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.16" = type { %"class.std::_Rb_tree.17" }
%"class.std::_Rb_tree.17" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::basic_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"struct.std::pair.5" = type { i64, %"struct.std::pair.3" }
%"struct.std::pair.3" = type { i64, i64 }
%"struct.std::pair.31" = type { %"struct.std::pair.3", %"struct.std::pair.3" }

@g = external dso_local global [1010 x %"class.std::vector"], align 16
@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@erased = external dso_local local_unnamed_addr global [10100 x i8], align 16
@len1 = external dso_local global [1010 x i64], align 16
@len2 = external dso_local global [1010 x i64], align 16
@cost = external dso_local global [10100 x i64], align 16
@edges = external dso_local global %"class.std::vector.7", align 8
@ids = external dso_local global %"class.std::map", align 8
@onpath = external dso_local global %"class.std::set.16", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL3INF = external hidden constant i64, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3sp2xxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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 #0 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)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2spxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair.5", align 8
  %9 = alloca %"struct.std::pair.3", align 8
  %10 = alloca %"struct.std::pair.5", align 8
  %11 = alloca %"struct.std::pair.3", align 8
  %12 = alloca %"struct.std::pair.3", align 8
  %13 = alloca %"struct.std::pair.3", align 8
  %14 = alloca %"struct.std::pair.31", align 8
  %15 = alloca %"struct.std::pair.3", align 8
  %16 = alloca %"struct.std::pair.3", align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %29
  %31 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %32 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %33 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  %37 = load i64, ptr @m, align 8, !tbaa !8
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %39 = getelementptr inbounds i8, ptr %9, i64 8
  %40 = getelementptr inbounds i8, ptr %11, i64 8
  %41 = getelementptr inbounds i8, ptr %12, i64 8
  %42 = getelementptr inbounds i8, ptr %13, i64 8
  %43 = getelementptr inbounds i8, ptr %15, i64 8
  %44 = getelementptr inbounds i8, ptr %16, i64 8
  br label %51

._crit_edge:                                      ; preds = %51, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %45 = load i64, ptr %2, align 8, !tbaa !8
  call void @_Z3sp1xPx(i64 noundef %45, ptr noundef nonnull @len1)
  %46 = load i64, ptr %3, align 8, !tbaa !8
  %47 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !8
  %49 = load i64, ptr %1, align 8, !tbaa !8
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %90, label %93

51:                                               ; preds = %.lr.ph, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %55 = load i64, ptr %5, align 8, !tbaa !8
  %56 = getelementptr inbounds [1010 x %"class.std::vector"], ptr @g, i64 0, i64 %55
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %57 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %58 = extractvalue { i64, i64 } %57, 0
  store i64 %58, ptr %9, align 8
  %59 = extractvalue { i64, i64 } %57, 1
  store i64 %59, ptr %39, align 8
  call void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.5") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @_ZNSt6vectorISt4pairIxS0_IxxEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  %60 = load i64, ptr %6, align 8, !tbaa !8
  %61 = getelementptr inbounds [1010 x %"class.std::vector"], ptr @g, i64 0, i64 %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  %62 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %63 = extractvalue { i64, i64 } %62, 0
  store i64 %63, ptr %11, align 8
  %64 = extractvalue { i64, i64 } %62, 1
  store i64 %64, ptr %40, align 8
  call void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.5") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @_ZNSt6vectorISt4pairIxS0_IxxEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  %65 = load i64, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %66 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %67 = extractvalue { i64, i64 } %66, 0
  store i64 %67, ptr %12, align 8
  %68 = extractvalue { i64, i64 } %66, 1
  store i64 %68, ptr %41, align 8
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ids, ptr noundef nonnull align 8 dereferenceable(16) %12)
  store i64 %65, ptr %69, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  %70 = load i64, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %71 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %72 = extractvalue { i64, i64 } %71, 0
  store i64 %72, ptr %13, align 8
  %73 = extractvalue { i64, i64 } %71, 1
  store i64 %73, ptr %42, align 8
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ids, ptr noundef nonnull align 8 dereferenceable(16) %13)
  store i64 %70, ptr %74, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %75 = load i64, ptr %7, align 8, !tbaa !8
  %76 = icmp eq i64 %75, 0
  %77 = load i64, ptr %4, align 8, !tbaa !8
  %78 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %77
  %79 = zext i1 %76 to i8
  store i8 %79, ptr %78, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  %80 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %81 = extractvalue { i64, i64 } %80, 0
  store i64 %81, ptr %15, align 8
  %82 = extractvalue { i64, i64 } %80, 1
  store i64 %82, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %83 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %84 = extractvalue { i64, i64 } %83, 0
  store i64 %84, ptr %16, align 8
  %85 = extractvalue { i64, i64 } %83, 1
  store i64 %85, ptr %44, align 8
  call void @_ZSt9make_pairISt4pairIxxES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.31") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16)
  call void @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @edges, ptr noundef nonnull align 8 dereferenceable(32) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %86 = load i64, ptr %4, align 8, !tbaa !8
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %4, align 8, !tbaa !8
  %88 = load i64, ptr @m, align 8, !tbaa !8
  %89 = icmp slt i64 %87, %88
  br i1 %89, label %51, label %._crit_edge, !llvm.loop !13

90:                                               ; preds = %._crit_edge
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

93:                                               ; preds = %._crit_edge
  %94 = icmp eq i64 %48, %49
  br i1 %94, label %95, label %124

95:                                               ; preds = %93
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %98 = load i64, ptr @m, align 8, !tbaa !8
  %99 = icmp sgt i64 %98, 0
  br i1 %99, label %.lr.ph63, label %.loopexit

.lr.ph63:                                         ; preds = %95, %106
  %.04261 = phi i64 [ %121, %106 ], [ 0, %95 ]
  %100 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %.04261
  %101 = load i8, ptr %100, align 1, !tbaa !11, !range !15, !noundef !16
  %102 = trunc nuw i8 %101 to i1
  br i1 %102, label %103, label %106

103:                                              ; preds = %.lr.ph63
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04261) #7
  %105 = getelementptr inbounds i8, ptr %104, i64 16
  store i64 10000000000000, ptr %105, align 8, !tbaa !17
  br label %106

106:                                              ; preds = %103, %.lr.ph63
  %107 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04261) #7
  %108 = load i64, ptr %107, align 8, !tbaa !20
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %108)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %109, i8 noundef signext 32)
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04261) #7
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %113 = load i64, ptr %112, align 8, !tbaa !21
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %110, i64 noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %114, i8 noundef signext 32)
  %116 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04261) #7
  %117 = getelementptr inbounds i8, ptr %116, i64 16
  %118 = load i64, ptr %117, align 8, !tbaa !17
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %115, i64 noundef %118)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %119, i8 noundef signext 10)
  %121 = add nuw nsw i64 %.04261, 1
  %122 = load i64, ptr @m, align 8, !tbaa !8
  %123 = icmp slt i64 %121, %122
  br i1 %123, label %.lr.ph63, label %.loopexit, !llvm.loop !22

124:                                              ; preds = %93
  call void @_Z3sp1xPx(i64 noundef %46, ptr noundef nonnull @len2)
  %125 = load i64, ptr @m, align 8, !tbaa !8
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %.lr.ph52, label %._crit_edge53

._crit_edge53:                                    ; preds = %171, %124
  %127 = load i64, ptr %2, align 8, !tbaa !8
  %128 = load i64, ptr %3, align 8, !tbaa !8
  %129 = load i64, ptr %1, align 8, !tbaa !8
  call void @_Z3sp2xxx(i64 noundef %127, i64 noundef %128, i64 noundef %129)
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %132 = load i64, ptr @m, align 8, !tbaa !8
  %133 = icmp sgt i64 %132, 0
  br i1 %133, label %.lr.ph56, label %._crit_edge57

.lr.ph52:                                         ; preds = %124, %171
  %134 = phi i64 [ %172, %171 ], [ %125, %124 ]
  %.04350 = phi i64 [ %173, %171 ], [ 0, %124 ]
  %135 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %.04350
  %136 = load i8, ptr %135, align 1, !tbaa !11, !range !15, !noundef !16
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %138, label %171

138:                                              ; preds = %.lr.ph52
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04350) #7
  %140 = load i64, ptr %139, align 8, !tbaa !20
  %141 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04350) #7
  %142 = getelementptr inbounds i8, ptr %141, i64 8
  %143 = load i64, ptr %142, align 8, !tbaa !21
  %144 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04350) #7
  %145 = getelementptr inbounds i8, ptr %144, i64 24
  %146 = load i64, ptr %145, align 8, !tbaa !23
  %147 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %140
  %148 = load i64, ptr %147, align 8, !tbaa !8
  %149 = getelementptr inbounds [1010 x i64], ptr @len2, i64 0, i64 %143
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = add nsw i64 %150, %148
  %152 = getelementptr inbounds [1010 x i64], ptr @len1, i64 0, i64 %143
  %153 = load i64, ptr %152, align 8, !tbaa !8
  %154 = getelementptr inbounds [1010 x i64], ptr @len2, i64 0, i64 %140
  %155 = load i64, ptr %154, align 8, !tbaa !8
  %156 = add nsw i64 %155, %153
  %.not48 = icmp sgt i64 %151, %156
  br i1 %.not48, label %162, label %157

157:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %158 = load i64, ptr %1, align 8, !tbaa !8
  %159 = sub nsw i64 %158, %151
  store i64 %159, ptr %17, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  store i64 1, ptr %18, align 8, !tbaa !8
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %161 = load i64, ptr %160, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %167

162:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %163 = load i64, ptr %1, align 8, !tbaa !8
  %164 = sub nsw i64 %163, %156
  store i64 %164, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  store i64 1, ptr %20, align 8, !tbaa !8
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %166 = load i64, ptr %165, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %167

167:                                              ; preds = %162, %157
  %.sink = phi i64 [ %166, %162 ], [ %161, %157 ]
  %168 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %146
  store i64 %.sink, ptr %168, align 8
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef nonnull align 8 dereferenceable(8) @_ZL3INF)
  %170 = load i64, ptr %169, align 8, !tbaa !8
  store i64 %170, ptr %168, align 8, !tbaa !8
  %.pre = load i64, ptr @m, align 8, !tbaa !8
  br label %171

171:                                              ; preds = %.lr.ph52, %167
  %172 = phi i64 [ %134, %.lr.ph52 ], [ %.pre, %167 ]
  %173 = add nuw nsw i64 %.04350, 1
  %174 = icmp slt i64 %173, %172
  br i1 %174, label %.lr.ph52, label %._crit_edge53, !llvm.loop !24

._crit_edge57:                                    ; preds = %203, %._crit_edge53
  %175 = load i64, ptr %2, align 8, !tbaa !8
  %176 = load i64, ptr %3, align 8, !tbaa !8
  %177 = load i64, ptr %1, align 8, !tbaa !8
  call void @_Z2spxxx(i64 noundef %175, i64 noundef %176, i64 noundef %177)
  %178 = load i64, ptr @m, align 8, !tbaa !8
  %179 = icmp sgt i64 %178, 0
  br i1 %179, label %.lr.ph60, label %.loopexit

.lr.ph56:                                         ; preds = %._crit_edge53, %203
  %180 = phi i64 [ %204, %203 ], [ %132, %._crit_edge53 ]
  %.04054 = phi i64 [ %205, %203 ], [ 0, %._crit_edge53 ]
  %181 = getelementptr inbounds [10100 x i8], ptr @erased, i64 0, i64 %.04054
  %182 = load i8, ptr %181, align 1, !tbaa !11, !range !15, !noundef !16
  %183 = trunc nuw i8 %182 to i1
  br i1 %183, label %184, label %203

184:                                              ; preds = %.lr.ph56
  %185 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04054) #7
  %186 = getelementptr inbounds i8, ptr %185, i64 24
  %187 = load i64, ptr %186, align 8, !tbaa !23
  %188 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !8
  %190 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04054) #7
  %191 = getelementptr inbounds i8, ptr %190, i64 16
  store i64 %189, ptr %191, align 8, !tbaa !17
  %192 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04054) #7
  %193 = getelementptr inbounds i8, ptr %192, i64 24
  %194 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(48) @onpath, ptr noundef nonnull align 8 dereferenceable(8) %193)
  %.not = icmp eq i64 %194, 0
  br i1 %.not, label %195, label %198

195:                                              ; preds = %184
  %196 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04054) #7
  %197 = getelementptr inbounds i8, ptr %196, i64 16
  store i64 10000000000000, ptr %197, align 8, !tbaa !17
  br label %198

198:                                              ; preds = %195, %184
  %199 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.04054) #7
  %200 = getelementptr inbounds i8, ptr %199, i64 16
  %201 = load i64, ptr %200, align 8, !tbaa !17
  %202 = getelementptr inbounds [10100 x i64], ptr @cost, i64 0, i64 %.04054
  store i64 %201, ptr %202, align 8, !tbaa !8
  %.pre65 = load i64, ptr @m, align 8, !tbaa !8
  br label %203

203:                                              ; preds = %.lr.ph56, %198
  %204 = phi i64 [ %180, %.lr.ph56 ], [ %.pre65, %198 ]
  %205 = add nuw nsw i64 %.04054, 1
  %206 = icmp slt i64 %205, %204
  br i1 %206, label %.lr.ph56, label %._crit_edge57, !llvm.loop !25

.lr.ph60:                                         ; preds = %._crit_edge57, %.lr.ph60
  %.058 = phi i64 [ %221, %.lr.ph60 ], [ 0, %._crit_edge57 ]
  %207 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.058) #7
  %208 = load i64, ptr %207, align 8, !tbaa !20
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %208)
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %209, i8 noundef signext 32)
  %211 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.058) #7
  %212 = getelementptr inbounds i8, ptr %211, i64 8
  %213 = load i64, ptr %212, align 8, !tbaa !21
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %210, i64 noundef %213)
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %214, i8 noundef signext 32)
  %216 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IxxES1_ESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @edges, i64 noundef %.058) #7
  %217 = getelementptr inbounds i8, ptr %216, i64 16
  %218 = load i64, ptr %217, align 8, !tbaa !17
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %215, i64 noundef %218)
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %219, i8 noundef signext 10)
  %221 = add nuw nsw i64 %.058, 1
  %222 = load i64, ptr @m, align 8, !tbaa !8
  %223 = icmp slt i64 %221, %222
  br i1 %223, label %.lr.ph60, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %.lr.ph60, %106, %._crit_edge57, %95, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRxSt4pairIxxEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.5") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIxxES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.31") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE5countERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 = { 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 #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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