; LLVM IR from kazunetakahashi/atcoder :: 2017/1007_DDCC2017/D3.ll (Z5solvev)

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

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

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@f = external dso_local global [210 x [210 x i8]], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() #0 {
  %1 = alloca [110 x [110 x [4 x i8]]], align 16
  %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 i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %class.state, align 8
  %18 = alloca %class.state, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 48400, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %125, %0
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr @H, align 4, !tbaa !5
  %24 = sdiv i32 %23, 2
  %25 = add nsw i32 %24, 1
  %26 = icmp slt i32 %22, %25
  br i1 %26, label %28, label %27

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

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

29:                                               ; preds = %121, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr @W, align 4, !tbaa !5
  %32 = sdiv i32 %31, 2
  %33 = add nsw i32 %32, 1
  %34 = icmp slt i32 %30, %33
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %29
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %39
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [210 x i8], ptr %40, i64 0, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9, !range !11, !noundef !12
  %46 = trunc i8 %45 to i1
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %48
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [110 x [4 x i8]], ptr %49, i64 0, i64 %51
  %53 = getelementptr inbounds [4 x i8], ptr %52, i64 0, i64 0
  %54 = zext i1 %46 to i8
  store i8 %54, ptr %53, align 4, !tbaa !9
  %55 = load i32, ptr @H, align 4, !tbaa !5
  %56 = sub nsw i32 %55, 1
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  %59 = add nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %60
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [210 x i8], ptr %61, i64 0, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !9, !range !11, !noundef !12
  %67 = trunc i8 %66 to i1
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %69
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [110 x [4 x i8]], ptr %70, i64 0, i64 %72
  %74 = getelementptr inbounds [4 x i8], ptr %73, i64 0, i64 1
  %75 = zext i1 %67 to i8
  store i8 %75, ptr %74, align 1, !tbaa !9
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %78
  %80 = load i32, ptr @W, align 4, !tbaa !5
  %81 = sub nsw i32 %80, 1
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sub nsw i32 %81, %82
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [210 x i8], ptr %79, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !9, !range !11, !noundef !12
  %88 = trunc i8 %87 to i1
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %90
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [110 x [4 x i8]], ptr %91, i64 0, i64 %93
  %95 = getelementptr inbounds [4 x i8], ptr %94, i64 0, i64 2
  %96 = zext i1 %88 to i8
  store i8 %96, ptr %95, align 2, !tbaa !9
  %97 = load i32, ptr @H, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = sub nsw i32 %98, %99
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %102
  %104 = load i32, ptr @W, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = sub nsw i32 %105, %106
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [210 x i8], ptr %103, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !9, !range !11, !noundef !12
  %112 = trunc i8 %111 to i1
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %114
  %116 = load i32, ptr %4, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [110 x [4 x i8]], ptr %115, i64 0, i64 %117
  %119 = getelementptr inbounds [4 x i8], ptr %118, i64 0, i64 3
  %120 = zext i1 %112 to i8
  store i8 %120, ptr %119, align 1, !tbaa !9
  br label %121

121:                                              ; preds = %36
  %122 = load i32, ptr %4, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !13

124:                                              ; preds = %35
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %2, align 4, !tbaa !5
  br label %21, !llvm.loop !15

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

129:                                              ; preds = %177, %128
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = icmp slt i32 %130, 4
  br i1 %131, label %133, label %132

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

133:                                              ; preds = %129
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %134, i32 noundef %135)
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %173, %133
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = load i32, ptr @H, align 4, !tbaa !5
  %141 = sdiv i32 %140, 2
  %142 = add nsw i32 %141, 1
  %143 = icmp slt i32 %139, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %138
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %176

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

146:                                              ; preds = %168, %145
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = load i32, ptr @W, align 4, !tbaa !5
  %149 = sdiv i32 %148, 2
  %150 = add nsw i32 %149, 1
  %151 = icmp slt i32 %147, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %146
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %171

153:                                              ; preds = %146
  %154 = load i32, ptr %6, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %155
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [110 x [4 x i8]], ptr %156, i64 0, i64 %158
  %160 = load i32, ptr %5, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [4 x i8], ptr %159, i64 0, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !9, !range !11, !noundef !12
  %164 = trunc i8 %163 to i1
  %165 = zext i1 %164 to i64
  %166 = select i1 %164, i8 83, i8 46
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %166)
  br label %168

168:                                              ; preds = %153
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %7, align 4, !tbaa !5
  br label %146, !llvm.loop !16

171:                                              ; preds = %152
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %173

173:                                              ; preds = %171
  %174 = load i32, ptr %6, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %6, align 4, !tbaa !5
  br label %138, !llvm.loop !17

176:                                              ; preds = %144
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %5, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %5, align 4, !tbaa !5
  br label %129, !llvm.loop !18

180:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %348, %180
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = load i32, ptr @H, align 4, !tbaa !5
  %184 = sdiv i32 %183, 2
  %185 = add nsw i32 %184, 1
  %186 = icmp slt i32 %182, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %181
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %351

188:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %344, %188
  %190 = load i32, ptr %14, align 4, !tbaa !5
  %191 = load i32, ptr @W, align 4, !tbaa !5
  %192 = sdiv i32 %191, 2
  %193 = add nsw i32 %192, 1
  %194 = icmp slt i32 %190, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %189
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %347

196:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %217, %196
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = icmp slt i32 %198, 4
  br i1 %199, label %201, label %200

200:                                              ; preds = %197
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %220

201:                                              ; preds = %197
  %202 = load i32, ptr %13, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %203
  %205 = load i32, ptr %14, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [110 x [4 x i8]], ptr %204, i64 0, i64 %206
  %208 = load i32, ptr %16, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [4 x i8], ptr %207, i64 0, i64 %209
  %211 = load i8, ptr %210, align 1, !tbaa !9, !range !11, !noundef !12
  %212 = trunc i8 %211 to i1
  br i1 %212, label %213, label %216

213:                                              ; preds = %201
  %214 = load i32, ptr %15, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %15, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %213, %201
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %16, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %16, align 4, !tbaa !5
  br label %197, !llvm.loop !21

220:                                              ; preds = %200
  %221 = load i32, ptr %15, align 4, !tbaa !5
  %222 = icmp eq i32 %221, 4
  br i1 %222, label %223, label %226

223:                                              ; preds = %220
  %224 = load i64, ptr %8, align 8, !tbaa !19
  %225 = add nsw i64 %224, 1
  store i64 %225, ptr %8, align 8, !tbaa !19
  br label %343

226:                                              ; preds = %220
  %227 = load i32, ptr %15, align 4, !tbaa !5
  %228 = icmp eq i32 %227, 3
  br i1 %228, label %229, label %232

229:                                              ; preds = %226
  %230 = load i64, ptr %9, align 8, !tbaa !19
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %9, align 8, !tbaa !19
  br label %342

232:                                              ; preds = %226
  %233 = load i32, ptr %15, align 4, !tbaa !5
  %234 = icmp eq i32 %233, 2
  br i1 %234, label %235, label %334

235:                                              ; preds = %232
  %236 = load i32, ptr %13, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %237
  %239 = load i32, ptr %14, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [110 x [4 x i8]], ptr %238, i64 0, i64 %240
  %242 = getelementptr inbounds [4 x i8], ptr %241, i64 0, i64 0
  %243 = load i8, ptr %242, align 4, !tbaa !9, !range !11, !noundef !12
  %244 = trunc i8 %243 to i1
  %245 = zext i1 %244 to i32
  %246 = load i32, ptr %13, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %247
  %249 = load i32, ptr %14, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [110 x [4 x i8]], ptr %248, i64 0, i64 %250
  %252 = getelementptr inbounds [4 x i8], ptr %251, i64 0, i64 1
  %253 = load i8, ptr %252, align 1, !tbaa !9, !range !11, !noundef !12
  %254 = trunc i8 %253 to i1
  %255 = zext i1 %254 to i32
  %256 = icmp eq i32 %245, %255
  br i1 %256, label %257, label %282

257:                                              ; preds = %235
  %258 = load i32, ptr %13, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %259
  %261 = load i32, ptr %14, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [110 x [4 x i8]], ptr %260, i64 0, i64 %262
  %264 = getelementptr inbounds [4 x i8], ptr %263, i64 0, i64 2
  %265 = load i8, ptr %264, align 2, !tbaa !9, !range !11, !noundef !12
  %266 = trunc i8 %265 to i1
  %267 = zext i1 %266 to i32
  %268 = load i32, ptr %13, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %269
  %271 = load i32, ptr %14, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [110 x [4 x i8]], ptr %270, i64 0, i64 %272
  %274 = getelementptr inbounds [4 x i8], ptr %273, i64 0, i64 3
  %275 = load i8, ptr %274, align 1, !tbaa !9, !range !11, !noundef !12
  %276 = trunc i8 %275 to i1
  %277 = zext i1 %276 to i32
  %278 = icmp eq i32 %267, %277
  br i1 %278, label %279, label %282

279:                                              ; preds = %257
  %280 = load i64, ptr %10, align 8, !tbaa !19
  %281 = add nsw i64 %280, 1
  store i64 %281, ptr %10, align 8, !tbaa !19
  br label %333

282:                                              ; preds = %257, %235
  %283 = load i32, ptr %13, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %284
  %286 = load i32, ptr %14, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [110 x [4 x i8]], ptr %285, i64 0, i64 %287
  %289 = getelementptr inbounds [4 x i8], ptr %288, i64 0, i64 0
  %290 = load i8, ptr %289, align 4, !tbaa !9, !range !11, !noundef !12
  %291 = trunc i8 %290 to i1
  %292 = zext i1 %291 to i32
  %293 = load i32, ptr %13, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %294
  %296 = load i32, ptr %14, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [110 x [4 x i8]], ptr %295, i64 0, i64 %297
  %299 = getelementptr inbounds [4 x i8], ptr %298, i64 0, i64 2
  %300 = load i8, ptr %299, align 2, !tbaa !9, !range !11, !noundef !12
  %301 = trunc i8 %300 to i1
  %302 = zext i1 %301 to i32
  %303 = icmp eq i32 %292, %302
  br i1 %303, label %304, label %329

304:                                              ; preds = %282
  %305 = load i32, ptr %13, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %306
  %308 = load i32, ptr %14, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [110 x [4 x i8]], ptr %307, i64 0, i64 %309
  %311 = getelementptr inbounds [4 x i8], ptr %310, i64 0, i64 1
  %312 = load i8, ptr %311, align 1, !tbaa !9, !range !11, !noundef !12
  %313 = trunc i8 %312 to i1
  %314 = zext i1 %313 to i32
  %315 = load i32, ptr %13, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %316
  %318 = load i32, ptr %14, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [110 x [4 x i8]], ptr %317, i64 0, i64 %319
  %321 = getelementptr inbounds [4 x i8], ptr %320, i64 0, i64 3
  %322 = load i8, ptr %321, align 1, !tbaa !9, !range !11, !noundef !12
  %323 = trunc i8 %322 to i1
  %324 = zext i1 %323 to i32
  %325 = icmp eq i32 %314, %324
  br i1 %325, label %326, label %329

326:                                              ; preds = %304
  %327 = load i64, ptr %11, align 8, !tbaa !19
  %328 = add nsw i64 %327, 1
  store i64 %328, ptr %11, align 8, !tbaa !19
  br label %332

329:                                              ; preds = %304, %282
  %330 = load i64, ptr %12, align 8, !tbaa !19
  %331 = add nsw i64 %330, 1
  store i64 %331, ptr %12, align 8, !tbaa !19
  br label %332

332:                                              ; preds = %329, %326
  br label %333

333:                                              ; preds = %332, %279
  br label %341

334:                                              ; preds = %232
  %335 = load i32, ptr %15, align 4, !tbaa !5
  %336 = icmp eq i32 %335, 1
  br i1 %336, label %337, label %340

337:                                              ; preds = %334
  %338 = load i64, ptr %12, align 8, !tbaa !19
  %339 = add nsw i64 %338, 1
  store i64 %339, ptr %12, align 8, !tbaa !19
  br label %340

340:                                              ; preds = %337, %334
  br label %341

341:                                              ; preds = %340, %333
  br label %342

342:                                              ; preds = %341, %229
  br label %343

343:                                              ; preds = %342, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %14, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %14, align 4, !tbaa !5
  br label %189, !llvm.loop !22

347:                                              ; preds = %195
  br label %348

348:                                              ; preds = %347
  %349 = load i32, ptr %13, align 4, !tbaa !5
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %13, align 4, !tbaa !5
  br label %181, !llvm.loop !23

351:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #6
  %352 = load i64, ptr %8, align 8, !tbaa !19
  %353 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 0
  store i64 %352, ptr %353, align 8, !tbaa !24
  %354 = load i64, ptr %9, align 8, !tbaa !19
  %355 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 1
  store i64 %354, ptr %355, align 8, !tbaa !26
  %356 = load i64, ptr %10, align 8, !tbaa !19
  %357 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 2
  store i64 %356, ptr %357, align 8, !tbaa !27
  %358 = load i64, ptr %11, align 8, !tbaa !19
  %359 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 3
  store i64 %358, ptr %359, align 8, !tbaa !28
  %360 = load i64, ptr %12, align 8, !tbaa !19
  %361 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 4
  store i64 %360, ptr %361, align 8, !tbaa !29
  %362 = getelementptr inbounds %class.state, ptr %17, i32 0, i32 5
  store i8 1, ptr %362, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %17, i64 48, i1 false), !tbaa.struct !31
  %363 = getelementptr inbounds %class.state, ptr %18, i32 0, i32 5
  store i8 0, ptr %363, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %364 = call noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48) %17)
  store i64 %364, ptr %19, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %365 = call noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48) %18)
  store i64 %365, ptr %20, align 8, !tbaa !19
  %366 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %367 = load i64, ptr %366, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 48400, ptr %1) #6
  ret i64 %367
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

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

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

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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


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

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

@H = external dso_local local_unnamed_addr global i32, align 4
@W = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local local_unnamed_addr global [210 x [210 x i8]], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca [110 x [110 x [4 x i8]]], align 16
  %2 = alloca %class.state, align 8
  %3 = alloca %class.state, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 48400, ptr nonnull %1) #6
  %6 = load i32, ptr @H, align 4, !tbaa !5
  %7 = sdiv i32 %6, 2
  %.not105 = icmp slt i32 %6, 2
  br i1 %.not105, label %.preheader101, label %.preheader102.lr.ph

.preheader102.lr.ph:                              ; preds = %0
  %8 = load i32, ptr @W, align 4, !tbaa !5
  %.not97103 = icmp slt i32 %8, 2
  br i1 %.not97103, label %.preheader101, label %.preheader102.preheader

.preheader102.preheader:                          ; preds = %.preheader102.lr.ph
  %9 = lshr i32 %8, 1
  %10 = zext nneg i32 %8 to i64
  %11 = add nuw nsw i32 %9, 1
  %12 = zext nneg i32 %6 to i64
  %13 = add nuw nsw i32 %7, 1
  %wide.trip.count151 = zext nneg i32 %13 to i64
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.preheader102

.preheader102:                                    ; preds = %.preheader102.preheader, %._crit_edge
  %indvars.iv148 = phi i64 [ 1, %.preheader102.preheader ], [ %indvars.iv.next149, %._crit_edge ]
  %14 = add nsw i64 %indvars.iv148, -1
  %15 = sub nsw i64 %12, %indvars.iv148
  br label %20

.preheader101:                                    ; preds = %._crit_edge, %.preheader102.lr.ph, %0
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %19 = load i32, ptr @H, align 4, !tbaa !5
  %.not95110 = icmp slt i32 %19, 2
  br i1 %.not95110, label %._crit_edge112, label %.preheader100

._crit_edge:                                      ; preds = %20
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %.preheader101, label %.preheader102, !llvm.loop !9

20:                                               ; preds = %.preheader102, %20
  %indvars.iv = phi i64 [ 1, %.preheader102 ], [ %indvars.iv.next, %20 ]
  %21 = add nsw i64 %indvars.iv, -1
  %22 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %14, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !11, !range !13, !noundef !14
  %24 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv148, i64 %indvars.iv
  store i8 %23, ptr %24, align 4, !tbaa !11
  %25 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %15, i64 %21
  %26 = load i8, ptr %25, align 1, !tbaa !11, !range !13, !noundef !14
  %27 = getelementptr inbounds i8, ptr %24, i64 1
  store i8 %26, ptr %27, align 1, !tbaa !11
  %28 = sub nsw i64 %10, %indvars.iv
  %29 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %14, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11, !range !13, !noundef !14
  %31 = getelementptr inbounds i8, ptr %24, i64 2
  store i8 %30, ptr %31, align 2, !tbaa !11
  %32 = getelementptr inbounds [210 x [210 x i8]], ptr @f, i64 0, i64 %15, i64 %28
  %33 = load i8, ptr %32, align 1, !tbaa !11, !range !13, !noundef !14
  %34 = getelementptr inbounds i8, ptr %24, i64 3
  store i8 %33, ptr %34, align 1, !tbaa !11
  %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 %._crit_edge, label %20, !llvm.loop !15

.preheader98.lr.ph:                               ; preds = %._crit_edge112.3
  %35 = load i32, ptr @W, align 4, !tbaa !5
  %.not94116 = icmp slt i32 %35, 2
  br i1 %.not94116, label %._crit_edge135, label %.preheader98.preheader

.preheader98.preheader:                           ; preds = %.preheader98.lr.ph
  %36 = lshr i32 %35, 1
  %37 = add nuw nsw i32 %36, 1
  %38 = add nuw nsw i32 %89, 1
  %wide.trip.count175 = zext nneg i32 %38 to i64
  %wide.trip.count170 = zext nneg i32 %37 to i64
  br label %.preheader98

.preheader100:                                    ; preds = %.preheader101, %._crit_edge109
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %._crit_edge109 ], [ 1, %.preheader101 ]
  %39 = load i32, ptr @W, align 4, !tbaa !5
  %.not96107 = icmp slt i32 %39, 2
  br i1 %.not96107, label %._crit_edge109, label %.lr.ph

._crit_edge112:                                   ; preds = %._crit_edge109, %.preheader101
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef 1)
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %43 = load i32, ptr @H, align 4, !tbaa !5
  %.not95110.1 = icmp slt i32 %43, 2
  br i1 %.not95110.1, label %._crit_edge112.1, label %.preheader100.1

.preheader100.1:                                  ; preds = %._crit_edge112, %._crit_edge109.1
  %indvars.iv156.1 = phi i64 [ %indvars.iv.next157.1, %._crit_edge109.1 ], [ 1, %._crit_edge112 ]
  %44 = load i32, ptr @W, align 4, !tbaa !5
  %.not96107.1 = icmp slt i32 %44, 2
  br i1 %.not96107.1, label %._crit_edge109.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.preheader100.1, %.lr.ph.1
  %indvars.iv153.1 = phi i64 [ %indvars.iv.next154.1, %.lr.ph.1 ], [ 1, %.preheader100.1 ]
  %45 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv156.1, i64 %indvars.iv153.1, i64 1
  %46 = load i8, ptr %45, align 1, !tbaa !11, !range !13, !noundef !14
  %47 = trunc nuw i8 %46 to i1
  %48 = select i1 %47, i8 83, i8 46
  %49 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %48)
  %indvars.iv.next154.1 = add nuw nsw i64 %indvars.iv153.1, 1
  %50 = load i32, ptr @W, align 4, !tbaa !5
  %51 = sdiv i32 %50, 2
  %52 = sext i32 %51 to i64
  %.not96.not.1 = icmp slt i64 %indvars.iv153.1, %52
  br i1 %.not96.not.1, label %.lr.ph.1, label %._crit_edge109.1, !llvm.loop !16

._crit_edge109.1:                                 ; preds = %.lr.ph.1, %.preheader100.1
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next157.1 = add nuw nsw i64 %indvars.iv156.1, 1
  %54 = load i32, ptr @H, align 4, !tbaa !5
  %55 = sdiv i32 %54, 2
  %56 = sext i32 %55 to i64
  %.not95.not.1 = icmp slt i64 %indvars.iv156.1, %56
  br i1 %.not95.not.1, label %.preheader100.1, label %._crit_edge112.1, !llvm.loop !17

._crit_edge112.1:                                 ; preds = %._crit_edge109.1, %._crit_edge112
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %57, i32 noundef 2)
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %60 = load i32, ptr @H, align 4, !tbaa !5
  %.not95110.2 = icmp slt i32 %60, 2
  br i1 %.not95110.2, label %._crit_edge112.2, label %.preheader100.2

.preheader100.2:                                  ; preds = %._crit_edge112.1, %._crit_edge109.2
  %indvars.iv156.2 = phi i64 [ %indvars.iv.next157.2, %._crit_edge109.2 ], [ 1, %._crit_edge112.1 ]
  %61 = load i32, ptr @W, align 4, !tbaa !5
  %.not96107.2 = icmp slt i32 %61, 2
  br i1 %.not96107.2, label %._crit_edge109.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.preheader100.2, %.lr.ph.2
  %indvars.iv153.2 = phi i64 [ %indvars.iv.next154.2, %.lr.ph.2 ], [ 1, %.preheader100.2 ]
  %62 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv156.2, i64 %indvars.iv153.2, i64 2
  %63 = load i8, ptr %62, align 2, !tbaa !11, !range !13, !noundef !14
  %64 = trunc nuw i8 %63 to i1
  %65 = select i1 %64, i8 83, i8 46
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %65)
  %indvars.iv.next154.2 = add nuw nsw i64 %indvars.iv153.2, 1
  %67 = load i32, ptr @W, align 4, !tbaa !5
  %68 = sdiv i32 %67, 2
  %69 = sext i32 %68 to i64
  %.not96.not.2 = icmp slt i64 %indvars.iv153.2, %69
  br i1 %.not96.not.2, label %.lr.ph.2, label %._crit_edge109.2, !llvm.loop !16

._crit_edge109.2:                                 ; preds = %.lr.ph.2, %.preheader100.2
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next157.2 = add nuw nsw i64 %indvars.iv156.2, 1
  %71 = load i32, ptr @H, align 4, !tbaa !5
  %72 = sdiv i32 %71, 2
  %73 = sext i32 %72 to i64
  %.not95.not.2 = icmp slt i64 %indvars.iv156.2, %73
  br i1 %.not95.not.2, label %.preheader100.2, label %._crit_edge112.2, !llvm.loop !17

._crit_edge112.2:                                 ; preds = %._crit_edge109.2, %._crit_edge112.1
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef 3)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %77 = load i32, ptr @H, align 4, !tbaa !5
  %.not95110.3 = icmp slt i32 %77, 2
  br i1 %.not95110.3, label %._crit_edge135, label %.preheader100.3

.preheader100.3:                                  ; preds = %._crit_edge112.2, %._crit_edge109.3
  %indvars.iv156.3 = phi i64 [ %indvars.iv.next157.3, %._crit_edge109.3 ], [ 1, %._crit_edge112.2 ]
  %78 = load i32, ptr @W, align 4, !tbaa !5
  %.not96107.3 = icmp slt i32 %78, 2
  br i1 %.not96107.3, label %._crit_edge109.3, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %.preheader100.3, %.lr.ph.3
  %indvars.iv153.3 = phi i64 [ %indvars.iv.next154.3, %.lr.ph.3 ], [ 1, %.preheader100.3 ]
  %79 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv156.3, i64 %indvars.iv153.3, i64 3
  %80 = load i8, ptr %79, align 1, !tbaa !11, !range !13, !noundef !14
  %81 = trunc nuw i8 %80 to i1
  %82 = select i1 %81, i8 83, i8 46
  %83 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %82)
  %indvars.iv.next154.3 = add nuw nsw i64 %indvars.iv153.3, 1
  %84 = load i32, ptr @W, align 4, !tbaa !5
  %85 = sdiv i32 %84, 2
  %86 = sext i32 %85 to i64
  %.not96.not.3 = icmp slt i64 %indvars.iv153.3, %86
  br i1 %.not96.not.3, label %.lr.ph.3, label %._crit_edge109.3, !llvm.loop !16

._crit_edge109.3:                                 ; preds = %.lr.ph.3, %.preheader100.3
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next157.3 = add nuw nsw i64 %indvars.iv156.3, 1
  %88 = load i32, ptr @H, align 4, !tbaa !5
  %89 = sdiv i32 %88, 2
  %90 = sext i32 %89 to i64
  %.not95.not.3 = icmp slt i64 %indvars.iv156.3, %90
  br i1 %.not95.not.3, label %.preheader100.3, label %._crit_edge112.3, !llvm.loop !17

._crit_edge112.3:                                 ; preds = %._crit_edge109.3
  %91 = icmp slt i32 %88, 2
  br i1 %91, label %._crit_edge135, label %.preheader98.lr.ph

._crit_edge109:                                   ; preds = %.lr.ph, %.preheader100
  %92 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %93 = load i32, ptr @H, align 4, !tbaa !5
  %94 = sdiv i32 %93, 2
  %95 = sext i32 %94 to i64
  %.not95.not = icmp slt i64 %indvars.iv156, %95
  br i1 %.not95.not, label %.preheader100, label %._crit_edge112, !llvm.loop !17

.lr.ph:                                           ; preds = %.preheader100, %.lr.ph
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %.lr.ph ], [ 1, %.preheader100 ]
  %96 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv156, i64 %indvars.iv153, i64 0
  %97 = load i8, ptr %96, align 4, !tbaa !11, !range !13, !noundef !14
  %98 = trunc nuw i8 %97 to i1
  %99 = select i1 %98, i8 83, i8 46
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %99)
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %101 = load i32, ptr @W, align 4, !tbaa !5
  %102 = sdiv i32 %101, 2
  %103 = sext i32 %102 to i64
  %.not96.not = icmp slt i64 %indvars.iv153, %103
  br i1 %.not96.not, label %.lr.ph, label %._crit_edge109, !llvm.loop !16

.preheader98:                                     ; preds = %.preheader98.preheader, %._crit_edge123
  %indvars.iv172 = phi i64 [ 1, %.preheader98.preheader ], [ %indvars.iv.next173, %._crit_edge123 ]
  %.074133 = phi i64 [ 0, %.preheader98.preheader ], [ %.2, %._crit_edge123 ]
  %.076132 = phi i64 [ 0, %.preheader98.preheader ], [ %.278, %._crit_edge123 ]
  %.079131 = phi i64 [ 0, %.preheader98.preheader ], [ %.281, %._crit_edge123 ]
  %.082130 = phi i64 [ 0, %.preheader98.preheader ], [ %.284, %._crit_edge123 ]
  %.085129 = phi i64 [ 0, %.preheader98.preheader ], [ %.287, %._crit_edge123 ]
  br label %.preheader

._crit_edge135:                                   ; preds = %._crit_edge123, %._crit_edge112.2, %.preheader98.lr.ph, %._crit_edge112.3
  %.085.lcssa = phi i64 [ 0, %._crit_edge112.3 ], [ 0, %.preheader98.lr.ph ], [ 0, %._crit_edge112.2 ], [ %.287, %._crit_edge123 ]
  %.082.lcssa = phi i64 [ 0, %._crit_edge112.3 ], [ 0, %.preheader98.lr.ph ], [ 0, %._crit_edge112.2 ], [ %.284, %._crit_edge123 ]
  %.079.lcssa = phi i64 [ 0, %._crit_edge112.3 ], [ 0, %.preheader98.lr.ph ], [ 0, %._crit_edge112.2 ], [ %.281, %._crit_edge123 ]
  %.076.lcssa = phi i64 [ 0, %._crit_edge112.3 ], [ 0, %.preheader98.lr.ph ], [ 0, %._crit_edge112.2 ], [ %.278, %._crit_edge123 ]
  %.074.lcssa = phi i64 [ 0, %._crit_edge112.3 ], [ 0, %.preheader98.lr.ph ], [ 0, %._crit_edge112.2 ], [ %.2, %._crit_edge123 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #6
  store i64 %.085.lcssa, ptr %2, align 8, !tbaa !18
  %104 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %.082.lcssa, ptr %104, align 8, !tbaa !21
  %105 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %.079.lcssa, ptr %105, align 8, !tbaa !22
  %106 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 %.076.lcssa, ptr %106, align 8, !tbaa !23
  %107 = getelementptr inbounds i8, ptr %2, i64 32
  store i64 %.074.lcssa, ptr %107, align 8, !tbaa !24
  %108 = getelementptr inbounds i8, ptr %2, i64 40
  store i8 1, ptr %108, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !26
  %109 = getelementptr inbounds i8, ptr %3, i64 40
  store i8 0, ptr %109, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %110 = call noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48) %2)
  store i64 %110, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %111 = call noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48) %3)
  store i64 %111, ptr %5, align 8, !tbaa !27
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %113 = load i64, ptr %112, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 48400, ptr nonnull %1) #6
  ret i64 %113

.preheader:                                       ; preds = %.preheader98, %140
  %indvars.iv167 = phi i64 [ 1, %.preheader98 ], [ %indvars.iv.next168, %140 ]
  %.175121 = phi i64 [ %.074133, %.preheader98 ], [ %.2, %140 ]
  %.177120 = phi i64 [ %.076132, %.preheader98 ], [ %.278, %140 ]
  %.180119 = phi i64 [ %.079131, %.preheader98 ], [ %.281, %140 ]
  %.183118 = phi i64 [ %.082130, %.preheader98 ], [ %.284, %140 ]
  %.186117 = phi i64 [ %.085129, %.preheader98 ], [ %.287, %140 ]
  %114 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv172, i64 %indvars.iv167, i64 0
  %115 = load i8, ptr %114, align 4, !tbaa !11, !range !13, !noundef !14
  %116 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv172, i64 %indvars.iv167, i64 1
  %117 = load i8, ptr %116, align 1, !tbaa !11, !range !13, !noundef !14
  %narrow = add nuw nsw i8 %115, %117
  %118 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv172, i64 %indvars.iv167, i64 2
  %119 = load i8, ptr %118, align 2, !tbaa !11, !range !13, !noundef !14
  %narrow177 = add nuw nsw i8 %narrow, %119
  %120 = getelementptr inbounds [110 x [110 x [4 x i8]]], ptr %1, i64 0, i64 %indvars.iv172, i64 %indvars.iv167, i64 3
  %121 = load i8, ptr %120, align 1, !tbaa !11, !range !13, !noundef !14
  %narrow178 = add nuw nsw i8 %narrow177, %121
  switch i8 %narrow178, label %140 [
    i8 4, label %122
    i8 3, label %124
    i8 2, label %126
    i8 1, label %138
  ]

._crit_edge123:                                   ; preds = %140
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %exitcond176.not = icmp eq i64 %indvars.iv.next173, %wide.trip.count175
  br i1 %exitcond176.not, label %._crit_edge135, label %.preheader98, !llvm.loop !28

122:                                              ; preds = %.preheader
  %123 = add nsw i64 %.186117, 1
  br label %140

124:                                              ; preds = %.preheader
  %125 = add nsw i64 %.183118, 1
  br label %140

126:                                              ; preds = %.preheader
  %127 = icmp eq i8 %115, %117
  %128 = icmp eq i8 %119, %121
  %or.cond = and i1 %127, %128
  br i1 %or.cond, label %129, label %131

129:                                              ; preds = %126
  %130 = add nsw i64 %.180119, 1
  br label %140

131:                                              ; preds = %126
  %132 = icmp eq i8 %115, %119
  %133 = icmp eq i8 %117, %121
  %or.cond182 = and i1 %132, %133
  br i1 %or.cond182, label %134, label %136

134:                                              ; preds = %131
  %135 = add nsw i64 %.177120, 1
  br label %140

136:                                              ; preds = %131
  %137 = add nsw i64 %.175121, 1
  br label %140

138:                                              ; preds = %.preheader
  %139 = add nsw i64 %.175121, 1
  br label %140

140:                                              ; preds = %.preheader, %124, %138, %129, %136, %134, %122
  %.287 = phi i64 [ %123, %122 ], [ %.186117, %124 ], [ %.186117, %129 ], [ %.186117, %134 ], [ %.186117, %136 ], [ %.186117, %138 ], [ %.186117, %.preheader ]
  %.284 = phi i64 [ %.183118, %122 ], [ %125, %124 ], [ %.183118, %129 ], [ %.183118, %134 ], [ %.183118, %136 ], [ %.183118, %138 ], [ %.183118, %.preheader ]
  %.281 = phi i64 [ %.180119, %122 ], [ %.180119, %124 ], [ %130, %129 ], [ %.180119, %134 ], [ %.180119, %136 ], [ %.180119, %138 ], [ %.180119, %.preheader ]
  %.278 = phi i64 [ %.177120, %122 ], [ %.177120, %124 ], [ %.177120, %129 ], [ %135, %134 ], [ %.177120, %136 ], [ %.177120, %138 ], [ %.177120, %.preheader ]
  %.2 = phi i64 [ %.175121, %122 ], [ %.175121, %124 ], [ %.175121, %129 ], [ %.175121, %134 ], [ %137, %136 ], [ %139, %138 ], [ %.175121, %.preheader ]
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170
  br i1 %exitcond171.not, label %._crit_edge123, label %.preheader, !llvm.loop !29
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress 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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN5state3ansEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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


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