; LLVM IR from tastangh/TI-RSLK-Texas-Instruments-Robotics-System-The-Maze-Edition :: tirslk_maze_1_00_00/inc (FlashProgram)

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @IsInBank0(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @IsInBank1(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @Flash_FastWrite(ptr noundef %0, i32 noundef %1, i16 noundef zeroext %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i16, align 2
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [16 x i32], align 16
  %15 = alloca [16 x i32], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i16 %2, ptr %7, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  store ptr inttoptr (i64 1073811552 to ptr), ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = call i32 @IsInBank0(i32 noundef %19)
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %25, label %22

22:                                               ; preds = %3
  %23 = call i32 @IsInBank1(i32 noundef ptrtoint (ptr @Flash_FastWrite to i32))
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %22, %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %414

26:                                               ; preds = %22
  %27 = load i16, ptr %7, align 2, !tbaa !11
  %28 = zext i16 %27 to i32
  %29 = icmp sgt i32 %28, 16
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i16 16, ptr %7, align 2, !tbaa !11
  br label %31

31:                                               ; preds = %30, %26
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = load i16, ptr %7, align 2, !tbaa !11
  %34 = call i32 @MassWriteAddrValid(i32 noundef %32, i16 noundef zeroext %33)
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %412

36:                                               ; preds = %31
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  %37 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %38 = or i32 %37, 8388608
  store volatile i32 %38, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = sub i32 %39, 131072
  %41 = lshr i32 %40, 12
  %42 = shl i32 1, %41
  store i32 %42, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = sub i32 %43, 131072
  %45 = load i16, ptr %7, align 2, !tbaa !11
  %46 = zext i16 %45 to i32
  %47 = mul nsw i32 4, %46
  %48 = add i32 %44, %47
  %49 = sub i32 %48, 1
  %50 = lshr i32 %49, 12
  %51 = shl i32 1, %50
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = or i32 %52, %51
  store i32 %53, ptr %10, align 4, !tbaa !9
  %54 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = and i32 %54, %55
  store i32 %56, ptr %9, align 4, !tbaa !9
  %57 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = xor i32 %58, -1
  %60 = and i32 %57, %59
  store volatile i32 %60, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %76, %36
  %62 = load i32, ptr %17, align 4, !tbaa !9
  %63 = load i16, ptr %7, align 2, !tbaa !11
  %64 = zext i16 %63 to i32
  %65 = icmp slt i32 %62, %64
  br i1 %65, label %66, label %79

66:                                               ; preds = %61
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i32, ptr %17, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %72, i64 %74
  store volatile i32 %71, ptr %75, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %66
  %77 = load i32, ptr %17, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %17, align 4, !tbaa !9
  br label %61, !llvm.loop !13

79:                                               ; preds = %61
  %80 = load i16, ptr %7, align 2, !tbaa !11
  %81 = zext i16 %80 to i32
  store i32 %81, ptr %17, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %90, %79
  %83 = load i32, ptr %17, align 4, !tbaa !9
  %84 = icmp slt i32 %83, 16
  br i1 %84, label %85, label %93

85:                                               ; preds = %82
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load i32, ptr %17, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  store volatile i32 -1, ptr %89, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %85
  %91 = load i32, ptr %17, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %17, align 4, !tbaa !9
  br label %82, !llvm.loop !15

93:                                               ; preds = %82
  %94 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %95 = or i32 %94, 192
  store volatile i32 %95, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %96 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %97 = and i32 %96, -7
  %98 = or i32 %97, 0
  store volatile i32 %98, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %99 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %100 = and i32 %99, -57
  %101 = load i16, ptr %7, align 2, !tbaa !11
  %102 = zext i16 %101 to i32
  %103 = add nsw i32 %102, 3
  %104 = sdiv i32 %103, 4
  %105 = shl i32 %104, 3
  %106 = or i32 %100, %105
  store volatile i32 %106, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %107 = load i32, ptr %6, align 4, !tbaa !9
  store volatile i32 %107, ptr inttoptr (i64 1073811544 to ptr), align 4, !tbaa !9
  %108 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %109 = or i32 %108, 1
  store volatile i32 %109, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  br label %110

110:                                              ; preds = %114, %93
  %111 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 4, !tbaa !9
  %112 = and i32 %111, 16
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  br label %110, !llvm.loop !16

115:                                              ; preds = %110
  %116 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %117 = and i32 %116, 2097152
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %125

119:                                              ; preds = %115
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %120 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %121 = or i32 %120, 8388608
  store volatile i32 %121, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %122 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = or i32 %122, %123
  store volatile i32 %124, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %414

125:                                              ; preds = %115
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = add i32 %126, 1
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = load i16, ptr %7, align 2, !tbaa !11
  %129 = zext i16 %128 to i32
  store i32 %129, ptr %16, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %405, %125
  %131 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %132 = and i32 %131, 524288
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %138, label %134

134:                                              ; preds = %130
  %135 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %136 = and i32 %135, 1048576
  %137 = icmp ne i32 %136, 0
  br label %138

138:                                              ; preds = %134, %130
  %139 = phi i1 [ true, %130 ], [ %137, %134 ]
  br i1 %139, label %140, label %406

140:                                              ; preds = %138
  %141 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %142 = and i32 %141, 524288
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %275

144:                                              ; preds = %140
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = icmp ugt i32 %145, 5
  br i1 %146, label %147, label %154

147:                                              ; preds = %144
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %148 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %149 = or i32 %148, 8388608
  store volatile i32 %149, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %150 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %151 = load i32, ptr %9, align 4, !tbaa !9
  %152 = or i32 %150, %151
  store volatile i32 %152, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %153 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %153, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %414

154:                                              ; preds = %144
  store volatile i32 20483, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  br label %155

155:                                              ; preds = %159, %154
  %156 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %157 = and i32 %156, 983040
  %158 = icmp ne i32 %157, 196608
  br i1 %158, label %159, label %160

159:                                              ; preds = %155
  br label %155, !llvm.loop !17

160:                                              ; preds = %155
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %198, %160
  %162 = load i32, ptr %17, align 4, !tbaa !9
  %163 = load i16, ptr %7, align 2, !tbaa !11
  %164 = zext i16 %163 to i32
  %165 = icmp slt i32 %162, %164
  br i1 %165, label %166, label %201

166:                                              ; preds = %161
  %167 = load i32, ptr %6, align 4, !tbaa !9
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = mul nsw i32 4, %168
  %170 = add i32 %167, %169
  %171 = zext i32 %170 to i64
  %172 = inttoptr i64 %171 to ptr
  %173 = load volatile i32, ptr %172, align 4, !tbaa !9
  store i32 %173, ptr %12, align 4, !tbaa !9
  %174 = load i32, ptr %12, align 4, !tbaa !9
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = load i32, ptr %17, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds i32, ptr %175, i64 %177
  %179 = load volatile i32, ptr %178, align 4, !tbaa !9
  %180 = or i32 %174, %179
  %181 = xor i32 %180, -1
  %182 = load i32, ptr %17, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [16 x i32], ptr %14, i64 0, i64 %183
  store i32 %181, ptr %184, align 4, !tbaa !9
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = load i32, ptr %17, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %185, i64 %187
  %189 = load volatile i32, ptr %188, align 4, !tbaa !9
  %190 = load i32, ptr %17, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [16 x i32], ptr %14, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = or i32 %189, %193
  %195 = load i32, ptr %17, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [16 x i32], ptr %15, i64 0, i64 %196
  store i32 %194, ptr %197, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %166
  %199 = load i32, ptr %17, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %17, align 4, !tbaa !9
  br label %161, !llvm.loop !18

201:                                              ; preds = %161
  %202 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %203 = and i32 %202, -16
  %204 = or i32 %203, 0
  store volatile i32 %204, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  br label %205

205:                                              ; preds = %209, %201
  %206 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %207 = and i32 %206, 983040
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %210

209:                                              ; preds = %205
  br label %205, !llvm.loop !19

210:                                              ; preds = %205
  %211 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %212 = and i32 %211, -61441
  %213 = or i32 %212, 8192
  store volatile i32 %213, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %214 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %215 = or i32 %214, 8388608
  store volatile i32 %215, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %231, %210
  %217 = load i32, ptr %17, align 4, !tbaa !9
  %218 = load i16, ptr %7, align 2, !tbaa !11
  %219 = zext i16 %218 to i32
  %220 = icmp slt i32 %217, %219
  br i1 %220, label %221, label %234

221:                                              ; preds = %216
  %222 = load i32, ptr %17, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [16 x i32], ptr %15, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = icmp eq i32 %225, -1
  br i1 %226, label %227, label %230

227:                                              ; preds = %221
  %228 = load i32, ptr %16, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %16, align 4, !tbaa !9
  br label %230

230:                                              ; preds = %227, %221
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %17, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %17, align 4, !tbaa !9
  br label %216, !llvm.loop !20

234:                                              ; preds = %216
  %235 = load i32, ptr %16, align 4, !tbaa !9
  %236 = load i16, ptr %7, align 2, !tbaa !11
  %237 = zext i16 %236 to i32
  %238 = icmp ne i32 %235, %237
  br i1 %238, label %239, label %274

239:                                              ; preds = %234
  %240 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %241 = or i32 %240, 128
  store volatile i32 %241, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %242 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %243 = and i32 %242, -65
  store volatile i32 %243, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %244

244:                                              ; preds = %258, %239
  %245 = load i32, ptr %17, align 4, !tbaa !9
  %246 = load i16, ptr %7, align 2, !tbaa !11
  %247 = zext i16 %246 to i32
  %248 = icmp slt i32 %245, %247
  br i1 %248, label %249, label %261

249:                                              ; preds = %244
  %250 = load i32, ptr %17, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [16 x i32], ptr %15, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !9
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = load i32, ptr %17, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds i32, ptr %254, i64 %256
  store volatile i32 %253, ptr %257, align 4, !tbaa !9
  br label %258

258:                                              ; preds = %249
  %259 = load i32, ptr %17, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %17, align 4, !tbaa !9
  br label %244, !llvm.loop !21

261:                                              ; preds = %244
  %262 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %263 = or i32 %262, 1
  store volatile i32 %263, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  br label %264

264:                                              ; preds = %268, %261
  %265 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 4, !tbaa !9
  %266 = and i32 %265, 16
  %267 = icmp eq i32 %266, 0
  br i1 %267, label %268, label %269

268:                                              ; preds = %264
  br label %264, !llvm.loop !22

269:                                              ; preds = %264
  %270 = load i32, ptr %11, align 4, !tbaa !9
  %271 = add i32 %270, 1
  store i32 %271, ptr %11, align 4, !tbaa !9
  %272 = load i16, ptr %7, align 2, !tbaa !11
  %273 = zext i16 %272 to i32
  store i32 %273, ptr %16, align 4, !tbaa !9
  br label %274

274:                                              ; preds = %269, %234
  br label %275

275:                                              ; preds = %274, %140
  %276 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %277 = and i32 %276, 1048576
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %279, label %405

279:                                              ; preds = %275
  %280 = load i32, ptr %11, align 4, !tbaa !9
  %281 = icmp ugt i32 %280, 5
  br i1 %281, label %282, label %289

282:                                              ; preds = %279
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %283 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %284 = or i32 %283, 8388608
  store volatile i32 %284, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %285 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %286 = load i32, ptr %9, align 4, !tbaa !9
  %287 = or i32 %285, %286
  store volatile i32 %287, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %288 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %288, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %414

289:                                              ; preds = %279
  store volatile i32 20483, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  br label %290

290:                                              ; preds = %294, %289
  %291 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %292 = and i32 %291, 983040
  %293 = icmp ne i32 %292, 196608
  br i1 %293, label %294, label %295

294:                                              ; preds = %290
  br label %290, !llvm.loop !23

295:                                              ; preds = %290
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %328, %295
  %297 = load i32, ptr %17, align 4, !tbaa !9
  %298 = load i16, ptr %7, align 2, !tbaa !11
  %299 = zext i16 %298 to i32
  %300 = icmp slt i32 %297, %299
  br i1 %300, label %301, label %331

301:                                              ; preds = %296
  %302 = load i32, ptr %6, align 4, !tbaa !9
  %303 = load i32, ptr %17, align 4, !tbaa !9
  %304 = mul nsw i32 4, %303
  %305 = add i32 %302, %304
  %306 = zext i32 %305 to i64
  %307 = inttoptr i64 %306 to ptr
  %308 = load volatile i32, ptr %307, align 4, !tbaa !9
  store i32 %308, ptr %13, align 4, !tbaa !9
  %309 = load ptr, ptr %8, align 8, !tbaa !5
  %310 = load i32, ptr %17, align 4, !tbaa !9
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds i32, ptr %309, i64 %311
  %313 = load volatile i32, ptr %312, align 4, !tbaa !9
  %314 = xor i32 %313, -1
  %315 = load i32, ptr %13, align 4, !tbaa !9
  %316 = and i32 %314, %315
  %317 = load i32, ptr %17, align 4, !tbaa !9
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [16 x i32], ptr %14, i64 0, i64 %318
  store i32 %316, ptr %319, align 4, !tbaa !9
  %320 = load i32, ptr %17, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [16 x i32], ptr %14, i64 0, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !9
  %324 = xor i32 %323, -1
  %325 = load i32, ptr %17, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [16 x i32], ptr %15, i64 0, i64 %326
  store i32 %324, ptr %327, align 4, !tbaa !9
  br label %328

328:                                              ; preds = %301
  %329 = load i32, ptr %17, align 4, !tbaa !9
  %330 = add nsw i32 %329, 1
  store i32 %330, ptr %17, align 4, !tbaa !9
  br label %296, !llvm.loop !24

331:                                              ; preds = %296
  %332 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %333 = and i32 %332, -16
  %334 = or i32 %333, 0
  store volatile i32 %334, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  br label %335

335:                                              ; preds = %339, %331
  %336 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %337 = and i32 %336, 983040
  %338 = icmp ne i32 %337, 0
  br i1 %338, label %339, label %340

339:                                              ; preds = %335
  br label %335, !llvm.loop !25

340:                                              ; preds = %335
  %341 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  %342 = and i32 %341, -61441
  %343 = or i32 %342, 8192
  store volatile i32 %343, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !9
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %344 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %345 = or i32 %344, 8388608
  store volatile i32 %345, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %346

346:                                              ; preds = %361, %340
  %347 = load i32, ptr %17, align 4, !tbaa !9
  %348 = load i16, ptr %7, align 2, !tbaa !11
  %349 = zext i16 %348 to i32
  %350 = icmp slt i32 %347, %349
  br i1 %350, label %351, label %364

351:                                              ; preds = %346
  %352 = load i32, ptr %17, align 4, !tbaa !9
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [16 x i32], ptr %14, i64 0, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !9
  %356 = icmp eq i32 %355, 0
  br i1 %356, label %357, label %360

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

360:                                              ; preds = %357, %351
  br label %361

361:                                              ; preds = %360
  %362 = load i32, ptr %17, align 4, !tbaa !9
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %17, align 4, !tbaa !9
  br label %346, !llvm.loop !26

364:                                              ; preds = %346
  %365 = load i32, ptr %16, align 4, !tbaa !9
  %366 = load i16, ptr %7, align 2, !tbaa !11
  %367 = zext i16 %366 to i32
  %368 = icmp ne i32 %365, %367
  br i1 %368, label %369, label %404

369:                                              ; preds = %364
  %370 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %371 = or i32 %370, 128
  store volatile i32 %371, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %372 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %373 = and i32 %372, -65
  store volatile i32 %373, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %374

374:                                              ; preds = %388, %369
  %375 = load i32, ptr %17, align 4, !tbaa !9
  %376 = load i16, ptr %7, align 2, !tbaa !11
  %377 = zext i16 %376 to i32
  %378 = icmp slt i32 %375, %377
  br i1 %378, label %379, label %391

379:                                              ; preds = %374
  %380 = load i32, ptr %17, align 4, !tbaa !9
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [16 x i32], ptr %15, i64 0, i64 %381
  %383 = load i32, ptr %382, align 4, !tbaa !9
  %384 = load ptr, ptr %8, align 8, !tbaa !5
  %385 = load i32, ptr %17, align 4, !tbaa !9
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds i32, ptr %384, i64 %386
  store volatile i32 %383, ptr %387, align 4, !tbaa !9
  br label %388

388:                                              ; preds = %379
  %389 = load i32, ptr %17, align 4, !tbaa !9
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %17, align 4, !tbaa !9
  br label %374, !llvm.loop !27

391:                                              ; preds = %374
  %392 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %393 = or i32 %392, 1
  store volatile i32 %393, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  br label %394

394:                                              ; preds = %398, %391
  %395 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 4, !tbaa !9
  %396 = and i32 %395, 16
  %397 = icmp eq i32 %396, 0
  br i1 %397, label %398, label %399

398:                                              ; preds = %394
  br label %394, !llvm.loop !28

399:                                              ; preds = %394
  %400 = load i32, ptr %11, align 4, !tbaa !9
  %401 = add i32 %400, 1
  store i32 %401, ptr %11, align 4, !tbaa !9
  %402 = load i16, ptr %7, align 2, !tbaa !11
  %403 = zext i16 %402 to i32
  store i32 %403, ptr %16, align 4, !tbaa !9
  br label %404

404:                                              ; preds = %399, %364
  br label %405

405:                                              ; preds = %404, %275
  br label %130, !llvm.loop !29

406:                                              ; preds = %138
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 4, !tbaa !9
  %407 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %408 = or i32 %407, 8388608
  store volatile i32 %408, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !9
  %409 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  %410 = load i32, ptr %9, align 4, !tbaa !9
  %411 = or i32 %409, %410
  store volatile i32 %411, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !9
  br label %412

412:                                              ; preds = %406, %31
  %413 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %413, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %414

414:                                              ; preds = %412, %282, %147, %119, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  %415 = load i32, ptr %4, align 4
  ret i32 %415
}

; Function Attrs: nounwind uwtable
declare hidden i32 @MassWriteAddrValid(i32 noundef, i16 noundef zeroext) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!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 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}


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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @IsInBank0(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @IsInBank1(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 65536) i32 @Flash_FastWrite(ptr nocapture noundef readonly %0, i32 noundef %1, i16 noundef zeroext %2) #1 {
  %4 = alloca [16 x i32], align 16
  %5 = alloca [16 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #3
  %6 = tail call i32 @IsInBank0(i32 noundef %1)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %297

7:                                                ; preds = %3
  %8 = tail call i32 @IsInBank1(i32 noundef ptrtoint (ptr @Flash_FastWrite to i32))
  %.not102 = icmp eq i32 %8, 0
  br i1 %.not102, label %9, label %297

9:                                                ; preds = %7
  %spec.store.select = tail call i16 @llvm.umin.i16(i16 %2, i16 16)
  %10 = tail call i32 @MassWriteAddrValid(i32 noundef %1, i16 noundef zeroext %spec.store.select)
  %.not103 = icmp eq i32 %10, 0
  br i1 %.not103, label %297, label %11

11:                                               ; preds = %9
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 8, !tbaa !5
  %12 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %13 = or i32 %12, 8388608
  store volatile i32 %13, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %14 = add i32 %1, -131072
  %15 = lshr i32 %14, 12
  %16 = shl nuw i32 1, %15
  %17 = zext nneg i16 %spec.store.select to i32
  %18 = shl nuw nsw i32 %17, 2
  %19 = add i32 %1, -131073
  %20 = add i32 %19, %18
  %21 = lshr i32 %20, 12
  %22 = shl nuw i32 1, %21
  %23 = or i32 %22, %16
  %24 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !5
  %25 = and i32 %24, %23
  %26 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !5
  %27 = xor i32 %23, -1
  %28 = and i32 %26, %27
  store volatile i32 %28, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !5
  %.not149 = icmp eq i16 %2, 0
  br i1 %.not149, label %.lr.ph123.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %11
  %wide.trip.count = zext nneg i16 %spec.store.select to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %29 = icmp ult i16 %2, 4
  br i1 %29, label %.preheader118.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 28
  br label %.lr.ph

.preheader118.unr-lcssa:                          ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader118, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader118.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader118.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader118.unr-lcssa ]
  %30 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.epil
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.epil
  store volatile i32 %31, ptr %32, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader118, label %.lr.ph.epil, !llvm.loop !9

.preheader118:                                    ; preds = %.lr.ph.epil, %.preheader118.unr-lcssa
  %33 = icmp ult i16 %2, 16
  br i1 %33, label %.lr.ph123.preheader, label %._crit_edge

.lr.ph123.preheader:                              ; preds = %11, %.preheader118
  %34 = zext i16 %2 to i64
  %35 = or disjoint i16 %2, 16
  %narrow = sub nuw nsw i16 %35, %spec.store.select
  %wide.trip.count161 = zext nneg i16 %narrow to i64
  %36 = tail call i16 @llvm.umax.i16(i16 %2, i16 16)
  %37 = zext i16 %36 to i64
  %38 = sub nsw i64 %37, %34
  %xtraiter219 = and i64 %38, 7
  %lcmp.mod220.not = icmp eq i64 %xtraiter219, 0
  br i1 %lcmp.mod220.not, label %.lr.ph123.prol.loopexit, label %.lr.ph123.prol

.lr.ph123.prol:                                   ; preds = %.lr.ph123.preheader, %.lr.ph123.prol
  %indvars.iv159.prol = phi i64 [ %indvars.iv.next160.prol, %.lr.ph123.prol ], [ %34, %.lr.ph123.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph123.prol ], [ 0, %.lr.ph123.preheader ]
  %39 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv159.prol
  store volatile i32 -1, ptr %39, align 4, !tbaa !5
  %indvars.iv.next160.prol = add nuw nsw i64 %indvars.iv159.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter219
  br i1 %prol.iter.cmp.not, label %.lr.ph123.prol.loopexit, label %.lr.ph123.prol, !llvm.loop !11

.lr.ph123.prol.loopexit:                          ; preds = %.lr.ph123.prol, %.lr.ph123.preheader
  %indvars.iv159.unr = phi i64 [ %34, %.lr.ph123.preheader ], [ %indvars.iv.next160.prol, %.lr.ph123.prol ]
  %40 = sub nsw i64 %34, %37
  %41 = icmp ugt i64 %40, -8
  br i1 %41, label %._crit_edge, label %.lr.ph123

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %42 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv
  store volatile i32 %43, ptr %44, align 16, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %45 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next
  store volatile i32 %46, ptr %47, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %48 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.1
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next.1
  store volatile i32 %49, ptr %50, align 8, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %51 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.2
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next.2
  store volatile i32 %52, ptr %53, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader118.unr-lcssa, label %.lr.ph, !llvm.loop !12

.lr.ph123:                                        ; preds = %.lr.ph123.prol.loopexit, %.lr.ph123
  %indvars.iv159 = phi i64 [ %indvars.iv.next160.7, %.lr.ph123 ], [ %indvars.iv159.unr, %.lr.ph123.prol.loopexit ]
  %54 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv159
  store volatile i32 -1, ptr %54, align 4, !tbaa !5
  %gep = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 4), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep, align 4, !tbaa !5
  %gep241 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 8), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep241, align 4, !tbaa !5
  %gep242 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 12), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep242, align 4, !tbaa !5
  %gep243 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 16), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep243, align 4, !tbaa !5
  %gep244 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 20), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep244, align 4, !tbaa !5
  %gep245 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 24), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep245, align 4, !tbaa !5
  %gep246 = getelementptr i32, ptr getelementptr (i8, ptr inttoptr (i64 1073811552 to ptr), i64 28), i64 %indvars.iv159
  store volatile i32 -1, ptr %gep246, align 4, !tbaa !5
  %indvars.iv.next160.7 = add nuw nsw i64 %indvars.iv159, 8
  %exitcond162.not.7 = icmp eq i64 %indvars.iv.next160.7, %wide.trip.count161
  br i1 %exitcond162.not.7, label %._crit_edge, label %.lr.ph123, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph123.prol.loopexit, %.lr.ph123, %.preheader118
  %55 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %56 = or i32 %55, 192
  store volatile i32 %56, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %57 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %58 = and i32 %57, -7
  store volatile i32 %58, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %59 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %60 = and i32 %59, -57
  %61 = shl nuw nsw i32 %17, 1
  %62 = add nuw nsw i32 %61, 6
  %63 = and i32 %62, 120
  %64 = or i32 %60, %63
  store volatile i32 %64, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  store volatile i32 %1, ptr inttoptr (i64 1073811544 to ptr), align 8, !tbaa !5
  %65 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %66 = or i32 %65, 1
  store volatile i32 %66, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br label %67

67:                                               ; preds = %67, %._crit_edge
  %68 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 16, !tbaa !5
  %69 = and i32 %68, 16
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %67, label %71, !llvm.loop !15

71:                                               ; preds = %67
  %72 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %73 = and i32 %72, 2097152
  %.not104 = icmp eq i32 %73, 0
  br i1 %.not104, label %.preheader117, label %.sink.split

.preheader117:                                    ; preds = %71
  %wide.trip.count166 = zext nneg i16 %spec.store.select to i64
  %wide.trip.count171 = zext nneg i16 %spec.store.select to i64
  %wide.trip.count186 = zext nneg i16 %spec.store.select to i64
  %74 = add nsw i64 %wide.trip.count166, -1
  %xtraiter221 = and i64 %wide.trip.count166, 1
  %75 = icmp eq i64 %74, 0
  %unroll_iter224 = and i64 %wide.trip.count166, 30
  %lcmp.mod223.not = icmp eq i64 %xtraiter221, 0
  %min.iters.check199 = icmp ult i16 %2, 8
  %n.vec202 = and i64 %wide.trip.count166, 24
  %76 = getelementptr inbounds i8, ptr %5, i64 16
  %77 = icmp eq i64 %n.vec202, 8
  %78 = getelementptr inbounds i8, ptr %5, i64 32
  %79 = getelementptr inbounds i8, ptr %5, i64 48
  %cmp.n212 = icmp eq i64 %n.vec202, %wide.trip.count166
  %xtraiter226 = and i64 %wide.trip.count166, 3
  %80 = icmp ult i16 %2, 4
  %unroll_iter229 = and i64 %wide.trip.count166, 28
  %lcmp.mod228.not = icmp eq i64 %xtraiter226, 0
  %xtraiter231 = and i64 %wide.trip.count166, 1
  %81 = icmp eq i64 %74, 0
  %unroll_iter234 = and i64 %wide.trip.count166, 30
  %lcmp.mod233.not = icmp eq i64 %xtraiter231, 0
  %min.iters.check = icmp ult i16 %2, 8
  %n.vec = and i64 %wide.trip.count166, 24
  %82 = getelementptr inbounds i8, ptr %4, i64 16
  %83 = icmp eq i64 %n.vec, 8
  %84 = getelementptr inbounds i8, ptr %4, i64 32
  %85 = getelementptr inbounds i8, ptr %4, i64 48
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count166
  %xtraiter236 = and i64 %wide.trip.count166, 3
  %86 = icmp ult i16 %2, 4
  %unroll_iter239 = and i64 %wide.trip.count166, 28
  %lcmp.mod238.not = icmp eq i64 %xtraiter236, 0
  br label %87

87:                                               ; preds = %.backedge, %.preheader117
  %.098 = phi i32 [ 1, %.preheader117 ], [ %.098.be, %.backedge ]
  %88 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %89 = and i32 %88, 524288
  %.not105 = icmp eq i32 %89, 0
  br i1 %.not105, label %90, label %.critedge

90:                                               ; preds = %87
  %91 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %92 = and i32 %91, 1048576
  %.not106 = icmp eq i32 %92, 0
  br i1 %.not106, label %.sink.split, label %.critedge

.critedge:                                        ; preds = %87, %90
  %93 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %94 = and i32 %93, 524288
  %.not107 = icmp eq i32 %94, 0
  br i1 %.not107, label %194, label %95

95:                                               ; preds = %.critedge
  %96 = icmp ugt i32 %.098, 5
  br i1 %96, label %.sink.split, label %97

97:                                               ; preds = %95
  store volatile i32 20483, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  br label %98

98:                                               ; preds = %98, %97
  %99 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %100 = and i32 %99, 983040
  %.not108 = icmp eq i32 %100, 196608
  br i1 %.not108, label %.preheader116, label %98, !llvm.loop !16

.preheader116:                                    ; preds = %98
  br i1 %.not149, label %._crit_edge126, label %.lr.ph125.preheader

.lr.ph125.preheader:                              ; preds = %.preheader116
  br i1 %75, label %._crit_edge126.loopexit.unr-lcssa, label %.lr.ph125

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %.lr.ph125
  %indvars.iv163 = phi i64 [ %indvars.iv.next164.1, %.lr.ph125 ], [ 0, %.lr.ph125.preheader ]
  %niter225 = phi i64 [ %niter225.next.1, %.lr.ph125 ], [ 0, %.lr.ph125.preheader ]
  %indvars.iv163.tr = trunc i64 %indvars.iv163 to i32
  %101 = shl i32 %indvars.iv163.tr, 2
  %102 = add i32 %101, %1
  %103 = zext i32 %102 to i64
  %104 = inttoptr i64 %103 to ptr
  %105 = load volatile i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv163
  %107 = load volatile i32, ptr %106, align 8, !tbaa !5
  %108 = or i32 %107, %105
  %109 = xor i32 %108, -1
  %110 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv163
  store i32 %109, ptr %110, align 8, !tbaa !5
  %111 = load volatile i32, ptr %106, align 8, !tbaa !5
  %112 = or i32 %111, %109
  %113 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv163
  store i32 %112, ptr %113, align 8, !tbaa !5
  %indvars.iv.next164 = or disjoint i64 %indvars.iv163, 1
  %indvars.iv163.tr.1 = trunc i64 %indvars.iv.next164 to i32
  %114 = shl i32 %indvars.iv163.tr.1, 2
  %115 = add i32 %114, %1
  %116 = zext i32 %115 to i64
  %117 = inttoptr i64 %116 to ptr
  %118 = load volatile i32, ptr %117, align 4, !tbaa !5
  %119 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next164
  %120 = load volatile i32, ptr %119, align 4, !tbaa !5
  %121 = or i32 %120, %118
  %122 = xor i32 %121, -1
  %123 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv.next164
  store i32 %122, ptr %123, align 4, !tbaa !5
  %124 = load volatile i32, ptr %119, align 4, !tbaa !5
  %125 = or i32 %124, %122
  %126 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next164
  store i32 %125, ptr %126, align 4, !tbaa !5
  %indvars.iv.next164.1 = add nuw nsw i64 %indvars.iv163, 2
  %niter225.next.1 = add i64 %niter225, 2
  %niter225.ncmp.1 = icmp eq i64 %niter225.next.1, %unroll_iter224
  br i1 %niter225.ncmp.1, label %._crit_edge126.loopexit.unr-lcssa, label %.lr.ph125, !llvm.loop !17

._crit_edge126.loopexit.unr-lcssa:                ; preds = %.lr.ph125, %.lr.ph125.preheader
  %indvars.iv163.unr = phi i64 [ 0, %.lr.ph125.preheader ], [ %indvars.iv.next164.1, %.lr.ph125 ]
  br i1 %lcmp.mod223.not, label %._crit_edge126, label %.lr.ph125.epil

.lr.ph125.epil:                                   ; preds = %._crit_edge126.loopexit.unr-lcssa
  %indvars.iv163.tr.epil = trunc i64 %indvars.iv163.unr to i32
  %127 = shl i32 %indvars.iv163.tr.epil, 2
  %128 = add i32 %127, %1
  %129 = zext i32 %128 to i64
  %130 = inttoptr i64 %129 to ptr
  %131 = load volatile i32, ptr %130, align 4, !tbaa !5
  %132 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv163.unr
  %133 = load volatile i32, ptr %132, align 4, !tbaa !5
  %134 = or i32 %133, %131
  %135 = xor i32 %134, -1
  %136 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv163.unr
  store i32 %135, ptr %136, align 4, !tbaa !5
  %137 = load volatile i32, ptr %132, align 4, !tbaa !5
  %138 = or i32 %137, %135
  %139 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv163.unr
  store i32 %138, ptr %139, align 4, !tbaa !5
  br label %._crit_edge126

._crit_edge126:                                   ; preds = %.lr.ph125.epil, %._crit_edge126.loopexit.unr-lcssa, %.preheader116
  %140 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %141 = and i32 %140, -16
  store volatile i32 %141, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  br label %142

142:                                              ; preds = %142, %._crit_edge126
  %143 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %144 = and i32 %143, 983040
  %.not109 = icmp eq i32 %144, 0
  br i1 %.not109, label %145, label %142, !llvm.loop !18

145:                                              ; preds = %142
  %146 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %147 = and i32 %146, -61441
  %148 = or disjoint i32 %147, 8192
  store volatile i32 %148, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 8, !tbaa !5
  %149 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %150 = or i32 %149, 8388608
  store volatile i32 %150, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br i1 %.not149, label %._crit_edge131, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %145
  br i1 %min.iters.check199, label %.lr.ph130.preheader215, label %vector.body204

vector.body204:                                   ; preds = %.lr.ph130.preheader
  %wide.load208 = load <4 x i32>, ptr %5, align 16, !tbaa !5
  %wide.load209 = load <4 x i32>, ptr %76, align 16, !tbaa !5
  %151 = icmp eq <4 x i32> %wide.load208, <i32 -1, i32 -1, i32 -1, i32 -1>
  %152 = icmp eq <4 x i32> %wide.load209, <i32 -1, i32 -1, i32 -1, i32 -1>
  %153 = zext <4 x i1> %151 to <4 x i32>
  %154 = zext <4 x i1> %152 to <4 x i32>
  br i1 %77, label %middle.block197, label %vector.body204.1, !llvm.loop !19

vector.body204.1:                                 ; preds = %vector.body204
  %wide.load208.1 = load <4 x i32>, ptr %78, align 16, !tbaa !5
  %wide.load209.1 = load <4 x i32>, ptr %79, align 16, !tbaa !5
  %155 = icmp eq <4 x i32> %wide.load208.1, <i32 -1, i32 -1, i32 -1, i32 -1>
  %156 = icmp eq <4 x i32> %wide.load209.1, <i32 -1, i32 -1, i32 -1, i32 -1>
  %157 = zext <4 x i1> %155 to <4 x i32>
  %158 = zext <4 x i1> %156 to <4 x i32>
  %159 = add nuw nsw <4 x i32> %153, %157
  %160 = add nuw nsw <4 x i32> %154, %158
  br label %middle.block197

middle.block197:                                  ; preds = %vector.body204.1, %vector.body204
  %.lcssa216 = phi <4 x i32> [ %153, %vector.body204 ], [ %159, %vector.body204.1 ]
  %.lcssa = phi <4 x i32> [ %154, %vector.body204 ], [ %160, %vector.body204.1 ]
  %bin.rdx211 = add nsw <4 x i32> %.lcssa, %.lcssa216
  %161 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx211)
  br i1 %cmp.n212, label %._crit_edge131, label %.lr.ph130.preheader215

.lr.ph130.preheader215:                           ; preds = %middle.block197, %.lr.ph130.preheader
  %indvars.iv168.ph = phi i64 [ 0, %.lr.ph130.preheader ], [ %n.vec202, %middle.block197 ]
  %.190127.ph = phi i32 [ 0, %.lr.ph130.preheader ], [ %161, %middle.block197 ]
  br label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph130.preheader215, %.lr.ph130
  %indvars.iv168 = phi i64 [ %indvars.iv.next169, %.lr.ph130 ], [ %indvars.iv168.ph, %.lr.ph130.preheader215 ]
  %.190127 = phi i32 [ %spec.select, %.lr.ph130 ], [ %.190127.ph, %.lr.ph130.preheader215 ]
  %162 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv168
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp eq i32 %163, -1
  %165 = zext i1 %164 to i32
  %spec.select = add nuw nsw i32 %.190127, %165
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond172.not = icmp eq i64 %indvars.iv.next169, %wide.trip.count171
  br i1 %exitcond172.not, label %._crit_edge131, label %.lr.ph130, !llvm.loop !22

._crit_edge131:                                   ; preds = %.lr.ph130, %middle.block197, %145
  %.190.lcssa = phi i32 [ 0, %145 ], [ %161, %middle.block197 ], [ %spec.select, %.lr.ph130 ]
  %.not110 = icmp eq i32 %.190.lcssa, %17
  br i1 %.not110, label %194, label %166

166:                                              ; preds = %._crit_edge131
  %167 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %168 = or i32 %167, 128
  store volatile i32 %168, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %169 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %170 = and i32 %169, -65
  store volatile i32 %170, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br i1 %.not149, label %._crit_edge135, label %.lr.ph134.preheader

.lr.ph134.preheader:                              ; preds = %166
  br i1 %80, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134

.lr.ph134:                                        ; preds = %.lr.ph134.preheader, %.lr.ph134
  %indvars.iv173 = phi i64 [ %indvars.iv.next174.3, %.lr.ph134 ], [ 0, %.lr.ph134.preheader ]
  %niter230 = phi i64 [ %niter230.next.3, %.lr.ph134 ], [ 0, %.lr.ph134.preheader ]
  %171 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv173
  %172 = load i32, ptr %171, align 16, !tbaa !5
  %173 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv173
  store volatile i32 %172, ptr %173, align 16, !tbaa !5
  %indvars.iv.next174 = or disjoint i64 %indvars.iv173, 1
  %174 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next174
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next174
  store volatile i32 %175, ptr %176, align 4, !tbaa !5
  %indvars.iv.next174.1 = or disjoint i64 %indvars.iv173, 2
  %177 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next174.1
  %178 = load i32, ptr %177, align 8, !tbaa !5
  %179 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next174.1
  store volatile i32 %178, ptr %179, align 8, !tbaa !5
  %indvars.iv.next174.2 = or disjoint i64 %indvars.iv173, 3
  %180 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next174.2
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next174.2
  store volatile i32 %181, ptr %182, align 4, !tbaa !5
  %indvars.iv.next174.3 = add nuw nsw i64 %indvars.iv173, 4
  %niter230.next.3 = add i64 %niter230, 4
  %niter230.ncmp.3 = icmp eq i64 %niter230.next.3, %unroll_iter229
  br i1 %niter230.ncmp.3, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134, !llvm.loop !23

._crit_edge135.loopexit.unr-lcssa:                ; preds = %.lr.ph134, %.lr.ph134.preheader
  %indvars.iv173.unr = phi i64 [ 0, %.lr.ph134.preheader ], [ %indvars.iv.next174.3, %.lr.ph134 ]
  br i1 %lcmp.mod228.not, label %._crit_edge135, label %.lr.ph134.epil

.lr.ph134.epil:                                   ; preds = %._crit_edge135.loopexit.unr-lcssa, %.lr.ph134.epil
  %indvars.iv173.epil = phi i64 [ %indvars.iv.next174.epil, %.lr.ph134.epil ], [ %indvars.iv173.unr, %._crit_edge135.loopexit.unr-lcssa ]
  %epil.iter227 = phi i64 [ %epil.iter227.next, %.lr.ph134.epil ], [ 0, %._crit_edge135.loopexit.unr-lcssa ]
  %183 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv173.epil
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv173.epil
  store volatile i32 %184, ptr %185, align 4, !tbaa !5
  %indvars.iv.next174.epil = add nuw nsw i64 %indvars.iv173.epil, 1
  %epil.iter227.next = add i64 %epil.iter227, 1
  %epil.iter227.cmp.not = icmp eq i64 %epil.iter227.next, %xtraiter226
  br i1 %epil.iter227.cmp.not, label %._crit_edge135, label %.lr.ph134.epil, !llvm.loop !24

._crit_edge135:                                   ; preds = %._crit_edge135.loopexit.unr-lcssa, %.lr.ph134.epil, %166
  %186 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %187 = or i32 %186, 1
  store volatile i32 %187, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br label %188

188:                                              ; preds = %188, %._crit_edge135
  %189 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 16, !tbaa !5
  %190 = and i32 %189, 16
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %188, label %192, !llvm.loop !25

192:                                              ; preds = %188
  %193 = add nuw nsw i32 %.098, 1
  br label %194

194:                                              ; preds = %._crit_edge131, %192, %.critedge
  %.199 = phi i32 [ %193, %192 ], [ %.098, %._crit_edge131 ], [ %.098, %.critedge ]
  %195 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %196 = and i32 %195, 1048576
  %.not111 = icmp eq i32 %196, 0
  br i1 %.not111, label %.backedge, label %197

197:                                              ; preds = %194
  %198 = icmp ugt i32 %.199, 5
  br i1 %198, label %.sink.split, label %199

199:                                              ; preds = %197
  store volatile i32 20483, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  br label %200

200:                                              ; preds = %200, %199
  %201 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %202 = and i32 %201, 983040
  %.not112 = icmp eq i32 %202, 196608
  br i1 %.not112, label %.preheader, label %200, !llvm.loop !26

.preheader:                                       ; preds = %200
  br i1 %.not149, label %._crit_edge138, label %.lr.ph137.preheader

.lr.ph137.preheader:                              ; preds = %.preheader
  br i1 %81, label %._crit_edge138.loopexit.unr-lcssa, label %.lr.ph137

.lr.ph137:                                        ; preds = %.lr.ph137.preheader, %.lr.ph137
  %indvars.iv178 = phi i64 [ %indvars.iv.next179.1, %.lr.ph137 ], [ 0, %.lr.ph137.preheader ]
  %niter235 = phi i64 [ %niter235.next.1, %.lr.ph137 ], [ 0, %.lr.ph137.preheader ]
  %indvars.iv178.tr = trunc i64 %indvars.iv178 to i32
  %203 = shl i32 %indvars.iv178.tr, 2
  %204 = add i32 %203, %1
  %205 = zext i32 %204 to i64
  %206 = inttoptr i64 %205 to ptr
  %207 = load volatile i32, ptr %206, align 4, !tbaa !5
  %208 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv178
  %209 = load volatile i32, ptr %208, align 8, !tbaa !5
  %210 = xor i32 %209, -1
  %211 = and i32 %207, %210
  %212 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv178
  store i32 %211, ptr %212, align 8, !tbaa !5
  %213 = xor i32 %211, -1
  %214 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv178
  store i32 %213, ptr %214, align 8, !tbaa !5
  %indvars.iv.next179 = or disjoint i64 %indvars.iv178, 1
  %indvars.iv178.tr.1 = trunc i64 %indvars.iv.next179 to i32
  %215 = shl i32 %indvars.iv178.tr.1, 2
  %216 = add i32 %215, %1
  %217 = zext i32 %216 to i64
  %218 = inttoptr i64 %217 to ptr
  %219 = load volatile i32, ptr %218, align 4, !tbaa !5
  %220 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next179
  %221 = load volatile i32, ptr %220, align 4, !tbaa !5
  %222 = xor i32 %221, -1
  %223 = and i32 %219, %222
  %224 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv.next179
  store i32 %223, ptr %224, align 4, !tbaa !5
  %225 = xor i32 %223, -1
  %226 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next179
  store i32 %225, ptr %226, align 4, !tbaa !5
  %indvars.iv.next179.1 = add nuw nsw i64 %indvars.iv178, 2
  %niter235.next.1 = add i64 %niter235, 2
  %niter235.ncmp.1 = icmp eq i64 %niter235.next.1, %unroll_iter234
  br i1 %niter235.ncmp.1, label %._crit_edge138.loopexit.unr-lcssa, label %.lr.ph137, !llvm.loop !27

._crit_edge138.loopexit.unr-lcssa:                ; preds = %.lr.ph137, %.lr.ph137.preheader
  %indvars.iv178.unr = phi i64 [ 0, %.lr.ph137.preheader ], [ %indvars.iv.next179.1, %.lr.ph137 ]
  br i1 %lcmp.mod233.not, label %._crit_edge138, label %.lr.ph137.epil

.lr.ph137.epil:                                   ; preds = %._crit_edge138.loopexit.unr-lcssa
  %indvars.iv178.tr.epil = trunc i64 %indvars.iv178.unr to i32
  %227 = shl i32 %indvars.iv178.tr.epil, 2
  %228 = add i32 %227, %1
  %229 = zext i32 %228 to i64
  %230 = inttoptr i64 %229 to ptr
  %231 = load volatile i32, ptr %230, align 4, !tbaa !5
  %232 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv178.unr
  %233 = load volatile i32, ptr %232, align 4, !tbaa !5
  %234 = xor i32 %233, -1
  %235 = and i32 %231, %234
  %236 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv178.unr
  store i32 %235, ptr %236, align 4, !tbaa !5
  %237 = xor i32 %235, -1
  %238 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv178.unr
  store i32 %237, ptr %238, align 4, !tbaa !5
  br label %._crit_edge138

._crit_edge138:                                   ; preds = %.lr.ph137.epil, %._crit_edge138.loopexit.unr-lcssa, %.preheader
  %239 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %240 = and i32 %239, -16
  store volatile i32 %240, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  br label %241

241:                                              ; preds = %241, %._crit_edge138
  %242 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %243 = and i32 %242, 983040
  %.not113 = icmp eq i32 %243, 0
  br i1 %.not113, label %244, label %241, !llvm.loop !28

244:                                              ; preds = %241
  %245 = load volatile i32, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  %246 = and i32 %245, -61441
  %247 = or disjoint i32 %246, 8192
  store volatile i32 %247, ptr inttoptr (i64 1073811476 to ptr), align 4, !tbaa !5
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 8, !tbaa !5
  %248 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %249 = or i32 %248, 8388608
  store volatile i32 %249, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br i1 %.not149, label %._crit_edge143, label %.lr.ph142.preheader

.lr.ph142.preheader:                              ; preds = %244
  br i1 %min.iters.check, label %.lr.ph142.preheader214, label %vector.body

vector.body:                                      ; preds = %.lr.ph142.preheader
  %wide.load = load <4 x i32>, ptr %4, align 16, !tbaa !5
  %wide.load196 = load <4 x i32>, ptr %82, align 16, !tbaa !5
  %250 = icmp eq <4 x i32> %wide.load, zeroinitializer
  %251 = icmp eq <4 x i32> %wide.load196, zeroinitializer
  %252 = zext <4 x i1> %250 to <4 x i32>
  %253 = zext <4 x i1> %251 to <4 x i32>
  br i1 %83, label %middle.block, label %vector.body.1, !llvm.loop !29

vector.body.1:                                    ; preds = %vector.body
  %wide.load.1 = load <4 x i32>, ptr %84, align 16, !tbaa !5
  %wide.load196.1 = load <4 x i32>, ptr %85, align 16, !tbaa !5
  %254 = icmp eq <4 x i32> %wide.load.1, zeroinitializer
  %255 = icmp eq <4 x i32> %wide.load196.1, zeroinitializer
  %256 = zext <4 x i1> %254 to <4 x i32>
  %257 = zext <4 x i1> %255 to <4 x i32>
  %258 = add nuw nsw <4 x i32> %252, %256
  %259 = add nuw nsw <4 x i32> %253, %257
  br label %middle.block

middle.block:                                     ; preds = %vector.body.1, %vector.body
  %.lcssa218 = phi <4 x i32> [ %252, %vector.body ], [ %258, %vector.body.1 ]
  %.lcssa217 = phi <4 x i32> [ %253, %vector.body ], [ %259, %vector.body.1 ]
  %bin.rdx = add nsw <4 x i32> %.lcssa217, %.lcssa218
  %260 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge143, label %.lr.ph142.preheader214

.lr.ph142.preheader214:                           ; preds = %middle.block, %.lr.ph142.preheader
  %indvars.iv183.ph = phi i64 [ 0, %.lr.ph142.preheader ], [ %n.vec, %middle.block ]
  %.493139.ph = phi i32 [ 0, %.lr.ph142.preheader ], [ %260, %middle.block ]
  br label %.lr.ph142

.lr.ph142:                                        ; preds = %.lr.ph142.preheader214, %.lr.ph142
  %indvars.iv183 = phi i64 [ %indvars.iv.next184, %.lr.ph142 ], [ %indvars.iv183.ph, %.lr.ph142.preheader214 ]
  %.493139 = phi i32 [ %spec.select115, %.lr.ph142 ], [ %.493139.ph, %.lr.ph142.preheader214 ]
  %261 = getelementptr inbounds [16 x i32], ptr %4, i64 0, i64 %indvars.iv183
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = icmp eq i32 %262, 0
  %264 = zext i1 %263 to i32
  %spec.select115 = add nuw nsw i32 %.493139, %264
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %exitcond187.not = icmp eq i64 %indvars.iv.next184, %wide.trip.count186
  br i1 %exitcond187.not, label %._crit_edge143, label %.lr.ph142, !llvm.loop !30

._crit_edge143:                                   ; preds = %.lr.ph142, %middle.block, %244
  %.493.lcssa = phi i32 [ 0, %244 ], [ %260, %middle.block ], [ %spec.select115, %.lr.ph142 ]
  %.not114 = icmp eq i32 %.493.lcssa, %17
  br i1 %.not114, label %.backedge, label %265

.backedge:                                        ; preds = %._crit_edge143, %291, %194
  %.098.be = phi i32 [ %292, %291 ], [ %.199, %._crit_edge143 ], [ %.199, %194 ]
  br label %87, !llvm.loop !31

265:                                              ; preds = %._crit_edge143
  %266 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %267 = or i32 %266, 128
  store volatile i32 %267, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %268 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %269 = and i32 %268, -65
  store volatile i32 %269, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br i1 %.not149, label %._crit_edge148, label %.lr.ph147.preheader

.lr.ph147.preheader:                              ; preds = %265
  br i1 %86, label %._crit_edge148.loopexit.unr-lcssa, label %.lr.ph147

.lr.ph147:                                        ; preds = %.lr.ph147.preheader, %.lr.ph147
  %indvars.iv188 = phi i64 [ %indvars.iv.next189.3, %.lr.ph147 ], [ 0, %.lr.ph147.preheader ]
  %niter240 = phi i64 [ %niter240.next.3, %.lr.ph147 ], [ 0, %.lr.ph147.preheader ]
  %270 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv188
  %271 = load i32, ptr %270, align 16, !tbaa !5
  %272 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv188
  store volatile i32 %271, ptr %272, align 16, !tbaa !5
  %indvars.iv.next189 = or disjoint i64 %indvars.iv188, 1
  %273 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next189
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next189
  store volatile i32 %274, ptr %275, align 4, !tbaa !5
  %indvars.iv.next189.1 = or disjoint i64 %indvars.iv188, 2
  %276 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next189.1
  %277 = load i32, ptr %276, align 8, !tbaa !5
  %278 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next189.1
  store volatile i32 %277, ptr %278, align 8, !tbaa !5
  %indvars.iv.next189.2 = or disjoint i64 %indvars.iv188, 3
  %279 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv.next189.2
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv.next189.2
  store volatile i32 %280, ptr %281, align 4, !tbaa !5
  %indvars.iv.next189.3 = add nuw nsw i64 %indvars.iv188, 4
  %niter240.next.3 = add i64 %niter240, 4
  %niter240.ncmp.3 = icmp eq i64 %niter240.next.3, %unroll_iter239
  br i1 %niter240.ncmp.3, label %._crit_edge148.loopexit.unr-lcssa, label %.lr.ph147, !llvm.loop !32

._crit_edge148.loopexit.unr-lcssa:                ; preds = %.lr.ph147, %.lr.ph147.preheader
  %indvars.iv188.unr = phi i64 [ 0, %.lr.ph147.preheader ], [ %indvars.iv.next189.3, %.lr.ph147 ]
  br i1 %lcmp.mod238.not, label %._crit_edge148, label %.lr.ph147.epil

.lr.ph147.epil:                                   ; preds = %._crit_edge148.loopexit.unr-lcssa, %.lr.ph147.epil
  %indvars.iv188.epil = phi i64 [ %indvars.iv.next189.epil, %.lr.ph147.epil ], [ %indvars.iv188.unr, %._crit_edge148.loopexit.unr-lcssa ]
  %epil.iter237 = phi i64 [ %epil.iter237.next, %.lr.ph147.epil ], [ 0, %._crit_edge148.loopexit.unr-lcssa ]
  %282 = getelementptr inbounds [16 x i32], ptr %5, i64 0, i64 %indvars.iv188.epil
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = getelementptr inbounds i32, ptr inttoptr (i64 1073811552 to ptr), i64 %indvars.iv188.epil
  store volatile i32 %283, ptr %284, align 4, !tbaa !5
  %indvars.iv.next189.epil = add nuw nsw i64 %indvars.iv188.epil, 1
  %epil.iter237.next = add i64 %epil.iter237, 1
  %epil.iter237.cmp.not = icmp eq i64 %epil.iter237.next, %xtraiter236
  br i1 %epil.iter237.cmp.not, label %._crit_edge148, label %.lr.ph147.epil, !llvm.loop !33

._crit_edge148:                                   ; preds = %._crit_edge148.loopexit.unr-lcssa, %.lr.ph147.epil, %265
  %285 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %286 = or i32 %285, 1
  store volatile i32 %286, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  br label %287

287:                                              ; preds = %287, %._crit_edge148
  %288 = load volatile i32, ptr inttoptr (i64 1073811696 to ptr), align 16, !tbaa !5
  %289 = and i32 %288, 16
  %290 = icmp eq i32 %289, 0
  br i1 %290, label %287, label %291, !llvm.loop !34

291:                                              ; preds = %287
  %292 = add nuw nsw i32 %.199, 1
  br label %.backedge

.sink.split:                                      ; preds = %90, %197, %95, %71
  %.097.ph = phi i32 [ 0, %71 ], [ %17, %95 ], [ %17, %197 ], [ %17, %90 ]
  store volatile i32 534, ptr inttoptr (i64 1073811704 to ptr), align 8, !tbaa !5
  %293 = load volatile i32, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %294 = or i32 %293, 8388608
  store volatile i32 %294, ptr inttoptr (i64 1073811540 to ptr), align 4, !tbaa !5
  %295 = load volatile i32, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !5
  %296 = or i32 %295, %25
  store volatile i32 %296, ptr inttoptr (i64 1073811652 to ptr), align 4, !tbaa !5
  br label %297

297:                                              ; preds = %.sink.split, %9, %3, %7
  %.097 = phi i32 [ 0, %7 ], [ 0, %3 ], [ 0, %9 ], [ %.097.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #3
  ret i32 %.097
}

; Function Attrs: nounwind uwtable
declare hidden i32 @MassWriteAddrValid(i32 noundef, i16 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.umin.i16(i16, i16) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.umax.i16(i16, i16) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !13, !21, !20}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !13}
!29 = distinct !{!29, !13, !20, !21}
!30 = distinct !{!30, !13, !21, !20}
!31 = distinct !{!31, !13}
!32 = distinct !{!32, !13}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !13}


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