; LLVM IR from trabucayre/openFPGALoader :: src/gowin.ll (ZN5Gowin12programFlashEv)

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

%"class.std::__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.Gowin = type { %class.Device.base, %class.SPIInterface, %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, 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" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.68" }
%"struct.std::_Head_base.68" = type { ptr }
%class.Device = type <{ ptr, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, i8 }>

@.str.581 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.582 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.583 = external hidden unnamed_addr constant [20 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef, i32 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gowin12programFlashEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  %16 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 2
  %17 = call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br i1 %17, label %18, label %25

18:                                               ; preds = %1
  %19 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 2
  %20 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  %21 = call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %20)
  store ptr %21, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 2
  %23 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #4
  %24 = call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %23)
  store i32 %24, ptr %4, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %18, %1
  %26 = getelementptr inbounds %class.Device, ptr %15, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = call noundef i32 @_ZN4Jtag10setClkFreqEj(ptr noundef nonnull align 8 dereferenceable(193) %27, i32 noundef 2500000)
  %29 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %15, i8 noundef zeroext 58)
  %30 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %15, i8 noundef zeroext 0)
  %31 = getelementptr inbounds %class.Device, ptr %15, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %32, i32 noundef 0, i8 noundef zeroext 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %33 = call noundef i32 @_ZN5Gowin13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  store i32 %33, ptr %5, align 4, !tbaa !9
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = and i32 %34, 69632
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %25
  %38 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192) %15, ptr noundef @.str.581, i32 noundef %38)
  store i32 1, ptr %6, align 4
  br label %133

39:                                               ; preds = %25
  %40 = call noundef zeroext i1 @_ZN5Gowin9eraseSRAMEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  store i32 1, ptr %6, align 4
  br label %133

42:                                               ; preds = %39
  %43 = call noundef zeroext i1 @_ZN5Gowin9enableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  store i32 1, ptr %6, align 4
  br label %133

45:                                               ; preds = %42
  %46 = call noundef zeroext i1 @_ZN5Gowin10eraseFLASHEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br i1 %46, label %48, label %47

47:                                               ; preds = %45
  store i32 1, ptr %6, align 4
  br label %133

48:                                               ; preds = %45
  %49 = call noundef zeroext i1 @_ZN5Gowin10disableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  store i32 1, ptr %6, align 4
  br label %133

51:                                               ; preds = %48
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %15, i32 noundef 0, ptr noundef %55, i32 noundef %56, i1 noundef zeroext false)
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 1, ptr %6, align 4
  br label %133

59:                                               ; preds = %54
  br label %60

60:                                               ; preds = %59, %51
  %61 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 3
  %62 = call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #4
  br i1 %62, label %63, label %78

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %64 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 3
  %65 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #4
  %66 = call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %65)
  store ptr %66, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %67 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 3
  %68 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #4
  %69 = call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %68)
  store i32 %69, ptr %8, align 4, !tbaa !9
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %15, i32 noundef 896, ptr noundef %70, i32 noundef %71, i1 noundef zeroext false)
  br i1 %72, label %74, label %73

73:                                               ; preds = %63
  store i32 1, ptr %6, align 4
  br label %75

74:                                               ; preds = %63
  store i32 0, ptr %6, align 4
  br label %75

75:                                               ; preds = %74, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %76 = load i32, ptr %6, align 4
  switch i32 %76, label %133 [
    i32 0, label %77
  ]

77:                                               ; preds = %75
  br label %78

78:                                               ; preds = %77, %60
  %79 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 4
  %80 = call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %79) #4
  br i1 %80, label %81, label %96

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %82 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 4
  %83 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %82) #4
  %84 = call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %83)
  store ptr %84, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %85 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 4
  %86 = call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %85) #4
  %87 = call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %86)
  store i32 %87, ptr %10, align 4, !tbaa !9
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %15, i32 noundef 1744, ptr noundef %88, i32 noundef %89, i1 noundef zeroext true)
  br i1 %90, label %92, label %91

91:                                               ; preds = %81
  store i32 1, ptr %6, align 4
  br label %93

92:                                               ; preds = %81
  store i32 0, ptr %6, align 4
  br label %93

93:                                               ; preds = %92, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %94 = load i32, ptr %6, align 4
  switch i32 %94, label %133 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95, %78
  %97 = getelementptr inbounds %class.Device, ptr %15, i32 0, i32 5
  %98 = load i8, ptr %97, align 4, !tbaa !18, !range !19, !noundef !20
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %112

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.582, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %101 unwind label %103

101:                                              ; preds = %100
  invoke void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %11, i1 noundef zeroext true)
          to label %102 unwind label %107

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

103:                                              ; preds = %100
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %13, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %14, align 4
  br label %111

107:                                              ; preds = %101
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %13, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %111

111:                                              ; preds = %107, %103
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %136

112:                                              ; preds = %102, %96
  %113 = call noundef zeroext i1 @_ZN5Gowin10disableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br i1 %113, label %115, label %114

114:                                              ; preds = %112
  store i32 1, ptr %6, align 4
  br label %133

115:                                              ; preds = %112
  %116 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %15, i8 noundef zeroext 60)
  %117 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %15, i8 noundef zeroext 2)
  %118 = call i32 @usleep(i32 noundef 600000)
  %119 = getelementptr inbounds %class.Gowin, ptr %15, i32 0, i32 11
  %120 = load i8, ptr %119, align 1, !tbaa !21, !range !19, !noundef !20
  %121 = trunc i8 %120 to i1
  br i1 %121, label %126, label %122

122:                                              ; preds = %115
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %126

125:                                              ; preds = %122
  call void @_ZN5Gowin8checkCRCEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br label %126

126:                                              ; preds = %125, %122, %115
  %127 = getelementptr inbounds %class.Device, ptr %15, i32 0, i32 6
  %128 = load i8, ptr %127, align 1, !tbaa !31, !range !19, !noundef !20
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %132

130:                                              ; preds = %126
  %131 = call noundef i32 @_ZN5Gowin13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  call void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192) %15, ptr noundef @.str.583, i32 noundef %131)
  br label %132

132:                                              ; preds = %130, %126
  store i32 0, ptr %6, align 4
  br label %133

133:                                              ; preds = %132, %114, %93, %75, %58, %50, %47, %44, %41, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  %134 = load i32, ptr %6, align 4
  switch i32 %134, label %141 [
    i32 0, label %135
    i32 1, label %135
  ]

135:                                              ; preds = %133, %133
  ret void

136:                                              ; preds = %111
  %137 = load ptr, ptr %13, align 8
  %138 = load i32, ptr %14, align 4
  %139 = insertvalue { ptr, i32 } poison, ptr %137, 0
  %140 = insertvalue { ptr, i32 } %139, i32 %138, 1
  resume { ptr, i32 } %140

141:                                              ; preds = %133
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 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

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

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

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

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

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

declare i32 @usleep(i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gowin8checkCRCEv(ptr noundef nonnull align 8 dereferenceable(192)) #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 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS6Device", !6, i64 8, !13, i64 16, !13, i64 48, !16, i64 80, !17, i64 84, !17, i64 85, !17, i64 86}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN6Device9prog_modeE", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!12, !17, i64 84}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !17, i64 177}
!22 = !{!"_ZTS5Gowin", !12, i64 0, !23, i64 88, !24, i64 144, !24, i64 152, !24, i64 160, !10, i64 168, !17, i64 172, !17, i64 173, !17, i64 174, !17, i64 175, !17, i64 176, !17, i64 177, !17, i64 178, !7, i64 179, !7, i64 180, !7, i64 181, !7, i64 182, !7, i64 183, !30, i64 184, !30, i64 188}
!23 = !{!"_ZTS12SPIInterface", !7, i64 8, !10, i64 12, !17, i64 16, !17, i64 17, !17, i64 18, !13, i64 24}
!24 = !{!"_ZTSSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt15__uniq_ptr_dataI21ConfigBitstreamParserSt14default_deleteIS0_ELb1ELb1EE", !26, i64 0}
!26 = !{!"_ZTSSt15__uniq_ptr_implI21ConfigBitstreamParserSt14default_deleteIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt5tupleIJP21ConfigBitstreamParserSt14default_deleteIS0_EEE", !28, i64 0}
!28 = !{!"_ZTSSt11_Tuple_implILm0EJP21ConfigBitstreamParserSt14default_deleteIS0_EEE", !29, i64 0}
!29 = !{!"_ZTSSt10_Head_baseILm0EP21ConfigBitstreamParserLb0EE", !6, i64 0}
!30 = !{!"_ZTSN13JtagInterface10tck_edge_tE", !7, i64 0}
!31 = !{!12, !17, i64 85}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@.str.581 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.582 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.583 = external hidden unnamed_addr constant [20 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Jtag10setClkFreqEj(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef) 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 #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gowin12programFlashEv(ptr noundef nonnull align 8 dereferenceable(192) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = getelementptr inbounds i8, ptr %0, i64 144
  %5 = tail call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %5, label %6, label %11

6:                                                ; preds = %1
  %7 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %8 = tail call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %7)
  %9 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %10 = tail call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
  br label %11

11:                                               ; preds = %6, %1
  %.018 = phi i32 [ %10, %6 ], [ 0, %1 ]
  %.017 = phi ptr [ %8, %6 ], [ null, %1 ]
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef i32 @_ZN4Jtag10setClkFreqEj(ptr noundef nonnull align 8 dereferenceable(193) %13, i32 noundef 2500000)
  %15 = tail call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %0, i8 noundef zeroext 58)
  %16 = tail call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %0, i8 noundef zeroext 0)
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  tail call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %17, i32 noundef 0, i8 noundef zeroext 1)
  %18 = tail call noundef i32 @_ZN5Gowin13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  %19 = and i32 %18, 69632
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %11
  tail call void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull @.str.581, i32 noundef %18)
  br label %80

22:                                               ; preds = %11
  %23 = tail call noundef zeroext i1 @_ZN5Gowin9eraseSRAMEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br i1 %23, label %24, label %80

24:                                               ; preds = %22
  %25 = tail call noundef zeroext i1 @_ZN5Gowin9enableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br i1 %25, label %26, label %80

26:                                               ; preds = %24
  %27 = tail call noundef zeroext i1 @_ZN5Gowin10eraseFLASHEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br i1 %27, label %28, label %80

28:                                               ; preds = %26
  %29 = tail call noundef zeroext i1 @_ZN5Gowin10disableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br i1 %29, label %30, label %80

30:                                               ; preds = %28
  %31 = icmp eq ptr %.017, null
  br i1 %31, label %34, label %32

32:                                               ; preds = %30
  %33 = tail call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef 0, ptr noundef nonnull %.017, i32 noundef %.018, i1 noundef zeroext false)
  br i1 %33, label %34, label %80

34:                                               ; preds = %32, %30
  %35 = getelementptr inbounds i8, ptr %0, i64 152
  %36 = tail call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #4
  br i1 %36, label %37, label %43

37:                                               ; preds = %34
  %38 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #4
  %39 = tail call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %38)
  %40 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #4
  %41 = tail call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %40)
  %42 = tail call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef 896, ptr noundef %39, i32 noundef %41, i1 noundef zeroext false)
  br i1 %42, label %43, label %80

43:                                               ; preds = %37, %34
  %44 = getelementptr inbounds i8, ptr %0, i64 160
  %45 = tail call noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #4
  br i1 %45, label %46, label %52

46:                                               ; preds = %43
  %47 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #4
  %48 = tail call noundef ptr @_ZNK21ConfigBitstreamParser7getDataEv(ptr noundef nonnull align 8 dereferenceable(160) %47)
  %49 = tail call noundef ptr @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #4
  %50 = tail call noundef i32 @_ZN21ConfigBitstreamParser9getLengthEv(ptr noundef nonnull align 8 dereferenceable(160) %49)
  %51 = tail call noundef zeroext i1 @_ZN5Gowin10writeFLASHEjPKhib(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef 1744, ptr noundef %48, i32 noundef %50, i1 noundef zeroext true)
  br i1 %51, label %52, label %80

52:                                               ; preds = %46, %43
  %53 = getelementptr inbounds i8, ptr %0, i64 84
  %54 = load i8, ptr %53, align 4, !tbaa !15, !range !16, !noundef !17
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %56, label %64

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.582, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %57 unwind label %59

57:                                               ; preds = %56
  invoke void @_Z9printWarnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(32) %2, i1 noundef zeroext true)
          to label %58 unwind label %61

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

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

61:                                               ; preds = %57
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br label %63

63:                                               ; preds = %61, %59
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn

64:                                               ; preds = %58, %52
  %65 = call noundef zeroext i1 @_ZN5Gowin10disableCfgEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br i1 %65, label %66, label %80

66:                                               ; preds = %64
  %67 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %0, i8 noundef zeroext 60)
  %68 = call noundef zeroext i1 @_ZN5Gowin12send_commandEh(ptr noundef nonnull align 8 dereferenceable(192) %0, i8 noundef zeroext 2)
  %69 = call i32 @usleep(i32 noundef 600000)
  %70 = getelementptr inbounds i8, ptr %0, i64 177
  %71 = load i8, ptr %70, align 1, !tbaa !18, !range !16, !noundef !17
  %72 = trunc nuw i8 %71 to i1
  %or.cond.not = or i1 %31, %72
  br i1 %or.cond.not, label %74, label %73

73:                                               ; preds = %66
  call void @_ZN5Gowin8checkCRCEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  br label %74

74:                                               ; preds = %73, %66
  %75 = getelementptr inbounds i8, ptr %0, i64 85
  %76 = load i8, ptr %75, align 1, !tbaa !29, !range !16, !noundef !17
  %77 = trunc nuw i8 %76 to i1
  br i1 %77, label %78, label %80

78:                                               ; preds = %74
  %79 = call noundef i32 @_ZN5Gowin13readStatusRegEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  call void @_ZN5Gowin14displayReadRegEPKcj(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull @.str.583, i32 noundef %79)
  br label %80

80:                                               ; preds = %74, %78, %64, %32, %28, %26, %24, %22, %37, %46, %21
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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

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

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

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

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

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

declare i32 @usleep(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gowin8checkCRCEv(ptr noundef nonnull align 8 dereferenceable(192)) 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 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!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 = !{!6, !14, i64 84}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !14, i64 177}
!19 = !{!"_ZTS5Gowin", !6, i64 0, !20, i64 88, !22, i64 144, !22, i64 152, !22, i64 160, !21, i64 168, !14, i64 172, !14, i64 173, !14, i64 174, !14, i64 175, !14, i64 176, !14, i64 177, !14, i64 178, !8, i64 179, !8, i64 180, !8, i64 181, !8, i64 182, !8, i64 183, !28, i64 184, !28, i64 188}
!20 = !{!"_ZTS12SPIInterface", !8, i64 8, !21, i64 12, !14, i64 16, !14, i64 17, !14, i64 18, !10, i64 24}
!21 = !{!"int", !8, i64 0}
!22 = !{!"_ZTSSt10unique_ptrI21ConfigBitstreamParserSt14default_deleteIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_dataI21ConfigBitstreamParserSt14default_deleteIS0_ELb1ELb1EE", !24, i64 0}
!24 = !{!"_ZTSSt15__uniq_ptr_implI21ConfigBitstreamParserSt14default_deleteIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt5tupleIJP21ConfigBitstreamParserSt14default_deleteIS0_EEE", !26, i64 0}
!26 = !{!"_ZTSSt11_Tuple_implILm0EJP21ConfigBitstreamParserSt14default_deleteIS0_EEE", !27, i64 0}
!27 = !{!"_ZTSSt10_Head_baseILm0EP21ConfigBitstreamParserLb0EE", !7, i64 0}
!28 = !{!"_ZTSN13JtagInterface10tck_edge_tE", !8, i64 0}
!29 = !{!6, !14, i64 85}


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