; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101205G)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Point = type { i32, i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector.0", [8 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@lev = external dso_local global [401 x i32], align 16
@pcnt = external dso_local global [401 x i32], align 16
@dsu = external dso_local global [401 x i32], align 16
@dcnt = external dso_local global [401 x i32], align 16
@eq = external dso_local global [401 x %"class.std::vector"], align 16
@e = external dso_local global [401 x %"class.std::vector.0"], align 16
@p = external dso_local global [401 x %struct.Point], align 16
@dis = external dso_local global [803 x double], align 16
@can = external dso_local global [401 x i8], align 16
@vis = external dso_local global [803 x i8], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dsu_mergeii(i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8dsu_findi(i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca double, align 8
  %19 = alloca { double, i32 }, align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca double, align 8
  %22 = alloca { double, i32 }, align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca { double, i32 }, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca i32, align 4
  %33 = alloca %"struct.std::pair", align 8
  %34 = alloca double, align 8
  %35 = alloca { double, i32 }, align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca %"struct.std::pair", align 8
  %41 = alloca double, align 8
  %42 = alloca i32, align 4
  %43 = alloca { double, i32 }, align 8
  %44 = alloca double, align 8
  %45 = alloca i32, align 4
  %46 = alloca %"class.std::vector.0", align 8
  %47 = alloca i32, align 4
  %48 = alloca %"class.std::vector", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #11
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %564, %0
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %51 = icmp eq i32 %50, 2
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #11
  br label %567

53:                                               ; preds = %49
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #11
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %76, %53
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = load i32, ptr @n, align 4, !tbaa !5
  %57 = icmp sle i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #11
  br label %79

59:                                               ; preds = %54
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %61
  %63 = call noundef i32 @_ZN5Point4initEv(ptr noundef nonnull align 4 dereferenceable(12) %62)
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %65
  store i32 %63, ptr %66, align 4, !tbaa !5
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %68
  %70 = getelementptr inbounds %struct.Point, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = load i32, ptr @tot, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr @tot, align 4, !tbaa !5
  %74 = sext i32 %72 to i64
  %75 = getelementptr inbounds [401 x i32], ptr @lev, i64 0, i64 %74
  store i32 %71, ptr %75, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %59
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %4, align 4, !tbaa !5
  br label %54, !llvm.loop !11

79:                                               ; preds = %58
  %80 = load i32, ptr @tot, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr @lev, i64 %81
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @lev, ptr noundef %82)
  %83 = load i32, ptr @tot, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr @lev, i64 %84
  %86 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @lev, ptr noundef %85)
  %87 = ptrtoint ptr %86 to i64
  %88 = sub i64 %87, ptrtoint (ptr @lev to i64)
  %89 = sdiv exact i64 %88, 4
  %90 = trunc i64 %89 to i32
  store i32 %90, ptr @tot, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %95, %79
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr @m, align 4, !tbaa !5
  %94 = icmp ne i32 %92, 0
  br i1 %94, label %95, label %103

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #11
  %96 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5, ptr noundef %6)
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %98
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %101
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #11
  br label %91, !llvm.loop !13

103:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  store double 2.000000e+09, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #11
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %537, %103
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = load i32, ptr @tot, align 4, !tbaa !5
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  br label %540

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  store double 0.000000e+00, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %158, %109
  %111 = load i32, ptr %10, align 4, !tbaa !5
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  br label %161

115:                                              ; preds = %110
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %117
  %119 = getelementptr inbounds %struct.Point, ptr %118, i32 0, i32 2
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [401 x i32], ptr @lev, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = icmp sle i32 %120, %124
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %127
  %129 = zext i1 %125 to i8
  store i8 %129, ptr %128, align 1, !tbaa !16
  br i1 %125, label %130, label %157

130:                                              ; preds = %115
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = add nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %134
  store double 2.000000e+09, ptr %135, align 8, !tbaa !14
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %137
  store double 2.000000e+09, ptr %138, align 8, !tbaa !14
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = add nsw i32 %139, %140
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %142
  store i8 0, ptr %143, align 1, !tbaa !16
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %145
  store i8 0, ptr %146, align 1, !tbaa !16
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [401 x i32], ptr @dsu, i64 0, i64 %148
  store i32 -1, ptr %149, align 4, !tbaa !5
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %155
  store i32 %153, ptr %156, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %130, %115
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %10, align 4, !tbaa !5
  br label %110, !llvm.loop !18

161:                                              ; preds = %114
  %162 = load i8, ptr getelementptr inbounds ([401 x i8], ptr @can, i64 0, i64 1), align 1, !tbaa !16, !range !19, !noundef !20
  %163 = trunc i8 %162 to i1
  br i1 %163, label %164, label %170

164:                                              ; preds = %161
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %166
  %168 = load i8, ptr %167, align 1, !tbaa !16, !range !19, !noundef !20
  %169 = trunc i8 %168 to i1
  br i1 %169, label %171, label %170

170:                                              ; preds = %164, %161
  store i32 12, ptr %3, align 4
  br label %534

171:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #11
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %213, %171
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = load i32, ptr @n, align 4, !tbaa !5
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #11
  br label %216

177:                                              ; preds = %172
  %178 = load i32, ptr %11, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %179
  %181 = load i8, ptr %180, align 1, !tbaa !16, !range !19, !noundef !20
  %182 = trunc i8 %181 to i1
  br i1 %182, label %183, label %212

183:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #11
  %184 = load i32, ptr %11, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %185
  %187 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %186) #11
  %188 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %187, ptr %188, align 8
  br label %189

189:                                              ; preds = %209, %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %191
  %193 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #11
  %194 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %193, ptr %194, align 8
  %195 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  br i1 %195, label %197, label %196

196:                                              ; preds = %189
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  br label %211

197:                                              ; preds = %189
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %200
  %202 = load i8, ptr %201, align 1, !tbaa !16, !range !19, !noundef !20
  %203 = trunc i8 %202 to i1
  br i1 %203, label %204, label %208

204:                                              ; preds = %197
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  %207 = load i32, ptr %206, align 4, !tbaa !5
  call void @_Z9dsu_mergeii(i32 noundef %205, i32 noundef %207)
  br label %208

208:                                              ; preds = %204, %197
  br label %209

209:                                              ; preds = %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  br label %189, !llvm.loop !21

211:                                              ; preds = %196
  br label %212

212:                                              ; preds = %211, %177
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %11, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %11, align 4, !tbaa !5
  br label %172, !llvm.loop !22

216:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #11
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %334, %216
  %218 = load i32, ptr %14, align 4, !tbaa !5
  %219 = load i32, ptr @n, align 4, !tbaa !5
  %220 = icmp sle i32 %218, %219
  br i1 %220, label %222, label %221

221:                                              ; preds = %217
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #11
  br label %337

222:                                              ; preds = %217
  %223 = load i32, ptr %14, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %224
  %226 = load i8, ptr %225, align 1, !tbaa !16, !range !19, !noundef !20
  %227 = trunc i8 %226 to i1
  br i1 %227, label %228, label %333

228:                                              ; preds = %222
  %229 = load i32, ptr %14, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %333

234:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #11
  %235 = load i32, ptr %14, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %15, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %329, %234
  %238 = load i32, ptr %15, align 4, !tbaa !5
  %239 = load i32, ptr @n, align 4, !tbaa !5
  %240 = icmp sle i32 %238, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %237
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #11
  br label %332

242:                                              ; preds = %237
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %244
  %246 = load i8, ptr %245, align 1, !tbaa !16, !range !19, !noundef !20
  %247 = trunc i8 %246 to i1
  br i1 %247, label %248, label %328

248:                                              ; preds = %242
  %249 = load i32, ptr %15, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %328

254:                                              ; preds = %248
  %255 = load i32, ptr %14, align 4, !tbaa !5
  %256 = call noundef i32 @_Z8dsu_findi(i32 noundef %255)
  %257 = load i32, ptr %15, align 4, !tbaa !5
  %258 = call noundef i32 @_Z8dsu_findi(i32 noundef %257)
  %259 = icmp ne i32 %256, %258
  br i1 %259, label %260, label %328

260:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #11
  %261 = load i32, ptr %14, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %262
  %264 = getelementptr inbounds %struct.Point, ptr %263, i32 0, i32 0
  %265 = load i32, ptr %264, align 4, !tbaa !23
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %267
  %269 = getelementptr inbounds %struct.Point, ptr %268, i32 0, i32 0
  %270 = load i32, ptr %269, align 4, !tbaa !23
  %271 = sub nsw i32 %265, %270
  %272 = call noundef i32 @_Z3sqri(i32 noundef %271)
  %273 = load i32, ptr %14, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %274
  %276 = getelementptr inbounds %struct.Point, ptr %275, i32 0, i32 1
  %277 = load i32, ptr %276, align 4, !tbaa !24
  %278 = load i32, ptr %15, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %279
  %281 = getelementptr inbounds %struct.Point, ptr %280, i32 0, i32 1
  %282 = load i32, ptr %281, align 4, !tbaa !24
  %283 = sub nsw i32 %277, %282
  %284 = call noundef i32 @_Z3sqri(i32 noundef %283)
  %285 = add nsw i32 %272, %284
  %286 = load i32, ptr %14, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %287
  %289 = getelementptr inbounds %struct.Point, ptr %288, i32 0, i32 2
  %290 = load i32, ptr %289, align 4, !tbaa !9
  %291 = load i32, ptr %15, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %292
  %294 = getelementptr inbounds %struct.Point, ptr %293, i32 0, i32 2
  %295 = load i32, ptr %294, align 4, !tbaa !9
  %296 = sub nsw i32 %290, %295
  %297 = call noundef i32 @_Z3sqri(i32 noundef %296)
  %298 = add nsw i32 %285, %297
  %299 = sitofp i32 %298 to x86_fp80
  %300 = call x86_fp80 @sqrtl(x86_fp80 noundef %299) #11
  %301 = fptrunc x86_fp80 %300 to double
  store double %301, ptr %16, align 8, !tbaa !14
  %302 = load i32, ptr %14, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %303
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  %305 = load double, ptr %16, align 8, !tbaa !14
  %306 = fsub double %305, 1.000000e+00
  %307 = load i32, ptr %15, align 4, !tbaa !5
  %308 = call noundef i32 @_Z8dsu_findi(i32 noundef %307)
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = sitofp i32 %311 to double
  %313 = call double @llvm.fmuladd.f64(double %312, double 5.000000e-01, double %306)
  store double %313, ptr %18, align 8, !tbaa !14
  %314 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store { double, i32 } %314, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %19, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %304, ptr noundef nonnull align 8 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #11
  %315 = load i32, ptr %15, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %316
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #11
  %318 = load double, ptr %16, align 8, !tbaa !14
  %319 = fsub double %318, 1.000000e+00
  %320 = load i32, ptr %14, align 4, !tbaa !5
  %321 = call noundef i32 @_Z8dsu_findi(i32 noundef %320)
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = sitofp i32 %324 to double
  %326 = call double @llvm.fmuladd.f64(double %325, double 5.000000e-01, double %319)
  store double %326, ptr %21, align 8, !tbaa !14
  %327 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store { double, i32 } %327, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %22, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %317, ptr noundef nonnull align 8 dereferenceable(12) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #11
  br label %328

328:                                              ; preds = %260, %254, %248, %242
  br label %329

329:                                              ; preds = %328
  %330 = load i32, ptr %15, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %15, align 4, !tbaa !5
  br label %237, !llvm.loop !25

332:                                              ; preds = %241
  br label %333

333:                                              ; preds = %332, %228, %222
  br label %334

334:                                              ; preds = %333
  %335 = load i32, ptr %14, align 4, !tbaa !5
  %336 = add nsw i32 %335, 1
  store i32 %336, ptr %14, align 4, !tbaa !5
  br label %217, !llvm.loop !26

337:                                              ; preds = %221
  %338 = call noundef i32 @_Z8dsu_findi(i32 noundef 1)
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %339
  %341 = load i32, ptr %340, align 4, !tbaa !5
  %342 = sitofp i32 %341 to double
  %343 = fmul double 5.000000e-01, %342
  store double %343, ptr getelementptr inbounds ([803 x double], ptr @dis, i64 0, i64 1), align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #11
  %344 = load double, ptr getelementptr inbounds ([803 x double], ptr @dis, i64 0, i64 1), align 8, !tbaa !14
  %345 = fneg double %344
  store double %345, ptr %24, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #11
  store i32 1, ptr %25, align 4, !tbaa !5
  %346 = call { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  store { double, i32 } %346, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %26, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #11
  br label %347

347:                                              ; preds = %505, %503, %337
  %348 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %349 = xor i1 %348, true
  br i1 %349, label %350, label %506

350:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #11
  %351 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %352 = getelementptr inbounds %"struct.std::pair", ptr %351, i32 0, i32 1
  %353 = load i32, ptr %352, align 8, !tbaa !27
  store i32 %353, ptr %27, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %354 = load i32, ptr %27, align 4, !tbaa !5
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %355
  %357 = load i8, ptr %356, align 1, !tbaa !16, !range !19, !noundef !20
  %358 = trunc i8 %357 to i1
  br i1 %358, label %359, label %360

359:                                              ; preds = %350
  store i32 28, ptr %3, align 4
  br label %503, !llvm.loop !29

360:                                              ; preds = %350
  %361 = load i32, ptr %27, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %362
  store i8 1, ptr %363, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  %364 = load i32, ptr %27, align 4, !tbaa !5
  %365 = load i32, ptr @n, align 4, !tbaa !5
  %366 = icmp sle i32 %364, %365
  br i1 %366, label %367, label %369

367:                                              ; preds = %360
  %368 = load i32, ptr %27, align 4, !tbaa !5
  br label %373

369:                                              ; preds = %360
  %370 = load i32, ptr %27, align 4, !tbaa !5
  %371 = load i32, ptr @n, align 4, !tbaa !5
  %372 = sub nsw i32 %370, %371
  br label %373

373:                                              ; preds = %369, %367
  %374 = phi i32 [ %368, %367 ], [ %372, %369 ]
  store i32 %374, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %375 = load i32, ptr %27, align 4, !tbaa !5
  %376 = load i32, ptr @n, align 4, !tbaa !5
  %377 = icmp sgt i32 %375, %376
  %378 = zext i1 %377 to i32
  store i32 %378, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #11
  %379 = load i32, ptr %28, align 4, !tbaa !5
  %380 = sext i32 %379 to i64
  %381 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %380
  %382 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %381) #11
  %383 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %382, ptr %383, align 8
  br label %384

384:                                              ; preds = %425, %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  %385 = load i32, ptr %28, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %386
  %388 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %387) #11
  %389 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %388, ptr %389, align 8
  %390 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  br i1 %390, label %392, label %391

391:                                              ; preds = %384
  store i32 30, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #11
  br label %427

392:                                              ; preds = %384
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #11
  %393 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #11
  %394 = load i32, ptr %393, align 4, !tbaa !5
  store i32 %394, ptr %32, align 4, !tbaa !5
  %395 = load i32, ptr %32, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %396
  %398 = load i8, ptr %397, align 1, !tbaa !16, !range !19, !noundef !20
  %399 = trunc i8 %398 to i1
  br i1 %399, label %400, label %424

400:                                              ; preds = %392
  %401 = load i32, ptr %32, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %402
  %404 = load double, ptr %403, align 8, !tbaa !14
  %405 = load i32, ptr %27, align 4, !tbaa !5
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %406
  %408 = load double, ptr %407, align 8, !tbaa !14
  %409 = fcmp ogt double %404, %408
  br i1 %409, label %410, label %424

410:                                              ; preds = %400
  %411 = load i32, ptr %27, align 4, !tbaa !5
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %412
  %414 = load double, ptr %413, align 8, !tbaa !14
  %415 = load i32, ptr %32, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %416
  store double %414, ptr %417, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #11
  %418 = load i32, ptr %32, align 4, !tbaa !5
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %419
  %421 = load double, ptr %420, align 8, !tbaa !14
  %422 = fneg double %421
  store double %422, ptr %34, align 8, !tbaa !14
  %423 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(4) %32)
  store { double, i32 } %423, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %35, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %33)
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #11
  br label %424

424:                                              ; preds = %410, %400, %392
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  br label %425

425:                                              ; preds = %424
  %426 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #11
  br label %384, !llvm.loop !30

427:                                              ; preds = %391
  %428 = load i32, ptr %28, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %429
  %431 = load i32, ptr %430, align 4, !tbaa !5
  %432 = load i32, ptr %29, align 4, !tbaa !5
  %433 = icmp sgt i32 %431, %432
  br i1 %433, label %434, label %502

434:                                              ; preds = %427
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #11
  %435 = load i32, ptr %28, align 4, !tbaa !5
  %436 = sext i32 %435 to i64
  %437 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %436
  %438 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %437) #11
  %439 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %36, i32 0, i32 0
  store ptr %438, ptr %439, align 8
  br label %440

440:                                              ; preds = %499, %434
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #11
  %441 = load i32, ptr %28, align 4, !tbaa !5
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %442
  %444 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %443) #11
  %445 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %37, i32 0, i32 0
  store ptr %444, ptr %445, align 8
  %446 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #11
  br i1 %446, label %448, label %447

447:                                              ; preds = %440
  store i32 33, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  br label %501

448:                                              ; preds = %440
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #11
  %449 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #11
  %450 = getelementptr inbounds %"struct.std::pair", ptr %449, i32 0, i32 1
  %451 = load i32, ptr %450, align 8, !tbaa !27
  store i32 %451, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #11
  %452 = load i32, ptr %27, align 4, !tbaa !5
  %453 = sext i32 %452 to i64
  %454 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %453
  %455 = load double, ptr %454, align 8, !tbaa !14
  %456 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #11
  %457 = getelementptr inbounds %"struct.std::pair", ptr %456, i32 0, i32 0
  %458 = load double, ptr %457, align 8, !tbaa !31
  %459 = fadd double %455, %458
  store double %459, ptr %39, align 8, !tbaa !14
  %460 = load i32, ptr %38, align 4, !tbaa !5
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %461
  %463 = load i8, ptr %462, align 1, !tbaa !16, !range !19, !noundef !20
  %464 = trunc i8 %463 to i1
  br i1 %464, label %465, label %498

465:                                              ; preds = %448
  %466 = load i32, ptr %38, align 4, !tbaa !5
  %467 = sext i32 %466 to i64
  %468 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %467
  %469 = load i32, ptr %468, align 4, !tbaa !5
  %470 = icmp sgt i32 %469, 0
  br i1 %470, label %471, label %498

471:                                              ; preds = %465
  %472 = load i32, ptr @n, align 4, !tbaa !5
  %473 = load i32, ptr %38, align 4, !tbaa !5
  %474 = add nsw i32 %472, %473
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %475
  %477 = load double, ptr %476, align 8, !tbaa !14
  %478 = load double, ptr %39, align 8, !tbaa !14
  %479 = fcmp ogt double %477, %478
  br i1 %479, label %480, label %498

480:                                              ; preds = %471
  %481 = load double, ptr %39, align 8, !tbaa !14
  %482 = load i32, ptr @n, align 4, !tbaa !5
  %483 = load i32, ptr %38, align 4, !tbaa !5
  %484 = add nsw i32 %482, %483
  %485 = sext i32 %484 to i64
  %486 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %485
  store double %481, ptr %486, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #11
  %487 = load i32, ptr @n, align 4, !tbaa !5
  %488 = load i32, ptr %38, align 4, !tbaa !5
  %489 = add nsw i32 %487, %488
  %490 = sext i32 %489 to i64
  %491 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %490
  %492 = load double, ptr %491, align 8, !tbaa !14
  %493 = fneg double %492
  store double %493, ptr %41, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #11
  %494 = load i32, ptr @n, align 4, !tbaa !5
  %495 = load i32, ptr %38, align 4, !tbaa !5
  %496 = add nsw i32 %494, %495
  store i32 %496, ptr %42, align 4, !tbaa !5
  %497 = call { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 4 dereferenceable(4) %42)
  store { double, i32 } %497, ptr %43, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %43, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %40)
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  br label %498

498:                                              ; preds = %480, %471, %465, %448
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #11
  br label %499

499:                                              ; preds = %498
  %500 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #11
  br label %440, !llvm.loop !32

501:                                              ; preds = %447
  br label %502

502:                                              ; preds = %501, %427
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  store i32 0, ptr %3, align 4
  br label %503

503:                                              ; preds = %502, %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  %504 = load i32, ptr %3, align 4
  switch i32 %504, label %568 [
    i32 0, label %505
    i32 28, label %347
  ]

505:                                              ; preds = %503
  br label %347, !llvm.loop !29

506:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #11
  %507 = load double, ptr %9, align 8, !tbaa !14
  %508 = load i32, ptr @n, align 4, !tbaa !5
  %509 = sext i32 %508 to i64
  %510 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %509
  %511 = load i32, ptr @n, align 4, !tbaa !5
  %512 = load i32, ptr @n, align 4, !tbaa !5
  %513 = add nsw i32 %511, %512
  %514 = sext i32 %513 to i64
  %515 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %514
  %516 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %510, ptr noundef nonnull align 8 dereferenceable(8) %515)
  %517 = load double, ptr %516, align 8, !tbaa !14
  %518 = fadd double %507, %517
  store double %518, ptr %44, align 8, !tbaa !14
  %519 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %44)
  %520 = load double, ptr %519, align 8, !tbaa !14
  store double %520, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #11
  store i32 1, ptr %45, align 4, !tbaa !5
  br label %521

521:                                              ; preds = %530, %506
  %522 = load i32, ptr %45, align 4, !tbaa !5
  %523 = load i32, ptr @n, align 4, !tbaa !5
  %524 = icmp sle i32 %522, %523
  br i1 %524, label %526, label %525

525:                                              ; preds = %521
  store i32 36, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #11
  br label %533

526:                                              ; preds = %521
  call void @llvm.lifetime.start.p0(i64 24, ptr %46) #11
  call void @llvm.memset.p0.i64(ptr align 8 %46, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #11
  %527 = load i32, ptr %45, align 4, !tbaa !5
  %528 = sext i32 %527 to i64
  %529 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %528
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %529) #11
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #11
  br label %530

530:                                              ; preds = %526
  %531 = load i32, ptr %45, align 4, !tbaa !5
  %532 = add nsw i32 %531, 1
  store i32 %532, ptr %45, align 4, !tbaa !5
  br label %521, !llvm.loop !33

533:                                              ; preds = %525
  store i32 0, ptr %3, align 4
  br label %534

534:                                              ; preds = %533, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  %535 = load i32, ptr %3, align 4
  switch i32 %535, label %568 [
    i32 0, label %536
    i32 12, label %537
  ]

536:                                              ; preds = %534
  br label %537

537:                                              ; preds = %536, %534
  %538 = load i32, ptr %8, align 4, !tbaa !5
  %539 = add nsw i32 %538, 1
  store i32 %539, ptr %8, align 4, !tbaa !5
  br label %104, !llvm.loop !34

540:                                              ; preds = %108
  %541 = load double, ptr %7, align 8, !tbaa !14
  %542 = fcmp olt double %541, 1.000000e+09
  br i1 %542, label %543, label %547

543:                                              ; preds = %540
  %544 = load i32, ptr %2, align 4, !tbaa !5
  %545 = load double, ptr %7, align 8, !tbaa !14
  %546 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %544, double noundef %545)
  br label %550

547:                                              ; preds = %540
  %548 = load i32, ptr %2, align 4, !tbaa !5
  %549 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %548)
  br label %550

550:                                              ; preds = %547, %543
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #11
  store i32 1, ptr %47, align 4, !tbaa !5
  br label %551

551:                                              ; preds = %560, %550
  %552 = load i32, ptr %47, align 4, !tbaa !5
  %553 = load i32, ptr @n, align 4, !tbaa !5
  %554 = icmp sle i32 %552, %553
  br i1 %554, label %556, label %555

555:                                              ; preds = %551
  store i32 39, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #11
  br label %563

556:                                              ; preds = %551
  call void @llvm.lifetime.start.p0(i64 24, ptr %48) #11
  call void @llvm.memset.p0.i64(ptr align 8 %48, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #11
  %557 = load i32, ptr %47, align 4, !tbaa !5
  %558 = sext i32 %557 to i64
  %559 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %558
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(24) %559) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %48) #11
  br label %560

560:                                              ; preds = %556
  %561 = load i32, ptr %47, align 4, !tbaa !5
  %562 = add nsw i32 %561, 1
  store i32 %562, ptr %47, align 4, !tbaa !5
  br label %551, !llvm.loop !35

563:                                              ; preds = %555
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  br label %564

564:                                              ; preds = %563
  %565 = load i32, ptr %2, align 4, !tbaa !5
  %566 = add nsw i32 %565, 1
  store i32 %566, ptr %2, align 4, !tbaa !5
  br label %49, !llvm.loop !36

567:                                              ; preds = %52
  ret i32 0

568:                                              ; preds = %534, %503
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5Point4initEv(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #2

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

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

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

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

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

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

; Function Attrs: nounwind
declare x86_fp80 @sqrtl(x86_fp80 noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sqri(i32 noundef) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #9

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Point = type { i32, i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector.0", [8 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@lev = external dso_local global [401 x i32], align 16
@pcnt = external dso_local local_unnamed_addr global [401 x i32], align 16
@dsu = external dso_local local_unnamed_addr global [401 x i32], align 16
@dcnt = external dso_local local_unnamed_addr global [401 x i32], align 16
@eq = external dso_local global [401 x %"class.std::vector"], align 16
@e = external dso_local global [401 x %"class.std::vector.0"], align 16
@p = external dso_local global [401 x %struct.Point], align 16
@dis = external dso_local global [803 x double], align 16
@can = external dso_local local_unnamed_addr global [401 x i8], align 16
@vis = external dso_local local_unnamed_addr global [803 x i8], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9dsu_mergeii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8dsu_findi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca double, align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca double, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca double, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca %"class.std::vector.0", align 8
  %27 = alloca %"class.std::vector", align 8
  %28 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %29 = icmp eq i32 %28, 2
  br i1 %29, label %.lr.ph152, label %._crit_edge153

.lr.ph152:                                        ; preds = %0
  %.sroa.243.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.239.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.235.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 8
  br label %30

._crit_edge153:                                   ; preds = %._crit_edge149, %0
  ret i32 0

30:                                               ; preds = %.lr.ph152, %._crit_edge149
  %.076150 = phi i32 [ 1, %.lr.ph152 ], [ %320, %._crit_edge149 ]
  store i32 0, ptr @tot, align 4, !tbaa !5
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %.not100 = icmp slt i32 %31, 1
  br i1 %.not100, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %30
  %32 = phi i32 [ 0, %30 ], [ %51, %.lr.ph ]
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr @lev, i64 %33
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @lev, ptr noundef nonnull %34)
  %35 = load i32, ptr @tot, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr @lev, i64 %36
  %38 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @lev, ptr noundef nonnull %37)
  %39 = ptrtoint ptr %38 to i64
  %40 = sub i64 %39, ptrtoint (ptr @lev to i64)
  %41 = lshr exact i64 %40, 2
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr @tot, align 4, !tbaa !5
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr @m, align 4, !tbaa !5
  %.not87102 = icmp eq i32 %43, 0
  br i1 %.not87102, label %._crit_edge105, label %.lr.ph104

.lr.ph:                                           ; preds = %30, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %30 ]
  %45 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv
  %46 = call noundef i32 @_ZN5Point4initEv(ptr noundef nonnull align 4 dereferenceable(12) %45)
  %47 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %indvars.iv
  store i32 %46, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %45, i64 8
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = load i32, ptr @tot, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr @tot, align 4, !tbaa !5
  %52 = sext i32 %50 to i64
  %53 = getelementptr inbounds [401 x i32], ptr @lev, i64 0, i64 %52
  store i32 %49, ptr %53, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %.not.not = icmp slt i64 %indvars.iv, %55
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph104:                                        ; preds = %._crit_edge, %.lr.ph104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %58
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %61
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #10
  %63 = load i32, ptr @m, align 4, !tbaa !5
  %64 = add nsw i32 %63, -1
  store i32 %64, ptr @m, align 4, !tbaa !5
  %.not87 = icmp eq i32 %63, 0
  br i1 %.not87, label %._crit_edge105.loopexit, label %.lr.ph104, !llvm.loop !13

._crit_edge105.loopexit:                          ; preds = %.lr.ph104
  %.pre = load i32, ptr @tot, align 4, !tbaa !5
  br label %._crit_edge105

._crit_edge105:                                   ; preds = %._crit_edge105.loopexit, %._crit_edge
  %65 = phi i32 [ %.pre, %._crit_edge105.loopexit ], [ %42, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  store double 2.000000e+09, ptr %3, align 8, !tbaa !14
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.preheader99.preheader, label %._crit_edge144.thread

.preheader99.preheader:                           ; preds = %._crit_edge105
  %.pre170 = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader99

.preheader99:                                     ; preds = %.preheader99.preheader, %.loopexit
  %67 = phi i32 [ %.pre170, %.preheader99.preheader ], [ %311, %.loopexit ]
  %indvars.iv164 = phi i64 [ 0, %.preheader99.preheader ], [ %indvars.iv.next165, %.loopexit ]
  %.not89106 = icmp slt i32 %67, 1
  br i1 %.not89106, label %._crit_edge109, label %.lr.ph108

.lr.ph108:                                        ; preds = %.preheader99
  %68 = getelementptr inbounds [401 x i32], ptr @lev, i64 0, i64 %indvars.iv164
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = zext nneg i32 %67 to i64
  %71 = add nuw i32 %67, 1
  %wide.trip.count = zext i32 %71 to i64
  br label %75

._crit_edge144:                                   ; preds = %.loopexit
  %.pre175 = load double, ptr %3, align 8, !tbaa !14
  %72 = fcmp olt double %.pre175, 1.000000e+09
  br i1 %72, label %315, label %._crit_edge144.thread

._crit_edge109:                                   ; preds = %91, %.preheader99
  %73 = load i8, ptr getelementptr inbounds (i8, ptr @can, i64 1), align 1, !tbaa !16, !range !18, !noundef !19
  %74 = trunc nuw i8 %73 to i1
  br i1 %74, label %92, label %.loopexit

75:                                               ; preds = %.lr.ph108, %91
  %indvars.iv155 = phi i64 [ 1, %.lr.ph108 ], [ %indvars.iv.next156, %91 ]
  %76 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %indvars.iv155, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = icmp sle i32 %77, %69
  %79 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %indvars.iv155
  %80 = zext i1 %78 to i8
  store i8 %80, ptr %79, align 1, !tbaa !16
  br i1 %78, label %81, label %91

81:                                               ; preds = %75
  %82 = add nuw nsw i64 %indvars.iv155, %70
  %83 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %82
  store double 2.000000e+09, ptr %83, align 8, !tbaa !14
  %84 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %indvars.iv155
  store double 2.000000e+09, ptr %84, align 8, !tbaa !14
  %85 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %82
  store i8 0, ptr %85, align 1, !tbaa !16
  %86 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %indvars.iv155
  store i8 0, ptr %86, align 1, !tbaa !16
  %87 = getelementptr inbounds [401 x i32], ptr @dsu, i64 0, i64 %indvars.iv155
  store i32 -1, ptr %87, align 4, !tbaa !5
  %88 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %indvars.iv155
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %indvars.iv155
  store i32 %89, ptr %90, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %75, %81
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge109, label %75, !llvm.loop !20

92:                                               ; preds = %._crit_edge109
  %93 = sext i32 %67 to i64
  %94 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !16, !range !18, !noundef !19
  %96 = trunc nuw i8 %95 to i1
  br i1 %96, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %92
  br i1 %.not89106, label %._crit_edge117.thread, label %.lr.ph116

._crit_edge117.thread:                            ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  br label %._crit_edge129

._crit_edge117:                                   ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  store i32 1, ptr %6, align 4, !tbaa !5
  %.not91125 = icmp slt i32 %121, 1
  br i1 %.not91125, label %._crit_edge129, label %.lr.ph128

.lr.ph116:                                        ; preds = %.preheader, %120
  %97 = phi i32 [ %121, %120 ], [ %67, %.preheader ]
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %120 ], [ 1, %.preheader ]
  %98 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %indvars.iv158
  %99 = load i8, ptr %98, align 1, !tbaa !16, !range !18, !noundef !19
  %100 = trunc nuw i8 %99 to i1
  br i1 %100, label %101, label %120

101:                                              ; preds = %.lr.ph116
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %102 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %indvars.iv158
  %103 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #10
  store ptr %103, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %104 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #10
  store ptr %104, ptr %5, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br i1 %105, label %.lr.ph111.preheader, label %._crit_edge112

.lr.ph111.preheader:                              ; preds = %101
  %106 = trunc nuw nsw i64 %indvars.iv158 to i32
  br label %.lr.ph111

._crit_edge112:                                   ; preds = %116, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  %.pre171 = load i32, ptr @n, align 4, !tbaa !5
  br label %120

.lr.ph111:                                        ; preds = %.lr.ph111.preheader, %116
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !16, !range !18, !noundef !19
  %112 = trunc nuw i8 %111 to i1
  br i1 %112, label %113, label %116

113:                                              ; preds = %.lr.ph111
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %115 = load i32, ptr %114, align 4, !tbaa !5
  call void @_Z9dsu_mergeii(i32 noundef %106, i32 noundef %115)
  br label %116

116:                                              ; preds = %.lr.ph111, %113
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %118 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #10
  store ptr %118, ptr %5, align 8
  %119 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br i1 %119, label %.lr.ph111, label %._crit_edge112, !llvm.loop !21

120:                                              ; preds = %.lr.ph116, %._crit_edge112
  %121 = phi i32 [ %97, %.lr.ph116 ], [ %.pre171, %._crit_edge112 ]
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %122 = sext i32 %121 to i64
  %.not90.not = icmp slt i64 %indvars.iv158, %122
  br i1 %.not90.not, label %.lr.ph116, label %._crit_edge117, !llvm.loop !22

._crit_edge129:                                   ; preds = %214, %._crit_edge117.thread, %._crit_edge117
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  %123 = call noundef i32 @_Z8dsu_findi(i32 noundef 1)
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sitofp i32 %126 to double
  %128 = fmul double %127, 5.000000e-01
  store double %128, ptr getelementptr inbounds (i8, ptr @dis, i64 8), align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  %129 = fneg double %128
  store double %129, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #10
  store i32 1, ptr %14, align 4, !tbaa !5
  %130 = call { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %.fca.0.extract32 = extractvalue { double, i32 } %130, 0
  %.fca.1.extract33 = extractvalue { double, i32 } %130, 1
  store double %.fca.0.extract32, ptr %12, align 8
  store i32 %.fca.1.extract33, ptr %.sroa.235.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  %131 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %131, label %._crit_edge138, label %.lr.ph137

.lr.ph128:                                        ; preds = %._crit_edge117, %214
  %132 = phi i32 [ %215, %214 ], [ %121, %._crit_edge117 ]
  %storemerge95.in118 = phi i32 [ %217, %214 ], [ 1, %._crit_edge117 ]
  %133 = sext i32 %storemerge95.in118 to i64
  %134 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %133
  %135 = load i8, ptr %134, align 1, !tbaa !16, !range !18, !noundef !19
  %136 = trunc nuw i8 %135 to i1
  br i1 %136, label %137, label %214

137:                                              ; preds = %.lr.ph128
  %138 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %133
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %.not94 = icmp eq i32 %139, 0
  br i1 %.not94, label %214, label %140

140:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  %storemerge95119 = add nsw i32 %storemerge95.in118, 1
  store i32 %storemerge95119, ptr %7, align 4, !tbaa !5
  %.not96.not120 = icmp slt i32 %storemerge95.in118, %132
  br i1 %.not96.not120, label %.lr.ph123, label %._crit_edge124

._crit_edge124.loopexit:                          ; preds = %212
  %.pre174.pre = load i32, ptr %6, align 4, !tbaa !5
  br label %._crit_edge124

._crit_edge124:                                   ; preds = %._crit_edge124.loopexit, %140
  %.pre174 = phi i32 [ %.pre174.pre, %._crit_edge124.loopexit ], [ %storemerge95.in118, %140 ]
  %141 = phi i32 [ %213, %._crit_edge124.loopexit ], [ %132, %140 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  br label %214

.lr.ph123:                                        ; preds = %140, %212
  %storemerge95121 = phi i32 [ %storemerge95, %212 ], [ %storemerge95119, %140 ]
  %142 = sext i32 %storemerge95121 to i64
  %143 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %142
  %144 = load i8, ptr %143, align 1, !tbaa !16, !range !18, !noundef !19
  %145 = trunc nuw i8 %144 to i1
  br i1 %145, label %146, label %212

146:                                              ; preds = %.lr.ph123
  %147 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %142
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %.not97 = icmp eq i32 %148, 0
  br i1 %.not97, label %212, label %149

149:                                              ; preds = %146
  %150 = load i32, ptr %6, align 4, !tbaa !5
  %151 = call noundef i32 @_Z8dsu_findi(i32 noundef %150)
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = call noundef i32 @_Z8dsu_findi(i32 noundef %152)
  %.not98 = icmp eq i32 %151, %153
  %storemerge95.in.pre172 = load i32, ptr %7, align 4, !tbaa !5
  br i1 %.not98, label %212, label %154

154:                                              ; preds = %149
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !23
  %159 = sext i32 %storemerge95.in.pre172 to i64
  %160 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !23
  %162 = sub nsw i32 %158, %161
  %163 = call noundef i32 @_Z3sqri(i32 noundef %162)
  %164 = load i32, ptr %6, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %165, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !24
  %168 = load i32, ptr %7, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %169, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !24
  %172 = sub nsw i32 %167, %171
  %173 = call noundef i32 @_Z3sqri(i32 noundef %172)
  %174 = add nsw i32 %173, %163
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %176, i32 2
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = load i32, ptr %7, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [401 x %struct.Point], ptr @p, i64 0, i64 %180, i32 2
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = sub nsw i32 %178, %182
  %184 = call noundef i32 @_Z3sqri(i32 noundef %183)
  %185 = add nsw i32 %174, %184
  %186 = sitofp i32 %185 to x86_fp80
  %187 = call x86_fp80 @sqrtl(x86_fp80 noundef %186) #10
  %188 = fptrunc x86_fp80 %187 to double
  %189 = load i32, ptr %6, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %190
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %192 = fadd double %188, -1.000000e+00
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = call noundef i32 @_Z8dsu_findi(i32 noundef %193)
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = sitofp i32 %197 to double
  %199 = call double @llvm.fmuladd.f64(double %198, double 5.000000e-01, double %192)
  store double %199, ptr %9, align 8, !tbaa !14
  %200 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.fca.0.extract40 = extractvalue { double, i32 } %200, 0
  %.fca.1.extract41 = extractvalue { double, i32 } %200, 1
  store double %.fca.0.extract40, ptr %8, align 8
  store i32 %.fca.1.extract41, ptr %.sroa.243.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull align 8 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  %201 = load i32, ptr %7, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %202
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = call noundef i32 @_Z8dsu_findi(i32 noundef %204)
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [401 x i32], ptr @dcnt, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = sitofp i32 %208 to double
  %210 = call double @llvm.fmuladd.f64(double %209, double 5.000000e-01, double %192)
  store double %210, ptr %11, align 8, !tbaa !14
  %211 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %.fca.0.extract36 = extractvalue { double, i32 } %211, 0
  %.fca.1.extract37 = extractvalue { double, i32 } %211, 1
  store double %.fca.0.extract36, ptr %10, align 8
  store i32 %.fca.1.extract37, ptr %.sroa.239.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %203, ptr noundef nonnull align 8 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  %storemerge95.in.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %.lr.ph123, %146, %149, %154
  %storemerge95.in = phi i32 [ %storemerge95121, %.lr.ph123 ], [ %storemerge95121, %146 ], [ %storemerge95.in.pre172, %149 ], [ %storemerge95.in.pre, %154 ]
  %storemerge95 = add nsw i32 %storemerge95.in, 1
  store i32 %storemerge95, ptr %7, align 4, !tbaa !5
  %213 = load i32, ptr @n, align 4, !tbaa !5
  %.not96.not = icmp slt i32 %storemerge95.in, %213
  br i1 %.not96.not, label %.lr.ph123, label %._crit_edge124.loopexit, !llvm.loop !25

214:                                              ; preds = %.lr.ph128, %137, %._crit_edge124
  %215 = phi i32 [ %132, %.lr.ph128 ], [ %132, %137 ], [ %141, %._crit_edge124 ]
  %216 = phi i32 [ %storemerge95.in118, %.lr.ph128 ], [ %storemerge95.in118, %137 ], [ %.pre174, %._crit_edge124 ]
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %6, align 4, !tbaa !5
  %.not91.not = icmp slt i32 %216, %215
  br i1 %.not91.not, label %.lr.ph128, label %._crit_edge129, !llvm.loop !26

.lr.ph137:                                        ; preds = %._crit_edge129, %294
  %218 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %219 = getelementptr inbounds i8, ptr %218, i64 8
  %220 = load i32, ptr %219, align 8, !tbaa !27
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [803 x i8], ptr @vis, i64 0, i64 %221
  %223 = load i8, ptr %222, align 1, !tbaa !16, !range !18, !noundef !19
  %224 = trunc nuw i8 %223 to i1
  br i1 %224, label %294, label %225, !llvm.loop !29

225:                                              ; preds = %.lr.ph137
  store i8 1, ptr %222, align 1, !tbaa !16
  %226 = load i32, ptr @n, align 4
  %.not93 = icmp sgt i32 %220, %226
  %227 = select i1 %.not93, i32 %226, i32 0
  %228 = sub nsw i32 %220, %227
  %229 = zext i1 %.not93 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %230 = sext i32 %228 to i64
  %231 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %230
  %232 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %231) #10
  store ptr %232, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %233 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %231) #10
  store ptr %233, ptr %16, align 8
  %234 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  br i1 %234, label %.lr.ph131, label %._crit_edge132

.lr.ph131:                                        ; preds = %225
  %235 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %221
  br label %239

._crit_edge132:                                   ; preds = %254, %225
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  %236 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %230
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = icmp sgt i32 %237, %229
  br i1 %238, label %258, label %294

239:                                              ; preds = %.lr.ph131, %254
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #10
  %240 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #10
  %241 = load i32, ptr %240, align 4, !tbaa !5
  store i32 %241, ptr %17, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %242
  %244 = load i8, ptr %243, align 1, !tbaa !16, !range !18, !noundef !19
  %245 = trunc nuw i8 %244 to i1
  br i1 %245, label %246, label %254

246:                                              ; preds = %239
  %247 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %242
  %248 = load double, ptr %247, align 8, !tbaa !14
  %249 = load double, ptr %235, align 8, !tbaa !14
  %250 = fcmp ogt double %248, %249
  br i1 %250, label %251, label %254

251:                                              ; preds = %246
  store double %249, ptr %247, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  %252 = fneg double %249
  store double %252, ptr %19, align 8, !tbaa !14
  %253 = call { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %.fca.0.extract13 = extractvalue { double, i32 } %253, 0
  %.fca.1.extract14 = extractvalue { double, i32 } %253, 1
  store double %.fca.0.extract13, ptr %18, align 8
  store i32 %.fca.1.extract14, ptr %.sroa.216.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  br label %254

254:                                              ; preds = %251, %246, %239
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #10
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %256 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %231) #10
  store ptr %256, ptr %16, align 8
  %257 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  br i1 %257, label %239, label %._crit_edge132, !llvm.loop !30

258:                                              ; preds = %._crit_edge132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #10
  %259 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %230
  %260 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %259) #10
  store ptr %260, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  %261 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %259) #10
  store ptr %261, ptr %21, align 8
  %262 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  br i1 %262, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %258
  %263 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %221
  br label %264

._crit_edge135:                                   ; preds = %290, %258
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #10
  br label %294

264:                                              ; preds = %.lr.ph134, %290
  %265 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #10
  %266 = getelementptr inbounds i8, ptr %265, i64 8
  %267 = load i32, ptr %266, align 8, !tbaa !27
  %268 = load double, ptr %263, align 8, !tbaa !14
  %269 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #10
  %270 = load double, ptr %269, align 8, !tbaa !31
  %271 = fadd double %268, %270
  %272 = sext i32 %267 to i64
  %273 = getelementptr inbounds [401 x i8], ptr @can, i64 0, i64 %272
  %274 = load i8, ptr %273, align 1, !tbaa !16, !range !18, !noundef !19
  %275 = trunc nuw i8 %274 to i1
  br i1 %275, label %276, label %290

276:                                              ; preds = %264
  %277 = getelementptr inbounds [401 x i32], ptr @pcnt, i64 0, i64 %272
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = icmp sgt i32 %278, 0
  br i1 %279, label %280, label %290

280:                                              ; preds = %276
  %281 = load i32, ptr @n, align 4, !tbaa !5
  %282 = add nsw i32 %281, %267
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %283
  %285 = load double, ptr %284, align 8, !tbaa !14
  %286 = fcmp ogt double %285, %271
  br i1 %286, label %287, label %290

287:                                              ; preds = %280
  store double %271, ptr %284, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #10
  %288 = fneg double %271
  store double %288, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #10
  store i32 %282, ptr %24, align 4, !tbaa !5
  %289 = call { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %.fca.0.extract = extractvalue { double, i32 } %289, 0
  %.fca.1.extract = extractvalue { double, i32 } %289, 1
  store double %.fca.0.extract, ptr %22, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #10
  br label %290

290:                                              ; preds = %287, %280, %276, %264
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  %292 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %259) #10
  store ptr %292, ptr %21, align 8
  %293 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  br i1 %293, label %264, label %._crit_edge135, !llvm.loop !32

294:                                              ; preds = %._crit_edge132, %._crit_edge135, %.lr.ph137
  %295 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %295, label %._crit_edge138, label %.lr.ph137

._crit_edge138:                                   ; preds = %294, %._crit_edge129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #10
  %296 = load i32, ptr @n, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %297
  %299 = shl nsw i32 %296, 1
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [803 x double], ptr @dis, i64 0, i64 %300
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %298, ptr noundef nonnull align 8 dereferenceable(8) %301)
  %303 = load double, ptr %302, align 8, !tbaa !14
  %304 = fadd double %303, 0.000000e+00
  store double %304, ptr %25, align 8, !tbaa !14
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %306 = load double, ptr %305, align 8, !tbaa !14
  store double %306, ptr %3, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #10
  %307 = load i32, ptr @n, align 4, !tbaa !5
  %.not92139 = icmp slt i32 %307, 1
  br i1 %.not92139, label %.loopexit, label %.lr.ph142

.lr.ph142:                                        ; preds = %._crit_edge138, %.lr.ph142
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %.lr.ph142 ], [ 1, %._crit_edge138 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %26, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #10
  %308 = getelementptr inbounds [401 x %"class.std::vector.0"], ptr @e, i64 0, i64 %indvars.iv161
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %308) #10
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #10
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %309 = load i32, ptr @n, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %.not92.not = icmp slt i64 %indvars.iv161, %310
  br i1 %.not92.not, label %.lr.ph142, label %.loopexit, !llvm.loop !33

.loopexit:                                        ; preds = %.lr.ph142, %._crit_edge138, %._crit_edge109, %92
  %311 = phi i32 [ %307, %._crit_edge138 ], [ %67, %._crit_edge109 ], [ %67, %92 ], [ %309, %.lr.ph142 ]
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %312 = load i32, ptr @tot, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = icmp slt i64 %indvars.iv.next165, %313
  br i1 %314, label %.preheader99, label %._crit_edge144, !llvm.loop !34

315:                                              ; preds = %._crit_edge144
  %316 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.076150, double noundef %.pre175)
  br label %318

._crit_edge144.thread:                            ; preds = %._crit_edge105, %._crit_edge144
  %317 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.076150)
  br label %318

318:                                              ; preds = %._crit_edge144.thread, %315
  %319 = load i32, ptr @n, align 4, !tbaa !5
  %.not88145 = icmp slt i32 %319, 1
  br i1 %.not88145, label %._crit_edge149, label %.lr.ph148

._crit_edge149:                                   ; preds = %.lr.ph148, %318
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  %320 = add nuw nsw i32 %.076150, 1
  %321 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %322 = icmp eq i32 %321, 2
  br i1 %322, label %30, label %._crit_edge153, !llvm.loop !35

.lr.ph148:                                        ; preds = %318, %.lr.ph148
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %.lr.ph148 ], [ 1, %318 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %27, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #10
  %323 = getelementptr inbounds [401 x %"class.std::vector"], ptr @eq, i64 0, i64 %indvars.iv167
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %323) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #10
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %324 = load i32, ptr @n, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %.not88.not = icmp slt i64 %indvars.iv167, %325
  br i1 %.not88.not, label %.lr.ph148, label %._crit_edge149, !llvm.loop !36
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5Point4initEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress 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 nofree nounwind willreturn memory(write)
declare x86_fp80 @sqrtl(x86_fp80 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sqri(i32 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(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_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

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

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

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

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

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

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

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


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