; LLVM IR from cvra/robot-software :: uwb-beacon-firmware/src/decadriver (deca_device)

; 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"

%struct.dwt_local_data_t = type { i64, i64, i8, i8, i64, i8, i8, i64, i16, i8, %struct.dwt_cb_data_t, ptr, ptr, ptr, ptr }
%struct.dwt_cb_data_t = type { i64, i16, [2 x i8], i8 }

@pdw1000local = external hidden global ptr, align 8

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

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_write8bitoffsetreg(i32 noundef, i32 noundef, i8 noundef zeroext) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @dwt_read16bitoffsetreg(i32 noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @dwt_read32bitoffsetreg(i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_write32bitoffsetreg(i32 noundef, i32 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_readfromdevice(i16 noundef zeroext, i16 noundef zeroext, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @dwt_isr() #1 {
  %1 = alloca i64, align 8
  %2 = alloca i16, align 2
  %3 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #2
  %4 = call i64 @dwt_read32bitoffsetreg(i32 noundef 15, i32 noundef 0)
  %5 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.dwt_local_data_t, ptr %5, i32 0, i32 10
  %7 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %6, i32 0, i32 0
  store i64 %4, ptr %7, align 8, !tbaa !9
  store i64 %4, ptr %1, align 8, !tbaa !14
  %8 = load i64, ptr %1, align 8, !tbaa !14
  %9 = and i64 %8, 16384
  %10 = icmp ne i64 %9, 0
  br i1 %10, label %11, label %90

11:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 2, ptr %2) #2
  call void @llvm.lifetime.start.p0(i64 2, ptr %3) #2
  call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 28416)
  %12 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.dwt_local_data_t, ptr %12, i32 0, i32 10
  %14 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %13, i32 0, i32 3
  store i8 0, ptr %14, align 4, !tbaa !15
  %15 = call zeroext i16 @dwt_read16bitoffsetreg(i32 noundef 16, i32 noundef 0)
  store i16 %15, ptr %2, align 2, !tbaa !16
  %16 = load i16, ptr %2, align 2, !tbaa !16
  %17 = zext i16 %16 to i64
  %18 = and i64 %17, 1023
  %19 = trunc i64 %18 to i16
  store i16 %19, ptr %3, align 2, !tbaa !16
  %20 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.dwt_local_data_t, ptr %20, i32 0, i32 2
  %22 = load i8, ptr %21, align 8, !tbaa !17
  %23 = zext i8 %22 to i32
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %30

25:                                               ; preds = %11
  %26 = load i16, ptr %3, align 2, !tbaa !16
  %27 = zext i16 %26 to i64
  %28 = and i64 %27, 127
  %29 = trunc i64 %28 to i16
  store i16 %29, ptr %3, align 2, !tbaa !16
  br label %30

30:                                               ; preds = %25, %11
  %31 = load i16, ptr %3, align 2, !tbaa !16
  %32 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.dwt_local_data_t, ptr %32, i32 0, i32 10
  %34 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %33, i32 0, i32 1
  store i16 %31, ptr %34, align 8, !tbaa !18
  %35 = load i16, ptr %2, align 2, !tbaa !16
  %36 = zext i16 %35 to i64
  %37 = and i64 %36, 32768
  %38 = icmp ne i64 %37, 0
  br i1 %38, label %39, label %47

39:                                               ; preds = %30
  %40 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.dwt_local_data_t, ptr %40, i32 0, i32 10
  %42 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %41, i32 0, i32 3
  %43 = load i8, ptr %42, align 4, !tbaa !15
  %44 = zext i8 %43 to i32
  %45 = or i32 %44, 1
  %46 = trunc i32 %45 to i8
  store i8 %46, ptr %42, align 4, !tbaa !15
  br label %47

47:                                               ; preds = %39, %30
  %48 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.dwt_local_data_t, ptr %48, i32 0, i32 10
  %50 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %49, i32 0, i32 2
  %51 = getelementptr inbounds [2 x i8], ptr %50, i64 0, i64 0
  call void @dwt_readfromdevice(i16 noundef zeroext 17, i16 noundef zeroext 0, i64 noundef 2, ptr noundef %51)
  %52 = load i64, ptr %1, align 8, !tbaa !14
  %53 = and i64 %52, 8
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %72

55:                                               ; preds = %47
  %56 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.dwt_local_data_t, ptr %56, i32 0, i32 10
  %58 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds [2 x i8], ptr %58, i64 0, i64 0
  %60 = load i8, ptr %59, align 2, !tbaa !19
  %61 = zext i8 %60 to i32
  %62 = and i32 %61, 32
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %72

64:                                               ; preds = %55
  call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 8)
  %65 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.dwt_local_data_t, ptr %65, i32 0, i32 10
  %67 = getelementptr inbounds %struct.dwt_cb_data_t, ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = and i64 %68, -9
  store i64 %69, ptr %67, align 8, !tbaa !9
  %70 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.dwt_local_data_t, ptr %70, i32 0, i32 9
  store i8 0, ptr %71, align 2, !tbaa !20
  br label %72

72:                                               ; preds = %64, %55, %47
  %73 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.dwt_local_data_t, ptr %73, i32 0, i32 12
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %83

77:                                               ; preds = %72
  %78 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.dwt_local_data_t, ptr %78, i32 0, i32 12
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.dwt_local_data_t, ptr %81, i32 0, i32 10
  call void %80(ptr noundef %82)
  br label %83

83:                                               ; preds = %77, %72
  %84 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.dwt_local_data_t, ptr %84, i32 0, i32 6
  %86 = load i8, ptr %85, align 1, !tbaa !22
  %87 = icmp ne i8 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  call void @dwt_write8bitoffsetreg(i32 noundef 13, i32 noundef 3, i8 noundef zeroext 1)
  br label %89

89:                                               ; preds = %88, %83
  call void @llvm.lifetime.end.p0(i64 2, ptr %3) #2
  call void @llvm.lifetime.end.p0(i64 2, ptr %2) #2
  br label %90

90:                                               ; preds = %89, %0
  %91 = load i64, ptr %1, align 8, !tbaa !14
  %92 = and i64 %91, 128
  %93 = icmp ne i64 %92, 0
  br i1 %93, label %94, label %117

94:                                               ; preds = %90
  call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 248)
  %95 = load i64, ptr %1, align 8, !tbaa !14
  %96 = and i64 %95, 8
  %97 = icmp ne i64 %96, 0
  br i1 %97, label %98, label %105

98:                                               ; preds = %94
  %99 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.dwt_local_data_t, ptr %99, i32 0, i32 9
  %101 = load i8, ptr %100, align 2, !tbaa !20
  %102 = zext i8 %101 to i32
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  call void @dwt_forcetrxoff()
  call void @dwt_rxreset()
  br label %105

105:                                              ; preds = %104, %98, %94
  %106 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.dwt_local_data_t, ptr %106, i32 0, i32 11
  %108 = load ptr, ptr %107, align 8, !tbaa !23
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %116

110:                                              ; preds = %105
  %111 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.dwt_local_data_t, ptr %111, i32 0, i32 11
  %113 = load ptr, ptr %112, align 8, !tbaa !23
  %114 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.dwt_local_data_t, ptr %114, i32 0, i32 10
  call void %113(ptr noundef %115)
  br label %116

116:                                              ; preds = %110, %105
  br label %117

117:                                              ; preds = %116, %90
  %118 = load i64, ptr %1, align 8, !tbaa !14
  %119 = and i64 %118, 2228224
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %121, label %135

121:                                              ; preds = %117
  call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 131072)
  %122 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.dwt_local_data_t, ptr %122, i32 0, i32 9
  store i8 0, ptr %123, align 2, !tbaa !20
  call void @dwt_forcetrxoff()
  call void @dwt_rxreset()
  %124 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.dwt_local_data_t, ptr %124, i32 0, i32 13
  %126 = load ptr, ptr %125, align 8, !tbaa !24
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %134

128:                                              ; preds = %121
  %129 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.dwt_local_data_t, ptr %129, i32 0, i32 13
  %131 = load ptr, ptr %130, align 8, !tbaa !24
  %132 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.dwt_local_data_t, ptr %132, i32 0, i32 10
  call void %131(ptr noundef %133)
  br label %134

134:                                              ; preds = %128, %121
  br label %135

135:                                              ; preds = %134, %117
  %136 = load i64, ptr %1, align 8, !tbaa !14
  %137 = and i64 %136, 604344320
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %153

139:                                              ; preds = %135
  call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 604344320)
  %140 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.dwt_local_data_t, ptr %140, i32 0, i32 9
  store i8 0, ptr %141, align 2, !tbaa !20
  call void @dwt_forcetrxoff()
  call void @dwt_rxreset()
  %142 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.dwt_local_data_t, ptr %142, i32 0, i32 14
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %152

146:                                              ; preds = %139
  %147 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.dwt_local_data_t, ptr %147, i32 0, i32 14
  %149 = load ptr, ptr %148, align 8, !tbaa !25
  %150 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.dwt_local_data_t, ptr %150, i32 0, i32 10
  call void %149(ptr noundef %151)
  br label %152

152:                                              ; preds = %146, %139
  br label %153

153:                                              ; preds = %152, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #2
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_forcetrxoff() #1

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_rxreset() #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 56}
!10 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 17, !11, i64 24, !7, i64 32, !7, i64 33, !11, i64 40, !12, i64 48, !7, i64 50, !13, i64 56, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!11 = !{!"long", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"", !11, i64 0, !12, i64 8, !7, i64 10, !7, i64 12}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !7, i64 68}
!16 = !{!12, !12, i64 0}
!17 = !{!10, !7, i64 16}
!18 = !{!10, !12, i64 64}
!19 = !{!7, !7, i64 0}
!20 = !{!10, !7, i64 50}
!21 = !{!10, !6, i64 80}
!22 = !{!10, !7, i64 33}
!23 = !{!10, !6, i64 72}
!24 = !{!10, !6, i64 88}
!25 = !{!10, !6, i64 96}


; 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"

@pdw1000local = external hidden local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_write8bitoffsetreg(i32 noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @dwt_read16bitoffsetreg(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @dwt_read32bitoffsetreg(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_write32bitoffsetreg(i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_readfromdevice(i16 noundef zeroext, i16 noundef zeroext, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @dwt_isr() local_unnamed_addr #0 {
  %1 = tail call i64 @dwt_read32bitoffsetreg(i32 noundef 15, i32 noundef 0)
  %2 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 56
  store i64 %1, ptr %3, align 8, !tbaa !9
  %4 = and i64 %1, 16384
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %43, label %5

5:                                                ; preds = %0
  tail call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 28416)
  %6 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 68
  store i8 0, ptr %7, align 4, !tbaa !14
  %8 = tail call zeroext i16 @dwt_read16bitoffsetreg(i32 noundef 16, i32 noundef 0)
  %9 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = load i8, ptr %10, align 8, !tbaa !15
  %12 = icmp eq i8 %11, 0
  %spec.select.v = select i1 %12, i16 127, i16 1023
  %spec.select = and i16 %spec.select.v, %8
  %13 = getelementptr inbounds i8, ptr %9, i64 64
  store i16 %spec.select, ptr %13, align 8, !tbaa !16
  %.not14 = icmp sgt i16 %8, -1
  br i1 %.not14, label %18, label %14

14:                                               ; preds = %5
  %15 = getelementptr inbounds i8, ptr %9, i64 68
  %16 = load i8, ptr %15, align 4, !tbaa !14
  %17 = or i8 %16, 1
  store i8 %17, ptr %15, align 4, !tbaa !14
  br label %18

18:                                               ; preds = %14, %5
  %19 = getelementptr inbounds i8, ptr %9, i64 66
  tail call void @dwt_readfromdevice(i16 noundef zeroext 17, i16 noundef zeroext 0, i64 noundef 2, ptr noundef nonnull %19)
  %20 = and i64 %1, 8
  %.not15 = icmp eq i64 %20, 0
  %.pre = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  br i1 %.not15, label %32, label %21

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %.pre, i64 66
  %23 = load i8, ptr %22, align 2, !tbaa !17
  %24 = and i8 %23, 32
  %25 = icmp eq i8 %24, 0
  br i1 %25, label %26, label %32

26:                                               ; preds = %21
  tail call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 8)
  %27 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 56
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = and i64 %29, -9
  store i64 %30, ptr %28, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %27, i64 50
  store i8 0, ptr %31, align 2, !tbaa !18
  br label %32

32:                                               ; preds = %26, %21, %18
  %33 = phi ptr [ %27, %26 ], [ %.pre, %21 ], [ %.pre, %18 ]
  %34 = getelementptr inbounds i8, ptr %33, i64 80
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %.not16 = icmp eq ptr %35, null
  br i1 %.not16, label %38, label %36

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %33, i64 56
  tail call void %35(ptr noundef nonnull %37) #1
  %.pre26 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %36, %32
  %39 = phi ptr [ %.pre26, %36 ], [ %33, %32 ]
  %40 = getelementptr inbounds i8, ptr %39, i64 33
  %41 = load i8, ptr %40, align 1, !tbaa !20
  %.not17 = icmp eq i8 %41, 0
  br i1 %.not17, label %43, label %42

42:                                               ; preds = %38
  tail call void @dwt_write8bitoffsetreg(i32 noundef 13, i32 noundef 3, i8 noundef zeroext 1)
  br label %43

43:                                               ; preds = %38, %42, %0
  %44 = and i64 %1, 128
  %.not18 = icmp eq i64 %44, 0
  br i1 %.not18, label %57, label %45

45:                                               ; preds = %43
  tail call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 248)
  %46 = and i64 %1, 8
  %.not19 = icmp eq i64 %46, 0
  %.pre28 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  br i1 %.not19, label %51, label %47

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %.pre28, i64 50
  %49 = load i8, ptr %48, align 2, !tbaa !18
  %.not20 = icmp eq i8 %49, 0
  br i1 %.not20, label %51, label %50

50:                                               ; preds = %47
  tail call void @dwt_forcetrxoff()
  tail call void @dwt_rxreset()
  %.pre27 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %50, %47, %45
  %52 = phi ptr [ %.pre27, %50 ], [ %.pre28, %47 ], [ %.pre28, %45 ]
  %53 = getelementptr inbounds i8, ptr %52, i64 72
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  %.not21 = icmp eq ptr %54, null
  br i1 %.not21, label %57, label %55

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %52, i64 56
  tail call void %54(ptr noundef nonnull %56) #1
  br label %57

57:                                               ; preds = %51, %55, %43
  %58 = and i64 %1, 2228224
  %.not22 = icmp eq i64 %58, 0
  br i1 %.not22, label %67, label %59

59:                                               ; preds = %57
  tail call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 131072)
  %60 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 50
  store i8 0, ptr %61, align 2, !tbaa !18
  tail call void @dwt_forcetrxoff()
  tail call void @dwt_rxreset()
  %62 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 88
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %.not23 = icmp eq ptr %64, null
  br i1 %.not23, label %67, label %65

65:                                               ; preds = %59
  %66 = getelementptr inbounds i8, ptr %62, i64 56
  tail call void %64(ptr noundef nonnull %66) #1
  br label %67

67:                                               ; preds = %59, %65, %57
  %68 = and i64 %1, 604344320
  %.not24 = icmp eq i64 %68, 0
  br i1 %.not24, label %77, label %69

69:                                               ; preds = %67
  tail call void @dwt_write32bitoffsetreg(i32 noundef 15, i32 noundef 0, i64 noundef 604344320)
  %70 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 50
  store i8 0, ptr %71, align 2, !tbaa !18
  tail call void @dwt_forcetrxoff()
  tail call void @dwt_rxreset()
  %72 = load ptr, ptr @pdw1000local, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 96
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %.not25 = icmp eq ptr %74, null
  br i1 %.not25, label %77, label %75

75:                                               ; preds = %69
  %76 = getelementptr inbounds i8, ptr %72, i64 56
  tail call void %74(ptr noundef nonnull %76) #1
  br label %77

77:                                               ; preds = %69, %75, %67
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_forcetrxoff() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @dwt_rxreset() local_unnamed_addr #0

attributes #0 = { 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 #1 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 56}
!10 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 17, !11, i64 24, !7, i64 32, !7, i64 33, !11, i64 40, !12, i64 48, !7, i64 50, !13, i64 56, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!11 = !{!"long", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"", !11, i64 0, !12, i64 8, !7, i64 10, !7, i64 12}
!14 = !{!10, !7, i64 68}
!15 = !{!10, !7, i64 16}
!16 = !{!10, !12, i64 64}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !7, i64 50}
!19 = !{!10, !6, i64 80}
!20 = !{!10, !7, i64 33}
!21 = !{!10, !6, i64 72}
!22 = !{!10, !6, i64 88}
!23 = !{!10, !6, i64 96}


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