; LLVM IR from reazon-research/OpenArm :: control/canfd_control/Drivers/STM32H7xx_HAL_Driver/Src (stm32h7xx_hal_i2c)

; 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, i32, i32 }
%struct.I2C_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.I2C_TypeDef = type { i32, i32, i32, 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 }

; 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 i32 @I2C_Slave_ISR_IT(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @I2C_Disable_IRQ(ptr noundef, i16 noundef zeroext) #1

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

declare i32 @HAL_DMA_Abort_IT(ptr noundef) #2

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

17:                                               ; preds = %4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %24, label %20

20:                                               ; preds = %17
  %21 = load i16, ptr %8, align 2, !tbaa !9
  %22 = zext i16 %21 to i32
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %27

24:                                               ; preds = %20, %17
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %25, i32 0, i32 13
  store volatile i32 512, ptr %26, align 4, !tbaa !16
  store i32 1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %158

27:                                               ; preds = %20
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  call void @I2C_Disable_IRQ(ptr noundef %28, i16 noundef zeroext -32766)
  br label %29

29:                                               ; preds = %27
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %30, i32 0, i32 10
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  store i32 2, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %158

35:                                               ; preds = %29
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %36, i32 0, i32 10
  store i32 1, ptr %37, align 8, !tbaa !17
  br label %38

38:                                               ; preds = %35
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %41, i32 0, i32 11
  %43 = load volatile i32, ptr %42, align 4, !tbaa !13
  %44 = icmp eq i32 %43, 41
  br i1 %44, label %45, label %90

45:                                               ; preds = %40
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void @I2C_Disable_IRQ(ptr noundef %46, i16 noundef zeroext 1)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = getelementptr inbounds %struct.I2C_TypeDef, ptr %49, i32 0, i32 0
  %51 = load volatile i32, ptr %50, align 4, !tbaa !19
  %52 = zext i32 %51 to i64
  %53 = and i64 %52, 16384
  %54 = icmp eq i64 %53, 16384
  br i1 %54, label %55, label %89

55:                                               ; preds = %45
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds %struct.I2C_TypeDef, ptr %58, i32 0, i32 0
  %60 = load volatile i32, ptr %59, align 4, !tbaa !19
  %61 = zext i32 %60 to i64
  %62 = and i64 %61, -16385
  %63 = trunc i64 %62 to i32
  store volatile i32 %63, ptr %59, align 4, !tbaa !19
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %64, i32 0, i32 8
  %66 = load ptr, ptr %65, align 8, !tbaa !21
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %88

68:                                               ; preds = %55
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %69, i32 0, i32 8
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  %72 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %71, i32 0, i32 10
  store ptr @I2C_DMAAbort, ptr %72, align 8, !tbaa !22
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %73, i32 0, i32 8
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = call i32 @HAL_DMA_Abort_IT(ptr noundef %75)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %87

78:                                               ; preds = %68
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %79, i32 0, i32 8
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %81, i32 0, i32 10
  %83 = load ptr, ptr %82, align 8, !tbaa !22
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %84, i32 0, i32 8
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  call void %83(ptr noundef %86)
  br label %87

87:                                               ; preds = %78, %68
  br label %88

88:                                               ; preds = %87, %55
  br label %89

89:                                               ; preds = %88, %45
  br label %90

90:                                               ; preds = %89, %40
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %91, i32 0, i32 11
  store volatile i32 42, ptr %92, align 4, !tbaa !13
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %93, i32 0, i32 12
  store volatile i32 32, ptr %94, align 8, !tbaa !25
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %95, i32 0, i32 13
  store volatile i32 0, ptr %96, align 4, !tbaa !16
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = getelementptr inbounds %struct.I2C_TypeDef, ptr %99, i32 0, i32 1
  %101 = load volatile i32, ptr %100, align 4, !tbaa !26
  %102 = zext i32 %101 to i64
  %103 = and i64 %102, -32769
  %104 = trunc i64 %103 to i32
  store volatile i32 %104, ptr %100, align 4, !tbaa !26
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %106, i32 0, i32 2
  store ptr %105, ptr %107, align 8, !tbaa !27
  %108 = load i16, ptr %8, align 2, !tbaa !9
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %109, i32 0, i32 4
  store volatile i16 %108, ptr %110, align 2, !tbaa !28
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %111, i32 0, i32 4
  %113 = load volatile i16, ptr %112, align 2, !tbaa !28
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %114, i32 0, i32 3
  store i16 %113, ptr %115, align 8, !tbaa !29
  %116 = load i32, ptr %9, align 4, !tbaa !11
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %117, i32 0, i32 5
  store volatile i32 %116, ptr %118, align 4, !tbaa !30
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %119, i32 0, i32 7
  store ptr @I2C_Slave_ISR_IT, ptr %120, align 8, !tbaa !31
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !18
  %124 = getelementptr inbounds %struct.I2C_TypeDef, ptr %123, i32 0, i32 6
  %125 = load volatile i32, ptr %124, align 4, !tbaa !32
  %126 = zext i32 %125 to i64
  %127 = and i64 %126, 8
  %128 = icmp eq i64 %127, 8
  %129 = zext i1 %128 to i64
  %130 = select i1 %128, i32 1, i32 0
  store i32 %130, ptr %10, align 4, !tbaa !11
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !18
  %134 = getelementptr inbounds %struct.I2C_TypeDef, ptr %133, i32 0, i32 6
  %135 = load volatile i32, ptr %134, align 4, !tbaa !32
  %136 = zext i32 %135 to i64
  %137 = and i64 %136, 65536
  %138 = lshr i64 %137, 16
  %139 = trunc i64 %138 to i8
  %140 = zext i8 %139 to i32
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %150

142:                                              ; preds = %90
  %143 = load i32, ptr %10, align 4, !tbaa !11
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %150

145:                                              ; preds = %142
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !18
  %149 = getelementptr inbounds %struct.I2C_TypeDef, ptr %148, i32 0, i32 7
  store volatile i32 8, ptr %149, align 4, !tbaa !33
  br label %150

150:                                              ; preds = %145, %142, %90
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.__I2C_HandleTypeDef, ptr %152, i32 0, i32 10
  store i32 0, ptr %153, align 8, !tbaa !17
  br label %154

154:                                              ; preds = %151
  br label %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  call void @I2C_Enable_IRQ(ptr noundef %156, i16 noundef zeroext -32766)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %158

157:                                              ; preds = %4
  store i32 1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %158

158:                                              ; preds = %157, %155, %34, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %159 = load i32, ptr %5, align 4
  ret i32 %159
}

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


; 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 i32 @I2C_Slave_ISR_IT(ptr noundef, i32 noundef, i32 noundef) #0

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

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

declare i32 @HAL_DMA_Abort_IT(ptr noundef) local_unnamed_addr #1

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

9:                                                ; preds = %4
  %10 = icmp eq ptr %1, null
  %11 = icmp eq i16 %2, 0
  %or.cond = or i1 %10, %11
  br i1 %or.cond, label %12, label %14

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 100
  store volatile i32 512, ptr %13, align 4, !tbaa !13
  br label %60

14:                                               ; preds = %9
  tail call void @I2C_Disable_IRQ(ptr noundef nonnull %0, i16 noundef zeroext -32766)
  %15 = getelementptr inbounds i8, ptr %0, i64 88
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %60, label %18

18:                                               ; preds = %14
  store i32 1, ptr %15, align 8, !tbaa !14
  %19 = load volatile i32, ptr %5, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 41
  br i1 %20, label %21, label %37

21:                                               ; preds = %18
  tail call void @I2C_Disable_IRQ(ptr noundef nonnull %0, i16 noundef zeroext 1)
  %22 = load ptr, ptr %0, align 8, !tbaa !15
  %23 = load volatile i32, ptr %22, align 4, !tbaa !16
  %24 = and i32 %23, 16384
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %37, label %25

25:                                               ; preds = %21
  %26 = load volatile i32, ptr %22, align 4, !tbaa !16
  %27 = and i32 %26, -16385
  store volatile i32 %27, ptr %22, align 4, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %0, i64 72
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %.not41 = icmp eq ptr %29, null
  br i1 %.not41, label %37, label %30

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %29, i64 112
  store ptr @I2C_DMAAbort, ptr %31, align 8, !tbaa !19
  %32 = tail call i32 @HAL_DMA_Abort_IT(ptr noundef nonnull %29) #2
  %.not42 = icmp eq i32 %32, 0
  br i1 %.not42, label %37, label %33

33:                                               ; preds = %30
  %34 = load ptr, ptr %28, align 8, !tbaa !18
  %35 = getelementptr inbounds i8, ptr %34, i64 112
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  tail call void %36(ptr noundef %34) #2
  br label %37

37:                                               ; preds = %21, %30, %33, %25, %18
  store volatile i32 42, ptr %5, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %0, i64 96
  store volatile i32 32, ptr %38, align 8, !tbaa !22
  %39 = getelementptr inbounds i8, ptr %0, i64 100
  store volatile i32 0, ptr %39, align 4, !tbaa !13
  %40 = load ptr, ptr %0, align 8, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = load volatile i32, ptr %41, align 4, !tbaa !23
  %43 = and i32 %42, -32769
  store volatile i32 %43, ptr %41, align 4, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %1, ptr %44, align 8, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %0, i64 50
  store volatile i16 %2, ptr %45, align 2, !tbaa !25
  %46 = load volatile i16, ptr %45, align 2, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %0, i64 48
  store i16 %46, ptr %47, align 8, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %0, i64 52
  store volatile i32 %3, ptr %48, align 4, !tbaa !27
  %49 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr @I2C_Slave_ISR_IT, ptr %49, align 8, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %40, i64 24
  %51 = load volatile i32, ptr %50, align 4, !tbaa !29
  %52 = and i32 %51, 8
  %53 = icmp ne i32 %52, 0
  %54 = load volatile i32, ptr %50, align 4, !tbaa !29
  %55 = and i32 %54, 65536
  %56 = icmp eq i32 %55, 0
  %or.cond4 = select i1 %56, i1 %53, i1 false
  br i1 %or.cond4, label %57, label %59

57:                                               ; preds = %37
  %58 = getelementptr inbounds i8, ptr %40, i64 28
  store volatile i32 8, ptr %58, align 4, !tbaa !30
  br label %59

59:                                               ; preds = %37, %57
  store i32 0, ptr %15, align 8, !tbaa !14
  tail call void @I2C_Enable_IRQ(ptr noundef nonnull %0, i16 noundef zeroext -32766)
  br label %60

60:                                               ; preds = %4, %14, %59, %12
  %.0 = phi i32 [ 1, %12 ], [ 0, %59 ], [ 2, %14 ], [ 1, %4 ]
  ret i32 %.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, !11, i64 108, !11, i64 112}
!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, !7, i64 0}
!16 = !{!17, !11, i64 0}
!17 = !{!"", !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}
!18 = !{!6, !7, i64 72}
!19 = !{!20, !7, i64 112}
!20 = !{!"__DMA_HandleTypeDef", !7, i64 0, !21, 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}
!21 = !{!"", !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}
!22 = !{!6, !11, i64 96}
!23 = !{!17, !11, i64 4}
!24 = !{!6, !7, i64 40}
!25 = !{!6, !12, i64 50}
!26 = !{!6, !12, i64 48}
!27 = !{!6, !11, i64 52}
!28 = !{!6, !7, i64 64}
!29 = !{!17, !11, i64 24}
!30 = !{!17, !11, i64 28}


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