; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2015-16/Jan 2016/Plat (16 Jan P1)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@cin = external dso_local global %"class.std::basic_ifstream", align 8
@cout = external dso_local global %"class.std::basic_ofstream", align 8
@grid = external dso_local global [200 x [200 x i8]], align 16
@ok1 = external dso_local global [200 x [200 x [200 x i8]]], align 16
@ok2 = external dso_local global [200 x [200 x [200 x i8]]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4testiiii(i32 noundef, i32 noundef, i32 noundef, 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 i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %50, %0
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %53

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %46, %27
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %49

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 1 dereferenceable(1) %8)
  %35 = load i8, ptr %8, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  %37 = icmp eq i32 %36, 46
  br i1 %37, label %38, label %45

38:                                               ; preds = %33
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [200 x i8], ptr %41, i64 0, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !10
  br label %45

45:                                               ; preds = %38, %33
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %7, align 4, !tbaa !5
  br label %28, !llvm.loop !12

49:                                               ; preds = %32
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !5
  br label %22, !llvm.loop !14

53:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %134, %53
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

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

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

60:                                               ; preds = %130, %59
  %61 = load i32, ptr %10, align 4, !tbaa !5
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %60
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %67
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200 x i8], ptr %68, i64 0, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !10, !range !15, !noundef !16
  %73 = trunc i8 %72 to i1
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200 x [200 x i8]], ptr %76, i64 0, i64 %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [200 x i8], ptr %79, i64 0, i64 %81
  %83 = zext i1 %73 to i8
  store i8 %83, ptr %82, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %11, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %126, %65
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

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

91:                                               ; preds = %86
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %93
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = sub nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [200 x [200 x i8]], ptr %94, i64 0, i64 %97
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200 x i8], ptr %98, i64 0, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !10, !range !15, !noundef !16
  %103 = trunc i8 %102 to i1
  %104 = zext i1 %103 to i32
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %106
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [200 x i8], ptr %107, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !10, !range !15, !noundef !16
  %112 = trunc i8 %111 to i1
  %113 = zext i1 %112 to i32
  %114 = and i32 %104, %113
  %115 = icmp ne i32 %114, 0
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %117
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [200 x [200 x i8]], ptr %118, i64 0, i64 %120
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [200 x i8], ptr %121, i64 0, i64 %123
  %125 = zext i1 %115 to i8
  store i8 %125, ptr %124, align 1, !tbaa !10
  br label %126

126:                                              ; preds = %91
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %11, align 4, !tbaa !5
  br label %86, !llvm.loop !17

129:                                              ; preds = %90
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %10, align 4, !tbaa !5
  br label %60, !llvm.loop !18

133:                                              ; preds = %64
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !5
  br label %54, !llvm.loop !19

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

138:                                              ; preds = %218, %137
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %221

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

144:                                              ; preds = %214, %143
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = load i32, ptr %3, align 4, !tbaa !5
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %217

149:                                              ; preds = %144
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %151
  %153 = load i32, ptr %12, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [200 x i8], ptr %152, i64 0, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !10, !range !15, !noundef !16
  %157 = trunc i8 %156 to i1
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %159
  %161 = load i32, ptr %12, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [200 x [200 x i8]], ptr %160, i64 0, i64 %162
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [200 x i8], ptr %163, i64 0, i64 %165
  %167 = zext i1 %157 to i8
  store i8 %167, ptr %166, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %14, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %210, %149
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = load i32, ptr %2, align 4, !tbaa !5
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %213

175:                                              ; preds = %170
  %176 = load i32, ptr %12, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %177
  %179 = load i32, ptr %14, align 4, !tbaa !5
  %180 = sub nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [200 x [200 x i8]], ptr %178, i64 0, i64 %181
  %183 = load i32, ptr %13, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [200 x i8], ptr %182, i64 0, i64 %184
  %186 = load i8, ptr %185, align 1, !tbaa !10, !range !15, !noundef !16
  %187 = trunc i8 %186 to i1
  %188 = zext i1 %187 to i32
  %189 = load i32, ptr %13, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %190
  %192 = load i32, ptr %14, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [200 x i8], ptr %191, i64 0, i64 %193
  %195 = load i8, ptr %194, align 1, !tbaa !10, !range !15, !noundef !16
  %196 = trunc i8 %195 to i1
  %197 = zext i1 %196 to i32
  %198 = and i32 %188, %197
  %199 = icmp ne i32 %198, 0
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %201
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [200 x [200 x i8]], ptr %202, i64 0, i64 %204
  %206 = load i32, ptr %13, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [200 x i8], ptr %205, i64 0, i64 %207
  %209 = zext i1 %199 to i8
  store i8 %209, ptr %208, align 1, !tbaa !10
  br label %210

210:                                              ; preds = %175
  %211 = load i32, ptr %14, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %14, align 4, !tbaa !5
  br label %170, !llvm.loop !20

213:                                              ; preds = %174
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %13, align 4, !tbaa !5
  br label %144, !llvm.loop !21

217:                                              ; preds = %148
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %12, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %12, align 4, !tbaa !5
  br label %138, !llvm.loop !22

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

222:                                              ; preds = %288, %221
  %223 = load i32, ptr %15, align 4, !tbaa !5
  %224 = load i32, ptr %3, align 4, !tbaa !5
  %225 = icmp slt i32 %223, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %222
  store i32 26, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %291

227:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %228 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %228, ptr %16, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %284, %227
  %230 = load i32, ptr %16, align 4, !tbaa !5
  %231 = load i32, ptr %3, align 4, !tbaa !5
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  store i32 29, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %287

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

235:                                              ; preds = %280, %234
  %236 = load i32, ptr %17, align 4, !tbaa !5
  %237 = load i32, ptr %2, align 4, !tbaa !5
  %238 = icmp slt i32 %236, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %235
  store i32 32, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %283

240:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %241 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %241, ptr %18, align 4, !tbaa !5
  br label %242

242:                                              ; preds = %276, %240
  %243 = load i32, ptr %18, align 4, !tbaa !5
  %244 = load i32, ptr %2, align 4, !tbaa !5
  %245 = icmp slt i32 %243, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %242
  store i32 35, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %279

247:                                              ; preds = %242
  %248 = load i32, ptr %16, align 4, !tbaa !5
  %249 = load i32, ptr %15, align 4, !tbaa !5
  %250 = sub nsw i32 %248, %249
  %251 = add nsw i32 %250, 1
  %252 = load i32, ptr %18, align 4, !tbaa !5
  %253 = load i32, ptr %17, align 4, !tbaa !5
  %254 = sub nsw i32 %252, %253
  %255 = add nsw i32 %254, 1
  %256 = mul nsw i32 %251, %255
  %257 = load i32, ptr %4, align 4, !tbaa !5
  %258 = icmp sgt i32 %256, %257
  br i1 %258, label %259, label %275

259:                                              ; preds = %247
  %260 = load i32, ptr %15, align 4, !tbaa !5
  %261 = load i32, ptr %16, align 4, !tbaa !5
  %262 = load i32, ptr %17, align 4, !tbaa !5
  %263 = load i32, ptr %18, align 4, !tbaa !5
  %264 = call noundef zeroext i1 @_Z4testiiii(i32 noundef %260, i32 noundef %261, i32 noundef %262, i32 noundef %263)
  br i1 %264, label %265, label %275

265:                                              ; preds = %259
  %266 = load i32, ptr %16, align 4, !tbaa !5
  %267 = load i32, ptr %15, align 4, !tbaa !5
  %268 = sub nsw i32 %266, %267
  %269 = add nsw i32 %268, 1
  %270 = load i32, ptr %18, align 4, !tbaa !5
  %271 = load i32, ptr %17, align 4, !tbaa !5
  %272 = sub nsw i32 %270, %271
  %273 = add nsw i32 %272, 1
  %274 = mul nsw i32 %269, %273
  store i32 %274, ptr %4, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %265, %259, %247
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %18, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %18, align 4, !tbaa !5
  br label %242, !llvm.loop !23

279:                                              ; preds = %246
  br label %280

280:                                              ; preds = %279
  %281 = load i32, ptr %17, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %17, align 4, !tbaa !5
  br label %235, !llvm.loop !24

283:                                              ; preds = %239
  br label %284

284:                                              ; preds = %283
  %285 = load i32, ptr %16, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %16, align 4, !tbaa !5
  br label %229, !llvm.loop !25

287:                                              ; preds = %233
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %15, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %15, align 4, !tbaa !5
  br label %222, !llvm.loop !26

291:                                              ; preds = %226
  %292 = load i32, ptr %4, align 4, !tbaa !5
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @cout, i32 noundef %292)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %294 = load i32, ptr %1, align 4
  ret i32 %294
}

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

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

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@cin = external dso_local global %"class.std::basic_ifstream", align 8
@cout = external dso_local global %"class.std::basic_ofstream", align 8
@grid = external dso_local local_unnamed_addr global [200 x [200 x i8]], align 16
@ok1 = external dso_local local_unnamed_addr global [200 x [200 x [200 x i8]]], align 16
@ok2 = external dso_local local_unnamed_addr global [200 x [200 x [200 x i8]]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4testiiii(i32 noundef, i32 noundef, i32 noundef, 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 = alloca i32, align 4
  %3 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  %.pre203 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %8, label %.preheader91.lr.ph, label %.preheader90

.preheader91.lr.ph:                               ; preds = %0
  %9 = icmp sgt i32 %.pre203, 0
  br i1 %9, label %.preheader91, label %._crit_edge142

.preheader91:                                     ; preds = %.preheader91.lr.ph, %._crit_edge
  %10 = phi i32 [ %32, %._crit_edge ], [ %7, %.preheader91.lr.ph ]
  %11 = phi i32 [ %33, %._crit_edge ], [ %.pre203, %.preheader91.lr.ph ]
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %._crit_edge ], [ 0, %.preheader91.lr.ph ]
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.preheader90:                                     ; preds = %._crit_edge, %0
  %13 = phi i32 [ %.pre203, %0 ], [ %33, %._crit_edge ]
  %.lcssa92 = phi i32 [ %7, %0 ], [ %32, %._crit_edge ]
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.preheader89.lr.ph, label %.preheader88

.preheader89.lr.ph:                               ; preds = %.preheader90
  %15 = icmp sgt i32 %.lcssa92, 0
  br i1 %15, label %.preheader89.us.preheader, label %.preheader85.preheader

.preheader89.us.preheader:                        ; preds = %.preheader89.lr.ph
  %16 = zext nneg i32 %.lcssa92 to i64
  %17 = add nsw i32 %13, -1
  %18 = zext nneg i32 %13 to i64
  %wide.trip.count175 = zext nneg i32 %13 to i64
  %wide.trip.count = zext i32 %17 to i64
  br label %.preheader89.us

.preheader89.us:                                  ; preds = %.preheader89.us.preheader, %._crit_edge103.us
  %indvars.iv159 = phi i64 [ 1, %.preheader89.us.preheader ], [ %indvars.iv.next160, %._crit_edge103.us ]
  %indvar = phi i64 [ 0, %.preheader89.us.preheader ], [ %indvar.next, %._crit_edge103.us ]
  %indvar.next = add nuw nsw i64 %indvar, 1
  %19 = icmp ult i64 %indvar.next, %18
  br i1 %19, label %.lr.ph99.us.us, label %.lr.ph102.split.us109.preheader

.lr.ph102.split.us109.preheader:                  ; preds = %.preheader89.us
  %20 = mul nuw nsw i64 %indvar, 200
  %scevgep155 = getelementptr i8, ptr @grid, i64 %20
  %21 = mul nuw nsw i64 %indvar, 40200
  %scevgep = getelementptr i8, ptr @ok1, i64 %21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %scevgep, ptr align 8 %scevgep155, i64 %16, i1 false), !tbaa !9
  br label %._crit_edge103.us

._crit_edge103.us:                                ; preds = %._crit_edge100.us.us, %.lr.ph102.split.us109.preheader
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond176.not = icmp eq i64 %indvar.next, %wide.trip.count175
  br i1 %exitcond176.not, label %.preheader88, label %.preheader89.us, !llvm.loop !11

.lr.ph99.us.us:                                   ; preds = %.preheader89.us, %._crit_edge100.us.us
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %._crit_edge100.us.us ], [ 0, %.preheader89.us ]
  %22 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvar, i64 %indvars.iv169
  %23 = load i8, ptr %22, align 1, !tbaa !9, !range !13, !noundef !14
  %24 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %indvar, i64 %indvar, i64 %indvars.iv169
  store i8 %23, ptr %24, align 1, !tbaa !9
  br label %25

25:                                               ; preds = %25, %.lr.ph99.us.us
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %25 ], [ %indvar, %.lr.ph99.us.us ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %25 ], [ %indvars.iv159, %.lr.ph99.us.us ]
  %26 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %indvar, i64 %indvars.iv163, i64 %indvars.iv169
  %27 = load i8, ptr %26, align 1, !tbaa !9, !range !13, !noundef !14
  %28 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvars.iv161, i64 %indvars.iv169
  %29 = load i8, ptr %28, align 1, !tbaa !9, !range !13, !noundef !14
  %30 = and i8 %29, %27
  %31 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok1, i64 0, i64 %indvar, i64 %indvars.iv161, i64 %indvars.iv169
  store i8 %30, ptr %31, align 1, !tbaa !9
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge100.us.us, label %25, !llvm.loop !15

._crit_edge100.us.us:                             ; preds = %25
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %exitcond173.not = icmp eq i64 %indvars.iv.next170, %16
  br i1 %exitcond173.not, label %._crit_edge103.us, label %.lr.ph99.us.us, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %41
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader91
  %32 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %10, %.preheader91 ]
  %33 = phi i32 [ %42, %._crit_edge.loopexit ], [ %11, %.preheader91 ]
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %34 = sext i32 %32 to i64
  %35 = icmp slt i64 %indvars.iv.next153, %34
  br i1 %35, label %.preheader91, label %.preheader90, !llvm.loop !17

.lr.ph:                                           ; preds = %.preheader91, %41
  %indvars.iv = phi i64 [ %indvars.iv.next, %41 ], [ 0, %.preheader91 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %37 = load i8, ptr %3, align 1, !tbaa !19
  %38 = icmp eq i8 %37, 46
  br i1 %38, label %39, label %41

39:                                               ; preds = %.lr.ph
  %40 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvars.iv, i64 %indvars.iv152
  store i8 1, ptr %40, align 1, !tbaa !9
  br label %41

41:                                               ; preds = %39, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next, %43
  br i1 %44, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !20

.preheader88:                                     ; preds = %._crit_edge103.us, %.preheader90
  %45 = phi i1 [ false, %.preheader90 ], [ %14, %._crit_edge103.us ]
  %46 = icmp sgt i32 %.lcssa92, 0
  br i1 %46, label %.preheader87.lr.ph, label %.preheader86

.preheader87.lr.ph:                               ; preds = %.preheader88
  br i1 %45, label %.preheader87.us.preheader, label %._crit_edge142

.preheader87.us.preheader:                        ; preds = %.preheader87.lr.ph
  %47 = add nsw i32 %.lcssa92, -1
  %48 = zext nneg i32 %.lcssa92 to i64
  %wide.trip.count201 = zext nneg i32 %.lcssa92 to i64
  %wide.trip.count180 = zext i32 %13 to i64
  %wide.trip.count198 = zext nneg i32 %13 to i64
  %wide.trip.count193 = zext i32 %47 to i64
  %min.iters.check = icmp ult i32 %13, 8
  %min.iters.check236 = icmp ult i32 %13, 16
  %n.vec = and i64 %wide.trip.count180, 4294967280
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count180
  %n.vec.remaining = and i64 %wide.trip.count180, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  %n.vec238 = and i64 %wide.trip.count180, 4294967288
  %cmp.n241 = icmp eq i64 %n.vec238, %wide.trip.count180
  br label %.preheader87.us

.preheader87.us:                                  ; preds = %.preheader87.us.preheader, %._crit_edge119.us
  %indvars.iv186 = phi i64 [ 0, %.preheader87.us.preheader ], [ %indvars.iv.next187, %._crit_edge119.us ]
  %indvars.iv182 = phi i64 [ 1, %.preheader87.us.preheader ], [ %indvars.iv.next183, %._crit_edge119.us ]
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %49 = icmp ult i64 %indvars.iv.next187, %48
  br i1 %49, label %.lr.ph115.us.us, label %iter.check

iter.check:                                       ; preds = %.preheader87.us
  br i1 %min.iters.check, label %.lr.ph118.split.us124.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  br i1 %min.iters.check236, label %vec.epilog.ph, label %vector.body

vector.body:                                      ; preds = %vector.main.loop.iter.check, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
  %50 = or disjoint i64 %index, 1
  %51 = or disjoint i64 %index, 2
  %52 = or disjoint i64 %index, 3
  %53 = or disjoint i64 %index, 4
  %54 = or disjoint i64 %index, 5
  %55 = or disjoint i64 %index, 6
  %56 = or disjoint i64 %index, 7
  %57 = or disjoint i64 %index, 8
  %58 = or disjoint i64 %index, 9
  %59 = or disjoint i64 %index, 10
  %60 = or disjoint i64 %index, 11
  %61 = or disjoint i64 %index, 12
  %62 = or disjoint i64 %index, 13
  %63 = or disjoint i64 %index, 14
  %64 = or disjoint i64 %index, 15
  %65 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %index, i64 %indvars.iv186
  %66 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %50, i64 %indvars.iv186
  %67 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %51, i64 %indvars.iv186
  %68 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %52, i64 %indvars.iv186
  %69 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %53, i64 %indvars.iv186
  %70 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %54, i64 %indvars.iv186
  %71 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %55, i64 %indvars.iv186
  %72 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %56, i64 %indvars.iv186
  %73 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %57, i64 %indvars.iv186
  %74 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %58, i64 %indvars.iv186
  %75 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %59, i64 %indvars.iv186
  %76 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %60, i64 %indvars.iv186
  %77 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %61, i64 %indvars.iv186
  %78 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %62, i64 %indvars.iv186
  %79 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %63, i64 %indvars.iv186
  %80 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %64, i64 %indvars.iv186
  %81 = load i8, ptr %65, align 1, !tbaa !9, !range !13, !noundef !14
  %82 = load i8, ptr %66, align 1, !tbaa !9, !range !13, !noundef !14
  %83 = load i8, ptr %67, align 1, !tbaa !9, !range !13, !noundef !14
  %84 = load i8, ptr %68, align 1, !tbaa !9, !range !13, !noundef !14
  %85 = load i8, ptr %69, align 1, !tbaa !9, !range !13, !noundef !14
  %86 = load i8, ptr %70, align 1, !tbaa !9, !range !13, !noundef !14
  %87 = load i8, ptr %71, align 1, !tbaa !9, !range !13, !noundef !14
  %88 = load i8, ptr %72, align 1, !tbaa !9, !range !13, !noundef !14
  %89 = load i8, ptr %73, align 1, !tbaa !9, !range !13, !noundef !14
  %90 = load i8, ptr %74, align 1, !tbaa !9, !range !13, !noundef !14
  %91 = load i8, ptr %75, align 1, !tbaa !9, !range !13, !noundef !14
  %92 = load i8, ptr %76, align 1, !tbaa !9, !range !13, !noundef !14
  %93 = load i8, ptr %77, align 1, !tbaa !9, !range !13, !noundef !14
  %94 = load i8, ptr %78, align 1, !tbaa !9, !range !13, !noundef !14
  %95 = load i8, ptr %79, align 1, !tbaa !9, !range !13, !noundef !14
  %96 = load i8, ptr %80, align 1, !tbaa !9, !range !13, !noundef !14
  %97 = insertelement <16 x i8> poison, i8 %81, i64 0
  %98 = insertelement <16 x i8> %97, i8 %82, i64 1
  %99 = insertelement <16 x i8> %98, i8 %83, i64 2
  %100 = insertelement <16 x i8> %99, i8 %84, i64 3
  %101 = insertelement <16 x i8> %100, i8 %85, i64 4
  %102 = insertelement <16 x i8> %101, i8 %86, i64 5
  %103 = insertelement <16 x i8> %102, i8 %87, i64 6
  %104 = insertelement <16 x i8> %103, i8 %88, i64 7
  %105 = insertelement <16 x i8> %104, i8 %89, i64 8
  %106 = insertelement <16 x i8> %105, i8 %90, i64 9
  %107 = insertelement <16 x i8> %106, i8 %91, i64 10
  %108 = insertelement <16 x i8> %107, i8 %92, i64 11
  %109 = insertelement <16 x i8> %108, i8 %93, i64 12
  %110 = insertelement <16 x i8> %109, i8 %94, i64 13
  %111 = insertelement <16 x i8> %110, i8 %95, i64 14
  %112 = insertelement <16 x i8> %111, i8 %96, i64 15
  %113 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv186, i64 %index
  store <16 x i8> %112, ptr %113, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 16
  %114 = icmp eq i64 %index.next, %n.vec
  br i1 %114, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge119.us, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph118.split.us124.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index239 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next240, %vec.epilog.vector.body ]
  %115 = or disjoint i64 %index239, 1
  %116 = or disjoint i64 %index239, 2
  %117 = or disjoint i64 %index239, 3
  %118 = or disjoint i64 %index239, 4
  %119 = or disjoint i64 %index239, 5
  %120 = or disjoint i64 %index239, 6
  %121 = or disjoint i64 %index239, 7
  %122 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %index239, i64 %indvars.iv186
  %123 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %115, i64 %indvars.iv186
  %124 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %116, i64 %indvars.iv186
  %125 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %117, i64 %indvars.iv186
  %126 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %118, i64 %indvars.iv186
  %127 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %119, i64 %indvars.iv186
  %128 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %120, i64 %indvars.iv186
  %129 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %121, i64 %indvars.iv186
  %130 = load i8, ptr %122, align 1, !tbaa !9, !range !13, !noundef !14
  %131 = load i8, ptr %123, align 1, !tbaa !9, !range !13, !noundef !14
  %132 = load i8, ptr %124, align 1, !tbaa !9, !range !13, !noundef !14
  %133 = load i8, ptr %125, align 1, !tbaa !9, !range !13, !noundef !14
  %134 = load i8, ptr %126, align 1, !tbaa !9, !range !13, !noundef !14
  %135 = load i8, ptr %127, align 1, !tbaa !9, !range !13, !noundef !14
  %136 = load i8, ptr %128, align 1, !tbaa !9, !range !13, !noundef !14
  %137 = load i8, ptr %129, align 1, !tbaa !9, !range !13, !noundef !14
  %138 = insertelement <8 x i8> poison, i8 %130, i64 0
  %139 = insertelement <8 x i8> %138, i8 %131, i64 1
  %140 = insertelement <8 x i8> %139, i8 %132, i64 2
  %141 = insertelement <8 x i8> %140, i8 %133, i64 3
  %142 = insertelement <8 x i8> %141, i8 %134, i64 4
  %143 = insertelement <8 x i8> %142, i8 %135, i64 5
  %144 = insertelement <8 x i8> %143, i8 %136, i64 6
  %145 = insertelement <8 x i8> %144, i8 %137, i64 7
  %146 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv186, i64 %index239
  store <8 x i8> %145, ptr %146, align 8, !tbaa !9
  %index.next240 = add nuw i64 %index239, 8
  %147 = icmp eq i64 %index.next240, %n.vec238
  br i1 %147, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !24

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  br i1 %cmp.n241, label %._crit_edge119.us, label %.lr.ph118.split.us124.preheader

.lr.ph118.split.us124.preheader:                  ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv177.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec238, %vec.epilog.middle.block ]
  br label %.lr.ph118.split.us124

.lr.ph118.split.us124:                            ; preds = %.lr.ph118.split.us124.preheader, %.lr.ph118.split.us124
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %.lr.ph118.split.us124 ], [ %indvars.iv177.ph, %.lr.ph118.split.us124.preheader ]
  %148 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvars.iv177, i64 %indvars.iv186
  %149 = load i8, ptr %148, align 1, !tbaa !9, !range !13, !noundef !14
  %150 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv186, i64 %indvars.iv177
  store i8 %149, ptr %150, align 1, !tbaa !9
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %exitcond181.not = icmp eq i64 %indvars.iv.next178, %wide.trip.count180
  br i1 %exitcond181.not, label %._crit_edge119.us, label %.lr.ph118.split.us124, !llvm.loop !25

._crit_edge119.us:                                ; preds = %.lr.ph118.split.us124, %._crit_edge116.us.us, %middle.block, %vec.epilog.middle.block
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %exitcond202.not = icmp eq i64 %indvars.iv.next187, %wide.trip.count201
  br i1 %exitcond202.not, label %.preheader86, label %.preheader87.us, !llvm.loop !26

.lr.ph115.us.us:                                  ; preds = %.preheader87.us, %._crit_edge116.us.us
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %._crit_edge116.us.us ], [ 0, %.preheader87.us ]
  %151 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvars.iv195, i64 %indvars.iv186
  %152 = load i8, ptr %151, align 1, !tbaa !9, !range !13, !noundef !14
  %153 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv186, i64 %indvars.iv195
  store i8 %152, ptr %153, align 1, !tbaa !9
  br label %154

154:                                              ; preds = %154, %.lr.ph115.us.us
  %indvars.iv188 = phi i64 [ %indvars.iv.next189, %154 ], [ %indvars.iv186, %.lr.ph115.us.us ]
  %indvars.iv184 = phi i64 [ %indvars.iv.next185, %154 ], [ %indvars.iv182, %.lr.ph115.us.us ]
  %155 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv188, i64 %indvars.iv195
  %156 = load i8, ptr %155, align 1, !tbaa !9, !range !13, !noundef !14
  %157 = getelementptr inbounds [200 x [200 x i8]], ptr @grid, i64 0, i64 %indvars.iv195, i64 %indvars.iv184
  %158 = load i8, ptr %157, align 1, !tbaa !9, !range !13, !noundef !14
  %159 = and i8 %158, %156
  %160 = getelementptr inbounds [200 x [200 x [200 x i8]]], ptr @ok2, i64 0, i64 %indvars.iv186, i64 %indvars.iv184, i64 %indvars.iv195
  store i8 %159, ptr %160, align 1, !tbaa !9
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %exitcond194.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count193
  br i1 %exitcond194.not, label %._crit_edge116.us.us, label %154, !llvm.loop !27

._crit_edge116.us.us:                             ; preds = %154
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %exitcond199.not = icmp eq i64 %indvars.iv.next196, %wide.trip.count198
  br i1 %exitcond199.not, label %._crit_edge119.us, label %.lr.ph115.us.us, !llvm.loop !28

.preheader86:                                     ; preds = %._crit_edge119.us, %.preheader88
  br i1 %45, label %.preheader85.preheader, label %._crit_edge142

.preheader85.preheader:                           ; preds = %.preheader89.lr.ph, %.preheader86
  br label %.preheader85

.preheader85:                                     ; preds = %.preheader85.preheader, %._crit_edge136
  %161 = phi i32 [ %174, %._crit_edge136 ], [ %13, %.preheader85.preheader ]
  %162 = phi i32 [ %175, %._crit_edge136 ], [ %.lcssa92, %.preheader85.preheader ]
  %163 = phi i32 [ %176, %._crit_edge136 ], [ %.lcssa92, %.preheader85.preheader ]
  %164 = phi i32 [ %177, %._crit_edge136 ], [ %.lcssa92, %.preheader85.preheader ]
  %.073140 = phi i32 [ %178, %._crit_edge136 ], [ 0, %.preheader85.preheader ]
  %.082139 = phi i32 [ %.1.lcssa, %._crit_edge136 ], [ 0, %.preheader85.preheader ]
  %165 = icmp slt i32 %.073140, %161
  %166 = icmp sgt i32 %164, 0
  %or.cond = select i1 %165, i1 %166, i1 false
  br i1 %or.cond, label %.preheader84, label %._crit_edge136

._crit_edge142:                                   ; preds = %._crit_edge136, %.preheader91.lr.ph, %.preheader87.lr.ph, %.preheader86
  %.082.lcssa = phi i32 [ 0, %.preheader86 ], [ 0, %.preheader87.lr.ph ], [ 0, %.preheader91.lr.ph ], [ %.1.lcssa, %._crit_edge136 ]
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @cout, i32 noundef %.082.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.preheader84:                                     ; preds = %.preheader85, %._crit_edge132
  %168 = phi i32 [ %183, %._crit_edge132 ], [ %161, %.preheader85 ]
  %169 = phi i32 [ %184, %._crit_edge132 ], [ %161, %.preheader85 ]
  %170 = phi i32 [ %185, %._crit_edge132 ], [ %162, %.preheader85 ]
  %171 = phi i32 [ %186, %._crit_edge132 ], [ %163, %.preheader85 ]
  %.072135 = phi i32 [ %187, %._crit_edge132 ], [ %.073140, %.preheader85 ]
  %.1134 = phi i32 [ %.2.lcssa, %._crit_edge132 ], [ %.082139, %.preheader85 ]
  %172 = icmp sgt i32 %171, 0
  br i1 %172, label %.preheader.lr.ph, label %._crit_edge132

.preheader.lr.ph:                                 ; preds = %.preheader84
  %reass.sub = sub nuw nsw i32 %.072135, %.073140
  %173 = add nuw nsw i32 %reass.sub, 1
  br label %.preheader

._crit_edge136:                                   ; preds = %._crit_edge132, %.preheader85
  %174 = phi i32 [ %161, %.preheader85 ], [ %183, %._crit_edge132 ]
  %175 = phi i32 [ %162, %.preheader85 ], [ %185, %._crit_edge132 ]
  %176 = phi i32 [ %163, %.preheader85 ], [ %186, %._crit_edge132 ]
  %177 = phi i32 [ %164, %.preheader85 ], [ %186, %._crit_edge132 ]
  %.1.lcssa = phi i32 [ %.082139, %.preheader85 ], [ %.2.lcssa, %._crit_edge132 ]
  %178 = add nuw nsw i32 %.073140, 1
  %179 = icmp slt i32 %178, %174
  br i1 %179, label %.preheader85, label %._crit_edge142, !llvm.loop !29

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge128
  %180 = phi i32 [ %170, %.preheader.lr.ph ], [ %189, %._crit_edge128 ]
  %181 = phi i32 [ %171, %.preheader.lr.ph ], [ %189, %._crit_edge128 ]
  %.071131 = phi i32 [ 0, %.preheader.lr.ph ], [ %190, %._crit_edge128 ]
  %.2130 = phi i32 [ %.1134, %.preheader.lr.ph ], [ %.3.lcssa, %._crit_edge128 ]
  %182 = icmp slt i32 %.071131, %181
  br i1 %182, label %.lr.ph127, label %._crit_edge128

._crit_edge132.loopexit:                          ; preds = %._crit_edge128
  %.pre205 = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge132

._crit_edge132:                                   ; preds = %._crit_edge132.loopexit, %.preheader84
  %183 = phi i32 [ %168, %.preheader84 ], [ %.pre205, %._crit_edge132.loopexit ]
  %184 = phi i32 [ %169, %.preheader84 ], [ %.pre205, %._crit_edge132.loopexit ]
  %185 = phi i32 [ %170, %.preheader84 ], [ %189, %._crit_edge132.loopexit ]
  %186 = phi i32 [ %171, %.preheader84 ], [ %189, %._crit_edge132.loopexit ]
  %.2.lcssa = phi i32 [ %.1134, %.preheader84 ], [ %.3.lcssa, %._crit_edge132.loopexit ]
  %187 = add nuw nsw i32 %.072135, 1
  %188 = icmp slt i32 %187, %184
  br i1 %188, label %.preheader84, label %._crit_edge136, !llvm.loop !30

._crit_edge128:                                   ; preds = %199, %.preheader
  %189 = phi i32 [ %180, %.preheader ], [ %200, %199 ]
  %.3.lcssa = phi i32 [ %.2130, %.preheader ], [ %.4, %199 ]
  %190 = add nuw nsw i32 %.071131, 1
  %191 = icmp slt i32 %190, %189
  br i1 %191, label %.preheader, label %._crit_edge132.loopexit, !llvm.loop !31

.lr.ph127:                                        ; preds = %.preheader, %199
  %192 = phi i32 [ %200, %199 ], [ %180, %.preheader ]
  %193 = phi i32 [ %201, %199 ], [ %181, %.preheader ]
  %.0126 = phi i32 [ %202, %199 ], [ %.071131, %.preheader ]
  %.3125 = phi i32 [ %.4, %199 ], [ %.2130, %.preheader ]
  %reass.sub144 = sub nuw nsw i32 %.0126, %.071131
  %194 = add nuw nsw i32 %reass.sub144, 1
  %195 = mul nuw nsw i32 %194, %173
  %196 = icmp sgt i32 %195, %.3125
  br i1 %196, label %197, label %199

197:                                              ; preds = %.lr.ph127
  %198 = call noundef zeroext i1 @_Z4testiiii(i32 noundef %.073140, i32 noundef %.072135, i32 noundef %.071131, i32 noundef %.0126)
  %spec.select = select i1 %198, i32 %195, i32 %.3125
  %.pre204 = load i32, ptr %1, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %197, %.lr.ph127
  %200 = phi i32 [ %192, %.lr.ph127 ], [ %.pre204, %197 ]
  %201 = phi i32 [ %193, %.lr.ph127 ], [ %.pre204, %197 ]
  %.4 = phi i32 [ %.3125, %.lr.ph127 ], [ %spec.select, %197 ]
  %202 = add nuw nsw i32 %.0126, 1
  %203 = icmp slt i32 %202, %201
  br i1 %203, label %.lr.ph127, label %._crit_edge128, !llvm.loop !32
}

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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


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