; LLVM IR from eyangch/competitive-programming :: USACOtraining/3.3 (camelot)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.3", [8 x i8] }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@distki = external dso_local global [2 x [26 x [30 x i32]]], align 16
@dist = external dso_local global [26 x [30 x [26 x [30 x i32]]]], align 16
@distkn = external dso_local global [780 x [26 x [30 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3p2iii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7genLocsiiib(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsiiibRA26_A30_i(i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 4 dereferenceable(3120)) #2

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::priority_queue", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %39 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %40 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %41 = getelementptr i8, ptr %40, i64 -24
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %42
  %44 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %43, ptr noundef null)
  %45 = load ptr, ptr @stdin, align 8, !tbaa !8
  %46 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %45)
  %47 = load ptr, ptr @stdout, align 8, !tbaa !8
  %48 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %53 = load i8, ptr %4, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = sub nsw i32 %54, 65
  %56 = load i32, ptr %5, align 4, !tbaa !12
  %57 = sub nsw i32 %56, 1
  %58 = call noundef i32 @_Z3p2iii(i32 noundef %55, i32 noundef %57)
  store i32 %58, ptr %7, align 4, !tbaa !12
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %59 unwind label %79

59:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %60

60:                                               ; preds = %78, %59
  %61 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %62 unwind label %83

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %64 unwind label %83

64:                                               ; preds = %62
  %65 = load ptr, ptr %63, align 8, !tbaa !5
  %66 = getelementptr i8, ptr %65, i64 -24
  %67 = load i64, ptr %66, align 8
  %68 = getelementptr inbounds i8, ptr %63, i64 %67
  %69 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %68)
          to label %70 unwind label %83

70:                                               ; preds = %64
  br i1 %69, label %71, label %91

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %72 = load i8, ptr %4, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = sub nsw i32 %73, 65
  %75 = load i32, ptr %5, align 4, !tbaa !12
  %76 = sub nsw i32 %75, 1
  %77 = call noundef i32 @_Z3p2iii(i32 noundef %74, i32 noundef %76)
  store i32 %77, ptr %11, align 4, !tbaa !12
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %78 unwind label %87

78:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %60, !llvm.loop !14

79:                                               ; preds = %0
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %516

83:                                               ; preds = %91, %64, %62, %60
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %8, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %9, align 4
  br label %515

87:                                               ; preds = %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %8, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %515

91:                                               ; preds = %70
  %92 = load i32, ptr %2, align 4, !tbaa !12
  %93 = load i32, ptr %3, align 4, !tbaa !12
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #7
  %95 = load i32, ptr %94, align 4, !tbaa !12
  invoke void @_Z3bfsiiibRA26_A30_i(i32 noundef %92, i32 noundef %93, i32 noundef %95, i1 noundef zeroext false, ptr noundef nonnull align 4 dereferenceable(3120) @distki)
          to label %96 unwind label %83

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !12
  br label %97

97:                                               ; preds = %129, %96
  %98 = load i32, ptr %12, align 4, !tbaa !12
  %99 = load i32, ptr %2, align 4, !tbaa !12
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 4, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %132

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !12
  br label %103

103:                                              ; preds = %121, %102
  %104 = load i32, ptr %14, align 4, !tbaa !12
  %105 = load i32, ptr %3, align 4, !tbaa !12
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 7, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %128

108:                                              ; preds = %103
  %109 = load i32, ptr %2, align 4, !tbaa !12
  %110 = load i32, ptr %3, align 4, !tbaa !12
  %111 = load i32, ptr %12, align 4, !tbaa !12
  %112 = load i32, ptr %14, align 4, !tbaa !12
  %113 = call noundef i32 @_Z3p2iii(i32 noundef %111, i32 noundef %112)
  %114 = load i32, ptr %12, align 4, !tbaa !12
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %115
  %117 = load i32, ptr %14, align 4, !tbaa !12
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %116, i64 0, i64 %118
  invoke void @_Z3bfsiiibRA26_A30_i(i32 noundef %109, i32 noundef %110, i32 noundef %113, i1 noundef zeroext true, ptr noundef nonnull align 4 dereferenceable(3120) %119)
          to label %120 unwind label %124

120:                                              ; preds = %108
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %14, align 4, !tbaa !12
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %14, align 4, !tbaa !12
  br label %103, !llvm.loop !16

124:                                              ; preds = %108
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %8, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %515

128:                                              ; preds = %107
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %12, align 4, !tbaa !12
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !12
  br label %97, !llvm.loop !17

132:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !12
  br label %133

133:                                              ; preds = %368, %132
  %134 = load i32, ptr %15, align 4, !tbaa !12
  %135 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %136 = trunc i64 %135 to i32
  %137 = icmp slt i32 %134, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %133
  store i32 10, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %373

139:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %140 unwind label %146

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !12
  br label %141

141:                                              ; preds = %228, %140
  %142 = load i32, ptr %17, align 4, !tbaa !12
  %143 = load i32, ptr %2, align 4, !tbaa !12
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %150, label %145

145:                                              ; preds = %141
  store i32 13, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %231

146:                                              ; preds = %139
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %8, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %9, align 4
  br label %372

150:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !12
  br label %151

151:                                              ; preds = %220, %150
  %152 = load i32, ptr %18, align 4, !tbaa !12
  %153 = load i32, ptr %3, align 4, !tbaa !12
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 16, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %227

156:                                              ; preds = %151
  %157 = load i32, ptr %15, align 4, !tbaa !12
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %158) #7
  %160 = load i32, ptr %159, align 4, !tbaa !12
  %161 = sdiv i32 %160, 31
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %162
  %164 = load i32, ptr %15, align 4, !tbaa !12
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %165) #7
  %167 = load i32, ptr %166, align 4, !tbaa !12
  %168 = srem i32 %167, 31
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %163, i64 0, i64 %169
  %171 = load i32, ptr %17, align 4, !tbaa !12
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [26 x [30 x i32]], ptr %170, i64 0, i64 %172
  %174 = load i32, ptr %18, align 4, !tbaa !12
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [30 x i32], ptr %173, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !12
  %178 = load i32, ptr %17, align 4, !tbaa !12
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [26 x [30 x i32]], ptr @distki, i64 0, i64 %179
  %181 = load i32, ptr %18, align 4, !tbaa !12
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [30 x i32], ptr %180, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !12
  %185 = add nsw i32 %177, %184
  %186 = load i32, ptr %15, align 4, !tbaa !12
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %187
  %189 = load i32, ptr %17, align 4, !tbaa !12
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [26 x [30 x i32]], ptr %188, i64 0, i64 %190
  %192 = load i32, ptr %18, align 4, !tbaa !12
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [30 x i32], ptr %191, i64 0, i64 %193
  store i32 %185, ptr %194, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %195 = load i32, ptr %15, align 4, !tbaa !12
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %196
  %198 = load i32, ptr %17, align 4, !tbaa !12
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [26 x [30 x i32]], ptr %197, i64 0, i64 %199
  %201 = load i32, ptr %18, align 4, !tbaa !12
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [30 x i32], ptr %200, i64 0, i64 %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %204 = load i32, ptr %17, align 4, !tbaa !12
  %205 = mul nsw i32 %204, 31
  %206 = load i32, ptr %18, align 4, !tbaa !12
  %207 = add nsw i32 %205, %206
  store i32 %207, ptr %20, align 4, !tbaa !12
  %208 = invoke i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %203, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %209 unwind label %223

209:                                              ; preds = %156
  store i64 %208, ptr %19, align 4
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %16, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %210 unwind label %223

210:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %211 = load i32, ptr %15, align 4, !tbaa !12
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %212
  %214 = load i32, ptr %17, align 4, !tbaa !12
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [26 x [30 x i32]], ptr %213, i64 0, i64 %215
  %217 = load i32, ptr %18, align 4, !tbaa !12
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [30 x i32], ptr %216, i64 0, i64 %218
  store i32 32767, ptr %219, align 4, !tbaa !12
  br label %220

220:                                              ; preds = %210
  %221 = load i32, ptr %18, align 4, !tbaa !12
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %18, align 4, !tbaa !12
  br label %151, !llvm.loop !18

223:                                              ; preds = %209, %156
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %8, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %371

227:                                              ; preds = %155
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %17, align 4, !tbaa !12
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %17, align 4, !tbaa !12
  br label %141, !llvm.loop !19

231:                                              ; preds = %145
  %232 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %233 unwind label %282

233:                                              ; preds = %231
  %234 = getelementptr inbounds %"struct.std::pair", ptr %232, i32 0, i32 0
  %235 = load i32, ptr %234, align 4, !tbaa !20
  %236 = load i32, ptr %15, align 4, !tbaa !12
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %237
  %239 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %240 unwind label %282

240:                                              ; preds = %233
  %241 = getelementptr inbounds %"struct.std::pair", ptr %239, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !22
  %243 = sdiv i32 %242, 31
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [26 x [30 x i32]], ptr %238, i64 0, i64 %244
  %246 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %247 unwind label %282

247:                                              ; preds = %240
  %248 = getelementptr inbounds %"struct.std::pair", ptr %246, i32 0, i32 1
  %249 = load i32, ptr %248, align 4, !tbaa !22
  %250 = srem i32 %249, 31
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [30 x i32], ptr %245, i64 0, i64 %251
  store i32 %235, ptr %252, align 4, !tbaa !12
  br label %253

253:                                              ; preds = %363, %361, %247
  %254 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %255 unwind label %282

255:                                              ; preds = %253
  %256 = xor i1 %254, true
  br i1 %256, label %257, label %367

257:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %258 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %259 unwind label %286

259:                                              ; preds = %257
  %260 = getelementptr inbounds %"struct.std::pair", ptr %258, i32 0, i32 0
  %261 = load i32, ptr %260, align 4, !tbaa !20
  store i32 %261, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %262 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %263 unwind label %290

263:                                              ; preds = %259
  %264 = getelementptr inbounds %"struct.std::pair", ptr %262, i32 0, i32 1
  %265 = load i32, ptr %264, align 4, !tbaa !22
  store i32 %265, ptr %22, align 4, !tbaa !12
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %16)
          to label %266 unwind label %290

266:                                              ; preds = %263
  %267 = load i32, ptr %15, align 4, !tbaa !12
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %268
  %270 = load i32, ptr %22, align 4, !tbaa !12
  %271 = sdiv i32 %270, 31
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [26 x [30 x i32]], ptr %269, i64 0, i64 %272
  %274 = load i32, ptr %22, align 4, !tbaa !12
  %275 = srem i32 %274, 31
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [30 x i32], ptr %273, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !12
  %279 = load i32, ptr %21, align 4, !tbaa !12
  %280 = icmp slt i32 %278, %279
  br i1 %280, label %281, label %294

281:                                              ; preds = %266
  store i32 19, ptr %13, align 4
  br label %361, !llvm.loop !23

282:                                              ; preds = %253, %240, %233, %231
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %8, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %9, align 4
  br label %371

286:                                              ; preds = %257
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %8, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %9, align 4
  br label %366

290:                                              ; preds = %263, %259
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %8, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %9, align 4
  br label %365

294:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  %295 = load i32, ptr %22, align 4, !tbaa !12
  %296 = load i32, ptr %2, align 4, !tbaa !12
  %297 = load i32, ptr %3, align 4, !tbaa !12
  invoke void @_Z7genLocsiiib(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %23, i32 noundef %295, i32 noundef %296, i32 noundef %297, i1 noundef zeroext true)
          to label %298 unwind label %310

298:                                              ; preds = %294
  %299 = load i32, ptr %21, align 4, !tbaa !12
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store ptr %23, ptr %24, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %301 = load ptr, ptr %24, align 8, !tbaa !8
  %302 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %301) #7
  %303 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %302, ptr %303, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %304 = load ptr, ptr %24, align 8, !tbaa !8
  %305 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %304) #7
  %306 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %305, ptr %306, align 8
  br label %307

307:                                              ; preds = %354, %298
  %308 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br i1 %308, label %314, label %309

309:                                              ; preds = %307
  store i32 21, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %360

310:                                              ; preds = %294
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %8, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %9, align 4
  br label %364

314:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  %316 = load i32, ptr %315, align 4, !tbaa !12
  store i32 %316, ptr %27, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %317 = load i32, ptr %27, align 4, !tbaa !12
  %318 = sdiv i32 %317, 31
  store i32 %318, ptr %28, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %319 = load i32, ptr %27, align 4, !tbaa !12
  %320 = srem i32 %319, 31
  store i32 %320, ptr %29, align 4, !tbaa !12
  %321 = load i32, ptr %15, align 4, !tbaa !12
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %322
  %324 = load i32, ptr %28, align 4, !tbaa !12
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [26 x [30 x i32]], ptr %323, i64 0, i64 %325
  %327 = load i32, ptr %29, align 4, !tbaa !12
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [30 x i32], ptr %326, i64 0, i64 %328
  %330 = load i32, ptr %329, align 4, !tbaa !12
  %331 = load i32, ptr %21, align 4, !tbaa !12
  %332 = icmp sle i32 %330, %331
  br i1 %332, label %333, label %334

333:                                              ; preds = %314
  store i32 22, ptr %13, align 4
  br label %348

334:                                              ; preds = %314
  %335 = load i32, ptr %21, align 4, !tbaa !12
  %336 = load i32, ptr %15, align 4, !tbaa !12
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %337
  %339 = load i32, ptr %28, align 4, !tbaa !12
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [26 x [30 x i32]], ptr %338, i64 0, i64 %340
  %342 = load i32, ptr %29, align 4, !tbaa !12
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [30 x i32], ptr %341, i64 0, i64 %343
  store i32 %335, ptr %344, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %345 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %346 unwind label %356

346:                                              ; preds = %334
  store i64 %345, ptr %30, align 4
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %16, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %347 unwind label %356

347:                                              ; preds = %346
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  store i32 0, ptr %13, align 4
  br label %348

348:                                              ; preds = %347, %333
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %349 = load i32, ptr %13, align 4
  switch i32 %349, label %351 [
    i32 0, label %350
  ]

350:                                              ; preds = %348
  store i32 0, ptr %13, align 4
  br label %351

351:                                              ; preds = %350, %348
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  %352 = load i32, ptr %13, align 4
  switch i32 %352, label %522 [
    i32 0, label %353
    i32 22, label %354
  ]

353:                                              ; preds = %351
  br label %354

354:                                              ; preds = %353, %351
  %355 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  br label %307

356:                                              ; preds = %346, %334
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %8, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  br label %364

360:                                              ; preds = %309
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  store i32 0, ptr %13, align 4
  br label %361

361:                                              ; preds = %360, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  %362 = load i32, ptr %13, align 4
  switch i32 %362, label %522 [
    i32 0, label %363
    i32 19, label %253
  ]

363:                                              ; preds = %361
  br label %253, !llvm.loop !23

364:                                              ; preds = %356, %310
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  br label %365

365:                                              ; preds = %364, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %366

366:                                              ; preds = %365, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %371

367:                                              ; preds = %255
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %368

368:                                              ; preds = %367
  %369 = load i32, ptr %15, align 4, !tbaa !12
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %15, align 4, !tbaa !12
  br label %133, !llvm.loop !24

371:                                              ; preds = %366, %282, %223
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %16) #7
  br label %372

372:                                              ; preds = %371, %146
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %515

373:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 32767, ptr %31, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !12
  br label %374

374:                                              ; preds = %500, %373
  %375 = load i32, ptr %32, align 4, !tbaa !12
  %376 = load i32, ptr %2, align 4, !tbaa !12
  %377 = icmp slt i32 %375, %376
  br i1 %377, label %379, label %378

378:                                              ; preds = %374
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %503

379:                                              ; preds = %374
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store i32 0, ptr %33, align 4, !tbaa !12
  br label %380

380:                                              ; preds = %491, %379
  %381 = load i32, ptr %33, align 4, !tbaa !12
  %382 = load i32, ptr %3, align 4, !tbaa !12
  %383 = icmp slt i32 %381, %382
  br i1 %383, label %385, label %384

384:                                              ; preds = %380
  store i32 26, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %499

385:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %386 = load i32, ptr %32, align 4, !tbaa !12
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [26 x [30 x i32]], ptr @distki, i64 0, i64 %387
  %389 = load i32, ptr %33, align 4, !tbaa !12
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [30 x i32], ptr %388, i64 0, i64 %390
  %392 = load i32, ptr %391, align 4, !tbaa !12
  store i32 %392, ptr %34, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 0, ptr %35, align 4, !tbaa !12
  br label %393

393:                                              ; preds = %423, %385
  %394 = load i32, ptr %35, align 4, !tbaa !12
  %395 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %396 = trunc i64 %395 to i32
  %397 = icmp slt i32 %394, %396
  br i1 %397, label %399, label %398

398:                                              ; preds = %393
  store i32 29, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %426

399:                                              ; preds = %393
  %400 = load i32, ptr %35, align 4, !tbaa !12
  %401 = sext i32 %400 to i64
  %402 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %401) #7
  %403 = load i32, ptr %402, align 4, !tbaa !12
  %404 = sdiv i32 %403, 31
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %405
  %407 = load i32, ptr %35, align 4, !tbaa !12
  %408 = sext i32 %407 to i64
  %409 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %408) #7
  %410 = load i32, ptr %409, align 4, !tbaa !12
  %411 = srem i32 %410, 31
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %406, i64 0, i64 %412
  %414 = load i32, ptr %32, align 4, !tbaa !12
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [26 x [30 x i32]], ptr %413, i64 0, i64 %415
  %417 = load i32, ptr %33, align 4, !tbaa !12
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds [30 x i32], ptr %416, i64 0, i64 %418
  %420 = load i32, ptr %419, align 4, !tbaa !12
  %421 = load i32, ptr %34, align 4, !tbaa !12
  %422 = add nsw i32 %421, %420
  store i32 %422, ptr %34, align 4, !tbaa !12
  br label %423

423:                                              ; preds = %399
  %424 = load i32, ptr %35, align 4, !tbaa !12
  %425 = add nsw i32 %424, 1
  store i32 %425, ptr %35, align 4, !tbaa !12
  br label %393, !llvm.loop !25

426:                                              ; preds = %398
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %427 = load i32, ptr %34, align 4, !tbaa !12
  store i32 %427, ptr %36, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  store i32 0, ptr %37, align 4, !tbaa !12
  br label %428

428:                                              ; preds = %480, %426
  %429 = load i32, ptr %37, align 4, !tbaa !12
  %430 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %431 = trunc i64 %430 to i32
  %432 = icmp slt i32 %429, %431
  br i1 %432, label %434, label %433

433:                                              ; preds = %428
  store i32 32, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  br label %487

434:                                              ; preds = %428
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  %435 = load i32, ptr %34, align 4, !tbaa !12
  %436 = load i32, ptr %32, align 4, !tbaa !12
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [26 x [30 x i32]], ptr @distki, i64 0, i64 %437
  %439 = load i32, ptr %33, align 4, !tbaa !12
  %440 = sext i32 %439 to i64
  %441 = getelementptr inbounds [30 x i32], ptr %438, i64 0, i64 %440
  %442 = load i32, ptr %441, align 4, !tbaa !12
  %443 = sub nsw i32 %435, %442
  %444 = load i32, ptr %37, align 4, !tbaa !12
  %445 = sext i32 %444 to i64
  %446 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %445) #7
  %447 = load i32, ptr %446, align 4, !tbaa !12
  %448 = sdiv i32 %447, 31
  %449 = sext i32 %448 to i64
  %450 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %449
  %451 = load i32, ptr %37, align 4, !tbaa !12
  %452 = sext i32 %451 to i64
  %453 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %452) #7
  %454 = load i32, ptr %453, align 4, !tbaa !12
  %455 = srem i32 %454, 31
  %456 = sext i32 %455 to i64
  %457 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %450, i64 0, i64 %456
  %458 = load i32, ptr %32, align 4, !tbaa !12
  %459 = sext i32 %458 to i64
  %460 = getelementptr inbounds [26 x [30 x i32]], ptr %457, i64 0, i64 %459
  %461 = load i32, ptr %33, align 4, !tbaa !12
  %462 = sext i32 %461 to i64
  %463 = getelementptr inbounds [30 x i32], ptr %460, i64 0, i64 %462
  %464 = load i32, ptr %463, align 4, !tbaa !12
  %465 = sub nsw i32 %443, %464
  %466 = load i32, ptr %37, align 4, !tbaa !12
  %467 = sext i32 %466 to i64
  %468 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %467
  %469 = load i32, ptr %32, align 4, !tbaa !12
  %470 = sext i32 %469 to i64
  %471 = getelementptr inbounds [26 x [30 x i32]], ptr %468, i64 0, i64 %470
  %472 = load i32, ptr %33, align 4, !tbaa !12
  %473 = sext i32 %472 to i64
  %474 = getelementptr inbounds [30 x i32], ptr %471, i64 0, i64 %473
  %475 = load i32, ptr %474, align 4, !tbaa !12
  %476 = add nsw i32 %465, %475
  store i32 %476, ptr %38, align 4, !tbaa !12
  %477 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %478 unwind label %483

478:                                              ; preds = %434
  %479 = load i32, ptr %477, align 4, !tbaa !12
  store i32 %479, ptr %36, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %480

480:                                              ; preds = %478
  %481 = load i32, ptr %37, align 4, !tbaa !12
  %482 = add nsw i32 %481, 1
  store i32 %482, ptr %37, align 4, !tbaa !12
  br label %428, !llvm.loop !26

483:                                              ; preds = %434
  %484 = landingpad { ptr, i32 }
          cleanup
  %485 = extractvalue { ptr, i32 } %484, 0
  store ptr %485, ptr %8, align 8
  %486 = extractvalue { ptr, i32 } %484, 1
  store i32 %486, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  br label %498

487:                                              ; preds = %433
  %488 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %489 unwind label %494

489:                                              ; preds = %487
  %490 = load i32, ptr %488, align 4, !tbaa !12
  store i32 %490, ptr %31, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %491

491:                                              ; preds = %489
  %492 = load i32, ptr %33, align 4, !tbaa !12
  %493 = add nsw i32 %492, 1
  store i32 %493, ptr %33, align 4, !tbaa !12
  br label %380, !llvm.loop !27

494:                                              ; preds = %487
  %495 = landingpad { ptr, i32 }
          cleanup
  %496 = extractvalue { ptr, i32 } %495, 0
  store ptr %496, ptr %8, align 8
  %497 = extractvalue { ptr, i32 } %495, 1
  store i32 %497, ptr %9, align 4
  br label %498

498:                                              ; preds = %494, %483
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %514

499:                                              ; preds = %384
  br label %500

500:                                              ; preds = %499
  %501 = load i32, ptr %32, align 4, !tbaa !12
  %502 = add nsw i32 %501, 1
  store i32 %502, ptr %32, align 4, !tbaa !12
  br label %374, !llvm.loop !28

503:                                              ; preds = %378
  %504 = load i32, ptr %31, align 4, !tbaa !12
  %505 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %504)
          to label %506 unwind label %510

506:                                              ; preds = %503
  %507 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %505, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %508 unwind label %510

508:                                              ; preds = %506
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %509 = load i32, ptr %1, align 4
  ret i32 %509

510:                                              ; preds = %506, %503
  %511 = landingpad { ptr, i32 }
          cleanup
  %512 = extractvalue { ptr, i32 } %511, 0
  store ptr %512, ptr %8, align 8
  %513 = extractvalue { ptr, i32 } %511, 1
  store i32 %513, ptr %9, align 4
  br label %514

514:                                              ; preds = %510, %498
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %515

515:                                              ; preds = %514, %372, %124, %87, %83
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  br label %516

516:                                              ; preds = %515, %79
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %517

517:                                              ; preds = %516
  %518 = load ptr, ptr %8, align 8
  %519 = load i32, ptr %9, align 4
  %520 = insertvalue { ptr, i32 } poison, ptr %518, 0
  %521 = insertvalue { ptr, i32 } %520, i32 %519, 1
  resume { ptr, i32 } %521

522:                                              ; preds = %361, %351
  unreachable
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #5

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.3", [8 x i8] }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@distki = external dso_local global [2 x [26 x [30 x i32]]], align 16
@dist = external dso_local global [26 x [30 x [26 x [30 x i32]]]], align 16
@distkn = external dso_local global [780 x [26 x [30 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3p2iii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7genLocsiiib(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsiiibRA26_A30_i(i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 4 dereferenceable(3120)) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::priority_queue", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = load ptr, ptr @stdin, align 8, !tbaa !8
  %28 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %27)
  %29 = load ptr, ptr @stdout, align 8, !tbaa !8
  %30 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %35 = load i8, ptr %3, align 1, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = add nsw i32 %36, -65
  %38 = load i32, ptr %4, align 4, !tbaa !12
  %39 = add nsw i32 %38, -1
  %40 = call noundef i32 @_Z3p2iii(i32 noundef %37, i32 noundef %39)
  store i32 %40, ptr %6, align 4, !tbaa !12
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %41 unwind label %61

41:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %42

42:                                               ; preds = %60, %41
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %44
  %47 = load ptr, ptr %45, align 8, !tbaa !5
  %48 = getelementptr i8, ptr %47, i64 -24
  %49 = load i64, ptr %48, align 8
  %50 = getelementptr inbounds i8, ptr %45, i64 %49
  %51 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %50)
          to label %52 unwind label %.loopexit

52:                                               ; preds = %46
  br i1 %51, label %53, label %65

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %54 = load i8, ptr %3, align 1, !tbaa !11
  %55 = sext i8 %54 to i32
  %56 = add nsw i32 %55, -65
  %57 = load i32, ptr %4, align 4, !tbaa !12
  %58 = add nsw i32 %57, -1
  %59 = call noundef i32 @_Z3p2iii(i32 noundef %56, i32 noundef %58)
  store i32 %59, ptr %8, align 4, !tbaa !12
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %60 unwind label %63

60:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %42, !llvm.loop !14

61:                                               ; preds = %0
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %270

.loopexit:                                        ; preds = %42, %44, %46
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %269

.loopexit.split-lp:                               ; preds = %65
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %269

63:                                               ; preds = %53
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %269

65:                                               ; preds = %52
  %66 = load i32, ptr %1, align 4, !tbaa !12
  %67 = load i32, ptr %2, align 4, !tbaa !12
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #7
  %69 = load i32, ptr %68, align 4, !tbaa !12
  invoke void @_Z3bfsiiibRA26_A30_i(i32 noundef %66, i32 noundef %67, i32 noundef %69, i1 noundef zeroext false, ptr noundef nonnull align 4 dereferenceable(3120) @distki)
          to label %.preheader103 unwind label %.loopexit.split-lp

.preheader103:                                    ; preds = %65
  %70 = load i32, ptr %1, align 4, !tbaa !12
  %71 = icmp sgt i32 %70, 0
  %72 = load i32, ptr %2, align 4
  %73 = icmp sgt i32 %72, 0
  %or.cond = select i1 %71, i1 %73, i1 false
  br i1 %or.cond, label %.preheader102, label %.preheader101

.preheader102:                                    ; preds = %.preheader103, %._crit_edge
  %74 = phi i32 [ %81, %._crit_edge ], [ %70, %.preheader103 ]
  %75 = phi i32 [ %82, %._crit_edge ], [ %72, %.preheader103 ]
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %._crit_edge ], [ 0, %.preheader103 ]
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader102
  %77 = trunc nuw nsw i64 %indvars.iv138 to i32
  br label %85

.preheader101:                                    ; preds = %._crit_edge, %.preheader103
  %78 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %79 = trunc i64 %78 to i32
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph118, label %._crit_edge119

._crit_edge.loopexit:                             ; preds = %91
  %.pre = load i32, ptr %1, align 4, !tbaa !12
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader102
  %81 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %74, %.preheader102 ]
  %82 = phi i32 [ %92, %._crit_edge.loopexit ], [ %75, %.preheader102 ]
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %83 = sext i32 %81 to i64
  %84 = icmp slt i64 %indvars.iv.next139, %83
  br i1 %84, label %.preheader102, label %.preheader101, !llvm.loop !16

85:                                               ; preds = %.lr.ph, %91
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %91 ]
  %86 = phi i32 [ %75, %.lr.ph ], [ %92, %91 ]
  %87 = load i32, ptr %1, align 4, !tbaa !12
  %88 = trunc nuw nsw i64 %indvars.iv to i32
  %89 = call noundef i32 @_Z3p2iii(i32 noundef %77, i32 noundef %88)
  %90 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv138, i64 %indvars.iv
  invoke void @_Z3bfsiiibRA26_A30_i(i32 noundef %87, i32 noundef %86, i32 noundef %89, i1 noundef zeroext true, ptr noundef nonnull align 4 dereferenceable(3120) %90)
          to label %91 unwind label %95

91:                                               ; preds = %85
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %92 = load i32, ptr %2, align 4, !tbaa !12
  %93 = sext i32 %92 to i64
  %94 = icmp slt i64 %indvars.iv.next, %93
  br i1 %94, label %85, label %._crit_edge.loopexit, !llvm.loop !18

95:                                               ; preds = %85
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %269

._crit_edge119:                                   ; preds = %._crit_edge116, %.preheader101
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  store i32 32767, ptr %18, align 4, !tbaa !12
  %97 = load i32, ptr %1, align 4, !tbaa !12
  %98 = icmp sgt i32 %97, 0
  %99 = load i32, ptr %2, align 4
  %100 = icmp sgt i32 %99, 0
  %or.cond173 = select i1 %98, i1 %100, i1 false
  br i1 %or.cond173, label %.preheader, label %._crit_edge133

.lr.ph118:                                        ; preds = %.preheader101, %._crit_edge116
  %indvars.iv147 = phi i64 [ %indvars.iv.next148, %._crit_edge116 ], [ 0, %.preheader101 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %101 = load i32, ptr %1, align 4, !tbaa !12
  %102 = icmp sgt i32 %101, 0
  %103 = load i32, ptr %2, align 4
  %104 = icmp sgt i32 %103, 0
  %or.cond175 = select i1 %102, i1 %104, i1 false
  br i1 %or.cond175, label %.preheader100, label %._crit_edge110

.preheader100:                                    ; preds = %.lr.ph118, %._crit_edge108
  %105 = phi i32 [ %123, %._crit_edge108 ], [ %101, %.lr.ph118 ]
  %106 = phi i32 [ %124, %._crit_edge108 ], [ %103, %.lr.ph118 ]
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %._crit_edge108 ], [ 0, %.lr.ph118 ]
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %.preheader100
  %108 = mul nuw nsw i64 %indvars.iv144, 31
  br label %127

._crit_edge110:                                   ; preds = %._crit_edge108, %.lr.ph118
  %109 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %110 = load i32, ptr %109, align 4, !tbaa !19
  %111 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %112 = getelementptr inbounds i8, ptr %111, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !21
  %114 = sdiv i32 %113, 31
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %117 = getelementptr inbounds i8, ptr %116, i64 4
  %118 = load i32, ptr %117, align 4, !tbaa !21
  %119 = srem i32 %118, 31
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %indvars.iv147, i64 %115, i64 %120
  store i32 %110, ptr %121, align 4, !tbaa !12
  %122 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br i1 %122, label %._crit_edge116, label %.lr.ph115

._crit_edge108.loopexit:                          ; preds = %146
  %.pre162 = load i32, ptr %1, align 4, !tbaa !12
  br label %._crit_edge108

._crit_edge108:                                   ; preds = %._crit_edge108.loopexit, %.preheader100
  %123 = phi i32 [ %.pre162, %._crit_edge108.loopexit ], [ %105, %.preheader100 ]
  %124 = phi i32 [ %147, %._crit_edge108.loopexit ], [ %106, %.preheader100 ]
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %125 = sext i32 %123 to i64
  %126 = icmp slt i64 %indvars.iv.next145, %125
  br i1 %126, label %.preheader100, label %._crit_edge110, !llvm.loop !22

127:                                              ; preds = %.lr.ph107, %146
  %indvars.iv141 = phi i64 [ 0, %.lr.ph107 ], [ %indvars.iv.next142, %146 ]
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv147) #7
  %129 = load i32, ptr %128, align 4, !tbaa !12
  %130 = sdiv i32 %129, 31
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv147) #7
  %133 = load i32, ptr %132, align 4, !tbaa !12
  %134 = srem i32 %133, 31
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %131, i64 %135, i64 %indvars.iv144, i64 %indvars.iv141
  %137 = load i32, ptr %136, align 4, !tbaa !12
  %138 = getelementptr inbounds [26 x [30 x i32]], ptr @distki, i64 0, i64 %indvars.iv144, i64 %indvars.iv141
  %139 = load i32, ptr %138, align 4, !tbaa !12
  %140 = add nsw i32 %139, %137
  %141 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %indvars.iv147, i64 %indvars.iv144, i64 %indvars.iv141
  store i32 %140, ptr %141, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %142 = add nuw nsw i64 %indvars.iv141, %108
  %143 = trunc nuw i64 %142 to i32
  store i32 %143, ptr %11, align 4, !tbaa !12
  %144 = invoke i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %141, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %145 unwind label %150

145:                                              ; preds = %127
  store i64 %144, ptr %10, align 8
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %146 unwind label %150

146:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  store i32 32767, ptr %141, align 4, !tbaa !12
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %147 = load i32, ptr %2, align 4, !tbaa !12
  %148 = sext i32 %147 to i64
  %149 = icmp slt i64 %indvars.iv.next142, %148
  br i1 %149, label %127, label %._crit_edge108.loopexit, !llvm.loop !23

150:                                              ; preds = %145, %127
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %204

.lr.ph115:                                        ; preds = %._crit_edge110, %197
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %152 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %153 = load i32, ptr %152, align 4, !tbaa !19
  store i32 %153, ptr %12, align 4, !tbaa !12
  %154 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %155 = getelementptr inbounds i8, ptr %154, i64 4
  %156 = load i32, ptr %155, align 4, !tbaa !21
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %157 unwind label %166

157:                                              ; preds = %.lr.ph115
  %158 = sdiv i32 %156, 31
  %159 = sext i32 %158 to i64
  %160 = srem i32 %156, 31
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %indvars.iv147, i64 %159, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !12
  %164 = load i32, ptr %12, align 4, !tbaa !12
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %197, label %168, !llvm.loop !24

166:                                              ; preds = %.lr.ph115
  %167 = landingpad { ptr, i32 }
          cleanup
  br label %200

168:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  %169 = load i32, ptr %1, align 4, !tbaa !12
  %170 = load i32, ptr %2, align 4, !tbaa !12
  invoke void @_Z7genLocsiiib(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %13, i32 noundef %156, i32 noundef %169, i32 noundef %170, i1 noundef zeroext true)
          to label %171 unwind label %177

171:                                              ; preds = %168
  %172 = load i32, ptr %12, align 4, !tbaa !12
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %12, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %174 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  store ptr %174, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %175 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  store ptr %175, ptr %15, align 8
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %176, label %.lr.ph112, label %._crit_edge113

._crit_edge113:                                   ; preds = %192, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  br label %197

177:                                              ; preds = %168
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %199

.lr.ph112:                                        ; preds = %171, %192
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %180 = load i32, ptr %179, align 4, !tbaa !12
  store i32 %180, ptr %16, align 4, !tbaa !12
  %181 = sdiv i32 %180, 31
  %182 = srem i32 %180, 31
  %183 = sext i32 %181 to i64
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %indvars.iv147, i64 %183, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !12
  %187 = load i32, ptr %12, align 4, !tbaa !12
  %.not = icmp sgt i32 %186, %187
  br i1 %.not, label %188, label %192

188:                                              ; preds = %.lr.ph112
  store i32 %187, ptr %185, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %189 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %190 unwind label %195

190:                                              ; preds = %188
  store i64 %189, ptr %17, align 8
  invoke void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %191 unwind label %195

191:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %192

192:                                              ; preds = %.lr.ph112, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %194 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %194, label %.lr.ph112, label %._crit_edge113

195:                                              ; preds = %190, %188
  %196 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %199

197:                                              ; preds = %157, %._crit_edge113
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %198 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br i1 %198, label %._crit_edge116, label %.lr.ph115

199:                                              ; preds = %195, %177
  %.pn = phi { ptr, i32 } [ %196, %195 ], [ %178, %177 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  br label %200

200:                                              ; preds = %199, %166
  %.pn.pn = phi { ptr, i32 } [ %.pn, %199 ], [ %167, %166 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %204

._crit_edge116:                                   ; preds = %197, %._crit_edge110
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %201 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %sext = shl i64 %201, 32
  %202 = ashr exact i64 %sext, 32
  %203 = icmp slt i64 %indvars.iv.next148, %202
  br i1 %203, label %.lr.ph118, label %._crit_edge119, !llvm.loop !25

204:                                              ; preds = %200, %150
  %.pn93 = phi { ptr, i32 } [ %151, %150 ], [ %.pn.pn, %200 ]
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %269

.preheader:                                       ; preds = %._crit_edge119, %._crit_edge131
  %205 = phi i32 [ %211, %._crit_edge131 ], [ 32767, %._crit_edge119 ]
  %206 = phi i32 [ %212, %._crit_edge131 ], [ %97, %._crit_edge119 ]
  %207 = phi i32 [ %213, %._crit_edge131 ], [ %99, %._crit_edge119 ]
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %._crit_edge131 ], [ 0, %._crit_edge119 ]
  %208 = icmp sgt i32 %207, 0
  br i1 %208, label %.lr.ph130, label %._crit_edge131

._crit_edge133:                                   ; preds = %._crit_edge131, %._crit_edge119
  %209 = phi i32 [ 32767, %._crit_edge119 ], [ %211, %._crit_edge131 ]
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %209)
          to label %264 unwind label %267

._crit_edge131.loopexit:                          ; preds = %._crit_edge128
  %.pre163 = load i32, ptr %1, align 4, !tbaa !12
  br label %._crit_edge131

._crit_edge131:                                   ; preds = %._crit_edge131.loopexit, %.preheader
  %211 = phi i32 [ %239, %._crit_edge131.loopexit ], [ %205, %.preheader ]
  %212 = phi i32 [ %.pre163, %._crit_edge131.loopexit ], [ %206, %.preheader ]
  %213 = phi i32 [ %240, %._crit_edge131.loopexit ], [ %207, %.preheader ]
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %214 = sext i32 %212 to i64
  %215 = icmp slt i64 %indvars.iv.next160, %214
  br i1 %215, label %.preheader, label %._crit_edge133, !llvm.loop !26

.lr.ph130:                                        ; preds = %.preheader, %._crit_edge128
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %._crit_edge128 ], [ 0, %.preheader ]
  %216 = getelementptr inbounds [26 x [30 x i32]], ptr @distki, i64 0, i64 %indvars.iv159, i64 %indvars.iv156
  %217 = load i32, ptr %216, align 4, !tbaa !12
  %218 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %219 = trunc i64 %218 to i32
  %220 = icmp sgt i32 %219, 0
  br i1 %220, label %.lr.ph123, label %._crit_edge124

._crit_edge124:                                   ; preds = %.lr.ph123, %.lr.ph130
  %.074.lcssa = phi i32 [ %217, %.lr.ph130 ], [ %234, %.lr.ph123 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  store i32 %.074.lcssa, ptr %19, align 4, !tbaa !12
  %221 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %222 = trunc i64 %221 to i32
  %223 = icmp sgt i32 %222, 0
  br i1 %223, label %.lr.ph127, label %._crit_edge128

.lr.ph123:                                        ; preds = %.lr.ph130, %.lr.ph123
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %.lr.ph123 ], [ 0, %.lr.ph130 ]
  %.074120 = phi i32 [ %234, %.lr.ph123 ], [ %217, %.lr.ph130 ]
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv150) #7
  %225 = load i32, ptr %224, align 4, !tbaa !12
  %226 = sdiv i32 %225, 31
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv150) #7
  %229 = load i32, ptr %228, align 4, !tbaa !12
  %230 = srem i32 %229, 31
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %227, i64 %231, i64 %indvars.iv159, i64 %indvars.iv156
  %233 = load i32, ptr %232, align 4, !tbaa !12
  %234 = add nsw i32 %233, %.074120
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %235 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %sext164 = shl i64 %235, 32
  %236 = ashr exact i64 %sext164, 32
  %237 = icmp slt i64 %indvars.iv.next151, %236
  br i1 %237, label %.lr.ph123, label %._crit_edge124, !llvm.loop !27

._crit_edge128:                                   ; preds = %.lr.ph127, %._crit_edge124
  %238 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %239 = load i32, ptr %238, align 4, !tbaa !12
  store i32 %239, ptr %18, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %240 = load i32, ptr %2, align 4, !tbaa !12
  %241 = sext i32 %240 to i64
  %242 = icmp slt i64 %indvars.iv.next157, %241
  br i1 %242, label %.lr.ph130, label %._crit_edge131.loopexit, !llvm.loop !28

.lr.ph127:                                        ; preds = %._crit_edge124, %.lr.ph127
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %.lr.ph127 ], [ 0, %._crit_edge124 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  %243 = load i32, ptr %216, align 4, !tbaa !12
  %244 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv153) #7
  %245 = load i32, ptr %244, align 4, !tbaa !12
  %246 = sdiv i32 %245, 31
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv153) #7
  %249 = load i32, ptr %248, align 4, !tbaa !12
  %250 = srem i32 %249, 31
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %247, i64 %251, i64 %indvars.iv159, i64 %indvars.iv156
  %253 = load i32, ptr %252, align 4, !tbaa !12
  %254 = getelementptr inbounds [780 x [26 x [30 x i32]]], ptr @distkn, i64 0, i64 %indvars.iv153, i64 %indvars.iv159, i64 %indvars.iv156
  %255 = load i32, ptr %254, align 4, !tbaa !12
  %256 = add i32 %243, %253
  %257 = sub i32 %.074.lcssa, %256
  %258 = add nsw i32 %257, %255
  store i32 %258, ptr %20, align 4, !tbaa !12
  %259 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %260 = load i32, ptr %259, align 4, !tbaa !12
  store i32 %260, ptr %19, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %261 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %sext165 = shl i64 %261, 32
  %262 = ashr exact i64 %sext165, 32
  %263 = icmp slt i64 %indvars.iv.next154, %262
  br i1 %263, label %.lr.ph127, label %._crit_edge128, !llvm.loop !29

264:                                              ; preds = %._crit_edge133
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %210, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %266 unwind label %267

266:                                              ; preds = %264
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

267:                                              ; preds = %264, %._crit_edge133
  %268 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %269

269:                                              ; preds = %.loopexit, %.loopexit.split-lp, %267, %204, %95, %63
  %.pn95 = phi { ptr, i32 } [ %64, %63 ], [ %96, %95 ], [ %.pn93, %204 ], [ %268, %267 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %270

270:                                              ; preds = %269, %61
  %.pn95.pn = phi { ptr, i32 } [ %.pn95, %269 ], [ %62, %61 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn95.pn
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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