; LLVM IR from trabucayre/openFPGALoader :: src/lattice.ll (ZN7Lattice11program_memEv)

; 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.LatticeBitParser = type { %class.ConfigBitstreamParser, i64, i8, %"class.std::vector.86" }
%class.ConfigBitstreamParser = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, i8, %"class.std::vector", %"class.std::__cxx11::basic_string", %"class.std::map.81" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, 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::map.81" = type { %"class.std::_Rb_tree.82" }
%"class.std::_Rb_tree.82" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.86" = type { %"struct.std::_Vector_base.87" }
%"struct.std::_Vector_base.87" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%class.ProgressBar = type <{ %"class.std::__cxx11::basic_string", i32, i32, %"class.std::chrono::time_point", i8, i8, [6 x i8] }>
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%class.Device = type <{ ptr, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, i8 }>
%class.Lattice = type { %class.Device.base, %class.SPIInterface, i32, i32 }
%class.Device.base = type <{ ptr, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i8, i8, i8 }>
%class.SPIInterface = type { ptr, i8, i32, i8, i8, i8, %"class.std::__cxx11::basic_string" }

@.str.613 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.614 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.615 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.616 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.617 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.618 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.619 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.620 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.621 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.622 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.623 = external hidden unnamed_addr constant [28 x i8], align 1
@__const._ZN7Lattice11program_memEv.tx_tmp = external hidden unnamed_addr constant [1 x i8], align 1
@.str.624 = external hidden unnamed_addr constant [13 x i8], align 1
@__const._ZN7Lattice11program_memEv.mask_erase = external hidden unnamed_addr constant [1 x i32], align 4
@.str.625 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.626 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.627 = 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152), i64 noundef, i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice11program_memEv(ptr noundef nonnull align 8 dereferenceable(152) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %class.LatticeBitParser, align 8
  %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 %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca %"class.std::allocator.0", align 1
  %25 = alloca i32, align 4
  %26 = alloca [256 x i8], align 16
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator.0", align 1
  %29 = alloca [46 x i8], align 16
  %30 = alloca i32, align 4
  %31 = alloca i8, align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator.0", align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator.0", align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator.0", align 1
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator.0", align 1
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::allocator.0", align 1
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca %"class.std::allocator.0", align 1
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca %"class.std::allocator.0", align 1
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::allocator.0", align 1
  %48 = alloca [1 x i8], align 1
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::allocator.0", align 1
  %51 = alloca %"class.std::__cxx11::basic_string", align 8
  %52 = alloca %"class.std::allocator.0", align 1
  %53 = alloca %"class.std::__cxx11::basic_string", align 8
  %54 = alloca %"class.std::allocator.0", align 1
  %55 = alloca %"class.std::__cxx11::basic_string", align 8
  %56 = alloca %"class.std::allocator.0", align 1
  %57 = alloca [1 x i32], align 4
  %58 = alloca %"class.std::__cxx11::basic_string", align 8
  %59 = alloca %"class.std::allocator.0", align 1
  %60 = alloca %"class.std::__cxx11::basic_string", align 8
  %61 = alloca %"class.std::allocator.0", align 1
  %62 = alloca ptr, align 8
  %63 = alloca i32, align 4
  %64 = alloca [1024 x i8], align 16
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca %class.ProgressBar, align 8
  %68 = alloca %"class.std::__cxx11::basic_string", align 8
  %69 = alloca %"class.std::allocator.0", align 1
  %70 = alloca i32, align 4
  %71 = alloca i32, align 4
  %72 = alloca i32, align 4
  %73 = alloca %"class.std::__cxx11::basic_string", align 8
  %74 = alloca %"class.std::allocator.0", align 1
  %75 = alloca %"class.std::__cxx11::basic_string", align 8
  %76 = alloca %"class.std::allocator.0", align 1
  %77 = alloca %"class.std::__cxx11::basic_string", align 8
  %78 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %79 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 200, ptr %5) #9
  %80 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 2
  %81 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %82 = load i8, ptr %81, align 1, !tbaa !9, !range !16, !noundef !17
  %83 = trunc i8 %82 to i1
  call void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200) %5, ptr noundef nonnull align 8 dereferenceable(32) %80, i1 noundef zeroext false, i1 noundef zeroext %83)
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.613, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %84 unwind label %101

84:                                               ; preds = %1
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %6, i1 noundef zeroext false)
          to label %85 unwind label %105

85:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %86 unwind label %110

86:                                               ; preds = %85
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %10, i1 noundef zeroext true)
          to label %87 unwind label %114

87:                                               ; preds = %86
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #9
  %88 = invoke noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200) %5)
          to label %89 unwind label %119

89:                                               ; preds = %87
  %90 = icmp ne i32 %88, 0
  %91 = zext i1 %90 to i8
  store i8 %91, ptr %4, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.615, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %92 unwind label %123

92:                                               ; preds = %89
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %12, i1 noundef zeroext false)
          to label %93 unwind label %127

93:                                               ; preds = %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  %94 = load i8, ptr %4, align 1, !tbaa !18, !range !16, !noundef !17
  %95 = trunc i8 %94 to i1
  %96 = zext i1 %95 to i32
  %97 = icmp eq i32 %96, 1
  br i1 %97, label %98, label %141

98:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %99 unwind label %132

99:                                               ; preds = %98
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %14, i1 noundef zeroext true)
          to label %100 unwind label %136

100:                                              ; preds = %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #9
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %722

101:                                              ; preds = %1
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  br label %109

105:                                              ; preds = %84
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %109

109:                                              ; preds = %105, %101
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  br label %724

110:                                              ; preds = %85
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %8, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %9, align 4
  br label %118

114:                                              ; preds = %86
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %8, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  br label %118

118:                                              ; preds = %114, %110
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #9
  br label %724

119:                                              ; preds = %157, %87
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %8, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %9, align 4
  br label %724

123:                                              ; preds = %89
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %8, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %9, align 4
  br label %131

127:                                              ; preds = %92
  %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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  br label %724

132:                                              ; preds = %98
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %8, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %9, align 4
  br label %140

136:                                              ; preds = %99
  %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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  br label %140

140:                                              ; preds = %136, %132
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #9
  br label %724

141:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %142 unwind label %144

142:                                              ; preds = %141
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %17, i1 noundef zeroext true)
          to label %143 unwind label %148

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

144:                                              ; preds = %141
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %8, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %9, align 4
  br label %152

148:                                              ; preds = %142
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %8, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %152

152:                                              ; preds = %148, %144
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  br label %724

153:                                              ; preds = %143
  %154 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %155 = load i8, ptr %154, align 1, !tbaa !9, !range !16, !noundef !17
  %156 = trunc i8 %155 to i1
  br i1 %156, label %157, label %159

157:                                              ; preds = %153
  invoke void @_ZN21ConfigBitstreamParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %158 unwind label %119

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158, %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.617, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %160 unwind label %183

160:                                              ; preds = %159
  invoke void @_ZN21ConfigBitstreamParser12getHeaderValENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef nonnull align 8 dereferenceable(160) %5, ptr noundef %22)
          to label %161 unwind label %187

161:                                              ; preds = %160
  %162 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %162, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %163 unwind label %191

163:                                              ; preds = %161
  %164 = invoke noundef i64 @_ZNSt7__cxx115stoulERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef null, i32 noundef 16)
          to label %165 unwind label %195

165:                                              ; preds = %163
  %166 = trunc i64 %164 to i32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #9
  store i32 %166, ptr %19, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %167 = load ptr, ptr %79, align 8, !tbaa !21
  %168 = getelementptr inbounds ptr, ptr %167, i64 10
  %169 = load ptr, ptr %168, align 8
  %170 = invoke noundef i32 %169(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %171 unwind label %202

171:                                              ; preds = %165
  store i32 %170, ptr %25, align 4, !tbaa !19
  %172 = load i32, ptr %25, align 4, !tbaa !19
  %173 = load i32, ptr %19, align 4, !tbaa !19
  %174 = icmp ne i32 %172, %173
  br i1 %174, label %175, label %215

175:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 256, ptr %26) #9
  %176 = getelementptr inbounds [256 x i8], ptr %26, i64 0, i64 0
  %177 = load i32, ptr %19, align 4, !tbaa !19
  %178 = load i32, ptr %25, align 4, !tbaa !19
  %179 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %176, i64 noundef 256, ptr noundef @.str.618, i32 noundef %177, i32 noundef %178) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #9
  %180 = getelementptr inbounds [256 x i8], ptr %26, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef %180, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %181 unwind label %206

181:                                              ; preds = %175
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %27, i1 noundef zeroext true)
          to label %182 unwind label %210

182:                                              ; preds = %181
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 256, ptr %26) #9
  br label %719

183:                                              ; preds = %159
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %8, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %9, align 4
  br label %201

187:                                              ; preds = %160
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %8, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %9, align 4
  br label %200

191:                                              ; preds = %161
  %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 = %163
  %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) %20) #9
  br label %199

199:                                              ; preds = %195, %191
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  br label %200

200:                                              ; preds = %199, %187
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  br label %201

201:                                              ; preds = %200, %183
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #9
  br label %721

202:                                              ; preds = %224, %222, %219, %165
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %8, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %9, align 4
  br label %720

206:                                              ; preds = %175
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %8, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %9, align 4
  br label %214

210:                                              ; preds = %181
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %8, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  br label %214

214:                                              ; preds = %210, %206
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %26) #9
  br label %720

215:                                              ; preds = %171
  %216 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %217 = load i8, ptr %216, align 1, !tbaa !9, !range !16, !noundef !17
  %218 = trunc i8 %217 to i1
  br i1 %218, label %219, label %226

219:                                              ; preds = %215
  %220 = load i32, ptr %25, align 4, !tbaa !19
  %221 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.619, i32 noundef %220)
          to label %222 unwind label %202

222:                                              ; preds = %219
  %223 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %224 unwind label %202

224:                                              ; preds = %222
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %223)
          to label %225 unwind label %202

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225, %215
  call void @llvm.lifetime.start.p0(i64 46, ptr %29) #9
  %227 = getelementptr inbounds [46 x i8], ptr %29, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %227, i8 -1, i64 46, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %228 = getelementptr inbounds %class.Lattice, ptr %79, i32 0, i32 2
  %229 = load i32, ptr %228, align 8, !tbaa !23
  %230 = icmp eq i32 %229, 4
  br i1 %230, label %231, label %232

231:                                              ; preds = %226
  store i32 46, ptr %30, align 4, !tbaa !19
  br label %233

232:                                              ; preds = %226
  store i32 26, ptr %30, align 4, !tbaa !19
  br label %233

233:                                              ; preds = %232, %231
  %234 = getelementptr inbounds [46 x i8], ptr %29, i64 0, i64 0
  %235 = load i32, ptr %30, align 4, !tbaa !19
  %236 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 28, ptr noundef %234, i32 noundef %235, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %237 unwind label %265

237:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #9
  %238 = getelementptr inbounds %class.Lattice, ptr %79, i32 0, i32 2
  %239 = load i32, ptr %238, align 8, !tbaa !23
  %240 = icmp eq i32 %239, 4
  br i1 %240, label %241, label %322

241:                                              ; preds = %237
  %242 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef 0, i64 noundef 257698037760)
          to label %243 unwind label %269

243:                                              ; preds = %241
  br i1 %242, label %304, label %244

244:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.620, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %245 unwind label %273

245:                                              ; preds = %244
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %32, i1 noundef zeroext false)
          to label %246 unwind label %277

246:                                              ; preds = %245
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #9
  %247 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 121, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %248 unwind label %269

248:                                              ; preds = %246
  %249 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %250 = load ptr, ptr %249, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %250, i32 noundef 1, i8 noundef zeroext 1)
          to label %251 unwind label %269

251:                                              ; preds = %248
  %252 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %253 = load ptr, ptr %252, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %253, i32 noundef 1000)
          to label %254 unwind label %269

254:                                              ; preds = %251
  %255 = invoke i32 @sleep(i32 noundef 5)
          to label %256 unwind label %269

256:                                              ; preds = %254
  store i8 1, ptr %31, align 1, !tbaa !18
  %257 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef 0, i64 noundef 257698037760)
          to label %258 unwind label %269

258:                                              ; preds = %256
  br i1 %257, label %291, label %259

259:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %260 unwind label %282

260:                                              ; preds = %259
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %34, i1 noundef zeroext true)
          to label %261 unwind label %286

261:                                              ; preds = %260
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #9
  %262 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %263 unwind label %269

263:                                              ; preds = %261
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %262)
          to label %264 unwind label %269

264:                                              ; preds = %263
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %716

265:                                              ; preds = %233
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %8, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %9, align 4
  br label %718

269:                                              ; preds = %332, %330, %325, %263, %261, %256, %254, %251, %248, %246, %241
  %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 %717

273:                                              ; preds = %244
  %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
  br label %281

277:                                              ; preds = %245
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %8, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  br label %281

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

282:                                              ; preds = %259
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %8, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %9, align 4
  br label %290

286:                                              ; preds = %260
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %8, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  br label %290

290:                                              ; preds = %286, %282
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #9
  br label %717

291:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %292 unwind label %294

292:                                              ; preds = %291
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %36, i1 noundef zeroext true)
          to label %293 unwind label %298

293:                                              ; preds = %292
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #9
  br label %303

294:                                              ; preds = %291
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %8, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %9, align 4
  br label %302

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

302:                                              ; preds = %298, %294
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #9
  br label %717

303:                                              ; preds = %293
  br label %321

304:                                              ; preds = %243
  store i8 0, ptr %31, align 1, !tbaa !18
  %305 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %306 = load i8, ptr %305, align 1, !tbaa !9, !range !16, !noundef !17
  %307 = trunc i8 %306 to i1
  br i1 %307, label %308, label %320

308:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef @.str.621, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %309 unwind label %311

309:                                              ; preds = %308
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %38, i1 noundef zeroext true)
          to label %310 unwind label %315

310:                                              ; preds = %309
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #9
  br label %320

311:                                              ; preds = %308
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %8, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %9, align 4
  br label %319

315:                                              ; preds = %309
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %8, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  br label %319

319:                                              ; preds = %315, %311
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #9
  br label %717

320:                                              ; preds = %310, %304
  br label %321

321:                                              ; preds = %320, %303
  br label %323

322:                                              ; preds = %237
  store i8 0, ptr %31, align 1, !tbaa !18
  br label %323

323:                                              ; preds = %322, %321
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %41) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef @.str.622, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %324 unwind label %334

324:                                              ; preds = %323
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %40, i1 noundef zeroext false)
          to label %325 unwind label %338

325:                                              ; preds = %324
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #9
  %326 = invoke noundef zeroext i1 @_ZN7Lattice9EnableISCEh(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 0)
          to label %327 unwind label %269

327:                                              ; preds = %325
  br i1 %326, label %352, label %328

328:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 32, ptr %42) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %43) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %43)
          to label %329 unwind label %343

329:                                              ; preds = %328
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %42, i1 noundef zeroext true)
          to label %330 unwind label %347

330:                                              ; preds = %329
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %42) #9
  %331 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %332 unwind label %269

332:                                              ; preds = %330
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %331)
          to label %333 unwind label %269

333:                                              ; preds = %332
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %716

334:                                              ; preds = %323
  %335 = landingpad { ptr, i32 }
          cleanup
  %336 = extractvalue { ptr, i32 } %335, 0
  store ptr %336, ptr %8, align 8
  %337 = extractvalue { ptr, i32 } %335, 1
  store i32 %337, ptr %9, align 4
  br label %342

338:                                              ; preds = %324
  %339 = landingpad { ptr, i32 }
          cleanup
  %340 = extractvalue { ptr, i32 } %339, 0
  store ptr %340, ptr %8, align 8
  %341 = extractvalue { ptr, i32 } %339, 1
  store i32 %341, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #9
  br label %342

342:                                              ; preds = %338, %334
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #9
  br label %717

343:                                              ; preds = %328
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %8, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %9, align 4
  br label %351

347:                                              ; preds = %329
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %8, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  br label %351

351:                                              ; preds = %347, %343
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %42) #9
  br label %717

352:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %45)
          to label %353 unwind label %355

353:                                              ; preds = %352
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %44, i1 noundef zeroext true)
          to label %354 unwind label %359

354:                                              ; preds = %353
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #9
  br label %364

355:                                              ; preds = %352
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %8, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %9, align 4
  br label %363

359:                                              ; preds = %353
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %8, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #9
  br label %363

363:                                              ; preds = %359, %355
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #9
  br label %717

364:                                              ; preds = %354
  %365 = load i8, ptr %31, align 1, !tbaa !18, !range !16, !noundef !17
  %366 = trunc i8 %365 to i1
  br i1 %366, label %367, label %447

367:                                              ; preds = %364
  call void @llvm.lifetime.start.p0(i64 32, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %47) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef @.str.623, ptr noundef nonnull align 1 dereferenceable(1) %47)
          to label %368 unwind label %384

368:                                              ; preds = %367
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %46, i1 noundef zeroext false)
          to label %369 unwind label %388

369:                                              ; preds = %368
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %48) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %48, ptr align 1 @__const._ZN7Lattice11program_memEv.tx_tmp, i64 1, i1 false)
  %370 = getelementptr inbounds [1 x i8], ptr %48, i64 0, i64 0
  %371 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 125, ptr noundef %370, i32 noundef 1, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %372 unwind label %393

372:                                              ; preds = %369
  %373 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %374 = load ptr, ptr %373, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %374, i32 noundef 1, i8 noundef zeroext 1)
          to label %375 unwind label %393

375:                                              ; preds = %372
  %376 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %377 = load ptr, ptr %376, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %377, i32 noundef 1000)
          to label %378 unwind label %393

378:                                              ; preds = %375
  %379 = invoke noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %79, i1 noundef zeroext false)
          to label %380 unwind label %393

380:                                              ; preds = %378
  br i1 %379, label %406, label %381

381:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %382 unwind label %397

382:                                              ; preds = %381
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %49, i1 noundef zeroext true)
          to label %383 unwind label %401

383:                                              ; preds = %382
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #9
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %434

384:                                              ; preds = %367
  %385 = landingpad { ptr, i32 }
          cleanup
  %386 = extractvalue { ptr, i32 } %385, 0
  store ptr %386, ptr %8, align 8
  %387 = extractvalue { ptr, i32 } %385, 1
  store i32 %387, ptr %9, align 4
  br label %392

388:                                              ; preds = %368
  %389 = landingpad { ptr, i32 }
          cleanup
  %390 = extractvalue { ptr, i32 } %389, 0
  store ptr %390, ptr %8, align 8
  %391 = extractvalue { ptr, i32 } %389, 1
  store i32 %391, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #9
  br label %392

392:                                              ; preds = %388, %384
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #9
  br label %717

393:                                              ; preds = %416, %413, %410, %406, %378, %375, %372, %369
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %8, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %9, align 4
  br label %446

397:                                              ; preds = %381
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %8, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %9, align 4
  br label %405

401:                                              ; preds = %382
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %8, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #9
  br label %405

405:                                              ; preds = %401, %397
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #9
  br label %446

406:                                              ; preds = %380
  %407 = getelementptr inbounds [1 x i8], ptr %48, i64 0, i64 0
  store i8 0, ptr %407, align 1, !tbaa !29
  %408 = getelementptr inbounds [1 x i8], ptr %48, i64 0, i64 0
  %409 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 125, ptr noundef %408, i32 noundef 1, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %410 unwind label %393

410:                                              ; preds = %406
  %411 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %412 = load ptr, ptr %411, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %412, i32 noundef 1, i8 noundef zeroext 1)
          to label %413 unwind label %393

413:                                              ; preds = %410
  %414 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %415 = load ptr, ptr %414, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %415, i32 noundef 1000)
          to label %416 unwind label %393

416:                                              ; preds = %413
  %417 = invoke noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %79, i1 noundef zeroext false)
          to label %418 unwind label %393

418:                                              ; preds = %416
  br i1 %417, label %431, label %419

419:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 32, ptr %51) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %52)
          to label %420 unwind label %422

420:                                              ; preds = %419
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %51, i1 noundef zeroext true)
          to label %421 unwind label %426

421:                                              ; preds = %420
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #9
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %434

422:                                              ; preds = %419
  %423 = landingpad { ptr, i32 }
          cleanup
  %424 = extractvalue { ptr, i32 } %423, 0
  store ptr %424, ptr %8, align 8
  %425 = extractvalue { ptr, i32 } %423, 1
  store i32 %425, ptr %9, align 4
  br label %430

426:                                              ; preds = %420
  %427 = landingpad { ptr, i32 }
          cleanup
  %428 = extractvalue { ptr, i32 } %427, 0
  store ptr %428, ptr %8, align 8
  %429 = extractvalue { ptr, i32 } %427, 1
  store i32 %429, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #9
  br label %430

430:                                              ; preds = %426, %422
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #9
  br label %446

431:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 32, ptr %53) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %54) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %54)
          to label %432 unwind label %437

432:                                              ; preds = %431
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %53, i1 noundef zeroext true)
          to label %433 unwind label %441

433:                                              ; preds = %432
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #9
  store i32 0, ptr %16, align 4
  br label %434

434:                                              ; preds = %433, %421, %383
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #9
  %435 = load i32, ptr %16, align 4
  switch i32 %435, label %716 [
    i32 0, label %436
  ]

436:                                              ; preds = %434
  br label %447

437:                                              ; preds = %431
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %8, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %9, align 4
  br label %445

441:                                              ; preds = %432
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %8, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #9
  br label %445

445:                                              ; preds = %441, %437
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #9
  br label %446

446:                                              ; preds = %445, %430, %405, %393
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #9
  br label %717

447:                                              ; preds = %436, %364
  call void @llvm.lifetime.start.p0(i64 32, ptr %55) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %56) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef @.str.624, ptr noundef nonnull align 1 dereferenceable(1) %56)
          to label %448 unwind label %455

448:                                              ; preds = %447
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %55, i1 noundef zeroext false)
          to label %449 unwind label %459

449:                                              ; preds = %448
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %55) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 @__const._ZN7Lattice11program_memEv.mask_erase, i64 4, i1 false)
  %450 = getelementptr inbounds %class.Lattice, ptr %79, i32 0, i32 2
  %451 = load i32, ptr %450, align 8, !tbaa !23
  %452 = icmp eq i32 %451, 4
  br i1 %452, label %453, label %464

453:                                              ; preds = %449
  %454 = getelementptr inbounds [1 x i32], ptr %57, i64 0, i64 0
  store i32 0, ptr %454, align 4, !tbaa !19
  br label %464

455:                                              ; preds = %447
  %456 = landingpad { ptr, i32 }
          cleanup
  %457 = extractvalue { ptr, i32 } %456, 0
  store ptr %457, ptr %8, align 8
  %458 = extractvalue { ptr, i32 } %456, 1
  store i32 %458, ptr %9, align 4
  br label %463

459:                                              ; preds = %448
  %460 = landingpad { ptr, i32 }
          cleanup
  %461 = extractvalue { ptr, i32 } %460, 0
  store ptr %461, ptr %8, align 8
  %462 = extractvalue { ptr, i32 } %460, 1
  store i32 %462, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #9
  br label %463

463:                                              ; preds = %459, %455
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %55) #9
  br label %717

464:                                              ; preds = %453, %449
  %465 = getelementptr inbounds [1 x i32], ptr %57, i64 0, i64 0
  %466 = load i32, ptr %465, align 4, !tbaa !19
  %467 = invoke noundef zeroext i1 @_ZN7Lattice10flashEraseEj(ptr noundef nonnull align 8 dereferenceable(152) %79, i32 noundef %466)
          to label %468 unwind label %477

468:                                              ; preds = %464
  %469 = zext i1 %467 to i32
  %470 = icmp eq i32 %469, 0
  br i1 %470, label %471, label %490

471:                                              ; preds = %468
  call void @llvm.lifetime.start.p0(i64 32, ptr %58) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %59) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %59)
          to label %472 unwind label %481

472:                                              ; preds = %471
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %58, i1 noundef zeroext true)
          to label %473 unwind label %485

473:                                              ; preds = %472
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %58) #9
  %474 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %475 unwind label %477

475:                                              ; preds = %473
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %474)
          to label %476 unwind label %477

476:                                              ; preds = %475
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %714

477:                                              ; preds = %507, %504, %502, %475, %473, %464
  %478 = landingpad { ptr, i32 }
          cleanup
  %479 = extractvalue { ptr, i32 } %478, 0
  store ptr %479, ptr %8, align 8
  %480 = extractvalue { ptr, i32 } %478, 1
  store i32 %480, ptr %9, align 4
  br label %715

481:                                              ; preds = %471
  %482 = landingpad { ptr, i32 }
          cleanup
  %483 = extractvalue { ptr, i32 } %482, 0
  store ptr %483, ptr %8, align 8
  %484 = extractvalue { ptr, i32 } %482, 1
  store i32 %484, ptr %9, align 4
  br label %489

485:                                              ; preds = %472
  %486 = landingpad { ptr, i32 }
          cleanup
  %487 = extractvalue { ptr, i32 } %486, 0
  store ptr %487, ptr %8, align 8
  %488 = extractvalue { ptr, i32 } %486, 1
  store i32 %488, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #9
  br label %489

489:                                              ; preds = %485, %481
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %58) #9
  br label %715

490:                                              ; preds = %468
  call void @llvm.lifetime.start.p0(i64 32, ptr %60) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %61) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %61)
          to label %491 unwind label %493

491:                                              ; preds = %490
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %60, i1 noundef zeroext true)
          to label %492 unwind label %497

492:                                              ; preds = %491
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %61) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #9
  br label %502

493:                                              ; preds = %490
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %8, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %9, align 4
  br label %501

497:                                              ; preds = %491
  %498 = landingpad { ptr, i32 }
          cleanup
  %499 = extractvalue { ptr, i32 } %498, 0
  store ptr %499, ptr %8, align 8
  %500 = extractvalue { ptr, i32 } %498, 1
  store i32 %500, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #9
  br label %501

501:                                              ; preds = %497, %493
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %61) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #9
  br label %715

502:                                              ; preds = %492
  %503 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 70, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %504 unwind label %477

504:                                              ; preds = %502
  %505 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %506 = load ptr, ptr %505, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %506, i32 noundef 1, i8 noundef zeroext 1)
          to label %507 unwind label %477

507:                                              ; preds = %504
  %508 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %509 = load ptr, ptr %508, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %509, i32 noundef 1000)
          to label %510 unwind label %477

510:                                              ; preds = %507
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #9
  %511 = invoke noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %512 unwind label %535

512:                                              ; preds = %510
  store ptr %511, ptr %62, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #9
  %513 = invoke noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %514 unwind label %539

514:                                              ; preds = %512
  %515 = sdiv i32 %513, 8
  store i32 %515, ptr %63, align 4, !tbaa !19
  %516 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext 122, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %517 unwind label %539

517:                                              ; preds = %514
  %518 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %519 = load ptr, ptr %518, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %519, i32 noundef 1, i8 noundef zeroext 1)
          to label %520 unwind label %539

520:                                              ; preds = %517
  %521 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %522 = load ptr, ptr %521, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %522, i32 noundef 2)
          to label %523 unwind label %539

523:                                              ; preds = %520
  call void @llvm.lifetime.start.p0(i64 1024, ptr %64) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #9
  store i32 1024, ptr %65, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  store i32 4, ptr %66, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 56, ptr %67) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %68) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %69) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %68, ptr noundef @.str.625, ptr noundef nonnull align 1 dereferenceable(1) %69)
          to label %524 unwind label %543

524:                                              ; preds = %523
  %525 = load i32, ptr %63, align 4, !tbaa !19
  %526 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 7
  %527 = load i8, ptr %526, align 2, !tbaa !32, !range !16, !noundef !17
  %528 = trunc i8 %527 to i1
  invoke void @_ZN11ProgressBarC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiib(ptr noundef nonnull align 8 dereferenceable(50) %67, ptr noundef nonnull align 8 dereferenceable(32) %68, i32 noundef %525, i32 noundef 50, i1 noundef zeroext %528)
          to label %529 unwind label %547

529:                                              ; preds = %524
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %68) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %68) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #9
  store i32 0, ptr %70, align 4, !tbaa !19
  br label %530

530:                                              ; preds = %603, %529
  %531 = load i32, ptr %70, align 4, !tbaa !19
  %532 = load i32, ptr %63, align 4, !tbaa !19
  %533 = icmp slt i32 %531, %532
  br i1 %533, label %552, label %534

534:                                              ; preds = %530
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #9
  br label %608

535:                                              ; preds = %510
  %536 = landingpad { ptr, i32 }
          cleanup
  %537 = extractvalue { ptr, i32 } %536, 0
  store ptr %537, ptr %8, align 8
  %538 = extractvalue { ptr, i32 } %536, 1
  store i32 %538, ptr %9, align 4
  br label %713

539:                                              ; preds = %520, %517, %514, %512
  %540 = landingpad { ptr, i32 }
          cleanup
  %541 = extractvalue { ptr, i32 } %540, 0
  store ptr %541, ptr %8, align 8
  %542 = extractvalue { ptr, i32 } %540, 1
  store i32 %542, ptr %9, align 4
  br label %712

543:                                              ; preds = %523
  %544 = landingpad { ptr, i32 }
          cleanup
  %545 = extractvalue { ptr, i32 } %544, 0
  store ptr %545, ptr %8, align 8
  %546 = extractvalue { ptr, i32 } %544, 1
  store i32 %546, ptr %9, align 4
  br label %551

547:                                              ; preds = %524
  %548 = landingpad { ptr, i32 }
          cleanup
  %549 = extractvalue { ptr, i32 } %548, 0
  store ptr %549, ptr %8, align 8
  %550 = extractvalue { ptr, i32 } %548, 1
  store i32 %550, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %68) #9
  br label %551

551:                                              ; preds = %547, %543
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %68) #9
  br label %711

552:                                              ; preds = %530
  %553 = load i32, ptr %70, align 4, !tbaa !19
  invoke void @_ZN11ProgressBar7displayEic(ptr noundef nonnull align 8 dereferenceable(50) %67, i32 noundef %553, i8 noundef signext 0)
          to label %554 unwind label %564

554:                                              ; preds = %552
  %555 = load i32, ptr %63, align 4, !tbaa !19
  %556 = load i32, ptr %70, align 4, !tbaa !19
  %557 = load i32, ptr %65, align 4, !tbaa !19
  %558 = add nsw i32 %556, %557
  %559 = icmp slt i32 %555, %558
  br i1 %559, label %560, label %568

560:                                              ; preds = %554
  %561 = load i32, ptr %63, align 4, !tbaa !19
  %562 = load i32, ptr %70, align 4, !tbaa !19
  %563 = sub nsw i32 %561, %562
  store i32 %563, ptr %65, align 4, !tbaa !19
  store i32 1, ptr %66, align 4, !tbaa !30
  br label %568

564:                                              ; preds = %594, %552
  %565 = landingpad { ptr, i32 }
          cleanup
  %566 = extractvalue { ptr, i32 } %565, 0
  store ptr %566, ptr %8, align 8
  %567 = extractvalue { ptr, i32 } %565, 1
  store i32 %567, ptr %9, align 4
  br label %607

568:                                              ; preds = %560, %554
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #9
  store i32 0, ptr %71, align 4, !tbaa !19
  br label %569

569:                                              ; preds = %587, %568
  %570 = load i32, ptr %71, align 4, !tbaa !19
  %571 = load i32, ptr %65, align 4, !tbaa !19
  %572 = icmp slt i32 %570, %571
  br i1 %572, label %574, label %573

573:                                              ; preds = %569
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #9
  br label %594

574:                                              ; preds = %569
  %575 = load ptr, ptr %62, align 8, !tbaa !5
  %576 = load i32, ptr %70, align 4, !tbaa !19
  %577 = load i32, ptr %71, align 4, !tbaa !19
  %578 = add nsw i32 %576, %577
  %579 = sext i32 %578 to i64
  %580 = getelementptr inbounds i8, ptr %575, i64 %579
  %581 = load i8, ptr %580, align 1, !tbaa !29
  %582 = invoke noundef zeroext i8 @_ZN21ConfigBitstreamParser11reverseByteEh(i8 noundef zeroext %581)
          to label %583 unwind label %590

583:                                              ; preds = %574
  %584 = load i32, ptr %71, align 4, !tbaa !19
  %585 = sext i32 %584 to i64
  %586 = getelementptr inbounds [1024 x i8], ptr %64, i64 0, i64 %585
  store i8 %582, ptr %586, align 1, !tbaa !29
  br label %587

587:                                              ; preds = %583
  %588 = load i32, ptr %71, align 4, !tbaa !19
  %589 = add nsw i32 %588, 1
  store i32 %589, ptr %71, align 4, !tbaa !19
  br label %569, !llvm.loop !33

590:                                              ; preds = %574
  %591 = landingpad { ptr, i32 }
          cleanup
  %592 = extractvalue { ptr, i32 } %591, 0
  store ptr %592, ptr %8, align 8
  %593 = extractvalue { ptr, i32 } %591, 1
  store i32 %593, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #9
  br label %607

594:                                              ; preds = %573
  %595 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %596 = load ptr, ptr %595, align 8, !tbaa !28
  %597 = getelementptr inbounds [1024 x i8], ptr %64, i64 0, i64 0
  %598 = load i32, ptr %65, align 4, !tbaa !19
  %599 = mul nsw i32 %598, 8
  %600 = load i32, ptr %66, align 4, !tbaa !30
  %601 = invoke noundef i32 @_ZN4Jtag7shiftDREPKhPhiNS_10tapState_tE(ptr noundef nonnull align 8 dereferenceable(193) %596, ptr noundef %597, ptr noundef null, i32 noundef %599, i32 noundef %600)
          to label %602 unwind label %564

602:                                              ; preds = %594
  br label %603

603:                                              ; preds = %602
  %604 = load i32, ptr %65, align 4, !tbaa !19
  %605 = load i32, ptr %70, align 4, !tbaa !19
  %606 = add nsw i32 %605, %604
  store i32 %606, ptr %70, align 4, !tbaa !19
  br label %530, !llvm.loop !35

607:                                              ; preds = %590, %564
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #9
  br label %710

608:                                              ; preds = %534
  %609 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %610 = load ptr, ptr %609, align 8, !tbaa !28
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %610, i32 noundef 1, i8 noundef zeroext 1)
          to label %611 unwind label %619

611:                                              ; preds = %608
  %612 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %613 = load ptr, ptr %612, align 8, !tbaa !28
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %613, i32 noundef 1000)
          to label %614 unwind label %619

614:                                              ; preds = %611
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #9
  %615 = getelementptr inbounds %class.Lattice, ptr %79, i32 0, i32 2
  %616 = load i32, ptr %615, align 8, !tbaa !23
  %617 = icmp eq i32 %616, 2
  br i1 %617, label %618, label %623

618:                                              ; preds = %614
  store i32 62914560, ptr %72, align 4, !tbaa !19
  br label %624

619:                                              ; preds = %611, %608
  %620 = landingpad { ptr, i32 }
          cleanup
  %621 = extractvalue { ptr, i32 } %620, 0
  store ptr %621, ptr %8, align 8
  %622 = extractvalue { ptr, i32 } %620, 1
  store i32 %622, ptr %9, align 4
  br label %710

623:                                              ; preds = %614
  store i32 125829120, ptr %72, align 4, !tbaa !19
  br label %624

624:                                              ; preds = %623, %618
  %625 = load i32, ptr %72, align 4, !tbaa !19
  %626 = zext i32 %625 to i64
  %627 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef 0, i64 noundef %626)
          to label %628 unwind label %631

628:                                              ; preds = %624
  br i1 %627, label %629, label %635

629:                                              ; preds = %628
  invoke void @_ZN11ProgressBar4doneEv(ptr noundef nonnull align 8 dereferenceable(50) %67)
          to label %630 unwind label %631

630:                                              ; preds = %629
  br label %640

631:                                              ; preds = %704, %702, %700, %698, %662, %660, %655, %651, %648, %646, %640, %638, %636, %635, %629, %624
  %632 = landingpad { ptr, i32 }
          cleanup
  %633 = extractvalue { ptr, i32 } %632, 0
  store ptr %633, ptr %8, align 8
  %634 = extractvalue { ptr, i32 } %632, 1
  store i32 %634, ptr %9, align 4
  br label %709

635:                                              ; preds = %628
  invoke void @_ZN11ProgressBar4failEv(ptr noundef nonnull align 8 dereferenceable(50) %67)
          to label %636 unwind label %631

636:                                              ; preds = %635
  %637 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %638 unwind label %631

638:                                              ; preds = %636
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %637)
          to label %639 unwind label %631

639:                                              ; preds = %638
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %708

640:                                              ; preds = %630
  %641 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %642 unwind label %631

642:                                              ; preds = %640
  %643 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %644 = load i8, ptr %643, align 1, !tbaa !9, !range !16, !noundef !17
  %645 = trunc i8 %644 to i1
  br i1 %645, label %646, label %651

646:                                              ; preds = %642
  %647 = invoke noundef i32 @_ZN7Lattice8userCodeEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %648 unwind label %631

648:                                              ; preds = %646
  %649 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.626, i32 noundef %647)
          to label %650 unwind label %631

650:                                              ; preds = %648
  br label %651

651:                                              ; preds = %650, %642
  %652 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %653 unwind label %631

653:                                              ; preds = %651
  call void @llvm.lifetime.start.p0(i64 32, ptr %73) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %74) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %74) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef @.str.627, ptr noundef nonnull align 1 dereferenceable(1) %74)
          to label %654 unwind label %664

654:                                              ; preds = %653
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %73, i1 noundef zeroext false)
          to label %655 unwind label %668

655:                                              ; preds = %654
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %73) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %74) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %74) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %73) #9
  %656 = invoke noundef zeroext i1 @_ZN7Lattice10DisableISCEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %657 unwind label %631

657:                                              ; preds = %655
  br i1 %656, label %682, label %658

658:                                              ; preds = %657
  call void @llvm.lifetime.start.p0(i64 32, ptr %75) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %76) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %75, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %76)
          to label %659 unwind label %673

659:                                              ; preds = %658
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %75, i1 noundef zeroext true)
          to label %660 unwind label %677

660:                                              ; preds = %659
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %75) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %76) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %75) #9
  %661 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %662 unwind label %631

662:                                              ; preds = %660
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %661)
          to label %663 unwind label %631

663:                                              ; preds = %662
  store i1 false, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %708

664:                                              ; preds = %653
  %665 = landingpad { ptr, i32 }
          cleanup
  %666 = extractvalue { ptr, i32 } %665, 0
  store ptr %666, ptr %8, align 8
  %667 = extractvalue { ptr, i32 } %665, 1
  store i32 %667, ptr %9, align 4
  br label %672

668:                                              ; preds = %654
  %669 = landingpad { ptr, i32 }
          cleanup
  %670 = extractvalue { ptr, i32 } %669, 0
  store ptr %670, ptr %8, align 8
  %671 = extractvalue { ptr, i32 } %669, 1
  store i32 %671, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %73) #9
  br label %672

672:                                              ; preds = %668, %664
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %74) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %74) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %73) #9
  br label %709

673:                                              ; preds = %658
  %674 = landingpad { ptr, i32 }
          cleanup
  %675 = extractvalue { ptr, i32 } %674, 0
  store ptr %675, ptr %8, align 8
  %676 = extractvalue { ptr, i32 } %674, 1
  store i32 %676, ptr %9, align 4
  br label %681

677:                                              ; preds = %659
  %678 = landingpad { ptr, i32 }
          cleanup
  %679 = extractvalue { ptr, i32 } %678, 0
  store ptr %679, ptr %8, align 8
  %680 = extractvalue { ptr, i32 } %678, 1
  store i32 %680, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %75) #9
  br label %681

681:                                              ; preds = %677, %673
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %76) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %75) #9
  br label %709

682:                                              ; preds = %657
  call void @llvm.lifetime.start.p0(i64 32, ptr %77) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %78) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %77, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %78)
          to label %683 unwind label %685

683:                                              ; preds = %682
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %77, i1 noundef zeroext true)
          to label %684 unwind label %689

684:                                              ; preds = %683
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #9
  br label %694

685:                                              ; preds = %682
  %686 = landingpad { ptr, i32 }
          cleanup
  %687 = extractvalue { ptr, i32 } %686, 0
  store ptr %687, ptr %8, align 8
  %688 = extractvalue { ptr, i32 } %686, 1
  store i32 %688, ptr %9, align 4
  br label %693

689:                                              ; preds = %683
  %690 = landingpad { ptr, i32 }
          cleanup
  %691 = extractvalue { ptr, i32 } %690, 0
  store ptr %691, ptr %8, align 8
  %692 = extractvalue { ptr, i32 } %690, 1
  store i32 %692, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #9
  br label %693

693:                                              ; preds = %689, %685
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #9
  br label %709

694:                                              ; preds = %684
  %695 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 6
  %696 = load i8, ptr %695, align 1, !tbaa !9, !range !16, !noundef !17
  %697 = trunc i8 %696 to i1
  br i1 %697, label %698, label %702

698:                                              ; preds = %694
  %699 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %79)
          to label %700 unwind label %631

700:                                              ; preds = %698
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %79, i64 noundef %699)
          to label %701 unwind label %631

701:                                              ; preds = %700
  br label %702

702:                                              ; preds = %701, %694
  %703 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %79, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %704 unwind label %631

704:                                              ; preds = %702
  %705 = getelementptr inbounds %class.Device, ptr %79, i32 0, i32 1
  %706 = load ptr, ptr %705, align 8, !tbaa !28
  invoke void @_ZN4Jtag19go_test_logic_resetEv(ptr noundef nonnull align 8 dereferenceable(193) %706)
          to label %707 unwind label %631

707:                                              ; preds = %704
  store i1 true, ptr %2, align 1
  store i32 1, ptr %16, align 4
  br label %708

708:                                              ; preds = %707, %663, %639
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #9
  call void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50) %67) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %67) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #9
  br label %714

709:                                              ; preds = %693, %681, %672, %631
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #9
  br label %710

710:                                              ; preds = %709, %619, %607
  call void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50) %67) #9
  br label %711

711:                                              ; preds = %710, %551
  call void @llvm.lifetime.end.p0(i64 56, ptr %67) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %64) #9
  br label %712

712:                                              ; preds = %711, %539
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #9
  br label %713

713:                                              ; preds = %712, %535
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #9
  br label %715

714:                                              ; preds = %708, %476
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  br label %716

715:                                              ; preds = %713, %501, %489, %477
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  br label %717

716:                                              ; preds = %714, %434, %333, %264
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 46, ptr %29) #9
  br label %719

717:                                              ; preds = %715, %463, %446, %392, %363, %351, %342, %319, %302, %290, %281, %269
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #9
  br label %718

718:                                              ; preds = %717, %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 46, ptr %29) #9
  br label %720

719:                                              ; preds = %716, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %722

720:                                              ; preds = %718, %214, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %721

721:                                              ; preds = %720, %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %724

722:                                              ; preds = %719, %100
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %5) #9
  call void @llvm.lifetime.end.p0(i64 200, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  %723 = load i1, ptr %2, align 1
  ret i1 %723

724:                                              ; preds = %721, %152, %140, %131, %119, %118, %109
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %5) #9
  call void @llvm.lifetime.end.p0(i64 200, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  br label %725

725:                                              ; preds = %724
  %726 = load ptr, ptr %8, align 8
  %727 = load i32, ptr %9, align 4
  %728 = insertvalue { ptr, i32 } poison, ptr %726, 0
  %729 = insertvalue { ptr, i32 } %728, i32 %727, 1
  resume { ptr, i32 } %729
}

declare void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #4

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

declare noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #4

declare void @_ZN21ConfigBitstreamParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNSt7__cxx115stoulERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #5

declare void @_ZN21ConfigBitstreamParser12getHeaderValENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(160), ptr noundef) #4

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152), i64 noundef) #2 align 2

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

declare void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef, i8 noundef zeroext) #4

declare void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef) #4

declare i32 @sleep(i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice9EnableISCEh(ptr noundef nonnull align 8 dereferenceable(152), i8 noundef zeroext) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice10flashEraseEj(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

declare void @_ZN11ProgressBarC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiib(ptr noundef nonnull align 8 dereferenceable(50), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #4

declare void @_ZN11ProgressBar7displayEic(ptr noundef nonnull align 8 dereferenceable(50), i32 noundef, i8 noundef signext) #4

declare noundef zeroext i8 @_ZN21ConfigBitstreamParser11reverseByteEh(i8 noundef zeroext) #4

declare noundef i32 @_ZN4Jtag7shiftDREPKhPhiNS_10tapState_tE(ptr noundef nonnull align 8 dereferenceable(193), ptr noundef, ptr noundef, i32 noundef, i32 noundef) #4

declare void @_ZN11ProgressBar4doneEv(ptr noundef nonnull align 8 dereferenceable(50)) #4

declare void @_ZN11ProgressBar4failEv(ptr noundef nonnull align 8 dereferenceable(50)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice10DisableISCEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

declare void @_ZN4Jtag19go_test_logic_resetEv(ptr noundef nonnull align 8 dereferenceable(193)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50)) unnamed_addr #8 align 2

; Function Attrs: nounwind
declare void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { 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 #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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, !15, i64 85}
!10 = !{!"_ZTS6Device", !6, i64 8, !11, i64 16, !11, i64 48, !14, i64 80, !15, i64 84, !15, i64 85, !15, i64 86}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN6Device9prog_modeE", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!15, !15, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!24, !26, i64 144}
!24 = !{!"_ZTS7Lattice", !10, i64 0, !25, i64 88, !26, i64 144, !27, i64 148}
!25 = !{!"_ZTS12SPIInterface", !7, i64 8, !20, i64 12, !15, i64 16, !15, i64 17, !15, i64 18, !11, i64 24}
!26 = !{!"_ZTSN7Lattice16lattice_family_tE", !7, i64 0}
!27 = !{!"_ZTSN7Lattice22lattice_flash_sector_tE", !7, i64 0}
!28 = !{!10, !6, i64 8}
!29 = !{!7, !7, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"_ZTSN4Jtag10tapState_tE", !7, i64 0}
!32 = !{!10, !15, i64 86}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


; 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.LatticeBitParser = type { %class.ConfigBitstreamParser, i64, i8, %"class.std::vector.86" }
%class.ConfigBitstreamParser = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, i8, %"class.std::vector", %"class.std::__cxx11::basic_string", %"class.std::map.81" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, 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::map.81" = type { %"class.std::_Rb_tree.82" }
%"class.std::_Rb_tree.82" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.86" = type { %"struct.std::_Vector_base.87" }
%"struct.std::_Vector_base.87" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%class.ProgressBar = type <{ %"class.std::__cxx11::basic_string", i32, i32, %"class.std::chrono::time_point", i8, i8, [6 x i8] }>
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }

@.str.613 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.614 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.615 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.616 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.617 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.618 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.619 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.620 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.621 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.622 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.623 = external hidden unnamed_addr constant [28 x i8], align 1
@__const._ZN7Lattice11program_memEv.tx_tmp = external hidden unnamed_addr constant [1 x i8], align 1
@.str.624 = external hidden unnamed_addr constant [13 x i8], align 1
@__const._ZN7Lattice11program_memEv.mask_erase = external hidden unnamed_addr constant [1 x i32], align 4
@.str.625 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.626 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.627 = 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152), i64 noundef, i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice11program_memEv(ptr noundef nonnull align 8 dereferenceable(152) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.LatticeBitParser, align 8
  %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::allocator.0", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca %"class.std::allocator.0", align 1
  %18 = alloca [256 x i8], align 16
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca [46 x i8], align 16
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator.0", align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator.0", align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator.0", align 1
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator.0", align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator.0", align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator.0", align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator.0", align 1
  %38 = alloca [1 x i8], align 1
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::allocator.0", align 1
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca %"class.std::allocator.0", align 1
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca %"class.std::allocator.0", align 1
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca %"class.std::allocator.0", align 1
  %47 = alloca %"class.std::__cxx11::basic_string", align 8
  %48 = alloca %"class.std::allocator.0", align 1
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::allocator.0", align 1
  %51 = alloca [1024 x i8], align 16
  %52 = alloca %class.ProgressBar, align 8
  %53 = alloca %"class.std::__cxx11::basic_string", align 8
  %54 = alloca %"class.std::allocator.0", align 1
  %55 = alloca %"class.std::__cxx11::basic_string", align 8
  %56 = alloca %"class.std::allocator.0", align 1
  %57 = alloca %"class.std::__cxx11::basic_string", align 8
  %58 = alloca %"class.std::allocator.0", align 1
  %59 = alloca %"class.std::__cxx11::basic_string", align 8
  %60 = alloca %"class.std::allocator.0", align 1
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %2) #9
  %61 = getelementptr inbounds i8, ptr %0, i64 16
  %62 = getelementptr inbounds i8, ptr %0, i64 85
  %63 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %64 = trunc nuw i8 %63 to i1
  call void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200) %2, ptr noundef nonnull align 8 dereferenceable(32) %61, i1 noundef zeroext false, i1 noundef zeroext %64)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.613, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %65 unwind label %76

65:                                               ; preds = %1
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext false)
          to label %66 unwind label %78

66:                                               ; preds = %65
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %67 unwind label %81

67:                                               ; preds = %66
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %5, i1 noundef zeroext true)
          to label %68 unwind label %83

68:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  %69 = invoke noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200) %2)
          to label %70 unwind label %86

70:                                               ; preds = %68
  %.not = icmp eq i32 %69, 0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.615, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %71 unwind label %88

71:                                               ; preds = %70
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %7, i1 noundef zeroext false)
          to label %72 unwind label %90

72:                                               ; preds = %71
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br i1 %.not, label %98, label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %74 unwind label %93

74:                                               ; preds = %73
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %9, i1 noundef zeroext true)
          to label %75 unwind label %95

75:                                               ; preds = %74
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br label %442

76:                                               ; preds = %1
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

78:                                               ; preds = %65
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  br label %80

80:                                               ; preds = %78, %76
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  br label %443

81:                                               ; preds = %66
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %67
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  br label %85

85:                                               ; preds = %83, %81
  %.pn93 = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %443

86:                                               ; preds = %108, %68
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %443

88:                                               ; preds = %70
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %71
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %92

92:                                               ; preds = %90, %88
  %.pn95 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %443

93:                                               ; preds = %73
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %74
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %97

97:                                               ; preds = %95, %93
  %.pn156 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br label %443

98:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %99 unwind label %103

99:                                               ; preds = %98
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %11, i1 noundef zeroext true)
          to label %100 unwind label %105

100:                                              ; preds = %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  %101 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %102 = trunc nuw i8 %101 to i1
  br i1 %102, label %108, label %109

103:                                              ; preds = %98
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %99
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  br label %107

107:                                              ; preds = %105, %103
  %.pn97 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  br label %443

108:                                              ; preds = %100
  invoke void @_ZN21ConfigBitstreamParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(160) %2)
          to label %109 unwind label %86

109:                                              ; preds = %108, %100
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.617, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %110 unwind label %126

110:                                              ; preds = %109
  invoke void @_ZN21ConfigBitstreamParser12getHeaderValENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(160) %2, ptr noundef nonnull %15)
          to label %111 unwind label %128

111:                                              ; preds = %110
  %112 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %112, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %113 unwind label %130

113:                                              ; preds = %111
  %114 = invoke noundef i64 @_ZNSt7__cxx115stoulERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef null, i32 noundef 16)
          to label %115 unwind label %132

115:                                              ; preds = %113
  %116 = trunc i64 %114 to i32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #9
  %117 = load ptr, ptr %0, align 8, !tbaa !17
  %118 = getelementptr inbounds i8, ptr %117, i64 80
  %119 = load ptr, ptr %118, align 8
  %120 = invoke noundef i32 %119(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %121 unwind label %137

121:                                              ; preds = %115
  %.not103 = icmp eq i32 %120, %116
  br i1 %.not103, label %144, label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %18) #9
  %123 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %18, i64 noundef 256, ptr noundef nonnull @.str.618, i32 noundef %116, i32 noundef %120) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull %18, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %124 unwind label %139

124:                                              ; preds = %122
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %19, i1 noundef zeroext true)
          to label %125 unwind label %141

125:                                              ; preds = %124
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %18) #9
  br label %442

126:                                              ; preds = %109
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %136

128:                                              ; preds = %110
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %135

130:                                              ; preds = %111
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %134

132:                                              ; preds = %113
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  br label %134

134:                                              ; preds = %132, %130
  %.pn99 = phi { ptr, i32 } [ %133, %132 ], [ %131, %130 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  br label %135

135:                                              ; preds = %134, %128
  %.pn99.pn = phi { ptr, i32 } [ %.pn99, %134 ], [ %129, %128 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  br label %136

136:                                              ; preds = %135, %126
  %.pn99.pn.pn = phi { ptr, i32 } [ %.pn99.pn, %135 ], [ %127, %126 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #9
  br label %443

137:                                              ; preds = %150, %147, %115
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %443

139:                                              ; preds = %122
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %143

141:                                              ; preds = %124
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  br label %143

143:                                              ; preds = %141, %139
  %.pn152 = phi { ptr, i32 } [ %142, %141 ], [ %140, %139 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %18) #9
  br label %443

144:                                              ; preds = %121
  %145 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %146 = trunc nuw i8 %145 to i1
  br i1 %146, label %147, label %151

147:                                              ; preds = %144
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.619, i32 noundef %116)
  %149 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %150 unwind label %137

150:                                              ; preds = %147
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %149)
          to label %151 unwind label %137

151:                                              ; preds = %150, %144
  call void @llvm.lifetime.start.p0(i64 46, ptr nonnull %21) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(46) %21, i8 -1, i64 46, i1 false)
  %152 = getelementptr inbounds i8, ptr %0, i64 144
  %153 = load i32, ptr %152, align 8, !tbaa !19
  %154 = icmp eq i32 %153, 4
  %. = select i1 %154, i32 46, i32 26
  %155 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 28, ptr noundef nonnull %21, i32 noundef %., ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %156 unwind label %179

156:                                              ; preds = %151
  %157 = load i32, ptr %152, align 8, !tbaa !19
  %158 = icmp eq i32 %157, 4
  br i1 %158, label %159, label %212

159:                                              ; preds = %156
  %160 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef 0, i64 noundef 257698037760)
          to label %161 unwind label %181

161:                                              ; preds = %159
  br i1 %160, label %201, label %162

162:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.620, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %163 unwind label %183

163:                                              ; preds = %162
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext false)
          to label %164 unwind label %185

164:                                              ; preds = %163
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #9
  %165 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 121, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %166 unwind label %181

166:                                              ; preds = %164
  %167 = getelementptr inbounds i8, ptr %0, i64 8
  %168 = load ptr, ptr %167, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %168, i32 noundef 1, i8 noundef zeroext 1)
          to label %169 unwind label %181

169:                                              ; preds = %166
  %170 = load ptr, ptr %167, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %170, i32 noundef 1000)
          to label %171 unwind label %181

171:                                              ; preds = %169
  %172 = invoke i32 @sleep(i32 noundef 5)
          to label %173 unwind label %181

173:                                              ; preds = %171
  %174 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef 0, i64 noundef 257698037760)
          to label %175 unwind label %181

175:                                              ; preds = %173
  br i1 %174, label %193, label %176

176:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %177 unwind label %188

177:                                              ; preds = %176
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %24, i1 noundef zeroext true)
          to label %178 unwind label %190

178:                                              ; preds = %177
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  br label %.invoke171

179:                                              ; preds = %151
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %441

181:                                              ; preds = %.invoke171, %.invoke, %214, %173, %171, %169, %166, %164, %159
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %441

183:                                              ; preds = %162
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %187

185:                                              ; preds = %163
  %186 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  br label %187

187:                                              ; preds = %185, %183
  %.pn104 = phi { ptr, i32 } [ %186, %185 ], [ %184, %183 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #9
  br label %441

188:                                              ; preds = %176
  %189 = landingpad { ptr, i32 }
          cleanup
  br label %192

190:                                              ; preds = %177
  %191 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  br label %192

192:                                              ; preds = %190, %188
  %.pn106 = phi { ptr, i32 } [ %191, %190 ], [ %189, %188 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  br label %441

193:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %194 unwind label %196

194:                                              ; preds = %193
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %26, i1 noundef zeroext true)
          to label %195 unwind label %198

195:                                              ; preds = %194
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #9
  br label %212

196:                                              ; preds = %193
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %200

198:                                              ; preds = %194
  %199 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  br label %200

200:                                              ; preds = %198, %196
  %.pn108 = phi { ptr, i32 } [ %199, %198 ], [ %197, %196 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #9
  br label %441

201:                                              ; preds = %161
  %202 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %203 = trunc nuw i8 %202 to i1
  br i1 %203, label %204, label %212

204:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %28) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %29) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str.621, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %205 unwind label %207

205:                                              ; preds = %204
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %28, i1 noundef zeroext true)
          to label %206 unwind label %209

206:                                              ; preds = %205
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #9
  br label %212

207:                                              ; preds = %204
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %211

209:                                              ; preds = %205
  %210 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  br label %211

211:                                              ; preds = %209, %207
  %.pn110 = phi { ptr, i32 } [ %210, %209 ], [ %208, %207 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #9
  br label %441

212:                                              ; preds = %156, %195, %206, %201
  %.046 = phi i1 [ false, %206 ], [ false, %201 ], [ true, %195 ], [ false, %156 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.622, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %213 unwind label %221

213:                                              ; preds = %212
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %30, i1 noundef zeroext false)
          to label %214 unwind label %223

214:                                              ; preds = %213
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #9
  %215 = invoke noundef zeroext i1 @_ZN7Lattice9EnableISCEh(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 0)
          to label %216 unwind label %181

216:                                              ; preds = %214
  br i1 %215, label %231, label %217

217:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %218 unwind label %226

218:                                              ; preds = %217
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %32, i1 noundef zeroext true)
          to label %219 unwind label %228

219:                                              ; preds = %218
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  br label %.invoke171

.invoke171:                                       ; preds = %178, %219
  %220 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %.invoke unwind label %181

.invoke:                                          ; preds = %.invoke171
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %220)
          to label %440 unwind label %181

221:                                              ; preds = %212
  %222 = landingpad { ptr, i32 }
          cleanup
  br label %225

223:                                              ; preds = %213
  %224 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #9
  br label %225

225:                                              ; preds = %223, %221
  %.pn112 = phi { ptr, i32 } [ %224, %223 ], [ %222, %221 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #9
  br label %441

226:                                              ; preds = %217
  %227 = landingpad { ptr, i32 }
          cleanup
  br label %230

228:                                              ; preds = %218
  %229 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  br label %230

230:                                              ; preds = %228, %226
  %.pn114 = phi { ptr, i32 } [ %229, %228 ], [ %227, %226 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  br label %441

231:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %34) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %35) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %232 unwind label %234

232:                                              ; preds = %231
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %34, i1 noundef zeroext true)
          to label %233 unwind label %236

233:                                              ; preds = %232
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #9
  br i1 %.046, label %239, label %293

234:                                              ; preds = %231
  %235 = landingpad { ptr, i32 }
          cleanup
  br label %238

236:                                              ; preds = %232
  %237 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  br label %238

238:                                              ; preds = %236, %234
  %.pn116 = phi { ptr, i32 } [ %237, %236 ], [ %235, %234 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #9
  br label %441

239:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %36) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %37) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull @.str.623, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %240 unwind label %255

240:                                              ; preds = %239
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %36, i1 noundef zeroext false)
          to label %241 unwind label %257

241:                                              ; preds = %240
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %37) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %36) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %38) #9
  %242 = load i8, ptr @__const._ZN7Lattice11program_memEv.tx_tmp, align 1
  store i8 %242, ptr %38, align 1
  %243 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 125, ptr noundef nonnull %38, i32 noundef 1, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %244 unwind label %260

244:                                              ; preds = %241
  %245 = getelementptr inbounds i8, ptr %0, i64 8
  %246 = load ptr, ptr %245, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %246, i32 noundef 1, i8 noundef zeroext 1)
          to label %247 unwind label %260

247:                                              ; preds = %244
  %248 = load ptr, ptr %245, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %248, i32 noundef 1000)
          to label %249 unwind label %260

249:                                              ; preds = %247
  %250 = invoke noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
          to label %251 unwind label %260

251:                                              ; preds = %249
  br i1 %250, label %267, label %252

252:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %39) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %40) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %253 unwind label %262

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

254:                                              ; preds = %253
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %40) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %39) #9
  br label %286

255:                                              ; preds = %239
  %256 = landingpad { ptr, i32 }
          cleanup
  br label %259

257:                                              ; preds = %240
  %258 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #9
  br label %259

259:                                              ; preds = %257, %255
  %.pn118 = phi { ptr, i32 } [ %258, %257 ], [ %256, %255 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %37) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %36) #9
  br label %441

260:                                              ; preds = %273, %271, %269, %267, %249, %247, %244, %241
  %261 = landingpad { ptr, i32 }
          cleanup
  br label %292

262:                                              ; preds = %252
  %263 = landingpad { ptr, i32 }
          cleanup
  br label %266

264:                                              ; preds = %253
  %265 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #9
  br label %266

266:                                              ; preds = %264, %262
  %.pn120 = phi { ptr, i32 } [ %265, %264 ], [ %263, %262 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %40) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %39) #9
  br label %292

267:                                              ; preds = %251
  store i8 0, ptr %38, align 1, !tbaa !26
  %268 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 125, ptr noundef nonnull %38, i32 noundef 1, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %269 unwind label %260

269:                                              ; preds = %267
  %270 = load ptr, ptr %245, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %270, i32 noundef 1, i8 noundef zeroext 1)
          to label %271 unwind label %260

271:                                              ; preds = %269
  %272 = load ptr, ptr %245, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %272, i32 noundef 1000)
          to label %273 unwind label %260

273:                                              ; preds = %271
  %274 = invoke noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
          to label %275 unwind label %260

275:                                              ; preds = %273
  br i1 %274, label %284, label %276

276:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %41) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %42) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %42)
          to label %277 unwind label %279

277:                                              ; preds = %276
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %41, i1 noundef zeroext true)
          to label %278 unwind label %281

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

279:                                              ; preds = %276
  %280 = landingpad { ptr, i32 }
          cleanup
  br label %283

281:                                              ; preds = %277
  %282 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #9
  br label %283

283:                                              ; preds = %281, %279
  %.pn122 = phi { ptr, i32 } [ %282, %281 ], [ %280, %279 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %42) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %42) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %41) #9
  br label %292

284:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %43) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %44) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %285 unwind label %287

285:                                              ; preds = %284
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %43, i1 noundef zeroext true)
          to label %.critedge unwind label %289

.critedge:                                        ; preds = %285
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %44) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #9
  br label %293

286:                                              ; preds = %278, %254
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #9
  br label %440

287:                                              ; preds = %284
  %288 = landingpad { ptr, i32 }
          cleanup
  br label %291

289:                                              ; preds = %285
  %290 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #9
  br label %291

291:                                              ; preds = %289, %287
  %.pn124 = phi { ptr, i32 } [ %290, %289 ], [ %288, %287 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %44) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #9
  br label %292

292:                                              ; preds = %291, %283, %266, %260
  %.pn124.pn = phi { ptr, i32 } [ %.pn124, %291 ], [ %.pn122, %283 ], [ %261, %260 ], [ %.pn120, %266 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #9
  br label %441

293:                                              ; preds = %.critedge, %233
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %45) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %46) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef nonnull @.str.624, ptr noundef nonnull align 1 dereferenceable(1) %46)
          to label %294 unwind label %299

294:                                              ; preds = %293
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %45, i1 noundef zeroext false)
          to label %295 unwind label %301

295:                                              ; preds = %294
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %46) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %45) #9
  %.sroa.0.0.copyload = load i32, ptr @__const._ZN7Lattice11program_memEv.mask_erase, align 4
  %296 = load i32, ptr %152, align 8, !tbaa !19
  %297 = icmp eq i32 %296, 4
  %spec.select = select i1 %297, i32 0, i32 %.sroa.0.0.copyload
  %298 = invoke noundef zeroext i1 @_ZN7Lattice10flashEraseEj(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %spec.select)
          to label %304 unwind label %310

299:                                              ; preds = %293
  %300 = landingpad { ptr, i32 }
          cleanup
  br label %303

301:                                              ; preds = %294
  %302 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  br label %303

303:                                              ; preds = %301, %299
  %.pn127 = phi { ptr, i32 } [ %302, %301 ], [ %300, %299 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %46) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %45) #9
  br label %441

304:                                              ; preds = %295
  br i1 %298, label %317, label %305

305:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %47) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %48) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %48) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %48)
          to label %306 unwind label %312

306:                                              ; preds = %305
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %47, i1 noundef zeroext true)
          to label %307 unwind label %314

307:                                              ; preds = %306
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %48) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %48) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %47) #9
  %308 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %309 unwind label %310

309:                                              ; preds = %307
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %308)
          to label %440 unwind label %310

310:                                              ; preds = %329, %326, %319, %309, %307, %295
  %311 = landingpad { ptr, i32 }
          cleanup
  br label %441

312:                                              ; preds = %305
  %313 = landingpad { ptr, i32 }
          cleanup
  br label %316

314:                                              ; preds = %306
  %315 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #9
  br label %316

316:                                              ; preds = %314, %312
  %.pn146 = phi { ptr, i32 } [ %315, %314 ], [ %313, %312 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %48) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %48) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %47) #9
  br label %441

317:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %49) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %50) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %318 unwind label %321

318:                                              ; preds = %317
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %49, i1 noundef zeroext true)
          to label %319 unwind label %323

319:                                              ; preds = %318
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %50) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %49) #9
  %320 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 70, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %326 unwind label %310

321:                                              ; preds = %317
  %322 = landingpad { ptr, i32 }
          cleanup
  br label %325

323:                                              ; preds = %318
  %324 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #9
  br label %325

325:                                              ; preds = %323, %321
  %.pn129 = phi { ptr, i32 } [ %324, %323 ], [ %322, %321 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %50) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %49) #9
  br label %441

326:                                              ; preds = %319
  %327 = getelementptr inbounds i8, ptr %0, i64 8
  %328 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %328, i32 noundef 1, i8 noundef zeroext 1)
          to label %329 unwind label %310

329:                                              ; preds = %326
  %330 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %330, i32 noundef 1000)
          to label %331 unwind label %310

331:                                              ; preds = %329
  %332 = call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %2)
  %333 = call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %2)
  %334 = sdiv i32 %333, 8
  %335 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 122, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %336 unwind label %348

336:                                              ; preds = %331
  %337 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %337, i32 noundef 1, i8 noundef zeroext 1)
          to label %338 unwind label %348

338:                                              ; preds = %336
  %339 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %339, i32 noundef 2)
          to label %340 unwind label %348

340:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %51) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %52) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %53) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %54) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef nonnull @.str.625, ptr noundef nonnull align 1 dereferenceable(1) %54)
          to label %341 unwind label %350

341:                                              ; preds = %340
  %342 = getelementptr inbounds i8, ptr %0, i64 86
  %343 = load i8, ptr %342, align 2, !tbaa !27, !range !15, !noundef !16
  %344 = trunc nuw i8 %343 to i1
  invoke void @_ZN11ProgressBarC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiib(ptr noundef nonnull align 8 dereferenceable(50) %52, ptr noundef nonnull align 8 dereferenceable(32) %53, i32 noundef %334, i32 noundef 50, i1 noundef zeroext %344)
          to label %345 unwind label %352

345:                                              ; preds = %341
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %54) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %53) #9
  %346 = icmp sgt i32 %333, 7
  br i1 %346, label %.lr.ph167, label %._crit_edge168

._crit_edge168:                                   ; preds = %374, %345
  %347 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %347, i32 noundef 1, i8 noundef zeroext 1)
          to label %377 unwind label %383

348:                                              ; preds = %338, %336, %331
  %349 = landingpad { ptr, i32 }
          cleanup
  br label %441

350:                                              ; preds = %340
  %351 = landingpad { ptr, i32 }
          cleanup
  br label %354

352:                                              ; preds = %341
  %353 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #9
  br label %354

354:                                              ; preds = %352, %350
  %.pn131 = phi { ptr, i32 } [ %353, %352 ], [ %351, %350 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %54) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %53) #9
  br label %439

.lr.ph167:                                        ; preds = %345, %374
  %.034165 = phi i32 [ %375, %374 ], [ 0, %345 ]
  %.035164 = phi i32 [ %spec.select160, %374 ], [ 4, %345 ]
  %.036163 = phi i32 [ %spec.select159, %374 ], [ 1024, %345 ]
  invoke void @_ZN11ProgressBar7displayEic(ptr noundef nonnull align 8 dereferenceable(50) %52, i32 noundef %.034165, i8 noundef signext 0)
          to label %355 unwind label %362

355:                                              ; preds = %.lr.ph167
  %356 = add nsw i32 %.034165, %.036163
  %357 = icmp slt i32 %334, %356
  %358 = sub nsw i32 %334, %.034165
  %spec.select159 = select i1 %357, i32 %358, i32 %.036163
  %spec.select160 = select i1 %357, i32 1, i32 %.035164
  %359 = icmp sgt i32 %spec.select159, 0
  br i1 %359, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %355
  %360 = sext i32 %.034165 to i64
  %361 = zext nneg i32 %spec.select159 to i64
  %invariant.gep = getelementptr i8, ptr %332, i64 %360
  br label %.lr.ph

362:                                              ; preds = %._crit_edge, %.lr.ph167
  %363 = landingpad { ptr, i32 }
          cleanup
  br label %438

._crit_edge:                                      ; preds = %369, %355
  %364 = load ptr, ptr %327, align 8, !tbaa !25
  %365 = shl nsw i32 %spec.select159, 3
  %366 = invoke noundef i32 @_ZN4Jtag7shiftDREPKhPhiNS_10tapState_tE(ptr noundef nonnull align 8 dereferenceable(193) %364, ptr noundef nonnull %51, ptr noundef null, i32 noundef %365, i32 noundef %spec.select160)
          to label %374 unwind label %362

.lr.ph:                                           ; preds = %.lr.ph.preheader, %369
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %369 ]
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv
  %367 = load i8, ptr %gep, align 1, !tbaa !26
  %368 = invoke noundef zeroext i8 @_ZN21ConfigBitstreamParser11reverseByteEh(i8 noundef zeroext %367)
          to label %369 unwind label %372

369:                                              ; preds = %.lr.ph
  %370 = getelementptr inbounds [1024 x i8], ptr %51, i64 0, i64 %indvars.iv
  store i8 %368, ptr %370, align 1, !tbaa !26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %371 = icmp ult i64 %indvars.iv.next, %361
  br i1 %371, label %.lr.ph, label %._crit_edge, !llvm.loop !28

372:                                              ; preds = %.lr.ph
  %373 = landingpad { ptr, i32 }
          cleanup
  br label %438

374:                                              ; preds = %._crit_edge
  %375 = add nsw i32 %spec.select159, %.034165
  %376 = icmp slt i32 %375, %334
  br i1 %376, label %.lr.ph167, label %._crit_edge168, !llvm.loop !30

377:                                              ; preds = %._crit_edge168
  %378 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %378, i32 noundef 1000)
          to label %379 unwind label %383

379:                                              ; preds = %377
  %380 = load i32, ptr %152, align 8, !tbaa !19
  %381 = icmp eq i32 %380, 2
  %.161 = select i1 %381, i64 62914560, i64 125829120
  %382 = invoke noundef zeroext i1 @_ZN7Lattice11checkStatusEmm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef 0, i64 noundef %.161)
          to label %385 unwind label %387

383:                                              ; preds = %377, %._crit_edge168
  %384 = landingpad { ptr, i32 }
          cleanup
  br label %438

385:                                              ; preds = %379
  br i1 %382, label %386, label %389

386:                                              ; preds = %385
  invoke void @_ZN11ProgressBar4doneEv(ptr noundef nonnull align 8 dereferenceable(50) %52)
          to label %390 unwind label %387

387:                                              ; preds = %.invoke172, %.invoke170, %435, %433, %432, %430, %403, %399, %395, %390, %389, %386, %379
  %388 = landingpad { ptr, i32 }
          cleanup
  br label %438

389:                                              ; preds = %385
  invoke void @_ZN11ProgressBar4failEv(ptr noundef nonnull align 8 dereferenceable(50) %52)
          to label %.invoke172 unwind label %387

390:                                              ; preds = %386
  %391 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %392 unwind label %387

392:                                              ; preds = %390
  %393 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %394 = trunc nuw i8 %393 to i1
  br i1 %394, label %395, label %399

395:                                              ; preds = %392
  %396 = invoke noundef i32 @_ZN7Lattice8userCodeEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %397 unwind label %387

397:                                              ; preds = %395
  %398 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.626, i32 noundef %396)
  br label %399

399:                                              ; preds = %397, %392
  %400 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %401 unwind label %387

401:                                              ; preds = %399
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %55) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %56) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull @.str.627, ptr noundef nonnull align 1 dereferenceable(1) %56)
          to label %402 unwind label %410

402:                                              ; preds = %401
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %55, i1 noundef zeroext false)
          to label %403 unwind label %412

403:                                              ; preds = %402
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %56) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %55) #9
  %404 = invoke noundef zeroext i1 @_ZN7Lattice10DisableISCEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %405 unwind label %387

405:                                              ; preds = %403
  br i1 %404, label %420, label %406

406:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %57) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %58) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef nonnull @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %58)
          to label %407 unwind label %415

407:                                              ; preds = %406
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %57, i1 noundef zeroext true)
          to label %408 unwind label %417

408:                                              ; preds = %407
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %57) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %58) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %57) #9
  br label %.invoke172

.invoke172:                                       ; preds = %389, %408
  %409 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %.invoke170 unwind label %387

.invoke170:                                       ; preds = %.invoke172
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %409)
          to label %437 unwind label %387

410:                                              ; preds = %401
  %411 = landingpad { ptr, i32 }
          cleanup
  br label %414

412:                                              ; preds = %402
  %413 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #9
  br label %414

414:                                              ; preds = %412, %410
  %.pn133 = phi { ptr, i32 } [ %413, %412 ], [ %411, %410 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %56) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %55) #9
  br label %438

415:                                              ; preds = %406
  %416 = landingpad { ptr, i32 }
          cleanup
  br label %419

417:                                              ; preds = %407
  %418 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %57) #9
  br label %419

419:                                              ; preds = %417, %415
  %.pn135 = phi { ptr, i32 } [ %418, %417 ], [ %416, %415 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %58) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %58) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %57) #9
  br label %438

420:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %59) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %60) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %60)
          to label %421 unwind label %425

421:                                              ; preds = %420
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %59, i1 noundef zeroext true)
          to label %422 unwind label %427

422:                                              ; preds = %421
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %60) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %59) #9
  %423 = load i8, ptr %62, align 1, !tbaa !5, !range !15, !noundef !16
  %424 = trunc nuw i8 %423 to i1
  br i1 %424, label %430, label %433

425:                                              ; preds = %420
  %426 = landingpad { ptr, i32 }
          cleanup
  br label %429

427:                                              ; preds = %421
  %428 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #9
  br label %429

429:                                              ; preds = %427, %425
  %.pn137 = phi { ptr, i32 } [ %428, %427 ], [ %426, %425 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %60) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %59) #9
  br label %438

430:                                              ; preds = %422
  %431 = invoke noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %432 unwind label %387

432:                                              ; preds = %430
  invoke void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %431)
          to label %433 unwind label %387

433:                                              ; preds = %432, %422
  %434 = invoke noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
          to label %435 unwind label %387

435:                                              ; preds = %433
  %436 = load ptr, ptr %327, align 8, !tbaa !25
  invoke void @_ZN4Jtag19go_test_logic_resetEv(ptr noundef nonnull align 8 dereferenceable(193) %436)
          to label %437 unwind label %387

437:                                              ; preds = %.invoke170, %435
  %.139 = phi i1 [ true, %435 ], [ false, %.invoke170 ]
  call void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50) %52) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %52) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %51) #9
  br label %440

438:                                              ; preds = %387, %414, %419, %429, %362, %372, %383
  %.pn141.pn = phi { ptr, i32 } [ %384, %383 ], [ %373, %372 ], [ %363, %362 ], [ %388, %387 ], [ %.pn137, %429 ], [ %.pn135, %419 ], [ %.pn133, %414 ]
  call void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50) %52) #9
  br label %439

439:                                              ; preds = %438, %354
  %.pn141.pn.pn = phi { ptr, i32 } [ %.pn141.pn, %438 ], [ %.pn131, %354 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %52) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %51) #9
  br label %441

440:                                              ; preds = %.invoke, %437, %309, %286
  %.3 = phi i1 [ false, %286 ], [ %.139, %437 ], [ false, %309 ], [ false, %.invoke ]
  call void @llvm.lifetime.end.p0(i64 46, ptr nonnull %21) #9
  br label %442

441:                                              ; preds = %181, %187, %192, %200, %211, %225, %230, %238, %259, %292, %303, %348, %439, %325, %316, %310, %179
  %.pn148.pn.pn = phi { ptr, i32 } [ %180, %179 ], [ %.pn127, %303 ], [ %.pn124.pn, %292 ], [ %.pn118, %259 ], [ %.pn116, %238 ], [ %182, %181 ], [ %.pn114, %230 ], [ %.pn112, %225 ], [ %.pn110, %211 ], [ %.pn108, %200 ], [ %.pn106, %192 ], [ %.pn104, %187 ], [ %311, %310 ], [ %.pn146, %316 ], [ %.pn129, %325 ], [ %.pn141.pn.pn, %439 ], [ %349, %348 ]
  call void @llvm.lifetime.end.p0(i64 46, ptr nonnull %21) #9
  br label %443

442:                                              ; preds = %125, %440, %75
  %.5 = phi i1 [ false, %75 ], [ false, %125 ], [ %.3, %440 ]
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %2) #9
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %2) #9
  ret i1 %.5

443:                                              ; preds = %136, %441, %143, %137, %107, %97, %92, %86, %85, %80
  %.pn156.pn = phi { ptr, i32 } [ %.pn156, %97 ], [ %87, %86 ], [ %.pn97, %107 ], [ %.pn95, %92 ], [ %.pn93, %85 ], [ %.pn, %80 ], [ %.pn99.pn.pn, %136 ], [ %.pn152, %143 ], [ %.pn148.pn.pn, %441 ], [ %138, %137 ]
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %2) #9
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn156.pn
}

declare void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #4

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

declare noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #4

declare void @_ZN21ConfigBitstreamParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNSt7__cxx115stoulERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #6

declare void @_ZN21ConfigBitstreamParser12getHeaderValENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(160), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152), i64 noundef) local_unnamed_addr #2 align 2

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

declare void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef, i8 noundef zeroext) local_unnamed_addr #4

declare void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef) local_unnamed_addr #4

declare i32 @sleep(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice9EnableISCEh(ptr noundef nonnull align 8 dereferenceable(152), i8 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice10flashEraseEj(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

declare void @_ZN11ProgressBarC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiib(ptr noundef nonnull align 8 dereferenceable(50), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #4

declare void @_ZN11ProgressBar7displayEic(ptr noundef nonnull align 8 dereferenceable(50), i32 noundef, i8 noundef signext) local_unnamed_addr #4

declare noundef zeroext i8 @_ZN21ConfigBitstreamParser11reverseByteEh(i8 noundef zeroext) local_unnamed_addr #4

declare noundef i32 @_ZN4Jtag7shiftDREPKhPhiNS_10tapState_tE(ptr noundef nonnull align 8 dereferenceable(193), ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @_ZN11ProgressBar4doneEv(ptr noundef nonnull align 8 dereferenceable(50)) local_unnamed_addr #4

declare void @_ZN11ProgressBar4failEv(ptr noundef nonnull align 8 dereferenceable(50)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Lattice10DisableISCEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

declare void @_ZN4Jtag19go_test_logic_resetEv(ptr noundef nonnull align 8 dereferenceable(193)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11ProgressBarD2Ev(ptr noundef nonnull align 8 dereferenceable(50)) unnamed_addr #7 align 2

; Function Attrs: nounwind
declare void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #8

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { 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 #6 = { 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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, !14, i64 85}
!6 = !{!"_ZTS6Device", !7, i64 8, !10, i64 16, !10, i64 48, !13, i64 80, !14, i64 84, !14, i64 85, !14, i64 86}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !12, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_ZTSN6Device9prog_modeE", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}
!19 = !{!20, !23, i64 144}
!20 = !{!"_ZTS7Lattice", !6, i64 0, !21, i64 88, !23, i64 144, !24, i64 148}
!21 = !{!"_ZTS12SPIInterface", !8, i64 8, !22, i64 12, !14, i64 16, !14, i64 17, !14, i64 18, !10, i64 24}
!22 = !{!"int", !8, i64 0}
!23 = !{!"_ZTSN7Lattice16lattice_family_tE", !8, i64 0}
!24 = !{!"_ZTSN7Lattice22lattice_flash_sector_tE", !8, i64 0}
!25 = !{!6, !7, i64 8}
!26 = !{!8, !8, i64 0}
!27 = !{!6, !14, i64 86}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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