; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Drivers/STM32H7xx_HAL_Driver/Src (IT)

; 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.__SPI_HandleTypeDef = type { ptr, %struct.SPI_InitTypeDef, ptr, i16, i16, ptr, i16, i16, i32, ptr, ptr, ptr, ptr, i32, i32, i32 }
%struct.SPI_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.SPI_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, [3 x i32], i32, i32, i32, i32, i32 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_32BIT(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_16BIT(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_8BIT(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_SPI_TransmitReceive_IT(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i16, align 2
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i16 %3, ptr %9, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  br label %14

14:                                               ; preds = %4
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %15, i32 0, i32 13
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %18 = icmp eq i32 %17, 1
  br i1 %18, label %19, label %20

19:                                               ; preds = %14
  store i32 2, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %185

20:                                               ; preds = %14
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %21, i32 0, i32 13
  store i32 1, ptr %22, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %20
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %26, i32 0, i32 14
  %28 = load volatile i32, ptr %27, align 4, !tbaa !16
  store i32 %28, ptr %10, align 4, !tbaa !11
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %struct.SPI_InitTypeDef, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !17
  store i32 %32, ptr %12, align 4, !tbaa !11
  %33 = load i32, ptr %10, align 4, !tbaa !11
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %56, label %35

35:                                               ; preds = %25
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = zext i32 %36 to i64
  %38 = icmp eq i64 %37, 4194304
  br i1 %38, label %39, label %49

39:                                               ; preds = %35
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds %struct.SPI_InitTypeDef, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = zext i32 %43 to i64
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %39
  %47 = load i32, ptr %10, align 4, !tbaa !11
  %48 = icmp eq i32 %47, 4
  br i1 %48, label %56, label %49

49:                                               ; preds = %46, %39, %35
  store i32 2, ptr %11, align 4, !tbaa !11
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %51, i32 0, i32 13
  store i32 0, ptr %52, align 8, !tbaa !13
  br label %53

53:                                               ; preds = %50
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %55, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %185

56:                                               ; preds = %46, %25
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = icmp eq ptr %57, null
  br i1 %58, label %66, label %59

59:                                               ; preds = %56
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = icmp eq ptr %60, null
  br i1 %61, label %66, label %62

62:                                               ; preds = %59
  %63 = load i16, ptr %9, align 2, !tbaa !9
  %64 = zext i16 %63 to i64
  %65 = icmp eq i64 %64, 0
  br i1 %65, label %66, label %73

66:                                               ; preds = %62, %59, %56
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %68, i32 0, i32 13
  store i32 0, ptr %69, align 8, !tbaa !13
  br label %70

70:                                               ; preds = %67
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %72, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %185

73:                                               ; preds = %62
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %74, i32 0, i32 14
  %76 = load volatile i32, ptr %75, align 4, !tbaa !16
  %77 = icmp ne i32 %76, 4
  br i1 %77, label %78, label %81

78:                                               ; preds = %73
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %79, i32 0, i32 14
  store volatile i32 5, ptr %80, align 4, !tbaa !16
  br label %81

81:                                               ; preds = %78, %73
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %82, i32 0, i32 15
  store volatile i32 0, ptr %83, align 8, !tbaa !19
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %85, i32 0, i32 2
  store ptr %84, ptr %86, align 8, !tbaa !20
  %87 = load i16, ptr %9, align 2, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %88, i32 0, i32 3
  store i16 %87, ptr %89, align 8, !tbaa !21
  %90 = load i16, ptr %9, align 2, !tbaa !9
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %91, i32 0, i32 4
  store volatile i16 %90, ptr %92, align 2, !tbaa !22
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %94, i32 0, i32 5
  store ptr %93, ptr %95, align 8, !tbaa !23
  %96 = load i16, ptr %9, align 2, !tbaa !9
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %97, i32 0, i32 6
  store i16 %96, ptr %98, align 8, !tbaa !24
  %99 = load i16, ptr %9, align 2, !tbaa !9
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %100, i32 0, i32 7
  store volatile i16 %99, ptr %101, align 2, !tbaa !25
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %struct.SPI_InitTypeDef, ptr %103, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !26
  %106 = zext i32 %105 to i64
  %107 = icmp ugt i64 %106, 15
  br i1 %107, label %108, label %113

108:                                              ; preds = %81
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %109, i32 0, i32 10
  store ptr @SPI_TxISR_32BIT, ptr %110, align 8, !tbaa !27
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %111, i32 0, i32 9
  store ptr @SPI_RxISR_32BIT, ptr %112, align 8, !tbaa !28
  br label %131

113:                                              ; preds = %81
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds %struct.SPI_InitTypeDef, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 8, !tbaa !26
  %118 = zext i32 %117 to i64
  %119 = icmp ugt i64 %118, 7
  br i1 %119, label %120, label %125

120:                                              ; preds = %113
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %121, i32 0, i32 9
  store ptr @SPI_RxISR_16BIT, ptr %122, align 8, !tbaa !28
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %123, i32 0, i32 10
  store ptr @SPI_TxISR_16BIT, ptr %124, align 8, !tbaa !27
  br label %130

125:                                              ; preds = %113
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %126, i32 0, i32 9
  store ptr @SPI_RxISR_8BIT, ptr %127, align 8, !tbaa !28
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %128, i32 0, i32 10
  store ptr @SPI_TxISR_8BIT, ptr %129, align 8, !tbaa !27
  br label %130

130:                                              ; preds = %125, %120
  br label %131

131:                                              ; preds = %130, %108
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !29
  %135 = getelementptr inbounds %struct.SPI_TypeDef, ptr %134, i32 0, i32 1
  %136 = load volatile i32, ptr %135, align 4, !tbaa !30
  %137 = zext i32 %136 to i64
  %138 = and i64 %137, -65536
  %139 = load i16, ptr %9, align 2, !tbaa !9
  %140 = zext i16 %139 to i64
  %141 = or i64 %138, %140
  %142 = trunc i64 %141 to i32
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !29
  %146 = getelementptr inbounds %struct.SPI_TypeDef, ptr %145, i32 0, i32 1
  store volatile i32 %142, ptr %146, align 4, !tbaa !30
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !29
  %150 = getelementptr inbounds %struct.SPI_TypeDef, ptr %149, i32 0, i32 0
  %151 = load volatile i32, ptr %150, align 4, !tbaa !32
  %152 = zext i32 %151 to i64
  %153 = or i64 %152, 1
  %154 = trunc i64 %153 to i32
  store volatile i32 %154, ptr %150, align 4, !tbaa !32
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !29
  %158 = getelementptr inbounds %struct.SPI_TypeDef, ptr %157, i32 0, i32 4
  %159 = load volatile i32, ptr %158, align 4, !tbaa !33
  %160 = zext i32 %159 to i64
  %161 = or i64 %160, 1903
  %162 = trunc i64 %161 to i32
  store volatile i32 %162, ptr %158, align 4, !tbaa !33
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %163, i32 0, i32 1
  %165 = getelementptr inbounds %struct.SPI_InitTypeDef, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 8, !tbaa !17
  %167 = zext i32 %166 to i64
  %168 = icmp eq i64 %167, 4194304
  br i1 %168, label %169, label %178

169:                                              ; preds = %131
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !29
  %173 = getelementptr inbounds %struct.SPI_TypeDef, ptr %172, i32 0, i32 0
  %174 = load volatile i32, ptr %173, align 4, !tbaa !32
  %175 = zext i32 %174 to i64
  %176 = or i64 %175, 512
  %177 = trunc i64 %176 to i32
  store volatile i32 %177, ptr %173, align 4, !tbaa !32
  br label %178

178:                                              ; preds = %169, %131
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.__SPI_HandleTypeDef, ptr %180, i32 0, i32 13
  store i32 0, ptr %181, align 8, !tbaa !13
  br label %182

182:                                              ; preds = %179
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %184, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %185

185:                                              ; preds = %183, %71, %54, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  %186 = load i32, ptr %5, align 4
  ret i32 %186
}

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_32BIT(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_16BIT(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_8BIT(ptr noundef) #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, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 160}
!14 = !{!"__SPI_HandleTypeDef", !6, i64 0, !15, i64 8, !6, i64 96, !10, i64 104, !10, i64 106, !6, i64 112, !10, i64 120, !10, i64 122, !12, i64 124, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !12, i64 160, !12, i64 164, !12, i64 168}
!15 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84}
!16 = !{!14, !12, i64 164}
!17 = !{!14, !12, i64 8}
!18 = !{!14, !12, i64 12}
!19 = !{!14, !12, i64 168}
!20 = !{!14, !6, i64 96}
!21 = !{!14, !10, i64 104}
!22 = !{!14, !10, i64 106}
!23 = !{!14, !6, i64 112}
!24 = !{!14, !10, i64 120}
!25 = !{!14, !10, i64 122}
!26 = !{!14, !12, i64 16}
!27 = !{!14, !6, i64 136}
!28 = !{!14, !6, i64 128}
!29 = !{!14, !6, i64 0}
!30 = !{!31, !12, i64 4}
!31 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !7, i64 36, !12, i64 48, !7, i64 52, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80}
!32 = !{!31, !12, i64 0}
!33 = !{!31, !12, i64 16}


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

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_32BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @SPI_TxISR_8BIT(ptr noundef) #0

; Function Attrs: nofree norecurse nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_SPI_TransmitReceive_IT(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %0, i64 160
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %65, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 164
  %10 = load volatile i32, ptr %9, align 4, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = icmp eq i32 %10, 1
  br i1 %12, label %21, label %13

13:                                               ; preds = %8
  %14 = load i32, ptr %11, align 8, !tbaa !14
  %15 = icmp eq i32 %14, 4194304
  br i1 %15, label %16, label %.sink.split

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %0, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !15
  %19 = icmp eq i32 %18, 0
  %20 = icmp eq i32 %10, 4
  %or.cond = and i1 %20, %19
  br i1 %or.cond, label %21, label %.sink.split

21:                                               ; preds = %16, %8
  %22 = icmp eq ptr %1, null
  %23 = icmp eq ptr %2, null
  %or.cond3 = or i1 %22, %23
  %24 = icmp eq i16 %3, 0
  %or.cond6 = or i1 %or.cond3, %24
  br i1 %or.cond6, label %.sink.split, label %25

25:                                               ; preds = %21
  %26 = load volatile i32, ptr %9, align 4, !tbaa !13
  %.not = icmp eq i32 %26, 4
  br i1 %.not, label %28, label %27

27:                                               ; preds = %25
  store volatile i32 5, ptr %9, align 4, !tbaa !13
  br label %28

28:                                               ; preds = %27, %25
  %29 = getelementptr inbounds i8, ptr %0, i64 168
  store volatile i32 0, ptr %29, align 8, !tbaa !16
  %30 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %1, ptr %30, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %0, i64 104
  store i16 %3, ptr %31, align 8, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %0, i64 106
  store volatile i16 %3, ptr %32, align 2, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %2, ptr %33, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %0, i64 120
  store i16 %3, ptr %34, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %0, i64 122
  store volatile i16 %3, ptr %35, align 2, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load i32, ptr %36, align 8, !tbaa !23
  %38 = icmp ugt i32 %37, 15
  br i1 %38, label %39, label %42

39:                                               ; preds = %28
  %40 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr @SPI_TxISR_32BIT, ptr %40, align 8, !tbaa !24
  %41 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr @SPI_RxISR_32BIT, ptr %41, align 8, !tbaa !25
  br label %48

42:                                               ; preds = %28
  %43 = icmp ugt i32 %37, 7
  %44 = getelementptr inbounds i8, ptr %0, i64 128
  %45 = getelementptr inbounds i8, ptr %0, i64 136
  br i1 %43, label %46, label %47

46:                                               ; preds = %42
  store ptr @SPI_RxISR_16BIT, ptr %44, align 8, !tbaa !25
  store ptr @SPI_TxISR_16BIT, ptr %45, align 8, !tbaa !24
  br label %48

47:                                               ; preds = %42
  store ptr @SPI_RxISR_8BIT, ptr %44, align 8, !tbaa !25
  store ptr @SPI_TxISR_8BIT, ptr %45, align 8, !tbaa !24
  br label %48

48:                                               ; preds = %46, %47, %39
  %49 = load ptr, ptr %0, align 8, !tbaa !26
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %51 = load volatile i32, ptr %50, align 4, !tbaa !27
  %52 = and i32 %51, -65536
  %53 = zext i16 %3 to i32
  %54 = or disjoint i32 %52, %53
  store volatile i32 %54, ptr %50, align 4, !tbaa !27
  %55 = load volatile i32, ptr %49, align 4, !tbaa !29
  %56 = or i32 %55, 1
  store volatile i32 %56, ptr %49, align 4, !tbaa !29
  %57 = getelementptr inbounds i8, ptr %49, i64 16
  %58 = load volatile i32, ptr %57, align 4, !tbaa !30
  %59 = or i32 %58, 1903
  store volatile i32 %59, ptr %57, align 4, !tbaa !30
  %60 = load i32, ptr %11, align 8, !tbaa !14
  %61 = icmp eq i32 %60, 4194304
  br i1 %61, label %62, label %.sink.split

62:                                               ; preds = %48
  %63 = load volatile i32, ptr %49, align 4, !tbaa !29
  %64 = or i32 %63, 512
  store volatile i32 %64, ptr %49, align 4, !tbaa !29
  br label %.sink.split

.sink.split:                                      ; preds = %62, %48, %21, %13, %16
  %.0.ph = phi i32 [ 2, %16 ], [ 2, %13 ], [ 1, %21 ], [ 0, %48 ], [ 0, %62 ]
  store i32 0, ptr %5, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %.sink.split, %4
  %.0 = phi i32 [ 2, %4 ], [ %.0.ph, %.sink.split ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_32BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @SPI_RxISR_8BIT(ptr noundef) #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 = { nofree norecurse 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" }

!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, !11, i64 160}
!6 = !{!"__SPI_HandleTypeDef", !7, i64 0, !10, i64 8, !7, i64 96, !12, i64 104, !12, i64 106, !7, i64 112, !12, i64 120, !12, i64 122, !11, i64 124, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !11, i64 160, !11, i64 164, !11, i64 168}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !11, i64 164}
!14 = !{!6, !11, i64 8}
!15 = !{!6, !11, i64 12}
!16 = !{!6, !11, i64 168}
!17 = !{!6, !7, i64 96}
!18 = !{!6, !12, i64 104}
!19 = !{!6, !12, i64 106}
!20 = !{!6, !7, i64 112}
!21 = !{!6, !12, i64 120}
!22 = !{!6, !12, i64 122}
!23 = !{!6, !11, i64 16}
!24 = !{!6, !7, i64 136}
!25 = !{!6, !7, i64 128}
!26 = !{!6, !7, i64 0}
!27 = !{!28, !11, i64 4}
!28 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !8, i64 36, !11, i64 48, !8, i64 52, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80}
!29 = !{!28, !11, i64 0}
!30 = !{!28, !11, i64 16}


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