; LLVM IR from BrunoLevy/learn-fpga :: FemtoRV/FIRMWARE/EXAMPLES/DATA (test_ST_NICCC)

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

@cur_spi = external dso_local global i32, align 4
@read_frame.frame = external hidden global i32, align 4
@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@cmap = external dso_local global [16 x i16], align 16
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@X = external dso_local global [255 x i32], align 16
@Y = external dso_local global [255 x i32], align 16
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@poly = external dso_local global [30 x i32], align 16
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @next_spi_byte() #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @next_spi_word() #0

; Function Attrs: nounwind uwtable
declare dso_local void @printb(i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @read_frame() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i16, align 2
  %4 = alloca i32, align 4
  %5 = alloca i16, align 2
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = load i32, ptr @read_frame.frame, align 4, !tbaa !5
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %19)
  %21 = load i32, ptr @read_frame.frame, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr @read_frame.frame, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #3
  %23 = call zeroext i8 @next_spi_byte()
  store i8 %23, ptr %2, align 1, !tbaa !9
  %24 = load i8, ptr %2, align 1, !tbaa !9
  %25 = zext i8 %24 to i32
  %26 = load i8, ptr %2, align 1, !tbaa !9
  %27 = zext i8 %26 to i32
  %28 = and i32 %27, 1
  %29 = icmp ne i32 %28, 0
  %30 = zext i1 %29 to i64
  %31 = select i1 %29, i32 67, i32 95
  %32 = load i8, ptr %2, align 1, !tbaa !9
  %33 = zext i8 %32 to i32
  %34 = and i32 %33, 2
  %35 = icmp ne i32 %34, 0
  %36 = zext i1 %35 to i64
  %37 = select i1 %35, i32 80, i32 95
  %38 = load i8, ptr %2, align 1, !tbaa !9
  %39 = zext i8 %38 to i32
  %40 = and i32 %39, 4
  %41 = icmp ne i32 %40, 0
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, i32 73, i32 95
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %25, i32 noundef %31, i32 noundef %37, i32 noundef %43)
  %45 = load i8, ptr %2, align 1, !tbaa !9
  %46 = zext i8 %45 to i32
  %47 = and i32 %46, 1
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %0
  br label %50

50:                                               ; preds = %49, %0
  %51 = load i8, ptr %2, align 1, !tbaa !9
  %52 = zext i8 %51 to i32
  %53 = and i32 %52, 2
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %109

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 2, ptr %3) #3
  %56 = call zeroext i16 @next_spi_word()
  store i16 %56, ptr %3, align 2, !tbaa !10
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %58 = load i16, ptr %3, align 2, !tbaa !10
  %59 = zext i16 %58 to i32
  call void @printb(i32 noundef %59)
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %105, %55
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 16
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %108

65:                                               ; preds = %61
  %66 = load i16, ptr %3, align 2, !tbaa !10
  %67 = zext i16 %66 to i32
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = shl i32 1, %68
  %70 = and i32 %67, %69
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %104

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #3
  %73 = call zeroext i16 @next_spi_word()
  store i16 %73, ptr %5, align 2, !tbaa !10
  %74 = load i16, ptr %5, align 2, !tbaa !10
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sub nsw i32 15, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [16 x i16], ptr @cmap, i64 0, i64 %77
  store i16 %74, ptr %78, align 2, !tbaa !10
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sub nsw i32 15, %79
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %80)
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %83 = load i16, ptr %5, align 2, !tbaa !10
  %84 = zext i16 %83 to i32
  call void @printb(i32 noundef %84)
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %86 = load i16, ptr %5, align 2, !tbaa !10
  %87 = zext i16 %86 to i32
  %88 = and i32 %87, 7
  store i32 %88, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %89 = load i16, ptr %5, align 2, !tbaa !10
  %90 = zext i16 %89 to i32
  %91 = and i32 %90, 112
  %92 = ashr i32 %91, 4
  store i32 %92, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %93 = load i16, ptr %5, align 2, !tbaa !10
  %94 = zext i16 %93 to i32
  %95 = and i32 %94, 1792
  %96 = ashr i32 %95, 8
  store i32 %96, ptr %8, align 4, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = shl i32 %97, 5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = shl i32 %99, 5
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = shl i32 %101, 5
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %98, i32 noundef %100, i32 noundef %102)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  br label %104

104:                                              ; preds = %72, %65
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %4, align 4, !tbaa !5
  br label %61, !llvm.loop !12

108:                                              ; preds = %64
  call void @llvm.lifetime.end.p0(i64 2, ptr %3) #3
  br label %109

109:                                              ; preds = %108, %50
  %110 = load i8, ptr %2, align 1, !tbaa !9
  %111 = zext i8 %110 to i32
  %112 = and i32 %111, 1
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  br label %115

115:                                              ; preds = %114, %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %127, %115
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = icmp slt i32 %117, 255
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %130

120:                                              ; preds = %116
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %122
  store i32 65536, ptr %123, align 4, !tbaa !5
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %125
  store i32 65536, ptr %126, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %120
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !5
  br label %116, !llvm.loop !14

130:                                              ; preds = %119
  %131 = load i8, ptr %2, align 1, !tbaa !9
  %132 = zext i8 %131 to i32
  %133 = and i32 %132, 4
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %173

135:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %136 = call zeroext i8 @next_spi_byte()
  store i8 %136, ptr %10, align 1, !tbaa !9
  %137 = load i8, ptr %10, align 1, !tbaa !9
  %138 = zext i8 %137 to i32
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %138)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %169, %135
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = load i8, ptr %10, align 1, !tbaa !9
  %143 = zext i8 %142 to i32
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %172

146:                                              ; preds = %140
  %147 = call zeroext i8 @next_spi_byte()
  %148 = zext i8 %147 to i32
  %149 = ashr i32 %148, 1
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %151
  store i32 %149, ptr %152, align 4, !tbaa !5
  %153 = call zeroext i8 @next_spi_byte()
  %154 = zext i8 %153 to i32
  %155 = ashr i32 %154, 1
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %157
  store i32 %155, ptr %158, align 4, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr %11, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %159, i32 noundef %163, i32 noundef %167)
  br label %169

169:                                              ; preds = %146
  %170 = load i32, ptr %11, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %11, align 4, !tbaa !5
  br label %140, !llvm.loop !15

172:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  br label %173

173:                                              ; preds = %172, %130
  br label %174

174:                                              ; preds = %316, %173
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  %175 = call zeroext i8 @next_spi_byte()
  store i8 %175, ptr %12, align 1, !tbaa !9
  %176 = load i8, ptr %12, align 1, !tbaa !9
  %177 = zext i8 %176 to i32
  %178 = icmp eq i32 %177, 255
  br i1 %178, label %179, label %180

179:                                              ; preds = %174
  store i32 11, ptr %13, align 4
  br label %314

180:                                              ; preds = %174
  %181 = load i8, ptr %12, align 1, !tbaa !9
  %182 = zext i8 %181 to i32
  %183 = icmp eq i32 %182, 254
  br i1 %183, label %184, label %193

184:                                              ; preds = %180
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  br label %186

186:                                              ; preds = %190, %184
  %187 = load i32, ptr @cur_spi, align 4, !tbaa !5
  %188 = and i32 %187, 65535
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %186
  %191 = call zeroext i8 @next_spi_byte()
  br label %186, !llvm.loop !16

192:                                              ; preds = %186
  store i32 1, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %314

193:                                              ; preds = %180
  %194 = load i8, ptr %12, align 1, !tbaa !9
  %195 = zext i8 %194 to i32
  %196 = icmp eq i32 %195, 253
  br i1 %196, label %197, label %199

197:                                              ; preds = %193
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %314

199:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  %200 = load i8, ptr %12, align 1, !tbaa !9
  %201 = zext i8 %200 to i32
  %202 = and i32 %201, 15
  %203 = trunc i32 %202 to i8
  store i8 %203, ptr %14, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %204 = load i8, ptr %12, align 1, !tbaa !9
  %205 = zext i8 %204 to i32
  %206 = ashr i32 %205, 4
  %207 = trunc i32 %206 to i8
  store i8 %207, ptr %15, align 1, !tbaa !9
  %208 = load i8, ptr %15, align 1, !tbaa !9
  %209 = zext i8 %208 to i32
  %210 = load i8, ptr %14, align 1, !tbaa !9
  %211 = zext i8 %210 to i32
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %209, i32 noundef %211)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %283, %199
  %214 = load i32, ptr %16, align 4, !tbaa !5
  %215 = load i8, ptr %14, align 1, !tbaa !9
  %216 = zext i8 %215 to i32
  %217 = icmp slt i32 %214, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %213
  store i32 15, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %286

219:                                              ; preds = %213
  %220 = load i8, ptr %2, align 1, !tbaa !9
  %221 = zext i8 %220 to i32
  %222 = and i32 %221, 4
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %254

224:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  %225 = call zeroext i8 @next_spi_byte()
  store i8 %225, ptr %17, align 1, !tbaa !9
  %226 = load i8, ptr %17, align 1, !tbaa !9
  %227 = zext i8 %226 to i64
  %228 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = load i32, ptr %16, align 4, !tbaa !5
  %231 = mul nsw i32 2, %230
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %232
  store i32 %229, ptr %233, align 4, !tbaa !5
  %234 = load i8, ptr %17, align 1, !tbaa !9
  %235 = zext i8 %234 to i64
  %236 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = mul nsw i32 2, %238
  %240 = add nsw i32 %239, 1
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %241
  store i32 %237, ptr %242, align 4, !tbaa !5
  %243 = load i8, ptr %17, align 1, !tbaa !9
  %244 = zext i8 %243 to i32
  %245 = load i8, ptr %17, align 1, !tbaa !9
  %246 = zext i8 %245 to i64
  %247 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = load i8, ptr %17, align 1, !tbaa !9
  %250 = zext i8 %249 to i64
  %251 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %244, i32 noundef %248, i32 noundef %252)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  br label %282

254:                                              ; preds = %219
  %255 = call zeroext i8 @next_spi_byte()
  %256 = zext i8 %255 to i32
  %257 = ashr i32 %256, 1
  %258 = load i32, ptr %16, align 4, !tbaa !5
  %259 = mul nsw i32 2, %258
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %260
  store i32 %257, ptr %261, align 4, !tbaa !5
  %262 = call zeroext i8 @next_spi_byte()
  %263 = zext i8 %262 to i32
  %264 = ashr i32 %263, 1
  %265 = load i32, ptr %16, align 4, !tbaa !5
  %266 = mul nsw i32 2, %265
  %267 = add nsw i32 %266, 1
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %268
  store i32 %264, ptr %269, align 4, !tbaa !5
  %270 = load i32, ptr %16, align 4, !tbaa !5
  %271 = mul nsw i32 2, %270
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %272
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = load i32, ptr %16, align 4, !tbaa !5
  %276 = mul nsw i32 2, %275
  %277 = add nsw i32 %276, 1
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %278
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %274, i32 noundef %280)
  br label %282

282:                                              ; preds = %254, %224
  br label %283

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

286:                                              ; preds = %218
  %287 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %288

288:                                              ; preds = %310, %286
  %289 = load i32, ptr %18, align 4, !tbaa !5
  %290 = load i8, ptr %14, align 1, !tbaa !9
  %291 = zext i8 %290 to i32
  %292 = mul nsw i32 2, %291
  %293 = icmp slt i32 %289, %292
  br i1 %293, label %295, label %294

294:                                              ; preds = %288
  store i32 18, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %313

295:                                              ; preds = %288
  %296 = load i32, ptr %18, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %297
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = icmp slt i32 %299, 0
  br i1 %300, label %307, label %301

301:                                              ; preds = %295
  %302 = load i32, ptr %18, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = icmp sgt i32 %305, 127
  br i1 %306, label %307, label %309

307:                                              ; preds = %301, %295
  %308 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  br label %309

309:                                              ; preds = %307, %301
  br label %310

310:                                              ; preds = %309
  %311 = load i32, ptr %18, align 4, !tbaa !5
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %18, align 4, !tbaa !5
  br label %288, !llvm.loop !18

313:                                              ; preds = %294
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  store i32 0, ptr %13, align 4
  br label %314

314:                                              ; preds = %313, %197, %192, %179
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  %315 = load i32, ptr %13, align 4
  switch i32 %315, label %318 [
    i32 0, label %316
    i32 11, label %317
  ]

316:                                              ; preds = %314
  br label %174

317:                                              ; preds = %314
  store i32 1, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %318

318:                                              ; preds = %317, %314
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #3
  %319 = load i32, ptr %1, align 4
  ret i32 %319
}

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

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


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

@cur_spi = external dso_local local_unnamed_addr global i32, align 4
@read_frame.frame = external hidden local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@cmap = external dso_local local_unnamed_addr global [16 x i16], align 16
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@X = external dso_local local_unnamed_addr global [255 x i32], align 16
@Y = external dso_local local_unnamed_addr global [255 x i32], align 16
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@poly = external dso_local local_unnamed_addr global [30 x i32], align 16
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @next_spi_byte() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @next_spi_word() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @printb(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @read_frame() local_unnamed_addr #0 {
  %1 = load i32, ptr @read_frame.frame, align 4, !tbaa !5
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1)
  %3 = load i32, ptr @read_frame.frame, align 4, !tbaa !5
  %4 = add nsw i32 %3, 1
  store i32 %4, ptr @read_frame.frame, align 4, !tbaa !5
  %5 = tail call zeroext i8 @next_spi_byte()
  %6 = zext i8 %5 to i32
  %7 = and i32 %6, 1
  %.not = icmp eq i32 %7, 0
  %8 = select i1 %.not, i32 95, i32 67
  %9 = and i32 %6, 2
  %.not74 = icmp eq i32 %9, 0
  %10 = select i1 %.not74, i32 95, i32 80
  %11 = and i32 %6, 4
  %.not75 = icmp eq i32 %11, 0
  %12 = select i1 %.not75, i32 95, i32 73
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6, i32 noundef %8, i32 noundef %10, i32 noundef %12)
  br i1 %.not74, label %vector.body, label %14

14:                                               ; preds = %0
  %15 = tail call zeroext i16 @next_spi_word()
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %17 = zext i16 %15 to i32
  tail call void @printb(i32 noundef %17)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %19

19:                                               ; preds = %14, %39
  %indvars.iv = phi i64 [ 0, %14 ], [ %indvars.iv.next, %39 ]
  %20 = trunc nuw nsw i64 %indvars.iv to i32
  %21 = shl nuw nsw i32 1, %20
  %22 = and i32 %21, %17
  %.not77 = icmp eq i32 %22, 0
  br i1 %.not77, label %39, label %23

23:                                               ; preds = %19
  %24 = tail call zeroext i16 @next_spi_word()
  %25 = sub nuw nsw i64 15, %indvars.iv
  %26 = getelementptr inbounds [16 x i16], ptr @cmap, i64 0, i64 %25
  store i16 %24, ptr %26, align 2, !tbaa !9
  %27 = trunc nuw nsw i64 %25 to i32
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %27)
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %30 = zext i16 %24 to i32
  tail call void @printb(i32 noundef %30)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %32 = lshr i32 %30, 3
  %33 = and i32 %32, 224
  %34 = shl nuw nsw i32 %30, 1
  %35 = and i32 %34, 224
  %36 = shl nuw nsw i32 %30, 5
  %37 = and i32 %36, 224
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %33, i32 noundef %35, i32 noundef %37)
  br label %39

39:                                               ; preds = %19, %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 16
  br i1 %exitcond.not, label %vector.body, label %19, !llvm.loop !11

vector.body:                                      ; preds = %0, %39
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr @X, align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr @Y, align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 64), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 80), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 64), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 80), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 96), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 112), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 96), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 112), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 128), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 144), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 128), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 144), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 160), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 176), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 160), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 176), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 192), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 208), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 192), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 208), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 224), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 240), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 224), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 240), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 256), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 272), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 256), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 272), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 288), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 304), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 288), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 304), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 320), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 336), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 320), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 336), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 352), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 368), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 352), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 368), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 384), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 400), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 384), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 400), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 416), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 432), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 416), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 432), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 448), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 464), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 448), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 464), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 480), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 496), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 480), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 496), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 512), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 528), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 512), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 528), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 544), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 560), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 544), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 560), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 576), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 592), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 576), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 592), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 608), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 624), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 608), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 624), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 640), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 656), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 640), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 656), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 672), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 688), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 672), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 688), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 704), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 720), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 704), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 720), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 736), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 752), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 736), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 752), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 768), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 784), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 768), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 784), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 800), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 816), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 800), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 816), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 832), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 848), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 832), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 848), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 864), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 880), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 864), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 880), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 896), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 912), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 896), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 912), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 928), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 944), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 928), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 944), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 960), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @X, i64 976), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 960), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>, ptr getelementptr inbounds (i8, ptr @Y, i64 976), align 16, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 992), align 16, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 992), align 16, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 996), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 996), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 1000), align 8, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 1000), align 8, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 1004), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 1004), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 1008), align 16, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 1008), align 16, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 1012), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 1012), align 4, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @X, i64 1016), align 8, !tbaa !5
  store i32 65536, ptr getelementptr inbounds (i8, ptr @Y, i64 1016), align 8, !tbaa !5
  br i1 %.not75, label %.loopexit84.preheader, label %40

40:                                               ; preds = %vector.body
  %41 = tail call zeroext i8 @next_spi_byte()
  %42 = zext i8 %41 to i32
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %42)
  %.not97 = icmp eq i8 %41, 0
  br i1 %.not97, label %.loopexit84.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %40
  %wide.trip.count = zext i8 %41 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv107 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next108, %.lr.ph ]
  %44 = tail call zeroext i8 @next_spi_byte()
  %45 = lshr i8 %44, 1
  %46 = zext nneg i8 %45 to i32
  %47 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %indvars.iv107
  store i32 %46, ptr %47, align 4, !tbaa !5
  %48 = tail call zeroext i8 @next_spi_byte()
  %49 = lshr i8 %48, 1
  %50 = zext nneg i8 %49 to i32
  %51 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %indvars.iv107
  store i32 %50, ptr %51, align 4, !tbaa !5
  %52 = load i32, ptr %47, align 4, !tbaa !5
  %53 = trunc nuw nsw i64 %indvars.iv107 to i32
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %53, i32 noundef %52, i32 noundef %50)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count
  br i1 %exitcond110.not, label %.loopexit84.preheader, label %.lr.ph, !llvm.loop !13

.loopexit84.preheader:                            ; preds = %.lr.ph, %40, %vector.body
  br label %.loopexit84

.loopexit84:                                      ; preds = %.loopexit84.backedge, %.loopexit84.preheader
  %55 = tail call zeroext i8 @next_spi_byte()
  switch i8 %55, label %65 [
    i8 -1, label %.thread
    i8 -2, label %56
    i8 -3, label %63
  ]

56:                                               ; preds = %.loopexit84
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %58 = load i32, ptr @cur_spi, align 4, !tbaa !5
  %59 = and i32 %58, 65535
  %.not7694 = icmp eq i32 %59, 0
  br i1 %.not7694, label %.thread, label %.lr.ph96

.lr.ph96:                                         ; preds = %56, %.lr.ph96
  %60 = tail call zeroext i8 @next_spi_byte()
  %61 = load i32, ptr @cur_spi, align 4, !tbaa !5
  %62 = and i32 %61, 65535
  %.not76 = icmp eq i32 %62, 0
  br i1 %.not76, label %.thread, label %.lr.ph96, !llvm.loop !14

63:                                               ; preds = %.loopexit84
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %.thread

65:                                               ; preds = %.loopexit84
  %66 = and i8 %55, 15
  %67 = lshr i8 %55, 4
  %68 = zext nneg i8 %67 to i32
  %69 = zext nneg i8 %66 to i32
  %70 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %68, i32 noundef %69)
  %.not98 = icmp eq i8 %66, 0
  br i1 %.not98, label %._crit_edge.thread, label %.lr.ph90

._crit_edge.thread:                               ; preds = %65
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.loopexit84.backedge

.loopexit84.backedge:                             ; preds = %102, %._crit_edge.thread, %._crit_edge
  br label %.loopexit84

.lr.ph90:                                         ; preds = %65
  %wide.trip.count119 = zext nneg i8 %66 to i64
  br i1 %.not75, label %.lr.ph90.split.us, label %.lr.ph90.split

.lr.ph90.split.us:                                ; preds = %.lr.ph90, %.lr.ph90.split.us
  %indvars.iv116 = phi i64 [ %indvars.iv.next117, %.lr.ph90.split.us ], [ 0, %.lr.ph90 ]
  %72 = tail call zeroext i8 @next_spi_byte()
  %73 = lshr i8 %72, 1
  %74 = zext nneg i8 %73 to i32
  %75 = shl nuw nsw i64 %indvars.iv116, 1
  %76 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %75
  store i32 %74, ptr %76, align 8, !tbaa !5
  %77 = tail call zeroext i8 @next_spi_byte()
  %78 = lshr i8 %77, 1
  %79 = zext nneg i8 %78 to i32
  %80 = or disjoint i64 %75, 1
  %81 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %80
  store i32 %79, ptr %81, align 4, !tbaa !5
  %82 = load i32, ptr %76, align 8, !tbaa !5
  %83 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %82, i32 noundef %79)
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count119
  br i1 %exitcond120.not, label %._crit_edge, label %.lr.ph90.split.us, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph90.split, %.lr.ph90.split.us
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br i1 %.not98, label %.loopexit84.backedge, label %.lr.ph93.preheader

.lr.ph93.preheader:                               ; preds = %._crit_edge
  %85 = shl nuw nsw i32 %69, 1
  %wide.trip.count124 = zext nneg i32 %85 to i64
  br label %.lr.ph93

.lr.ph90.split:                                   ; preds = %.lr.ph90, %.lr.ph90.split
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph90.split ], [ 0, %.lr.ph90 ]
  %86 = tail call zeroext i8 @next_spi_byte()
  %87 = zext i8 %86 to i64
  %88 = getelementptr inbounds [255 x i32], ptr @X, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = shl nuw nsw i64 %indvars.iv111, 1
  %91 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %90
  store i32 %89, ptr %91, align 8, !tbaa !5
  %92 = getelementptr inbounds [255 x i32], ptr @Y, i64 0, i64 %87
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = or disjoint i64 %90, 1
  %95 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %94
  store i32 %93, ptr %95, align 4, !tbaa !5
  %96 = zext i8 %86 to i32
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %96, i32 noundef %89, i32 noundef %93)
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count119
  br i1 %exitcond115.not, label %._crit_edge, label %.lr.ph90.split, !llvm.loop !15

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %102
  %indvars.iv121 = phi i64 [ 0, %.lr.ph93.preheader ], [ %indvars.iv.next122, %102 ]
  %98 = getelementptr inbounds [30 x i32], ptr @poly, i64 0, i64 %indvars.iv121
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %or.cond = icmp ugt i32 %99, 127
  br i1 %or.cond, label %100, label %102

100:                                              ; preds = %.lr.ph93
  %101 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  br label %102

102:                                              ; preds = %.lr.ph93, %100
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count124
  br i1 %exitcond125.not, label %.loopexit84.backedge, label %.lr.ph93, !llvm.loop !16

.thread:                                          ; preds = %.loopexit84, %.lr.ph96, %56, %63
  %.2 = phi i32 [ 0, %63 ], [ 1, %56 ], [ 1, %.lr.ph96 ], [ 1, %.loopexit84 ]
  ret i32 %.2
}

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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" }

!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 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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