; LLVM IR from tangjz/acm-icpc :: codeforces/1500D.ll (Z5solvev)

; 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"

%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE3ans = external hidden global [1501 x i32], align 16
@_ZZ5solvevE3tim = external hidden global [2300001 x i32], align 16
@_ZZ5solvevE4info = external hidden global [2 x [1501 x [11 x %"struct.std::pair"]]], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %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 i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca [3 x i32], align 4
  %20 = alloca [3 x ptr], align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i8, align 1
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = mul nsw i32 %34, %35
  store i32 %36, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = mul i64 %39, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE3tim, i8 0, i64 %40, i1 false)
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = mul i64 %43, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE3ans, i8 0, i64 %44, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %62, %0
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %65

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  %53 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %53, ptr %8, align 4
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %55
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %56, i64 0, i64 %58
  %60 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %59, i64 0, i64 0
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %60, ptr noundef nonnull align 4 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %62

62:                                               ; preds = %50
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !5
  br label %45, !llvm.loop !9

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

66:                                               ; preds = %294, %65
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %297

71:                                               ; preds = %66
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  br label %72

72:                                               ; preds = %290, %71
  %73 = load i32, ptr %13, align 4, !tbaa !5
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %72
  %78 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  %79 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %79, ptr %15, align 4
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %81
  %83 = load i32, ptr %13, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %82, i64 0, i64 %84
  %86 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %85, i64 0, i64 0
  %87 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %4, align 4, !tbaa !5
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = load i32, ptr %14, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2300001 x i32], ptr @_ZZ5solvevE3tim, i64 0, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 4 %19, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %96, label %124

96:                                               ; preds = %77
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %98
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %99, i64 0, i64 %101
  %103 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %102, i64 0, i64 0
  %104 = load i32, ptr %17, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %17, align 4, !tbaa !5
  %106 = sext i32 %104 to i64
  %107 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %106
  store ptr %103, ptr %107, align 8, !tbaa !11
  %108 = load i32, ptr %13, align 4, !tbaa !5
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %110, label %123

110:                                              ; preds = %96
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %112
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %113, i64 0, i64 %116
  %118 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %117, i64 0, i64 0
  %119 = load i32, ptr %17, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %17, align 4, !tbaa !5
  %121 = sext i32 %119 to i64
  %122 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %121
  store ptr %118, ptr %122, align 8, !tbaa !11
  br label %123

123:                                              ; preds = %110, %96
  br label %124

124:                                              ; preds = %123, %77
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = icmp sgt i32 %125, 0
  br i1 %126, label %127, label %140

127:                                              ; preds = %124
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %129
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %130, i64 0, i64 %133
  %135 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %134, i64 0, i64 0
  %136 = load i32, ptr %17, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %17, align 4, !tbaa !5
  %138 = sext i32 %136 to i64
  %139 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %138
  store ptr %135, ptr %139, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %127, %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = add nsw i32 %142, 2
  store i32 %143, ptr %21, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %271, %140
  br label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %146 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %146, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %168, %145
  %148 = load i32, ptr %23, align 4, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %171

152:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %153 = load i32, ptr %23, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = load i32, ptr %23, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %"struct.std::pair", ptr %156, i64 %161
  %163 = getelementptr inbounds %"struct.std::pair", ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !13
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %24, align 4, !tbaa !5
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %168

168:                                              ; preds = %152
  %169 = load i32, ptr %23, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %23, align 4, !tbaa !5
  br label %147, !llvm.loop !15

171:                                              ; preds = %151
  %172 = load i32, ptr %22, align 4, !tbaa !5
  %173 = load i32, ptr %21, align 4, !tbaa !5
  %174 = icmp sge i32 %172, %173
  br i1 %174, label %175, label %176

175:                                              ; preds = %171
  store i32 12, ptr %12, align 4
  br label %269

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %177 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %177, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  store i8 0, ptr %26, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %258, %176
  %179 = load i8, ptr %26, align 1, !tbaa !16, !range !18, !noundef !19
  %180 = trunc i8 %179 to i1
  br i1 %180, label %185, label %181

181:                                              ; preds = %178
  %182 = load i32, ptr %27, align 4, !tbaa !5
  %183 = load i32, ptr %17, align 4, !tbaa !5
  %184 = icmp slt i32 %182, %183
  br label %185

185:                                              ; preds = %181, %178
  %186 = phi i1 [ false, %178 ], [ %184, %181 ]
  br i1 %186, label %188, label %187

187:                                              ; preds = %185
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %261

188:                                              ; preds = %185
  br label %189

189:                                              ; preds = %251, %188
  %190 = load i32, ptr %27, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !11
  %194 = load i32, ptr %27, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %"struct.std::pair", ptr %193, i64 %198
  %200 = getelementptr inbounds %"struct.std::pair", ptr %199, i32 0, i32 0
  %201 = load i32, ptr %200, align 4, !tbaa !13
  %202 = add nsw i32 %201, 1
  %203 = load i32, ptr %22, align 4, !tbaa !5
  %204 = icmp eq i32 %202, %203
  br i1 %204, label %205, label %257

205:                                              ; preds = %189
  %206 = load i32, ptr %27, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [3 x ptr], ptr %20, i64 0, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !11
  %210 = load i32, ptr %27, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds %"struct.std::pair", ptr %209, i64 %214
  %216 = getelementptr inbounds %"struct.std::pair", ptr %215, i32 0, i32 1
  %217 = load i32, ptr %216, align 4, !tbaa !20
  store i32 %217, ptr %14, align 4, !tbaa !5
  %218 = load i32, ptr %14, align 4, !tbaa !5
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %221, label %220

220:                                              ; preds = %205
  store i8 1, ptr %26, align 1, !tbaa !16
  br label %257

221:                                              ; preds = %205
  %222 = load i32, ptr %14, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [2300001 x i32], ptr @_ZZ5solvevE3tim, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = load i32, ptr %4, align 4, !tbaa !5
  %227 = icmp eq i32 %225, %226
  br i1 %227, label %228, label %229

228:                                              ; preds = %221
  br label %251

229:                                              ; preds = %221
  %230 = load i32, ptr %4, align 4, !tbaa !5
  %231 = load i32, ptr %14, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [2300001 x i32], ptr @_ZZ5solvevE3tim, i64 0, i64 %232
  store i32 %230, ptr %233, align 4, !tbaa !5
  %234 = load i32, ptr %18, align 4, !tbaa !5
  %235 = load i32, ptr %2, align 4, !tbaa !5
  %236 = icmp eq i32 %234, %235
  br i1 %236, label %237, label %238

237:                                              ; preds = %229
  store i8 1, ptr %26, align 1, !tbaa !16
  br label %257

238:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %239 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %239, ptr %28, align 4
  %240 = load i32, ptr %5, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %241
  %243 = load i32, ptr %13, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %242, i64 0, i64 %244
  %246 = load i32, ptr %18, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %18, align 4, !tbaa !5
  %248 = sext i32 %246 to i64
  %249 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %245, i64 0, i64 %248
  %250 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %249, ptr noundef nonnull align 4 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %251

251:                                              ; preds = %238, %228
  %252 = load i32, ptr %27, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %254, align 4, !tbaa !5
  br label %189, !llvm.loop !21

257:                                              ; preds = %237, %220, %189
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %27, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %27, align 4, !tbaa !5
  br label %178, !llvm.loop !22

261:                                              ; preds = %187
  %262 = load i8, ptr %26, align 1, !tbaa !16, !range !18, !noundef !19
  %263 = trunc i8 %262 to i1
  br i1 %263, label %264, label %267

264:                                              ; preds = %261
  %265 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %265, ptr %18, align 4, !tbaa !5
  %266 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %266, ptr %21, align 4, !tbaa !5
  store i32 12, ptr %12, align 4
  br label %268

267:                                              ; preds = %261
  store i32 0, ptr %12, align 4
  br label %268

268:                                              ; preds = %267, %264
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %269

269:                                              ; preds = %268, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  %270 = load i32, ptr %12, align 4
  switch i32 %270, label %333 [
    i32 0, label %271
    i32 12, label %272
  ]

271:                                              ; preds = %269
  br label %144, !llvm.loop !23

272:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  %273 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %30)
  store i64 %273, ptr %29, align 4
  %274 = load i32, ptr %5, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %275
  %277 = load i32, ptr %13, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [1501 x [11 x %"struct.std::pair"]], ptr %276, i64 0, i64 %278
  %280 = load i32, ptr %18, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [11 x %"struct.std::pair"], ptr %279, i64 0, i64 %281
  %283 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %282, ptr noundef nonnull align 4 dereferenceable(8) %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  %284 = load i32, ptr %21, align 4, !tbaa !5
  %285 = sub nsw i32 %284, 1
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %287, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %290

290:                                              ; preds = %272
  %291 = load i32, ptr %13, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %13, align 4, !tbaa !5
  br label %72, !llvm.loop !24

293:                                              ; preds = %76
  br label %294

294:                                              ; preds = %293
  %295 = load i32, ptr %11, align 4, !tbaa !5
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %11, align 4, !tbaa !5
  br label %66, !llvm.loop !25

297:                                              ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %298 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %298, ptr %31, align 4, !tbaa !5
  br label %299

299:                                              ; preds = %314, %297
  %300 = load i32, ptr %31, align 4, !tbaa !5
  %301 = icmp sgt i32 %300, 0
  br i1 %301, label %303, label %302

302:                                              ; preds = %299
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %317

303:                                              ; preds = %299
  %304 = load i32, ptr %31, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %305
  %307 = load i32, ptr %306, align 4, !tbaa !5
  %308 = load i32, ptr %31, align 4, !tbaa !5
  %309 = sub nsw i32 %308, 1
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %310
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = add nsw i32 %312, %307
  store i32 %313, ptr %311, align 4, !tbaa !5
  br label %314

314:                                              ; preds = %303
  %315 = load i32, ptr %31, align 4, !tbaa !5
  %316 = add nsw i32 %315, -1
  store i32 %316, ptr %31, align 4, !tbaa !5
  br label %299, !llvm.loop !26

317:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 1, ptr %32, align 4, !tbaa !5
  br label %318

318:                                              ; preds = %329, %317
  %319 = load i32, ptr %32, align 4, !tbaa !5
  %320 = load i32, ptr %1, align 4, !tbaa !5
  %321 = icmp sle i32 %319, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %318
  store i32 25, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %332

323:                                              ; preds = %318
  %324 = load i32, ptr %32, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %325
  %327 = load i32, ptr %326, align 4, !tbaa !5
  %328 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %327)
  br label %329

329:                                              ; preds = %323
  %330 = load i32, ptr %32, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %32, align 4, !tbaa !5
  br label %318, !llvm.loop !27

332:                                              ; preds = %322
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

333:                                              ; preds = %269
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!14, !6, i64 4}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !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"

%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE3ans = external hidden local_unnamed_addr global [1501 x i32], align 16
@_ZZ5solvevE3tim = external hidden local_unnamed_addr global [2300001 x i32], align 16
@_ZZ5solvevE4info = external hidden global [2 x [1501 x [11 x %"struct.std::pair"]]], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 8
  %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 %"struct.std::pair", align 8
  %12 = alloca i32, align 4
  %13 = alloca [3 x i32], align 4
  %14 = alloca [3 x ptr], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = mul nsw i32 %22, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  %24 = add nuw nsw i32 %23, 1
  %25 = zext nneg i32 %24 to i64
  %26 = shl nuw nsw i64 %25, 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @_ZZ5solvevE3tim, i8 0, i64 %26, i1 false)
  %27 = add nsw i32 %22, 1
  %28 = sext i32 %27 to i64
  %29 = shl nsw i64 %28, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ5solvevE3ans, i8 0, i64 %29, i1 false)
  %30 = icmp sgt i32 %22, 0
  br i1 %30, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  br label %._crit_edge107.thread

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  %31 = icmp sgt i32 %40, 0
  br i1 %31, label %.lr.ph106, label %._crit_edge107.thread

.lr.ph106:                                        ; preds = %._crit_edge
  %32 = getelementptr inbounds i8, ptr %14, i64 8
  br label %50

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %33 = phi i32 [ %40, %.lr.ph ], [ %22, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  %35 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %35, ptr %5, align 8
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %37, i64 %indvars.iv
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %38, ptr noundef nonnull align 4 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge107.thread:                            ; preds = %._crit_edge, %._crit_edge.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %._crit_edge115

._crit_edge107:                                   ; preds = %._crit_edge102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %43 = icmp sgt i32 %53, 0
  br i1 %43, label %.lr.ph111.preheader, label %._crit_edge115

.lr.ph111.preheader:                              ; preds = %._crit_edge107
  %44 = zext nneg i32 %53 to i64
  %.phi.trans.insert = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %44
  %.pre146 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  %xtraiter = and i64 %44, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph111.prol.loopexit, label %.lr.ph111.prol

.lr.ph111.prol:                                   ; preds = %.lr.ph111.preheader, %.lr.ph111.prol
  %45 = phi i32 [ %48, %.lr.ph111.prol ], [ %.pre146, %.lr.ph111.preheader ]
  %indvars.iv136.prol = phi i64 [ %indvars.iv.next137.prol, %.lr.ph111.prol ], [ %44, %.lr.ph111.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph111.prol ], [ 0, %.lr.ph111.preheader ]
  %indvars.iv.next137.prol = add nsw i64 %indvars.iv136.prol, -1
  %46 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv.next137.prol
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, %45
  store i32 %48, ptr %46, align 4, !tbaa !5
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph111.prol.loopexit, label %.lr.ph111.prol, !llvm.loop !11

.lr.ph111.prol.loopexit:                          ; preds = %.lr.ph111.prol, %.lr.ph111.preheader
  %.unr = phi i32 [ %.pre146, %.lr.ph111.preheader ], [ %48, %.lr.ph111.prol ]
  %indvars.iv136.unr = phi i64 [ %44, %.lr.ph111.preheader ], [ %indvars.iv.next137.prol, %.lr.ph111.prol ]
  %49 = icmp ult i32 %53, 4
  br i1 %49, label %.lr.ph114.preheader, label %.lr.ph111

50:                                               ; preds = %.lr.ph106, %._crit_edge102
  %.042104 = phi i32 [ 0, %.lr.ph106 ], [ %.143.lcssa, %._crit_edge102 ]
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph101, label %._crit_edge102

._crit_edge102:                                   ; preds = %.loopexit, %50
  %53 = phi i32 [ %51, %50 ], [ %161, %.loopexit ]
  %.143.lcssa = phi i32 [ %.042104, %50 ], [ %65, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %8, align 4, !tbaa !5
  %56 = icmp slt i32 %55, %53
  br i1 %56, label %50, label %._crit_edge107, !llvm.loop !13

.lr.ph101:                                        ; preds = %50, %.loopexit
  %.14399 = phi i32 [ %65, %.loopexit ], [ %.042104, %50 ]
  %57 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  %58 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %58, ptr %11, align 8
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %60, i64 %62
  %64 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  %65 = add nsw i32 %.14399, 1
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2300001 x i32], ptr @_ZZ5solvevE3tim, i64 0, i64 %67
  store i32 %65, ptr %68, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %13, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  %.pr.pre = load i32, ptr %9, align 4, !tbaa !5
  br i1 %70, label %71, label %80

71:                                               ; preds = %.lr.ph101
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = sext i32 %.pr.pre to i64
  %75 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %73, i64 %74
  store ptr %75, ptr %14, align 16, !tbaa !14
  %76 = icmp sgt i32 %.pr.pre, 0
  br i1 %76, label %.thread147, label %.thread

.thread147:                                       ; preds = %71
  %77 = add nsw i32 %.pr.pre, -1
  %78 = zext nneg i32 %77 to i64
  %79 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %73, i64 %78
  store ptr %79, ptr %32, align 8, !tbaa !14
  br label %82

80:                                               ; preds = %.lr.ph101
  %81 = icmp sgt i32 %.pr.pre, 0
  br i1 %81, label %82, label %.thread

82:                                               ; preds = %.thread147, %80
  %.047.ph149 = phi i32 [ 2, %.thread147 ], [ 0, %80 ]
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = add nsw i32 %.pr.pre, -1
  %86 = zext nneg i32 %85 to i64
  %87 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %84, i64 %86
  %88 = or disjoint i32 %.047.ph149, 1
  %89 = zext nneg i32 %.047.ph149 to i64
  %90 = getelementptr inbounds [3 x ptr], ptr %14, i64 0, i64 %89
  store ptr %87, ptr %90, align 16, !tbaa !14
  br label %.thread

.thread:                                          ; preds = %71, %82, %80
  %.148 = phi i32 [ %88, %82 ], [ 0, %80 ], [ 1, %71 ]
  %.148.fr = freeze i32 %.148
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %92, 2
  store i32 %93, ptr %15, align 4, !tbaa !5
  %94 = icmp sgt i32 %.148.fr, 0
  %95 = icmp slt i32 %.148.fr, 1
  br i1 %95, label %.thread.split.us.split.split, label %.thread.split.preheader

.thread.split.preheader:                          ; preds = %.thread
  %96 = zext nneg i32 %.148.fr to i64
  %wide.trip.count = zext nneg i32 %.148.fr to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  store i32 %93, ptr %16, align 4, !tbaa !5
  br label %.lr.ph73.preheader

.thread.split.us.split.split:                     ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  br label %.loopexit

.lr.ph73.preheader:                               ; preds = %.thread.split.preheader, %._crit_edge92.thread
  %.045218 = phi i32 [ 1, %.thread.split.preheader ], [ %.2.lcssa156160, %._crit_edge92.thread ]
  br label %.lr.ph73

._crit_edge74:                                    ; preds = %.lr.ph73
  %.pre144 = load i32, ptr %15, align 4, !tbaa !5
  %.not56 = icmp slt i32 %106, %.pre144
  br i1 %.not56, label %.preheader66.outer, label %.loopexit

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %.lr.ph73
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %.lr.ph73 ], [ 0, %.lr.ph73.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  %97 = getelementptr inbounds [3 x ptr], ptr %14, i64 0, i64 %indvars.iv122
  %98 = load ptr, ptr %97, align 8, !tbaa !14
  %99 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 %indvars.iv122
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %"struct.std::pair", ptr %98, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !16
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %17, align 4, !tbaa !5
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %106 = load i32, ptr %105, align 4, !tbaa !5
  store i32 %106, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next123, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !18

.preheader66:                                     ; preds = %.preheader66.outer, %._crit_edge78.thread
  %indvars.iv128 = phi i64 [ %indvars.iv.next129154, %._crit_edge78.thread ], [ %indvars.iv128.ph, %.preheader66.outer ]
  %107 = getelementptr inbounds [3 x ptr], ptr %14, i64 0, i64 %indvars.iv128
  %108 = load ptr, ptr %107, align 8, !tbaa !14
  %109 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 %indvars.iv128
  %.promoted = load i32, ptr %109, align 4, !tbaa !5
  %110 = sext i32 %.promoted to i64
  %111 = getelementptr inbounds %"struct.std::pair", ptr %108, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !16
  %113 = add nsw i32 %112, 1
  %114 = icmp eq i32 %113, %.ph173
  br i1 %114, label %.lr.ph77.preheader, label %._crit_edge78.thread

.lr.ph77.preheader:                               ; preds = %.preheader66
  %115 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 %indvars.iv128
  br label %.lr.ph77

.lr.ph77:                                         ; preds = %.lr.ph77.preheader, %138
  %116 = phi i32 [ %.ph, %.lr.ph77.preheader ], [ %139, %138 ]
  %117 = phi i32 [ %.ph173, %.lr.ph77.preheader ], [ %140, %138 ]
  %indvars.iv125 = phi i64 [ %110, %.lr.ph77.preheader ], [ %indvars.iv.next126, %138 ]
  %.276 = phi i32 [ %.14689.ph, %.lr.ph77.preheader ], [ %.3, %138 ]
  %118 = getelementptr inbounds %"struct.std::pair", ptr %108, i64 %indvars.iv125, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !19
  store i32 %119, ptr %10, align 4, !tbaa !5
  %.not59 = icmp eq i32 %119, 0
  br i1 %.not59, label %.split, label %120

120:                                              ; preds = %.lr.ph77
  %121 = sext i32 %119 to i64
  %122 = getelementptr inbounds [2300001 x i32], ptr @_ZZ5solvevE3tim, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp eq i32 %123, %65
  br i1 %124, label %138, label %125

125:                                              ; preds = %120
  store i32 %65, ptr %122, align 4, !tbaa !5
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = icmp eq i32 %.276, %126
  br i1 %127, label %.split, label %128

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %129 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %129, ptr %18, align 8
  %130 = load i32, ptr %3, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = add nsw i32 %.276, 1
  %135 = sext i32 %.276 to i64
  %136 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %131, i64 %133, i64 %135
  %137 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %136, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %.pre145 = load i32, ptr %16, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %120, %128
  %139 = phi i32 [ %116, %120 ], [ %.pre145, %128 ]
  %140 = phi i32 [ %117, %120 ], [ %.pre145, %128 ]
  %.3 = phi i32 [ %.276, %120 ], [ %134, %128 ]
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, 1
  %141 = getelementptr inbounds %"struct.std::pair", ptr %108, i64 %indvars.iv.next126
  %142 = load i32, ptr %141, align 4, !tbaa !16
  %143 = add nsw i32 %142, 1
  %144 = icmp eq i32 %143, %140
  br i1 %144, label %.lr.ph77, label %._crit_edge78, !llvm.loop !20

._crit_edge78:                                    ; preds = %138
  %.lcssa75.ph = trunc i64 %indvars.iv.next126 to i32
  store i32 %.lcssa75.ph, ptr %115, align 4, !tbaa !5
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %.not197 = icmp ult i64 %indvars.iv.next129, %96
  br i1 %.not197, label %.preheader66.outer, label %._crit_edge92.thread, !llvm.loop !21

.preheader66.outer:                               ; preds = %._crit_edge74, %._crit_edge78
  %.ph = phi i32 [ %139, %._crit_edge78 ], [ %106, %._crit_edge74 ]
  %.ph173 = phi i32 [ %140, %._crit_edge78 ], [ %106, %._crit_edge74 ]
  %indvars.iv128.ph = phi i64 [ %indvars.iv.next129, %._crit_edge78 ], [ 0, %._crit_edge74 ]
  %.14689.ph = phi i32 [ %.3, %._crit_edge78 ], [ %.045218, %._crit_edge74 ]
  br label %.preheader66

._crit_edge78.thread:                             ; preds = %.preheader66
  %indvars.iv.next129154 = add nuw nsw i64 %indvars.iv128, 1
  %.not = icmp ult i64 %indvars.iv.next129154, %96
  br i1 %.not, label %.preheader66, label %._crit_edge92.thread, !llvm.loop !21

.split:                                           ; preds = %.lr.ph77, %125
  %.lcssa75.ph165 = trunc i64 %indvars.iv125 to i32
  store i32 %.lcssa75.ph165, ptr %115, align 4, !tbaa !5
  store i32 %116, ptr %15, align 4, !tbaa !5
  br label %.loopexit

._crit_edge92.thread:                             ; preds = %._crit_edge78, %._crit_edge78.thread
  %.2.lcssa156160 = phi i32 [ %.14689.ph, %._crit_edge78.thread ], [ %.3, %._crit_edge78 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %.pre = load i32, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  store i32 %.pre, ptr %16, align 4, !tbaa !5
  br i1 %94, label %.lr.ph73.preheader, label %.loopexit

.loopexit:                                        ; preds = %._crit_edge74, %._crit_edge92.thread, %.thread.split.us.split.split, %.split
  %.04569 = phi i32 [ %.045218, %.split ], [ 1, %.thread.split.us.split.split ], [ %.2.lcssa156160, %._crit_edge92.thread ], [ %.045218, %._crit_edge74 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  %145 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %145, ptr %19, align 8
  %146 = load i32, ptr %3, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = sext i32 %.04569 to i64
  %151 = getelementptr inbounds [2 x [1501 x [11 x %"struct.std::pair"]]], ptr @_ZZ5solvevE4info, i64 0, i64 %147, i64 %149, i64 %150
  %152 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %151, ptr noundef nonnull align 4 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  %153 = load i32, ptr %15, align 4, !tbaa !5
  %154 = add nsw i32 %153, -1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %9, align 4, !tbaa !5
  %161 = load i32, ptr %1, align 4, !tbaa !5
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %.lr.ph101, label %._crit_edge102, !llvm.loop !22

.lr.ph111:                                        ; preds = %.lr.ph111.prol.loopexit, %.lr.ph111
  %163 = phi i32 [ %175, %.lr.ph111 ], [ %.unr, %.lr.ph111.prol.loopexit ]
  %indvars.iv136 = phi i64 [ %indvars.iv.next137.3, %.lr.ph111 ], [ %indvars.iv136.unr, %.lr.ph111.prol.loopexit ]
  %indvars.iv.next137 = add nsw i64 %indvars.iv136, -1
  %164 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv.next137
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = add nsw i32 %165, %163
  store i32 %166, ptr %164, align 4, !tbaa !5
  %indvars.iv.next137.1 = add nsw i64 %indvars.iv136, -2
  %167 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv.next137.1
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = add nsw i32 %168, %166
  store i32 %169, ptr %167, align 4, !tbaa !5
  %indvars.iv.next137.2 = add nsw i64 %indvars.iv136, -3
  %170 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv.next137.2
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add nsw i32 %171, %169
  store i32 %172, ptr %170, align 4, !tbaa !5
  %indvars.iv.next137.3 = add nsw i64 %indvars.iv136, -4
  %173 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv.next137.3
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = add nsw i32 %174, %172
  store i32 %175, ptr %173, align 4, !tbaa !5
  %176 = icmp ugt i64 %indvars.iv.next137.2, 1
  br i1 %176, label %.lr.ph111, label %.lr.ph114.preheader, !llvm.loop !23

.lr.ph114.preheader:                              ; preds = %.lr.ph111, %.lr.ph111.prol.loopexit
  br label %.lr.ph114

._crit_edge115:                                   ; preds = %.lr.ph114, %._crit_edge107, %._crit_edge107.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %.lr.ph114
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %.lr.ph114 ], [ 1, %.lr.ph114.preheader ]
  %177 = getelementptr inbounds [1501 x i32], ptr @_ZZ5solvevE3ans, i64 0, i64 %indvars.iv140
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %178)
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %180 = load i32, ptr %1, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %.not.not = icmp slt i64 %indvars.iv140, %181
  br i1 %.not.not, label %.lr.ph114, label %._crit_edge115, !llvm.loop !24
}

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

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

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

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

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

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

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

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

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

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

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

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

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


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass