; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/274 Division 2/Problem E (E)

; 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
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@dp = external dso_local global [5010 x [2 x i64]], align 16
@MOD = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = 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)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %28 = load i32, ptr @a, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %29
  %31 = getelementptr inbounds [2 x i64], ptr %30, i64 0, i64 0
  store i64 1, ptr %31, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %32

32:                                               ; preds = %231, %0
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %34 = load i32, ptr @k, align 4, !tbaa !8
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %234

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = and i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %40

40:                                               ; preds = %52, %37
  %41 = load i32, ptr %5, align 4, !tbaa !8
  %42 = load i32, ptr @n, align 4, !tbaa !8
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %55

45:                                               ; preds = %40
  %46 = load i32, ptr %5, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %47
  %49 = load i32, ptr %4, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2 x i64], ptr %48, i64 0, i64 %50
  store i64 0, ptr %51, align 8, !tbaa !11
  br label %52

52:                                               ; preds = %45
  %53 = load i32, ptr %5, align 4, !tbaa !8
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %5, align 4, !tbaa !8
  br label %40, !llvm.loop !13

55:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %56

56:                                               ; preds = %83, %55
  %57 = load i32, ptr %6, align 4, !tbaa !8
  %58 = load i32, ptr @b, align 4, !tbaa !8
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %86

61:                                               ; preds = %56
  %62 = load i64, ptr @MOD, align 8, !tbaa !11
  %63 = load i32, ptr %6, align 4, !tbaa !8
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %65
  %67 = load i32, ptr %4, align 4, !tbaa !8
  %68 = sub nsw i32 1, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2 x i64], ptr %66, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = load i32, ptr %6, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %73
  %75 = load i32, ptr %4, align 4, !tbaa !8
  %76 = sub nsw i32 1, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2 x i64], ptr %74, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = add nsw i64 %79, %71
  store i64 %80, ptr %78, align 8, !tbaa !11
  %81 = load i64, ptr %78, align 8, !tbaa !11
  %82 = srem i64 %81, %62
  store i64 %82, ptr %78, align 8, !tbaa !11
  br label %83

83:                                               ; preds = %61
  %84 = load i32, ptr %6, align 4, !tbaa !8
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %6, align 4, !tbaa !8
  br label %56, !llvm.loop !15

86:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %87 = load i32, ptr @n, align 4, !tbaa !8
  store i32 %87, ptr %7, align 4, !tbaa !8
  br label %88

88:                                               ; preds = %115, %86
  %89 = load i32, ptr %7, align 4, !tbaa !8
  %90 = load i32, ptr @b, align 4, !tbaa !8
  %91 = icmp sgt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %118

93:                                               ; preds = %88
  %94 = load i64, ptr @MOD, align 8, !tbaa !11
  %95 = load i32, ptr %7, align 4, !tbaa !8
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %97
  %99 = load i32, ptr %4, align 4, !tbaa !8
  %100 = sub nsw i32 1, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2 x i64], ptr %98, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = load i32, ptr %7, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %105
  %107 = load i32, ptr %4, align 4, !tbaa !8
  %108 = sub nsw i32 1, %107
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [2 x i64], ptr %106, i64 0, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !11
  %112 = add nsw i64 %111, %103
  store i64 %112, ptr %110, align 8, !tbaa !11
  %113 = load i64, ptr %110, align 8, !tbaa !11
  %114 = srem i64 %113, %94
  store i64 %114, ptr %110, align 8, !tbaa !11
  br label %115

115:                                              ; preds = %93
  %116 = load i32, ptr %7, align 4, !tbaa !8
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %7, align 4, !tbaa !8
  br label %88, !llvm.loop !16

118:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %119

119:                                              ; preds = %227, %118
  %120 = load i32, ptr %8, align 4, !tbaa !8
  %121 = load i32, ptr @n, align 4, !tbaa !8
  %122 = icmp sle i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %230

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %125 = load i32, ptr %8, align 4, !tbaa !8
  %126 = load i32, ptr @b, align 4, !tbaa !8
  %127 = sub nsw i32 %125, %126
  %128 = call i32 @llvm.abs.i32(i32 %127, i1 true)
  %129 = sdiv i32 %128, 2
  %130 = add nsw i32 1, %129
  store i32 %130, ptr %9, align 4, !tbaa !8
  %131 = load i32, ptr %8, align 4, !tbaa !8
  %132 = load i32, ptr @b, align 4, !tbaa !8
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %134, label %174

134:                                              ; preds = %124
  %135 = load i32, ptr @b, align 4, !tbaa !8
  %136 = load i32, ptr %9, align 4, !tbaa !8
  %137 = sub nsw i32 %135, %136
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %138
  %140 = load i32, ptr %4, align 4, !tbaa !8
  %141 = sub nsw i32 1, %140
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [2 x i64], ptr %139, i64 0, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !11
  %145 = load i32, ptr %8, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %146
  %148 = load i32, ptr %4, align 4, !tbaa !8
  %149 = sub nsw i32 1, %148
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [2 x i64], ptr %147, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !11
  %153 = sub nsw i64 %144, %152
  %154 = load i32, ptr %8, align 4, !tbaa !8
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %156
  %158 = load i32, ptr %4, align 4, !tbaa !8
  %159 = sub nsw i32 1, %158
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [2 x i64], ptr %157, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !11
  %163 = add nsw i64 %153, %162
  %164 = load i64, ptr @MOD, align 8, !tbaa !11
  %165 = add nsw i64 %163, %164
  %166 = load i64, ptr @MOD, align 8, !tbaa !11
  %167 = srem i64 %165, %166
  %168 = load i32, ptr %8, align 4, !tbaa !8
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %169
  %171 = load i32, ptr %4, align 4, !tbaa !8
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [2 x i64], ptr %170, i64 0, i64 %172
  store i64 %167, ptr %173, align 8, !tbaa !11
  br label %226

174:                                              ; preds = %124
  %175 = load i32, ptr %8, align 4, !tbaa !8
  %176 = load i32, ptr @b, align 4, !tbaa !8
  %177 = icmp sgt i32 %175, %176
  br i1 %177, label %178, label %218

178:                                              ; preds = %174
  %179 = load i32, ptr @b, align 4, !tbaa !8
  %180 = load i32, ptr %9, align 4, !tbaa !8
  %181 = add nsw i32 %179, %180
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %182
  %184 = load i32, ptr %4, align 4, !tbaa !8
  %185 = sub nsw i32 1, %184
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [2 x i64], ptr %183, i64 0, i64 %186
  %188 = load i64, ptr %187, align 8, !tbaa !11
  %189 = load i32, ptr %8, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %190
  %192 = load i32, ptr %4, align 4, !tbaa !8
  %193 = sub nsw i32 1, %192
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [2 x i64], ptr %191, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !11
  %197 = sub nsw i64 %188, %196
  %198 = load i32, ptr %8, align 4, !tbaa !8
  %199 = add nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %200
  %202 = load i32, ptr %4, align 4, !tbaa !8
  %203 = sub nsw i32 1, %202
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [2 x i64], ptr %201, i64 0, i64 %204
  %206 = load i64, ptr %205, align 8, !tbaa !11
  %207 = add nsw i64 %197, %206
  %208 = load i64, ptr @MOD, align 8, !tbaa !11
  %209 = add nsw i64 %207, %208
  %210 = load i64, ptr @MOD, align 8, !tbaa !11
  %211 = srem i64 %209, %210
  %212 = load i32, ptr %8, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %213
  %215 = load i32, ptr %4, align 4, !tbaa !8
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [2 x i64], ptr %214, i64 0, i64 %216
  store i64 %211, ptr %217, align 8, !tbaa !11
  br label %225

218:                                              ; preds = %174
  %219 = load i32, ptr %8, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %220
  %222 = load i32, ptr %4, align 4, !tbaa !8
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [2 x i64], ptr %221, i64 0, i64 %223
  store i64 0, ptr %224, align 8, !tbaa !11
  br label %225

225:                                              ; preds = %218, %178
  br label %226

226:                                              ; preds = %225, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %8, align 4, !tbaa !8
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %8, align 4, !tbaa !8
  br label %119, !llvm.loop !17

230:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %2, align 4, !tbaa !8
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %2, align 4, !tbaa !8
  br label %32, !llvm.loop !18

234:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %235 = load i32, ptr @k, align 4, !tbaa !8
  %236 = and i32 %235, 1
  store i32 %236, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %237

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

241:                                              ; preds = %237
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %263

242:                                              ; preds = %237
  %243 = load i32, ptr %12, align 4, !tbaa !8
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %244
  %246 = load i32, ptr %11, align 4, !tbaa !8
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [2 x i64], ptr %245, i64 0, i64 %247
  %249 = load i64, ptr %248, align 8, !tbaa !11
  %250 = load i64, ptr %10, align 8, !tbaa !11
  %251 = add nsw i64 %250, %249
  store i64 %251, ptr %10, align 8, !tbaa !11
  %252 = load i64, ptr %10, align 8, !tbaa !11
  %253 = load i64, ptr @MOD, align 8, !tbaa !11
  %254 = icmp sge i64 %252, %253
  br i1 %254, label %255, label %259

255:                                              ; preds = %242
  %256 = load i64, ptr @MOD, align 8, !tbaa !11
  %257 = load i64, ptr %10, align 8, !tbaa !11
  %258 = sub nsw i64 %257, %256
  store i64 %258, ptr %10, align 8, !tbaa !11
  br label %259

259:                                              ; preds = %255, %242
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %12, align 4, !tbaa !8
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %12, align 4, !tbaa !8
  br label %237, !llvm.loop !19

263:                                              ; preds = %241
  %264 = load i64, ptr %10, align 8, !tbaa !11
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %264)
  %266 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %265, i8 noundef signext 10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %267 = load i32, ptr %1, align 4
  ret i32 %267
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), 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) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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

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


; 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
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@dp = external dso_local local_unnamed_addr global [5010 x [2 x i64]], align 16
@MOD = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", 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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail 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)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %16 = load i32, ptr @a, align 4, !tbaa !8
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %17
  store i64 1, ptr %18, align 16, !tbaa !11
  %19 = load i32, ptr @k, align 4, !tbaa !8
  %.not82 = icmp slt i32 %19, 1
  %.pre114 = load i32, ptr @n, align 4, !tbaa !8
  br i1 %.not82, label %._crit_edge86, label %.lr.ph85

.lr.ph85:                                         ; preds = %0
  %.not6572 = icmp slt i32 %.pre114, 1
  %20 = load i32, ptr @b, align 4, !tbaa !8
  %21 = icmp sgt i32 %20, 1
  %22 = load i64, ptr @MOD, align 8
  %23 = icmp sgt i32 %.pre114, %20
  %24 = add i32 %.pre114, 1
  %25 = sext i32 %.pre114 to i64
  %26 = sext i32 %20 to i64
  %wide.trip.count98 = zext i32 %20 to i64
  %wide.trip.count106 = zext i32 %24 to i64
  %27 = add nsw i64 %wide.trip.count106, -1
  %28 = add nsw i64 %wide.trip.count106, -2
  %29 = add nsw i64 %wide.trip.count98, -1
  %30 = sub nsw i64 %25, %26
  %xtraiter = and i64 %27, 3
  %31 = icmp ult i64 %28, 3
  %unroll_iter = and i64 %27, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter130 = and i64 %29, 1
  %32 = icmp eq i32 %20, 2
  %unroll_iter133 = and i64 %29, -2
  %lcmp.mod132.not = icmp eq i64 %xtraiter130, 0
  %xtraiter135 = and i64 %30, 1
  %lcmp.mod136.not = icmp eq i64 %xtraiter135, 0
  %33 = add nsw i64 %25, 1
  %indvars.iv.next101.prol = add nsw i64 %25, -1
  %34 = add nsw i64 %25, -1
  %35 = icmp eq i64 %34, %26
  br label %41

._crit_edge86:                                    ; preds = %._crit_edge, %0
  %.not6387 = icmp slt i32 %.pre114, 1
  br i1 %.not6387, label %._crit_edge92, label %.lr.ph91

.lr.ph91:                                         ; preds = %._crit_edge86
  %36 = and i32 %19, 1
  %37 = zext nneg i32 %36 to i64
  %38 = load i64, ptr @MOD, align 8, !tbaa !11
  %39 = zext nneg i32 %.pre114 to i64
  %xtraiter138 = and i64 %39, 1
  %40 = icmp eq i32 %.pre114, 1
  br i1 %40, label %._crit_edge92.loopexit.unr-lcssa, label %.lr.ph91.new

.lr.ph91.new:                                     ; preds = %.lr.ph91
  %unroll_iter142 = and i64 %39, 2147483646
  br label %121

41:                                               ; preds = %.lr.ph85, %._crit_edge
  %.05283 = phi i32 [ 1, %.lr.ph85 ], [ %87, %._crit_edge ]
  %42 = and i32 %.05283, 1
  br i1 %.not6572, label %.preheader69, label %.lr.ph

.lr.ph:                                           ; preds = %41
  %43 = zext nneg i32 %42 to i64
  br i1 %31, label %.preheader69.loopexit.unr-lcssa, label %.lr.ph.new

.preheader69.loopexit.unr-lcssa:                  ; preds = %.lr.ph.new, %.lr.ph
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.3, %.lr.ph.new ]
  br i1 %lcmp.mod.not, label %.preheader69, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader69.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.preheader69.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader69.loopexit.unr-lcssa ]
  %44 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.epil, i64 %43
  store i64 0, ptr %44, align 8, !tbaa !11
  %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 %.preheader69, label %.epil.preheader, !llvm.loop !13

.preheader69:                                     ; preds = %.preheader69.loopexit.unr-lcssa, %.epil.preheader, %41
  br i1 %21, label %.lr.ph75, label %.preheader68

.lr.ph75:                                         ; preds = %.preheader69
  %45 = xor i32 %42, 1
  %46 = zext nneg i32 %45 to i64
  %.phi.trans.insert = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 0, i64 %46
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !11
  br i1 %32, label %.preheader68.loopexit.unr-lcssa, label %.lr.ph75.new

.lr.ph.new:                                       ; preds = %.lr.ph, %.lr.ph.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph.new ], [ 1, %.lr.ph ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph.new ], [ 0, %.lr.ph ]
  %47 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv, i64 %43
  store i64 0, ptr %47, align 8, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next, i64 %43
  store i64 0, ptr %48, align 8, !tbaa !11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %49 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next.1, i64 %43
  store i64 0, ptr %49, align 8, !tbaa !11
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %50 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next.2, i64 %43
  store i64 0, ptr %50, align 8, !tbaa !11
  %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 %.preheader69.loopexit.unr-lcssa, label %.lr.ph.new, !llvm.loop !15

.preheader68.loopexit.unr-lcssa:                  ; preds = %.lr.ph75.new, %.lr.ph75
  %.unr = phi i64 [ %.pre, %.lr.ph75 ], [ %71, %.lr.ph75.new ]
  %indvars.iv95.unr = phi i64 [ 1, %.lr.ph75 ], [ %indvars.iv.next96.1, %.lr.ph75.new ]
  br i1 %lcmp.mod132.not, label %.preheader68, label %.preheader68.loopexit.epilog-lcssa

.preheader68.loopexit.epilog-lcssa:               ; preds = %.preheader68.loopexit.unr-lcssa
  %51 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv95.unr, i64 %46
  %52 = load i64, ptr %51, align 8, !tbaa !11
  %53 = add nsw i64 %52, %.unr
  %54 = srem i64 %53, %22
  store i64 %54, ptr %51, align 8, !tbaa !11
  br label %.preheader68

.preheader68:                                     ; preds = %.preheader68.loopexit.epilog-lcssa, %.preheader68.loopexit.unr-lcssa, %.preheader69
  br i1 %23, label %.lr.ph78, label %.preheader

.lr.ph78:                                         ; preds = %.preheader68
  %55 = xor i32 %42, 1
  %56 = zext nneg i32 %55 to i64
  br i1 %lcmp.mod136.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph78
  %57 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %33, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %25, i64 %56
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = add nsw i64 %60, %58
  %62 = srem i64 %61, %22
  store i64 %62, ptr %59, align 8, !tbaa !11
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph78
  %indvars.iv100.unr = phi i64 [ %25, %.lr.ph78 ], [ %indvars.iv.next101.prol, %.prol.loopexit.unr-lcssa ]
  br i1 %35, label %.preheader, label %.lr.ph78.new

.lr.ph75.new:                                     ; preds = %.lr.ph75, %.lr.ph75.new
  %63 = phi i64 [ %71, %.lr.ph75.new ], [ %.pre, %.lr.ph75 ]
  %indvars.iv95 = phi i64 [ %indvars.iv.next96.1, %.lr.ph75.new ], [ 1, %.lr.ph75 ]
  %niter134 = phi i64 [ %niter134.next.1, %.lr.ph75.new ], [ 0, %.lr.ph75 ]
  %64 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv95, i64 %46
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = add nsw i64 %65, %63
  %67 = srem i64 %66, %22
  store i64 %67, ptr %64, align 8, !tbaa !11
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %68 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next96, i64 %46
  %69 = load i64, ptr %68, align 8, !tbaa !11
  %70 = add nsw i64 %69, %67
  %71 = srem i64 %70, %22
  store i64 %71, ptr %68, align 8, !tbaa !11
  %indvars.iv.next96.1 = add nuw nsw i64 %indvars.iv95, 2
  %niter134.next.1 = add i64 %niter134, 2
  %niter134.ncmp.1 = icmp eq i64 %niter134.next.1, %unroll_iter133
  br i1 %niter134.ncmp.1, label %.preheader68.loopexit.unr-lcssa, label %.lr.ph75.new, !llvm.loop !17

.preheader:                                       ; preds = %.prol.loopexit, %.lr.ph78.new, %.preheader68
  br i1 %.not6572, label %._crit_edge, label %.lr.ph81

.lr.ph81:                                         ; preds = %.preheader
  %72 = zext nneg i32 %42 to i64
  %73 = xor i32 %42, 1
  %74 = zext nneg i32 %73 to i64
  br label %88

.lr.ph78.new:                                     ; preds = %.prol.loopexit, %.lr.ph78.new
  %indvars.iv100 = phi i64 [ %indvars.iv.next101.1, %.lr.ph78.new ], [ %indvars.iv100.unr, %.prol.loopexit ]
  %75 = add nsw i64 %indvars.iv100, 1
  %76 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %75, i64 %56
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv100, i64 %56
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = add nsw i64 %79, %77
  %81 = srem i64 %80, %22
  store i64 %81, ptr %78, align 8, !tbaa !11
  %indvars.iv.next101 = add nsw i64 %indvars.iv100, -1
  %82 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next101, i64 %56
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = add nsw i64 %83, %81
  %85 = srem i64 %84, %22
  store i64 %85, ptr %82, align 8, !tbaa !11
  %indvars.iv.next101.1 = add nsw i64 %indvars.iv100, -2
  %86 = icmp sgt i64 %indvars.iv.next101.1, %26
  br i1 %86, label %.lr.ph78.new, label %.preheader, !llvm.loop !18

._crit_edge:                                      ; preds = %113, %.preheader
  %87 = add nuw i32 %.05283, 1
  %exitcond108.not = icmp eq i32 %.05283, %19
  br i1 %exitcond108.not, label %._crit_edge86, label %41, !llvm.loop !19

88:                                               ; preds = %.lr.ph81, %113
  %indvars.iv103 = phi i64 [ 1, %.lr.ph81 ], [ %indvars.iv.next104, %113 ]
  %89 = trunc i64 %indvars.iv103 to i32
  %90 = sub i32 %89, %20
  %91 = tail call i32 @llvm.abs.i32(i32 %90, i1 true)
  %92 = lshr i32 %91, 1
  %93 = add nuw nsw i32 %92, 1
  %94 = icmp slt i64 %indvars.iv103, %26
  br i1 %94, label %95, label %97

95:                                               ; preds = %88
  %96 = sub nsw i32 %20, %93
  br label %.sink.split

97:                                               ; preds = %88
  %98 = icmp sgt i64 %indvars.iv103, %26
  br i1 %98, label %99, label %113

99:                                               ; preds = %97
  %100 = add nsw i32 %93, %20
  br label %.sink.split

.sink.split:                                      ; preds = %95, %99
  %.sink128 = phi i32 [ %100, %99 ], [ %96, %95 ]
  %.sink122 = phi i64 [ 1, %99 ], [ -1, %95 ]
  %101 = sext i32 %.sink128 to i64
  %102 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %101, i64 %74
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv103, i64 %74
  %105 = load i64, ptr %104, align 8, !tbaa !11
  %106 = sub i64 %103, %105
  %107 = add nsw i64 %indvars.iv103, %.sink122
  %108 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %107, i64 %74
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = add nsw i64 %106, %109
  %111 = add nsw i64 %110, %22
  %112 = srem i64 %111, %22
  br label %113

113:                                              ; preds = %.sink.split, %97
  %.sink = phi i64 [ 0, %97 ], [ %112, %.sink.split ]
  %114 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv103, i64 %72
  store i64 %.sink, ptr %114, align 8, !tbaa !11
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count106
  br i1 %exitcond107.not, label %._crit_edge, label %88, !llvm.loop !20

._crit_edge92.loopexit.unr-lcssa:                 ; preds = %121, %.lr.ph91
  %spec.select.lcssa.ph = phi i64 [ poison, %.lr.ph91 ], [ %spec.select.1, %121 ]
  %indvars.iv109.unr = phi i64 [ 1, %.lr.ph91 ], [ %indvars.iv.next110.1, %121 ]
  %.05188.unr = phi i64 [ 0, %.lr.ph91 ], [ %spec.select.1, %121 ]
  %lcmp.mod140.not = icmp eq i64 %xtraiter138, 0
  br i1 %lcmp.mod140.not, label %._crit_edge92, label %._crit_edge92.loopexit.epilog-lcssa

._crit_edge92.loopexit.epilog-lcssa:              ; preds = %._crit_edge92.loopexit.unr-lcssa
  %115 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv109.unr, i64 %37
  %116 = load i64, ptr %115, align 8, !tbaa !11
  %117 = add nsw i64 %116, %.05188.unr
  %.not64.epil = icmp slt i64 %117, %38
  %118 = select i1 %.not64.epil, i64 0, i64 %38
  %spec.select.epil = sub nsw i64 %117, %118
  br label %._crit_edge92

._crit_edge92:                                    ; preds = %._crit_edge92.loopexit.epilog-lcssa, %._crit_edge92.loopexit.unr-lcssa, %._crit_edge86
  %.051.lcssa = phi i64 [ 0, %._crit_edge86 ], [ %spec.select.lcssa.ph, %._crit_edge92.loopexit.unr-lcssa ], [ %spec.select.epil, %._crit_edge92.loopexit.epilog-lcssa ]
  %119 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.051.lcssa)
  %120 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %119, i8 noundef signext 10)
  ret i32 0

121:                                              ; preds = %121, %.lr.ph91.new
  %indvars.iv109 = phi i64 [ 1, %.lr.ph91.new ], [ %indvars.iv.next110.1, %121 ]
  %.05188 = phi i64 [ 0, %.lr.ph91.new ], [ %spec.select.1, %121 ]
  %niter143 = phi i64 [ 0, %.lr.ph91.new ], [ %niter143.next.1, %121 ]
  %122 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv109, i64 %37
  %123 = load i64, ptr %122, align 8, !tbaa !11
  %124 = add nsw i64 %123, %.05188
  %.not64 = icmp slt i64 %124, %38
  %125 = select i1 %.not64, i64 0, i64 %38
  %spec.select = sub nsw i64 %124, %125
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %126 = getelementptr inbounds [5010 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next110, i64 %37
  %127 = load i64, ptr %126, align 8, !tbaa !11
  %128 = add nsw i64 %127, %spec.select
  %.not64.1 = icmp slt i64 %128, %38
  %129 = select i1 %.not64.1, i64 0, i64 %38
  %spec.select.1 = sub nsw i64 %128, %129
  %indvars.iv.next110.1 = add nuw nsw i64 %indvars.iv109, 2
  %niter143.next.1 = add i64 %niter143, 2
  %niter143.ncmp.1 = icmp eq i64 %niter143.next.1, %unroll_iter142
  br i1 %niter143.ncmp.1, label %._crit_edge92.loopexit.unr-lcssa, label %121, !llvm.loop !21
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 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 #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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

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

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


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