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

; 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.JedParser = type { %class.ConfigBitstreamParser, %"class.std::vector.91", i32, i32, i32, i64, i16, i8, i16, i16, i32, i8, i8, %"class.std::__cxx11::basic_istringstream", i32, i32, i32, %"class.std::__cxx11::basic_string" }
%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::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.91" = type { %"struct.std::_Vector_base.92" }
%"struct.std::_Vector_base.92" = type { %"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl" }
%"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl" = type { %"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_istringstream" = type { %"class.std::basic_istream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%class.LatticeBitParser = type { %class.ConfigBitstreamParser, i64, i8, %"class.std::vector.86" }
%"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.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.569 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.571 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.572 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.573 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.614 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.616 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.619 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.645 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.646 = external hidden unnamed_addr constant [12 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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 i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

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

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

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

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

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice13program_flashEjb(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca %class.JedParser, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca %class.LatticeBitParser, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  %26 = zext i1 %2 to i8
  store i8 %26, ptr %7, align 1, !tbaa !11
  %27 = load ptr, ptr %5, align 8
  %28 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 6
  %29 = load i8, ptr %28, align 1, !tbaa !13, !range !19, !noundef !20
  %30 = trunc i8 %29 to i1
  br i1 %30, label %31, label %38

31:                                               ; preds = %3
  %32 = load ptr, ptr %27, align 8, !tbaa !21
  %33 = getelementptr inbounds ptr, ptr %32, i64 10
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(152) %27)
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.619, i32 noundef %35)
  %37 = call noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
  call void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %27, i64 noundef %37)
  br label %38

38:                                               ; preds = %31, %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %39 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 3
  %40 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef @.str.569)
  br i1 %40, label %41, label %155

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 656, ptr %10) #7
  %42 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 2
  %43 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 6
  %44 = load i8, ptr %43, align 1, !tbaa !13, !range !19, !noundef !20
  %45 = trunc i8 %44 to i1
  call void @_ZN9JedParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(656) %10, ptr noundef nonnull align 8 dereferenceable(32) %42, i1 noundef zeroext %45)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.645, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %46 unwind label %63

46:                                               ; preds = %41
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %11, i1 noundef zeroext false)
          to label %47 unwind label %67

47:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %48 unwind label %72

48:                                               ; preds = %47
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %15, i1 noundef zeroext true)
          to label %49 unwind label %76

49:                                               ; preds = %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %50 = invoke noundef i32 @_ZN9JedParser5parseEv(ptr noundef nonnull align 8 dereferenceable(656) %10)
          to label %51 unwind label %81

51:                                               ; preds = %49
  %52 = icmp ne i32 %50, 0
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.646, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %54 unwind label %85

54:                                               ; preds = %51
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %17, i1 noundef zeroext false)
          to label %55 unwind label %89

55:                                               ; preds = %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  %56 = load i8, ptr %9, align 1, !tbaa !11, !range !19, !noundef !20
  %57 = trunc i8 %56 to i1
  %58 = zext i1 %57 to i32
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %103

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.616, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %61 unwind label %94

61:                                               ; preds = %60
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %19, i1 noundef zeroext true)
          to label %62 unwind label %98

62:                                               ; preds = %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  store i1 false, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %153

63:                                               ; preds = %41
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %13, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %14, align 4
  br label %71

67:                                               ; preds = %46
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %13, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %71

71:                                               ; preds = %67, %63
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %154

72:                                               ; preds = %47
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %13, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %14, align 4
  br label %80

76:                                               ; preds = %48
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %13, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %80

80:                                               ; preds = %76, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %154

81:                                               ; preds = %142, %131, %127, %121, %119, %49
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  br label %154

85:                                               ; preds = %51
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %13, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %14, align 4
  br label %93

89:                                               ; preds = %54
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %13, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %93

93:                                               ; preds = %89, %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %154

94:                                               ; preds = %60
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %13, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %14, align 4
  br label %102

98:                                               ; preds = %61
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %13, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %102

102:                                              ; preds = %98, %94
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %154

103:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %104 unwind label %106

104:                                              ; preds = %103
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext true)
          to label %105 unwind label %110

105:                                              ; preds = %104
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  br label %115

106:                                              ; preds = %103
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %13, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %14, align 4
  br label %114

110:                                              ; preds = %104
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %13, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %114

114:                                              ; preds = %110, %106
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  br label %154

115:                                              ; preds = %105
  %116 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 6
  %117 = load i8, ptr %116, align 1, !tbaa !13, !range !19, !noundef !20
  %118 = trunc i8 %117 to i1
  br i1 %118, label %119, label %121

119:                                              ; preds = %115
  invoke void @_ZN9JedParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(656) %10)
          to label %120 unwind label %81

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %115
  %122 = invoke noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
          to label %123 unwind label %81

123:                                              ; preds = %121
  %124 = getelementptr inbounds %class.Lattice, ptr %27, i32 0, i32 2
  %125 = load i32, ptr %124, align 8, !tbaa !23
  %126 = icmp eq i32 %125, 2
  br i1 %126, label %127, label %131

127:                                              ; preds = %123
  %128 = invoke noundef zeroext i1 @_ZN7Lattice25program_intFlash_MachXO3DER9JedParser(ptr noundef nonnull align 8 dereferenceable(152) %27, ptr noundef nonnull align 8 dereferenceable(656) %10)
          to label %129 unwind label %81

129:                                              ; preds = %127
  %130 = zext i1 %128 to i8
  store i8 %130, ptr %8, align 1, !tbaa !11
  br label %135

131:                                              ; preds = %123
  %132 = invoke noundef zeroext i1 @_ZN7Lattice16program_intFlashEP21ConfigBitstreamParser(ptr noundef nonnull align 8 dereferenceable(152) %27, ptr noundef %10)
          to label %133 unwind label %81

133:                                              ; preds = %131
  %134 = zext i1 %132 to i8
  store i8 %134, ptr %8, align 1, !tbaa !11
  br label %135

135:                                              ; preds = %133, %129
  %136 = getelementptr inbounds %class.Lattice, ptr %27, i32 0, i32 2
  %137 = load i32, ptr %136, align 8, !tbaa !23
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %142

139:                                              ; preds = %135
  %140 = load i8, ptr %8, align 1, !tbaa !11, !range !19, !noundef !20
  %141 = trunc i8 %140 to i1
  store i1 %141, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %153

142:                                              ; preds = %135
  %143 = load ptr, ptr %27, align 8, !tbaa !21
  %144 = getelementptr inbounds ptr, ptr %143, i64 17
  %145 = load ptr, ptr %144, align 8
  %146 = invoke noundef zeroext i1 %145(ptr noundef nonnull align 8 dereferenceable(152) %27)
          to label %147 unwind label %81

147:                                              ; preds = %142
  br i1 %146, label %148, label %151

148:                                              ; preds = %147
  %149 = load i8, ptr %8, align 1, !tbaa !11, !range !19, !noundef !20
  %150 = trunc i8 %149 to i1
  br label %151

151:                                              ; preds = %148, %147
  %152 = phi i1 [ false, %147 ], [ %150, %148 ]
  store i1 %152, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %153

153:                                              ; preds = %151, %139, %62
  call void @_ZN9JedParserD2Ev(ptr noundef nonnull align 8 dereferenceable(656) %10) #7
  call void @llvm.lifetime.end.p0(i64 656, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %229

154:                                              ; preds = %114, %102, %93, %81, %80, %71
  call void @_ZN9JedParserD2Ev(ptr noundef nonnull align 8 dereferenceable(656) %10) #7
  call void @llvm.lifetime.end.p0(i64 656, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %231

155:                                              ; preds = %38
  %156 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 3
  %157 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %156, ptr noundef @.str.571)
  br i1 %157, label %158, label %171

158:                                              ; preds = %155
  %159 = call noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
  %160 = call noundef zeroext i1 @_ZN7Lattice20program_fea_MachXO3DEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
  %161 = zext i1 %160 to i8
  store i8 %161, ptr %8, align 1, !tbaa !11
  %162 = load ptr, ptr %27, align 8, !tbaa !21
  %163 = getelementptr inbounds ptr, ptr %162, i64 17
  %164 = load ptr, ptr %163, align 8
  %165 = call noundef zeroext i1 %164(ptr noundef nonnull align 8 dereferenceable(152) %27)
  br i1 %165, label %166, label %169

166:                                              ; preds = %158
  %167 = load i8, ptr %8, align 1, !tbaa !11, !range !19, !noundef !20
  %168 = trunc i8 %167 to i1
  br label %169

169:                                              ; preds = %166, %158
  %170 = phi i1 [ false, %158 ], [ %168, %166 ]
  store i1 %170, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %229

171:                                              ; preds = %155
  %172 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 3
  %173 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %172, ptr noundef @.str.572)
  br i1 %173, label %174, label %177

174:                                              ; preds = %171
  %175 = call noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
  %176 = call noundef zeroext i1 @_ZN7Lattice23program_pubkey_MachXO3DEv(ptr noundef nonnull align 8 dereferenceable(152) %27)
  br label %226

177:                                              ; preds = %171
  %178 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 3
  %179 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %178, ptr noundef @.str.573)
  br i1 %179, label %180, label %221

180:                                              ; preds = %177
  %181 = getelementptr inbounds %class.Lattice, ptr %27, i32 0, i32 2
  %182 = load i32, ptr %181, align 8, !tbaa !23
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %221

184:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 200, ptr %24) #7
  %185 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 2
  %186 = getelementptr inbounds %class.Device, ptr %27, i32 0, i32 6
  %187 = load i8, ptr %186, align 1, !tbaa !13, !range !19, !noundef !20
  %188 = trunc i8 %187 to i1
  invoke void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200) %24, ptr noundef nonnull align 8 dereferenceable(32) %185, i1 noundef zeroext true, i1 noundef zeroext %188)
          to label %189 unwind label %195

189:                                              ; preds = %184
  %190 = invoke noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200) %24)
          to label %191 unwind label %199

191:                                              ; preds = %189
  %192 = invoke noundef zeroext i1 @_ZN7Lattice16program_intFlashEP21ConfigBitstreamParser(ptr noundef nonnull align 8 dereferenceable(152) %27, ptr noundef %24)
          to label %193 unwind label %199

193:                                              ; preds = %191
  %194 = zext i1 %192 to i8
  store i8 %194, ptr %8, align 1, !tbaa !11
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %24) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %24) #7
  br label %211

195:                                              ; preds = %184
  %196 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %13, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %14, align 4
  br label %203

199:                                              ; preds = %191, %189
  %200 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %13, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %14, align 4
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %24) #7
  br label %203

203:                                              ; preds = %199, %195
  call void @llvm.lifetime.end.p0(i64 200, ptr %24) #7
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %14, align 4
  %206 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %207 = icmp eq i32 %205, %206
  br i1 %207, label %208, label %231

208:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %209 = load ptr, ptr %13, align 8
  %210 = call ptr @__cxa_begin_catch(ptr %209) #7
  store ptr %210, ptr %25, align 8
  store i1 false, ptr %4, align 1
  store i32 1, ptr %21, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %229

211:                                              ; preds = %193
  %212 = load ptr, ptr %27, align 8, !tbaa !21
  %213 = getelementptr inbounds ptr, ptr %212, i64 17
  %214 = load ptr, ptr %213, align 8
  %215 = call noundef zeroext i1 %214(ptr noundef nonnull align 8 dereferenceable(152) %27)
  br i1 %215, label %216, label %219

216:                                              ; preds = %211
  %217 = load i8, ptr %8, align 1, !tbaa !11, !range !19, !noundef !20
  %218 = trunc i8 %217 to i1
  br label %219

219:                                              ; preds = %216, %211
  %220 = phi i1 [ false, %211 ], [ %218, %216 ]
  store i1 %220, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %229

221:                                              ; preds = %180, %177
  %222 = load i32, ptr %6, align 4, !tbaa !9
  %223 = load i8, ptr %7, align 1, !tbaa !11, !range !19, !noundef !20
  %224 = trunc i8 %223 to i1
  %225 = call noundef zeroext i1 @_ZN7Lattice16program_extFlashEjb(ptr noundef nonnull align 8 dereferenceable(152) %27, i32 noundef %222, i1 noundef zeroext %224)
  store i1 %225, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %229

226:                                              ; preds = %174
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  store i1 true, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %229

229:                                              ; preds = %228, %221, %219, %208, %169, %153
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  %230 = load i1, ptr %4, align 1
  ret i1 %230

231:                                              ; preds = %204, %154
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %13, align 8
  %234 = load i32, ptr %14, align 4
  %235 = insertvalue { ptr, i32 } poison, ptr %233, 0
  %236 = insertvalue { ptr, i32 } %235, i32 %234, 1
  resume { ptr, i32 } %236
}

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

declare noundef i32 @_ZN9JedParser5parseEv(ptr noundef nonnull align 8 dereferenceable(656)) unnamed_addr #4

declare void @_ZN9JedParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(656)) unnamed_addr #4

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

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

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

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

; 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 = { 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 #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 = { 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 = { nounwind memory(none) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 85}
!14 = !{!"_ZTS6Device", !6, i64 8, !15, i64 16, !15, i64 48, !18, i64 80, !12, i64 84, !12, i64 85, !12, i64 86}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN6Device9prog_modeE", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!24, !26, i64 144}
!24 = !{!"_ZTS7Lattice", !14, i64 0, !25, i64 88, !26, i64 144, !27, i64 148}
!25 = !{!"_ZTS12SPIInterface", !7, i64 8, !10, i64 12, !12, i64 16, !12, i64 17, !12, i64 18, !15, i64 24}
!26 = !{!"_ZTSN7Lattice16lattice_family_tE", !7, i64 0}
!27 = !{!"_ZTSN7Lattice22lattice_flash_sector_tE", !7, i64 0}


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

%class.JedParser = type { %class.ConfigBitstreamParser, %"class.std::vector.91", i32, i32, i32, i64, i16, i8, i16, i16, i32, i8, i8, %"class.std::__cxx11::basic_istringstream", i32, i32, i32, %"class.std::__cxx11::basic_string" }
%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::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.91" = type { %"struct.std::_Vector_base.92" }
%"struct.std::_Vector_base.92" = type { %"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl" }
%"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl" = type { %"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<JedParser::jed_data, std::allocator<JedParser::jed_data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_istringstream" = type { %"class.std::basic_istream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%class.LatticeBitParser = type { %class.ConfigBitstreamParser, i64, i8, %"class.std::vector.86" }
%"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 }

@.str.569 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.571 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.572 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.573 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.614 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.616 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.619 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.645 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.646 = external hidden unnamed_addr constant [12 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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 i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

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

; 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: nounwind
declare void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6

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

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice13program_flashEjb(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.JedParser, align 8
  %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::allocator.0", align 1
  %15 = alloca %class.LatticeBitParser, align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 85
  %17 = load i8, ptr %16, align 1, !tbaa !5, !range !15, !noundef !16
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %19, label %26

19:                                               ; preds = %3
  %20 = load ptr, ptr %0, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %20, i64 80
  %22 = load ptr, ptr %21, align 8
  %23 = tail call noundef i32 %22(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.619, i32 noundef %23)
  %25 = tail call noundef i64 @_ZN7Lattice13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  tail call void @_ZN7Lattice14displayReadRegEm(ptr noundef nonnull align 8 dereferenceable(152) %0, i64 noundef %25)
  br label %26

26:                                               ; preds = %19, %3
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  %28 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str.569)
  br i1 %28, label %29, label %99

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 656, ptr nonnull %4) #8
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = load i8, ptr %16, align 1, !tbaa !5, !range !15, !noundef !16
  %32 = trunc nuw i8 %31 to i1
  call void @_ZN9JedParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(656) %4, ptr noundef nonnull align 8 dereferenceable(32) %30, i1 noundef zeroext %32)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.645, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %33 unwind label %44

33:                                               ; preds = %29
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %5, i1 noundef zeroext false)
          to label %34 unwind label %46

34:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %35 unwind label %49

35:                                               ; preds = %34
  invoke void @_Z12printSuccessRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %7, i1 noundef zeroext true)
          to label %36 unwind label %51

36:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  %37 = invoke noundef i32 @_ZN9JedParser5parseEv(ptr noundef nonnull align 8 dereferenceable(656) %4)
          to label %38 unwind label %54

38:                                               ; preds = %36
  %.not = icmp eq i32 %37, 0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.646, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %39 unwind label %56

39:                                               ; preds = %38
  invoke void @_Z9printInfoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %9, i1 noundef zeroext false)
          to label %40 unwind label %58

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

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

42:                                               ; preds = %41
  invoke void @_Z10printErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %11, i1 noundef zeroext true)
          to label %43 unwind label %63

43:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  br label %97

44:                                               ; preds = %29
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

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

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

49:                                               ; preds = %34
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %53

51:                                               ; preds = %35
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %53

53:                                               ; preds = %51, %49
  %.pn26 = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %98

54:                                               ; preds = %90, %85, %83, %77, %76, %36
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %98

56:                                               ; preds = %38
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

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

60:                                               ; preds = %58, %56
  %.pn28 = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %98

61:                                               ; preds = %41
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %42
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %65

65:                                               ; preds = %63, %61
  %.pn32 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  br label %98

66:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.614, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %67 unwind label %71

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

68:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  %69 = load i8, ptr %16, align 1, !tbaa !5, !range !15, !noundef !16
  %70 = trunc nuw i8 %69 to i1
  br i1 %70, label %76, label %77

71:                                               ; preds = %66
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %75

73:                                               ; preds = %67
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %75

75:                                               ; preds = %73, %71
  %.pn30 = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  br label %98

76:                                               ; preds = %68
  invoke void @_ZN9JedParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(656) %4)
          to label %77 unwind label %54

77:                                               ; preds = %76, %68
  %78 = invoke noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %79 unwind label %54

79:                                               ; preds = %77
  %80 = getelementptr inbounds i8, ptr %0, i64 144
  %81 = load i32, ptr %80, align 8, !tbaa !19
  %82 = icmp eq i32 %81, 2
  br i1 %82, label %83, label %85

83:                                               ; preds = %79
  %84 = invoke noundef zeroext i1 @_ZN7Lattice25program_intFlash_MachXO3DER9JedParser(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(656) %4)
          to label %87 unwind label %54

85:                                               ; preds = %79
  %86 = invoke noundef zeroext i1 @_ZN7Lattice16program_intFlashEP21ConfigBitstreamParser(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %4)
          to label %87 unwind label %54

87:                                               ; preds = %85, %83
  %.022.in = phi i1 [ %84, %83 ], [ %86, %85 ]
  %88 = load i32, ptr %80, align 8, !tbaa !19
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %97, label %90

90:                                               ; preds = %87
  %91 = load ptr, ptr %0, align 8, !tbaa !17
  %92 = getelementptr inbounds i8, ptr %91, i64 136
  %93 = load ptr, ptr %92, align 8
  %94 = invoke noundef zeroext i1 %93(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %95 unwind label %54

95:                                               ; preds = %90
  %96 = and i1 %.022.in, %94
  br label %97

97:                                               ; preds = %87, %95, %43
  %.0 = phi i1 [ false, %43 ], [ %96, %95 ], [ %.022.in, %87 ]
  call void @_ZN9JedParserD2Ev(ptr noundef nonnull align 8 dereferenceable(656) %4) #8
  call void @llvm.lifetime.end.p0(i64 656, ptr nonnull %4) #8
  br label %144

98:                                               ; preds = %75, %65, %60, %54, %53, %48
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %65 ], [ %55, %54 ], [ %.pn30, %75 ], [ %.pn28, %60 ], [ %.pn26, %53 ], [ %.pn24, %48 ]
  call void @_ZN9JedParserD2Ev(ptr noundef nonnull align 8 dereferenceable(656) %4) #8
  call void @llvm.lifetime.end.p0(i64 656, ptr nonnull %4) #8
  br label %145

99:                                               ; preds = %26
  %100 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str.571)
  br i1 %100, label %101, label %109

101:                                              ; preds = %99
  %102 = tail call noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %103 = tail call noundef zeroext i1 @_ZN7Lattice20program_fea_MachXO3DEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %104 = load ptr, ptr %0, align 8, !tbaa !17
  %105 = getelementptr inbounds i8, ptr %104, i64 136
  %106 = load ptr, ptr %105, align 8
  %107 = tail call noundef zeroext i1 %106(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %108 = and i1 %103, %107
  br label %144

109:                                              ; preds = %99
  %110 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str.572)
  br i1 %110, label %111, label %114

111:                                              ; preds = %109
  %112 = tail call noundef zeroext i1 @_ZN7Lattice9clearSRAMEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %113 = tail call noundef zeroext i1 @_ZN7Lattice23program_pubkey_MachXO3DEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  br label %144

114:                                              ; preds = %109
  %115 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str.573)
  %116 = getelementptr inbounds i8, ptr %0, i64 144
  %117 = load i32, ptr %116, align 8
  %118 = icmp eq i32 %117, 0
  %or.cond = select i1 %115, i1 %118, i1 false
  br i1 %or.cond, label %119, label %142

119:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %15) #8
  %120 = getelementptr inbounds i8, ptr %0, i64 16
  %121 = load i8, ptr %16, align 1, !tbaa !5, !range !15, !noundef !16
  %122 = trunc nuw i8 %121 to i1
  invoke void @_ZN16LatticeBitParserC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(200) %15, ptr noundef nonnull align 8 dereferenceable(32) %120, i1 noundef zeroext true, i1 noundef zeroext %122)
          to label %123 unwind label %133

123:                                              ; preds = %119
  %124 = invoke noundef i32 @_ZN16LatticeBitParser5parseEv(ptr noundef nonnull align 8 dereferenceable(200) %15)
          to label %125 unwind label %135

125:                                              ; preds = %123
  %126 = invoke noundef zeroext i1 @_ZN7Lattice16program_intFlashEP21ConfigBitstreamParser(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %15)
          to label %127 unwind label %135

127:                                              ; preds = %125
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %15) #8
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %15) #8
  %128 = load ptr, ptr %0, align 8, !tbaa !17
  %129 = getelementptr inbounds i8, ptr %128, i64 136
  %130 = load ptr, ptr %129, align 8
  %131 = call noundef zeroext i1 %130(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %132 = and i1 %126, %131
  br label %144

133:                                              ; preds = %119
  %134 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %137

135:                                              ; preds = %125, %123
  %136 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN16LatticeBitParserD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %15) #8
  br label %137

137:                                              ; preds = %135, %133
  %.pn = phi { ptr, i32 } [ %136, %135 ], [ %134, %133 ]
  %.6 = extractvalue { ptr, i32 } %.pn, 1
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %15) #8
  %138 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %139 = icmp eq i32 %.6, %138
  br i1 %139, label %140, label %145

140:                                              ; preds = %137
  %.620 = extractvalue { ptr, i32 } %.pn, 0
  %141 = call ptr @__cxa_begin_catch(ptr %.620) #8
  call void @__cxa_end_catch()
  br label %144

142:                                              ; preds = %114
  %143 = tail call noundef zeroext i1 @_ZN7Lattice16program_extFlashEjb(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %1, i1 noundef zeroext %2)
  br label %144

144:                                              ; preds = %111, %142, %127, %140, %101, %97
  %.1 = phi i1 [ %.0, %97 ], [ %108, %101 ], [ true, %111 ], [ %132, %127 ], [ false, %140 ], [ %143, %142 ]
  ret i1 %.1

145:                                              ; preds = %137, %98
  %.merged = phi { ptr, i32 } [ %.pn32.pn, %98 ], [ %.pn, %137 ]
  resume { ptr, i32 } %.merged
}

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

declare noundef i32 @_ZN9JedParser5parseEv(ptr noundef nonnull align 8 dereferenceable(656)) unnamed_addr #4

declare void @_ZN9JedParser13displayHeaderEv(ptr noundef nonnull align 8 dereferenceable(656)) unnamed_addr #4

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

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

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

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

; 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 = { 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 #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 = { 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 = { nofree nosync nounwind memory(none) }
attributes #8 = { 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}


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