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

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.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] }
%"class.std::allocator.0" = type { i8 }
%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] }>

@.str.136 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.142 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [24 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8SPIFlash12write_enableEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8SPIFlash17enable_protectionEh(ptr noundef nonnull align 8 dereferenceable(33), i8 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash15read_status_regEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN8SPIFlash6get_tbEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

declare void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash11get_bp_maskEv(ptr noundef nonnull align 8 dereferenceable(33)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8SPIFlash17enable_protectionEj(ptr noundef nonnull align 8 dereferenceable(33) %0, i32 noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca [2 x i8], align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator.0", align 1
  %27 = alloca i32, align 4
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i8, align 1
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::allocator.0", align 1
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca %"class.std::allocator.0", align 1
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::allocator.0", align 1
  %37 = alloca i8, align 1
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %40 = load ptr, ptr %4, align 8
  %41 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = icmp ne ptr %42, null
  br i1 %43, label %56, label %44

44:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.139, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %45 unwind label %47

45:                                               ; preds = %44
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %6, i1 noundef zeroext true)
          to label %46 unwind label %51

46:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  store i32 -1, ptr %3, align 4
  br label %342

47:                                               ; preds = %44
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  br label %55

51:                                               ; preds = %45
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %55

55:                                               ; preds = %51, %47
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %344

56:                                               ; preds = %2
  %57 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.flash_t, ptr %58, i32 0, i32 10
  %60 = load i8, ptr %59, align 8, !tbaa !14
  %61 = zext i8 %60 to i32
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %75

63:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.136, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %64 unwind label %66

64:                                               ; preds = %63
  invoke void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %10, i1 noundef zeroext true)
          to label %65 unwind label %70

65:                                               ; preds = %64
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  store i32 -1, ptr %3, align 4
  br label %342

66:                                               ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %8, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %9, align 4
  br label %74

70:                                               ; preds = %64
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %8, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  br label %344

75:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %76 = call noundef zeroext i8 @_ZN8SPIFlash11get_bp_maskEv(ptr noundef nonnull align 8 dereferenceable(33) %40)
  store i8 %76, ptr %12, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %77 = call noundef zeroext i8 @_ZN8SPIFlash15read_status_regEv(ptr noundef nonnull align 8 dereferenceable(33) %40)
  store i8 %77, ptr %13, align 1, !tbaa !21
  %78 = load i8, ptr %12, align 1, !tbaa !21
  %79 = zext i8 %78 to i32
  %80 = xor i32 %79, -1
  %81 = load i8, ptr %13, align 1, !tbaa !21
  %82 = zext i8 %81 to i32
  %83 = and i32 %82, %80
  %84 = trunc i32 %83 to i8
  store i8 %84, ptr %13, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %85 = load i8, ptr %13, align 1, !tbaa !21
  %86 = zext i8 %85 to i32
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = call noundef zeroext i8 @_ZN8SPIFlash9len_to_bpEj(ptr noundef nonnull align 8 dereferenceable(33) %40, i32 noundef %87)
  %89 = zext i8 %88 to i32
  %90 = or i32 %86, %89
  %91 = trunc i32 %90 to i8
  store i8 %91, ptr %14, align 1, !tbaa !21
  %92 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds %struct.flash_t, ptr %93, i32 0, i32 6
  %95 = load i8, ptr %94, align 1, !tbaa !22, !range !23, !noundef !24
  %96 = trunc i8 %95 to i1
  br i1 %96, label %97, label %149

97:                                               ; preds = %75
  %98 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct.flash_t, ptr %99, i32 0, i32 9
  %101 = load i32, ptr %100, align 4, !tbaa !25
  %102 = icmp ne i32 %101, 99
  br i1 %102, label %103, label %149

103:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %104 = call noundef signext i8 @_ZN8SPIFlash6get_tbEv(ptr noundef nonnull align 8 dereferenceable(33) %40)
  store i8 %104, ptr %15, align 1, !tbaa !21
  %105 = load i8, ptr %15, align 1, !tbaa !21
  %106 = zext i8 %105 to i32
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %145

108:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.140, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %109 unwind label %118

109:                                              ; preds = %108
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %17, i1 noundef zeroext true)
          to label %110 unwind label %122

110:                                              ; preds = %109
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.141, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %111 unwind label %127

111:                                              ; preds = %110
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %19, i1 noundef zeroext true)
          to label %112 unwind label %131

112:                                              ; preds = %111
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %113 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %114 unwind label %136

114:                                              ; preds = %112
  %115 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.142)
          to label %116 unwind label %136

116:                                              ; preds = %114
  br i1 %115, label %117, label %140

117:                                              ; preds = %116
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %141

118:                                              ; preds = %108
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %8, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %9, align 4
  br label %126

122:                                              ; preds = %109
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %8, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %126

126:                                              ; preds = %122, %118
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %144

127:                                              ; preds = %110
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  br label %135

131:                                              ; preds = %111
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %135

135:                                              ; preds = %131, %127
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %144

136:                                              ; preds = %114, %112
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %8, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %9, align 4
  br label %144

140:                                              ; preds = %116
  store i32 0, ptr %21, align 4
  br label %141

141:                                              ; preds = %140, %117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  %142 = load i32, ptr %21, align 4
  switch i32 %142, label %146 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  br label %145

144:                                              ; preds = %136, %135, %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %341

145:                                              ; preds = %143, %103
  store i32 0, ptr %21, align 4
  br label %146

146:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  %147 = load i32, ptr %21, align 4
  switch i32 %147, label %340 [
    i32 0, label %148
  ]

148:                                              ; preds = %146
  br label %149

149:                                              ; preds = %148, %97, %75
  %150 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 4
  %151 = load i32, ptr %150, align 4, !tbaa !26
  %152 = lshr i32 %151, 8
  %153 = icmp eq i32 %152, 66070
  br i1 %153, label %154, label %203

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  %155 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %156 = load ptr, ptr %155, align 8, !tbaa !27
  %157 = load ptr, ptr %156, align 8, !tbaa !28
  %158 = getelementptr inbounds ptr, ptr %157, i64 2
  %159 = load ptr, ptr %158, align 8
  %160 = call noundef i32 %159(ptr noundef nonnull align 8 dereferenceable(56) %156, i8 noundef zeroext 53, ptr noundef null, ptr noundef %23, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #5
  %161 = load i8, ptr %14, align 1, !tbaa !21
  store i8 %161, ptr %24, align 1, !tbaa !21
  %162 = getelementptr inbounds i8, ptr %24, i64 1
  %163 = load i8, ptr %23, align 1, !tbaa !21
  store i8 %163, ptr %162, align 1, !tbaa !21
  %164 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %165 = load ptr, ptr %164, align 8, !tbaa !11
  %166 = getelementptr inbounds %struct.flash_t, ptr %165, i32 0, i32 7
  %167 = load i8, ptr %166, align 8, !tbaa !30
  %168 = zext i8 %167 to i32
  %169 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 1
  %170 = load i8, ptr %169, align 1, !tbaa !21
  %171 = zext i8 %170 to i32
  %172 = or i32 %171, %168
  %173 = trunc i32 %172 to i8
  store i8 %173, ptr %169, align 1, !tbaa !21
  %174 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %175 = load ptr, ptr %174, align 8, !tbaa !27
  %176 = getelementptr inbounds [2 x i8], ptr %24, i64 0, i64 0
  %177 = load ptr, ptr %175, align 8, !tbaa !28
  %178 = getelementptr inbounds ptr, ptr %177, i64 2
  %179 = load ptr, ptr %178, align 8
  %180 = call noundef i32 %179(ptr noundef nonnull align 8 dereferenceable(56) %175, i8 noundef zeroext 1, ptr noundef %176, ptr noundef null, i32 noundef 2)
  %181 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !27
  %183 = load ptr, ptr %182, align 8, !tbaa !28
  %184 = getelementptr inbounds ptr, ptr %183, i64 4
  %185 = load ptr, ptr %184, align 8
  %186 = call noundef i32 %185(ptr noundef nonnull align 8 dereferenceable(56) %182, i8 noundef zeroext 5, i8 noundef zeroext 3, i8 noundef zeroext 0, i32 noundef 1000, i1 noundef zeroext false)
  %187 = icmp slt i32 %186, 0
  br i1 %187, label %188, label %200

188:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @.str.138, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %189 unwind label %191

189:                                              ; preds = %188
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %25, i1 noundef zeroext true)
          to label %190 unwind label %195

190:                                              ; preds = %189
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %202

191:                                              ; preds = %188
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %8, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %9, align 4
  br label %199

195:                                              ; preds = %189
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %8, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  br label %199

199:                                              ; preds = %195, %191
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %341

200:                                              ; preds = %154
  %201 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %201, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %202

202:                                              ; preds = %200, %190
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %340

203:                                              ; preds = %149
  %204 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %205 = load ptr, ptr %204, align 8, !tbaa !11
  %206 = getelementptr inbounds %struct.flash_t, ptr %205, i32 0, i32 9
  %207 = load i32, ptr %206, align 4, !tbaa !25
  %208 = icmp eq i32 %207, 0
  br i1 %208, label %209, label %219

209:                                              ; preds = %203
  %210 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %211 = load ptr, ptr %210, align 8, !tbaa !11
  %212 = getelementptr inbounds %struct.flash_t, ptr %211, i32 0, i32 7
  %213 = load i8, ptr %212, align 8, !tbaa !30
  %214 = zext i8 %213 to i32
  %215 = load i8, ptr %14, align 1, !tbaa !21
  %216 = zext i8 %215 to i32
  %217 = or i32 %216, %214
  %218 = trunc i32 %217 to i8
  store i8 %218, ptr %14, align 1, !tbaa !21
  br label %219

219:                                              ; preds = %209, %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %220 = load i8, ptr %14, align 1, !tbaa !21
  %221 = call noundef i32 @_ZN8SPIFlash17enable_protectionEh(ptr noundef nonnull align 8 dereferenceable(33) %40, i8 noundef zeroext %220)
  store i32 %221, ptr %27, align 4, !tbaa !9
  %222 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %223 = load ptr, ptr %222, align 8, !tbaa !11
  %224 = getelementptr inbounds %struct.flash_t, ptr %223, i32 0, i32 9
  %225 = load i32, ptr %224, align 4, !tbaa !25
  %226 = icmp eq i32 %225, 99
  br i1 %226, label %227, label %229

227:                                              ; preds = %219
  %228 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %228, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %339

229:                                              ; preds = %219
  %230 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %231 = load ptr, ptr %230, align 8, !tbaa !11
  %232 = getelementptr inbounds %struct.flash_t, ptr %231, i32 0, i32 9
  %233 = load i32, ptr %232, align 4, !tbaa !25
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %235, label %337

235:                                              ; preds = %229
  %236 = load i32, ptr %27, align 4, !tbaa !9
  %237 = icmp eq i32 %236, -1
  br i1 %237, label %238, label %240

238:                                              ; preds = %235
  %239 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %239, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %339

240:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #5
  %241 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %242 = load ptr, ptr %241, align 8, !tbaa !11
  %243 = getelementptr inbounds %struct.flash_t, ptr %242, i32 0, i32 9
  %244 = load i32, ptr %243, align 4, !tbaa !25
  %245 = icmp eq i32 %244, 1
  br i1 %245, label %246, label %251

246:                                              ; preds = %240
  %247 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 5
  %248 = load ptr, ptr %247, align 8, !tbaa !11
  %249 = getelementptr inbounds %struct.flash_t, ptr %248, i32 0, i32 7
  %250 = load i8, ptr %249, align 8, !tbaa !30
  store i8 %250, ptr %30, align 1, !tbaa !21
  store i8 66, ptr %28, align 1, !tbaa !21
  store i8 72, ptr %29, align 1, !tbaa !21
  br label %263

251:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.143, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %252 unwind label %254

252:                                              ; preds = %251
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %31, i1 noundef zeroext true)
          to label %253 unwind label %258

253:                                              ; preds = %252
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %333

254:                                              ; preds = %251
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %8, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %9, align 4
  br label %262

258:                                              ; preds = %252
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %8, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  br label %262

262:                                              ; preds = %258, %254
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #5
  br label %336

263:                                              ; preds = %246
  %264 = call noundef i32 @_ZN8SPIFlash12write_enableEv(ptr noundef nonnull align 8 dereferenceable(33) %40)
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %266, label %278

266:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef @.str.144, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %267 unwind label %269

267:                                              ; preds = %266
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %33, i1 noundef zeroext true)
          to label %268 unwind label %273

268:                                              ; preds = %267
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %333

269:                                              ; preds = %266
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %8, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %9, align 4
  br label %277

273:                                              ; preds = %267
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %8, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #5
  br label %277

277:                                              ; preds = %273, %269
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #5
  br label %336

278:                                              ; preds = %263
  %279 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %280 = load ptr, ptr %279, align 8, !tbaa !27
  %281 = load i8, ptr %28, align 1, !tbaa !21
  %282 = load ptr, ptr %280, align 8, !tbaa !28
  %283 = getelementptr inbounds ptr, ptr %282, i64 2
  %284 = load ptr, ptr %283, align 8
  %285 = call noundef i32 %284(ptr noundef nonnull align 8 dereferenceable(56) %280, i8 noundef zeroext %281, ptr noundef %30, ptr noundef null, i32 noundef 1)
  %286 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %287 = load ptr, ptr %286, align 8, !tbaa !27
  %288 = load ptr, ptr %287, align 8, !tbaa !28
  %289 = getelementptr inbounds ptr, ptr %288, i64 4
  %290 = load ptr, ptr %289, align 8
  %291 = call noundef i32 %290(ptr noundef nonnull align 8 dereferenceable(56) %287, i8 noundef zeroext 5, i8 noundef zeroext 3, i8 noundef zeroext 0, i32 noundef 1000, i1 noundef zeroext false)
  %292 = icmp slt i32 %291, 0
  br i1 %292, label %293, label %305

293:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.138, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %294 unwind label %296

294:                                              ; preds = %293
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %35, i1 noundef zeroext true)
          to label %295 unwind label %300

295:                                              ; preds = %294
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %333

296:                                              ; preds = %293
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %8, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %9, align 4
  br label %304

300:                                              ; preds = %294
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %8, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  br label %304

304:                                              ; preds = %300, %296
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #5
  br label %336

305:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #5
  %306 = getelementptr inbounds %class.SPIFlash, ptr %40, i32 0, i32 1
  %307 = load ptr, ptr %306, align 8, !tbaa !27
  %308 = load i8, ptr %29, align 1, !tbaa !21
  %309 = load ptr, ptr %307, align 8, !tbaa !28
  %310 = getelementptr inbounds ptr, ptr %309, i64 2
  %311 = load ptr, ptr %310, align 8
  %312 = call noundef i32 %311(ptr noundef nonnull align 8 dereferenceable(56) %307, i8 noundef zeroext %308, ptr noundef null, ptr noundef %37, i32 noundef 1)
  %313 = load i8, ptr %37, align 1, !tbaa !21
  %314 = zext i8 %313 to i32
  %315 = load i8, ptr %30, align 1, !tbaa !21
  %316 = zext i8 %315 to i32
  %317 = and i32 %314, %316
  %318 = icmp eq i32 %317, 0
  br i1 %318, label %319, label %331

319:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef @.str.145, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %320 unwind label %322

320:                                              ; preds = %319
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %38, i1 noundef zeroext true)
          to label %321 unwind label %326

321:                                              ; preds = %320
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %332

322:                                              ; preds = %319
  %323 = landingpad { ptr, i32 }
          cleanup
  %324 = extractvalue { ptr, i32 } %323, 0
  store ptr %324, ptr %8, align 8
  %325 = extractvalue { ptr, i32 } %323, 1
  store i32 %325, ptr %9, align 4
  br label %330

326:                                              ; preds = %320
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %8, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #5
  br label %330

330:                                              ; preds = %326, %322
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  br label %336

331:                                              ; preds = %305
  store i32 0, ptr %21, align 4
  br label %332

332:                                              ; preds = %331, %321
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  br label %333

333:                                              ; preds = %332, %295, %268, %253
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  %334 = load i32, ptr %21, align 4
  switch i32 %334, label %339 [
    i32 0, label %335
  ]

335:                                              ; preds = %333
  br label %337

336:                                              ; preds = %330, %304, %277, %262
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %341

337:                                              ; preds = %335, %229
  %338 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %338, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %339

339:                                              ; preds = %337, %333, %238, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %340

340:                                              ; preds = %339, %202, %146
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %342

341:                                              ; preds = %336, %199, %144
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %344

342:                                              ; preds = %340, %65, %46
  %343 = load i32, ptr %3, align 4
  ret i32 %343

344:                                              ; preds = %341, %74, %55
  %345 = load ptr, ptr %8, align 8
  %346 = load i32, ptr %9, align 4
  %347 = insertvalue { ptr, i32 } poison, ptr %345, 0
  %348 = insertvalue { ptr, i32 } %347, i32 %346, 1
  resume { ptr, i32 } %348
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash9len_to_bpEj(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef) #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.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] }
%"class.std::allocator.0" = type { i8 }

@.str.136 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.142 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [24 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8SPIFlash12write_enableEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8SPIFlash17enable_protectionEh(ptr noundef nonnull align 8 dereferenceable(33), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash15read_status_regEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN8SPIFlash6get_tbEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

declare void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash11get_bp_maskEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8SPIFlash17enable_protectionEj(ptr noundef nonnull align 8 dereferenceable(33) %0, i32 noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca i8, align 1
  %13 = alloca [2 x i8], align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca i8, align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.0", align 1
  %23 = alloca i8, align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator.0", align 1
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %28, label %36

28:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.139, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %29 unwind label %31

29:                                               ; preds = %28
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext true)
          to label %30 unwind label %33

30:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %200

31:                                               ; preds = %28
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %29
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %201

36:                                               ; preds = %2
  %37 = getelementptr inbounds i8, ptr %27, i64 80
  %38 = load i8, ptr %37, align 8, !tbaa !12
  %39 = icmp eq i8 %38, 0
  br i1 %39, label %40, label %48

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.136, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %41 unwind label %43

41:                                               ; preds = %40
  invoke void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %5, i1 noundef zeroext true)
          to label %42 unwind label %45

42:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %200

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %47

45:                                               ; preds = %41
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %47

47:                                               ; preds = %45, %43
  %.pn75 = phi { ptr, i32 } [ %46, %45 ], [ %44, %43 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %201

48:                                               ; preds = %36
  %49 = tail call noundef zeroext i8 @_ZN8SPIFlash11get_bp_maskEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %50 = tail call noundef zeroext i8 @_ZN8SPIFlash15read_status_regEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %51 = xor i8 %49, -1
  %52 = and i8 %50, %51
  %53 = tail call noundef zeroext i8 @_ZN8SPIFlash9len_to_bpEj(ptr noundef nonnull align 8 dereferenceable(33) %0, i32 noundef %1)
  %54 = or i8 %52, %53
  %55 = load ptr, ptr %26, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 71
  %57 = load i8, ptr %56, align 1, !tbaa !19, !range !20, !noundef !21
  %58 = trunc nuw i8 %57 to i1
  br i1 %58, label %59, label %.critedge

59:                                               ; preds = %48
  %60 = getelementptr inbounds i8, ptr %55, i64 76
  %61 = load i32, ptr %60, align 4, !tbaa !22
  %.not54 = icmp eq i32 %61, 99
  br i1 %.not54, label %.critedge, label %62

62:                                               ; preds = %59
  %63 = tail call noundef signext i8 @_ZN8SPIFlash6get_tbEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %64 = icmp eq i8 %63, 0
  br i1 %64, label %65, label %.critedge

65:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.140, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %66 unwind label %73

66:                                               ; preds = %65
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %8, i1 noundef zeroext true)
          to label %67 unwind label %75

67:                                               ; preds = %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.141, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %68 unwind label %78

68:                                               ; preds = %67
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %10, i1 noundef zeroext true)
          to label %69 unwind label %80

69:                                               ; preds = %68
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  %70 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %71 unwind label %83

71:                                               ; preds = %69
  %72 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.142)
          to label %85 unwind label %83

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %66
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %77

77:                                               ; preds = %75, %73
  %.pn55 = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %86

78:                                               ; preds = %67
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %82

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %82

82:                                               ; preds = %80, %78
  %.pn57 = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %86

83:                                               ; preds = %71, %69
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %86

85:                                               ; preds = %71
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br i1 %72, label %200, label %.critedge

86:                                               ; preds = %83, %82, %77
  %.pn59 = phi { ptr, i32 } [ %84, %83 ], [ %.pn57, %82 ], [ %.pn55, %77 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %201

.critedge:                                        ; preds = %62, %85, %59, %48
  %87 = getelementptr inbounds i8, ptr %0, i64 20
  %88 = load i32, ptr %87, align 4, !tbaa !23
  %.mask = and i32 %88, -256
  %89 = icmp eq i32 %.mask, 16913920
  br i1 %89, label %90, label %123

90:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  %91 = getelementptr inbounds i8, ptr %0, i64 8
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %95 = load ptr, ptr %94, align 8
  %96 = call noundef i32 %95(ptr noundef nonnull align 8 dereferenceable(56) %92, i8 noundef zeroext 53, ptr noundef null, ptr noundef nonnull %12, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %13) #5
  store i8 %54, ptr %13, align 1, !tbaa !27
  %97 = getelementptr inbounds i8, ptr %13, i64 1
  %98 = load i8, ptr %12, align 1, !tbaa !27
  %99 = load ptr, ptr %26, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 72
  %101 = load i8, ptr %100, align 8, !tbaa !28
  %102 = or i8 %101, %98
  store i8 %102, ptr %97, align 1, !tbaa !27
  %103 = load ptr, ptr %91, align 8, !tbaa !24
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  %105 = getelementptr inbounds i8, ptr %104, i64 16
  %106 = load ptr, ptr %105, align 8
  %107 = call noundef i32 %106(ptr noundef nonnull align 8 dereferenceable(56) %103, i8 noundef zeroext 1, ptr noundef nonnull %13, ptr noundef null, i32 noundef 2)
  %108 = load ptr, ptr %91, align 8, !tbaa !24
  %109 = load ptr, ptr %108, align 8, !tbaa !25
  %110 = getelementptr inbounds i8, ptr %109, i64 32
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef i32 %111(ptr noundef nonnull align 8 dereferenceable(56) %108, i8 noundef zeroext 5, i8 noundef zeroext 3, i8 noundef zeroext 0, i32 noundef 1000, i1 noundef zeroext false)
  %113 = icmp slt i32 %112, 0
  br i1 %113, label %114, label %122

114:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.138, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %115 unwind label %117

115:                                              ; preds = %114
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %14, i1 noundef zeroext true)
          to label %116 unwind label %119

116:                                              ; preds = %115
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %122

117:                                              ; preds = %114
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %121

119:                                              ; preds = %115
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %121

121:                                              ; preds = %119, %117
  %.pn72 = phi { ptr, i32 } [ %120, %119 ], [ %118, %117 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %201

122:                                              ; preds = %90, %116
  %.4 = phi i32 [ -1, %116 ], [ 0, %90 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %200

123:                                              ; preds = %.critedge
  %124 = load ptr, ptr %26, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 76
  %126 = load i32, ptr %125, align 4, !tbaa !22
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %132

128:                                              ; preds = %123
  %129 = getelementptr inbounds i8, ptr %124, i64 72
  %130 = load i8, ptr %129, align 8, !tbaa !28
  %131 = or i8 %130, %54
  br label %132

132:                                              ; preds = %128, %123
  %.046 = phi i8 [ %131, %128 ], [ %54, %123 ]
  %133 = call noundef i32 @_ZN8SPIFlash17enable_protectionEh(ptr noundef nonnull align 8 dereferenceable(33) %0, i8 noundef zeroext %.046)
  %134 = load ptr, ptr %26, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 76
  %136 = load i32, ptr %135, align 4, !tbaa !22
  switch i32 %136, label %137 [
    i32 99, label %200
    i32 0, label %200
  ]

137:                                              ; preds = %132
  %138 = icmp eq i32 %133, -1
  br i1 %138, label %200, label %139

139:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  %140 = icmp eq i32 %136, 1
  br i1 %140, label %141, label %145

141:                                              ; preds = %139
  %142 = getelementptr inbounds i8, ptr %134, i64 72
  %143 = load i8, ptr %142, align 8, !tbaa !28
  store i8 %143, ptr %16, align 1, !tbaa !27
  %144 = call noundef i32 @_ZN8SPIFlash12write_enableEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  %.not64 = icmp eq i32 %144, 0
  br i1 %.not64, label %161, label %153

145:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.143, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %146 unwind label %148

146:                                              ; preds = %145
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %17, i1 noundef zeroext true)
          to label %147 unwind label %150

147:                                              ; preds = %146
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #5
  br label %.critedge79

148:                                              ; preds = %145
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %152

150:                                              ; preds = %146
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %152

152:                                              ; preds = %150, %148
  %.pn62 = phi { ptr, i32 } [ %151, %150 ], [ %149, %148 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #5
  br label %199

153:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.144, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %154 unwind label %156

154:                                              ; preds = %153
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %19, i1 noundef zeroext true)
          to label %155 unwind label %158

155:                                              ; preds = %154
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  br label %.critedge79

156:                                              ; preds = %153
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %160

158:                                              ; preds = %154
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %160

160:                                              ; preds = %158, %156
  %.pn69 = phi { ptr, i32 } [ %159, %158 ], [ %157, %156 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  br label %199

161:                                              ; preds = %141
  %162 = getelementptr inbounds i8, ptr %0, i64 8
  %163 = load ptr, ptr %162, align 8, !tbaa !24
  %164 = load ptr, ptr %163, align 8, !tbaa !25
  %165 = getelementptr inbounds i8, ptr %164, i64 16
  %166 = load ptr, ptr %165, align 8
  %167 = call noundef i32 %166(ptr noundef nonnull align 8 dereferenceable(56) %163, i8 noundef zeroext 66, ptr noundef nonnull %16, ptr noundef null, i32 noundef 1)
  %168 = load ptr, ptr %162, align 8, !tbaa !24
  %169 = load ptr, ptr %168, align 8, !tbaa !25
  %170 = getelementptr inbounds i8, ptr %169, i64 32
  %171 = load ptr, ptr %170, align 8
  %172 = call noundef i32 %171(ptr noundef nonnull align 8 dereferenceable(56) %168, i8 noundef zeroext 5, i8 noundef zeroext 3, i8 noundef zeroext 0, i32 noundef 1000, i1 noundef zeroext false)
  %173 = icmp slt i32 %172, 0
  br i1 %173, label %174, label %182

174:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.138, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %175 unwind label %177

175:                                              ; preds = %174
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %21, i1 noundef zeroext true)
          to label %176 unwind label %179

176:                                              ; preds = %175
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #5
  br label %.critedge79

177:                                              ; preds = %174
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %181

179:                                              ; preds = %175
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  br label %181

181:                                              ; preds = %179, %177
  %.pn67 = phi { ptr, i32 } [ %180, %179 ], [ %178, %177 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #5
  br label %199

182:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #5
  %183 = load ptr, ptr %162, align 8, !tbaa !24
  %184 = load ptr, ptr %183, align 8, !tbaa !25
  %185 = getelementptr inbounds i8, ptr %184, i64 16
  %186 = load ptr, ptr %185, align 8
  %187 = call noundef i32 %186(ptr noundef nonnull align 8 dereferenceable(56) %183, i8 noundef zeroext 72, ptr noundef null, ptr noundef nonnull %23, i32 noundef 1)
  %188 = load i8, ptr %23, align 1, !tbaa !27
  %189 = load i8, ptr %16, align 1, !tbaa !27
  %190 = and i8 %189, %188
  %.not82 = icmp eq i8 %190, 0
  br i1 %.not82, label %191, label %.critedge81

191:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.145, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %192 unwind label %194

192:                                              ; preds = %191
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %24, i1 noundef zeroext true)
          to label %193 unwind label %196

193:                                              ; preds = %192
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %200

194:                                              ; preds = %191
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %198

196:                                              ; preds = %192
  %197 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %198

198:                                              ; preds = %196, %194
  %.pn65 = phi { ptr, i32 } [ %197, %196 ], [ %195, %194 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #5
  br label %199

199:                                              ; preds = %198, %181, %160, %152
  %.pn69.pn = phi { ptr, i32 } [ %.pn69, %160 ], [ %.pn67, %181 ], [ %.pn65, %198 ], [ %.pn62, %152 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %201

.critedge81:                                      ; preds = %182
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %200

.critedge79:                                      ; preds = %147, %176, %155
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  br label %200

200:                                              ; preds = %132, %.critedge81, %193, %122, %85, %.critedge79, %137, %132, %42, %30
  %.9 = phi i32 [ -1, %42 ], [ -1, %30 ], [ %.4, %122 ], [ -1, %85 ], [ -1, %193 ], [ %133, %132 ], [ -1, %137 ], [ -1, %.critedge79 ], [ %133, %.critedge81 ], [ %133, %132 ]
  ret i32 %.9

201:                                              ; preds = %86, %121, %199, %47, %35
  %.pn75.pn = phi { ptr, i32 } [ %.pn75, %47 ], [ %.pn, %35 ], [ %.pn72, %121 ], [ %.pn69.pn, %199 ], [ %.pn59, %86 ]
  resume { ptr, i32 } %.pn75.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN8SPIFlash9len_to_bpEj(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass