; LLVM IR from VastoLorde95/Competitive-Programming :: Timus/1696 (A)

; 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
@p = external dso_local global i32, align 4
@dp = external dso_local global [2 x [202 x [202 x i32]]], align 16
@s1 = external dso_local global [2 x [202 x [202 x i32]]], align 16
@s2 = external dso_local global [2 x [202 x [202 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 nounwind uwtable
declare dso_local void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 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
  store i32 0, ptr %1, align 4
  %16 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %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)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %30 = load i32, ptr @k, align 4, !tbaa !8
  %31 = add nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [202 x [202 x i32]], ptr @dp, i64 0, i64 %32
  %34 = load i32, ptr @k, align 4, !tbaa !8
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [202 x i32], ptr %33, i64 0, i64 %36
  store i32 1, ptr %37, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %38

38:                                               ; preds = %301, %0
  %39 = load i32, ptr %3, align 4, !tbaa !8
  %40 = load i32, ptr @n, align 4, !tbaa !8
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %304

43:                                               ; preds = %38
  %44 = load i32, ptr %2, align 4, !tbaa !8
  %45 = xor i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %46 = load i32, ptr @k, align 4, !tbaa !8
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %104, %43
  %49 = load i32, ptr %5, align 4, !tbaa !8
  %50 = icmp sge i32 %49, 1
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %107

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %53 = load i32, ptr @k, align 4, !tbaa !8
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %6, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %100, %52
  %56 = load i32, ptr %6, align 4, !tbaa !8
  %57 = icmp sge i32 %56, 1
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %103

59:                                               ; preds = %55
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = xor i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %62
  %64 = load i32, ptr %5, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [202 x [202 x i32]], ptr %63, i64 0, i64 %65
  %67 = load i32, ptr %6, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [202 x i32], ptr %66, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %71 = load i32, ptr %2, align 4, !tbaa !8
  %72 = xor i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %73
  %75 = load i32, ptr %5, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [202 x [202 x i32]], ptr %74, i64 0, i64 %76
  %78 = load i32, ptr %6, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [202 x i32], ptr %77, i64 0, i64 %79
  store i32 %70, ptr %80, align 4, !tbaa !8
  %81 = load i32, ptr %2, align 4, !tbaa !8
  %82 = xor i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %83
  %85 = load i32, ptr %5, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [202 x [202 x i32]], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %6, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [202 x i32], ptr %87, i64 0, i64 %89
  store i32 %70, ptr %90, align 4, !tbaa !8
  %91 = load i32, ptr %2, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %92
  %94 = load i32, ptr %5, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [202 x [202 x i32]], ptr %93, i64 0, i64 %95
  %97 = load i32, ptr %6, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [202 x i32], ptr %96, i64 0, i64 %98
  store i32 0, ptr %99, align 4, !tbaa !8
  br label %100

100:                                              ; preds = %59
  %101 = load i32, ptr %6, align 4, !tbaa !8
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %6, align 4, !tbaa !8
  br label %55, !llvm.loop !11

103:                                              ; preds = %58
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %5, align 4, !tbaa !8
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %5, align 4, !tbaa !8
  br label %48, !llvm.loop !13

107:                                              ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %108 = load i32, ptr @k, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %7, align 4, !tbaa !8
  br label %110

110:                                              ; preds = %148, %107
  %111 = load i32, ptr %7, align 4, !tbaa !8
  %112 = icmp sge i32 %111, 1
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %151

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %115 = load i32, ptr @k, align 4, !tbaa !8
  store i32 %115, ptr %8, align 4, !tbaa !8
  br label %116

116:                                              ; preds = %144, %114
  %117 = load i32, ptr %8, align 4, !tbaa !8
  %118 = load i32, ptr %7, align 4, !tbaa !8
  %119 = icmp sgt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %147

121:                                              ; preds = %116
  %122 = load i32, ptr %2, align 4, !tbaa !8
  %123 = xor i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %124
  %126 = load i32, ptr %7, align 4, !tbaa !8
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [202 x [202 x i32]], ptr %125, i64 0, i64 %127
  %129 = load i32, ptr %8, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [202 x i32], ptr %128, i64 0, i64 %130
  %132 = load i32, ptr %2, align 4, !tbaa !8
  %133 = xor i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %134
  %136 = load i32, ptr %7, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [202 x [202 x i32]], ptr %135, i64 0, i64 %137
  %139 = load i32, ptr %8, align 4, !tbaa !8
  %140 = add nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [202 x i32], ptr %138, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %131, i32 noundef %143)
  br label %144

144:                                              ; preds = %121
  %145 = load i32, ptr %8, align 4, !tbaa !8
  %146 = add nsw i32 %145, -1
  store i32 %146, ptr %8, align 4, !tbaa !8
  br label %116, !llvm.loop !14

147:                                              ; preds = %120
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %7, align 4, !tbaa !8
  %150 = add nsw i32 %149, -1
  store i32 %150, ptr %7, align 4, !tbaa !8
  br label %110, !llvm.loop !15

151:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %152 = load i32, ptr @k, align 4, !tbaa !8
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %9, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %191, %151
  %155 = load i32, ptr %9, align 4, !tbaa !8
  %156 = icmp sgt i32 %155, 1
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %194

158:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %159 = load i32, ptr @k, align 4, !tbaa !8
  store i32 %159, ptr %10, align 4, !tbaa !8
  br label %160

160:                                              ; preds = %187, %158
  %161 = load i32, ptr %10, align 4, !tbaa !8
  %162 = icmp sge i32 %161, 1
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %190

164:                                              ; preds = %160
  %165 = load i32, ptr %2, align 4, !tbaa !8
  %166 = xor i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %167
  %169 = load i32, ptr %10, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [202 x [202 x i32]], ptr %168, i64 0, i64 %170
  %172 = load i32, ptr %9, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [202 x i32], ptr %171, i64 0, i64 %173
  %175 = load i32, ptr %2, align 4, !tbaa !8
  %176 = xor i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %177
  %179 = load i32, ptr %10, align 4, !tbaa !8
  %180 = add nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [202 x [202 x i32]], ptr %178, i64 0, i64 %181
  %183 = load i32, ptr %9, align 4, !tbaa !8
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [202 x i32], ptr %182, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %174, i32 noundef %186)
  br label %187

187:                                              ; preds = %164
  %188 = load i32, ptr %10, align 4, !tbaa !8
  %189 = add nsw i32 %188, -1
  store i32 %189, ptr %10, align 4, !tbaa !8
  br label %160, !llvm.loop !16

190:                                              ; preds = %163
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %9, align 4, !tbaa !8
  %193 = add nsw i32 %192, -1
  store i32 %193, ptr %9, align 4, !tbaa !8
  br label %154, !llvm.loop !17

194:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %195

195:                                              ; preds = %297, %194
  %196 = load i32, ptr %11, align 4, !tbaa !8
  %197 = load i32, ptr @k, align 4, !tbaa !8
  %198 = icmp sle i32 %196, %197
  br i1 %198, label %200, label %199

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

200:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %201 = load i32, ptr %11, align 4, !tbaa !8
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %12, align 4, !tbaa !8
  br label %203

203:                                              ; preds = %293, %200
  %204 = load i32, ptr %12, align 4, !tbaa !8
  %205 = load i32, ptr @k, align 4, !tbaa !8
  %206 = add nsw i32 %205, 1
  %207 = icmp sle i32 %204, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %203
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %296

209:                                              ; preds = %203
  %210 = load i32, ptr %12, align 4, !tbaa !8
  %211 = load i32, ptr @k, align 4, !tbaa !8
  %212 = add nsw i32 %211, 1
  %213 = icmp slt i32 %210, %212
  br i1 %213, label %214, label %271

214:                                              ; preds = %209
  %215 = load i32, ptr %2, align 4, !tbaa !8
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %216
  %218 = load i32, ptr %11, align 4, !tbaa !8
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [202 x [202 x i32]], ptr %217, i64 0, i64 %219
  %221 = load i32, ptr %12, align 4, !tbaa !8
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [202 x i32], ptr %220, i64 0, i64 %222
  %224 = load i32, ptr %2, align 4, !tbaa !8
  %225 = xor i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %226
  %228 = load i32, ptr %11, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [202 x [202 x i32]], ptr %227, i64 0, i64 %229
  %231 = load i32, ptr %12, align 4, !tbaa !8
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [202 x i32], ptr %230, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %223, i32 noundef %234)
  %235 = load i32, ptr %2, align 4, !tbaa !8
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %236
  %238 = load i32, ptr %11, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [202 x [202 x i32]], ptr %237, i64 0, i64 %239
  %241 = load i32, ptr %12, align 4, !tbaa !8
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [202 x i32], ptr %240, i64 0, i64 %242
  %244 = load i32, ptr %2, align 4, !tbaa !8
  %245 = xor i32 %244, 1
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %246
  %248 = load i32, ptr %11, align 4, !tbaa !8
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [202 x [202 x i32]], ptr %247, i64 0, i64 %249
  %251 = load i32, ptr %12, align 4, !tbaa !8
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [202 x i32], ptr %250, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !8
  %255 = load i32, ptr %2, align 4, !tbaa !8
  %256 = xor i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %257
  %259 = load i32, ptr %12, align 4, !tbaa !8
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [202 x [202 x i32]], ptr %258, i64 0, i64 %260
  %262 = load i32, ptr %12, align 4, !tbaa !8
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [202 x i32], ptr %261, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !8
  %266 = sub nsw i32 %254, %265
  %267 = load i32, ptr @p, align 4, !tbaa !8
  %268 = add nsw i32 %266, %267
  %269 = load i32, ptr @p, align 4, !tbaa !8
  %270 = srem i32 %268, %269
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %243, i32 noundef %270)
  br label %292

271:                                              ; preds = %209
  %272 = load i32, ptr %2, align 4, !tbaa !8
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %273
  %275 = load i32, ptr %11, align 4, !tbaa !8
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [202 x [202 x i32]], ptr %274, i64 0, i64 %276
  %278 = load i32, ptr %12, align 4, !tbaa !8
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [202 x i32], ptr %277, i64 0, i64 %279
  %281 = load i32, ptr %2, align 4, !tbaa !8
  %282 = xor i32 %281, 1
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %283
  %285 = load i32, ptr %11, align 4, !tbaa !8
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [202 x [202 x i32]], ptr %284, i64 0, i64 %286
  %288 = load i32, ptr %12, align 4, !tbaa !8
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [202 x i32], ptr %287, i64 0, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %280, i32 noundef %291)
  br label %292

292:                                              ; preds = %271, %214
  br label %293

293:                                              ; preds = %292
  %294 = load i32, ptr %12, align 4, !tbaa !8
  %295 = add nsw i32 %294, 1
  store i32 %295, ptr %12, align 4, !tbaa !8
  br label %203, !llvm.loop !18

296:                                              ; preds = %208
  br label %297

297:                                              ; preds = %296
  %298 = load i32, ptr %11, align 4, !tbaa !8
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %11, align 4, !tbaa !8
  br label %195, !llvm.loop !19

300:                                              ; preds = %199
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %3, align 4, !tbaa !8
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %3, align 4, !tbaa !8
  br label %38, !llvm.loop !20

304:                                              ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %305

305:                                              ; preds = %335, %304
  %306 = load i32, ptr %14, align 4, !tbaa !8
  %307 = load i32, ptr @k, align 4, !tbaa !8
  %308 = add nsw i32 %307, 1
  %309 = icmp sle i32 %306, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %305
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %338

311:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %312 = load i32, ptr %14, align 4, !tbaa !8
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %15, align 4, !tbaa !8
  br label %314

314:                                              ; preds = %331, %311
  %315 = load i32, ptr %15, align 4, !tbaa !8
  %316 = load i32, ptr @k, align 4, !tbaa !8
  %317 = add nsw i32 %316, 1
  %318 = icmp sle i32 %315, %317
  br i1 %318, label %320, label %319

319:                                              ; preds = %314
  store i32 32, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %334

320:                                              ; preds = %314
  %321 = load i32, ptr %2, align 4, !tbaa !8
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %322
  %324 = load i32, ptr %14, align 4, !tbaa !8
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [202 x [202 x i32]], ptr %323, i64 0, i64 %325
  %327 = load i32, ptr %15, align 4, !tbaa !8
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [202 x i32], ptr %326, i64 0, i64 %328
  %330 = load i32, ptr %329, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %330)
  br label %331

331:                                              ; preds = %320
  %332 = load i32, ptr %15, align 4, !tbaa !8
  %333 = add nsw i32 %332, 1
  store i32 %333, ptr %15, align 4, !tbaa !8
  br label %314, !llvm.loop !21

334:                                              ; preds = %319
  br label %335

335:                                              ; preds = %334
  %336 = load i32, ptr %14, align 4, !tbaa !8
  %337 = add nsw i32 %336, 1
  store i32 %337, ptr %14, align 4, !tbaa !8
  br label %305, !llvm.loop !22

338:                                              ; preds = %310
  %339 = load i32, ptr %13, align 4, !tbaa !8
  %340 = add nsw i32 %339, 1
  %341 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %340)
  %342 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %341, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %343 = load i32, ptr %1, align 4
  ret i32 %343
}

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

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

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

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

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

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

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


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

%"class.std::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
@p = external dso_local global i32, align 4
@dp = external dso_local global [2 x [202 x [202 x i32]]], align 16
@s1 = external dso_local global [2 x [202 x [202 x i32]]], align 16
@s2 = external dso_local global [2 x [202 x [202 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 nounwind uwtable
declare dso_local void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = 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)
  %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) @k)
  %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) @p)
  %16 = load i32, ptr @k, align 4, !tbaa !8
  %17 = add nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [202 x [202 x i32]], ptr @dp, i64 0, i64 %18, i64 %18
  store i32 1, ptr %19, align 4, !tbaa !8
  %20 = load i32, ptr @n, align 4, !tbaa !8
  %.not117 = icmp slt i32 %20, 1
  br i1 %.not117, label %._crit_edge122, label %.lr.ph121

._crit_edge122.loopexit:                          ; preds = %._crit_edge116
  %21 = zext nneg i32 %25 to i64
  br label %._crit_edge122

._crit_edge122:                                   ; preds = %._crit_edge122.loopexit, %0
  %22 = phi i32 [ %16, %0 ], [ %110, %._crit_edge122.loopexit ]
  %.086.lcssa = phi i64 [ 0, %0 ], [ %21, %._crit_edge122.loopexit ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !8
  %.not88127 = icmp slt i32 %22, 0
  br i1 %.not88127, label %._crit_edge131, label %.lr.ph130

.lr.ph121:                                        ; preds = %0, %._crit_edge116
  %23 = phi i32 [ %110, %._crit_edge116 ], [ %16, %0 ]
  %24 = phi i32 [ %111, %._crit_edge116 ], [ %16, %0 ]
  %.085119 = phi i32 [ %112, %._crit_edge116 ], [ 1, %0 ]
  %.086118 = phi i32 [ %25, %._crit_edge116 ], [ 0, %0 ]
  %25 = xor i32 %.086118, 1
  %26 = add i32 %24, 1
  %27 = icmp sgt i32 %24, -1
  br i1 %27, label %.preheader.lr.ph, label %._crit_edge116

.preheader.lr.ph:                                 ; preds = %.lr.ph121
  %28 = zext i32 %.086118 to i64
  %29 = zext i32 %25 to i64
  %30 = zext i32 %26 to i64
  %31 = add nuw i32 %24, 1
  %smin = tail call i32 @llvm.smin.i32(i32 %26, i32 1)
  %32 = sub i32 %31, %smin
  %33 = mul nuw nsw i64 %29, 163216
  %34 = mul nuw nsw i64 %30, 812
  %35 = mul nuw nsw i64 %28, 163216
  %36 = mul nuw nsw i64 %28, 163216
  %.neg = mul nsw i64 %29, -163216
  %37 = add nsw i64 %.neg, %36
  %38 = add nuw i32 %24, 1
  %smin181 = tail call i32 @llvm.smin.i32(i32 %26, i32 1)
  %39 = sub i32 %38, %smin181
  %40 = zext i32 %39 to i64
  %41 = add nuw nsw i64 %40, 1
  %min.iters.check = icmp ult i32 %39, 19
  %42 = getelementptr i8, ptr @dp, i64 %35
  %43 = getelementptr i8, ptr %42, i64 %34
  %44 = getelementptr i8, ptr @dp, i64 %33
  %45 = getelementptr i8, ptr %44, i64 %34
  %46 = zext i32 %32 to i64
  %mul.neg = mul nsw i64 %46, -4
  %47 = zext i32 %32 to i64
  %mul178.neg = mul nsw i64 %47, -4
  %diff.check = icmp ult i64 %37, 32
  %n.vec = and i64 %41, 8589934584
  %ind.end = sub nsw i64 %30, %n.vec
  %cmp.n = icmp eq i64 %41, %n.vec
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph
  %indvar = phi i64 [ %indvar.next, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %._crit_edge.us ], [ %30, %.preheader.lr.ph ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.preheader.us
  %48 = mul nsw i64 %indvar, -808
  %scevgep177 = getelementptr i8, ptr %43, i64 %48
  %scevgep = getelementptr i8, ptr %45, i64 %48
  %49 = getelementptr i8, ptr %scevgep, i64 %mul.neg
  %50 = icmp ugt ptr %49, %scevgep
  %51 = getelementptr i8, ptr %scevgep177, i64 %mul178.neg
  %52 = icmp ugt ptr %51, %scevgep177
  %53 = or i1 %50, %52
  %or.cond = select i1 %53, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %offset.idx = sub i64 %30, %index
  %54 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %28, i64 %indvars.iv136, i64 %offset.idx
  %55 = getelementptr inbounds i8, ptr %54, i64 -12
  %56 = getelementptr inbounds i8, ptr %54, i64 -28
  %wide.load = load <4 x i32>, ptr %55, align 4, !tbaa !8
  %wide.load182 = load <4 x i32>, ptr %56, align 4, !tbaa !8
  %57 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %28, i64 %indvars.iv136, i64 %offset.idx
  %58 = getelementptr inbounds i8, ptr %57, i64 -12
  %59 = getelementptr inbounds i8, ptr %57, i64 -28
  store <4 x i32> %wide.load, ptr %58, align 4, !tbaa !8
  store <4 x i32> %wide.load182, ptr %59, align 4, !tbaa !8
  %60 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %28, i64 %indvars.iv136, i64 %offset.idx
  %61 = getelementptr inbounds i8, ptr %60, i64 -12
  %62 = getelementptr inbounds i8, ptr %60, i64 -28
  store <4 x i32> %wide.load, ptr %61, align 4, !tbaa !8
  store <4 x i32> %wide.load182, ptr %62, align 4, !tbaa !8
  %63 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %29, i64 %indvars.iv136, i64 %offset.idx
  %64 = getelementptr inbounds i8, ptr %63, i64 -12
  %65 = getelementptr inbounds i8, ptr %63, i64 -28
  store <4 x i32> zeroinitializer, ptr %64, align 4, !tbaa !8
  store <4 x i32> zeroinitializer, ptr %65, align 4, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %66 = icmp eq i64 %index.next, %n.vec
  br i1 %66, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.preheader.us
  %indvars.iv.ph = phi i64 [ %30, %vector.scevcheck ], [ %30, %.preheader.us ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %67 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %28, i64 %indvars.iv136, i64 %indvars.iv
  %68 = load i32, ptr %67, align 4, !tbaa !8
  %69 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %28, i64 %indvars.iv136, i64 %indvars.iv
  store i32 %68, ptr %69, align 4, !tbaa !8
  %70 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %28, i64 %indvars.iv136, i64 %indvars.iv
  store i32 %68, ptr %70, align 4, !tbaa !8
  %71 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %29, i64 %indvars.iv136, i64 %indvars.iv
  store i32 0, ptr %71, align 4, !tbaa !8
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %72 = trunc nuw i64 %indvars.iv to i32
  %73 = icmp sgt i32 %72, 1
  br i1 %73, label %scalar.ph, label %._crit_edge.us, !llvm.loop !15

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %indvars.iv.next137 = add nsw i64 %indvars.iv136, -1
  %74 = trunc nuw i64 %indvars.iv136 to i32
  %75 = icmp sgt i32 %74, 1
  %indvar.next = add i64 %indvar, 1
  br i1 %75, label %.preheader.us, label %.preheader95, !llvm.loop !16

.preheader95:                                     ; preds = %._crit_edge.us
  br i1 %27, label %.lr.ph100, label %._crit_edge116

.lr.ph100:                                        ; preds = %.preheader95
  %76 = zext nneg i32 %.086118 to i64
  %77 = zext i32 %26 to i64
  br label %82

._crit_edge101:                                   ; preds = %._crit_edge
  %.pre = load i32, ptr @k, align 4, !tbaa !8
  %78 = icmp sgt i32 %.pre, 0
  br i1 %78, label %.lr.ph108.split.preheader, label %._crit_edge116

.lr.ph108.split.preheader:                        ; preds = %._crit_edge101
  %79 = zext nneg i32 %.086118 to i64
  %80 = add nuw i32 %.pre, 1
  %81 = zext i32 %80 to i64
  br label %.lr.ph108.split

82:                                               ; preds = %.lr.ph100, %._crit_edge
  %indvars.iv139 = phi i64 [ %77, %.lr.ph100 ], [ %indvars.iv.next140, %._crit_edge ]
  %83 = load i32, ptr @k, align 4, !tbaa !8
  %84 = trunc nuw i64 %indvars.iv139 to i32
  %85 = icmp sgt i32 %83, %84
  br i1 %85, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %82
  %indvars.iv.next140 = add nsw i64 %indvars.iv139, -1
  %86 = icmp sgt i32 %84, 1
  br i1 %86, label %82, label %._crit_edge101, !llvm.loop !17

.lr.ph:                                           ; preds = %82, %.lr.ph
  %.08198 = phi i32 [ %93, %.lr.ph ], [ %83, %82 ]
  %87 = zext nneg i32 %.08198 to i64
  %88 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %76, i64 %indvars.iv139, i64 %87
  %89 = add nuw nsw i32 %.08198, 1
  %90 = zext nneg i32 %89 to i64
  %91 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %76, i64 %indvars.iv139, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !8
  tail call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %88, i32 noundef %92)
  %93 = add nsw i32 %.08198, -1
  %94 = icmp sgt i32 %93, %84
  br i1 %94, label %.lr.ph, label %._crit_edge, !llvm.loop !18

.preheader94:                                     ; preds = %._crit_edge105
  %.pre164 = load i32, ptr @k, align 4, !tbaa !8
  %.not90113 = icmp slt i32 %.pre164, 1
  br i1 %.not90113, label %._crit_edge116, label %.lr.ph115

.lr.ph115:                                        ; preds = %.preheader94
  %95 = zext nneg i32 %25 to i64
  %96 = zext nneg i32 %.086118 to i64
  br label %114

.lr.ph108.split:                                  ; preds = %.lr.ph108.split.preheader, %._crit_edge105
  %indvars.iv145 = phi i64 [ %81, %.lr.ph108.split.preheader ], [ %indvars.iv.next146, %._crit_edge105 ]
  %97 = load i32, ptr @k, align 4, !tbaa !8
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %.lr.ph108.split
  %99 = zext nneg i32 %97 to i64
  br label %102

._crit_edge105:                                   ; preds = %102, %.lr.ph108.split
  %indvars.iv.next146 = add nsw i64 %indvars.iv145, -1
  %100 = trunc nuw i64 %indvars.iv145 to i32
  %101 = icmp sgt i32 %100, 2
  br i1 %101, label %.lr.ph108.split, label %.preheader94, !llvm.loop !19

102:                                              ; preds = %.lr.ph104, %102
  %indvars.iv142 = phi i64 [ %99, %.lr.ph104 ], [ %indvars.iv.next143, %102 ]
  %103 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %79, i64 %indvars.iv142, i64 %indvars.iv145
  %104 = add nuw nsw i64 %indvars.iv142, 1
  %105 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %79, i64 %104, i64 %indvars.iv145
  %106 = load i32, ptr %105, align 4, !tbaa !8
  tail call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %103, i32 noundef %106)
  %indvars.iv.next143 = add nsw i64 %indvars.iv142, -1
  %107 = icmp ugt i64 %indvars.iv142, 1
  br i1 %107, label %102, label %._crit_edge105, !llvm.loop !21

.loopexit93:                                      ; preds = %134, %114
  %108 = phi i32 [ %115, %114 ], [ %135, %134 ]
  %109 = sext i32 %108 to i64
  %.not90.not = icmp slt i64 %indvars.iv153, %109
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  br i1 %.not90.not, label %114, label %._crit_edge116, !llvm.loop !22

._crit_edge116:                                   ; preds = %.loopexit93, %.lr.ph121, %.preheader95, %._crit_edge101, %.preheader94
  %110 = phi i32 [ %.pre164, %.preheader94 ], [ %.pre, %._crit_edge101 ], [ %23, %.preheader95 ], [ %23, %.lr.ph121 ], [ %108, %.loopexit93 ]
  %111 = phi i32 [ %.pre164, %.preheader94 ], [ %.pre, %._crit_edge101 ], [ %24, %.preheader95 ], [ %24, %.lr.ph121 ], [ %108, %.loopexit93 ]
  %112 = add nuw nsw i32 %.085119, 1
  %113 = load i32, ptr @n, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.085119, %113
  br i1 %.not.not, label %.lr.ph121, label %._crit_edge122.loopexit, !llvm.loop !23

114:                                              ; preds = %.lr.ph115, %.loopexit93
  %115 = phi i32 [ %.pre164, %.lr.ph115 ], [ %108, %.loopexit93 ]
  %indvars.iv153 = phi i64 [ 1, %.lr.ph115 ], [ %indvars.iv.next154, %.loopexit93 ]
  %indvars.iv148 = phi i64 [ 2, %.lr.ph115 ], [ %indvars.iv.next149, %.loopexit93 ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %116 = sext i32 %115 to i64
  %.not91109 = icmp sgt i64 %indvars.iv153, %116
  br i1 %.not91109, label %.loopexit93, label %.lr.ph112

.lr.ph112:                                        ; preds = %114, %134
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %134 ], [ %indvars.iv148, %114 ]
  %117 = phi i32 [ %135, %134 ], [ %115, %114 ]
  %118 = trunc nuw i64 %indvars.iv150 to i32
  %.not92 = icmp slt i32 %117, %118
  %119 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %95, i64 %indvars.iv153, i64 %indvars.iv150
  br i1 %.not92, label %131, label %120

120:                                              ; preds = %.lr.ph112
  %121 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s1, i64 0, i64 %96, i64 %indvars.iv153, i64 %indvars.iv150
  %122 = load i32, ptr %121, align 4, !tbaa !8
  tail call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %119, i32 noundef %122)
  %123 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %96, i64 %indvars.iv153, i64 %indvars.iv150
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %96, i64 %indvars.iv150, i64 %indvars.iv150
  %126 = load i32, ptr %125, align 4, !tbaa !8
  %127 = sub i32 %124, %126
  %128 = load i32, ptr @p, align 4, !tbaa !8
  %129 = add nsw i32 %127, %128
  %130 = srem i32 %129, %128
  br label %134

131:                                              ; preds = %.lr.ph112
  %132 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @s2, i64 0, i64 %96, i64 %indvars.iv153, i64 %indvars.iv150
  %133 = load i32, ptr %132, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %120, %131
  %.sink = phi i32 [ %130, %120 ], [ %133, %131 ]
  tail call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %119, i32 noundef %.sink)
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %135 = load i32, ptr @k, align 4, !tbaa !8
  %.not91 = icmp slt i32 %135, %118
  br i1 %.not91, label %.loopexit93, label %.lr.ph112, !llvm.loop !24

.loopexit.loopexit:                               ; preds = %.lr.ph126
  %.pre166 = sext i32 %145 to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph130
  %.pre-phi = phi i64 [ %.pre166, %.loopexit.loopexit ], [ %142, %.lr.ph130 ]
  %136 = phi i32 [ %145, %.loopexit.loopexit ], [ %141, %.lr.ph130 ]
  %.not88 = icmp sgt i64 %indvars.iv161, %.pre-phi
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  br i1 %.not88, label %._crit_edge131.loopexit, label %.lr.ph130, !llvm.loop !25

._crit_edge131.loopexit:                          ; preds = %.loopexit
  %.pre165 = load i32, ptr %1, align 4, !tbaa !8
  %137 = add nsw i32 %.pre165, 1
  br label %._crit_edge131

._crit_edge131:                                   ; preds = %._crit_edge131.loopexit, %._crit_edge122
  %138 = phi i32 [ %137, %._crit_edge131.loopexit ], [ 1, %._crit_edge122 ]
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph130:                                        ; preds = %._crit_edge122, %.loopexit
  %141 = phi i32 [ %136, %.loopexit ], [ %22, %._crit_edge122 ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %.loopexit ], [ 1, %._crit_edge122 ]
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %.loopexit ], [ 2, %._crit_edge122 ]
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %142 = sext i32 %141 to i64
  %.not89123 = icmp sgt i64 %indvars.iv161, %142
  br i1 %.not89123, label %.loopexit, label %.lr.ph126

.lr.ph126:                                        ; preds = %.lr.ph130, %.lr.ph126
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %.lr.ph126 ], [ %indvars.iv156, %.lr.ph130 ]
  %143 = getelementptr inbounds [2 x [202 x [202 x i32]]], ptr @dp, i64 0, i64 %.086.lcssa, i64 %indvars.iv161, i64 %indvars.iv158
  %144 = load i32, ptr %143, align 4, !tbaa !8
  call void @_Z3addRii(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef %144)
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %145 = load i32, ptr @k, align 4, !tbaa !8
  %146 = trunc nuw i64 %indvars.iv158 to i32
  %.not89 = icmp slt i32 %145, %146
  br i1 %.not89, label %.loopexit.loopexit, label %.lr.ph126, !llvm.loop !26
}

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

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

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

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

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

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

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

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


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