; LLVM IR from trabucayre/openFPGALoader :: src/spiFlash.ll (ZN8SPIFlash18display_status_regEh)

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

%class.SPIFlash = type <{ ptr, ptr, i8, [3 x i8], i32, ptr, i8, [7 x i8] }>
%struct.flash_t = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, i8, i8, [3 x i8], i32, i8, [4 x i8], [3 x i8], i32, i16, [2 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.86 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8SPIFlash18display_status_regEh(ptr noundef nonnull align 8 dereferenceable(33) %0, i8 noundef zeroext %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i16, align 2
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i16, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %10 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #3
  %11 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 4
  %12 = load i32, ptr %11, align 4, !tbaa !10
  %13 = lshr i32 %12, 16
  %14 = and i32 %13, 65535
  %15 = trunc i32 %14 to i16
  store i16 %15, ptr %5, align 2, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  %16 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 5
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = icmp ne ptr %17, null
  br i1 %18, label %36, label %19

19:                                               ; preds = %2
  %20 = load i8, ptr %4, align 1, !tbaa !9
  %21 = zext i8 %20 to i32
  %22 = ashr i32 %21, 5
  %23 = and i32 %22, 1
  %24 = trunc i32 %23 to i8
  store i8 %24, ptr %6, align 1, !tbaa !9
  %25 = load i8, ptr %4, align 1, !tbaa !9
  %26 = zext i8 %25 to i32
  %27 = ashr i32 %26, 6
  %28 = and i32 %27, 1
  %29 = shl i32 %28, 3
  %30 = load i8, ptr %4, align 1, !tbaa !9
  %31 = zext i8 %30 to i32
  %32 = ashr i32 %31, 2
  %33 = and i32 %32, 7
  %34 = or i32 %29, %33
  %35 = trunc i32 %34 to i8
  store i8 %35, ptr %7, align 1, !tbaa !9
  br label %92

36:                                               ; preds = %2
  %37 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 5
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds %struct.flash_t, ptr %38, i32 0, i32 10
  %40 = load i8, ptr %39, align 8, !tbaa !17
  %41 = zext i8 %40 to i32
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %36
  store i8 0, ptr %6, align 1, !tbaa !9
  store i8 0, ptr %7, align 1, !tbaa !9
  br label %91

44:                                               ; preds = %36
  %45 = load i8, ptr %4, align 1, !tbaa !9
  %46 = zext i8 %45 to i32
  %47 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 5
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = getelementptr inbounds %struct.flash_t, ptr %48, i32 0, i32 7
  %50 = load i8, ptr %49, align 8, !tbaa !23
  %51 = zext i8 %50 to i32
  %52 = and i32 %46, %51
  %53 = icmp ne i32 %52, 0
  %54 = zext i1 %53 to i64
  %55 = select i1 %53, i32 1, i32 0
  %56 = trunc i32 %55 to i8
  store i8 %56, ptr %6, align 1, !tbaa !9
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !24
  br label %57

57:                                               ; preds = %87, %44
  %58 = load i32, ptr %8, align 4, !tbaa !24
  %59 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 5
  %60 = load ptr, ptr %59, align 8, !tbaa !16
  %61 = getelementptr inbounds %struct.flash_t, ptr %60, i32 0, i32 10
  %62 = load i8, ptr %61, align 8, !tbaa !17
  %63 = zext i8 %62 to i32
  %64 = icmp slt i32 %58, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %90

66:                                               ; preds = %57
  %67 = load i8, ptr %4, align 1, !tbaa !9
  %68 = zext i8 %67 to i32
  %69 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds %struct.flash_t, ptr %70, i32 0, i32 11
  %72 = load i32, ptr %8, align 4, !tbaa !24
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [4 x i8], ptr %71, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = zext i8 %75 to i32
  %77 = and i32 %68, %76
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %86

79:                                               ; preds = %66
  %80 = load i32, ptr %8, align 4, !tbaa !24
  %81 = shl i32 1, %80
  %82 = load i8, ptr %7, align 1, !tbaa !9
  %83 = zext i8 %82 to i32
  %84 = or i32 %83, %81
  %85 = trunc i32 %84 to i8
  store i8 %85, ptr %7, align 1, !tbaa !9
  br label %86

86:                                               ; preds = %79, %66
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %8, align 4, !tbaa !24
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !24
  br label %57, !llvm.loop !25

90:                                               ; preds = %65
  br label %91

91:                                               ; preds = %90, %43
  br label %92

92:                                               ; preds = %91, %19
  %93 = load i8, ptr %4, align 1, !tbaa !9
  %94 = zext i8 %93 to i32
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.86, i32 noundef %94)
  %96 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 4
  %97 = load i32, ptr %96, align 4, !tbaa !10
  %98 = lshr i32 %97, 8
  %99 = icmp ne i32 %98, 48934
  br i1 %99, label %100, label %136

100:                                              ; preds = %92
  %101 = load i8, ptr %4, align 1, !tbaa !9
  %102 = zext i8 %101 to i32
  %103 = and i32 %102, 1
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.87, i32 noundef %103)
  %105 = load i8, ptr %4, align 1, !tbaa !9
  %106 = zext i8 %105 to i32
  %107 = ashr i32 %106, 1
  %108 = and i32 %107, 1
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.88, i32 noundef %108)
  %110 = load i8, ptr %7, align 1, !tbaa !9
  %111 = zext i8 %110 to i32
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.89, i32 noundef %111)
  %113 = load i16, ptr %5, align 2, !tbaa !14
  %114 = zext i16 %113 to i32
  %115 = icmp ne i32 %114, 40288
  br i1 %115, label %116, label %124

116:                                              ; preds = %100
  %117 = load i16, ptr %5, align 2, !tbaa !14
  %118 = zext i16 %117 to i32
  %119 = icmp ne i32 %118, 49696
  br i1 %119, label %120, label %124

120:                                              ; preds = %116
  %121 = load i8, ptr %6, align 1, !tbaa !9
  %122 = zext i8 %121 to i32
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.90, i32 noundef %122)
  br label %130

124:                                              ; preds = %116, %100
  %125 = load i8, ptr %4, align 1, !tbaa !9
  %126 = zext i8 %125 to i32
  %127 = ashr i32 %126, 6
  %128 = and i32 %127, 1
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.91, i32 noundef %128)
  br label %130

130:                                              ; preds = %124, %120
  %131 = load i8, ptr %4, align 1, !tbaa !9
  %132 = zext i8 %131 to i32
  %133 = ashr i32 %132, 7
  %134 = and i32 %133, 1
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.92, i32 noundef %134)
  br label %172

136:                                              ; preds = %92
  %137 = load i8, ptr %4, align 1, !tbaa !9
  %138 = zext i8 %137 to i32
  %139 = ashr i32 %138, 0
  %140 = and i32 %139, 1
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.93, i32 noundef %140)
  %142 = load i8, ptr %4, align 1, !tbaa !9
  %143 = zext i8 %142 to i32
  %144 = ashr i32 %143, 1
  %145 = and i32 %144, 1
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.88, i32 noundef %145)
  %147 = load i8, ptr %4, align 1, !tbaa !9
  %148 = zext i8 %147 to i32
  %149 = ashr i32 %148, 2
  %150 = and i32 %149, 1
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.94, i32 noundef %150)
  %152 = load i8, ptr %4, align 1, !tbaa !9
  %153 = zext i8 %152 to i32
  %154 = ashr i32 %153, 3
  %155 = and i32 %154, 1
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.95, i32 noundef %155)
  %157 = load i8, ptr %4, align 1, !tbaa !9
  %158 = zext i8 %157 to i32
  %159 = ashr i32 %158, 4
  %160 = and i32 %159, 1
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str.96, i32 noundef %160)
  %162 = load i8, ptr %4, align 1, !tbaa !9
  %163 = zext i8 %162 to i32
  %164 = ashr i32 %163, 5
  %165 = and i32 %164, 1
  %166 = call i32 (ptr, ...) @printf(ptr noundef @.str.97, i32 noundef %165)
  %167 = load i8, ptr %4, align 1, !tbaa !9
  %168 = zext i8 %167 to i32
  %169 = ashr i32 %168, 7
  %170 = and i32 %169, 1
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.93, i32 noundef %170)
  br label %172

172:                                              ; preds = %136, %130
  %173 = load i16, ptr %5, align 2, !tbaa !14
  %174 = zext i16 %173 to i32
  switch i32 %174, label %360 [
    i32 40288, label %175
    i32 258, label %211
    i32 288, label %211
    i32 352, label %257
    i32 8378, label %293
    i32 49696, label %334
  ]

175:                                              ; preds = %172
  %176 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !27
  %178 = load ptr, ptr %177, align 8, !tbaa !28
  %179 = getelementptr inbounds ptr, ptr %178, i64 2
  %180 = load ptr, ptr %179, align 8
  %181 = call noundef i32 %180(ptr noundef nonnull align 8 dereferenceable(56) %177, i8 noundef zeroext 72, ptr noundef null, ptr noundef %4, i32 noundef 1)
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.98)
  %183 = load i8, ptr %4, align 1, !tbaa !9
  %184 = zext i8 %183 to i32
  %185 = call i32 (ptr, ...) @printf(ptr noundef @.str.99, i32 noundef %184)
  %186 = load i8, ptr %4, align 1, !tbaa !9
  %187 = zext i8 %186 to i32
  %188 = ashr i32 %187, 0
  %189 = and i32 %188, 1
  %190 = call i32 (ptr, ...) @printf(ptr noundef @.str.100, i32 noundef %189)
  %191 = load i8, ptr %4, align 1, !tbaa !9
  %192 = zext i8 %191 to i32
  %193 = ashr i32 %192, 1
  %194 = and i32 %193, 1
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.101, i32 noundef %194)
  %196 = load i8, ptr %4, align 1, !tbaa !9
  %197 = zext i8 %196 to i32
  %198 = ashr i32 %197, 2
  %199 = and i32 %198, 1
  %200 = call i32 (ptr, ...) @printf(ptr noundef @.str.102, i32 noundef %199)
  %201 = load i8, ptr %4, align 1, !tbaa !9
  %202 = zext i8 %201 to i32
  %203 = ashr i32 %202, 3
  %204 = and i32 %203, 1
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.103, i32 noundef %204)
  %206 = load i8, ptr %4, align 1, !tbaa !9
  %207 = zext i8 %206 to i32
  %208 = ashr i32 %207, 4
  %209 = and i32 %208, 15
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.104, i32 noundef %209)
  br label %360

211:                                              ; preds = %172, %172
  %212 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 1
  %213 = load ptr, ptr %212, align 8, !tbaa !27
  %214 = load ptr, ptr %213, align 8, !tbaa !28
  %215 = getelementptr inbounds ptr, ptr %214, i64 2
  %216 = load ptr, ptr %215, align 8
  %217 = call noundef i32 %216(ptr noundef nonnull align 8 dereferenceable(56) %213, i8 noundef zeroext 53, ptr noundef null, ptr noundef %4, i32 noundef 1)
  %218 = call i32 (ptr, ...) @printf(ptr noundef @.str.105)
  %219 = load i8, ptr %4, align 1, !tbaa !9
  %220 = zext i8 %219 to i32
  %221 = call i32 (ptr, ...) @printf(ptr noundef @.str.106, i32 noundef %220)
  %222 = load i8, ptr %4, align 1, !tbaa !9
  %223 = zext i8 %222 to i32
  %224 = ashr i32 %223, 0
  %225 = and i32 %224, 1
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.107, i32 noundef %225)
  %227 = load i8, ptr %4, align 1, !tbaa !9
  %228 = zext i8 %227 to i32
  %229 = ashr i32 %228, 1
  %230 = and i32 %229, 1
  %231 = call i32 (ptr, ...) @printf(ptr noundef @.str.108, i32 noundef %230)
  %232 = load i8, ptr %4, align 1, !tbaa !9
  %233 = zext i8 %232 to i32
  %234 = ashr i32 %233, 2
  %235 = and i32 %234, 1
  %236 = call i32 (ptr, ...) @printf(ptr noundef @.str.109, i32 noundef %235)
  %237 = load i8, ptr %4, align 1, !tbaa !9
  %238 = zext i8 %237 to i32
  %239 = ashr i32 %238, 3
  %240 = and i32 %239, 1
  %241 = call i32 (ptr, ...) @printf(ptr noundef @.str.110, i32 noundef %240)
  %242 = load i8, ptr %4, align 1, !tbaa !9
  %243 = zext i8 %242 to i32
  %244 = ashr i32 %243, 5
  %245 = and i32 %244, 1
  %246 = call i32 (ptr, ...) @printf(ptr noundef @.str.111, i32 noundef %245)
  %247 = load i16, ptr %5, align 2, !tbaa !14
  %248 = zext i16 %247 to i32
  %249 = icmp eq i32 %248, 288
  br i1 %249, label %250, label %256

250:                                              ; preds = %211
  %251 = load i8, ptr %4, align 1, !tbaa !9
  %252 = zext i8 %251 to i32
  %253 = ashr i32 %252, 6
  %254 = and i32 %253, 3
  %255 = call i32 (ptr, ...) @printf(ptr noundef @.str.112, i32 noundef %254)
  br label %256

256:                                              ; preds = %250, %211
  br label %360

257:                                              ; preds = %172
  %258 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 1
  %259 = load ptr, ptr %258, align 8, !tbaa !27
  %260 = load ptr, ptr %259, align 8, !tbaa !28
  %261 = getelementptr inbounds ptr, ptr %260, i64 2
  %262 = load ptr, ptr %261, align 8
  %263 = call noundef i32 %262(ptr noundef nonnull align 8 dereferenceable(56) %259, i8 noundef zeroext 53, ptr noundef null, ptr noundef %4, i32 noundef 1)
  %264 = call i32 (ptr, ...) @printf(ptr noundef @.str.105)
  %265 = load i8, ptr %4, align 1, !tbaa !9
  %266 = zext i8 %265 to i32
  %267 = call i32 (ptr, ...) @printf(ptr noundef @.str.113, i32 noundef %266)
  %268 = load i8, ptr %4, align 1, !tbaa !9
  %269 = zext i8 %268 to i32
  %270 = ashr i32 %269, 7
  %271 = and i32 %270, 1
  %272 = call i32 (ptr, ...) @printf(ptr noundef @.str.114, i32 noundef %271)
  %273 = load i8, ptr %4, align 1, !tbaa !9
  %274 = zext i8 %273 to i32
  %275 = ashr i32 %274, 6
  %276 = and i32 %275, 1
  %277 = call i32 (ptr, ...) @printf(ptr noundef @.str.115, i32 noundef %276)
  %278 = load i8, ptr %4, align 1, !tbaa !9
  %279 = zext i8 %278 to i32
  %280 = ashr i32 %279, 2
  %281 = and i32 %280, 15
  %282 = call i32 (ptr, ...) @printf(ptr noundef @.str.116, i32 noundef %281)
  %283 = load i8, ptr %4, align 1, !tbaa !9
  %284 = zext i8 %283 to i32
  %285 = ashr i32 %284, 1
  %286 = and i32 %285, 1
  %287 = call i32 (ptr, ...) @printf(ptr noundef @.str.117, i32 noundef %286)
  %288 = load i8, ptr %4, align 1, !tbaa !9
  %289 = zext i8 %288 to i32
  %290 = ashr i32 %289, 0
  %291 = and i32 %290, 1
  %292 = call i32 (ptr, ...) @printf(ptr noundef @.str.118, i32 noundef %291)
  br label %360

293:                                              ; preds = %172
  %294 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 1
  %295 = load ptr, ptr %294, align 8, !tbaa !27
  %296 = load ptr, ptr %295, align 8, !tbaa !28
  %297 = getelementptr inbounds ptr, ptr %296, i64 2
  %298 = load ptr, ptr %297, align 8
  %299 = call noundef i32 %298(ptr noundef nonnull align 8 dereferenceable(56) %295, i8 noundef zeroext -75, ptr noundef null, ptr noundef %9, i32 noundef 2)
  %300 = call i32 (ptr, ...) @printf(ptr noundef @.str.119)
  %301 = load i16, ptr %9, align 2, !tbaa !14
  %302 = zext i16 %301 to i32
  %303 = call i32 (ptr, ...) @printf(ptr noundef @.str.120, i32 noundef %302)
  %304 = load i16, ptr %9, align 2, !tbaa !14
  %305 = zext i16 %304 to i32
  %306 = ashr i32 %305, 12
  %307 = and i32 %306, 15
  %308 = call i32 (ptr, ...) @printf(ptr noundef @.str.121, i32 noundef %307)
  %309 = load i16, ptr %9, align 2, !tbaa !14
  %310 = zext i16 %309 to i32
  %311 = ashr i32 %310, 9
  %312 = and i32 %311, 7
  %313 = call i32 (ptr, ...) @printf(ptr noundef @.str.122, i32 noundef %312)
  %314 = load i16, ptr %9, align 2, !tbaa !14
  %315 = zext i16 %314 to i32
  %316 = ashr i32 %315, 6
  %317 = and i32 %316, 7
  %318 = call i32 (ptr, ...) @printf(ptr noundef @.str.123, i32 noundef %317)
  %319 = load i16, ptr %9, align 2, !tbaa !14
  %320 = zext i16 %319 to i32
  %321 = ashr i32 %320, 4
  %322 = and i32 %321, 1
  %323 = call i32 (ptr, ...) @printf(ptr noundef @.str.124, i32 noundef %322)
  %324 = load i16, ptr %9, align 2, !tbaa !14
  %325 = zext i16 %324 to i32
  %326 = ashr i32 %325, 3
  %327 = and i32 %326, 1
  %328 = call i32 (ptr, ...) @printf(ptr noundef @.str.125, i32 noundef %327)
  %329 = load i16, ptr %9, align 2, !tbaa !14
  %330 = zext i16 %329 to i32
  %331 = ashr i32 %330, 2
  %332 = and i32 %331, 1
  %333 = call i32 (ptr, ...) @printf(ptr noundef @.str.126, i32 noundef %332)
  br label %360

334:                                              ; preds = %172
  %335 = getelementptr inbounds %class.SPIFlash, ptr %10, i32 0, i32 1
  %336 = load ptr, ptr %335, align 8, !tbaa !27
  %337 = load ptr, ptr %336, align 8, !tbaa !28
  %338 = getelementptr inbounds ptr, ptr %337, i64 2
  %339 = load ptr, ptr %338, align 8
  %340 = call noundef i32 %339(ptr noundef nonnull align 8 dereferenceable(56) %336, i8 noundef zeroext 21, ptr noundef null, ptr noundef %4, i32 noundef 1)
  %341 = call i32 (ptr, ...) @printf(ptr noundef @.str.105)
  %342 = load i8, ptr %4, align 1, !tbaa !9
  %343 = zext i8 %342 to i32
  %344 = call i32 (ptr, ...) @printf(ptr noundef @.str.127, i32 noundef %343)
  %345 = load i8, ptr %4, align 1, !tbaa !9
  %346 = zext i8 %345 to i32
  %347 = ashr i32 %346, 6
  %348 = and i32 %347, 3
  %349 = call i32 (ptr, ...) @printf(ptr noundef @.str.128, i32 noundef %348)
  %350 = load i8, ptr %4, align 1, !tbaa !9
  %351 = zext i8 %350 to i32
  %352 = ashr i32 %351, 3
  %353 = and i32 %352, 1
  %354 = call i32 (ptr, ...) @printf(ptr noundef @.str.90, i32 noundef %353)
  %355 = load i8, ptr %4, align 1, !tbaa !9
  %356 = zext i8 %355 to i32
  %357 = ashr i32 %356, 0
  %358 = and i32 %357, 7
  %359 = call i32 (ptr, ...) @printf(ptr noundef @.str.129, i32 noundef %358)
  br label %360

360:                                              ; preds = %334, %293, %257, %256, %175, %172
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 20}
!11 = !{!"_ZTS8SPIFlash", !6, i64 8, !7, i64 16, !12, i64 20, !6, i64 24, !13, i64 32}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!11, !6, i64 24}
!17 = !{!18, !7, i64 80}
!18 = !{!"_ZTS7flash_t", !19, i64 0, !19, i64 32, !12, i64 64, !13, i64 68, !13, i64 69, !13, i64 70, !13, i64 71, !7, i64 72, !22, i64 76, !7, i64 80, !7, i64 81, !22, i64 88, !15, i64 92}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTS8tb_loc_t", !7, i64 0}
!23 = !{!18, !7, i64 72}
!24 = !{!12, !12, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!11, !6, i64 8}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}


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

@.str.86 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [11 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8SPIFlash18display_status_regEh(ptr nocapture noundef nonnull readonly align 8 dereferenceable(33) %0, i8 noundef zeroext %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i8, align 1
  %4 = alloca i16, align 2
  store i8 %1, ptr %3, align 1, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 20
  %6 = load i32, ptr %5, align 4, !tbaa !8
  %7 = lshr i32 %6, 16
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %10, label %18

10:                                               ; preds = %2
  %11 = lshr i8 %1, 5
  %12 = and i8 %11, 1
  %13 = lshr i8 %1, 3
  %14 = and i8 %13, 8
  %15 = lshr i8 %1, 2
  %16 = and i8 %15, 7
  %17 = or disjoint i8 %14, %16
  br label %.loopexit

18:                                               ; preds = %2
  %19 = getelementptr inbounds i8, ptr %9, i64 80
  %20 = load i8, ptr %19, align 8, !tbaa !14
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %.loopexit, label %iter.check

iter.check:                                       ; preds = %18
  %22 = getelementptr inbounds i8, ptr %9, i64 72
  %23 = load i8, ptr %22, align 8, !tbaa !21
  %24 = and i8 %23, %1
  %.not16 = icmp ne i8 %24, 0
  %25 = getelementptr inbounds i8, ptr %9, i64 81
  %wide.trip.count = zext i8 %20 to i64
  %min.iters.check = icmp ult i8 %20, 8
  br i1 %min.iters.check, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check23 = icmp ult i8 %20, 16
  br i1 %min.iters.check23, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 240
  %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %1, i64 0
  %broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <16 x i8> [ zeroinitializer, %vector.ph ], [ %32, %vector.body ]
  %vec.ind = phi <16 x i32> [ <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %26 = getelementptr inbounds [4 x i8], ptr %25, i64 0, i64 %index
  %wide.load = load <16 x i8>, ptr %26, align 1, !tbaa !5
  %27 = and <16 x i8> %wide.load, %broadcast.splat
  %28 = icmp eq <16 x i8> %27, zeroinitializer
  %29 = shl nuw <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>, %vec.ind
  %30 = trunc <16 x i32> %29 to <16 x i8>
  %31 = select <16 x i1> %28, <16 x i8> zeroinitializer, <16 x i8> %30
  %32 = or <16 x i8> %31, %vec.phi
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  %34 = tail call i8 @llvm.vector.reduce.or.v16i8(<16 x i8> %32)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %vec.epilog.scalar.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %bc.merge.rdx = phi i8 [ %34, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec25 = and i64 %wide.trip.count, 248
  %35 = insertelement <8 x i8> <i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, i8 %bc.merge.rdx, i64 0
  %36 = trunc nuw nsw i64 %vec.epilog.resume.val to i32
  %.splatinsert = insertelement <8 x i32> poison, i32 %36, i64 0
  %.splat = shufflevector <8 x i32> %.splatinsert, <8 x i32> poison, <8 x i32> zeroinitializer
  %induction = or disjoint <8 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %broadcast.splatinsert32 = insertelement <8 x i8> poison, i8 %1, i64 0
  %broadcast.splat33 = shufflevector <8 x i8> %broadcast.splatinsert32, <8 x i8> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index27 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next34, %vec.epilog.vector.body ]
  %vec.phi28 = phi <8 x i8> [ %35, %vec.epilog.ph ], [ %43, %vec.epilog.vector.body ]
  %vec.ind29 = phi <8 x i32> [ %induction, %vec.epilog.ph ], [ %vec.ind.next30, %vec.epilog.vector.body ]
  %37 = getelementptr inbounds [4 x i8], ptr %25, i64 0, i64 %index27
  %wide.load31 = load <8 x i8>, ptr %37, align 1, !tbaa !5
  %38 = and <8 x i8> %wide.load31, %broadcast.splat33
  %39 = icmp eq <8 x i8> %38, zeroinitializer
  %40 = shl nuw <8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>, %vec.ind29
  %41 = trunc <8 x i32> %40 to <8 x i8>
  %42 = select <8 x i1> %39, <8 x i8> zeroinitializer, <8 x i8> %41
  %43 = or <8 x i8> %42, %vec.phi28
  %index.next34 = add nuw i64 %index27, 8
  %vec.ind.next30 = add <8 x i32> %vec.ind29, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
  %44 = icmp eq i64 %index.next34, %n.vec25
  br i1 %44, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !26

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %45 = tail call i8 @llvm.vector.reduce.or.v8i8(<8 x i8> %43)
  %cmp.n35 = icmp eq i64 %n.vec25, %wide.trip.count
  br i1 %cmp.n35, label %.loopexit.loopexit, label %vec.epilog.scalar.ph.preheader

vec.epilog.scalar.ph.preheader:                   ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec25, %vec.epilog.middle.block ]
  %.01320.ph = phi i8 [ 0, %iter.check ], [ %34, %vec.epilog.iter.check ], [ %45, %vec.epilog.middle.block ]
  br label %vec.epilog.scalar.ph

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.preheader, %vec.epilog.scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %vec.epilog.scalar.ph ], [ %indvars.iv.ph, %vec.epilog.scalar.ph.preheader ]
  %.01320 = phi i8 [ %.1, %vec.epilog.scalar.ph ], [ %.01320.ph, %vec.epilog.scalar.ph.preheader ]
  %46 = getelementptr inbounds [4 x i8], ptr %25, i64 0, i64 %indvars.iv
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = and i8 %47, %1
  %.not17 = icmp eq i8 %48, 0
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  %50 = shl nuw i32 1, %49
  %51 = trunc i32 %50 to i8
  %52 = select i1 %.not17, i8 0, i8 %51
  %.1 = or i8 %52, %.01320
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit.loopexit, label %vec.epilog.scalar.ph, !llvm.loop !27

.loopexit.loopexit:                               ; preds = %vec.epilog.scalar.ph, %vec.epilog.middle.block, %middle.block
  %.1.lcssa = phi i8 [ %34, %middle.block ], [ %45, %vec.epilog.middle.block ], [ %.1, %vec.epilog.scalar.ph ]
  %53 = zext i1 %.not16 to i8
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %18, %10
  %.014 = phi i8 [ %12, %10 ], [ 0, %18 ], [ %53, %.loopexit.loopexit ]
  %.2 = phi i8 [ %17, %10 ], [ 0, %18 ], [ %.1.lcssa, %.loopexit.loopexit ]
  %54 = zext i8 %1 to i32
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.86, i32 noundef %54)
  %56 = load i32, ptr %5, align 4, !tbaa !8
  %.mask = and i32 %56, -256
  %.not18 = icmp eq i32 %.mask, 12527104
  %57 = and i8 %1, 1
  %58 = zext nneg i8 %57 to i32
  %59 = lshr i8 %1, 1
  %60 = and i8 %59, 1
  %61 = zext nneg i8 %60 to i32
  br i1 %.not18, label %76, label %62

62:                                               ; preds = %.loopexit
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.87, i32 noundef %58)
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88, i32 noundef %61)
  %65 = zext i8 %.2 to i32
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.89, i32 noundef %65)
  %trunc19 = trunc nuw i32 %7 to i16
  switch i16 %trunc19, label %70 [
    i16 -15840, label %67
    i16 -25248, label %67
  ]

67:                                               ; preds = %62, %62
  %68 = lshr i8 %1, 6
  %69 = and i8 %68, 1
  br label %70

70:                                               ; preds = %62, %67
  %.sink22 = phi i8 [ %69, %67 ], [ %.014, %62 ]
  %.str.91.sink = phi ptr [ @.str.91, %67 ], [ @.str.90, %62 ]
  %71 = zext nneg i8 %.sink22 to i32
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.91.sink, i32 noundef %71)
  %73 = lshr i8 %1, 7
  %74 = zext nneg i8 %73 to i32
  %75 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.92, i32 noundef %74)
  br label %98

76:                                               ; preds = %.loopexit
  %77 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.93, i32 noundef %58)
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88, i32 noundef %61)
  %79 = lshr i8 %1, 2
  %80 = and i8 %79, 1
  %81 = zext nneg i8 %80 to i32
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.94, i32 noundef %81)
  %83 = lshr i8 %1, 3
  %84 = and i8 %83, 1
  %85 = zext nneg i8 %84 to i32
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.95, i32 noundef %85)
  %87 = lshr i8 %1, 4
  %88 = and i8 %87, 1
  %89 = zext nneg i8 %88 to i32
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.96, i32 noundef %89)
  %91 = lshr i8 %1, 5
  %92 = and i8 %91, 1
  %93 = zext nneg i8 %92 to i32
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.97, i32 noundef %93)
  %95 = lshr i8 %1, 7
  %96 = zext nneg i8 %95 to i32
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.93, i32 noundef %96)
  %.pre = trunc nuw i32 %7 to i16
  br label %98

98:                                               ; preds = %76, %70
  %trunc.pre-phi = phi i16 [ %.pre, %76 ], [ %trunc19, %70 ]
  switch i16 %trunc.pre-phi, label %272 [
    i16 -25248, label %99
    i16 258, label %133
    i16 288, label %133
    i16 352, label %174
    i16 8378, label %208
    i16 -15840, label %248
  ]

99:                                               ; preds = %98
  %100 = getelementptr inbounds i8, ptr %0, i64 8
  %101 = load ptr, ptr %100, align 8, !tbaa !28
  %102 = load ptr, ptr %101, align 8, !tbaa !29
  %103 = getelementptr inbounds i8, ptr %102, i64 16
  %104 = load ptr, ptr %103, align 8
  %105 = call noundef i32 %104(ptr noundef nonnull align 8 dereferenceable(56) %101, i8 noundef zeroext 72, ptr noundef null, ptr noundef nonnull %3, i32 noundef 1)
  %106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.98)
  %107 = load i8, ptr %3, align 1, !tbaa !5
  %108 = zext i8 %107 to i32
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.99, i32 noundef %108)
  %110 = load i8, ptr %3, align 1, !tbaa !5
  %111 = and i8 %110, 1
  %112 = zext nneg i8 %111 to i32
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.100, i32 noundef %112)
  %114 = load i8, ptr %3, align 1, !tbaa !5
  %115 = lshr i8 %114, 1
  %116 = and i8 %115, 1
  %117 = zext nneg i8 %116 to i32
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.101, i32 noundef %117)
  %119 = load i8, ptr %3, align 1, !tbaa !5
  %120 = lshr i8 %119, 2
  %121 = and i8 %120, 1
  %122 = zext nneg i8 %121 to i32
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.102, i32 noundef %122)
  %124 = load i8, ptr %3, align 1, !tbaa !5
  %125 = lshr i8 %124, 3
  %126 = and i8 %125, 1
  %127 = zext nneg i8 %126 to i32
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.103, i32 noundef %127)
  %129 = load i8, ptr %3, align 1, !tbaa !5
  %130 = lshr i8 %129, 4
  %131 = zext nneg i8 %130 to i32
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.104, i32 noundef %131)
  br label %272

133:                                              ; preds = %98, %98
  %134 = getelementptr inbounds i8, ptr %0, i64 8
  %135 = load ptr, ptr %134, align 8, !tbaa !28
  %136 = load ptr, ptr %135, align 8, !tbaa !29
  %137 = getelementptr inbounds i8, ptr %136, i64 16
  %138 = load ptr, ptr %137, align 8
  %139 = call noundef i32 %138(ptr noundef nonnull align 8 dereferenceable(56) %135, i8 noundef zeroext 53, ptr noundef null, ptr noundef nonnull %3, i32 noundef 1)
  %140 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.105)
  %141 = load i8, ptr %3, align 1, !tbaa !5
  %142 = zext i8 %141 to i32
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.106, i32 noundef %142)
  %144 = load i8, ptr %3, align 1, !tbaa !5
  %145 = and i8 %144, 1
  %146 = zext nneg i8 %145 to i32
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.107, i32 noundef %146)
  %148 = load i8, ptr %3, align 1, !tbaa !5
  %149 = lshr i8 %148, 1
  %150 = and i8 %149, 1
  %151 = zext nneg i8 %150 to i32
  %152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.108, i32 noundef %151)
  %153 = load i8, ptr %3, align 1, !tbaa !5
  %154 = lshr i8 %153, 2
  %155 = and i8 %154, 1
  %156 = zext nneg i8 %155 to i32
  %157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.109, i32 noundef %156)
  %158 = load i8, ptr %3, align 1, !tbaa !5
  %159 = lshr i8 %158, 3
  %160 = and i8 %159, 1
  %161 = zext nneg i8 %160 to i32
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.110, i32 noundef %161)
  %163 = load i8, ptr %3, align 1, !tbaa !5
  %164 = lshr i8 %163, 5
  %165 = and i8 %164, 1
  %166 = zext nneg i8 %165 to i32
  %167 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.111, i32 noundef %166)
  %168 = icmp eq i32 %7, 288
  br i1 %168, label %169, label %272

169:                                              ; preds = %133
  %170 = load i8, ptr %3, align 1, !tbaa !5
  %171 = lshr i8 %170, 6
  %172 = zext nneg i8 %171 to i32
  %173 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.112, i32 noundef %172)
  br label %272

174:                                              ; preds = %98
  %175 = getelementptr inbounds i8, ptr %0, i64 8
  %176 = load ptr, ptr %175, align 8, !tbaa !28
  %177 = load ptr, ptr %176, align 8, !tbaa !29
  %178 = getelementptr inbounds i8, ptr %177, i64 16
  %179 = load ptr, ptr %178, align 8
  %180 = call noundef i32 %179(ptr noundef nonnull align 8 dereferenceable(56) %176, i8 noundef zeroext 53, ptr noundef null, ptr noundef nonnull %3, i32 noundef 1)
  %181 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.105)
  %182 = load i8, ptr %3, align 1, !tbaa !5
  %183 = zext i8 %182 to i32
  %184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.113, i32 noundef %183)
  %185 = load i8, ptr %3, align 1, !tbaa !5
  %186 = lshr i8 %185, 7
  %187 = zext nneg i8 %186 to i32
  %188 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.114, i32 noundef %187)
  %189 = load i8, ptr %3, align 1, !tbaa !5
  %190 = lshr i8 %189, 6
  %191 = and i8 %190, 1
  %192 = zext nneg i8 %191 to i32
  %193 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.115, i32 noundef %192)
  %194 = load i8, ptr %3, align 1, !tbaa !5
  %195 = lshr i8 %194, 2
  %196 = and i8 %195, 15
  %197 = zext nneg i8 %196 to i32
  %198 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.116, i32 noundef %197)
  %199 = load i8, ptr %3, align 1, !tbaa !5
  %200 = lshr i8 %199, 1
  %201 = and i8 %200, 1
  %202 = zext nneg i8 %201 to i32
  %203 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.117, i32 noundef %202)
  %204 = load i8, ptr %3, align 1, !tbaa !5
  %205 = and i8 %204, 1
  %206 = zext nneg i8 %205 to i32
  %207 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.118, i32 noundef %206)
  br label %272

208:                                              ; preds = %98
  %209 = getelementptr inbounds i8, ptr %0, i64 8
  %210 = load ptr, ptr %209, align 8, !tbaa !28
  %211 = load ptr, ptr %210, align 8, !tbaa !29
  %212 = getelementptr inbounds i8, ptr %211, i64 16
  %213 = load ptr, ptr %212, align 8
  %214 = call noundef i32 %213(ptr noundef nonnull align 8 dereferenceable(56) %210, i8 noundef zeroext -75, ptr noundef null, ptr noundef nonnull %4, i32 noundef 2)
  %215 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.119)
  %216 = load i16, ptr %4, align 2, !tbaa !31
  %217 = zext i16 %216 to i32
  %218 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, i32 noundef %217)
  %219 = load i16, ptr %4, align 2, !tbaa !31
  %220 = lshr i16 %219, 12
  %221 = zext nneg i16 %220 to i32
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.121, i32 noundef %221)
  %223 = load i16, ptr %4, align 2, !tbaa !31
  %224 = lshr i16 %223, 9
  %225 = and i16 %224, 7
  %226 = zext nneg i16 %225 to i32
  %227 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.122, i32 noundef %226)
  %228 = load i16, ptr %4, align 2, !tbaa !31
  %229 = lshr i16 %228, 6
  %230 = and i16 %229, 7
  %231 = zext nneg i16 %230 to i32
  %232 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.123, i32 noundef %231)
  %233 = load i16, ptr %4, align 2, !tbaa !31
  %234 = lshr i16 %233, 4
  %235 = and i16 %234, 1
  %236 = zext nneg i16 %235 to i32
  %237 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.124, i32 noundef %236)
  %238 = load i16, ptr %4, align 2, !tbaa !31
  %239 = lshr i16 %238, 3
  %240 = and i16 %239, 1
  %241 = zext nneg i16 %240 to i32
  %242 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.125, i32 noundef %241)
  %243 = load i16, ptr %4, align 2, !tbaa !31
  %244 = lshr i16 %243, 2
  %245 = and i16 %244, 1
  %246 = zext nneg i16 %245 to i32
  %247 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.126, i32 noundef %246)
  br label %272

248:                                              ; preds = %98
  %249 = getelementptr inbounds i8, ptr %0, i64 8
  %250 = load ptr, ptr %249, align 8, !tbaa !28
  %251 = load ptr, ptr %250, align 8, !tbaa !29
  %252 = getelementptr inbounds i8, ptr %251, i64 16
  %253 = load ptr, ptr %252, align 8
  %254 = call noundef i32 %253(ptr noundef nonnull align 8 dereferenceable(56) %250, i8 noundef zeroext 21, ptr noundef null, ptr noundef nonnull %3, i32 noundef 1)
  %255 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.105)
  %256 = load i8, ptr %3, align 1, !tbaa !5
  %257 = zext i8 %256 to i32
  %258 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.127, i32 noundef %257)
  %259 = load i8, ptr %3, align 1, !tbaa !5
  %260 = lshr i8 %259, 6
  %261 = zext nneg i8 %260 to i32
  %262 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.128, i32 noundef %261)
  %263 = load i8, ptr %3, align 1, !tbaa !5
  %264 = lshr i8 %263, 3
  %265 = and i8 %264, 1
  %266 = zext nneg i8 %265 to i32
  %267 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.90, i32 noundef %266)
  %268 = load i8, ptr %3, align 1, !tbaa !5
  %269 = and i8 %268, 7
  %270 = zext nneg i8 %269 to i32
  %271 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.129, i32 noundef %270)
  br label %272

272:                                              ; preds = %133, %169, %248, %208, %174, %99, %98
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.vector.reduce.or.v16i8(<16 x i8>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.vector.reduce.or.v8i8(<8 x i8>) #2

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 20}
!9 = !{!"_ZTS8SPIFlash", !10, i64 8, !6, i64 16, !11, i64 20, !10, i64 24, !12, i64 32}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!"bool", !6, i64 0}
!13 = !{!9, !10, i64 24}
!14 = !{!15, !6, i64 80}
!15 = !{!"_ZTS7flash_t", !16, i64 0, !16, i64 32, !11, i64 64, !12, i64 68, !12, i64 69, !12, i64 70, !12, i64 71, !6, i64 72, !19, i64 76, !6, i64 80, !6, i64 81, !19, i64 88, !20, i64 92}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !6, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!18 = !{!"long", !6, i64 0}
!19 = !{!"_ZTS8tb_loc_t", !6, i64 0}
!20 = !{!"short", !6, i64 0}
!21 = !{!15, !6, i64 72}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !23, !24, !25}
!27 = distinct !{!27, !23, !25, !24}
!28 = !{!9, !10, i64 8}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !7, i64 0}
!31 = !{!20, !20, i64 0}


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