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

; 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.Device = type <{ ptr, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, i8 }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.724 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.725 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.727 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.730 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.731 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.732 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice22programPubKey_MachXO3DEPh(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [64 x i8], align 16
  %7 = alloca [16 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %12 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 6
  %13 = load i8, ptr %12, align 1, !tbaa !9, !range !16, !noundef !17
  %14 = trunc i8 %13 to i1
  br i1 %14, label %15, label %33

15:                                               ; preds = %2
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.730)
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %17

17:                                               ; preds = %28, %15
  %18 = load i32, ptr %8, align 4, !tbaa !18
  %19 = icmp slt i32 %18, 64
  br i1 %19, label %20, label %31

20:                                               ; preds = %17
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load i32, ptr %8, align 4, !tbaa !18
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i8, ptr %21, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !20
  %26 = zext i8 %25 to i32
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.724, i32 noundef %26)
  br label %28

28:                                               ; preds = %20
  %29 = load i32, ptr %8, align 4, !tbaa !18
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %8, align 4, !tbaa !18
  br label %17, !llvm.loop !21

31:                                               ; preds = %17
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.725)
  br label %33

33:                                               ; preds = %31, %2
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %34

34:                                               ; preds = %47, %33
  %35 = load i32, ptr %8, align 4, !tbaa !18
  %36 = icmp slt i32 %35, 16
  br i1 %36, label %37, label %50

37:                                               ; preds = %34
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !18
  %40 = sub nsw i32 63, %39
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %38, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !20
  %44 = load i32, ptr %8, align 4, !tbaa !18
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 %45
  store i8 %43, ptr %46, align 1, !tbaa !20
  br label %47

47:                                               ; preds = %37
  %48 = load i32, ptr %8, align 4, !tbaa !18
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %8, align 4, !tbaa !18
  br label %34, !llvm.loop !23

50:                                               ; preds = %34
  %51 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %52 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 89, ptr noundef %51, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %53 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %54, i32 noundef 1, i8 noundef zeroext 1)
  %55 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %56, i32 noundef 2)
  %57 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %58 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %11, i1 noundef zeroext false)
  br i1 %58, label %60, label %59

59:                                               ; preds = %50
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %241

60:                                               ; preds = %50
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %61

61:                                               ; preds = %74, %60
  %62 = load i32, ptr %8, align 4, !tbaa !18
  %63 = icmp slt i32 %62, 16
  br i1 %63, label %64, label %77

64:                                               ; preds = %61
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !18
  %67 = sub nsw i32 47, %66
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %65, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !20
  %71 = load i32, ptr %8, align 4, !tbaa !18
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 %72
  store i8 %70, ptr %73, align 1, !tbaa !20
  br label %74

74:                                               ; preds = %64
  %75 = load i32, ptr %8, align 4, !tbaa !18
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !18
  br label %61, !llvm.loop !25

77:                                               ; preds = %61
  %78 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %79 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 91, ptr noundef %78, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %80 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %81, i32 noundef 1, i8 noundef zeroext 1)
  %82 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %83, i32 noundef 2)
  %84 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %85 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %11, i1 noundef zeroext false)
  br i1 %85, label %87, label %86

86:                                               ; preds = %77
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %241

87:                                               ; preds = %77
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %88

88:                                               ; preds = %101, %87
  %89 = load i32, ptr %8, align 4, !tbaa !18
  %90 = icmp slt i32 %89, 16
  br i1 %90, label %91, label %104

91:                                               ; preds = %88
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !18
  %94 = sub nsw i32 31, %93
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %92, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !20
  %98 = load i32, ptr %8, align 4, !tbaa !18
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 %99
  store i8 %97, ptr %100, align 1, !tbaa !20
  br label %101

101:                                              ; preds = %91
  %102 = load i32, ptr %8, align 4, !tbaa !18
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %8, align 4, !tbaa !18
  br label %88, !llvm.loop !26

104:                                              ; preds = %88
  %105 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %106 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 97, ptr noundef %105, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %107 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %108, i32 noundef 1, i8 noundef zeroext 1)
  %109 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %110, i32 noundef 2)
  %111 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %112 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %11, i1 noundef zeroext false)
  br i1 %112, label %114, label %113

113:                                              ; preds = %104
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %241

114:                                              ; preds = %104
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %115

115:                                              ; preds = %128, %114
  %116 = load i32, ptr %8, align 4, !tbaa !18
  %117 = icmp slt i32 %116, 16
  br i1 %117, label %118, label %131

118:                                              ; preds = %115
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !18
  %121 = sub nsw i32 15, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i8, ptr %119, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !20
  %125 = load i32, ptr %8, align 4, !tbaa !18
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 %126
  store i8 %124, ptr %127, align 1, !tbaa !20
  br label %128

128:                                              ; preds = %118
  %129 = load i32, ptr %8, align 4, !tbaa !18
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %8, align 4, !tbaa !18
  br label %115, !llvm.loop !27

131:                                              ; preds = %115
  %132 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %133 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 99, ptr noundef %132, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %134 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %135, i32 noundef 1, i8 noundef zeroext 1)
  %136 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %137, i32 noundef 2)
  %138 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %139 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %11, i1 noundef zeroext false)
  br i1 %139, label %141, label %140

140:                                              ; preds = %131
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %241

141:                                              ; preds = %131
  %142 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 6
  %143 = load i8, ptr %142, align 1, !tbaa !9, !range !16, !noundef !17
  %144 = trunc i8 %143 to i1
  br i1 %144, label %149, label %145

145:                                              ; preds = %141
  %146 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 5
  %147 = load i8, ptr %146, align 4, !tbaa !28, !range !16, !noundef !17
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %177

149:                                              ; preds = %145, %141
  %150 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %151 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 90, ptr noundef null, i32 noundef 0, ptr noundef %150, i32 noundef 16, i1 noundef zeroext false)
  %152 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %153, i32 noundef 1, i8 noundef zeroext 1)
  %154 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %155, i32 noundef 2)
  %156 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %157 = getelementptr inbounds i8, ptr %156, i64 16
  %158 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 92, ptr noundef null, i32 noundef 0, ptr noundef %157, i32 noundef 16, i1 noundef zeroext false)
  %159 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %160, i32 noundef 1, i8 noundef zeroext 1)
  %161 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %162 = load ptr, ptr %161, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %162, i32 noundef 2)
  %163 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %164 = getelementptr inbounds i8, ptr %163, i64 32
  %165 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 98, ptr noundef null, i32 noundef 0, ptr noundef %164, i32 noundef 16, i1 noundef zeroext false)
  %166 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %167, i32 noundef 1, i8 noundef zeroext 1)
  %168 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %169, i32 noundef 2)
  %170 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %171 = getelementptr inbounds i8, ptr %170, i64 48
  %172 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %11, i8 noundef zeroext 100, ptr noundef null, i32 noundef 0, ptr noundef %171, i32 noundef 16, i1 noundef zeroext false)
  %173 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !24
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %174, i32 noundef 1, i8 noundef zeroext 1)
  %175 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !24
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %176, i32 noundef 2)
  br label %177

177:                                              ; preds = %149, %145
  %178 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 6
  %179 = load i8, ptr %178, align 1, !tbaa !9, !range !16, !noundef !17
  %180 = trunc i8 %179 to i1
  br i1 %180, label %181, label %207

181:                                              ; preds = %177
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.731)
  store i32 63, ptr %8, align 4, !tbaa !18
  br label %183

183:                                              ; preds = %202, %181
  %184 = load i32, ptr %8, align 4, !tbaa !18
  %185 = icmp sge i32 %184, 0
  br i1 %185, label %186, label %205

186:                                              ; preds = %183
  %187 = load i32, ptr %8, align 4, !tbaa !18
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !20
  %191 = zext i8 %190 to i32
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.724, i32 noundef %191)
  %193 = load i32, ptr %8, align 4, !tbaa !18
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %201

195:                                              ; preds = %186
  %196 = load i32, ptr %8, align 4, !tbaa !18
  %197 = srem i32 %196, 16
  %198 = icmp eq i32 %197, 0
  br i1 %198, label %199, label %201

199:                                              ; preds = %195
  %200 = call i32 (ptr, ...) @printf(ptr noundef @.str.732)
  br label %201

201:                                              ; preds = %199, %195, %186
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %8, align 4, !tbaa !18
  %204 = add nsw i32 %203, -1
  store i32 %204, ptr %8, align 4, !tbaa !18
  br label %183, !llvm.loop !29

205:                                              ; preds = %183
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.725)
  br label %207

207:                                              ; preds = %205, %177
  %208 = getelementptr inbounds %class.Device, ptr %11, i32 0, i32 5
  %209 = load i8, ptr %208, align 4, !tbaa !28, !range !16, !noundef !17
  %210 = trunc i8 %209 to i1
  br i1 %210, label %211, label %240

211:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %212

212:                                              ; preds = %234, %211
  %213 = load i32, ptr %10, align 4, !tbaa !18
  %214 = icmp slt i32 %213, 64
  br i1 %214, label %216, label %215

215:                                              ; preds = %212
  store i32 20, ptr %9, align 4
  br label %237

216:                                              ; preds = %212
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = load i32, ptr %10, align 4, !tbaa !18
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds i8, ptr %217, i64 %219
  %221 = load i8, ptr %220, align 1, !tbaa !20
  %222 = zext i8 %221 to i32
  %223 = load i32, ptr %10, align 4, !tbaa !18
  %224 = sub nsw i32 64, %223
  %225 = sub nsw i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !20
  %229 = zext i8 %228 to i32
  %230 = icmp ne i32 %222, %229
  br i1 %230, label %231, label %233

231:                                              ; preds = %216
  %232 = call i32 (ptr, ...) @printf(ptr noundef @.str.727)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %237

233:                                              ; preds = %216
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %10, align 4, !tbaa !18
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %10, align 4, !tbaa !18
  br label %212, !llvm.loop !30

237:                                              ; preds = %231, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %238 = load i32, ptr %9, align 4
  switch i32 %238, label %241 [
    i32 20, label %239
  ]

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239, %207
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %241

241:                                              ; preds = %240, %237, %140, %113, %86, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #4
  %242 = load i1, ptr %3, align 1
  ret i1 %242
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { nounwind }

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

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


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

@.str.724 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.725 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.727 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.730 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.731 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.732 = external hidden unnamed_addr constant [2 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Lattice22programPubKey_MachXO3DEPh(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 align 2 {
  %3 = alloca [64 x i8], align 16
  %4 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 85
  %6 = load i8, ptr %5, align 1, !tbaa !5, !range !15, !noundef !16
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %8, label %266

8:                                                ; preds = %2
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.730)
  %10 = load i8, ptr %1, align 1, !tbaa !17
  %11 = zext i8 %10 to i32
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %11)
  %13 = getelementptr inbounds i8, ptr %1, i64 1
  %14 = load i8, ptr %13, align 1, !tbaa !17
  %15 = zext i8 %14 to i32
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %15)
  %17 = getelementptr inbounds i8, ptr %1, i64 2
  %18 = load i8, ptr %17, align 1, !tbaa !17
  %19 = zext i8 %18 to i32
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %19)
  %21 = getelementptr inbounds i8, ptr %1, i64 3
  %22 = load i8, ptr %21, align 1, !tbaa !17
  %23 = zext i8 %22 to i32
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %23)
  %25 = getelementptr inbounds i8, ptr %1, i64 4
  %26 = load i8, ptr %25, align 1, !tbaa !17
  %27 = zext i8 %26 to i32
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %27)
  %29 = getelementptr inbounds i8, ptr %1, i64 5
  %30 = load i8, ptr %29, align 1, !tbaa !17
  %31 = zext i8 %30 to i32
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %31)
  %33 = getelementptr inbounds i8, ptr %1, i64 6
  %34 = load i8, ptr %33, align 1, !tbaa !17
  %35 = zext i8 %34 to i32
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %35)
  %37 = getelementptr inbounds i8, ptr %1, i64 7
  %38 = load i8, ptr %37, align 1, !tbaa !17
  %39 = zext i8 %38 to i32
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %39)
  %41 = getelementptr inbounds i8, ptr %1, i64 8
  %42 = load i8, ptr %41, align 1, !tbaa !17
  %43 = zext i8 %42 to i32
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %43)
  %45 = getelementptr inbounds i8, ptr %1, i64 9
  %46 = load i8, ptr %45, align 1, !tbaa !17
  %47 = zext i8 %46 to i32
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %47)
  %49 = getelementptr inbounds i8, ptr %1, i64 10
  %50 = load i8, ptr %49, align 1, !tbaa !17
  %51 = zext i8 %50 to i32
  %52 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %51)
  %53 = getelementptr inbounds i8, ptr %1, i64 11
  %54 = load i8, ptr %53, align 1, !tbaa !17
  %55 = zext i8 %54 to i32
  %56 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %55)
  %57 = getelementptr inbounds i8, ptr %1, i64 12
  %58 = load i8, ptr %57, align 1, !tbaa !17
  %59 = zext i8 %58 to i32
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %59)
  %61 = getelementptr inbounds i8, ptr %1, i64 13
  %62 = load i8, ptr %61, align 1, !tbaa !17
  %63 = zext i8 %62 to i32
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %63)
  %65 = getelementptr inbounds i8, ptr %1, i64 14
  %66 = load i8, ptr %65, align 1, !tbaa !17
  %67 = zext i8 %66 to i32
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %67)
  %69 = getelementptr inbounds i8, ptr %1, i64 15
  %70 = load i8, ptr %69, align 1, !tbaa !17
  %71 = zext i8 %70 to i32
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %71)
  %73 = getelementptr inbounds i8, ptr %1, i64 16
  %74 = load i8, ptr %73, align 1, !tbaa !17
  %75 = zext i8 %74 to i32
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %75)
  %77 = getelementptr inbounds i8, ptr %1, i64 17
  %78 = load i8, ptr %77, align 1, !tbaa !17
  %79 = zext i8 %78 to i32
  %80 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %79)
  %81 = getelementptr inbounds i8, ptr %1, i64 18
  %82 = load i8, ptr %81, align 1, !tbaa !17
  %83 = zext i8 %82 to i32
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %83)
  %85 = getelementptr inbounds i8, ptr %1, i64 19
  %86 = load i8, ptr %85, align 1, !tbaa !17
  %87 = zext i8 %86 to i32
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %87)
  %89 = getelementptr inbounds i8, ptr %1, i64 20
  %90 = load i8, ptr %89, align 1, !tbaa !17
  %91 = zext i8 %90 to i32
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %91)
  %93 = getelementptr inbounds i8, ptr %1, i64 21
  %94 = load i8, ptr %93, align 1, !tbaa !17
  %95 = zext i8 %94 to i32
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %95)
  %97 = getelementptr inbounds i8, ptr %1, i64 22
  %98 = load i8, ptr %97, align 1, !tbaa !17
  %99 = zext i8 %98 to i32
  %100 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %99)
  %101 = getelementptr inbounds i8, ptr %1, i64 23
  %102 = load i8, ptr %101, align 1, !tbaa !17
  %103 = zext i8 %102 to i32
  %104 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %103)
  %105 = getelementptr inbounds i8, ptr %1, i64 24
  %106 = load i8, ptr %105, align 1, !tbaa !17
  %107 = zext i8 %106 to i32
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %107)
  %109 = getelementptr inbounds i8, ptr %1, i64 25
  %110 = load i8, ptr %109, align 1, !tbaa !17
  %111 = zext i8 %110 to i32
  %112 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %111)
  %113 = getelementptr inbounds i8, ptr %1, i64 26
  %114 = load i8, ptr %113, align 1, !tbaa !17
  %115 = zext i8 %114 to i32
  %116 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %115)
  %117 = getelementptr inbounds i8, ptr %1, i64 27
  %118 = load i8, ptr %117, align 1, !tbaa !17
  %119 = zext i8 %118 to i32
  %120 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %119)
  %121 = getelementptr inbounds i8, ptr %1, i64 28
  %122 = load i8, ptr %121, align 1, !tbaa !17
  %123 = zext i8 %122 to i32
  %124 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %123)
  %125 = getelementptr inbounds i8, ptr %1, i64 29
  %126 = load i8, ptr %125, align 1, !tbaa !17
  %127 = zext i8 %126 to i32
  %128 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %127)
  %129 = getelementptr inbounds i8, ptr %1, i64 30
  %130 = load i8, ptr %129, align 1, !tbaa !17
  %131 = zext i8 %130 to i32
  %132 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %131)
  %133 = getelementptr inbounds i8, ptr %1, i64 31
  %134 = load i8, ptr %133, align 1, !tbaa !17
  %135 = zext i8 %134 to i32
  %136 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %135)
  %137 = getelementptr inbounds i8, ptr %1, i64 32
  %138 = load i8, ptr %137, align 1, !tbaa !17
  %139 = zext i8 %138 to i32
  %140 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %139)
  %141 = getelementptr inbounds i8, ptr %1, i64 33
  %142 = load i8, ptr %141, align 1, !tbaa !17
  %143 = zext i8 %142 to i32
  %144 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %143)
  %145 = getelementptr inbounds i8, ptr %1, i64 34
  %146 = load i8, ptr %145, align 1, !tbaa !17
  %147 = zext i8 %146 to i32
  %148 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %147)
  %149 = getelementptr inbounds i8, ptr %1, i64 35
  %150 = load i8, ptr %149, align 1, !tbaa !17
  %151 = zext i8 %150 to i32
  %152 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %151)
  %153 = getelementptr inbounds i8, ptr %1, i64 36
  %154 = load i8, ptr %153, align 1, !tbaa !17
  %155 = zext i8 %154 to i32
  %156 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %155)
  %157 = getelementptr inbounds i8, ptr %1, i64 37
  %158 = load i8, ptr %157, align 1, !tbaa !17
  %159 = zext i8 %158 to i32
  %160 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %159)
  %161 = getelementptr inbounds i8, ptr %1, i64 38
  %162 = load i8, ptr %161, align 1, !tbaa !17
  %163 = zext i8 %162 to i32
  %164 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %163)
  %165 = getelementptr inbounds i8, ptr %1, i64 39
  %166 = load i8, ptr %165, align 1, !tbaa !17
  %167 = zext i8 %166 to i32
  %168 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %167)
  %169 = getelementptr inbounds i8, ptr %1, i64 40
  %170 = load i8, ptr %169, align 1, !tbaa !17
  %171 = zext i8 %170 to i32
  %172 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %171)
  %173 = getelementptr inbounds i8, ptr %1, i64 41
  %174 = load i8, ptr %173, align 1, !tbaa !17
  %175 = zext i8 %174 to i32
  %176 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %175)
  %177 = getelementptr inbounds i8, ptr %1, i64 42
  %178 = load i8, ptr %177, align 1, !tbaa !17
  %179 = zext i8 %178 to i32
  %180 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %179)
  %181 = getelementptr inbounds i8, ptr %1, i64 43
  %182 = load i8, ptr %181, align 1, !tbaa !17
  %183 = zext i8 %182 to i32
  %184 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %183)
  %185 = getelementptr inbounds i8, ptr %1, i64 44
  %186 = load i8, ptr %185, align 1, !tbaa !17
  %187 = zext i8 %186 to i32
  %188 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %187)
  %189 = getelementptr inbounds i8, ptr %1, i64 45
  %190 = load i8, ptr %189, align 1, !tbaa !17
  %191 = zext i8 %190 to i32
  %192 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %191)
  %193 = getelementptr inbounds i8, ptr %1, i64 46
  %194 = load i8, ptr %193, align 1, !tbaa !17
  %195 = zext i8 %194 to i32
  %196 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %195)
  %197 = getelementptr inbounds i8, ptr %1, i64 47
  %198 = load i8, ptr %197, align 1, !tbaa !17
  %199 = zext i8 %198 to i32
  %200 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %199)
  %201 = getelementptr inbounds i8, ptr %1, i64 48
  %202 = load i8, ptr %201, align 1, !tbaa !17
  %203 = zext i8 %202 to i32
  %204 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %203)
  %205 = getelementptr inbounds i8, ptr %1, i64 49
  %206 = load i8, ptr %205, align 1, !tbaa !17
  %207 = zext i8 %206 to i32
  %208 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %207)
  %209 = getelementptr inbounds i8, ptr %1, i64 50
  %210 = load i8, ptr %209, align 1, !tbaa !17
  %211 = zext i8 %210 to i32
  %212 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %211)
  %213 = getelementptr inbounds i8, ptr %1, i64 51
  %214 = load i8, ptr %213, align 1, !tbaa !17
  %215 = zext i8 %214 to i32
  %216 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %215)
  %217 = getelementptr inbounds i8, ptr %1, i64 52
  %218 = load i8, ptr %217, align 1, !tbaa !17
  %219 = zext i8 %218 to i32
  %220 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %219)
  %221 = getelementptr inbounds i8, ptr %1, i64 53
  %222 = load i8, ptr %221, align 1, !tbaa !17
  %223 = zext i8 %222 to i32
  %224 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %223)
  %225 = getelementptr inbounds i8, ptr %1, i64 54
  %226 = load i8, ptr %225, align 1, !tbaa !17
  %227 = zext i8 %226 to i32
  %228 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %227)
  %229 = getelementptr inbounds i8, ptr %1, i64 55
  %230 = load i8, ptr %229, align 1, !tbaa !17
  %231 = zext i8 %230 to i32
  %232 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %231)
  %233 = getelementptr inbounds i8, ptr %1, i64 56
  %234 = load i8, ptr %233, align 1, !tbaa !17
  %235 = zext i8 %234 to i32
  %236 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %235)
  %237 = getelementptr inbounds i8, ptr %1, i64 57
  %238 = load i8, ptr %237, align 1, !tbaa !17
  %239 = zext i8 %238 to i32
  %240 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %239)
  %241 = getelementptr inbounds i8, ptr %1, i64 58
  %242 = load i8, ptr %241, align 1, !tbaa !17
  %243 = zext i8 %242 to i32
  %244 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %243)
  %245 = getelementptr inbounds i8, ptr %1, i64 59
  %246 = load i8, ptr %245, align 1, !tbaa !17
  %247 = zext i8 %246 to i32
  %248 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %247)
  %249 = getelementptr inbounds i8, ptr %1, i64 60
  %250 = load i8, ptr %249, align 1, !tbaa !17
  %251 = zext i8 %250 to i32
  %252 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %251)
  %253 = getelementptr inbounds i8, ptr %1, i64 61
  %254 = load i8, ptr %253, align 1, !tbaa !17
  %255 = zext i8 %254 to i32
  %256 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %255)
  %257 = getelementptr inbounds i8, ptr %1, i64 62
  %258 = load i8, ptr %257, align 1, !tbaa !17
  %259 = zext i8 %258 to i32
  %260 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %259)
  %261 = getelementptr inbounds i8, ptr %1, i64 63
  %262 = load i8, ptr %261, align 1, !tbaa !17
  %263 = zext i8 %262 to i32
  %264 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %263)
  %265 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.725)
  br label %266

266:                                              ; preds = %8, %2
  %267 = getelementptr inbounds i8, ptr %1, i64 48
  %268 = load <16 x i8>, ptr %267, align 1, !tbaa !17
  %269 = shufflevector <16 x i8> %268, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %269, ptr %4, align 16, !tbaa !17
  %270 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 89, ptr noundef nonnull %4, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %271 = getelementptr inbounds i8, ptr %0, i64 8
  %272 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %272, i32 noundef 1, i8 noundef zeroext 1)
  %273 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %273, i32 noundef 2)
  %274 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %275 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
  br i1 %275, label %.preheader44.preheader, label %.critedge

.preheader44.preheader:                           ; preds = %266
  %276 = getelementptr inbounds i8, ptr %1, i64 32
  %277 = load <16 x i8>, ptr %276, align 1, !tbaa !17
  %278 = shufflevector <16 x i8> %277, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %278, ptr %4, align 16, !tbaa !17
  %279 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 91, ptr noundef nonnull %4, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %280 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %280, i32 noundef 1, i8 noundef zeroext 1)
  %281 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %281, i32 noundef 2)
  %282 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %283 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
  br i1 %283, label %.preheader43.preheader, label %.critedge

.preheader43.preheader:                           ; preds = %.preheader44.preheader
  %284 = getelementptr inbounds i8, ptr %1, i64 16
  %285 = load <16 x i8>, ptr %284, align 1, !tbaa !17
  %286 = shufflevector <16 x i8> %285, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %286, ptr %4, align 16, !tbaa !17
  %287 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 97, ptr noundef nonnull %4, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %288 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %288, i32 noundef 1, i8 noundef zeroext 1)
  %289 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %289, i32 noundef 2)
  %290 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %291 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
  br i1 %291, label %.preheader42.preheader, label %.critedge

.preheader42.preheader:                           ; preds = %.preheader43.preheader
  %292 = load <16 x i8>, ptr %1, align 1, !tbaa !17
  %293 = shufflevector <16 x i8> %292, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %293, ptr %4, align 16, !tbaa !17
  %294 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 99, ptr noundef nonnull %4, i32 noundef 16, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %295 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %295, i32 noundef 1, i8 noundef zeroext 1)
  %296 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %296, i32 noundef 2)
  %297 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext -1, ptr noundef null, i32 noundef 0, ptr noundef null, i32 noundef 0, i1 noundef zeroext false)
  %298 = call noundef zeroext i1 @_ZN7Lattice12pollBusyFlagEb(ptr noundef nonnull align 8 dereferenceable(152) %0, i1 noundef zeroext false)
  br i1 %298, label %299, label %.critedge

299:                                              ; preds = %.preheader42.preheader
  %300 = load i8, ptr %5, align 1, !tbaa !5, !range !15, !noundef !16
  %301 = trunc nuw i8 %300 to i1
  br i1 %301, label %306, label %302

302:                                              ; preds = %299
  %303 = getelementptr inbounds i8, ptr %0, i64 84
  %304 = load i8, ptr %303, align 4, !tbaa !19, !range !15, !noundef !16
  %305 = trunc nuw i8 %304 to i1
  br i1 %305, label %306, label %322

306:                                              ; preds = %302, %299
  %307 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 90, ptr noundef null, i32 noundef 0, ptr noundef nonnull %3, i32 noundef 16, i1 noundef zeroext false)
  %308 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %308, i32 noundef 1, i8 noundef zeroext 1)
  %309 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %309, i32 noundef 2)
  %310 = getelementptr inbounds i8, ptr %3, i64 16
  %311 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 92, ptr noundef null, i32 noundef 0, ptr noundef nonnull %310, i32 noundef 16, i1 noundef zeroext false)
  %312 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %312, i32 noundef 1, i8 noundef zeroext 1)
  %313 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %313, i32 noundef 2)
  %314 = getelementptr inbounds i8, ptr %3, i64 32
  %315 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 98, ptr noundef null, i32 noundef 0, ptr noundef nonnull %314, i32 noundef 16, i1 noundef zeroext false)
  %316 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %316, i32 noundef 1, i8 noundef zeroext 1)
  %317 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %317, i32 noundef 2)
  %318 = getelementptr inbounds i8, ptr %3, i64 48
  %319 = call noundef zeroext i1 @_ZN7Lattice5wr_rdEhPhiS0_ib(ptr noundef nonnull align 8 dereferenceable(152) %0, i8 noundef zeroext 100, ptr noundef null, i32 noundef 0, ptr noundef nonnull %318, i32 noundef 16, i1 noundef zeroext false)
  %320 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9set_stateENS_10tapState_tEh(ptr noundef nonnull align 8 dereferenceable(193) %320, i32 noundef 1, i8 noundef zeroext 1)
  %321 = load ptr, ptr %271, align 8, !tbaa !18
  call void @_ZN4Jtag9toggleClkEi(ptr noundef nonnull align 8 dereferenceable(193) %321, i32 noundef 2)
  %.pre = load i8, ptr %5, align 1, !tbaa !5, !range !15
  br label %322

322:                                              ; preds = %306, %302
  %323 = phi i8 [ %.pre, %306 ], [ %300, %302 ]
  %324 = trunc nuw i8 %323 to i1
  br i1 %324, label %325, label %339

325:                                              ; preds = %322
  %326 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.731)
  br label %327

327:                                              ; preds = %325, %336
  %indvars.iv = phi i64 [ 63, %325 ], [ %indvars.iv.next, %336 ]
  %328 = getelementptr inbounds [64 x i8], ptr %3, i64 0, i64 %indvars.iv
  %329 = load i8, ptr %328, align 1, !tbaa !17
  %330 = zext i8 %329 to i32
  %331 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.724, i32 noundef %330)
  %.not40 = icmp ne i64 %indvars.iv, 0
  %332 = and i64 %indvars.iv, 15
  %333 = icmp eq i64 %332, 0
  %or.cond = and i1 %.not40, %333
  br i1 %or.cond, label %334, label %336

334:                                              ; preds = %327
  %335 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.732)
  br label %336

336:                                              ; preds = %327, %334
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not61 = icmp eq i64 %indvars.iv, 0
  br i1 %.not61, label %337, label %327, !llvm.loop !20

337:                                              ; preds = %336
  %338 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.725)
  br label %339

339:                                              ; preds = %337, %322
  %340 = getelementptr inbounds i8, ptr %0, i64 84
  %341 = load i8, ptr %340, align 4, !tbaa !19, !range !15, !noundef !16
  %342 = trunc nuw i8 %341 to i1
  br i1 %342, label %.preheader, label %.critedge

.preheader.1:                                     ; preds = %.preheader
  %indvars.iv.next59 = or disjoint i64 %indvars.iv58, 1
  %343 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next59
  %344 = load i8, ptr %343, align 1, !tbaa !17
  %345 = xor i64 %indvars.iv58, 62
  %346 = getelementptr inbounds [64 x i8], ptr %3, i64 0, i64 %345
  %347 = load i8, ptr %346, align 2, !tbaa !17
  %.not.1 = icmp eq i8 %344, %347
  br i1 %.not.1, label %348, label %355

348:                                              ; preds = %.preheader.1
  %indvars.iv.next59.1 = add nuw nsw i64 %indvars.iv58, 2
  %exitcond.1 = icmp eq i64 %indvars.iv.next59.1, 64
  br i1 %exitcond.1, label %.critedge, label %.preheader, !llvm.loop !22

.preheader:                                       ; preds = %339, %348
  %indvars.iv58 = phi i64 [ %indvars.iv.next59.1, %348 ], [ 0, %339 ]
  %349 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv58
  %350 = load i8, ptr %349, align 1, !tbaa !17
  %351 = and i64 %indvars.iv58, 4294967294
  %352 = xor i64 %351, 63
  %353 = getelementptr inbounds [64 x i8], ptr %3, i64 0, i64 %352
  %354 = load i8, ptr %353, align 1, !tbaa !17
  %.not = icmp eq i8 %350, %354
  br i1 %.not, label %.preheader.1, label %355

355:                                              ; preds = %.preheader.1, %.preheader
  %356 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.727)
  br label %.critedge

.critedge:                                        ; preds = %348, %339, %355, %.preheader42.preheader, %.preheader43.preheader, %.preheader44.preheader, %266
  %.139 = phi i1 [ false, %355 ], [ false, %266 ], [ false, %.preheader44.preheader ], [ false, %.preheader43.preheader ], [ false, %.preheader42.preheader ], [ true, %339 ], [ true, %348 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #5
  ret i1 %.139
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { 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 #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 }

!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 = !{!8, !8, i64 0}
!18 = !{!6, !7, i64 8}
!19 = !{!6, !14, i64 84}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass