; LLVM IR from t-dillon/tdoku :: other/bb_sudoku/bb_sudoku_solver.ll (Z6SolvercjciPc)

; 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"

%struct.Grid_Type = type { i32, [81 x i32], [27 x i32] }

@B2V = external dso_local global [512 x i32], align 16
@G = external dso_local global [64 x %struct.Grid_Type], align 16
@SolGrid = external dso_local global [81 x i32], align 16
@SingleCnt = external dso_local global i8, align 1
@Changed = external dso_local global i32, align 4
@No_Sol = external dso_local global i32, align 4
@PIdx = external dso_local global i32, align 4
@SCnt = external dso_local global i32, align 4
@HCnt = external dso_local global i32, align 4
@GCnt = external dso_local global i32, align 4
@LCCnt = external dso_local global i32, align 4
@SSCnt = external dso_local global i32, align 4
@FCnt = external dso_local global i32, align 4
@OneCnt = external dso_local global i32, align 4
@TwoCnt = external dso_local global i32, align 4
@TSCnt = external dso_local global i64, align 8
@THCnt = external dso_local global i64, align 8
@TGCnt = external dso_local global i64, align 8
@TLCCnt = external dso_local global i64, align 8
@TSSCnt = external dso_local global i64, align 8
@TFCnt = external dso_local global i64, align 8
@TOneCnt = external dso_local global i64, align 8
@TTwoCnt = external dso_local global i64, align 8
@MaxDepth = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [48 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z6SolvercjciPc(i8 noundef signext %0, i32 noundef %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4) #1 {
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i8 %0, ptr %6, align 1, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !8
  store i8 %2, ptr %8, align 1, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !8
  store ptr %4, ptr %10, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !8
  %13 = load i32, ptr %9, align 4, !tbaa !8
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %22, label %15

15:                                               ; preds = %5
  %16 = load i8, ptr %8, align 1, !tbaa !5
  %17 = sext i8 %16 to i32
  %18 = load ptr, ptr %10, align 8, !tbaa !10
  %19 = call noundef i32 @_Z18DecodePuzzleStringiPc(i32 noundef %17, ptr noundef %18)
  %20 = load i32, ptr %7, align 4, !tbaa !8
  %21 = or i32 %20, %19
  store i32 %21, ptr %7, align 4, !tbaa !8
  br label %22

22:                                               ; preds = %15, %5
  br label %23

23:                                               ; preds = %229, %200, %188, %176, %165, %154, %144, %134, %22
  %24 = load i32, ptr @Changed, align 4, !tbaa !8
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %230

26:                                               ; preds = %23
  %27 = load i32, ptr @No_Sol, align 4, !tbaa !8
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %204, label %29

29:                                               ; preds = %26
  %30 = load i8, ptr @SingleCnt, align 1, !tbaa !5
  %31 = icmp ne i8 %30, 0
  br i1 %31, label %32, label %136

32:                                               ; preds = %29
  %33 = load i32, ptr @SCnt, align 4, !tbaa !8
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr @SCnt, align 4, !tbaa !8
  %35 = load i8, ptr @SingleCnt, align 1, !tbaa !5
  %36 = sext i8 %35 to i32
  %37 = icmp sgt i32 %36, 2
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  call void @_Z18ProcessInitSinglesv()
  br label %39

39:                                               ; preds = %38, %32
  %40 = load i8, ptr @SingleCnt, align 1, !tbaa !5
  %41 = icmp ne i8 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  call void @_Z14ProcessSinglesv()
  br label %43

43:                                               ; preds = %42, %39
  %44 = load i32, ptr @PIdx, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [64 x %struct.Grid_Type], ptr @G, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.Grid_Type, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 4, !tbaa !12
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %135, label %50

50:                                               ; preds = %43
  %51 = load i32, ptr @No_Sol, align 4, !tbaa !8
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %134, label %53

53:                                               ; preds = %50
  %54 = load i32, ptr %12, align 4, !tbaa !8
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %81, label %56

56:                                               ; preds = %53
  %57 = load i8, ptr %8, align 1, !tbaa !5
  %58 = icmp ne i8 %57, 0
  br i1 %58, label %59, label %81

59:                                               ; preds = %56
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %77, %59
  %61 = load i32, ptr %11, align 4, !tbaa !8
  %62 = icmp slt i32 %61, 81
  br i1 %62, label %63, label %80

63:                                               ; preds = %60
  %64 = load i32, ptr %11, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !8
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %71 = add nsw i32 48, %70
  %72 = trunc i32 %71 to i8
  %73 = load ptr, ptr %10, align 8, !tbaa !10
  %74 = load i32, ptr %11, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %73, i64 %75
  store i8 %72, ptr %76, align 1, !tbaa !5
  br label %77

77:                                               ; preds = %63
  %78 = load i32, ptr %11, align 4, !tbaa !8
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %11, align 4, !tbaa !8
  br label %60, !llvm.loop !14

80:                                               ; preds = %60
  br label %81

81:                                               ; preds = %80, %56, %53
  %82 = load i32, ptr %12, align 4, !tbaa !8
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %118

84:                                               ; preds = %81
  %85 = load i8, ptr %8, align 1, !tbaa !5
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 2
  br i1 %87, label %88, label %118

88:                                               ; preds = %84
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %89

89:                                               ; preds = %114, %88
  %90 = load i32, ptr %11, align 4, !tbaa !8
  %91 = icmp slt i32 %90, 81
  br i1 %91, label %92, label %117

92:                                               ; preds = %89
  %93 = load ptr, ptr %10, align 8, !tbaa !10
  %94 = load i32, ptr %11, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %93, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !5
  %98 = sext i8 %97 to i32
  %99 = load i32, ptr %11, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !8
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = add nsw i32 48, %105
  %107 = icmp ne i32 %98, %106
  br i1 %107, label %108, label %113

108:                                              ; preds = %92
  %109 = load ptr, ptr %10, align 8, !tbaa !10
  %110 = load i32, ptr %11, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %109, i64 %111
  store i8 46, ptr %112, align 1, !tbaa !5
  br label %113

113:                                              ; preds = %108, %92
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %11, align 4, !tbaa !8
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %11, align 4, !tbaa !8
  br label %89, !llvm.loop !16

117:                                              ; preds = %89
  br label %118

118:                                              ; preds = %117, %84, %81
  %119 = load i32, ptr %12, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %12, align 4, !tbaa !8
  %121 = load i32, ptr %12, align 4, !tbaa !8
  %122 = icmp sgt i32 %121, 1
  br i1 %122, label %123, label %128

123:                                              ; preds = %118
  %124 = load i8, ptr %6, align 1, !tbaa !5
  %125 = sext i8 %124 to i32
  %126 = icmp eq i32 %125, 2
  br i1 %126, label %127, label %128

127:                                              ; preds = %123
  br label %230

128:                                              ; preds = %123, %118
  %129 = load i8, ptr %6, align 1, !tbaa !5
  %130 = sext i8 %129 to i32
  %131 = icmp eq i32 %130, 1
  br i1 %131, label %132, label %133

132:                                              ; preds = %128
  br label %230

133:                                              ; preds = %128
  br label %134

134:                                              ; preds = %133, %50
  store i32 1, ptr @Changed, align 4, !tbaa !8
  store i32 1, ptr @No_Sol, align 4, !tbaa !8
  br label %23, !llvm.loop !17

135:                                              ; preds = %43
  br label %136

136:                                              ; preds = %135, %29
  %137 = load i32, ptr @Changed, align 4, !tbaa !8
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %203

139:                                              ; preds = %136
  %140 = load i32, ptr @HCnt, align 4, !tbaa !8
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr @HCnt, align 4, !tbaa !8
  call void @_Z17FindHiddenSinglesv()
  %142 = load i8, ptr @SingleCnt, align 1, !tbaa !5
  %143 = icmp ne i8 %142, 0
  br i1 %143, label %144, label %145

144:                                              ; preds = %139
  br label %23, !llvm.loop !17

145:                                              ; preds = %139
  %146 = load i32, ptr %7, align 4, !tbaa !8
  %147 = and i32 %146, 2
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %156

149:                                              ; preds = %145
  %150 = load i32, ptr @LCCnt, align 4, !tbaa !8
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr @LCCnt, align 4, !tbaa !8
  call void @_Z20FindLockedCandidatesv()
  %152 = load i32, ptr @Changed, align 4, !tbaa !8
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  br label %23, !llvm.loop !17

155:                                              ; preds = %149
  br label %156

156:                                              ; preds = %155, %145
  %157 = load i32, ptr %7, align 4, !tbaa !8
  %158 = and i32 %157, 4
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %167

160:                                              ; preds = %156
  %161 = load i32, ptr @SSCnt, align 4, !tbaa !8
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr @SSCnt, align 4, !tbaa !8
  call void @_Z11FindSubsetsv()
  %163 = load i32, ptr @Changed, align 4, !tbaa !8
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %160
  br label %23, !llvm.loop !17

166:                                              ; preds = %160
  br label %167

167:                                              ; preds = %166, %156
  %168 = load i32, ptr %7, align 4, !tbaa !8
  %169 = and i32 %168, 8
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %178

171:                                              ; preds = %167
  %172 = load i32, ptr @FCnt, align 4, !tbaa !8
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr @FCnt, align 4, !tbaa !8
  call void @_Z11FindFishiesv()
  %174 = load i32, ptr @Changed, align 4, !tbaa !8
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %171
  br label %23, !llvm.loop !17

177:                                              ; preds = %171
  br label %178

178:                                              ; preds = %177, %167
  %179 = load i32, ptr %7, align 4, !tbaa !8
  %180 = and i32 %179, 16
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %190

182:                                              ; preds = %178
  %183 = load i32, ptr @OneCnt, align 4, !tbaa !8
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr @OneCnt, align 4, !tbaa !8
  %185 = load i32, ptr %7, align 4, !tbaa !8
  call void @_Z6DoStepii(i32 noundef 0, i32 noundef %185)
  %186 = load i32, ptr @Changed, align 4, !tbaa !8
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %189

188:                                              ; preds = %182
  br label %23, !llvm.loop !17

189:                                              ; preds = %182
  br label %190

190:                                              ; preds = %189, %178
  %191 = load i32, ptr %7, align 4, !tbaa !8
  %192 = and i32 %191, 32
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %202

194:                                              ; preds = %190
  %195 = load i32, ptr @TwoCnt, align 4, !tbaa !8
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr @TwoCnt, align 4, !tbaa !8
  %197 = load i32, ptr %7, align 4, !tbaa !8
  call void @_Z6DoStepii(i32 noundef 1, i32 noundef %197)
  %198 = load i32, ptr @Changed, align 4, !tbaa !8
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %194
  br label %23, !llvm.loop !17

201:                                              ; preds = %194
  br label %202

202:                                              ; preds = %201, %190
  br label %203

203:                                              ; preds = %202, %136
  br label %204

204:                                              ; preds = %203, %26
  %205 = load i32, ptr %7, align 4, !tbaa !8
  %206 = and i32 %205, 1
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %211

208:                                              ; preds = %204
  %209 = load i32, ptr @GCnt, align 4, !tbaa !8
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr @GCnt, align 4, !tbaa !8
  call void @_Z9MakeGuessv()
  br label %211

211:                                              ; preds = %208, %204
  %212 = load i32, ptr @No_Sol, align 4, !tbaa !8
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %215

214:                                              ; preds = %211
  br label %230

215:                                              ; preds = %211
  %216 = load i32, ptr %9, align 4, !tbaa !8
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %224, label %218

218:                                              ; preds = %215
  %219 = load i32, ptr @MaxDepth, align 4, !tbaa !8
  %220 = load i32, ptr @PIdx, align 4, !tbaa !8
  %221 = icmp slt i32 %219, %220
  br i1 %221, label %222, label %224

222:                                              ; preds = %218
  %223 = load i32, ptr @PIdx, align 4, !tbaa !8
  store i32 %223, ptr @MaxDepth, align 4, !tbaa !8
  br label %224

224:                                              ; preds = %222, %218, %215
  %225 = load i32, ptr @PIdx, align 4, !tbaa !8
  %226 = icmp sgt i32 %225, 62
  br i1 %226, label %227, label %229

227:                                              ; preds = %224
  %228 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @exit(i32 noundef 0) #6
  unreachable

229:                                              ; preds = %224
  br label %23, !llvm.loop !17

230:                                              ; preds = %214, %132, %127, %23
  %231 = load i32, ptr @No_Sol, align 4, !tbaa !8
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %275

233:                                              ; preds = %230
  %234 = load i32, ptr %9, align 4, !tbaa !8
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %275, label %236

236:                                              ; preds = %233
  %237 = load i8, ptr %8, align 1, !tbaa !5
  %238 = sext i8 %237 to i32
  %239 = icmp eq i32 %238, 2
  br i1 %239, label %240, label %275

240:                                              ; preds = %236
  %241 = load i32, ptr %7, align 4, !tbaa !8
  %242 = and i32 %241, 1
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %275, label %244

244:                                              ; preds = %240
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %245

245:                                              ; preds = %271, %244
  %246 = load i32, ptr %11, align 4, !tbaa !8
  %247 = icmp slt i32 %246, 81
  br i1 %247, label %248, label %274

248:                                              ; preds = %245
  %249 = load i32, ptr %11, align 4, !tbaa !8
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [81 x i32], ptr getelementptr inbounds (%struct.Grid_Type, ptr @G, i32 0, i32 1), i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !8
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %255

254:                                              ; preds = %248
  br label %264

255:                                              ; preds = %248
  %256 = load i32, ptr %11, align 4, !tbaa !8
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !8
  %260 = zext i32 %259 to i64
  %261 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !8
  %263 = add nsw i32 48, %262
  br label %264

264:                                              ; preds = %255, %254
  %265 = phi i32 [ 46, %254 ], [ %263, %255 ]
  %266 = trunc i32 %265 to i8
  %267 = load ptr, ptr %10, align 8, !tbaa !10
  %268 = load i32, ptr %11, align 4, !tbaa !8
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds i8, ptr %267, i64 %269
  store i8 %266, ptr %270, align 1, !tbaa !5
  br label %271

271:                                              ; preds = %264
  %272 = load i32, ptr %11, align 4, !tbaa !8
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %11, align 4, !tbaa !8
  br label %245, !llvm.loop !18

274:                                              ; preds = %245
  br label %275

275:                                              ; preds = %274, %240, %236, %233, %230
  %276 = load i32, ptr @SCnt, align 4, !tbaa !8
  %277 = sext i32 %276 to i64
  %278 = load i64, ptr @TSCnt, align 8, !tbaa !19
  %279 = add nsw i64 %278, %277
  store i64 %279, ptr @TSCnt, align 8, !tbaa !19
  %280 = load i32, ptr @HCnt, align 4, !tbaa !8
  %281 = sext i32 %280 to i64
  %282 = load i64, ptr @THCnt, align 8, !tbaa !19
  %283 = add nsw i64 %282, %281
  store i64 %283, ptr @THCnt, align 8, !tbaa !19
  %284 = load i32, ptr @GCnt, align 4, !tbaa !8
  %285 = sext i32 %284 to i64
  %286 = load i64, ptr @TGCnt, align 8, !tbaa !19
  %287 = add nsw i64 %286, %285
  store i64 %287, ptr @TGCnt, align 8, !tbaa !19
  %288 = load i32, ptr @LCCnt, align 4, !tbaa !8
  %289 = sext i32 %288 to i64
  %290 = load i64, ptr @TLCCnt, align 8, !tbaa !19
  %291 = add nsw i64 %290, %289
  store i64 %291, ptr @TLCCnt, align 8, !tbaa !19
  %292 = load i32, ptr @SSCnt, align 4, !tbaa !8
  %293 = sext i32 %292 to i64
  %294 = load i64, ptr @TSSCnt, align 8, !tbaa !19
  %295 = add nsw i64 %294, %293
  store i64 %295, ptr @TSSCnt, align 8, !tbaa !19
  %296 = load i32, ptr @FCnt, align 4, !tbaa !8
  %297 = sext i32 %296 to i64
  %298 = load i64, ptr @TFCnt, align 8, !tbaa !19
  %299 = add nsw i64 %298, %297
  store i64 %299, ptr @TFCnt, align 8, !tbaa !19
  %300 = load i32, ptr @OneCnt, align 4, !tbaa !8
  %301 = sext i32 %300 to i64
  %302 = load i64, ptr @TOneCnt, align 8, !tbaa !19
  %303 = add nsw i64 %302, %301
  store i64 %303, ptr @TOneCnt, align 8, !tbaa !19
  %304 = load i32, ptr @TwoCnt, align 4, !tbaa !8
  %305 = sext i32 %304 to i64
  %306 = load i64, ptr @TTwoCnt, align 8, !tbaa !19
  %307 = add nsw i64 %306, %305
  store i64 %307, ptr @TTwoCnt, align 8, !tbaa !19
  %308 = load i32, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret i32 %308
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z18DecodePuzzleStringiPc(i32 noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z18ProcessInitSinglesv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z14ProcessSinglesv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z17FindHiddenSinglesv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z20FindLockedCandidatesv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z11FindSubsetsv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z11FindFishiesv() #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6DoStepii(i32 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9MakeGuessv() #2

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !9, i64 0}
!13 = !{!"_ZTS9Grid_Type", !9, i64 0, !6, i64 4, !6, i64 328}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !6, i64 0}


; 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"

%struct.Grid_Type = type { i32, [81 x i32], [27 x i32] }

@B2V = external dso_local local_unnamed_addr global [512 x i32], align 16
@G = external dso_local local_unnamed_addr global [64 x %struct.Grid_Type], align 16
@SolGrid = external dso_local local_unnamed_addr global [81 x i32], align 16
@SingleCnt = external dso_local local_unnamed_addr global i8, align 1
@Changed = external dso_local local_unnamed_addr global i32, align 4
@No_Sol = external dso_local local_unnamed_addr global i32, align 4
@PIdx = external dso_local local_unnamed_addr global i32, align 4
@SCnt = external dso_local local_unnamed_addr global i32, align 4
@HCnt = external dso_local local_unnamed_addr global i32, align 4
@GCnt = external dso_local local_unnamed_addr global i32, align 4
@LCCnt = external dso_local local_unnamed_addr global i32, align 4
@SSCnt = external dso_local local_unnamed_addr global i32, align 4
@FCnt = external dso_local local_unnamed_addr global i32, align 4
@OneCnt = external dso_local local_unnamed_addr global i32, align 4
@TwoCnt = external dso_local local_unnamed_addr global i32, align 4
@TSCnt = external dso_local local_unnamed_addr global i64, align 8
@THCnt = external dso_local local_unnamed_addr global i64, align 8
@TGCnt = external dso_local local_unnamed_addr global i64, align 8
@TLCCnt = external dso_local local_unnamed_addr global i64, align 8
@TSSCnt = external dso_local local_unnamed_addr global i64, align 8
@TFCnt = external dso_local local_unnamed_addr global i64, align 8
@TOneCnt = external dso_local local_unnamed_addr global i64, align 8
@TTwoCnt = external dso_local local_unnamed_addr global i64, align 8
@MaxDepth = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z6SolvercjciPc(i8 noundef signext %0, i32 noundef %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = icmp eq i32 %3, 0
  br i1 %6, label %7, label %11

7:                                                ; preds = %5
  %8 = sext i8 %2 to i32
  %9 = tail call noundef i32 @_Z18DecodePuzzleStringiPc(i32 noundef %8, ptr noundef %4)
  %10 = or i32 %9, %1
  br label %11

11:                                               ; preds = %7, %5
  %.060 = phi i32 [ %1, %5 ], [ %10, %7 ]
  %.pr111 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not103107112 = icmp eq i32 %.pr111, 0
  br i1 %.not103107112, label %..loopexit94_crit_edge, label %.lr.ph.lr.ph.lr.ph

..loopexit94_crit_edge:                           ; preds = %11
  %.pre131 = and i32 %.060, 1
  br label %.loopexit94

.lr.ph.lr.ph.lr.ph:                               ; preds = %11
  %12 = and i32 %.060, 2
  %.not70 = icmp eq i32 %12, 0
  %13 = and i32 %.060, 4
  %.not72 = icmp eq i32 %13, 0
  %14 = and i32 %.060, 8
  %.not74 = icmp eq i32 %14, 0
  %15 = and i32 %.060, 16
  %.not76 = icmp eq i32 %15, 0
  %16 = and i32 %.060, 32
  %.not78 = icmp eq i32 %16, 0
  %17 = icmp ne i8 %2, 0
  %18 = icmp eq i8 %2, 2
  %19 = icmp eq i8 %0, 2
  %20 = icmp eq i8 %0, 1
  %21 = and i32 %.060, 1
  %.not80 = icmp eq i32 %21, 0
  br label %.lr.ph.lr.ph

.lr.ph.lr.ph:                                     ; preds = %.lr.ph.lr.ph.lr.ph, %thread-pre-split.backedge
  %.0.ph113 = phi i32 [ 0, %.lr.ph.lr.ph.lr.ph ], [ %.0.ph95108144, %thread-pre-split.backedge ]
  %22 = load i32, ptr @No_Sol, align 4, !tbaa !5
  %.not62145154 = icmp eq i32 %22, 0
  br i1 %.not62145154, label %.lr.ph146, label %.lr.ph._crit_edge

.lr.ph146:                                        ; preds = %.lr.ph.lr.ph, %.lr.ph146.backedge
  %23 = load i8, ptr @SingleCnt, align 1, !tbaa !9
  %.not63 = icmp eq i8 %23, 0
  br i1 %.not63, label %.thread133, label %24

24:                                               ; preds = %.lr.ph146
  %25 = load i32, ptr @SCnt, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr @SCnt, align 4, !tbaa !5
  %27 = icmp sgt i8 %23, 2
  br i1 %27, label %28, label %.thread

28:                                               ; preds = %24
  tail call void @_Z18ProcessInitSinglesv()
  %.pre = load i8, ptr @SingleCnt, align 1, !tbaa !9
  %.not64 = icmp eq i8 %.pre, 0
  br i1 %.not64, label %29, label %.thread

.thread:                                          ; preds = %24, %28
  tail call void @_Z14ProcessSinglesv()
  br label %29

29:                                               ; preds = %.thread, %28
  %30 = load i32, ptr @PIdx, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [64 x %struct.Grid_Type], ptr @G, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !10
  %.not65 = icmp eq i32 %33, 0
  br i1 %.not65, label %34, label %87

34:                                               ; preds = %29
  %35 = load i32, ptr @No_Sol, align 4, !tbaa !5
  %.not66 = icmp eq i32 %35, 0
  br i1 %.not66, label %36, label %.outer

36:                                               ; preds = %34
  %37 = icmp eq i32 %.0.ph113, 0
  %or.cond = and i1 %17, %37
  br i1 %or.cond, label %.preheader92, label %.loopexit93

.preheader92:                                     ; preds = %36, %.preheader92
  %indvars.iv = phi i64 [ %indvars.iv.next.2, %.preheader92 ], [ 0, %36 ]
  %38 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = trunc i32 %42 to i8
  %44 = add i8 %43, 48
  %45 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv
  store i8 %44, ptr %45, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv.next
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = trunc i32 %50 to i8
  %52 = add i8 %51, 48
  %53 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv.next
  store i8 %52, ptr %53, align 1, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %54 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv.next.1
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = trunc i32 %58 to i8
  %60 = add i8 %59, 48
  %61 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv.next.1
  store i8 %60, ptr %61, align 1, !tbaa !9
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 81
  br i1 %exitcond.not.2, label %.loopexit93, label %.preheader92, !llvm.loop !12

.loopexit93:                                      ; preds = %.preheader92, %36
  %62 = icmp ne i32 %.0.ph113, 0
  %or.cond4 = and i1 %18, %62
  br i1 %or.cond4, label %.preheader90, label %.loopexit91

.preheader90:                                     ; preds = %.loopexit93, %84
  %indvars.iv122 = phi i64 [ %indvars.iv.next123.1, %84 ], [ 0, %.loopexit93 ]
  %63 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv122
  %64 = load i8, ptr %63, align 1, !tbaa !9
  %65 = sext i8 %64 to i32
  %66 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv122
  %67 = load i32, ptr %66, align 8, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, 48
  %.not67 = icmp eq i32 %71, %65
  br i1 %.not67, label %73, label %72

72:                                               ; preds = %.preheader90
  store i8 46, ptr %63, align 1, !tbaa !9
  br label %73

73:                                               ; preds = %.preheader90, %72
  %exitcond125.not = icmp eq i64 %indvars.iv122, 80
  br i1 %exitcond125.not, label %.loopexit91, label %.preheader90.1, !llvm.loop !14

.preheader90.1:                                   ; preds = %73
  %indvars.iv.next123 = or disjoint i64 %indvars.iv122, 1
  %74 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv.next123
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = sext i8 %75 to i32
  %77 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv.next123
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %81, 48
  %.not67.1 = icmp eq i32 %82, %76
  br i1 %.not67.1, label %84, label %83

83:                                               ; preds = %.preheader90.1
  store i8 46, ptr %74, align 1, !tbaa !9
  br label %84

84:                                               ; preds = %83, %.preheader90.1
  %indvars.iv.next123.1 = add nuw nsw i64 %indvars.iv122, 2
  br label %.preheader90

.loopexit91:                                      ; preds = %73, %.loopexit93
  %85 = add nsw i32 %.0.ph113, 1
  %86 = icmp sgt i32 %.0.ph113, 0
  %or.cond7 = and i1 %19, %86
  %or.cond15 = or i1 %20, %or.cond7
  br i1 %or.cond15, label %.loopexit94, label %.outer

.outer:                                           ; preds = %.loopexit91, %34
  %.1 = phi i32 [ %.0.ph113, %34 ], [ %85, %.loopexit91 ]
  store i32 1, ptr @Changed, align 4, !tbaa !5
  store i32 1, ptr @No_Sol, align 4, !tbaa !5
  br label %.lr.ph._crit_edge

87:                                               ; preds = %29
  %.pre130 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not68 = icmp eq i32 %.pre130, 0
  br i1 %.not68, label %.lr.ph._crit_edge, label %.thread133

.thread133:                                       ; preds = %.lr.ph146, %87
  %88 = load i32, ptr @HCnt, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr @HCnt, align 4, !tbaa !5
  tail call void @_Z17FindHiddenSinglesv()
  %90 = load i8, ptr @SingleCnt, align 1, !tbaa !9
  %.not69 = icmp eq i8 %90, 0
  br i1 %.not69, label %91, label %thread-pre-split.backedge, !llvm.loop !15

91:                                               ; preds = %.thread133
  br i1 %.not70, label %96, label %92

92:                                               ; preds = %91
  %93 = load i32, ptr @LCCnt, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr @LCCnt, align 4, !tbaa !5
  tail call void @_Z20FindLockedCandidatesv()
  %95 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not71 = icmp eq i32 %95, 0
  br i1 %.not71, label %96, label %.backedge

.backedge:                                        ; preds = %92, %97, %102, %107
  %.old = load i32, ptr @No_Sol, align 4, !tbaa !5
  %.not62.old = icmp eq i32 %.old, 0
  br i1 %.not62.old, label %.lr.ph146.backedge, label %.lr.ph._crit_edge

.lr.ph146.backedge:                               ; preds = %.backedge, %112
  br label %.lr.ph146, !llvm.loop !15

96:                                               ; preds = %92, %91
  br i1 %.not72, label %101, label %97

97:                                               ; preds = %96
  %98 = load i32, ptr @SSCnt, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr @SSCnt, align 4, !tbaa !5
  tail call void @_Z11FindSubsetsv()
  %100 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not73 = icmp eq i32 %100, 0
  br i1 %.not73, label %101, label %.backedge

101:                                              ; preds = %97, %96
  br i1 %.not74, label %106, label %102

102:                                              ; preds = %101
  %103 = load i32, ptr @FCnt, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr @FCnt, align 4, !tbaa !5
  tail call void @_Z11FindFishiesv()
  %105 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not75 = icmp eq i32 %105, 0
  br i1 %.not75, label %106, label %.backedge

106:                                              ; preds = %102, %101
  br i1 %.not76, label %111, label %107

107:                                              ; preds = %106
  %108 = load i32, ptr @OneCnt, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr @OneCnt, align 4, !tbaa !5
  tail call void @_Z6DoStepii(i32 noundef 0, i32 noundef %.060)
  %110 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not77 = icmp eq i32 %110, 0
  br i1 %.not77, label %111, label %.backedge

111:                                              ; preds = %107, %106
  br i1 %.not78, label %.lr.ph._crit_edge, label %112

112:                                              ; preds = %111
  %113 = load i32, ptr @TwoCnt, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr @TwoCnt, align 4, !tbaa !5
  tail call void @_Z6DoStepii(i32 noundef 1, i32 noundef %.060)
  %115 = load i32, ptr @Changed, align 4, !tbaa !5
  %.not79 = icmp ne i32 %115, 0
  %116 = load i32, ptr @No_Sol, align 4
  %.not62 = icmp eq i32 %116, 0
  %or.cond157 = select i1 %.not79, i1 %.not62, i1 false
  br i1 %or.cond157, label %.lr.ph146.backedge, label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.backedge, %111, %112, %87, %.lr.ph.lr.ph, %.outer
  %.0.ph95108.lcssa = phi i32 [ %.1, %.outer ], [ %.0.ph113, %.lr.ph.lr.ph ], [ %.0.ph113, %87 ], [ %.0.ph113, %112 ], [ %.0.ph113, %111 ], [ %.0.ph113, %.backedge ]
  br i1 %.not80, label %120, label %117

117:                                              ; preds = %.lr.ph._crit_edge
  %118 = load i32, ptr @GCnt, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr @GCnt, align 4, !tbaa !5
  tail call void @_Z9MakeGuessv()
  br label %120

120:                                              ; preds = %117, %.lr.ph._crit_edge
  %121 = load i32, ptr @No_Sol, align 4, !tbaa !5
  %.not81 = icmp eq i32 %121, 0
  br i1 %.not81, label %122, label %.loopexit94

122:                                              ; preds = %120
  br i1 %6, label %123, label %thread-pre-split88

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

127:                                              ; preds = %123
  store i32 %125, ptr @MaxDepth, align 4, !tbaa !5
  br label %128

thread-pre-split88:                               ; preds = %122
  %.pr89 = load i32, ptr @PIdx, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %thread-pre-split88, %127, %123
  %129 = phi i32 [ %.pr89, %thread-pre-split88 ], [ %125, %127 ], [ %125, %123 ]
  %130 = icmp sgt i32 %129, 62
  br i1 %130, label %131, label %thread-pre-split.backedge

thread-pre-split.backedge:                        ; preds = %.thread133, %128
  %.0.ph95108144 = phi i32 [ %.0.ph95108.lcssa, %128 ], [ %.0.ph113, %.thread133 ]
  %.pr = load i32, ptr @Changed, align 4, !tbaa !5
  %.not103107 = icmp eq i32 %.pr, 0
  br i1 %.not103107, label %.loopexit94, label %.lr.ph.lr.ph, !llvm.loop !15

131:                                              ; preds = %128
  %132 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  tail call void @exit(i32 noundef 0) #4
  unreachable

.loopexit94:                                      ; preds = %120, %thread-pre-split.backedge, %.loopexit91, %..loopexit94_crit_edge
  %.pre-phi = phi i32 [ %.pre131, %..loopexit94_crit_edge ], [ %21, %.loopexit91 ], [ %21, %thread-pre-split.backedge ], [ %21, %120 ]
  %.2 = phi i32 [ 0, %..loopexit94_crit_edge ], [ %.0.ph95108.lcssa, %120 ], [ %.0.ph95108144, %thread-pre-split.backedge ], [ %85, %.loopexit91 ]
  %133 = load i32, ptr @No_Sol, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  %135 = icmp eq i8 %2, 2
  %136 = and i1 %135, %134
  %137 = or i32 %.pre-phi, %3
  %138 = icmp eq i32 %137, 0
  %or.cond87 = and i1 %138, %136
  br i1 %or.cond87, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.loopexit94, %161
  %indvars.iv126 = phi i64 [ %indvars.iv.next127.1, %161 ], [ 0, %.loopexit94 ]
  %139 = getelementptr inbounds [81 x i32], ptr getelementptr inbounds (i8, ptr @G, i64 4), i64 0, i64 %indvars.iv126
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %.not86 = icmp eq i32 %140, 0
  br i1 %.not86, label %141, label %148

141:                                              ; preds = %.preheader
  %142 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv126
  %143 = load i32, ptr %142, align 8, !tbaa !5
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = add nsw i32 %146, 48
  br label %148

148:                                              ; preds = %.preheader, %141
  %149 = phi i32 [ %147, %141 ], [ 46, %.preheader ]
  %150 = trunc i32 %149 to i8
  %151 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv126
  store i8 %150, ptr %151, align 1, !tbaa !9
  %indvars.iv.next127 = or disjoint i64 %indvars.iv126, 1
  %exitcond129.not = icmp eq i64 %indvars.iv126, 80
  br i1 %exitcond129.not, label %.loopexit, label %.preheader.1, !llvm.loop !16

.preheader.1:                                     ; preds = %148
  %152 = getelementptr inbounds [81 x i32], ptr getelementptr inbounds (i8, ptr @G, i64 4), i64 0, i64 %indvars.iv.next127
  %153 = load i32, ptr %152, align 8, !tbaa !5
  %.not86.1 = icmp eq i32 %153, 0
  br i1 %.not86.1, label %154, label %161

154:                                              ; preds = %.preheader.1
  %155 = getelementptr inbounds [81 x i32], ptr @SolGrid, i64 0, i64 %indvars.iv.next127
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [512 x i32], ptr @B2V, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = add nsw i32 %159, 48
  br label %161

161:                                              ; preds = %154, %.preheader.1
  %162 = phi i32 [ %160, %154 ], [ 46, %.preheader.1 ]
  %163 = trunc i32 %162 to i8
  %164 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv.next127
  store i8 %163, ptr %164, align 1, !tbaa !9
  %indvars.iv.next127.1 = add nuw nsw i64 %indvars.iv126, 2
  br label %.preheader

.loopexit:                                        ; preds = %148, %.loopexit94
  %165 = load i32, ptr @SCnt, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = load i64, ptr @TSCnt, align 8, !tbaa !17
  %168 = add nsw i64 %167, %166
  store i64 %168, ptr @TSCnt, align 8, !tbaa !17
  %169 = load i32, ptr @HCnt, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = load i64, ptr @THCnt, align 8, !tbaa !17
  %172 = add nsw i64 %171, %170
  store i64 %172, ptr @THCnt, align 8, !tbaa !17
  %173 = load i32, ptr @GCnt, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = load i64, ptr @TGCnt, align 8, !tbaa !17
  %176 = add nsw i64 %175, %174
  store i64 %176, ptr @TGCnt, align 8, !tbaa !17
  %177 = load i32, ptr @LCCnt, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = load i64, ptr @TLCCnt, align 8, !tbaa !17
  %180 = add nsw i64 %179, %178
  store i64 %180, ptr @TLCCnt, align 8, !tbaa !17
  %181 = load i32, ptr @SSCnt, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = load i64, ptr @TSSCnt, align 8, !tbaa !17
  %184 = add nsw i64 %183, %182
  store i64 %184, ptr @TSSCnt, align 8, !tbaa !17
  %185 = load i32, ptr @FCnt, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = load i64, ptr @TFCnt, align 8, !tbaa !17
  %188 = add nsw i64 %187, %186
  store i64 %188, ptr @TFCnt, align 8, !tbaa !17
  %189 = load i32, ptr @OneCnt, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = load i64, ptr @TOneCnt, align 8, !tbaa !17
  %192 = add nsw i64 %191, %190
  store i64 %192, ptr @TOneCnt, align 8, !tbaa !17
  %193 = load i32, ptr @TwoCnt, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = load i64, ptr @TTwoCnt, align 8, !tbaa !17
  %196 = add nsw i64 %195, %194
  store i64 %196, ptr @TTwoCnt, align 8, !tbaa !17
  ret i32 %.2
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z18DecodePuzzleStringiPc(i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z18ProcessInitSinglesv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z14ProcessSinglesv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z17FindHiddenSinglesv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z20FindLockedCandidatesv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z11FindSubsetsv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z11FindFishiesv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6DoStepii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9MakeGuessv() local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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 = { 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 #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 = { noreturn 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 #4 = { noreturn nounwind }

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

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


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