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

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

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

@k = external dso_local global i32, align 4
@g = external dso_local global [205 x [205 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @k)
  %12 = load i32, ptr @k, align 4, !tbaa !5
  %13 = srem i32 %12, 2
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %0
  %16 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  br label %362

17:                                               ; preds = %0
  %18 = call i32 @puts(ptr noundef @.str.2)
  %19 = load i32, ptr @k, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %23

21:                                               ; preds = %17
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  br label %362

23:                                               ; preds = %17
  %24 = load i32, ptr @k, align 4, !tbaa !5
  %25 = mul nsw i32 2, %24
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %26
  %28 = load i32, ptr @k, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [205 x i32], ptr %27, i64 0, i64 %29
  store i32 1, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr @k, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %32
  %34 = load i32, ptr @k, align 4, !tbaa !5
  %35 = mul nsw i32 2, %34
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [205 x i32], ptr %33, i64 0, i64 %36
  store i32 1, ptr %37, align 4, !tbaa !5
  %38 = load i32, ptr @k, align 4, !tbaa !5
  %39 = mul nsw i32 2, %38
  %40 = add nsw i32 %39, 2
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %41
  %43 = load i32, ptr @k, align 4, !tbaa !5
  %44 = mul nsw i32 2, %43
  %45 = add nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [205 x i32], ptr %42, i64 0, i64 %46
  store i32 1, ptr %47, align 4, !tbaa !5
  %48 = load i32, ptr @k, align 4, !tbaa !5
  %49 = mul nsw i32 2, %48
  %50 = add nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %51
  %53 = load i32, ptr @k, align 4, !tbaa !5
  %54 = mul nsw i32 2, %53
  %55 = add nsw i32 %54, 2
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [205 x i32], ptr %52, i64 0, i64 %56
  store i32 1, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr @k, align 4, !tbaa !5
  %59 = mul nsw i32 2, %58
  %60 = add nsw i32 %59, 4
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %61
  %63 = load i32, ptr @k, align 4, !tbaa !5
  %64 = mul nsw i32 2, %63
  %65 = add nsw i32 %64, 3
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [205 x i32], ptr %62, i64 0, i64 %66
  store i32 1, ptr %67, align 4, !tbaa !5
  %68 = load i32, ptr @k, align 4, !tbaa !5
  %69 = mul nsw i32 2, %68
  %70 = add nsw i32 %69, 3
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %71
  %73 = load i32, ptr @k, align 4, !tbaa !5
  %74 = mul nsw i32 2, %73
  %75 = add nsw i32 %74, 4
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [205 x i32], ptr %72, i64 0, i64 %76
  store i32 1, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 3, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %188, %23
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = load i32, ptr @k, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %191

83:                                               ; preds = %78
  %84 = load i32, ptr @k, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %85
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [205 x i32], ptr %86, i64 0, i64 %88
  store i32 1, ptr %89, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %91
  %93 = load i32, ptr @k, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [205 x i32], ptr %92, i64 0, i64 %94
  store i32 1, ptr %95, align 4, !tbaa !5
  %96 = load i32, ptr @k, align 4, !tbaa !5
  %97 = mul nsw i32 2, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %98
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = load i32, ptr @k, align 4, !tbaa !5
  %102 = add nsw i32 %100, %101
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [205 x i32], ptr %99, i64 0, i64 %103
  store i32 1, ptr %104, align 4, !tbaa !5
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = load i32, ptr @k, align 4, !tbaa !5
  %107 = add nsw i32 %105, %106
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %108
  %110 = load i32, ptr @k, align 4, !tbaa !5
  %111 = mul nsw i32 2, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [205 x i32], ptr %109, i64 0, i64 %112
  store i32 1, ptr %113, align 4, !tbaa !5
  %114 = load i32, ptr @k, align 4, !tbaa !5
  %115 = mul nsw i32 2, %114
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %117
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [205 x i32], ptr %118, i64 0, i64 %120
  store i32 1, ptr %121, align 4, !tbaa !5
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %123
  %125 = load i32, ptr @k, align 4, !tbaa !5
  %126 = mul nsw i32 2, %125
  %127 = add nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [205 x i32], ptr %124, i64 0, i64 %128
  store i32 1, ptr %129, align 4, !tbaa !5
  %130 = load i32, ptr @k, align 4, !tbaa !5
  %131 = mul nsw i32 2, %130
  %132 = add nsw i32 %131, 2
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %133
  %135 = load i32, ptr %3, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [205 x i32], ptr %134, i64 0, i64 %136
  store i32 1, ptr %137, align 4, !tbaa !5
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %139
  %141 = load i32, ptr @k, align 4, !tbaa !5
  %142 = mul nsw i32 2, %141
  %143 = add nsw i32 %142, 2
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [205 x i32], ptr %140, i64 0, i64 %144
  store i32 1, ptr %145, align 4, !tbaa !5
  %146 = load i32, ptr @k, align 4, !tbaa !5
  %147 = mul nsw i32 2, %146
  %148 = add nsw i32 %147, 3
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %149
  %151 = load i32, ptr %3, align 4, !tbaa !5
  %152 = load i32, ptr @k, align 4, !tbaa !5
  %153 = add nsw i32 %151, %152
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [205 x i32], ptr %150, i64 0, i64 %154
  store i32 1, ptr %155, align 4, !tbaa !5
  %156 = load i32, ptr %3, align 4, !tbaa !5
  %157 = load i32, ptr @k, align 4, !tbaa !5
  %158 = add nsw i32 %156, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %159
  %161 = load i32, ptr @k, align 4, !tbaa !5
  %162 = mul nsw i32 2, %161
  %163 = add nsw i32 %162, 3
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [205 x i32], ptr %160, i64 0, i64 %164
  store i32 1, ptr %165, align 4, !tbaa !5
  %166 = load i32, ptr @k, align 4, !tbaa !5
  %167 = mul nsw i32 2, %166
  %168 = add nsw i32 %167, 4
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %169
  %171 = load i32, ptr %3, align 4, !tbaa !5
  %172 = load i32, ptr @k, align 4, !tbaa !5
  %173 = add nsw i32 %171, %172
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [205 x i32], ptr %170, i64 0, i64 %174
  store i32 1, ptr %175, align 4, !tbaa !5
  %176 = load i32, ptr %3, align 4, !tbaa !5
  %177 = load i32, ptr @k, align 4, !tbaa !5
  %178 = add nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %179
  %181 = load i32, ptr @k, align 4, !tbaa !5
  %182 = mul nsw i32 2, %181
  %183 = add nsw i32 %182, 4
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [205 x i32], ptr %180, i64 0, i64 %184
  store i32 1, ptr %185, align 4, !tbaa !5
  %186 = load i32, ptr %2, align 4, !tbaa !5
  %187 = add nsw i32 %186, 6
  store i32 %187, ptr %2, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %83
  %189 = load i32, ptr %3, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %3, align 4, !tbaa !5
  br label %78, !llvm.loop !9

191:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %258, %191
  %193 = load i32, ptr %4, align 4, !tbaa !5
  %194 = load i32, ptr @k, align 4, !tbaa !5
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %261

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %198 = load i32, ptr %4, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %6, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %220, %197
  %201 = load i32, ptr %6, align 4, !tbaa !5
  %202 = load i32, ptr @k, align 4, !tbaa !5
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %205, label %204

204:                                              ; preds = %200
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %223

205:                                              ; preds = %200
  %206 = load i32, ptr %6, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %207
  %209 = load i32, ptr %4, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [205 x i32], ptr %208, i64 0, i64 %210
  store i32 1, ptr %211, align 4, !tbaa !5
  %212 = load i32, ptr %4, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %213
  %215 = load i32, ptr %6, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [205 x i32], ptr %214, i64 0, i64 %216
  store i32 1, ptr %217, align 4, !tbaa !5
  %218 = load i32, ptr %2, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %2, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %205
  %221 = load i32, ptr %6, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %6, align 4, !tbaa !5
  br label %200, !llvm.loop !11

223:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %224 = load i32, ptr %4, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %7, align 4, !tbaa !5
  br label %226

226:                                              ; preds = %254, %223
  %227 = load i32, ptr %7, align 4, !tbaa !5
  %228 = load i32, ptr @k, align 4, !tbaa !5
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %231, label %230

230:                                              ; preds = %226
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %257

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

254:                                              ; preds = %231
  %255 = load i32, ptr %7, align 4, !tbaa !5
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %7, align 4, !tbaa !5
  br label %226, !llvm.loop !12

257:                                              ; preds = %230
  br label %258

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

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

262:                                              ; preds = %308, %261
  %263 = load i32, ptr %8, align 4, !tbaa !5
  %264 = load i32, ptr @k, align 4, !tbaa !5
  %265 = icmp slt i32 %263, %264
  br i1 %265, label %267, label %266

266:                                              ; preds = %262
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %311

267:                                              ; preds = %262
  %268 = load i32, ptr %8, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %270
  %272 = load i32, ptr %8, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [205 x i32], ptr %271, i64 0, i64 %273
  store i32 0, ptr %274, align 4, !tbaa !5
  %275 = load i32, ptr %8, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %276
  %278 = load i32, ptr %8, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [205 x i32], ptr %277, i64 0, i64 %280
  store i32 0, ptr %281, align 4, !tbaa !5
  %282 = load i32, ptr %2, align 4, !tbaa !5
  %283 = add nsw i32 %282, -1
  store i32 %283, ptr %2, align 4, !tbaa !5
  %284 = load i32, ptr %8, align 4, !tbaa !5
  %285 = load i32, ptr @k, align 4, !tbaa !5
  %286 = add nsw i32 %284, %285
  %287 = add nsw i32 %286, 1
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %288
  %290 = load i32, ptr %8, align 4, !tbaa !5
  %291 = load i32, ptr @k, align 4, !tbaa !5
  %292 = add nsw i32 %290, %291
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [205 x i32], ptr %289, i64 0, i64 %293
  store i32 0, ptr %294, align 4, !tbaa !5
  %295 = load i32, ptr %8, align 4, !tbaa !5
  %296 = load i32, ptr @k, align 4, !tbaa !5
  %297 = add nsw i32 %295, %296
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %298
  %300 = load i32, ptr %8, align 4, !tbaa !5
  %301 = load i32, ptr @k, align 4, !tbaa !5
  %302 = add nsw i32 %300, %301
  %303 = add nsw i32 %302, 1
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [205 x i32], ptr %299, i64 0, i64 %304
  store i32 0, ptr %305, align 4, !tbaa !5
  %306 = load i32, ptr %2, align 4, !tbaa !5
  %307 = add nsw i32 %306, -1
  store i32 %307, ptr %2, align 4, !tbaa !5
  br label %308

308:                                              ; preds = %267
  %309 = load i32, ptr %8, align 4, !tbaa !5
  %310 = add nsw i32 %309, 2
  store i32 %310, ptr %8, align 4, !tbaa !5
  br label %262, !llvm.loop !14

311:                                              ; preds = %266
  %312 = load i32, ptr @k, align 4, !tbaa !5
  %313 = mul nsw i32 2, %312
  %314 = add nsw i32 %313, 4
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %314)
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %315, ptr noundef @.str.4)
  %317 = load i32, ptr %2, align 4, !tbaa !5
  %318 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %316, i32 noundef %317)
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %318, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %358, %311
  %321 = load i32, ptr %9, align 4, !tbaa !5
  %322 = load i32, ptr @k, align 4, !tbaa !5
  %323 = mul nsw i32 2, %322
  %324 = add nsw i32 %323, 4
  %325 = icmp sle i32 %321, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %320
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %361

327:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %328 = load i32, ptr %9, align 4, !tbaa !5
  %329 = add nsw i32 %328, 1
  store i32 %329, ptr %10, align 4, !tbaa !5
  br label %330

330:                                              ; preds = %354, %327
  %331 = load i32, ptr %10, align 4, !tbaa !5
  %332 = load i32, ptr @k, align 4, !tbaa !5
  %333 = mul nsw i32 2, %332
  %334 = add nsw i32 %333, 4
  %335 = icmp sle i32 %331, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %330
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %357

337:                                              ; preds = %330
  %338 = load i32, ptr %9, align 4, !tbaa !5
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %339
  %341 = load i32, ptr %10, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [205 x i32], ptr %340, i64 0, i64 %342
  %344 = load i32, ptr %343, align 4, !tbaa !5
  %345 = icmp sgt i32 %344, 0
  br i1 %345, label %346, label %353

346:                                              ; preds = %337
  %347 = load i32, ptr %9, align 4, !tbaa !5
  %348 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %347)
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %348, ptr noundef @.str.4)
  %350 = load i32, ptr %10, align 4, !tbaa !5
  %351 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %349, i32 noundef %350)
  %352 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %351, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %353

353:                                              ; preds = %346, %337
  br label %354

354:                                              ; preds = %353
  %355 = load i32, ptr %10, align 4, !tbaa !5
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %10, align 4, !tbaa !5
  br label %330, !llvm.loop !15

357:                                              ; preds = %336
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %9, align 4, !tbaa !5
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %9, align 4, !tbaa !5
  br label %320, !llvm.loop !16

361:                                              ; preds = %326
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %362

362:                                              ; preds = %361, %21, %15
  %363 = load i32, ptr %1, align 4
  ret i32 %363
}

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

declare i32 @puts(ptr noundef) #1

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

; 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)) #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 = { 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 #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 = { nounwind }

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

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


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

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

@k = external dso_local global i32, align 4
@g = external dso_local local_unnamed_addr global [205 x [205 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @k)
  %2 = load i32, ptr @k, align 4, !tbaa !5
  %3 = and i32 %2, 1
  %4 = icmp eq i32 %3, 0
  br i1 %4, label %5, label %7

5:                                                ; preds = %0
  %6 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %.loopexit69

7:                                                ; preds = %0
  %8 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %9 = load i32, ptr @k, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %13

11:                                               ; preds = %7
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  br label %.loopexit69

13:                                               ; preds = %7
  %14 = shl nsw i32 %9, 1
  %15 = sext i32 %14 to i64
  %16 = sext i32 %9 to i64
  %17 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %15, i64 %16
  store i32 1, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %16, i64 %15
  store i32 1, ptr %18, align 4, !tbaa !5
  %19 = add nsw i32 %14, 2
  %20 = sext i32 %19 to i64
  %21 = or disjoint i32 %14, 1
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %20, i64 %22
  store i32 1, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %22, i64 %20
  store i32 1, ptr %24, align 4, !tbaa !5
  %25 = add nsw i32 %14, 4
  %26 = sext i32 %25 to i64
  %27 = add nsw i32 %14, 3
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %26, i64 %28
  store i32 1, ptr %29, align 4, !tbaa !5
  %30 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %28, i64 %26
  store i32 1, ptr %30, align 4, !tbaa !5
  %31 = icmp sgt i32 %9, 1
  br i1 %31, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %13
  %32 = zext nneg i32 %9 to i64
  %33 = mul i32 %9, 6
  br label %.lr.ph

.preheader72:                                     ; preds = %.lr.ph
  %34 = add i32 %33, -3
  br i1 %31, label %.lr.ph85.preheader, label %._crit_edge

.lr.ph85.preheader:                               ; preds = %.preheader72
  %35 = zext nneg i32 %9 to i64
  br label %.lr.ph85

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %36 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %16, i64 %indvars.iv
  store i32 1, ptr %36, align 4, !tbaa !5
  %37 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv, i64 %16
  store i32 1, ptr %37, align 4, !tbaa !5
  %38 = add nuw nsw i64 %indvars.iv, %32
  %39 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %15, i64 %38
  store i32 1, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %38, i64 %15
  store i32 1, ptr %40, align 4, !tbaa !5
  %41 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %22, i64 %indvars.iv
  store i32 1, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv, i64 %22
  store i32 1, ptr %42, align 4, !tbaa !5
  %43 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %20, i64 %indvars.iv
  store i32 1, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv, i64 %20
  store i32 1, ptr %44, align 4, !tbaa !5
  %45 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %28, i64 %38
  store i32 1, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %38, i64 %28
  store i32 1, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %26, i64 %38
  store i32 1, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %38, i64 %26
  store i32 1, ptr %48, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %32
  br i1 %exitcond.not, label %.preheader72, label %.lr.ph, !llvm.loop !9

.loopexit71:                                      ; preds = %55, %.lr.ph85, %.preheader70
  %.3.lcssa = phi i32 [ %54, %.preheader70 ], [ %.183, %.lr.ph85 ], [ %59, %55 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %35
  br i1 %exitcond119.not, label %.preheader, label %.lr.ph85, !llvm.loop !11

.preheader:                                       ; preds = %.loopexit71
  br i1 %31, label %.lr.ph89.preheader, label %._crit_edge

.lr.ph89.preheader:                               ; preds = %.preheader
  %49 = zext nneg i32 %9 to i64
  br label %.lr.ph89

.lr.ph85:                                         ; preds = %.lr.ph85.preheader, %.loopexit71
  %indvars.iv115 = phi i64 [ 1, %.lr.ph85.preheader ], [ %indvars.iv.next116, %.loopexit71 ]
  %indvars.iv103 = phi i64 [ 2, %.lr.ph85.preheader ], [ %indvars.iv.next104, %.loopexit71 ]
  %.183 = phi i32 [ %34, %.lr.ph85.preheader ], [ %.3.lcssa, %.loopexit71 ]
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %50 = icmp slt i64 %indvars.iv.next116, %16
  br i1 %50, label %.lr.ph77, label %.loopexit71

.preheader70:                                     ; preds = %.lr.ph77
  br i1 %50, label %.lr.ph81, label %.loopexit71

.lr.ph81:                                         ; preds = %.preheader70
  %51 = add nuw nsw i64 %indvars.iv115, %35
  br label %55

.lr.ph77:                                         ; preds = %.lr.ph85, %.lr.ph77
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph77 ], [ %indvars.iv103, %.lr.ph85 ]
  %.275 = phi i32 [ %54, %.lr.ph77 ], [ %.183, %.lr.ph85 ]
  %52 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv105, i64 %indvars.iv115
  store i32 1, ptr %52, align 4, !tbaa !5
  %53 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv115, i64 %indvars.iv105
  store i32 1, ptr %53, align 4, !tbaa !5
  %54 = add nsw i32 %.275, 1
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %35
  br i1 %exitcond109.not, label %.preheader70, label %.lr.ph77, !llvm.loop !12

55:                                               ; preds = %.lr.ph81, %55
  %indvars.iv110 = phi i64 [ %indvars.iv103, %.lr.ph81 ], [ %indvars.iv.next111, %55 ]
  %.379 = phi i32 [ %54, %.lr.ph81 ], [ %59, %55 ]
  %56 = add nuw nsw i64 %indvars.iv110, %35
  %57 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %56, i64 %51
  store i32 1, ptr %57, align 4, !tbaa !5
  %58 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %51, i64 %56
  store i32 1, ptr %58, align 4, !tbaa !5
  %59 = add nsw i32 %.379, 1
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next111, %35
  br i1 %exitcond114.not, label %.loopexit71, label %55, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph89, %13, %.preheader72, %.preheader
  %.4.lcssa = phi i32 [ %.3.lcssa, %.preheader ], [ %34, %.preheader72 ], [ 3, %13 ], [ %72, %.lr.ph89 ]
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %25)
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.4)
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef %.4.lcssa)
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %64 = load i32, ptr @k, align 4, !tbaa !5
  %.not95 = icmp slt i32 %64, -1
  br i1 %.not95, label %.loopexit69, label %.lr.ph98

.lr.ph89:                                         ; preds = %.lr.ph89.preheader, %.lr.ph89
  %indvars.iv120 = phi i64 [ 1, %.lr.ph89.preheader ], [ %indvars.iv.next121, %.lr.ph89 ]
  %.487 = phi i32 [ %.3.lcssa, %.lr.ph89.preheader ], [ %72, %.lr.ph89 ]
  %65 = add nuw nsw i64 %indvars.iv120, 1
  %66 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %65, i64 %indvars.iv120
  store i32 0, ptr %66, align 4, !tbaa !5
  %67 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv120, i64 %65
  store i32 0, ptr %67, align 4, !tbaa !5
  %68 = add nuw nsw i64 %indvars.iv120, %49
  %69 = add nuw nsw i64 %68, 1
  %70 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %69, i64 %68
  store i32 0, ptr %70, align 4, !tbaa !5
  %71 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %68, i64 %69
  store i32 0, ptr %71, align 4, !tbaa !5
  %72 = add nsw i32 %.487, -2
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 2
  %73 = icmp slt i64 %indvars.iv.next121, %16
  br i1 %73, label %.lr.ph89, label %._crit_edge, !llvm.loop !14

.loopexit.loopexit:                               ; preds = %92
  %.pre131 = shl nsw i32 %93, 1
  %.pre132 = add nsw i32 %.pre131, 4
  %.pre134 = sext i32 %.pre132 to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph98
  %.pre-phi135 = phi i64 [ %.pre134, %.loopexit.loopexit ], [ %78, %.lr.ph98 ]
  %74 = phi i32 [ %93, %.loopexit.loopexit ], [ %75, %.lr.ph98 ]
  %.not.not = icmp slt i64 %indvars.iv128, %.pre-phi135
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  br i1 %.not.not, label %.lr.ph98, label %.loopexit69, !llvm.loop !15

.lr.ph98:                                         ; preds = %._crit_edge, %.loopexit
  %75 = phi i32 [ %74, %.loopexit ], [ %64, %._crit_edge ]
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %.loopexit ], [ 1, %._crit_edge ]
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.loopexit ], [ 2, %._crit_edge ]
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %76 = shl nsw i32 %75, 1
  %77 = add nsw i32 %76, 4
  %78 = sext i32 %77 to i64
  %.not6891.not = icmp slt i64 %indvars.iv128, %78
  br i1 %.not6891.not, label %.lr.ph94, label %.loopexit

.lr.ph94:                                         ; preds = %.lr.ph98
  %79 = trunc nuw nsw i64 %indvars.iv128 to i32
  br label %80

80:                                               ; preds = %.lr.ph94, %92
  %81 = phi i32 [ %75, %.lr.ph94 ], [ %93, %92 ]
  %82 = phi i32 [ %75, %.lr.ph94 ], [ %94, %92 ]
  %indvars.iv125 = phi i64 [ %indvars.iv123, %.lr.ph94 ], [ %indvars.iv.next126, %92 ]
  %83 = getelementptr inbounds [205 x [205 x i32]], ptr @g, i64 0, i64 %indvars.iv128, i64 %indvars.iv125
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %86, label %92

86:                                               ; preds = %80
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %79)
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @.str.4)
  %89 = trunc nuw nsw i64 %indvars.iv125 to i32
  %90 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef %89)
  %91 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.pre = load i32, ptr @k, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %80, %86
  %93 = phi i32 [ %81, %80 ], [ %.pre, %86 ]
  %94 = phi i32 [ %82, %80 ], [ %.pre, %86 ]
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %95 = shl nsw i32 %94, 1
  %96 = add nsw i32 %95, 4
  %97 = sext i32 %96 to i64
  %.not68.not = icmp slt i64 %indvars.iv125, %97
  br i1 %.not68.not, label %80, label %.loopexit.loopexit, !llvm.loop !16

.loopexit69:                                      ; preds = %.loopexit, %._crit_edge, %11, %5
  ret i32 0
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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)) #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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