; LLVM IR from kazunetakahashi/atcoder :: 2018/0121_ARC089 (D)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@cnt = external dso_local global [2000 x [2000 x [2 x i32]]], align 16
@sum = external dso_local global [2000 x [2000 x [2 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @cnt, ptr noundef getelementptr inbounds (i32, ptr @cnt, i64 8000000), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, 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
  br label %29

29:                                               ; preds = %121, %0
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr @N, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %124

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  %38 = load i8, ptr %7, align 1, !tbaa !9
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 %39, 87
  %41 = zext i1 %40 to i8
  store i8 %41, ptr %8, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @K, align 4, !tbaa !5
  %44 = sdiv i32 %42, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr @K, align 4, !tbaa !5
  %47 = sdiv i32 %45, %46
  %48 = add nsw i32 %44, %47
  %49 = srem i32 %48, 2
  store i32 %49, ptr %9, align 4, !tbaa !5
  %50 = load i32, ptr @K, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = srem i32 %51, %50
  store i32 %52, ptr %5, align 4, !tbaa !5
  %53 = load i32, ptr @K, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = srem i32 %54, %53
  store i32 %55, ptr %6, align 4, !tbaa !5
  %56 = load i8, ptr %8, align 1, !tbaa !10, !range !12, !noundef !13
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %90

58:                                               ; preds = %34
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %3, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = load i32, ptr @K, align 4, !tbaa !5
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = mul nsw i32 %62, %63
  %65 = add nsw i32 %61, %64
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %66
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2000 x [2 x i32]], ptr %67, i64 0, i64 %69
  %71 = getelementptr inbounds [2 x i32], ptr %70, i64 0, i64 0
  %72 = load i32, ptr %71, align 8, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %71, align 8, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = load i32, ptr @K, align 4, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = sub nsw i32 1, %76
  %78 = mul nsw i32 %75, %77
  %79 = add nsw i32 %74, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr @K, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [2000 x [2 x i32]], ptr %81, i64 0, i64 %85
  %87 = getelementptr inbounds [2 x i32], ptr %86, i64 0, i64 0
  %88 = load i32, ptr %87, align 8, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %87, align 8, !tbaa !5
  br label %120

90:                                               ; preds = %34
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = load i32, ptr @K, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = mul nsw i32 %92, %93
  %95 = add nsw i32 %91, %94
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %96
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2000 x [2 x i32]], ptr %97, i64 0, i64 %99
  %101 = getelementptr inbounds [2 x i32], ptr %100, i64 0, i64 1
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %101, align 4, !tbaa !5
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = load i32, ptr @K, align 4, !tbaa !5
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sub nsw i32 1, %106
  %108 = mul nsw i32 %105, %107
  %109 = add nsw i32 %104, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %110
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = load i32, ptr @K, align 4, !tbaa !5
  %114 = add nsw i32 %112, %113
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [2000 x [2 x i32]], ptr %111, i64 0, i64 %115
  %117 = getelementptr inbounds [2 x i32], ptr %116, i64 0, i64 1
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %117, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %90, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %121

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

124:                                              ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %261, %124
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = icmp slt i32 %126, 2
  br i1 %127, label %129, label %128

128:                                              ; preds = %125
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %264

129:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %167, %129
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = load i32, ptr @K, align 4, !tbaa !5
  %133 = mul nsw i32 2, %132
  %134 = icmp slt i32 %131, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %130
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %170

136:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %163, %136
  %138 = load i32, ptr %13, align 4, !tbaa !5
  %139 = load i32, ptr @K, align 4, !tbaa !5
  %140 = mul nsw i32 2, %139
  %141 = icmp slt i32 %138, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %137
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %166

143:                                              ; preds = %137
  %144 = load i32, ptr %12, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %145
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [2000 x [2 x i32]], ptr %146, i64 0, i64 %148
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [2 x i32], ptr %149, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %155
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [2000 x [2 x i32]], ptr %156, i64 0, i64 %158
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2 x i32], ptr %159, i64 0, i64 %161
  store i32 %153, ptr %162, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %143
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %13, align 4, !tbaa !5
  br label %137, !llvm.loop !16

166:                                              ; preds = %142
  br label %167

167:                                              ; preds = %166
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %12, align 4, !tbaa !5
  br label %130, !llvm.loop !17

170:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %212, %170
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = load i32, ptr @K, align 4, !tbaa !5
  %174 = mul nsw i32 2, %173
  %175 = icmp slt i32 %172, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %171
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %215

177:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %208, %177
  %179 = load i32, ptr %15, align 4, !tbaa !5
  %180 = load i32, ptr @K, align 4, !tbaa !5
  %181 = mul nsw i32 2, %180
  %182 = sub nsw i32 %181, 1
  %183 = icmp slt i32 %179, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %178
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %211

185:                                              ; preds = %178
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %187
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2000 x [2 x i32]], ptr %188, i64 0, i64 %190
  %192 = load i32, ptr %10, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [2 x i32], ptr %191, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %197
  %199 = load i32, ptr %15, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [2000 x [2 x i32]], ptr %198, i64 0, i64 %201
  %203 = load i32, ptr %10, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [2 x i32], ptr %202, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = add nsw i32 %206, %195
  store i32 %207, ptr %205, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %185
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %15, align 4, !tbaa !5
  br label %178, !llvm.loop !18

211:                                              ; preds = %184
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %14, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %14, align 4, !tbaa !5
  br label %171, !llvm.loop !19

215:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %257, %215
  %217 = load i32, ptr %16, align 4, !tbaa !5
  %218 = load i32, ptr @K, align 4, !tbaa !5
  %219 = mul nsw i32 2, %218
  %220 = icmp slt i32 %217, %219
  br i1 %220, label %222, label %221

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

222:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %223

223:                                              ; preds = %253, %222
  %224 = load i32, ptr %17, align 4, !tbaa !5
  %225 = load i32, ptr @K, align 4, !tbaa !5
  %226 = mul nsw i32 2, %225
  %227 = sub nsw i32 %226, 1
  %228 = icmp slt i32 %224, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %223
  store i32 23, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %256

230:                                              ; preds = %223
  %231 = load i32, ptr %17, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %232
  %234 = load i32, ptr %16, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [2000 x [2 x i32]], ptr %233, i64 0, i64 %235
  %237 = load i32, ptr %10, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2 x i32], ptr %236, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = load i32, ptr %17, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %243
  %245 = load i32, ptr %16, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [2000 x [2 x i32]], ptr %244, i64 0, i64 %246
  %248 = load i32, ptr %10, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [2 x i32], ptr %247, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = add nsw i32 %251, %240
  store i32 %252, ptr %250, align 4, !tbaa !5
  br label %253

253:                                              ; preds = %230
  %254 = load i32, ptr %17, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %17, align 4, !tbaa !5
  br label %223, !llvm.loop !20

256:                                              ; preds = %229
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %16, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %16, align 4, !tbaa !5
  br label %216, !llvm.loop !21

260:                                              ; preds = %221
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %10, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %10, align 4, !tbaa !5
  br label %125, !llvm.loop !22

264:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %265

265:                                              ; preds = %369, %264
  %266 = load i32, ptr %19, align 4, !tbaa !5
  %267 = load i32, ptr @K, align 4, !tbaa !5
  %268 = icmp slt i32 %266, %267
  br i1 %268, label %270, label %269

269:                                              ; preds = %265
  store i32 26, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %372

270:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %271

271:                                              ; preds = %365, %270
  %272 = load i32, ptr %20, align 4, !tbaa !5
  %273 = load i32, ptr @K, align 4, !tbaa !5
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  store i32 29, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %368

276:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %277 = load i32, ptr %19, align 4, !tbaa !5
  %278 = load i32, ptr @K, align 4, !tbaa !5
  %279 = add nsw i32 %277, %278
  store i32 %279, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %280 = load i32, ptr %20, align 4, !tbaa !5
  %281 = load i32, ptr @K, align 4, !tbaa !5
  %282 = add nsw i32 %280, %281
  store i32 %282, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %283 = load i32, ptr %21, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %284
  %286 = load i32, ptr %22, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [2000 x [2 x i32]], ptr %285, i64 0, i64 %287
  %289 = getelementptr inbounds [2 x i32], ptr %288, i64 0, i64 0
  %290 = load i32, ptr %289, align 8, !tbaa !5
  %291 = load i32, ptr %19, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %292
  %294 = load i32, ptr %22, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [2000 x [2 x i32]], ptr %293, i64 0, i64 %295
  %297 = getelementptr inbounds [2 x i32], ptr %296, i64 0, i64 0
  %298 = load i32, ptr %297, align 8, !tbaa !5
  %299 = sub nsw i32 %290, %298
  %300 = load i32, ptr %21, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %301
  %303 = load i32, ptr %20, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [2000 x [2 x i32]], ptr %302, i64 0, i64 %304
  %306 = getelementptr inbounds [2 x i32], ptr %305, i64 0, i64 0
  %307 = load i32, ptr %306, align 8, !tbaa !5
  %308 = sub nsw i32 %299, %307
  %309 = load i32, ptr %19, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %310
  %312 = load i32, ptr %20, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [2000 x [2 x i32]], ptr %311, i64 0, i64 %313
  %315 = getelementptr inbounds [2 x i32], ptr %314, i64 0, i64 0
  %316 = load i32, ptr %315, align 8, !tbaa !5
  %317 = add nsw i32 %308, %316
  store i32 %317, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %318 = load i32, ptr %21, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %319
  %321 = load i32, ptr %22, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [2000 x [2 x i32]], ptr %320, i64 0, i64 %322
  %324 = getelementptr inbounds [2 x i32], ptr %323, i64 0, i64 1
  %325 = load i32, ptr %324, align 4, !tbaa !5
  %326 = load i32, ptr %19, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %327
  %329 = load i32, ptr %22, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [2000 x [2 x i32]], ptr %328, i64 0, i64 %330
  %332 = getelementptr inbounds [2 x i32], ptr %331, i64 0, i64 1
  %333 = load i32, ptr %332, align 4, !tbaa !5
  %334 = sub nsw i32 %325, %333
  %335 = load i32, ptr %21, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %336
  %338 = load i32, ptr %20, align 4, !tbaa !5
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [2000 x [2 x i32]], ptr %337, i64 0, i64 %339
  %341 = getelementptr inbounds [2 x i32], ptr %340, i64 0, i64 1
  %342 = load i32, ptr %341, align 4, !tbaa !5
  %343 = sub nsw i32 %334, %342
  %344 = load i32, ptr %19, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %345
  %347 = load i32, ptr %20, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [2000 x [2 x i32]], ptr %346, i64 0, i64 %348
  %350 = getelementptr inbounds [2 x i32], ptr %349, i64 0, i64 1
  %351 = load i32, ptr %350, align 4, !tbaa !5
  %352 = add nsw i32 %343, %351
  store i32 %352, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %353 = load i32, ptr %3, align 4, !tbaa !5
  %354 = load i32, ptr %23, align 4, !tbaa !5
  %355 = sub nsw i32 %353, %354
  %356 = load i32, ptr %24, align 4, !tbaa !5
  %357 = add nsw i32 %355, %356
  store i32 %357, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %358 = load i32, ptr @N, align 4, !tbaa !5
  %359 = load i32, ptr %25, align 4, !tbaa !5
  %360 = sub nsw i32 %358, %359
  store i32 %360, ptr %26, align 4, !tbaa !5
  %361 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %362 = load i32, ptr %361, align 4, !tbaa !5
  store i32 %362, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  %363 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %364 = load i32, ptr %363, align 4, !tbaa !5
  store i32 %364, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %365

365:                                              ; preds = %276
  %366 = load i32, ptr %20, align 4, !tbaa !5
  %367 = add nsw i32 %366, 1
  store i32 %367, ptr %20, align 4, !tbaa !5
  br label %271, !llvm.loop !23

368:                                              ; preds = %275
  br label %369

369:                                              ; preds = %368
  %370 = load i32, ptr %19, align 4, !tbaa !5
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %19, align 4, !tbaa !5
  br label %265, !llvm.loop !24

372:                                              ; preds = %269
  %373 = load i32, ptr %18, align 4, !tbaa !5
  %374 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %373)
  %375 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %374, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %376 = load i32, ptr %1, align 4
  ret i32 %376
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 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)) #1

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@cnt = external dso_local global [2000 x [2000 x [2 x i32]]], align 16
@sum = external dso_local local_unnamed_addr global [2000 x [2000 x [2 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @cnt, ptr noundef nonnull getelementptr inbounds (i8, ptr @cnt, i64 32000000), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %..preheader92_crit_edge

..preheader92_crit_edge:                          ; preds = %0
  %.pre = load i32, ptr @K, align 4, !tbaa !5
  br label %.preheader92

.preheader92:                                     ; preds = %173, %..preheader92_crit_edge
  %12 = phi i32 [ %.pre, %..preheader92_crit_edge ], [ %130, %173 ]
  %.0.lcssa = phi i32 [ 0, %..preheader92_crit_edge ], [ %.1, %173 ]
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader88.lr.ph.us, label %.split.us.thread

.split.us.thread:                                 ; preds = %.preheader92
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %._crit_edge151

.preheader86.us.us.preheader:                     ; preds = %._crit_edge.us102.us
  %wide.trip.count181 = zext nneg i32 %smax to i64
  %xtraiter223 = and i64 %wide.trip.count166, 3
  %14 = icmp slt i32 %16, 4
  %unroll_iter227 = and i64 %wide.trip.count166, 2147483644
  br label %.preheader86.us.us

.preheader88.lr.ph.us:                            ; preds = %.preheader92
  %15 = shl nuw i32 %12, 1
  %16 = add i32 %15, -1
  %smax = call i32 @llvm.smax.i32(i32 %15, i32 1)
  %smax165 = call i32 @llvm.smax.i32(i32 %16, i32 1)
  %wide.trip.count160 = zext nneg i32 %smax to i64
  %xtraiter = and i64 %wide.trip.count160, 3
  %17 = icmp slt i32 %15, 4
  %unroll_iter = and i64 %wide.trip.count160, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader88.us.us

.preheader88.us.us:                               ; preds = %._crit_edge.us.us, %.preheader88.lr.ph.us
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %._crit_edge.us.us ], [ 0, %.preheader88.lr.ph.us ]
  br i1 %17, label %._crit_edge.us.us.unr-lcssa, label %.preheader88.us.us.new

.preheader88.us.us.new:                           ; preds = %.preheader88.us.us, %.preheader88.us.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.preheader88.us.us.new ], [ 0, %.preheader88.us.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader88.us.us.new ], [ 0, %.preheader88.us.us ]
  %18 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157, i64 %indvars.iv, i64 0
  %19 = load i32, ptr %18, align 16, !tbaa !5
  %20 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157, i64 %indvars.iv, i64 0
  store i32 %19, ptr %20, align 16, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %21 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next, i64 0
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next, i64 0
  store i32 %22, ptr %23, align 8, !tbaa !5
  %indvars.iv.next.1213 = or disjoint i64 %indvars.iv, 2
  %24 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next.1213, i64 0
  %25 = load i32, ptr %24, align 16, !tbaa !5
  %26 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next.1213, i64 0
  store i32 %25, ptr %26, align 16, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %27 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next.2, i64 0
  %28 = load i32, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157, i64 %indvars.iv.next.2, i64 0
  store i32 %28, ptr %29, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.us.unr-lcssa, label %.preheader88.us.us.new, !llvm.loop !9

._crit_edge.us.us.unr-lcssa:                      ; preds = %.preheader88.us.us.new, %.preheader88.us.us
  %indvars.iv.unr = phi i64 [ 0, %.preheader88.us.us ], [ %indvars.iv.next.3, %.preheader88.us.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.us.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.us.unr-lcssa ]
  %30 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157, i64 %indvars.iv.epil, i64 0
  %31 = load i32, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157, i64 %indvars.iv.epil, i64 0
  store i32 %31, ptr %32, align 8, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us.us, label %.epil.preheader, !llvm.loop !11

._crit_edge.us.us:                                ; preds = %.epil.preheader, %._crit_edge.us.us.unr-lcssa
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %.preheader87.us.us.preheader, label %.preheader88.us.us, !llvm.loop !13

.preheader87.us.us.preheader:                     ; preds = %._crit_edge.us.us
  %wide.trip.count171 = zext nneg i32 %smax to i64
  %wide.trip.count166 = zext nneg i32 %smax165 to i64
  %xtraiter215 = and i64 %wide.trip.count166, 3
  %33 = icmp slt i32 %16, 4
  %unroll_iter218 = and i64 %wide.trip.count166, 2147483644
  br label %.preheader87.us.us

.preheader87.us.us:                               ; preds = %.preheader87.us.us.preheader, %._crit_edge.us102.us
  %indvars.iv168 = phi i64 [ 0, %.preheader87.us.us.preheader ], [ %indvars.iv.next169, %._crit_edge.us102.us ]
  %.phi.trans.insert = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 0, i64 0
  %.pre192 = load i32, ptr %.phi.trans.insert, align 16, !tbaa !5
  br i1 %33, label %.epil.preheader214, label %.preheader87.us.us.new

.preheader87.us.us.new:                           ; preds = %.preheader87.us.us, %.preheader87.us.us.new
  %34 = phi i32 [ %46, %.preheader87.us.us.new ], [ %.pre192, %.preheader87.us.us ]
  %indvars.iv162 = phi i64 [ %indvars.iv.next163.3, %.preheader87.us.us.new ], [ 0, %.preheader87.us.us ]
  %niter219 = phi i64 [ %niter219.next.3, %.preheader87.us.us.new ], [ 0, %.preheader87.us.us ]
  %indvars.iv.next163 = or disjoint i64 %indvars.iv162, 1
  %35 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 %indvars.iv.next163, i64 0
  %36 = load i32, ptr %35, align 8, !tbaa !5
  %37 = add nsw i32 %36, %34
  store i32 %37, ptr %35, align 8, !tbaa !5
  %indvars.iv.next163.1221 = or disjoint i64 %indvars.iv162, 2
  %38 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 %indvars.iv.next163.1221, i64 0
  %39 = load i32, ptr %38, align 16, !tbaa !5
  %40 = add nsw i32 %39, %37
  store i32 %40, ptr %38, align 16, !tbaa !5
  %indvars.iv.next163.2 = or disjoint i64 %indvars.iv162, 3
  %41 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 %indvars.iv.next163.2, i64 0
  %42 = load i32, ptr %41, align 8, !tbaa !5
  %43 = add nsw i32 %42, %40
  store i32 %43, ptr %41, align 8, !tbaa !5
  %indvars.iv.next163.3 = add nuw nsw i64 %indvars.iv162, 4
  %44 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 %indvars.iv.next163.3, i64 0
  %45 = load i32, ptr %44, align 16, !tbaa !5
  %46 = add nsw i32 %45, %43
  store i32 %46, ptr %44, align 16, !tbaa !5
  %niter219.next.3 = add i64 %niter219, 4
  %niter219.ncmp.3 = icmp eq i64 %niter219.next.3, %unroll_iter218
  br i1 %niter219.ncmp.3, label %.epil.preheader214, label %.preheader87.us.us.new, !llvm.loop !14

.epil.preheader214:                               ; preds = %.preheader87.us.us, %.preheader87.us.us.new
  %.unr = phi i32 [ %.pre192, %.preheader87.us.us ], [ %46, %.preheader87.us.us.new ]
  %indvars.iv162.unr = phi i64 [ 0, %.preheader87.us.us ], [ %indvars.iv.next163.3, %.preheader87.us.us.new ]
  br label %47

47:                                               ; preds = %47, %.epil.preheader214
  %48 = phi i32 [ %51, %47 ], [ %.unr, %.epil.preheader214 ]
  %indvars.iv162.epil = phi i64 [ %indvars.iv.next163.epil, %47 ], [ %indvars.iv162.unr, %.epil.preheader214 ]
  %epil.iter216 = phi i64 [ %epil.iter216.next, %47 ], [ 0, %.epil.preheader214 ]
  %indvars.iv.next163.epil = add nuw nsw i64 %indvars.iv162.epil, 1
  %49 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168, i64 %indvars.iv.next163.epil, i64 0
  %50 = load i32, ptr %49, align 8, !tbaa !5
  %51 = add nsw i32 %50, %48
  store i32 %51, ptr %49, align 8, !tbaa !5
  %epil.iter216.next = add i64 %epil.iter216, 1
  %epil.iter216.cmp.not = icmp eq i64 %epil.iter216.next, %xtraiter215
  br i1 %epil.iter216.cmp.not, label %._crit_edge.us102.us, label %47, !llvm.loop !15

._crit_edge.us102.us:                             ; preds = %47
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond172.not = icmp eq i64 %indvars.iv.next169, %wide.trip.count171
  br i1 %exitcond172.not, label %.preheader86.us.us.preheader, label %.preheader87.us.us, !llvm.loop !16

.preheader88.lr.ph.us.1:                          ; preds = %._crit_edge.us107.us
  %wide.trip.count160.1 = zext nneg i32 %smax to i64
  %xtraiter232 = and i64 %wide.trip.count160, 3
  %52 = icmp slt i32 %15, 4
  %unroll_iter235 = and i64 %wide.trip.count160, 2147483644
  %lcmp.mod234.not = icmp eq i64 %xtraiter232, 0
  br label %.preheader88.us.us.1

.preheader88.us.us.1:                             ; preds = %._crit_edge.us.us.1, %.preheader88.lr.ph.us.1
  %indvars.iv157.1 = phi i64 [ %indvars.iv.next158.1, %._crit_edge.us.us.1 ], [ 0, %.preheader88.lr.ph.us.1 ]
  br i1 %52, label %._crit_edge.us.us.1.unr-lcssa, label %.preheader88.us.us.1.new

.preheader88.us.us.1.new:                         ; preds = %.preheader88.us.us.1, %.preheader88.us.us.1.new
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1.3, %.preheader88.us.us.1.new ], [ 0, %.preheader88.us.us.1 ]
  %niter236 = phi i64 [ %niter236.next.3, %.preheader88.us.us.1.new ], [ 0, %.preheader88.us.us.1 ]
  %53 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.1, i64 1
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.1, i64 1
  store i32 %54, ptr %55, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv.1, 1
  %56 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1, i64 1
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1, i64 1
  store i32 %57, ptr %58, align 4, !tbaa !5
  %indvars.iv.next.1.1 = or disjoint i64 %indvars.iv.1, 2
  %59 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1.1, i64 1
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1.1, i64 1
  store i32 %60, ptr %61, align 4, !tbaa !5
  %indvars.iv.next.1.2 = or disjoint i64 %indvars.iv.1, 3
  %62 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1.2, i64 1
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.next.1.2, i64 1
  store i32 %63, ptr %64, align 4, !tbaa !5
  %indvars.iv.next.1.3 = add nuw nsw i64 %indvars.iv.1, 4
  %niter236.next.3 = add i64 %niter236, 4
  %niter236.ncmp.3 = icmp eq i64 %niter236.next.3, %unroll_iter235
  br i1 %niter236.ncmp.3, label %._crit_edge.us.us.1.unr-lcssa, label %.preheader88.us.us.1.new, !llvm.loop !9

._crit_edge.us.us.1.unr-lcssa:                    ; preds = %.preheader88.us.us.1.new, %.preheader88.us.us.1
  %indvars.iv.1.unr = phi i64 [ 0, %.preheader88.us.us.1 ], [ %indvars.iv.next.1.3, %.preheader88.us.us.1.new ]
  br i1 %lcmp.mod234.not, label %._crit_edge.us.us.1, label %.epil.preheader231

.epil.preheader231:                               ; preds = %._crit_edge.us.us.1.unr-lcssa, %.epil.preheader231
  %indvars.iv.1.epil = phi i64 [ %indvars.iv.next.1.epil, %.epil.preheader231 ], [ %indvars.iv.1.unr, %._crit_edge.us.us.1.unr-lcssa ]
  %epil.iter233 = phi i64 [ %epil.iter233.next, %.epil.preheader231 ], [ 0, %._crit_edge.us.us.1.unr-lcssa ]
  %65 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.1.epil, i64 1
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv157.1, i64 %indvars.iv.1.epil, i64 1
  store i32 %66, ptr %67, align 4, !tbaa !5
  %indvars.iv.next.1.epil = add nuw nsw i64 %indvars.iv.1.epil, 1
  %epil.iter233.next = add i64 %epil.iter233, 1
  %epil.iter233.cmp.not = icmp eq i64 %epil.iter233.next, %xtraiter232
  br i1 %epil.iter233.cmp.not, label %._crit_edge.us.us.1, label %.epil.preheader231, !llvm.loop !17

._crit_edge.us.us.1:                              ; preds = %.epil.preheader231, %._crit_edge.us.us.1.unr-lcssa
  %indvars.iv.next158.1 = add nuw nsw i64 %indvars.iv157.1, 1
  %exitcond161.1.not = icmp eq i64 %indvars.iv.next158.1, %wide.trip.count160.1
  br i1 %exitcond161.1.not, label %.preheader87.us.us.preheader.1, label %.preheader88.us.us.1, !llvm.loop !13

.preheader87.us.us.preheader.1:                   ; preds = %._crit_edge.us.us.1
  %wide.trip.count171.1 = zext nneg i32 %smax to i64
  %xtraiter238 = and i64 %wide.trip.count166, 3
  %68 = icmp slt i32 %16, 4
  %unroll_iter242 = and i64 %wide.trip.count166, 2147483644
  br label %.preheader87.us.us.1

.preheader87.us.us.1:                             ; preds = %._crit_edge.us102.us.1, %.preheader87.us.us.preheader.1
  %indvars.iv168.1 = phi i64 [ 0, %.preheader87.us.us.preheader.1 ], [ %indvars.iv.next169.1, %._crit_edge.us102.us.1 ]
  %.phi.trans.insert195 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 0, i64 1
  %.pre196 = load i32, ptr %.phi.trans.insert195, align 4, !tbaa !5
  br i1 %68, label %.epil.preheader237, label %.preheader87.us.us.1.new

.preheader87.us.us.1.new:                         ; preds = %.preheader87.us.us.1, %.preheader87.us.us.1.new
  %69 = phi i32 [ %81, %.preheader87.us.us.1.new ], [ %.pre196, %.preheader87.us.us.1 ]
  %indvars.iv162.1 = phi i64 [ %indvars.iv.next163.1.3, %.preheader87.us.us.1.new ], [ 0, %.preheader87.us.us.1 ]
  %niter243 = phi i64 [ %niter243.next.3, %.preheader87.us.us.1.new ], [ 0, %.preheader87.us.us.1 ]
  %indvars.iv.next163.1 = or disjoint i64 %indvars.iv162.1, 1
  %70 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 %indvars.iv.next163.1, i64 1
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, %69
  store i32 %72, ptr %70, align 4, !tbaa !5
  %indvars.iv.next163.1.1 = or disjoint i64 %indvars.iv162.1, 2
  %73 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 %indvars.iv.next163.1.1, i64 1
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nsw i32 %74, %72
  store i32 %75, ptr %73, align 4, !tbaa !5
  %indvars.iv.next163.1.2 = or disjoint i64 %indvars.iv162.1, 3
  %76 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 %indvars.iv.next163.1.2, i64 1
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, %75
  store i32 %78, ptr %76, align 4, !tbaa !5
  %indvars.iv.next163.1.3 = add nuw nsw i64 %indvars.iv162.1, 4
  %79 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 %indvars.iv.next163.1.3, i64 1
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, %78
  store i32 %81, ptr %79, align 4, !tbaa !5
  %niter243.next.3 = add i64 %niter243, 4
  %niter243.ncmp.3 = icmp eq i64 %niter243.next.3, %unroll_iter242
  br i1 %niter243.ncmp.3, label %.epil.preheader237, label %.preheader87.us.us.1.new, !llvm.loop !14

.epil.preheader237:                               ; preds = %.preheader87.us.us.1, %.preheader87.us.us.1.new
  %.unr240 = phi i32 [ %.pre196, %.preheader87.us.us.1 ], [ %81, %.preheader87.us.us.1.new ]
  %indvars.iv162.1.unr = phi i64 [ 0, %.preheader87.us.us.1 ], [ %indvars.iv.next163.1.3, %.preheader87.us.us.1.new ]
  br label %82

82:                                               ; preds = %82, %.epil.preheader237
  %83 = phi i32 [ %86, %82 ], [ %.unr240, %.epil.preheader237 ]
  %indvars.iv162.1.epil = phi i64 [ %indvars.iv.next163.1.epil, %82 ], [ %indvars.iv162.1.unr, %.epil.preheader237 ]
  %epil.iter239 = phi i64 [ %epil.iter239.next, %82 ], [ 0, %.epil.preheader237 ]
  %indvars.iv.next163.1.epil = add nuw nsw i64 %indvars.iv162.1.epil, 1
  %84 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv168.1, i64 %indvars.iv.next163.1.epil, i64 1
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, %83
  store i32 %86, ptr %84, align 4, !tbaa !5
  %epil.iter239.next = add i64 %epil.iter239, 1
  %epil.iter239.cmp.not = icmp eq i64 %epil.iter239.next, %xtraiter238
  br i1 %epil.iter239.cmp.not, label %._crit_edge.us102.us.1, label %82, !llvm.loop !18

._crit_edge.us102.us.1:                           ; preds = %82
  %indvars.iv.next169.1 = add nuw nsw i64 %indvars.iv168.1, 1
  %exitcond172.1.not = icmp eq i64 %indvars.iv.next169.1, %wide.trip.count171.1
  br i1 %exitcond172.1.not, label %.preheader86.us.us.preheader.1, label %.preheader87.us.us.1, !llvm.loop !16

.preheader86.us.us.preheader.1:                   ; preds = %._crit_edge.us102.us.1
  %wide.trip.count181.1 = zext nneg i32 %smax to i64
  %xtraiter245 = and i64 %wide.trip.count166, 3
  %87 = icmp slt i32 %16, 4
  %unroll_iter249 = and i64 %wide.trip.count166, 2147483644
  br label %.preheader86.us.us.1

.preheader86.us.us.1:                             ; preds = %._crit_edge.us107.us.1, %.preheader86.us.us.preheader.1
  %indvars.iv178.1 = phi i64 [ 0, %.preheader86.us.us.preheader.1 ], [ %indvars.iv.next179.1, %._crit_edge.us107.us.1 ]
  %.phi.trans.insert197 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 0, i64 %indvars.iv178.1, i64 1
  %.pre198 = load i32, ptr %.phi.trans.insert197, align 4, !tbaa !5
  br i1 %87, label %.epil.preheader244, label %.preheader86.us.us.1.new

.preheader86.us.us.1.new:                         ; preds = %.preheader86.us.us.1, %.preheader86.us.us.1.new
  %88 = phi i32 [ %100, %.preheader86.us.us.1.new ], [ %.pre198, %.preheader86.us.us.1 ]
  %indvars.iv173.1 = phi i64 [ %indvars.iv.next174.1.3, %.preheader86.us.us.1.new ], [ 0, %.preheader86.us.us.1 ]
  %niter250 = phi i64 [ %niter250.next.3, %.preheader86.us.us.1.new ], [ 0, %.preheader86.us.us.1 ]
  %indvars.iv.next174.1 = or disjoint i64 %indvars.iv173.1, 1
  %89 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1, i64 %indvars.iv178.1, i64 1
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, %88
  store i32 %91, ptr %89, align 4, !tbaa !5
  %indvars.iv.next174.1.1 = or disjoint i64 %indvars.iv173.1, 2
  %92 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1.1, i64 %indvars.iv178.1, i64 1
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = add nsw i32 %93, %91
  store i32 %94, ptr %92, align 4, !tbaa !5
  %indvars.iv.next174.1.2 = or disjoint i64 %indvars.iv173.1, 3
  %95 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1.2, i64 %indvars.iv178.1, i64 1
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = add nsw i32 %96, %94
  store i32 %97, ptr %95, align 4, !tbaa !5
  %indvars.iv.next174.1.3 = add nuw nsw i64 %indvars.iv173.1, 4
  %98 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1.3, i64 %indvars.iv178.1, i64 1
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %97
  store i32 %100, ptr %98, align 4, !tbaa !5
  %niter250.next.3 = add i64 %niter250, 4
  %niter250.ncmp.3 = icmp eq i64 %niter250.next.3, %unroll_iter249
  br i1 %niter250.ncmp.3, label %.epil.preheader244, label %.preheader86.us.us.1.new, !llvm.loop !19

.epil.preheader244:                               ; preds = %.preheader86.us.us.1, %.preheader86.us.us.1.new
  %.unr247 = phi i32 [ %.pre198, %.preheader86.us.us.1 ], [ %100, %.preheader86.us.us.1.new ]
  %indvars.iv173.1.unr = phi i64 [ 0, %.preheader86.us.us.1 ], [ %indvars.iv.next174.1.3, %.preheader86.us.us.1.new ]
  br label %101

101:                                              ; preds = %101, %.epil.preheader244
  %102 = phi i32 [ %105, %101 ], [ %.unr247, %.epil.preheader244 ]
  %indvars.iv173.1.epil = phi i64 [ %indvars.iv.next174.1.epil, %101 ], [ %indvars.iv173.1.unr, %.epil.preheader244 ]
  %epil.iter246 = phi i64 [ %epil.iter246.next, %101 ], [ 0, %.epil.preheader244 ]
  %indvars.iv.next174.1.epil = add nuw nsw i64 %indvars.iv173.1.epil, 1
  %103 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1.epil, i64 %indvars.iv178.1, i64 1
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = add nsw i32 %104, %102
  store i32 %105, ptr %103, align 4, !tbaa !5
  %epil.iter246.next = add i64 %epil.iter246, 1
  %epil.iter246.cmp.not = icmp eq i64 %epil.iter246.next, %xtraiter245
  br i1 %epil.iter246.cmp.not, label %._crit_edge.us107.us.1, label %101, !llvm.loop !20

._crit_edge.us107.us.1:                           ; preds = %101
  %indvars.iv.next179.1 = add nuw nsw i64 %indvars.iv178.1, 1
  %exitcond182.1.not = icmp eq i64 %indvars.iv.next179.1, %wide.trip.count181.1
  br i1 %exitcond182.1.not, label %.split.us, label %.preheader86.us.us.1, !llvm.loop !21

.preheader86.us.us:                               ; preds = %.preheader86.us.us.preheader, %._crit_edge.us107.us
  %indvars.iv178 = phi i64 [ 0, %.preheader86.us.us.preheader ], [ %indvars.iv.next179, %._crit_edge.us107.us ]
  %.phi.trans.insert193 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 0, i64 %indvars.iv178, i64 0
  %.pre194 = load i32, ptr %.phi.trans.insert193, align 8, !tbaa !5
  br i1 %14, label %.epil.preheader222, label %.preheader86.us.us.new

.preheader86.us.us.new:                           ; preds = %.preheader86.us.us, %.preheader86.us.us.new
  %106 = phi i32 [ %118, %.preheader86.us.us.new ], [ %.pre194, %.preheader86.us.us ]
  %indvars.iv173 = phi i64 [ %indvars.iv.next174.3, %.preheader86.us.us.new ], [ 0, %.preheader86.us.us ]
  %niter228 = phi i64 [ %niter228.next.3, %.preheader86.us.us.new ], [ 0, %.preheader86.us.us ]
  %indvars.iv.next174 = or disjoint i64 %indvars.iv173, 1
  %107 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174, i64 %indvars.iv178, i64 0
  %108 = load i32, ptr %107, align 8, !tbaa !5
  %109 = add nsw i32 %108, %106
  store i32 %109, ptr %107, align 8, !tbaa !5
  %indvars.iv.next174.1230 = or disjoint i64 %indvars.iv173, 2
  %110 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.1230, i64 %indvars.iv178, i64 0
  %111 = load i32, ptr %110, align 8, !tbaa !5
  %112 = add nsw i32 %111, %109
  store i32 %112, ptr %110, align 8, !tbaa !5
  %indvars.iv.next174.2 = or disjoint i64 %indvars.iv173, 3
  %113 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.2, i64 %indvars.iv178, i64 0
  %114 = load i32, ptr %113, align 8, !tbaa !5
  %115 = add nsw i32 %114, %112
  store i32 %115, ptr %113, align 8, !tbaa !5
  %indvars.iv.next174.3 = add nuw nsw i64 %indvars.iv173, 4
  %116 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.3, i64 %indvars.iv178, i64 0
  %117 = load i32, ptr %116, align 8, !tbaa !5
  %118 = add nsw i32 %117, %115
  store i32 %118, ptr %116, align 8, !tbaa !5
  %niter228.next.3 = add i64 %niter228, 4
  %niter228.ncmp.3 = icmp eq i64 %niter228.next.3, %unroll_iter227
  br i1 %niter228.ncmp.3, label %.epil.preheader222, label %.preheader86.us.us.new, !llvm.loop !19

.epil.preheader222:                               ; preds = %.preheader86.us.us, %.preheader86.us.us.new
  %.unr225 = phi i32 [ %.pre194, %.preheader86.us.us ], [ %118, %.preheader86.us.us.new ]
  %indvars.iv173.unr = phi i64 [ 0, %.preheader86.us.us ], [ %indvars.iv.next174.3, %.preheader86.us.us.new ]
  br label %119

119:                                              ; preds = %119, %.epil.preheader222
  %120 = phi i32 [ %123, %119 ], [ %.unr225, %.epil.preheader222 ]
  %indvars.iv173.epil = phi i64 [ %indvars.iv.next174.epil, %119 ], [ %indvars.iv173.unr, %.epil.preheader222 ]
  %epil.iter224 = phi i64 [ %epil.iter224.next, %119 ], [ 0, %.epil.preheader222 ]
  %indvars.iv.next174.epil = add nuw nsw i64 %indvars.iv173.epil, 1
  %121 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv.next174.epil, i64 %indvars.iv178, i64 0
  %122 = load i32, ptr %121, align 8, !tbaa !5
  %123 = add nsw i32 %122, %120
  store i32 %123, ptr %121, align 8, !tbaa !5
  %epil.iter224.next = add i64 %epil.iter224, 1
  %epil.iter224.cmp.not = icmp eq i64 %epil.iter224.next, %xtraiter223
  br i1 %epil.iter224.cmp.not, label %._crit_edge.us107.us, label %119, !llvm.loop !22

._crit_edge.us107.us:                             ; preds = %119
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond182.not = icmp eq i64 %indvars.iv.next179, %wide.trip.count181
  br i1 %exitcond182.not, label %.preheader88.lr.ph.us.1, label %.preheader86.us.us, !llvm.loop !21

.lr.ph:                                           ; preds = %0, %173
  %.094 = phi i32 [ %.1, %173 ], [ 0, %0 ]
  %.06693 = phi i32 [ %174, %173 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %125, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %127 = load i8, ptr %4, align 1, !tbaa !23
  %128 = icmp eq i8 %127, 87
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = load i32, ptr @K, align 4, !tbaa !5
  %131 = sdiv i32 %129, %130
  %132 = load i32, ptr %3, align 4, !tbaa !5
  %133 = sdiv i32 %132, %130
  %134 = add nsw i32 %133, %131
  %135 = srem i32 %134, 2
  %136 = srem i32 %129, %130
  %137 = srem i32 %132, %130
  br i1 %128, label %138, label %156

138:                                              ; preds = %.lr.ph
  %139 = add nsw i32 %.094, 1
  %140 = mul nsw i32 %135, %130
  %141 = add nsw i32 %140, %136
  %142 = sext i32 %141 to i64
  %143 = sext i32 %137 to i64
  %144 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %142, i64 %143
  %145 = load i32, ptr %144, align 8, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %144, align 8, !tbaa !5
  %147 = sub nsw i32 1, %135
  %148 = mul nsw i32 %147, %130
  %149 = add nsw i32 %148, %136
  %150 = sext i32 %149 to i64
  %151 = add nsw i32 %137, %130
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %150, i64 %152
  %154 = load i32, ptr %153, align 8, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %153, align 8, !tbaa !5
  br label %173

156:                                              ; preds = %.lr.ph
  %157 = mul nsw i32 %135, %130
  %158 = add nsw i32 %157, %136
  %159 = sext i32 %158 to i64
  %160 = sext i32 %137 to i64
  %161 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %159, i64 %160, i64 1
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 4, !tbaa !5
  %164 = sub nsw i32 1, %135
  %165 = mul nsw i32 %164, %130
  %166 = add nsw i32 %165, %136
  %167 = sext i32 %166 to i64
  %168 = add nsw i32 %137, %130
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @cnt, i64 0, i64 %167, i64 %169, i64 1
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %170, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %156, %138
  %.1 = phi i32 [ %139, %138 ], [ %.094, %156 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %174 = add nuw nsw i32 %.06693, 1
  %175 = load i32, ptr @N, align 4, !tbaa !5
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %.lr.ph, label %.preheader92, !llvm.loop !24

.split.us:                                        ; preds = %._crit_edge.us107.us.1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br i1 %13, label %.preheader, label %._crit_edge151

.preheader:                                       ; preds = %.split.us, %._crit_edge
  %177 = phi i32 [ %184, %._crit_edge ], [ 0, %.split.us ]
  %178 = phi i32 [ %185, %._crit_edge ], [ %12, %.split.us ]
  %indvars.iv189 = phi i64 [ %indvars.iv.next190, %._crit_edge ], [ 0, %.split.us ]
  %179 = icmp sgt i32 %178, 0
  br i1 %179, label %.lr.ph149, label %.preheader.._crit_edge_crit_edge

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre199 = sext i32 %178 to i64
  br label %._crit_edge

.lr.ph149:                                        ; preds = %.preheader
  %180 = trunc nuw nsw i64 %indvars.iv189 to i32
  br label %187

._crit_edge151:                                   ; preds = %._crit_edge, %.split.us.thread, %.split.us
  %181 = phi i32 [ 0, %.split.us ], [ 0, %.split.us.thread ], [ %184, %._crit_edge ]
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %181)
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  ret i32 0

._crit_edge:                                      ; preds = %187, %.preheader.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre199, %.preheader.._crit_edge_crit_edge ], [ %224, %187 ]
  %184 = phi i32 [ %177, %.preheader.._crit_edge_crit_edge ], [ %222, %187 ]
  %185 = phi i32 [ %178, %.preheader.._crit_edge_crit_edge ], [ %223, %187 ]
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %186 = icmp slt i64 %indvars.iv.next190, %.pre-phi
  br i1 %186, label %.preheader, label %._crit_edge151, !llvm.loop !25

187:                                              ; preds = %.lr.ph149, %187
  %indvars.iv186 = phi i64 [ 0, %.lr.ph149 ], [ %indvars.iv.next187, %187 ]
  %188 = phi i32 [ %178, %.lr.ph149 ], [ %223, %187 ]
  %189 = add nsw i32 %188, %180
  %190 = trunc nuw nsw i64 %indvars.iv186 to i32
  %191 = add nsw i32 %188, %190
  %192 = sext i32 %189 to i64
  %193 = sext i32 %191 to i64
  %194 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %192, i64 %193
  %195 = load i32, ptr %194, align 8, !tbaa !5
  %196 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv189, i64 %193
  %197 = load i32, ptr %196, align 8, !tbaa !5
  %198 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %192, i64 %indvars.iv186
  %199 = load i32, ptr %198, align 8, !tbaa !5
  %200 = getelementptr inbounds [2000 x [2000 x [2 x i32]]], ptr @sum, i64 0, i64 %indvars.iv189, i64 %indvars.iv186
  %201 = load i32, ptr %200, align 8, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %194, i64 4
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = getelementptr inbounds i8, ptr %196, i64 4
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = getelementptr inbounds i8, ptr %198, i64 4
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = getelementptr inbounds i8, ptr %200, i64 4
  %209 = load i32, ptr %208, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %.neg81 = sub i32 %.0.lcssa, %195
  %210 = add i32 %.neg81, %197
  %211 = add i32 %210, %199
  %212 = add i32 %211, %203
  %213 = add i32 %201, %205
  %214 = add i32 %213, %207
  %215 = sub i32 %212, %214
  %216 = add i32 %215, %209
  store i32 %216, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %217 = load i32, ptr @N, align 4, !tbaa !5
  %218 = sub nsw i32 %217, %216
  store i32 %218, ptr %7, align 4, !tbaa !5
  %219 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %220 = load i32, ptr %219, align 4, !tbaa !5
  store i32 %220, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  %221 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %222 = load i32, ptr %221, align 4, !tbaa !5
  store i32 %222, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %223 = load i32, ptr @K, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = icmp slt i64 %indvars.iv.next187, %224
  br i1 %225, label %187, label %._crit_edge, !llvm.loop !27
}

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

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

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

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

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

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

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

; 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 #5 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)) #1

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

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


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