; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1344F)

; 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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }
%class.anon = type { i8 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ4mainE3rep = external hidden global [2001 x i32], align 16
@_ZZ4mainE3mat = external hidden global [2001 x %"class.std::bitset"], align 16
@_ZZ4mainE2op = external hidden global [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZZ4mainE3buf = external hidden global [2001 x i8], align 16

; 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 ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.anon, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %412, %0
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr @.str.1, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 9, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 6, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 13, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 11, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = shl i32 %42, 1
  store i32 %43, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %53, %40
  %45 = load i32, ptr %15, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

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

49:                                               ; preds = %44
  %50 = load i32, ptr %15, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %51
  store i32 9, ptr %52, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %49
  %54 = load i32, ptr %15, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %15, align 4, !tbaa !5
  br label %44, !llvm.loop !11

56:                                               ; preds = %48
  br label %57

57:                                               ; preds = %204, %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %6, align 4, !tbaa !5
  %60 = icmp ne i32 %58, 0
  br i1 %60, label %61, label %205

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @_ZZ4mainE2op)
  %63 = load i8, ptr @_ZZ4mainE2op, align 1, !tbaa !13
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 109
  br i1 %65, label %66, label %172

66:                                               ; preds = %61
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %68
  %70 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %69) #6
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %73
  %75 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %74) #6
  %76 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %16)
  br label %77

77:                                               ; preds = %121, %66
  %78 = load i32, ptr %16, align 4, !tbaa !5
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr %16, align 4, !tbaa !5
  %80 = icmp ne i32 %78, 0
  br i1 %80, label %81, label %122

81:                                               ; preds = %77
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %17)
  %83 = load i32, ptr %17, align 4, !tbaa !5
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %85 = load i32, ptr %17, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr %19, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %116, %81
  %90 = load i32, ptr %18, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 4
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 12, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %121

93:                                               ; preds = %89
  %94 = load i32, ptr %19, align 4, !tbaa !5
  %95 = and i32 %94, 1
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %115

97:                                               ; preds = %93
  %98 = load i32, ptr %13, align 4, !tbaa !5
  %99 = load i32, ptr %18, align 4, !tbaa !5
  %100 = and i32 %99, 2
  %101 = icmp ne i32 %100, 0
  %102 = xor i1 %101, true
  %103 = xor i1 %102, true
  %104 = zext i1 %103 to i32
  %105 = add nsw i32 %98, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %106
  %108 = load i32, ptr %17, align 4, !tbaa !5
  %109 = shl i32 %108, 1
  %110 = load i32, ptr %18, align 4, !tbaa !5
  %111 = and i32 %110, 1
  %112 = or i32 %109, %111
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %107, i64 noundef %113)
  br label %115

115:                                              ; preds = %97, %93
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %18, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %18, align 4, !tbaa !5
  %119 = load i32, ptr %19, align 4, !tbaa !5
  %120 = ashr i32 %119, 1
  store i32 %120, ptr %19, align 4, !tbaa !5
  br label %89, !llvm.loop !14

121:                                              ; preds = %92
  br label %77, !llvm.loop !15

122:                                              ; preds = %77
  %123 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @_ZZ4mainE2op)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %141, %122
  %125 = load i32, ptr %21, align 4, !tbaa !5
  %126 = icmp slt i32 %125, 4
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store i32 15, ptr %4, align 4
  br label %144

128:                                              ; preds = %124
  %129 = load ptr, ptr %7, align 8, !tbaa !9
  %130 = load i32, ptr %21, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %129, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !13
  %134 = sext i8 %133 to i32
  %135 = load i8, ptr @_ZZ4mainE2op, align 1, !tbaa !13
  %136 = sext i8 %135 to i32
  %137 = icmp eq i32 %134, %136
  br i1 %137, label %138, label %140

138:                                              ; preds = %128
  %139 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %139, ptr %20, align 4, !tbaa !5
  store i32 15, ptr %4, align 4
  br label %144

140:                                              ; preds = %128
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %21, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %21, align 4, !tbaa !5
  br label %124, !llvm.loop !16

144:                                              ; preds = %138, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %145

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

146:                                              ; preds = %164, %145
  %147 = load i32, ptr %22, align 4, !tbaa !5
  %148 = icmp slt i32 %147, 2
  br i1 %148, label %150, label %149

149:                                              ; preds = %146
  store i32 18, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %169

150:                                              ; preds = %146
  %151 = load i32, ptr %20, align 4, !tbaa !5
  %152 = and i32 %151, 1
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %163

154:                                              ; preds = %150
  %155 = load i32, ptr %13, align 4, !tbaa !5
  %156 = load i32, ptr %22, align 4, !tbaa !5
  %157 = add nsw i32 %155, %156
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %158
  %160 = load i32, ptr %14, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %159, i64 noundef %161)
  br label %163

163:                                              ; preds = %154, %150
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %22, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %22, align 4, !tbaa !5
  %167 = load i32, ptr %20, align 4, !tbaa !5
  %168 = ashr i32 %167, 1
  store i32 %168, ptr %20, align 4, !tbaa !5
  br label %146, !llvm.loop !17

169:                                              ; preds = %149
  %170 = load i32, ptr %13, align 4, !tbaa !5
  %171 = add nsw i32 %170, 2
  store i32 %171, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %204

172:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %173 = load i8, ptr @_ZZ4mainE2op, align 1, !tbaa !13
  %174 = sext i8 %173 to i32
  %175 = icmp eq i32 %174, 82
  br i1 %175, label %176, label %182

176:                                              ; preds = %172
  %177 = load i8, ptr getelementptr inbounds ([5 x i8], ptr @_ZZ4mainE2op, i64 0, i64 1), align 1, !tbaa !13
  %178 = sext i8 %177 to i32
  %179 = icmp eq i32 %178, 89
  %180 = zext i1 %179 to i64
  %181 = select i1 %179, i32 6, i32 13
  br label %183

182:                                              ; preds = %172
  br label %183

183:                                              ; preds = %182, %176
  %184 = phi i32 [ %181, %176 ], [ 11, %182 ]
  store i32 %184, ptr %23, align 4, !tbaa !5
  %185 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %16)
  br label %186

186:                                              ; preds = %190, %183
  %187 = load i32, ptr %16, align 4, !tbaa !5
  %188 = add nsw i32 %187, -1
  store i32 %188, ptr %16, align 4, !tbaa !5
  %189 = icmp ne i32 %187, 0
  br i1 %189, label %190, label %203

190:                                              ; preds = %186
  %191 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %17)
  %192 = load i32, ptr %17, align 4, !tbaa !5
  %193 = add nsw i32 %192, -1
  store i32 %193, ptr %17, align 4, !tbaa !5
  %194 = load i32, ptr %23, align 4, !tbaa !5
  %195 = load i32, ptr %17, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = call noundef i32 @"_ZZ4mainENK3$_0clEii"(ptr noundef nonnull align 1 dereferenceable(1) %12, i32 noundef %194, i32 noundef %198)
  %200 = load i32, ptr %17, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %201
  store i32 %199, ptr %202, align 4, !tbaa !5
  br label %186, !llvm.loop !18

203:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %204

204:                                              ; preds = %203, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %57, !llvm.loop !19

205:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %277, %205
  %207 = load i32, ptr %25, align 4, !tbaa !5
  %208 = load i32, ptr %14, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %280

211:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 -1, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %212 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %212, ptr %27, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %228, %211
  %214 = load i32, ptr %27, align 4, !tbaa !5
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = icmp slt i32 %214, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  store i32 26, ptr %4, align 4
  br label %231

218:                                              ; preds = %213
  %219 = load i32, ptr %27, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %220
  %222 = load i32, ptr %25, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %221, i64 noundef %223)
  br i1 %224, label %225, label %227

225:                                              ; preds = %218
  %226 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %226, ptr %26, align 4, !tbaa !5
  store i32 26, ptr %4, align 4
  br label %231

227:                                              ; preds = %218
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %27, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %27, align 4, !tbaa !5
  br label %213, !llvm.loop !20

231:                                              ; preds = %225, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %26, align 4, !tbaa !5
  %234 = icmp eq i32 %233, -1
  br i1 %234, label %235, label %236

235:                                              ; preds = %232
  store i32 25, ptr %4, align 4
  br label %274

236:                                              ; preds = %232
  %237 = load i32, ptr %24, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %238
  %240 = load i32, ptr %26, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %241
  call void @_ZSt4swapISt6bitsetILm2001EEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(256) %239, ptr noundef nonnull align 8 dereferenceable(256) %242) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %268, %236
  %244 = load i32, ptr %28, align 4, !tbaa !5
  %245 = load i32, ptr %13, align 4, !tbaa !5
  %246 = icmp slt i32 %244, %245
  br i1 %246, label %248, label %247

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

248:                                              ; preds = %243
  %249 = load i32, ptr %28, align 4, !tbaa !5
  %250 = load i32, ptr %24, align 4, !tbaa !5
  %251 = icmp ne i32 %249, %250
  br i1 %251, label %252, label %267

252:                                              ; preds = %248
  %253 = load i32, ptr %28, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %254
  %256 = load i32, ptr %25, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %255, i64 noundef %257)
  br i1 %258, label %259, label %267

259:                                              ; preds = %252
  %260 = load i32, ptr %24, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %261
  %263 = load i32, ptr %28, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %264
  %266 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EEeOERKS0_(ptr noundef nonnull align 8 dereferenceable(256) %265, ptr noundef nonnull align 8 dereferenceable(256) %262) #6
  br label %267

267:                                              ; preds = %259, %252, %248
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %28, align 4, !tbaa !5
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %28, align 4, !tbaa !5
  br label %243, !llvm.loop !21

271:                                              ; preds = %247
  %272 = load i32, ptr %24, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %24, align 4, !tbaa !5
  store i32 0, ptr %4, align 4
  br label %274

274:                                              ; preds = %271, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  %275 = load i32, ptr %4, align 4
  switch i32 %275, label %417 [
    i32 0, label %276
    i32 25, label %277
  ]

276:                                              ; preds = %274
  br label %277

277:                                              ; preds = %276, %274
  %278 = load i32, ptr %25, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %25, align 4, !tbaa !5
  br label %206, !llvm.loop !22

280:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #6
  store i8 1, ptr %29, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %281 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %281, ptr %30, align 4, !tbaa !5
  br label %282

282:                                              ; preds = %307, %280
  %283 = load i8, ptr %29, align 1, !tbaa !23, !range !25, !noundef !26
  %284 = trunc i8 %283 to i1
  br i1 %284, label %285, label %289

285:                                              ; preds = %282
  %286 = load i32, ptr %30, align 4, !tbaa !5
  %287 = load i32, ptr %13, align 4, !tbaa !5
  %288 = icmp slt i32 %286, %287
  br label %289

289:                                              ; preds = %285, %282
  %290 = phi i1 [ false, %282 ], [ %288, %285 ]
  br i1 %290, label %292, label %291

291:                                              ; preds = %289
  store i32 32, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %310

292:                                              ; preds = %289
  %293 = load i32, ptr %30, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %294
  %296 = load i32, ptr %14, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %295, i64 noundef %297)
  %299 = xor i1 %298, true
  %300 = zext i1 %299 to i32
  %301 = load i8, ptr %29, align 1, !tbaa !23, !range !25, !noundef !26
  %302 = trunc i8 %301 to i1
  %303 = zext i1 %302 to i32
  %304 = and i32 %303, %300
  %305 = icmp ne i32 %304, 0
  %306 = zext i1 %305 to i8
  store i8 %306, ptr %29, align 1, !tbaa !23
  br label %307

307:                                              ; preds = %292
  %308 = load i32, ptr %30, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %30, align 4, !tbaa !5
  br label %282, !llvm.loop !27

310:                                              ; preds = %291
  %311 = load i8, ptr %29, align 1, !tbaa !23, !range !25, !noundef !26
  %312 = trunc i8 %311 to i1
  br i1 %312, label %315, label %313

313:                                              ; preds = %310
  %314 = call i32 @puts(ptr noundef @.str.4)
  br label %411

315:                                              ; preds = %310
  %316 = call i32 @puts(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %317

317:                                              ; preds = %326, %315
  %318 = load i32, ptr %31, align 4, !tbaa !5
  %319 = load i32, ptr %5, align 4, !tbaa !5
  %320 = icmp slt i32 %318, %319
  br i1 %320, label %322, label %321

321:                                              ; preds = %317
  store i32 35, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %329

322:                                              ; preds = %317
  %323 = load i32, ptr %31, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %324
  store i32 0, ptr %325, align 4, !tbaa !5
  br label %326

326:                                              ; preds = %322
  %327 = load i32, ptr %31, align 4, !tbaa !5
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %31, align 4, !tbaa !5
  br label %317, !llvm.loop !28

329:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %330

330:                                              ; preds = %373, %329
  %331 = load i32, ptr %32, align 4, !tbaa !5
  %332 = load i32, ptr %24, align 4, !tbaa !5
  %333 = icmp slt i32 %331, %332
  br i1 %333, label %335, label %334

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

335:                                              ; preds = %330
  %336 = load i32, ptr %32, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %337
  %339 = load i32, ptr %14, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %338, i64 noundef %340)
  br i1 %341, label %343, label %342

342:                                              ; preds = %335
  br label %373

343:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %344 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %344, ptr %33, align 4, !tbaa !5
  br label %345

345:                                              ; preds = %368, %343
  %346 = load i32, ptr %33, align 4, !tbaa !5
  %347 = load i32, ptr %14, align 4, !tbaa !5
  %348 = icmp slt i32 %346, %347
  br i1 %348, label %350, label %349

349:                                              ; preds = %345
  store i32 41, ptr %4, align 4
  br label %371

350:                                              ; preds = %345
  %351 = load i32, ptr %32, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %352
  %354 = load i32, ptr %33, align 4, !tbaa !5
  %355 = sext i32 %354 to i64
  %356 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %353, i64 noundef %355)
  br i1 %356, label %357, label %367

357:                                              ; preds = %350
  %358 = load i32, ptr %33, align 4, !tbaa !5
  %359 = and i32 %358, 1
  %360 = shl i32 1, %359
  %361 = load i32, ptr %33, align 4, !tbaa !5
  %362 = ashr i32 %361, 1
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %363
  %365 = load i32, ptr %364, align 4, !tbaa !5
  %366 = or i32 %365, %360
  store i32 %366, ptr %364, align 4, !tbaa !5
  store i32 41, ptr %4, align 4
  br label %371

367:                                              ; preds = %350
  br label %368

368:                                              ; preds = %367
  %369 = load i32, ptr %33, align 4, !tbaa !5
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %33, align 4, !tbaa !5
  br label %345, !llvm.loop !29

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

372:                                              ; preds = %371
  br label %373

373:                                              ; preds = %372, %342
  %374 = load i32, ptr %32, align 4, !tbaa !5
  %375 = add nsw i32 %374, 1
  store i32 %375, ptr %32, align 4, !tbaa !5
  br label %330, !llvm.loop !30

376:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %377

377:                                              ; preds = %403, %376
  %378 = load i32, ptr %34, align 4, !tbaa !5
  %379 = load i32, ptr %5, align 4, !tbaa !5
  %380 = icmp slt i32 %378, %379
  br i1 %380, label %382, label %381

381:                                              ; preds = %377
  store i32 44, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %406

382:                                              ; preds = %377
  %383 = load i32, ptr %34, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %384
  %386 = load i32, ptr %385, align 4, !tbaa !5
  %387 = icmp ne i32 %386, 0
  br i1 %387, label %388, label %397

388:                                              ; preds = %382
  %389 = load ptr, ptr %7, align 8, !tbaa !9
  %390 = load i32, ptr %34, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %391
  %393 = load i32, ptr %392, align 4, !tbaa !5
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds i8, ptr %389, i64 %394
  %396 = load i8, ptr %395, align 1, !tbaa !13
  br label %398

397:                                              ; preds = %382
  br label %398

398:                                              ; preds = %397, %388
  %399 = phi i8 [ %396, %388 ], [ 46, %397 ]
  %400 = load i32, ptr %34, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %401
  store i8 %399, ptr %402, align 1, !tbaa !13
  br label %403

403:                                              ; preds = %398
  %404 = load i32, ptr %34, align 4, !tbaa !5
  %405 = add nsw i32 %404, 1
  store i32 %405, ptr %34, align 4, !tbaa !5
  br label %377, !llvm.loop !31

406:                                              ; preds = %381
  %407 = load i32, ptr %5, align 4, !tbaa !5
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %408
  store i8 0, ptr %409, align 1, !tbaa !13
  %410 = call i32 @puts(ptr noundef @_ZZ4mainE3buf)
  br label %411

411:                                              ; preds = %406, %313
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %412

412:                                              ; preds = %411
  %413 = load i32, ptr %3, align 4, !tbaa !5
  %414 = add nsw i32 %413, 1
  store i32 %414, ptr %3, align 4, !tbaa !5
  br label %35, !llvm.loop !32

415:                                              ; preds = %39
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %416 = load i32, ptr %1, align 4
  ret i32 %416

417:                                              ; preds = %274
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZ4mainENK3$_0clEii"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapISt6bitsetILm2001EEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EEeOERKS0_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

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

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

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


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

%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }
%class.anon = type { i8 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ4mainE3rep = external hidden local_unnamed_addr global [2001 x i32], align 16
@_ZZ4mainE3mat = external hidden global [2001 x %"class.std::bitset"], align 16
@_ZZ4mainE2op = external hidden global [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZZ4mainE3buf = external hidden global [2001 x i8], align 16

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %class.anon, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = shl i32 %7, 1
  %9 = icmp sgt i32 %7, 0
  br i1 %9, label %.lr.ph.preheader, label %.preheader121

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = zext nneg i32 %7 to i64
  %min.iters.check = icmp ult i32 %7, 8
  br i1 %min.iters.check, label %.lr.ph.preheader239, label %vector.ph

.lr.ph.preheader239:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %10 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %index
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %10, align 16, !tbaa !5
  store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %11, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %12 = icmp eq i64 %index.next, %n.vec
  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader121, label %.lr.ph.preheader239

.preheader121:                                    ; preds = %.lr.ph, %middle.block, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %2, align 4, !tbaa !5
  %.not135 = icmp eq i32 %13, 0
  br i1 %.not135, label %.preheader120, label %.lr.ph138

.lr.ph138:                                        ; preds = %.preheader121
  %15 = sext i32 %8 to i64
  %16 = load i8, ptr @.str.1, align 1
  %17 = load i8, ptr getelementptr inbounds (i8, ptr @.str.1, i64 1), align 1
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @.str.1, i64 2), align 1
  %19 = load i8, ptr getelementptr inbounds (i8, ptr @.str.1, i64 3), align 1
  br label %23

.lr.ph:                                           ; preds = %.lr.ph.preheader239, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader239 ]
  %20 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %indvars.iv
  store i32 9, ptr %20, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader121, label %.lr.ph, !llvm.loop !13

.preheader120:                                    ; preds = %.loopexit116, %.preheader121
  %.0101.lcssa = phi i32 [ 0, %.preheader121 ], [ %.1102, %.loopexit116 ]
  %21 = icmp sgt i32 %8, 0
  br i1 %21, label %.preheader115.lr.ph, label %.preheader119

.preheader115.lr.ph:                              ; preds = %.preheader120
  %22 = icmp sgt i32 %.0101.lcssa, 0
  %wide.trip.count193 = zext nneg i32 %8 to i64
  %wide.trip.count188 = zext nneg i32 %.0101.lcssa to i64
  br label %.preheader115

23:                                               ; preds = %.lr.ph138, %.loopexit116
  %.196137 = phi i32 [ undef, %.lr.ph138 ], [ %.4, %.loopexit116 ]
  %.0101136 = phi i32 [ 0, %.lr.ph138 ], [ %.1102, %.loopexit116 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @_ZZ4mainE2op)
  %25 = load i8, ptr @_ZZ4mainE2op, align 1, !tbaa !14
  switch i8 %25, label %95 [
    i8 109, label %26
    i8 82, label %91
  ]

26:                                               ; preds = %23
  %27 = sext i32 %.0101136 to i64
  %28 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %28) #7
  %30 = add nsw i32 %.0101136, 1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %31
  %33 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %32) #7
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %4)
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, -1
  store i32 %36, ptr %4, align 4, !tbaa !5
  %.not110127 = icmp eq i32 %35, 0
  br i1 %.not110127, label %._crit_edge, label %.lr.ph128

.lr.ph128:                                        ; preds = %26, %.loopexit
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %5)
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = and i32 %42, 1
  %.not112 = icmp eq i32 %43, 0
  br i1 %.not112, label %48, label %44

44:                                               ; preds = %.lr.ph128
  %45 = shl i32 %39, 1
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %28, i64 noundef %46)
  br label %48

48:                                               ; preds = %.lr.ph128, %44
  %49 = and i32 %42, 2
  %.not112.1 = icmp eq i32 %49, 0
  br i1 %.not112.1, label %56, label %50

50:                                               ; preds = %48
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = shl i32 %51, 1
  %53 = or disjoint i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %28, i64 noundef %54)
  br label %56

56:                                               ; preds = %50, %48
  %57 = and i32 %42, 4
  %.not112.2 = icmp eq i32 %57, 0
  br i1 %.not112.2, label %63, label %58

58:                                               ; preds = %56
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = shl i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %32, i64 noundef %61)
  br label %63

63:                                               ; preds = %58, %56
  %64 = and i32 %42, 8
  %.not112.3 = icmp eq i32 %64, 0
  br i1 %.not112.3, label %.loopexit, label %65

65:                                               ; preds = %63
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = shl i32 %66, 1
  %68 = or disjoint i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %32, i64 noundef %69)
  br label %.loopexit

.loopexit:                                        ; preds = %65, %63
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %4, align 4, !tbaa !5
  %.not110 = icmp eq i32 %71, 0
  br i1 %.not110, label %._crit_edge, label %.lr.ph128, !llvm.loop !15

._crit_edge:                                      ; preds = %.loopexit, %26
  %73 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @_ZZ4mainE2op)
  %74 = load i8, ptr @_ZZ4mainE2op, align 1, !tbaa !14
  %75 = icmp eq i8 %16, %74
  br i1 %75, label %.thread216.thread, label %76

76:                                               ; preds = %._crit_edge
  %77 = icmp eq i8 %17, %74
  br i1 %77, label %.thread222, label %78

78:                                               ; preds = %76
  %79 = icmp eq i8 %18, %74
  br i1 %79, label %.thread216.thread229, label %80

80:                                               ; preds = %78
  %81 = icmp eq i8 %19, %74
  br i1 %81, label %.thread222, label %82

82:                                               ; preds = %80
  %83 = and i32 %.196137, 1
  %.not111 = icmp eq i32 %83, 0
  br i1 %.not111, label %.thread216, label %.thread222

.thread222:                                       ; preds = %80, %76, %82
  %.2225 = phi i32 [ %.196137, %82 ], [ 3, %80 ], [ 1, %76 ]
  %84 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %28, i64 noundef %15)
  br label %.thread216

.thread216:                                       ; preds = %82, %.thread222
  %.2219 = phi i32 [ %.196137, %82 ], [ %.2225, %.thread222 ]
  %85 = and i32 %.2219, 2
  %.not111.1 = icmp eq i32 %85, 0
  br i1 %.not111.1, label %.thread216.thread, label %.thread216.thread229

.thread216.thread229:                             ; preds = %78, %.thread216
  %.2219232 = phi i32 [ %.2219, %.thread216 ], [ 2, %78 ]
  %86 = add nsw i64 %27, 1
  %87 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %86
  %88 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256) %87, i64 noundef %15)
  br label %.thread216.thread

.thread216.thread:                                ; preds = %._crit_edge, %.thread216.thread229, %.thread216
  %.2219228 = phi i32 [ %.2219232, %.thread216.thread229 ], [ %.2219, %.thread216 ], [ 0, %._crit_edge ]
  %89 = ashr i32 %.2219228, 2
  %90 = add nsw i32 %.0101136, 2
  br label %.loopexit116

91:                                               ; preds = %23
  %92 = load i8, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE2op, i64 1), align 1, !tbaa !14
  %93 = icmp eq i8 %92, 89
  %94 = select i1 %93, i32 6, i32 13
  br label %95

95:                                               ; preds = %23, %91
  %96 = phi i32 [ %94, %91 ], [ 11, %23 ]
  %97 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %4)
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %4, align 4, !tbaa !5
  %.not109132 = icmp eq i32 %98, 0
  br i1 %.not109132, label %.loopexit116, label %.lr.ph134

.lr.ph134:                                        ; preds = %95, %.lr.ph134
  %100 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %5)
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = call noundef i32 @"_ZZ4mainENK3$_0clEii"(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %96, i32 noundef %105)
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %4, align 4, !tbaa !5
  %.not109 = icmp eq i32 %110, 0
  br i1 %.not109, label %.loopexit116, label %.lr.ph134, !llvm.loop !16

.loopexit116:                                     ; preds = %.lr.ph134, %95, %.thread216.thread
  %.1102 = phi i32 [ %90, %.thread216.thread ], [ %.0101136, %95 ], [ %.0101136, %.lr.ph134 ]
  %.4 = phi i32 [ %89, %.thread216.thread ], [ %.196137, %95 ], [ %.196137, %.lr.ph134 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %112, 0
  br i1 %.not, label %.preheader120, label %23, !llvm.loop !17

.preheader119:                                    ; preds = %.thread, %.preheader120
  %.092.lcssa = phi i32 [ 0, %.preheader120 ], [ %.1, %.thread ]
  %114 = icmp slt i32 %.092.lcssa, %.0101.lcssa
  br i1 %114, label %.lr.ph151, label %.critedge

.lr.ph151:                                        ; preds = %.preheader119
  %115 = sext i32 %8 to i64
  %116 = sext i32 %.092.lcssa to i64
  %117 = sext i32 %.0101.lcssa to i64
  br label %139

.preheader115:                                    ; preds = %.preheader115.lr.ph, %.thread
  %indvars.iv190 = phi i64 [ 0, %.preheader115.lr.ph ], [ %indvars.iv.next191, %.thread ]
  %.092146 = phi i32 [ 0, %.preheader115.lr.ph ], [ %.1, %.thread ]
  %118 = icmp slt i32 %.092146, %.0101.lcssa
  br i1 %118, label %.lr.ph141, label %.thread

.lr.ph141:                                        ; preds = %.preheader115
  %119 = sext i32 %.092146 to i64
  br label %120

120:                                              ; preds = %.lr.ph141, %123
  %indvars.iv181 = phi i64 [ %119, %.lr.ph141 ], [ %indvars.iv.next182, %123 ]
  %121 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %indvars.iv181
  %122 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %121, i64 noundef %indvars.iv190)
  br i1 %122, label %124, label %123

123:                                              ; preds = %120
  %indvars.iv.next182 = add nsw i64 %indvars.iv181, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next182 to i32
  %exitcond184.not = icmp eq i32 %.0101.lcssa, %lftr.wideiv
  br i1 %exitcond184.not, label %.thread, label %120, !llvm.loop !18

124:                                              ; preds = %120
  %125 = icmp eq i64 %indvars.iv181, -1
  br i1 %125, label %.thread, label %126

126:                                              ; preds = %124
  %127 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %119
  %sext = shl i64 %indvars.iv181, 32
  %128 = ashr exact i64 %sext, 32
  %129 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %128
  call void @_ZSt4swapISt6bitsetILm2001EEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(256) %127, ptr noundef nonnull align 8 dereferenceable(256) %129) #7
  br i1 %22, label %.lr.ph144, label %._crit_edge145

.lr.ph144:                                        ; preds = %126
  %130 = zext i32 %.092146 to i64
  br label %132

._crit_edge145:                                   ; preds = %138, %126
  %131 = add nsw i32 %.092146, 1
  br label %.thread

132:                                              ; preds = %.lr.ph144, %138
  %indvars.iv185 = phi i64 [ 0, %.lr.ph144 ], [ %indvars.iv.next186, %138 ]
  %.not108 = icmp eq i64 %indvars.iv185, %130
  br i1 %.not108, label %138, label %133

133:                                              ; preds = %132
  %134 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %indvars.iv185
  %135 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %134, i64 noundef %indvars.iv190)
  br i1 %135, label %136, label %138

136:                                              ; preds = %133
  %137 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EEeOERKS0_(ptr noundef nonnull align 8 dereferenceable(256) %134, ptr noundef nonnull align 8 dereferenceable(256) %127) #7
  br label %138

138:                                              ; preds = %132, %133, %136
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %exitcond189.not = icmp eq i64 %indvars.iv.next186, %wide.trip.count188
  br i1 %exitcond189.not, label %._crit_edge145, label %132, !llvm.loop !19

.thread:                                          ; preds = %123, %.preheader115, %124, %._crit_edge145
  %.1 = phi i32 [ %131, %._crit_edge145 ], [ %.092146, %124 ], [ %.092146, %.preheader115 ], [ %.092146, %123 ]
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %exitcond194.not = icmp eq i64 %indvars.iv.next191, %wide.trip.count193
  br i1 %exitcond194.not, label %.preheader119, label %.preheader115, !llvm.loop !20

._crit_edge152:                                   ; preds = %139
  br i1 %141, label %195, label %.critedge

139:                                              ; preds = %.lr.ph151, %139
  %indvars.iv195 = phi i64 [ %116, %.lr.ph151 ], [ %indvars.iv.next196, %139 ]
  %140 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %indvars.iv195
  %141 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %140, i64 noundef %115)
  %indvars.iv.next196 = add nsw i64 %indvars.iv195, 1
  %142 = icmp sge i64 %indvars.iv.next196, %117
  %.not168 = select i1 %141, i1 true, i1 %142
  br i1 %.not168, label %._crit_edge152, label %139, !llvm.loop !21

.critedge:                                        ; preds = %.preheader119, %._crit_edge152
  %143 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  %144 = load i32, ptr %1, align 4, !tbaa !5
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %.lr.ph156.preheader, label %.preheader118

.lr.ph156.preheader:                              ; preds = %.critedge
  %146 = zext nneg i32 %144 to i64
  %147 = shl nuw nsw i64 %146, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ4mainE3rep, i8 0, i64 %147, i1 false), !tbaa !5
  br label %.preheader118

.preheader118:                                    ; preds = %.lr.ph156.preheader, %.critedge
  %148 = icmp sgt i32 %.092.lcssa, 0
  br i1 %148, label %.lr.ph161, label %.preheader117

.lr.ph161:                                        ; preds = %.preheader118
  %149 = sext i32 %8 to i64
  %wide.trip.count209 = zext nneg i32 %.092.lcssa to i64
  %wide.trip.count206 = zext i32 %8 to i64
  br label %153

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

.preheader117:                                    ; preds = %.preheader117.loopexit, %.preheader118
  %150 = phi i32 [ %.pre, %.preheader117.loopexit ], [ %144, %.preheader118 ]
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %.lr.ph163.preheader, label %._crit_edge164

.lr.ph163.preheader:                              ; preds = %.preheader117
  %wide.trip.count214 = zext nneg i32 %150 to i64
  %xtraiter = and i64 %wide.trip.count214, 1
  %152 = icmp eq i32 %150, 1
  br i1 %152, label %._crit_edge164.loopexit.unr-lcssa, label %.lr.ph163.preheader.new

.lr.ph163.preheader.new:                          ; preds = %.lr.ph163.preheader
  %unroll_iter = and i64 %wide.trip.count214, 2147483646
  br label %.lr.ph163

153:                                              ; preds = %.lr.ph161, %.loopexit114
  %indvars.iv201 = phi i64 [ 0, %.lr.ph161 ], [ %indvars.iv.next202, %.loopexit114 ]
  %154 = getelementptr inbounds [2001 x %"class.std::bitset"], ptr @_ZZ4mainE3mat, i64 0, i64 %indvars.iv201
  %155 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %154, i64 noundef %149)
  %156 = icmp slt i64 %indvars.iv201, %149
  %or.cond = and i1 %155, %156
  br i1 %or.cond, label %.lr.ph158, label %.loopexit114

.lr.ph158:                                        ; preds = %153, %167
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %167 ], [ %indvars.iv201, %153 ]
  %157 = call noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %154, i64 noundef %indvars.iv203)
  br i1 %157, label %158, label %167

158:                                              ; preds = %.lr.ph158
  %159 = trunc nuw nsw i64 %indvars.iv203 to i32
  %160 = and i32 %159, 1
  %161 = shl nuw nsw i32 1, %160
  %162 = lshr i64 %indvars.iv203, 1
  %163 = and i64 %162, 2147483647
  %164 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = or i32 %165, %161
  store i32 %166, ptr %164, align 4, !tbaa !5
  br label %.loopexit114

167:                                              ; preds = %.lr.ph158
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %exitcond207.not = icmp eq i64 %indvars.iv.next204, %wide.trip.count206
  br i1 %exitcond207.not, label %.loopexit114, label %.lr.ph158, !llvm.loop !22

.loopexit114:                                     ; preds = %167, %158, %153
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %exitcond210.not = icmp eq i64 %indvars.iv.next202, %wide.trip.count209
  br i1 %exitcond210.not, label %.preheader117.loopexit, label %153, !llvm.loop !23

._crit_edge164.loopexit.unr-lcssa:                ; preds = %192, %.lr.ph163.preheader
  %indvars.iv211.unr = phi i64 [ 0, %.lr.ph163.preheader ], [ %indvars.iv.next212.1, %192 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge164, label %.lr.ph163.epil

.lr.ph163.epil:                                   ; preds = %._crit_edge164.loopexit.unr-lcssa
  %168 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %indvars.iv211.unr
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %.not107.epil = icmp eq i32 %169, 0
  br i1 %.not107.epil, label %._crit_edge164.loopexit.epilog-lcssa, label %170

170:                                              ; preds = %.lr.ph163.epil
  %171 = sext i32 %169 to i64
  %172 = getelementptr inbounds i8, ptr @.str.1, i64 %171
  %173 = load i8, ptr %172, align 1, !tbaa !14
  br label %._crit_edge164.loopexit.epilog-lcssa

._crit_edge164.loopexit.epilog-lcssa:             ; preds = %170, %.lr.ph163.epil
  %174 = phi i8 [ %173, %170 ], [ 46, %.lr.ph163.epil ]
  %175 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %indvars.iv211.unr
  store i8 %174, ptr %175, align 1, !tbaa !14
  br label %._crit_edge164

._crit_edge164:                                   ; preds = %._crit_edge164.loopexit.epilog-lcssa, %._crit_edge164.loopexit.unr-lcssa, %.preheader117
  %176 = sext i32 %150 to i64
  %177 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %176
  store i8 0, ptr %177, align 1, !tbaa !14
  br label %195

.lr.ph163:                                        ; preds = %192, %.lr.ph163.preheader.new
  %indvars.iv211 = phi i64 [ 0, %.lr.ph163.preheader.new ], [ %indvars.iv.next212.1, %192 ]
  %niter = phi i64 [ 0, %.lr.ph163.preheader.new ], [ %niter.next.1, %192 ]
  %178 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %indvars.iv211
  %179 = load i32, ptr %178, align 8, !tbaa !5
  %.not107 = icmp eq i32 %179, 0
  br i1 %.not107, label %.lr.ph163.1, label %180

180:                                              ; preds = %.lr.ph163
  %181 = sext i32 %179 to i64
  %182 = getelementptr inbounds i8, ptr @.str.1, i64 %181
  %183 = load i8, ptr %182, align 1, !tbaa !14
  br label %.lr.ph163.1

.lr.ph163.1:                                      ; preds = %.lr.ph163, %180
  %184 = phi i8 [ %183, %180 ], [ 46, %.lr.ph163 ]
  %185 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %indvars.iv211
  store i8 %184, ptr %185, align 2, !tbaa !14
  %indvars.iv.next212 = or disjoint i64 %indvars.iv211, 1
  %186 = getelementptr inbounds [2001 x i32], ptr @_ZZ4mainE3rep, i64 0, i64 %indvars.iv.next212
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %.not107.1 = icmp eq i32 %187, 0
  br i1 %.not107.1, label %192, label %188

188:                                              ; preds = %.lr.ph163.1
  %189 = sext i32 %187 to i64
  %190 = getelementptr inbounds i8, ptr @.str.1, i64 %189
  %191 = load i8, ptr %190, align 1, !tbaa !14
  br label %192

192:                                              ; preds = %188, %.lr.ph163.1
  %193 = phi i8 [ %191, %188 ], [ 46, %.lr.ph163.1 ]
  %194 = getelementptr inbounds [2001 x i8], ptr @_ZZ4mainE3buf, i64 0, i64 %indvars.iv.next212
  store i8 %193, ptr %194, align 1, !tbaa !14
  %indvars.iv.next212.1 = add nuw nsw i64 %indvars.iv211, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge164.loopexit.unr-lcssa, label %.lr.ph163, !llvm.loop !24

195:                                              ; preds = %._crit_edge152, %._crit_edge164
  %_ZZ4mainE3buf.sink = phi ptr [ @_ZZ4mainE3buf, %._crit_edge164 ], [ @.str.4, %._crit_edge152 ]
  %196 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %_ZZ4mainE3buf.sink)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EE4flipEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZ4mainENK3$_0clEii"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2001EE4testEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapISt6bitsetILm2001EEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2001EEeOERKS0_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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


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