; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/BubbleCup/Problem F (F)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@l = external dso_local global [10101 x i32], align 16
@r = external dso_local global [10101 x i32], align 16
@indx = external dso_local global i32, align 4
@dp = external dso_local global [10101 x [2 x i64]], align 16
@pts = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @x)
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) @x)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %36, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %39

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %27
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %25, ptr noundef %28)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %31
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %34
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) %35)
  br label %36

36:                                               ; preds = %22
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

39:                                               ; preds = %21
  %40 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %45, ptr %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %48 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %49 = trunc i64 %48 to i32
  store i32 %49, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %68, %39
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %71

55:                                               ; preds = %50
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %57) #8
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr @x, align 4, !tbaa !5
  %61 = sub nsw i32 %59, %60
  %62 = call i32 @llvm.abs.i32(i32 %61, i1 true)
  %63 = sext i32 %62 to i64
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %65
  %67 = getelementptr inbounds [2 x i64], ptr %66, i64 0, i64 0
  store i64 %63, ptr %67, align 16, !tbaa !11
  br label %68

68:                                               ; preds = %55
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %50, !llvm.loop !13

71:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %271, %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %274

77:                                               ; preds = %72
  %78 = load i32, ptr @indx, align 4, !tbaa !5
  %79 = xor i32 %78, 1
  store i32 %79, ptr @indx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %176, %77
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %179

85:                                               ; preds = %80
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %87) #8
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = icmp slt i32 %89, %93
  br i1 %94, label %95, label %122

95:                                               ; preds = %85
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %97
  %99 = load i32, ptr @indx, align 4, !tbaa !5
  %100 = sub nsw i32 1, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2 x i64], ptr %98, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = add nsw i64 %103, %108
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %111) #8
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = sub nsw i64 %109, %114
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %117
  %119 = load i32, ptr @indx, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [2 x i64], ptr %118, i64 0, i64 %120
  store i64 %115, ptr %121, align 8, !tbaa !11
  br label %175

122:                                              ; preds = %85
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %124) #8
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = icmp sgt i32 %126, %130
  br i1 %131, label %132, label %159

132:                                              ; preds = %122
  %133 = load i32, ptr %9, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %134
  %136 = load i32, ptr @indx, align 4, !tbaa !5
  %137 = sub nsw i32 1, %136
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [2 x i64], ptr %135, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %142) #8
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = add nsw i64 %140, %145
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = sub nsw i64 %146, %151
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %154
  %156 = load i32, ptr @indx, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [2 x i64], ptr %155, i64 0, i64 %157
  store i64 %152, ptr %158, align 8, !tbaa !11
  br label %174

159:                                              ; preds = %122
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %161
  %163 = load i32, ptr @indx, align 4, !tbaa !5
  %164 = sub nsw i32 1, %163
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [2 x i64], ptr %162, i64 0, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !11
  %168 = load i32, ptr %9, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %169
  %171 = load i32, ptr @indx, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [2 x i64], ptr %170, i64 0, i64 %172
  store i64 %167, ptr %173, align 8, !tbaa !11
  br label %174

174:                                              ; preds = %159, %132
  br label %175

175:                                              ; preds = %174, %95
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %9, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %9, align 4, !tbaa !5
  br label %80, !llvm.loop !14

179:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %221, %179
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = load i32, ptr %5, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %224

185:                                              ; preds = %180
  %186 = load i32, ptr %10, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %187
  %189 = load i32, ptr @indx, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2 x i64], ptr %188, i64 0, i64 %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %192 = load i32, ptr %10, align 4, !tbaa !5
  %193 = sub nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %194
  %196 = load i32, ptr @indx, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2 x i64], ptr %195, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !11
  %200 = load i32, ptr %10, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %201) #8
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = add nsw i64 %199, %204
  %206 = load i32, ptr %10, align 4, !tbaa !5
  %207 = sub nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %208) #8
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = sub nsw i64 %205, %211
  store i64 %212, ptr %11, align 8, !tbaa !11
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %214 = load i64, ptr %213, align 8, !tbaa !11
  %215 = load i32, ptr %10, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %216
  %218 = load i32, ptr @indx, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [2 x i64], ptr %217, i64 0, i64 %219
  store i64 %214, ptr %220, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %221

221:                                              ; preds = %185
  %222 = load i32, ptr %10, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %10, align 4, !tbaa !5
  br label %180, !llvm.loop !15

224:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %225 = load i32, ptr %5, align 4, !tbaa !5
  %226 = sub nsw i32 %225, 2
  store i32 %226, ptr %12, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %267, %224
  %228 = load i32, ptr %12, align 4, !tbaa !5
  %229 = icmp sge i32 %228, 0
  br i1 %229, label %231, label %230

230:                                              ; preds = %227
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %270

231:                                              ; preds = %227
  %232 = load i32, ptr %12, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %233
  %235 = load i32, ptr @indx, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [2 x i64], ptr %234, i64 0, i64 %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %238 = load i32, ptr %12, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %240
  %242 = load i32, ptr @indx, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [2 x i64], ptr %241, i64 0, i64 %243
  %245 = load i64, ptr %244, align 8, !tbaa !11
  %246 = load i32, ptr %12, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  %248 = sext i32 %247 to i64
  %249 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %248) #8
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = add nsw i64 %245, %251
  %253 = load i32, ptr %12, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %254) #8
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = sub nsw i64 %252, %257
  store i64 %258, ptr %13, align 8, !tbaa !11
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %237, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %260 = load i64, ptr %259, align 8, !tbaa !11
  %261 = load i32, ptr %12, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %262
  %264 = load i32, ptr @indx, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [2 x i64], ptr %263, i64 0, i64 %265
  store i64 %260, ptr %266, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %267

267:                                              ; preds = %231
  %268 = load i32, ptr %12, align 4, !tbaa !5
  %269 = add nsw i32 %268, -1
  store i32 %269, ptr %12, align 4, !tbaa !5
  br label %227, !llvm.loop !16

270:                                              ; preds = %230
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %7, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %7, align 4, !tbaa !5
  br label %72, !llvm.loop !17

274:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 1000000000000000000, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %289, %274
  %276 = load i32, ptr %15, align 4, !tbaa !5
  %277 = load i32, ptr %5, align 4, !tbaa !5
  %278 = icmp slt i32 %276, %277
  br i1 %278, label %280, label %279

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

280:                                              ; preds = %275
  %281 = load i32, ptr %15, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %282
  %284 = load i32, ptr @indx, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [2 x i64], ptr %283, i64 0, i64 %285
  %287 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %286)
  %288 = load i64, ptr %287, align 8, !tbaa !11
  store i64 %288, ptr %14, align 8, !tbaa !11
  br label %289

289:                                              ; preds = %280
  %290 = load i32, ptr %15, align 4, !tbaa !5
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %15, align 4, !tbaa !5
  br label %275, !llvm.loop !18

292:                                              ; preds = %279
  %293 = load i64, ptr %14, align 8, !tbaa !11
  %294 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %293)
  %295 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %294, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  %296 = load i32, ptr %1, align 4
  ret i32 %296
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #4

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

attributes #0 = { 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 #1 = { "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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@l = external dso_local global [10101 x i32], align 16
@r = external dso_local global [10101 x i32], align 16
@indx = external dso_local local_unnamed_addr global i32, align 4
@dp = external dso_local global [10101 x [2 x i64]], align 16
@pts = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @x)
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %7 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %8 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %7, ptr %8)
  %9 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph67.preheader, label %.preheader63

.lr.ph67.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = and i64 %9, 2147483647
  br label %.lr.ph67

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %indvars.iv
  %13 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %indvars.iv
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %12, ptr noundef nonnull %13)
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) %12)
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader63:                                     ; preds = %.lr.ph67, %._crit_edge
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph79, label %._crit_edge80

.lr.ph79:                                         ; preds = %.preheader63
  %20 = icmp sgt i32 %10, 1
  %21 = add i64 %9, 4294967294
  %22 = and i64 %21, 4294967295
  %.pre = load i32, ptr @indx, align 4, !tbaa !5
  %wide.trip.count92 = and i64 %9, 2147483647
  %wide.trip.count97 = and i64 %9, 2147483647
  br label %30

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %.lr.ph67
  %indvars.iv86 = phi i64 [ 0, %.lr.ph67.preheader ], [ %indvars.iv.next87, %.lr.ph67 ]
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv86) #8
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = load i32, ptr @x, align 4, !tbaa !5
  %26 = sub nsw i32 %24, %25
  %27 = tail call i32 @llvm.abs.i32(i32 %26, i1 true)
  %28 = zext nneg i32 %27 to i64
  %29 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv86
  store i64 %28, ptr %29, align 16, !tbaa !11
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count
  br i1 %exitcond.not, label %.preheader63, label %.lr.ph67, !llvm.loop !13

._crit_edge80:                                    ; preds = %._crit_edge77, %.preheader63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store i64 1000000000000000000, ptr %3, align 8, !tbaa !11
  br i1 %11, label %.lr.ph83.preheader, label %._crit_edge84

.lr.ph83.preheader:                               ; preds = %._crit_edge80
  %wide.trip.count108 = and i64 %9, 2147483647
  br label %.lr.ph83

30:                                               ; preds = %.lr.ph79, %._crit_edge77
  %31 = phi i32 [ %.pre, %.lr.ph79 ], [ %93, %._crit_edge77 ]
  %indvars.iv102 = phi i64 [ 0, %.lr.ph79 ], [ %indvars.iv.next103, %._crit_edge77 ]
  %32 = xor i32 %31, 1
  store i32 %32, ptr @indx, align 4, !tbaa !5
  br i1 %11, label %.lr.ph70, label %._crit_edge77

.lr.ph70:                                         ; preds = %30
  %33 = getelementptr inbounds [10101 x i32], ptr @l, i64 0, i64 %indvars.iv102
  %34 = getelementptr inbounds [10101 x i32], ptr @r, i64 0, i64 %indvars.iv102
  br label %35

.preheader:                                       ; preds = %72
  br i1 %20, label %.lr.ph72.preheader, label %._crit_edge77

.lr.ph72.preheader:                               ; preds = %.preheader
  %.phi.trans.insert = sext i32 %.sink117 to i64
  %.phi.trans.insert110 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 0, i64 %.phi.trans.insert
  %.pre111 = load i64, ptr %.phi.trans.insert110, align 8, !tbaa !11
  br label %.lr.ph72

35:                                               ; preds = %.lr.ph70, %72
  %indvars.iv89 = phi i64 [ 0, %.lr.ph70 ], [ %indvars.iv.next90, %72 ]
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv89) #8
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr %33, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %40, label %53

40:                                               ; preds = %35
  %41 = load i32, ptr @indx, align 4, !tbaa !5
  %42 = sub nsw i32 1, %41
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv89, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = sext i32 %38 to i64
  %47 = add nsw i64 %45, %46
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv89) #8
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = sub i64 %47, %50
  %52 = load i32, ptr @indx, align 4, !tbaa !5
  br label %72

53:                                               ; preds = %35
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv89) #8
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr %34, align 4, !tbaa !5
  %57 = icmp sgt i32 %55, %56
  %58 = load i32, ptr @indx, align 4, !tbaa !5
  %59 = sub nsw i32 1, %58
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv89, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !11
  br i1 %57, label %63, label %72

63:                                               ; preds = %53
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv89) #8
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = add nsw i64 %62, %66
  %68 = load i32, ptr %34, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = sub i64 %67, %69
  %71 = load i32, ptr @indx, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %53, %40, %63
  %.sink117 = phi i32 [ %52, %40 ], [ %71, %63 ], [ %58, %53 ]
  %.sink = phi i64 [ %51, %40 ], [ %70, %63 ], [ %62, %53 ]
  %73 = sext i32 %.sink117 to i64
  %74 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv89, i64 %73
  store i64 %.sink, ptr %74, align 8, !tbaa !11
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %.preheader, label %35, !llvm.loop !14

._crit_edge73:                                    ; preds = %.lr.ph72
  br i1 %20, label %.lr.ph76, label %._crit_edge77

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %.lr.ph72
  %75 = phi i64 [ %.pre111, %.lr.ph72.preheader ], [ %89, %.lr.ph72 ]
  %76 = phi i32 [ %.sink117, %.lr.ph72.preheader ], [ %90, %.lr.ph72 ]
  %indvars.iv94 = phi i64 [ 1, %.lr.ph72.preheader ], [ %indvars.iv.next95, %.lr.ph72 ]
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv94, i64 %77
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %79 = add nsw i64 %indvars.iv94, -1
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv94) #8
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = add nsw i64 %75, %82
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %79) #8
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = sub i64 %83, %86
  store i64 %87, ptr %1, align 8, !tbaa !11
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = load i32, ptr @indx, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv94, i64 %91
  store i64 %89, ptr %92, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge73, label %.lr.ph72, !llvm.loop !15

._crit_edge77:                                    ; preds = %.lr.ph76, %30, %.preheader, %._crit_edge73
  %93 = phi i32 [ %90, %._crit_edge73 ], [ %.sink117, %.preheader ], [ %32, %30 ], [ %113, %.lr.ph76 ]
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv.next103, %95
  br i1 %96, label %30, label %._crit_edge80, !llvm.loop !16

.lr.ph76:                                         ; preds = %._crit_edge73, %.lr.ph76
  %97 = phi i32 [ %113, %.lr.ph76 ], [ %90, %._crit_edge73 ]
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph76 ], [ %22, %._crit_edge73 ]
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv99, i64 %98
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %100 = add nuw nsw i64 %indvars.iv99, 1
  %101 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %100, i64 %98
  %102 = load i64, ptr %101, align 8, !tbaa !11
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %100) #8
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = add nsw i64 %102, %105
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv99) #8
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = sub i64 %106, %109
  store i64 %110, ptr %2, align 8, !tbaa !11
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %112 = load i64, ptr %111, align 8, !tbaa !11
  %113 = load i32, ptr @indx, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv99, i64 %114
  store i64 %112, ptr %115, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %indvars.iv.next100 = add nsw i64 %indvars.iv99, -1
  %116 = icmp sgt i64 %indvars.iv99, 0
  br i1 %116, label %.lr.ph76, label %._crit_edge77, !llvm.loop !17

._crit_edge84:                                    ; preds = %.lr.ph83, %._crit_edge80
  %117 = phi i64 [ 1000000000000000000, %._crit_edge80 ], [ %124, %.lr.ph83 ]
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %117)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 0

.lr.ph83:                                         ; preds = %.lr.ph83.preheader, %.lr.ph83
  %indvars.iv105 = phi i64 [ 0, %.lr.ph83.preheader ], [ %indvars.iv.next106, %.lr.ph83 ]
  %120 = load i32, ptr @indx, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [10101 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv105, i64 %121
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %122)
  %124 = load i64, ptr %123, align 8, !tbaa !11
  store i64 %124, ptr %3, align 8, !tbaa !11
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count108
  br i1 %exitcond109.not, label %._crit_edge84, label %.lr.ph83, !llvm.loop !18
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #4

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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