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

; 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.__I2C_HandleTypeDef = type { ptr, %struct.I2C_InitTypeDef, ptr, i16, i16, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.I2C_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.__DMA_HandleTypeDef = type { ptr, %struct.DMA_InitTypeDef, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32 }
%struct.DMA_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.I2C_TypeDef = type { i32, i32, i32, i32, i32, 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 @I2C_Enable_IRQ(ptr noundef, i16 noundef zeroext) #1

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

declare i32 @HAL_DMA_Start_IT(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @I2C_Slave_ISR_DMA(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_I2C_Slave_Receive_DMA(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i16 %2, ptr %7, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %10, i32 0, i32 11
  %12 = load volatile i32, ptr %11, align 4, !tbaa !11
  %13 = icmp eq i32 %12, 32
  br i1 %13, label %14, label %149

14:                                               ; preds = %3
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %21, label %17

17:                                               ; preds = %14
  %18 = load i16, ptr %7, align 2, !tbaa !9
  %19 = zext i16 %18 to i32
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %24

21:                                               ; preds = %17, %14
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %22, i32 0, i32 13
  store volatile i32 512, ptr %23, align 4, !tbaa !15
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

24:                                               ; preds = %17
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %26, i32 0, i32 10
  %28 = load i32, ptr %27, align 8, !tbaa !16
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %31

30:                                               ; preds = %25
  store i32 2, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

31:                                               ; preds = %25
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %32, i32 0, i32 10
  store i32 1, ptr %33, align 8, !tbaa !16
  br label %34

34:                                               ; preds = %31
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %37, i32 0, i32 11
  store volatile i32 34, ptr %38, align 4, !tbaa !11
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %39, i32 0, i32 12
  store volatile i32 32, ptr %40, align 8, !tbaa !17
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %41, i32 0, i32 13
  store volatile i32 0, ptr %42, align 4, !tbaa !15
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %44, i32 0, i32 2
  store ptr %43, ptr %45, align 8, !tbaa !18
  %46 = load i16, ptr %7, align 2, !tbaa !9
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %47, i32 0, i32 4
  store volatile i16 %46, ptr %48, align 2, !tbaa !19
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %49, i32 0, i32 4
  %51 = load volatile i16, ptr %50, align 2, !tbaa !19
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %52, i32 0, i32 3
  store i16 %51, ptr %53, align 8, !tbaa !20
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %54, i32 0, i32 5
  store volatile i32 -65536, ptr %55, align 4, !tbaa !21
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %56, i32 0, i32 7
  store ptr @I2C_Slave_ISR_DMA, ptr %57, align 8, !tbaa !22
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %58, i32 0, i32 9
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %94

62:                                               ; preds = %36
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %63, i32 0, i32 9
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  %66 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %65, i32 0, i32 5
  store ptr @I2C_DMASlaveReceiveCplt, ptr %66, align 8, !tbaa !24
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %67, i32 0, i32 9
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  %70 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %69, i32 0, i32 9
  store ptr @I2C_DMAError, ptr %70, align 8, !tbaa !27
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %71, i32 0, i32 9
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  %74 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %73, i32 0, i32 6
  store ptr null, ptr %74, align 8, !tbaa !28
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %75, i32 0, i32 9
  %77 = load ptr, ptr %76, align 8, !tbaa !23
  %78 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %77, i32 0, i32 10
  store ptr null, ptr %78, align 8, !tbaa !29
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %79, i32 0, i32 9
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !30
  %85 = getelementptr inbounds %struct.I2C_TypeDef, ptr %84, i32 0, i32 9
  %86 = ptrtoint ptr %85 to i32
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = ptrtoint ptr %87 to i32
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %89, i32 0, i32 3
  %91 = load i16, ptr %90, align 8, !tbaa !20
  %92 = zext i16 %91 to i32
  %93 = call i32 @HAL_DMA_Start_IT(ptr noundef %81, i32 noundef %86, i32 noundef %88, i32 noundef %92)
  store i32 %93, ptr %8, align 4, !tbaa !31
  br label %108

94:                                               ; preds = %36
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %95, i32 0, i32 11
  store volatile i32 40, ptr %96, align 4, !tbaa !11
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %97, i32 0, i32 12
  store volatile i32 0, ptr %98, align 8, !tbaa !17
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %99, i32 0, i32 13
  %101 = load volatile i32, ptr %100, align 4, !tbaa !15
  %102 = or i32 %101, 128
  store volatile i32 %102, ptr %100, align 4, !tbaa !15
  br label %103

103:                                              ; preds = %94
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %104, i32 0, i32 10
  store i32 0, ptr %105, align 8, !tbaa !16
  br label %106

106:                                              ; preds = %103
  br label %107

107:                                              ; preds = %106
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

108:                                              ; preds = %62
  %109 = load i32, ptr %8, align 4, !tbaa !31
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %134

111:                                              ; preds = %108
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !30
  %115 = getelementptr inbounds %struct.I2C_TypeDef, ptr %114, i32 0, i32 1
  %116 = load volatile i32, ptr %115, align 4, !tbaa !32
  %117 = zext i32 %116 to i64
  %118 = and i64 %117, -32769
  %119 = trunc i64 %118 to i32
  store volatile i32 %119, ptr %115, align 4, !tbaa !32
  br label %120

120:                                              ; preds = %111
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %121, i32 0, i32 10
  store i32 0, ptr %122, align 8, !tbaa !16
  br label %123

123:                                              ; preds = %120
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  call void @I2C_Enable_IRQ(ptr noundef %125, i16 noundef zeroext 4)
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  %129 = getelementptr inbounds %struct.I2C_TypeDef, ptr %128, i32 0, i32 0
  %130 = load volatile i32, ptr %129, align 4, !tbaa !34
  %131 = zext i32 %130 to i64
  %132 = or i64 %131, 32768
  %133 = trunc i64 %132 to i32
  store volatile i32 %133, ptr %129, align 4, !tbaa !34
  br label %148

134:                                              ; preds = %108
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %135, i32 0, i32 11
  store volatile i32 40, ptr %136, align 4, !tbaa !11
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %137, i32 0, i32 12
  store volatile i32 0, ptr %138, align 8, !tbaa !17
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %139, i32 0, i32 13
  %141 = load volatile i32, ptr %140, align 4, !tbaa !15
  %142 = or i32 %141, 16
  store volatile i32 %142, ptr %140, align 4, !tbaa !15
  br label %143

143:                                              ; preds = %134
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %144, i32 0, i32 10
  store i32 0, ptr %145, align 8, !tbaa !16
  br label %146

146:                                              ; preds = %143
  br label %147

147:                                              ; preds = %146
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

148:                                              ; preds = %124
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

149:                                              ; preds = %3
  store i32 2, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %150

150:                                              ; preds = %149, %148, %147, %107, %30, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %151 = load i32, ptr %4, align 4
  ret i32 %151
}

; Function Attrs: nounwind uwtable
declare hidden void @I2C_DMASlaveReceiveCplt(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 = { "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 = { 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, !14, i64 92}
!12 = !{!"__I2C_HandleTypeDef", !6, i64 0, !13, i64 8, !6, i64 40, !10, i64 48, !10, i64 50, !14, i64 52, !14, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104}
!13 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !14, i64 100}
!16 = !{!12, !14, i64 88}
!17 = !{!12, !14, i64 96}
!18 = !{!12, !6, i64 40}
!19 = !{!12, !10, i64 50}
!20 = !{!12, !10, i64 48}
!21 = !{!12, !14, i64 52}
!22 = !{!12, !6, i64 64}
!23 = !{!12, !6, i64 80}
!24 = !{!25, !6, i64 72}
!25 = !{!"__DMA_HandleTypeDef", !6, i64 0, !26, i64 8, !14, i64 56, !14, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !14, i64 120, !14, i64 124, !14, i64 128, !6, i64 136, !6, i64 144, !14, i64 152, !6, i64 160, !6, i64 168, !14, i64 176}
!26 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44}
!27 = !{!25, !6, i64 104}
!28 = !{!25, !6, i64 80}
!29 = !{!25, !6, i64 112}
!30 = !{!12, !6, i64 0}
!31 = !{!14, !14, i64 0}
!32 = !{!33, !14, i64 4}
!33 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40}
!34 = !{!33, !14, i64 0}


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

; Function Attrs: nounwind uwtable
declare hidden void @I2C_Enable_IRQ(ptr noundef, i16 noundef zeroext) local_unnamed_addr #0

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

declare i32 @HAL_DMA_Start_IT(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @I2C_Slave_ISR_DMA(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_I2C_Slave_Receive_DMA(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 92
  %5 = load volatile i32, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 32
  br i1 %6, label %7, label %55

7:                                                ; preds = %3
  %8 = icmp eq ptr %1, null
  %9 = icmp eq i16 %2, 0
  %or.cond = or i1 %8, %9
  br i1 %or.cond, label %10, label %12

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 100
  store volatile i32 512, ptr %11, align 4, !tbaa !13
  br label %55

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %0, i64 88
  %14 = load i32, ptr %13, align 8, !tbaa !14
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %55, label %16

16:                                               ; preds = %12
  store i32 1, ptr %13, align 8, !tbaa !14
  store volatile i32 34, ptr %4, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 96
  store volatile i32 32, ptr %17, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %0, i64 100
  store volatile i32 0, ptr %18, align 4, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %1, ptr %19, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 50
  store volatile i16 %2, ptr %20, align 2, !tbaa !17
  %21 = load volatile i16, ptr %20, align 2, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  store i16 %21, ptr %22, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %0, i64 52
  store volatile i32 -65536, ptr %23, align 4, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr @I2C_Slave_ISR_DMA, ptr %24, align 8, !tbaa !20
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  %26 = load ptr, ptr %25, align 8, !tbaa !21
  %.not = icmp eq ptr %26, null
  br i1 %.not, label %41, label %27

27:                                               ; preds = %16
  %28 = getelementptr inbounds i8, ptr %26, i64 72
  store ptr @I2C_DMASlaveReceiveCplt, ptr %28, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %26, i64 104
  store ptr @I2C_DMAError, ptr %29, align 8, !tbaa !25
  %30 = getelementptr inbounds i8, ptr %26, i64 80
  store ptr null, ptr %30, align 8, !tbaa !26
  %31 = getelementptr inbounds i8, ptr %26, i64 112
  store ptr null, ptr %31, align 8, !tbaa !27
  %32 = load ptr, ptr %0, align 8, !tbaa !28
  %33 = getelementptr inbounds i8, ptr %32, i64 36
  %34 = ptrtoint ptr %33 to i64
  %35 = trunc i64 %34 to i32
  %36 = ptrtoint ptr %1 to i64
  %37 = trunc i64 %36 to i32
  %38 = zext i16 %21 to i32
  %39 = tail call i32 @HAL_DMA_Start_IT(ptr noundef nonnull %26, i32 noundef %35, i32 noundef %37, i32 noundef %38) #2
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %44, label %52

41:                                               ; preds = %16
  store volatile i32 40, ptr %4, align 4, !tbaa !5
  store volatile i32 0, ptr %17, align 8, !tbaa !15
  %42 = load volatile i32, ptr %18, align 4, !tbaa !13
  %43 = or i32 %42, 128
  store volatile i32 %43, ptr %18, align 4, !tbaa !13
  store i32 0, ptr %13, align 8, !tbaa !14
  br label %55

44:                                               ; preds = %27
  %45 = load ptr, ptr %0, align 8, !tbaa !28
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  %47 = load volatile i32, ptr %46, align 4, !tbaa !29
  %48 = and i32 %47, -32769
  store volatile i32 %48, ptr %46, align 4, !tbaa !29
  store i32 0, ptr %13, align 8, !tbaa !14
  tail call void @I2C_Enable_IRQ(ptr noundef nonnull %0, i16 noundef zeroext 4)
  %49 = load ptr, ptr %0, align 8, !tbaa !28
  %50 = load volatile i32, ptr %49, align 4, !tbaa !31
  %51 = or i32 %50, 32768
  store volatile i32 %51, ptr %49, align 4, !tbaa !31
  br label %55

52:                                               ; preds = %27
  store volatile i32 40, ptr %4, align 4, !tbaa !5
  store volatile i32 0, ptr %17, align 8, !tbaa !15
  %53 = load volatile i32, ptr %18, align 4, !tbaa !13
  %54 = or i32 %53, 16
  store volatile i32 %54, ptr %18, align 4, !tbaa !13
  store i32 0, ptr %13, align 8, !tbaa !14
  br label %55

55:                                               ; preds = %3, %12, %44, %52, %41, %10
  %.0 = phi i32 [ 1, %10 ], [ 0, %44 ], [ 1, %52 ], [ 1, %41 ], [ 2, %12 ], [ 2, %3 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @I2C_DMASlaveReceiveCplt(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 = { "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, !11, i64 92}
!6 = !{!"__I2C_HandleTypeDef", !7, i64 0, !10, i64 8, !7, i64 40, !12, i64 48, !12, i64 50, !11, i64 52, !11, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104}
!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 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !11, i64 100}
!14 = !{!6, !11, i64 88}
!15 = !{!6, !11, i64 96}
!16 = !{!6, !7, i64 40}
!17 = !{!6, !12, i64 50}
!18 = !{!6, !12, i64 48}
!19 = !{!6, !11, i64 52}
!20 = !{!6, !7, i64 64}
!21 = !{!6, !7, i64 80}
!22 = !{!23, !7, i64 72}
!23 = !{!"__DMA_HandleTypeDef", !7, i64 0, !24, i64 8, !11, i64 56, !11, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 124, !11, i64 128, !7, i64 136, !7, i64 144, !11, i64 152, !7, i64 160, !7, i64 168, !11, i64 176}
!24 = !{!"", !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}
!25 = !{!23, !7, i64 104}
!26 = !{!23, !7, i64 80}
!27 = !{!23, !7, i64 112}
!28 = !{!6, !7, i64 0}
!29 = !{!30, !11, i64 4}
!30 = !{!"", !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}
!31 = !{!30, !11, i64 0}


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