; LLVM IR from tangjz/acm-icpc :: codechef/SNCKEL19 (GDIST)

; 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, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_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<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }

@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@rt = external dso_local global i64, align 8
@f = external dso_local global [63 x [63 x [63 x i64]]], align 16
@Ref = external dso_local global [63 x %"class.std::vector"], align 16
@e = external dso_local global [63 x %"class.std::vector.0"], align 16
@g = external dso_local global [63 x %"class.std::vector"], align 16
@buf = external dso_local global [63 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@_ZZ4mainE3dis = external hidden global [63 x i64], align 16
@_ZZ4mainE3vis = external hidden global [63 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ4mainE3ctr = external hidden global [257 x i64], align 16
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dijkstraPx(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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__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

declare i32 @__gxx_personality_v0(...)

; 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 zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIxxESaIS1_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_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %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 i8, align 1
  %8 = alloca %"class.std::vector.5", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::priority_queue", align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %35 = alloca ptr, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca %"struct.std::pair", align 8
  %39 = alloca %"struct.std::pair", align 8
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %48 = alloca ptr, align 8
  %49 = alloca i64, align 8
  %50 = alloca i64, align 8
  %51 = alloca i64, align 8
  %52 = alloca i64, align 8
  %53 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m, ptr noundef %2)
  %55 = load i64, ptr @m, align 8, !tbaa !5
  %56 = mul i64 %55, 8
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds (i64, ptr @_ZZ4mainE3dis, i64 1), i8 63, i64 %56, i1 false)
  %57 = load i64, ptr @m, align 8, !tbaa !5
  %58 = mul i64 %57, 1
  call void @llvm.memset.p0.i64(ptr align 1 getelementptr inbounds (i8, ptr @_ZZ4mainE3vis, i64 1), i8 0, i64 %58, i1 false)
  br label %59

59:                                               ; preds = %150, %0
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = add nsw i64 %60, -1
  store i64 %61, ptr %2, align 8, !tbaa !5
  %62 = icmp ne i64 %60, 0
  br i1 %62, label %63, label %152

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %64 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4)
          to label %65 unwind label %98

65:                                               ; preds = %63
  %66 = load i64, ptr %4, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %68 unwind label %98

68:                                               ; preds = %65
  %69 = load i64, ptr %3, align 8, !tbaa !5
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %71, label %110

71:                                               ; preds = %68
  %72 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5, ptr noundef %6)
          to label %73 unwind label %98

73:                                               ; preds = %71
  %74 = load i64, ptr %5, align 8, !tbaa !5
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %76 unwind label %98

76:                                               ; preds = %73
  %77 = load i64, ptr %6, align 8, !tbaa !5
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %79 unwind label %98

79:                                               ; preds = %76
  %80 = load i64, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %80
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %82 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %83 unwind label %102

83:                                               ; preds = %79
  %84 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %85 = extractvalue { i64, i64 } %82, 0
  store i64 %85, ptr %84, align 8
  %86 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %87 = extractvalue { i64, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %88 unwind label %102

88:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  %89 = load i64, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %91 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %92 unwind label %106

92:                                               ; preds = %88
  %93 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %94 = extractvalue { i64, i64 } %91, 0
  store i64 %94, ptr %93, align 8
  %95 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %96 = extractvalue { i64, i64 } %91, 1
  store i64 %96, ptr %95, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %97 unwind label %106

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %147

98:                                               ; preds = %147, %113, %76, %73, %71, %65, %63
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %9, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %10, align 4
  br label %151

102:                                              ; preds = %83, %79
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %151

106:                                              ; preds = %92, %88
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %9, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %151

110:                                              ; preds = %68
  %111 = load i64, ptr %3, align 8, !tbaa !5
  %112 = icmp eq i64 %111, 1
  br i1 %112, label %113, label %134

113:                                              ; preds = %110
  %114 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %7)
          to label %115 unwind label %98

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %116 = load i8, ptr %7, align 1, !tbaa !9
  %117 = sext i8 %116 to i64
  store i64 %117, ptr %13, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %118 unwind label %126

118:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %119 = load i64, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 1, ptr %14, align 8, !tbaa !5
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %122 unwind label %130

122:                                              ; preds = %118
  %123 = load i64, ptr %121, align 8, !tbaa !5
  %124 = load i64, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %124
  store i64 %123, ptr %125, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %146

126:                                              ; preds = %115
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %151

130:                                              ; preds = %118
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %151

134:                                              ; preds = %110
  %135 = load i64, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !5
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %138 unwind label %142

138:                                              ; preds = %134
  %139 = load i64, ptr %137, align 8, !tbaa !5
  %140 = load i64, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %140
  store i64 %139, ptr %141, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %146

142:                                              ; preds = %134
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %151

146:                                              ; preds = %138, %122
  br label %147

147:                                              ; preds = %146, %97
  %148 = load i64, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %148
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %149, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %150 unwind label %98

150:                                              ; preds = %147
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %59, !llvm.loop !10

151:                                              ; preds = %142, %130, %126, %106, %102, %98
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %602

152:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 1, ptr %17, align 8, !tbaa !5
  br label %153

153:                                              ; preds = %180, %152
  %154 = load i64, ptr %17, align 8, !tbaa !5
  %155 = load i64, ptr @m, align 8, !tbaa !5
  %156 = icmp sle i64 %154, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %183

158:                                              ; preds = %153
  %159 = load i64, ptr %17, align 8, !tbaa !5
  %160 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !5
  %162 = icmp slt i64 %161, 4557430888798830399
  br i1 %162, label %163, label %179

163:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %164 = load i64, ptr %17, align 8, !tbaa !5
  %165 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !5
  %167 = sub nsw i64 0, %166
  store i64 %167, ptr %19, align 8, !tbaa !5
  %168 = invoke { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %169 unwind label %175

169:                                              ; preds = %163
  %170 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %171 = extractvalue { i64, i64 } %168, 0
  store i64 %171, ptr %170, align 8
  %172 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %173 = extractvalue { i64, i64 } %168, 1
  store i64 %173, ptr %172, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %16, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %174 unwind label %175

174:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %179

175:                                              ; preds = %169, %163
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %9, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %601

179:                                              ; preds = %174, %158
  br label %180

180:                                              ; preds = %179
  %181 = load i64, ptr %17, align 8, !tbaa !5
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %17, align 8, !tbaa !5
  br label %153, !llvm.loop !12

183:                                              ; preds = %157
  br label %184

184:                                              ; preds = %269, %267, %183
  %185 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %186 unwind label %199

186:                                              ; preds = %184
  %187 = xor i1 %185, true
  br i1 %187, label %188, label %271

188:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %189 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %190 unwind label %203

190:                                              ; preds = %188
  %191 = getelementptr inbounds %"struct.std::pair", ptr %189, i32 0, i32 1
  %192 = load i64, ptr %191, align 8, !tbaa !13
  store i64 %192, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %193 unwind label %203

193:                                              ; preds = %190
  %194 = load i64, ptr %20, align 8, !tbaa !5
  %195 = getelementptr inbounds [63 x i8], ptr @_ZZ4mainE3vis, i64 0, i64 %194
  %196 = load i8, ptr %195, align 1, !tbaa !15, !range !17, !noundef !18
  %197 = trunc i8 %196 to i1
  br i1 %197, label %198, label %207

198:                                              ; preds = %193
  store i32 7, ptr %21, align 4
  br label %267, !llvm.loop !19

199:                                              ; preds = %591, %271, %184
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %9, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %10, align 4
  br label %601

203:                                              ; preds = %190, %188
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %9, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %10, align 4
  br label %270

207:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %208 = load i64, ptr %20, align 8, !tbaa !5
  %209 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %208
  store ptr %209, ptr %22, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %210 = load ptr, ptr %22, align 8, !tbaa !20
  %211 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %210) #8
  %212 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %211, ptr %212, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %213 = load ptr, ptr %22, align 8, !tbaa !20
  %214 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %213) #8
  %215 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %214, ptr %215, align 8
  br label %216

216:                                              ; preds = %264, %207
  %217 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %217, label %219, label %218

218:                                              ; preds = %216
  store i32 9, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %266

219:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %220 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  store ptr %220, ptr %25, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %221 = load ptr, ptr %25, align 8, !tbaa !20
  %222 = getelementptr inbounds %"struct.std::pair", ptr %221, i32 0, i32 0
  %223 = load i64, ptr %222, align 8, !tbaa !22
  store i64 %223, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %224 = load ptr, ptr %25, align 8, !tbaa !20
  %225 = getelementptr inbounds %"struct.std::pair", ptr %224, i32 0, i32 1
  %226 = load i64, ptr %225, align 8, !tbaa !13
  store i64 %226, ptr %27, align 8, !tbaa !5
  %227 = load i64, ptr %26, align 8, !tbaa !5
  %228 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !5
  %230 = load i64, ptr %20, align 8, !tbaa !5
  %231 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %230
  %232 = load i64, ptr %231, align 8, !tbaa !5
  %233 = load i64, ptr %27, align 8, !tbaa !5
  %234 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !5
  %236 = add nsw i64 %232, %235
  %237 = icmp sgt i64 %229, %236
  br i1 %237, label %238, label %263

238:                                              ; preds = %219
  %239 = load i64, ptr %20, align 8, !tbaa !5
  %240 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !5
  %242 = load i64, ptr %27, align 8, !tbaa !5
  %243 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !5
  %245 = add nsw i64 %241, %244
  %246 = load i64, ptr %26, align 8, !tbaa !5
  %247 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %246
  store i64 %245, ptr %247, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %248 = load i64, ptr %26, align 8, !tbaa !5
  %249 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %248
  %250 = load i64, ptr %249, align 8, !tbaa !5
  %251 = sub nsw i64 0, %250
  store i64 %251, ptr %29, align 8, !tbaa !5
  %252 = invoke { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %253 unwind label %259

253:                                              ; preds = %238
  %254 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 0
  %255 = extractvalue { i64, i64 } %252, 0
  store i64 %255, ptr %254, align 8
  %256 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 1
  %257 = extractvalue { i64, i64 } %252, 1
  store i64 %257, ptr %256, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %16, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %258 unwind label %259

258:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  br label %263

259:                                              ; preds = %253, %238
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %9, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %270

263:                                              ; preds = %258, %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %264

264:                                              ; preds = %263
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br label %216

266:                                              ; preds = %218
  store i32 0, ptr %21, align 4
  br label %267

267:                                              ; preds = %266, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  %268 = load i32, ptr %21, align 4
  switch i32 %268, label %608 [
    i32 0, label %269
    i32 7, label %184
  ]

269:                                              ; preds = %267
  br label %184, !llvm.loop !19

270:                                              ; preds = %259, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %601

271:                                              ; preds = %186
  %272 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.7, ptr noundef @rt, ptr noundef getelementptr inbounds (i8, ptr @buf, i64 1))
          to label %273 unwind label %199

273:                                              ; preds = %271
  %274 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @buf, i64 1)) #9
  store i64 %274, ptr @n, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 63, i64 2000376, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store i64 1, ptr %30, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %386, %273
  %276 = load i64, ptr %30, align 8, !tbaa !5
  %277 = load i64, ptr @m, align 8, !tbaa !5
  %278 = icmp sle i64 %276, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %275
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %390

280:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  store i64 1, ptr %31, align 8, !tbaa !5
  br label %281

281:                                              ; preds = %307, %280
  %282 = load i64, ptr %31, align 8, !tbaa !5
  %283 = load i64, ptr @n, align 8, !tbaa !5
  %284 = add nsw i64 %283, 1
  %285 = icmp sle i64 %282, %284
  br i1 %285, label %287, label %286

286:                                              ; preds = %281
  store i32 14, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %314

287:                                              ; preds = %281
  %288 = load i64, ptr %31, align 8, !tbaa !5
  %289 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %288
  %290 = load i64, ptr %31, align 8, !tbaa !5
  %291 = sub nsw i64 %290, 1
  %292 = getelementptr inbounds [63 x [63 x i64]], ptr %289, i64 0, i64 %291
  %293 = load i64, ptr %30, align 8, !tbaa !5
  %294 = getelementptr inbounds [63 x i64], ptr %292, i64 0, i64 %293
  %295 = load i64, ptr %30, align 8, !tbaa !5
  %296 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %295
  %297 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %294, ptr noundef nonnull align 8 dereferenceable(8) %296)
          to label %298 unwind label %310

298:                                              ; preds = %287
  %299 = load i64, ptr %297, align 8, !tbaa !5
  %300 = load i64, ptr %31, align 8, !tbaa !5
  %301 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %300
  %302 = load i64, ptr %31, align 8, !tbaa !5
  %303 = sub nsw i64 %302, 1
  %304 = getelementptr inbounds [63 x [63 x i64]], ptr %301, i64 0, i64 %303
  %305 = load i64, ptr %30, align 8, !tbaa !5
  %306 = getelementptr inbounds [63 x i64], ptr %304, i64 0, i64 %305
  store i64 %299, ptr %306, align 8, !tbaa !5
  br label %307

307:                                              ; preds = %298
  %308 = load i64, ptr %31, align 8, !tbaa !5
  %309 = add nsw i64 %308, 1
  store i64 %309, ptr %31, align 8, !tbaa !5
  br label %281, !llvm.loop !23

310:                                              ; preds = %287
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %9, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %389

314:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %315 = load i64, ptr %30, align 8, !tbaa !5
  %316 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %315
  store ptr %316, ptr %32, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %317 = load ptr, ptr %32, align 8, !tbaa !20
  %318 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %317) #8
  %319 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %33, i32 0, i32 0
  store ptr %318, ptr %319, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %320 = load ptr, ptr %32, align 8, !tbaa !20
  %321 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %320) #8
  %322 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %34, i32 0, i32 0
  store ptr %321, ptr %322, align 8
  br label %323

323:                                              ; preds = %383, %314
  %324 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  br i1 %324, label %326, label %325

325:                                              ; preds = %323
  store i32 17, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %385

326:                                              ; preds = %323
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %327 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  store ptr %327, ptr %35, align 8, !tbaa !20
  %328 = load ptr, ptr %35, align 8, !tbaa !20
  %329 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %328, i64 noundef 0) #8
  %330 = load i64, ptr %329, align 8, !tbaa !5
  %331 = icmp eq i64 %330, 0
  br i1 %331, label %332, label %382

332:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %333 = load ptr, ptr %35, align 8, !tbaa !20
  %334 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %333, i64 noundef 1) #8
  %335 = load i64, ptr %334, align 8, !tbaa !5
  store i64 %335, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %336 = load ptr, ptr %35, align 8, !tbaa !20
  %337 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %336, i64 noundef 2) #8
  %338 = load i64, ptr %337, align 8, !tbaa !5
  store i64 %338, ptr %37, align 8, !tbaa !5
  %339 = load i64, ptr %36, align 8, !tbaa !5
  %340 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %339
  %341 = load i64, ptr %340, align 8, !tbaa !5
  %342 = icmp slt i64 %341, 4557430888798830399
  br i1 %342, label %343, label %359

343:                                              ; preds = %332
  %344 = load i64, ptr %37, align 8, !tbaa !5
  %345 = getelementptr inbounds [63 x %"class.std::vector"], ptr @g, i64 0, i64 %344
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #8
  %346 = load i64, ptr %36, align 8, !tbaa !5
  %347 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %346
  %348 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %347)
          to label %349 unwind label %355

349:                                              ; preds = %343
  %350 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 0
  %351 = extractvalue { i64, i64 } %348, 0
  store i64 %351, ptr %350, align 8
  %352 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 1
  %353 = extractvalue { i64, i64 } %348, 1
  store i64 %353, ptr %352, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %345, ptr noundef nonnull align 8 dereferenceable(16) %38)
          to label %354 unwind label %355

354:                                              ; preds = %349
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  br label %359

355:                                              ; preds = %349, %343
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %9, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  br label %381

359:                                              ; preds = %354, %332
  %360 = load i64, ptr %37, align 8, !tbaa !5
  %361 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %360
  %362 = load i64, ptr %361, align 8, !tbaa !5
  %363 = icmp slt i64 %362, 4557430888798830399
  br i1 %363, label %364, label %380

364:                                              ; preds = %359
  %365 = load i64, ptr %36, align 8, !tbaa !5
  %366 = getelementptr inbounds [63 x %"class.std::vector"], ptr @g, i64 0, i64 %365
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #8
  %367 = load i64, ptr %37, align 8, !tbaa !5
  %368 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %367
  %369 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %368)
          to label %370 unwind label %376

370:                                              ; preds = %364
  %371 = getelementptr inbounds { i64, i64 }, ptr %39, i32 0, i32 0
  %372 = extractvalue { i64, i64 } %369, 0
  store i64 %372, ptr %371, align 8
  %373 = getelementptr inbounds { i64, i64 }, ptr %39, i32 0, i32 1
  %374 = extractvalue { i64, i64 } %369, 1
  store i64 %374, ptr %373, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %366, ptr noundef nonnull align 8 dereferenceable(16) %39)
          to label %375 unwind label %376

375:                                              ; preds = %370
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  br label %380

376:                                              ; preds = %370, %364
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %9, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  br label %381

380:                                              ; preds = %375, %359
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %382

381:                                              ; preds = %376, %355
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %389

382:                                              ; preds = %380, %326
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  br label %383

383:                                              ; preds = %382
  %384 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  br label %323

385:                                              ; preds = %325
  br label %386

386:                                              ; preds = %385
  %387 = load i64, ptr %30, align 8, !tbaa !5
  %388 = add nsw i64 %387, 1
  store i64 %388, ptr %30, align 8, !tbaa !5
  br label %275, !llvm.loop !24

389:                                              ; preds = %381, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %601

390:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  store i64 1, ptr %40, align 8, !tbaa !5
  br label %391

391:                                              ; preds = %588, %390
  %392 = load i64, ptr %40, align 8, !tbaa !5
  %393 = load i64, ptr @n, align 8, !tbaa !5
  %394 = icmp sle i64 %392, %393
  br i1 %394, label %396, label %395

395:                                              ; preds = %391
  store i32 19, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %591

396:                                              ; preds = %391
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  store i64 1, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %397 = load i64, ptr %41, align 8, !tbaa !5
  %398 = load i64, ptr %40, align 8, !tbaa !5
  %399 = add nsw i64 %397, %398
  %400 = sub nsw i64 %399, 1
  store i64 %400, ptr %42, align 8, !tbaa !5
  br label %401

401:                                              ; preds = %577, %396
  %402 = load i64, ptr %42, align 8, !tbaa !5
  %403 = load i64, ptr @n, align 8, !tbaa !5
  %404 = icmp sle i64 %402, %403
  br i1 %404, label %406, label %405

405:                                              ; preds = %401
  store i32 22, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %587

406:                                              ; preds = %401
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ4mainE3ctr, i8 0, i64 2056, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %407 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %407, ptr %43, align 8, !tbaa !5
  br label %408

408:                                              ; preds = %421, %406
  %409 = load i64, ptr %43, align 8, !tbaa !5
  %410 = load i64, ptr %42, align 8, !tbaa !5
  %411 = icmp sle i64 %409, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %408
  store i32 25, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %424

413:                                              ; preds = %408
  %414 = load i64, ptr %43, align 8, !tbaa !5
  %415 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %414
  %416 = load i8, ptr %415, align 1, !tbaa !9
  %417 = sext i8 %416 to i64
  %418 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %417
  %419 = load i64, ptr %418, align 8, !tbaa !5
  %420 = add nsw i64 %419, 1
  store i64 %420, ptr %418, align 8, !tbaa !5
  br label %421

421:                                              ; preds = %413
  %422 = load i64, ptr %43, align 8, !tbaa !5
  %423 = add nsw i64 %422, 1
  store i64 %423, ptr %43, align 8, !tbaa !5
  br label %408, !llvm.loop !25

424:                                              ; preds = %412
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  store i64 1, ptr %44, align 8, !tbaa !5
  br label %425

425:                                              ; preds = %567, %424
  %426 = load i64, ptr %44, align 8, !tbaa !5
  %427 = load i64, ptr @m, align 8, !tbaa !5
  %428 = icmp sle i64 %426, %427
  br i1 %428, label %430, label %429

429:                                              ; preds = %425
  store i32 28, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %570

430:                                              ; preds = %425
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %431 = load i64, ptr %44, align 8, !tbaa !5
  %432 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %431
  store ptr %432, ptr %45, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #8
  %433 = load ptr, ptr %45, align 8, !tbaa !20
  %434 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %433) #8
  %435 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %46, i32 0, i32 0
  store ptr %434, ptr %435, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %436 = load ptr, ptr %45, align 8, !tbaa !20
  %437 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %436) #8
  %438 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %47, i32 0, i32 0
  store ptr %437, ptr %438, align 8
  br label %439

439:                                              ; preds = %563, %430
  %440 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br i1 %440, label %442, label %441

441:                                              ; preds = %439
  store i32 31, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %566

442:                                              ; preds = %439
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %443 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  store ptr %443, ptr %48, align 8, !tbaa !20
  %444 = load ptr, ptr %48, align 8, !tbaa !20
  %445 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %444, i64 noundef 0) #8
  %446 = load i64, ptr %445, align 8, !tbaa !5
  %447 = icmp eq i64 %446, 0
  br i1 %447, label %448, label %501

448:                                              ; preds = %442
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %449 = load ptr, ptr %48, align 8, !tbaa !20
  %450 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %449, i64 noundef 1) #8
  %451 = load i64, ptr %450, align 8, !tbaa !5
  store i64 %451, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %452 = load ptr, ptr %48, align 8, !tbaa !20
  %453 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %452, i64 noundef 2) #8
  %454 = load i64, ptr %453, align 8, !tbaa !5
  store i64 %454, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %455 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %455, ptr %51, align 8, !tbaa !5
  br label %456

456:                                              ; preds = %493, %448
  %457 = load i64, ptr %51, align 8, !tbaa !5
  %458 = load i64, ptr %42, align 8, !tbaa !5
  %459 = icmp slt i64 %457, %458
  br i1 %459, label %461, label %460

460:                                              ; preds = %456
  store i32 33, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br label %500

461:                                              ; preds = %456
  %462 = load i64, ptr %41, align 8, !tbaa !5
  %463 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %462
  %464 = load i64, ptr %42, align 8, !tbaa !5
  %465 = getelementptr inbounds [63 x [63 x i64]], ptr %463, i64 0, i64 %464
  %466 = load i64, ptr %44, align 8, !tbaa !5
  %467 = getelementptr inbounds [63 x i64], ptr %465, i64 0, i64 %466
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %468 = load i64, ptr %41, align 8, !tbaa !5
  %469 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %468
  %470 = load i64, ptr %51, align 8, !tbaa !5
  %471 = getelementptr inbounds [63 x [63 x i64]], ptr %469, i64 0, i64 %470
  %472 = load i64, ptr %49, align 8, !tbaa !5
  %473 = getelementptr inbounds [63 x i64], ptr %471, i64 0, i64 %472
  %474 = load i64, ptr %473, align 8, !tbaa !5
  %475 = load i64, ptr %51, align 8, !tbaa !5
  %476 = add nsw i64 %475, 1
  %477 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %476
  %478 = load i64, ptr %42, align 8, !tbaa !5
  %479 = getelementptr inbounds [63 x [63 x i64]], ptr %477, i64 0, i64 %478
  %480 = load i64, ptr %50, align 8, !tbaa !5
  %481 = getelementptr inbounds [63 x i64], ptr %479, i64 0, i64 %480
  %482 = load i64, ptr %481, align 8, !tbaa !5
  %483 = add nsw i64 %474, %482
  store i64 %483, ptr %52, align 8, !tbaa !5
  %484 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %467, ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %485 unwind label %496

485:                                              ; preds = %461
  %486 = load i64, ptr %484, align 8, !tbaa !5
  %487 = load i64, ptr %41, align 8, !tbaa !5
  %488 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %487
  %489 = load i64, ptr %42, align 8, !tbaa !5
  %490 = getelementptr inbounds [63 x [63 x i64]], ptr %488, i64 0, i64 %489
  %491 = load i64, ptr %44, align 8, !tbaa !5
  %492 = getelementptr inbounds [63 x i64], ptr %490, i64 0, i64 %491
  store i64 %486, ptr %492, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %493

493:                                              ; preds = %485
  %494 = load i64, ptr %51, align 8, !tbaa !5
  %495 = add nsw i64 %494, 1
  store i64 %495, ptr %51, align 8, !tbaa !5
  br label %456, !llvm.loop !26

496:                                              ; preds = %461
  %497 = landingpad { ptr, i32 }
          cleanup
  %498 = extractvalue { ptr, i32 } %497, 0
  store ptr %498, ptr %9, align 8
  %499 = extractvalue { ptr, i32 } %497, 1
  store i32 %499, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %565

500:                                              ; preds = %460
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %501

501:                                              ; preds = %500, %442
  %502 = load ptr, ptr %48, align 8, !tbaa !20
  %503 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %502, i64 noundef 0) #8
  %504 = load i64, ptr %503, align 8, !tbaa !5
  %505 = icmp eq i64 %504, 1
  br i1 %505, label %506, label %537

506:                                              ; preds = %501
  %507 = load i64, ptr %41, align 8, !tbaa !5
  %508 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %507
  %509 = load i64, ptr %42, align 8, !tbaa !5
  %510 = getelementptr inbounds [63 x [63 x i64]], ptr %508, i64 0, i64 %509
  %511 = load i64, ptr %44, align 8, !tbaa !5
  %512 = getelementptr inbounds [63 x i64], ptr %510, i64 0, i64 %511
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %513 = load i64, ptr %40, align 8, !tbaa !5
  %514 = load ptr, ptr %48, align 8, !tbaa !20
  %515 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %514, i64 noundef 1) #8
  %516 = load i64, ptr %515, align 8, !tbaa !5
  %517 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %516
  %518 = load i64, ptr %517, align 8, !tbaa !5
  %519 = icmp sgt i64 %518, 0
  %520 = zext i1 %519 to i64
  %521 = select i1 %519, i32 1, i32 0
  %522 = sext i32 %521 to i64
  %523 = sub nsw i64 %513, %522
  store i64 %523, ptr %53, align 8, !tbaa !5
  %524 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %512, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %525 unwind label %533

525:                                              ; preds = %506
  %526 = load i64, ptr %524, align 8, !tbaa !5
  %527 = load i64, ptr %41, align 8, !tbaa !5
  %528 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %527
  %529 = load i64, ptr %42, align 8, !tbaa !5
  %530 = getelementptr inbounds [63 x [63 x i64]], ptr %528, i64 0, i64 %529
  %531 = load i64, ptr %44, align 8, !tbaa !5
  %532 = getelementptr inbounds [63 x i64], ptr %530, i64 0, i64 %531
  store i64 %526, ptr %532, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %537

533:                                              ; preds = %506
  %534 = landingpad { ptr, i32 }
          cleanup
  %535 = extractvalue { ptr, i32 } %534, 0
  store ptr %535, ptr %9, align 8
  %536 = extractvalue { ptr, i32 } %534, 1
  store i32 %536, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %565

537:                                              ; preds = %525, %501
  %538 = load ptr, ptr %48, align 8, !tbaa !20
  %539 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %538, i64 noundef 0) #8
  %540 = load i64, ptr %539, align 8, !tbaa !5
  %541 = icmp eq i64 %540, 2
  br i1 %541, label %542, label %562

542:                                              ; preds = %537
  %543 = load i64, ptr %41, align 8, !tbaa !5
  %544 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %543
  %545 = load i64, ptr %42, align 8, !tbaa !5
  %546 = getelementptr inbounds [63 x [63 x i64]], ptr %544, i64 0, i64 %545
  %547 = load i64, ptr %44, align 8, !tbaa !5
  %548 = getelementptr inbounds [63 x i64], ptr %546, i64 0, i64 %547
  %549 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %548, ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %550 unwind label %558

550:                                              ; preds = %542
  %551 = load i64, ptr %549, align 8, !tbaa !5
  %552 = load i64, ptr %41, align 8, !tbaa !5
  %553 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %552
  %554 = load i64, ptr %42, align 8, !tbaa !5
  %555 = getelementptr inbounds [63 x [63 x i64]], ptr %553, i64 0, i64 %554
  %556 = load i64, ptr %44, align 8, !tbaa !5
  %557 = getelementptr inbounds [63 x i64], ptr %555, i64 0, i64 %556
  store i64 %551, ptr %557, align 8, !tbaa !5
  br label %562

558:                                              ; preds = %542
  %559 = landingpad { ptr, i32 }
          cleanup
  %560 = extractvalue { ptr, i32 } %559, 0
  store ptr %560, ptr %9, align 8
  %561 = extractvalue { ptr, i32 } %559, 1
  store i32 %561, ptr %10, align 4
  br label %565

562:                                              ; preds = %550, %537
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %563

563:                                              ; preds = %562
  %564 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  br label %439

565:                                              ; preds = %558, %533, %496
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %586

566:                                              ; preds = %441
  br label %567

567:                                              ; preds = %566
  %568 = load i64, ptr %44, align 8, !tbaa !5
  %569 = add nsw i64 %568, 1
  store i64 %569, ptr %44, align 8, !tbaa !5
  br label %425, !llvm.loop !27

570:                                              ; preds = %429
  %571 = load i64, ptr %41, align 8, !tbaa !5
  %572 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %571
  %573 = load i64, ptr %42, align 8, !tbaa !5
  %574 = getelementptr inbounds [63 x [63 x i64]], ptr %572, i64 0, i64 %573
  %575 = getelementptr inbounds [63 x i64], ptr %574, i64 0, i64 0
  invoke void @_Z8dijkstraPx(ptr noundef %575)
          to label %576 unwind label %582

576:                                              ; preds = %570
  br label %577

577:                                              ; preds = %576
  %578 = load i64, ptr %41, align 8, !tbaa !5
  %579 = add nsw i64 %578, 1
  store i64 %579, ptr %41, align 8, !tbaa !5
  %580 = load i64, ptr %42, align 8, !tbaa !5
  %581 = add nsw i64 %580, 1
  store i64 %581, ptr %42, align 8, !tbaa !5
  br label %401, !llvm.loop !28

582:                                              ; preds = %570
  %583 = landingpad { ptr, i32 }
          cleanup
  %584 = extractvalue { ptr, i32 } %583, 0
  store ptr %584, ptr %9, align 8
  %585 = extractvalue { ptr, i32 } %583, 1
  store i32 %585, ptr %10, align 4
  br label %586

586:                                              ; preds = %582, %565
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %601

587:                                              ; preds = %405
  br label %588

588:                                              ; preds = %587
  %589 = load i64, ptr %40, align 8, !tbaa !5
  %590 = add nsw i64 %589, 1
  store i64 %590, ptr %40, align 8, !tbaa !5
  br label %391, !llvm.loop !29

591:                                              ; preds = %395
  %592 = load i64, ptr @n, align 8, !tbaa !5
  %593 = getelementptr inbounds [63 x [63 x i64]], ptr getelementptr inbounds ([63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 1), i64 0, i64 %592
  %594 = load i64, ptr @rt, align 8, !tbaa !5
  %595 = add nsw i64 %594, 1
  store i64 %595, ptr @rt, align 8, !tbaa !5
  %596 = getelementptr inbounds [63 x i64], ptr %593, i64 0, i64 %595
  %597 = load i64, ptr %596, align 8, !tbaa !5
  %598 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %597)
          to label %599 unwind label %199

599:                                              ; preds = %591
  store i32 0, ptr %1, align 4
  store i32 1, ptr %21, align 4
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %600 = load i32, ptr %1, align 4
  ret i32 %600

601:                                              ; preds = %586, %389, %270, %199, %175
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %602

602:                                              ; preds = %601, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %603

603:                                              ; preds = %602
  %604 = load ptr, ptr %9, align 8
  %605 = load i32, ptr %10, align 4
  %606 = insertvalue { ptr, i32 } poison, ptr %604, 0
  %607 = insertvalue { ptr, i32 } %606, i32 %605, 1
  resume { ptr, i32 } %607

608:                                              ; preds = %267
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #6

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

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

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

; 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 @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #7

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

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

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

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

declare i32 @printf(ptr noundef, ...) #6

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 = { 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 #6 = { "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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !11}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!14, !6, i64 0}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11}
!29 = distinct !{!29, !11}


; 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, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_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<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }

@n = external dso_local local_unnamed_addr global i64, align 8
@m = external dso_local global i64, align 8
@rt = external dso_local global i64, align 8
@f = external dso_local global [63 x [63 x [63 x i64]]], align 16
@Ref = external dso_local global [63 x %"class.std::vector"], align 16
@e = external dso_local global [63 x %"class.std::vector.0"], align 16
@g = external dso_local global [63 x %"class.std::vector"], align 16
@buf = external dso_local global [63 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@_ZZ4mainE3dis = external hidden global [63 x i64], align 16
@_ZZ4mainE3vis = external hidden local_unnamed_addr global [63 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZZ4mainE3ctr = external hidden local_unnamed_addr global [257 x i64], align 16
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dijkstraPx(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 nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__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

declare i32 @__gxx_personality_v0(...)

; 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 zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIxxESaIS1_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_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %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 i8, align 1
  %7 = alloca %"class.std::vector.5", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.std::priority_queue", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i64, align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %25 = alloca %"struct.std::pair", align 8
  %26 = alloca %"struct.std::pair", align 8
  %27 = alloca i64, align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m, ptr noundef nonnull %1)
  %33 = load i64, ptr @m, align 8, !tbaa !5
  %34 = shl i64 %33, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ4mainE3dis, i64 8), i8 63, i64 %34, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 1 getelementptr inbounds (i8, ptr @_ZZ4mainE3vis, i64 1), i8 0, i64 %33, i1 false)
  %35 = load i64, ptr %1, align 8, !tbaa !5
  %36 = add nsw i64 %35, -1
  store i64 %36, ptr %1, align 8, !tbaa !5
  %.not114 = icmp eq i64 %35, 0
  br i1 %.not114, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %37 = getelementptr inbounds i8, ptr %8, i64 8
  %38 = getelementptr inbounds i8, ptr %9, i64 8
  br label %39

39:                                               ; preds = %.lr.ph, %96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %41 = load i64, ptr %3, align 8, !tbaa !5
  %42 = add nsw i64 %41, 1
  store i64 %42, ptr %3, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %43 unwind label %67

43:                                               ; preds = %39
  %44 = load i64, ptr %2, align 8, !tbaa !5
  switch i64 %44, label %86 [
    i64 0, label %45
    i64 1, label %73
  ]

45:                                               ; preds = %43
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %47 = load i64, ptr %4, align 8, !tbaa !5
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %49 unwind label %67

49:                                               ; preds = %45
  %50 = load i64, ptr %5, align 8, !tbaa !5
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %52 unwind label %67

52:                                               ; preds = %49
  %53 = load i64, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  %54 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %55 unwind label %69

55:                                               ; preds = %52
  %56 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %53
  %57 = extractvalue { i64, i64 } %54, 0
  store i64 %57, ptr %8, align 8
  %58 = extractvalue { i64, i64 } %54, 1
  store i64 %58, ptr %37, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %59 unwind label %69

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  %60 = load i64, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %61 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %62 unwind label %71

62:                                               ; preds = %59
  %63 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %60
  %64 = extractvalue { i64, i64 } %61, 0
  store i64 %64, ptr %9, align 8
  %65 = extractvalue { i64, i64 } %61, 1
  store i64 %65, ptr %38, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %63, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %66 unwind label %71

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  %.pre = load i64, ptr %3, align 8, !tbaa !5
  br label %93

67:                                               ; preds = %93, %49, %45, %39
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %99

69:                                               ; preds = %55, %52
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %99

71:                                               ; preds = %62, %59
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %99

73:                                               ; preds = %43
  %74 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %75 = load i8, ptr %6, align 1, !tbaa !9
  %76 = sext i8 %75 to i64
  store i64 %76, ptr %10, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %77 unwind label %84

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %78 = load i64, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 1, ptr %11, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = load i64, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %82
  store i64 %81, ptr %83, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %93

84:                                               ; preds = %73
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %99

86:                                               ; preds = %43
  %87 = load i64, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  store i64 0, ptr %12, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %90 = load i64, ptr %89, align 8, !tbaa !5
  %91 = load i64, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %91
  store i64 %90, ptr %92, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %93

93:                                               ; preds = %77, %86, %66
  %94 = phi i64 [ %82, %77 ], [ %91, %86 ], [ %.pre, %66 ]
  %95 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %94
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %96 unwind label %67

96:                                               ; preds = %93
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %97 = load i64, ptr %1, align 8, !tbaa !5
  %98 = add nsw i64 %97, -1
  store i64 %98, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %97, 0
  br i1 %.not, label %._crit_edge, label %39, !llvm.loop !10

99:                                               ; preds = %84, %71, %69, %67
  %.pn108 = phi { ptr, i32 } [ %68, %67 ], [ %72, %71 ], [ %70, %69 ], [ %85, %84 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %333

._crit_edge:                                      ; preds = %96, %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  store i64 1, ptr %14, align 8, !tbaa !5
  %100 = load i64, ptr @m, align 8, !tbaa !5
  %.not94115 = icmp slt i64 %100, 1
  br i1 %.not94115, label %._crit_edge119, label %.lr.ph118

.lr.ph118:                                        ; preds = %._crit_edge
  %101 = getelementptr inbounds i8, ptr %15, i64 8
  br label %104

._crit_edge119:                                   ; preds = %118, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %102 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
  br i1 %102, label %._crit_edge125, label %.lr.ph124

.lr.ph124:                                        ; preds = %._crit_edge119
  %103 = getelementptr inbounds i8, ptr %20, i64 8
  br label %122

104:                                              ; preds = %.lr.ph118, %118
  %105 = phi i64 [ %100, %.lr.ph118 ], [ %119, %118 ]
  %storemerge116 = phi i64 [ 1, %.lr.ph118 ], [ %121, %118 ]
  %106 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %storemerge116
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = icmp slt i64 %107, 4557430888798830399
  br i1 %108, label %109, label %118

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %110 = sub nsw i64 0, %107
  store i64 %110, ptr %16, align 8, !tbaa !5
  %111 = invoke { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %112 unwind label %116

112:                                              ; preds = %109
  %113 = extractvalue { i64, i64 } %111, 0
  store i64 %113, ptr %15, align 8
  %114 = extractvalue { i64, i64 } %111, 1
  store i64 %114, ptr %101, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %115 unwind label %116

115:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  %.pre159 = load i64, ptr %14, align 8, !tbaa !5
  %.pre160 = load i64, ptr @m, align 8, !tbaa !5
  br label %118

116:                                              ; preds = %112, %109
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br label %332

118:                                              ; preds = %104, %115
  %119 = phi i64 [ %105, %104 ], [ %.pre160, %115 ]
  %120 = phi i64 [ %storemerge116, %104 ], [ %.pre159, %115 ]
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %14, align 8, !tbaa !5
  %.not94.not = icmp slt i64 %120, %119
  br i1 %.not94.not, label %104, label %._crit_edge119, !llvm.loop !12

122:                                              ; preds = %.lr.ph124, %162
  %123 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
  %124 = getelementptr inbounds i8, ptr %123, i64 8
  %125 = load i64, ptr %124, align 8, !tbaa !13
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %126 unwind label %130

126:                                              ; preds = %122
  %127 = getelementptr inbounds [63 x i8], ptr @_ZZ4mainE3vis, i64 0, i64 %125
  %128 = load i8, ptr %127, align 1, !tbaa !15, !range !17, !noundef !18
  %129 = trunc nuw i8 %128 to i1
  br i1 %129, label %162, label %132, !llvm.loop !19

130:                                              ; preds = %122
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %332

132:                                              ; preds = %126
  %133 = getelementptr inbounds [63 x %"class.std::vector"], ptr @Ref, i64 0, i64 %125
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %134 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %133) #8
  store ptr %134, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %135 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %133) #8
  store ptr %135, ptr %18, align 8
  %136 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %136, label %.lr.ph121, label %._crit_edge122

.lr.ph121:                                        ; preds = %132
  %137 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %125
  br label %138

._crit_edge122:                                   ; preds = %159, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %162

138:                                              ; preds = %.lr.ph121, %159
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %140 = load i64, ptr %139, align 8, !tbaa !20
  store i64 %140, ptr %19, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %139, i64 8
  %142 = load i64, ptr %141, align 8, !tbaa !13
  %143 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %140
  %144 = load i64, ptr %143, align 8, !tbaa !5
  %145 = load i64, ptr %137, align 8, !tbaa !5
  %146 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %142
  %147 = load i64, ptr %146, align 8, !tbaa !5
  %148 = add nsw i64 %147, %145
  %149 = icmp sgt i64 %144, %148
  br i1 %149, label %150, label %159

150:                                              ; preds = %138
  store i64 %148, ptr %143, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %151 = sub nsw i64 0, %148
  store i64 %151, ptr %21, align 8, !tbaa !5
  %152 = invoke { i64, i64 } @_ZSt9make_pairIxRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %153 unwind label %157

153:                                              ; preds = %150
  %154 = extractvalue { i64, i64 } %152, 0
  store i64 %154, ptr %20, align 8
  %155 = extractvalue { i64, i64 } %152, 1
  store i64 %155, ptr %103, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %156 unwind label %157

156:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  br label %159

157:                                              ; preds = %153, %150
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %332

159:                                              ; preds = %156, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %161 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %161, label %138, label %._crit_edge122

162:                                              ; preds = %126, %._crit_edge122
  %163 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
  br i1 %163, label %._crit_edge125, label %122

._crit_edge125:                                   ; preds = %162, %._crit_edge119
  %164 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.7, ptr noundef nonnull @rt, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 1))
  %165 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @buf, i64 1)) #9
  store i64 %165, ptr @n, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2000376) @f, i8 63, i64 2000376, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  store i64 1, ptr %22, align 8, !tbaa !5
  %166 = load i64, ptr @m, align 8, !tbaa !5
  %.not96133 = icmp slt i64 %166, 1
  br i1 %.not96133, label %._crit_edge134, label %.preheader112.lr.ph

.preheader112.lr.ph:                              ; preds = %._crit_edge125
  %167 = getelementptr inbounds i8, ptr %25, i64 8
  %168 = getelementptr inbounds i8, ptr %26, i64 8
  br label %.preheader112

.preheader112:                                    ; preds = %.preheader112.lr.ph, %._crit_edge132
  %169 = phi i64 [ 1, %.preheader112.lr.ph ], [ %188, %._crit_edge132 ]
  %170 = load i64, ptr @n, align 8, !tbaa !5
  %.not102126 = icmp slt i64 %170, 0
  br i1 %.not102126, label %._crit_edge129, label %.lr.ph128

._crit_edge134.loopexit:                          ; preds = %._crit_edge132
  %.pre161 = load i64, ptr @n, align 8, !tbaa !5
  br label %._crit_edge134

._crit_edge134:                                   ; preds = %._crit_edge134.loopexit, %._crit_edge125
  %171 = phi i64 [ %.pre161, %._crit_edge134.loopexit ], [ %165, %._crit_edge125 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #8
  store i64 1, ptr %27, align 8, !tbaa !5
  %.not98154 = icmp slt i64 %171, 1
  br i1 %.not98154, label %._crit_edge156, label %.preheader111

._crit_edge129:                                   ; preds = %.lr.ph128, %.preheader112
  %172 = phi i64 [ %169, %.preheader112 ], [ %183, %.lr.ph128 ]
  %173 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %172
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %174 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #8
  store ptr %174, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %175 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #8
  store ptr %175, ptr %24, align 8
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %176, label %.lr.ph131, label %._crit_edge132

.lr.ph128:                                        ; preds = %.preheader112, %.lr.ph128
  %177 = phi i64 [ %183, %.lr.ph128 ], [ %169, %.preheader112 ]
  %.089127 = phi i64 [ %185, %.lr.ph128 ], [ 1, %.preheader112 ]
  %178 = add nsw i64 %.089127, -1
  %179 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %.089127, i64 %178, i64 %177
  %180 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %177
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %179, ptr noundef nonnull align 8 dereferenceable(8) %180)
  %182 = load i64, ptr %181, align 8, !tbaa !5
  %183 = load i64, ptr %22, align 8, !tbaa !5
  %184 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %.089127, i64 %178, i64 %183
  store i64 %182, ptr %184, align 8, !tbaa !5
  %185 = add nuw nsw i64 %.089127, 1
  %186 = load i64, ptr @n, align 8, !tbaa !5
  %.not102 = icmp sgt i64 %.089127, %186
  br i1 %.not102, label %._crit_edge129, label %.lr.ph128, !llvm.loop !21

._crit_edge132:                                   ; preds = %225, %._crit_edge129
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  %187 = load i64, ptr %22, align 8, !tbaa !5
  %188 = add nsw i64 %187, 1
  store i64 %188, ptr %22, align 8, !tbaa !5
  %189 = load i64, ptr @m, align 8, !tbaa !5
  %.not96.not = icmp slt i64 %187, %189
  br i1 %.not96.not, label %.preheader112, label %._crit_edge134.loopexit, !llvm.loop !22

.lr.ph131:                                        ; preds = %._crit_edge129, %225
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef 0) #8
  %192 = load i64, ptr %191, align 8, !tbaa !5
  %193 = icmp eq i64 %192, 0
  br i1 %193, label %194, label %225

194:                                              ; preds = %.lr.ph131
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef 1) #8
  %196 = load i64, ptr %195, align 8, !tbaa !5
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef 2) #8
  %198 = load i64, ptr %197, align 8, !tbaa !5
  %199 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %196
  %200 = load i64, ptr %199, align 8, !tbaa !5
  %201 = icmp slt i64 %200, 4557430888798830399
  br i1 %201, label %202, label %211

202:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #8
  %203 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %199)
          to label %204 unwind label %209

204:                                              ; preds = %202
  %205 = getelementptr inbounds [63 x %"class.std::vector"], ptr @g, i64 0, i64 %198
  %206 = extractvalue { i64, i64 } %203, 0
  store i64 %206, ptr %25, align 8
  %207 = extractvalue { i64, i64 } %203, 1
  store i64 %207, ptr %167, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %205, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %208 unwind label %209

208:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %211

209:                                              ; preds = %204, %202
  %210 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %224

211:                                              ; preds = %208, %194
  %212 = getelementptr inbounds [63 x i64], ptr @_ZZ4mainE3dis, i64 0, i64 %198
  %213 = load i64, ptr %212, align 8, !tbaa !5
  %214 = icmp slt i64 %213, 4557430888798830399
  br i1 %214, label %215, label %225

215:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #8
  %216 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %212)
          to label %217 unwind label %222

217:                                              ; preds = %215
  %218 = getelementptr inbounds [63 x %"class.std::vector"], ptr @g, i64 0, i64 %196
  %219 = extractvalue { i64, i64 } %216, 0
  store i64 %219, ptr %26, align 8
  %220 = extractvalue { i64, i64 } %216, 1
  store i64 %220, ptr %168, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %218, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %221 unwind label %222

221:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  br label %225

222:                                              ; preds = %217, %215
  %223 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  br label %224

224:                                              ; preds = %222, %209
  %.pn = phi { ptr, i32 } [ %223, %222 ], [ %210, %209 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  br label %332

225:                                              ; preds = %211, %221, %.lr.ph131
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %227 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %227, label %.lr.ph131, label %._crit_edge132

.preheader111:                                    ; preds = %._crit_edge134, %._crit_edge153
  %228 = phi i64 [ %236, %._crit_edge153 ], [ %171, %._crit_edge134 ]
  %storemerge97155 = phi i64 [ %238, %._crit_edge153 ], [ 1, %._crit_edge134 ]
  %.not99149 = icmp sgt i64 %storemerge97155, %228
  br i1 %.not99149, label %._crit_edge153, label %.lr.ph152.preheader

.lr.ph152.preheader:                              ; preds = %.preheader111
  %229 = add i64 %storemerge97155, -1
  %xtraiter = and i64 %storemerge97155, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %230 = icmp ult i64 %229, 3
  br label %.lr.ph152

._crit_edge156:                                   ; preds = %._crit_edge153, %._crit_edge134
  %.lcssa = phi i64 [ %171, %._crit_edge134 ], [ %236, %._crit_edge153 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  %231 = load i64, ptr @rt, align 8, !tbaa !5
  %232 = add nsw i64 %231, 1
  store i64 %232, ptr @rt, align 8, !tbaa !5
  %233 = getelementptr inbounds [63 x [63 x i64]], ptr getelementptr inbounds (i8, ptr @f, i64 31752), i64 0, i64 %.lcssa, i64 %232
  %234 = load i64, ptr %233, align 8, !tbaa !5
  %235 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %234)
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0

._crit_edge153.loopexit:                          ; preds = %326
  %.pre162 = load i64, ptr %27, align 8, !tbaa !5
  br label %._crit_edge153

._crit_edge153:                                   ; preds = %._crit_edge153.loopexit, %.preheader111
  %236 = phi i64 [ %329, %._crit_edge153.loopexit ], [ %228, %.preheader111 ]
  %237 = phi i64 [ %.pre162, %._crit_edge153.loopexit ], [ %storemerge97155, %.preheader111 ]
  %238 = add nsw i64 %237, 1
  store i64 %238, ptr %27, align 8, !tbaa !5
  %.not98.not = icmp slt i64 %237, %236
  br i1 %.not98.not, label %.preheader111, label %._crit_edge156, !llvm.loop !23

.lr.ph152:                                        ; preds = %.lr.ph152.preheader, %326
  %indvars.iv.in = phi i64 [ %indvars.iv, %326 ], [ %storemerge97155, %.lr.ph152.preheader ]
  %.087151 = phi i64 [ %328, %326 ], [ %storemerge97155, %.lr.ph152.preheader ]
  %.088150 = phi i64 [ %327, %326 ], [ 1, %.lr.ph152.preheader ]
  %indvars.iv = add i64 %indvars.iv.in, 1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2056) @_ZZ4mainE3ctr, i8 0, i64 2056, i1 false)
  %.not100135 = icmp sgt i64 %.088150, %.087151
  br i1 %.not100135, label %.preheader, label %.lr.ph138.preheader

.lr.ph138.preheader:                              ; preds = %.lr.ph152
  br i1 %lcmp.mod.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol

.lr.ph138.prol:                                   ; preds = %.lr.ph138.preheader, %.lr.ph138.prol
  %.086136.prol = phi i64 [ %245, %.lr.ph138.prol ], [ %.088150, %.lr.ph138.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph138.prol ], [ 0, %.lr.ph138.preheader ]
  %239 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %.086136.prol
  %240 = load i8, ptr %239, align 1, !tbaa !9
  %241 = sext i8 %240 to i64
  %242 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %241
  %243 = load i64, ptr %242, align 8, !tbaa !5
  %244 = add nsw i64 %243, 1
  store i64 %244, ptr %242, align 8, !tbaa !5
  %245 = add nuw i64 %.086136.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol, !llvm.loop !24

.lr.ph138.prol.loopexit:                          ; preds = %.lr.ph138.prol, %.lr.ph138.preheader
  %.086136.unr = phi i64 [ %.088150, %.lr.ph138.preheader ], [ %245, %.lr.ph138.prol ]
  br i1 %230, label %.preheader, label %.lr.ph138

.preheader:                                       ; preds = %.lr.ph138.prol.loopexit, %.lr.ph138, %.lr.ph152
  %246 = load i64, ptr @m, align 8, !tbaa !5
  %.not101145 = icmp slt i64 %246, 1
  br i1 %.not101145, label %._crit_edge148, label %.lr.ph147

.lr.ph147:                                        ; preds = %.preheader
  %247 = icmp slt i64 %.088150, %.087151
  br label %277

.lr.ph138:                                        ; preds = %.lr.ph138.prol.loopexit, %.lr.ph138
  %.086136 = phi i64 [ %275, %.lr.ph138 ], [ %.086136.unr, %.lr.ph138.prol.loopexit ]
  %248 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %.086136
  %249 = load i8, ptr %248, align 1, !tbaa !9
  %250 = sext i8 %249 to i64
  %251 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %250
  %252 = load i64, ptr %251, align 8, !tbaa !5
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %251, align 8, !tbaa !5
  %254 = add nuw i64 %.086136, 1
  %255 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %254
  %256 = load i8, ptr %255, align 1, !tbaa !9
  %257 = sext i8 %256 to i64
  %258 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %257
  %259 = load i64, ptr %258, align 8, !tbaa !5
  %260 = add nsw i64 %259, 1
  store i64 %260, ptr %258, align 8, !tbaa !5
  %261 = add nuw i64 %.086136, 2
  %262 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %261
  %263 = load i8, ptr %262, align 1, !tbaa !9
  %264 = sext i8 %263 to i64
  %265 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %264
  %266 = load i64, ptr %265, align 8, !tbaa !5
  %267 = add nsw i64 %266, 1
  store i64 %267, ptr %265, align 8, !tbaa !5
  %268 = add nuw i64 %.086136, 3
  %269 = getelementptr inbounds [63 x i8], ptr @buf, i64 0, i64 %268
  %270 = load i8, ptr %269, align 1, !tbaa !9
  %271 = sext i8 %270 to i64
  %272 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %271
  %273 = load i64, ptr %272, align 8, !tbaa !5
  %274 = add nsw i64 %273, 1
  store i64 %274, ptr %272, align 8, !tbaa !5
  %275 = add nuw i64 %.086136, 4
  %exitcond.not.3 = icmp eq i64 %268, %indvars.iv.in
  br i1 %exitcond.not.3, label %.preheader, label %.lr.ph138, !llvm.loop !26

._crit_edge148:                                   ; preds = %._crit_edge144, %.preheader
  %276 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %.088150, i64 %.087151
  invoke void @_Z8dijkstraPx(ptr noundef nonnull %276)
          to label %326 unwind label %330

277:                                              ; preds = %.lr.ph147, %._crit_edge144
  %.085146 = phi i64 [ 1, %.lr.ph147 ], [ %283, %._crit_edge144 ]
  %278 = getelementptr inbounds [63 x %"class.std::vector.0"], ptr @e, i64 0, i64 %.085146
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #8
  %279 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %278) #8
  store ptr %279, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #8
  %280 = call ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %278) #8
  store ptr %280, ptr %29, align 8
  %281 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  br i1 %281, label %.lr.ph143, label %._crit_edge144

.lr.ph143:                                        ; preds = %277
  %282 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %.088150, i64 %.087151, i64 %.085146
  br label %285

._crit_edge144:                                   ; preds = %323, %277
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #8
  %283 = add nuw nsw i64 %.085146, 1
  %284 = load i64, ptr @m, align 8, !tbaa !5
  %.not101.not = icmp slt i64 %.085146, %284
  br i1 %.not101.not, label %277, label %._crit_edge148, !llvm.loop !27

285:                                              ; preds = %.lr.ph143, %323
  %286 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  %287 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 0) #8
  %288 = load i64, ptr %287, align 8, !tbaa !5
  %289 = icmp eq i64 %288, 0
  br i1 %289, label %290, label %.loopexit

290:                                              ; preds = %285
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 1) #8
  %292 = load i64, ptr %291, align 8, !tbaa !5
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 2) #8
  %294 = load i64, ptr %293, align 8, !tbaa !5
  br i1 %247, label %.lr.ph141, label %.loopexit

.lr.ph141:                                        ; preds = %290, %.lr.ph141
  %.0139 = phi i64 [ %297, %.lr.ph141 ], [ %.088150, %290 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #8
  %295 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %.088150, i64 %.0139, i64 %292
  %296 = load i64, ptr %295, align 8, !tbaa !5
  %297 = add nuw nsw i64 %.0139, 1
  %298 = getelementptr inbounds [63 x [63 x [63 x i64]]], ptr @f, i64 0, i64 %297, i64 %.087151, i64 %294
  %299 = load i64, ptr %298, align 8, !tbaa !5
  %300 = add nsw i64 %299, %296
  store i64 %300, ptr %30, align 8, !tbaa !5
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %302 = load i64, ptr %301, align 8, !tbaa !5
  store i64 %302, ptr %282, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  %exitcond158.not = icmp eq i64 %297, %.087151
  br i1 %exitcond158.not, label %.loopexit, label %.lr.ph141, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph141, %290, %285
  %303 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 0) #8
  %304 = load i64, ptr %303, align 8, !tbaa !5
  %305 = icmp eq i64 %304, 1
  br i1 %305, label %306, label %316

306:                                              ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #8
  %307 = load i64, ptr %27, align 8, !tbaa !5
  %308 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 1) #8
  %309 = load i64, ptr %308, align 8, !tbaa !5
  %310 = getelementptr inbounds [257 x i64], ptr @_ZZ4mainE3ctr, i64 0, i64 %309
  %311 = load i64, ptr %310, align 8, !tbaa !5
  %312 = icmp sgt i64 %311, 0
  %.neg = sext i1 %312 to i64
  %313 = add i64 %307, %.neg
  store i64 %313, ptr %31, align 8, !tbaa !5
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef nonnull align 8 dereferenceable(8) %31)
  %315 = load i64, ptr %314, align 8, !tbaa !5
  store i64 %315, ptr %282, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  br label %316

316:                                              ; preds = %306, %.loopexit
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef 0) #8
  %318 = load i64, ptr %317, align 8, !tbaa !5
  %319 = icmp eq i64 %318, 2
  br i1 %319, label %320, label %323

320:                                              ; preds = %316
  %321 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %322 = load i64, ptr %321, align 8, !tbaa !5
  store i64 %322, ptr %282, align 8, !tbaa !5
  br label %323

323:                                              ; preds = %320, %316
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  %325 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt6vectorIxSaIxEES1_IS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  br i1 %325, label %285, label %._crit_edge144

326:                                              ; preds = %._crit_edge148
  %327 = add nuw nsw i64 %.088150, 1
  %328 = add nsw i64 %.087151, 1
  %329 = load i64, ptr @n, align 8, !tbaa !5
  %.not99.not = icmp slt i64 %.087151, %329
  br i1 %.not99.not, label %.lr.ph152, label %._crit_edge153.loopexit, !llvm.loop !29

330:                                              ; preds = %._crit_edge148
  %331 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  br label %332

332:                                              ; preds = %130, %157, %330, %224, %116
  %.pn106 = phi { ptr, i32 } [ %117, %116 ], [ %.pn, %224 ], [ %331, %330 ], [ %158, %157 ], [ %131, %130 ]
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  br label %333

333:                                              ; preds = %332, %99
  %.pn108.pn = phi { ptr, i32 } [ %.pn108, %99 ], [ %.pn106, %332 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn108.pn
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

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

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

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

; 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 @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #7

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

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 = { 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 #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !11}
!20 = !{!14, !6, i64 0}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11}
!29 = distinct !{!29, !11}


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