; 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.ADC_HandleTypeDef = type { ptr, %struct.ADC_InitTypeDef, ptr, i32, i32, i32, %struct.ADC_InjectionConfigTypeDef }
%struct.ADC_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.ADC_OversamplingTypeDef }
%struct.ADC_OversamplingTypeDef = type { i32, i32, i32, i32 }
%struct.ADC_InjectionConfigTypeDef = type { 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.ADC_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], i32, i32, i32, i32, [4 x i32], i32, i32, i32, i32, [4 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.ADC_Common_TypeDef = type { 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

declare i32 @ADC_Enable(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_MultiModeStart_DMA(ptr noundef %0, ptr noundef %1, i32 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.ADC_HandleTypeDef, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 120, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %14)
  %16 = zext i32 %15 to i64
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %3
  store i32 2, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %142

19:                                               ; preds = %3
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %21, i32 0, i32 3
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  store i32 2, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %142

26:                                               ; preds = %20
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %27, i32 0, i32 3
  store i32 1, ptr %28, align 8, !tbaa !16
  br label %29

29:                                               ; preds = %26
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = icmp eq ptr %34, inttoptr (i64 1073881088 to ptr)
  br i1 %35, label %36, label %38

36:                                               ; preds = %31
  %37 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %9, i32 0, i32 0
  store ptr inttoptr (i64 1073881344 to ptr), ptr %37, align 8, !tbaa !11
  br label %40

38:                                               ; preds = %31
  %39 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %9, i32 0, i32 0
  store ptr null, ptr %39, align 8, !tbaa !11
  br label %40

40:                                               ; preds = %38, %36
  %41 = phi ptr [ inttoptr (i64 1073881344 to ptr), %36 ], [ null, %38 ]
  %42 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %9, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %57

45:                                               ; preds = %40
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %46, i32 0, i32 4
  %48 = load volatile i32, ptr %47, align 4, !tbaa !17
  %49 = zext i32 %48 to i64
  %50 = or i64 %49, 32
  %51 = trunc i64 %50 to i32
  store volatile i32 %51, ptr %47, align 4, !tbaa !17
  br label %52

52:                                               ; preds = %45
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %53, i32 0, i32 3
  store i32 0, ptr %54, align 8, !tbaa !16
  br label %55

55:                                               ; preds = %52
  br label %56

56:                                               ; preds = %55
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %142

57:                                               ; preds = %40
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call i32 @ADC_Enable(ptr noundef %58)
  store i32 %59, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = call i32 @ADC_Enable(ptr noundef %9)
  store i32 %63, ptr %8, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %62, %57
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %134

67:                                               ; preds = %64
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %68, i32 0, i32 4
  %70 = load volatile i32, ptr %69, align 4, !tbaa !17
  %71 = zext i32 %70 to i64
  %72 = and i64 %71, -3586
  %73 = or i64 %72, 256
  %74 = trunc i64 %73 to i32
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %75, i32 0, i32 4
  store volatile i32 %74, ptr %76, align 4, !tbaa !17
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %77, i32 0, i32 5
  store volatile i32 0, ptr %78, align 8, !tbaa !18
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %81, i32 0, i32 5
  store ptr @ADC_DMAConvCplt, ptr %82, align 8, !tbaa !20
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %85, i32 0, i32 6
  store ptr @ADC_DMAHalfConvCplt, ptr %86, align 8, !tbaa !23
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %87, i32 0, i32 2
  %89 = load ptr, ptr %88, align 8, !tbaa !19
  %90 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %89, i32 0, i32 9
  store ptr @ADC_DMAError, ptr %90, align 8, !tbaa !24
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = icmp eq ptr %93, inttoptr (i64 1073881088 to ptr)
  br i1 %94, label %100, label %95

95:                                               ; preds = %67
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = icmp eq ptr %98, inttoptr (i64 1073881344 to ptr)
  br label %100

100:                                              ; preds = %95, %67
  %101 = phi i1 [ true, %67 ], [ %99, %95 ]
  %102 = zext i1 %101 to i64
  %103 = select i1 %101, ptr inttoptr (i64 1073881856 to ptr), ptr inttoptr (i64 1476551424 to ptr)
  store ptr %103, ptr %10, align 8, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  %107 = getelementptr inbounds %struct.ADC_TypeDef, ptr %106, i32 0, i32 0
  store volatile i32 28, ptr %107, align 4, !tbaa !25
  br label %108

108:                                              ; preds = %100
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %109, i32 0, i32 3
  store i32 0, ptr %110, align 8, !tbaa !16
  br label %111

111:                                              ; preds = %108
  br label %112

112:                                              ; preds = %111
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.ADC_TypeDef, ptr %115, i32 0, i32 1
  %117 = load volatile i32, ptr %116, align 4, !tbaa !27
  %118 = zext i32 %117 to i64
  %119 = or i64 %118, 16
  %120 = trunc i64 %119 to i32
  store volatile i32 %120, ptr %116, align 4, !tbaa !27
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !19
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ADC_Common_TypeDef, ptr %124, i32 0, i32 3
  %126 = ptrtoint ptr %125 to i32
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = ptrtoint ptr %127 to i32
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = call i32 @HAL_DMA_Start_IT(ptr noundef %123, i32 noundef %126, i32 noundef %128, i32 noundef %129)
  store i32 %130, ptr %8, align 4, !tbaa !9
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !11
  call void @LL_ADC_REG_StartConversion(ptr noundef %133)
  br label %140

134:                                              ; preds = %64
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %136, i32 0, i32 3
  store i32 0, ptr %137, align 8, !tbaa !16
  br label %138

138:                                              ; preds = %135
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139, %112
  %141 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %141, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %142

142:                                              ; preds = %140, %56, %25, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %143 = load i32, ptr %4, align 4
  ret i32 %143
}

declare void @ADC_DMAConvCplt(ptr noundef) #1

declare void @ADC_DMAHalfConvCplt(ptr noundef) #1

declare void @ADC_DMAError(ptr noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @LL_ADC_REG_StartConversion(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !13, i64 8, !6, i64 88, !10, i64 96, !10, i64 100, !10, i64 104, !15, i64 108}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !14, i64 60}
!14 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!15 = !{!"", !10, i64 0, !10, i64 4}
!16 = !{!12, !10, i64 96}
!17 = !{!12, !10, i64 100}
!18 = !{!12, !10, i64 104}
!19 = !{!12, !6, i64 88}
!20 = !{!21, !6, i64 72}
!21 = !{!"__DMA_HandleTypeDef", !6, i64 0, !22, i64 8, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !10, i64 124, !10, i64 128, !6, i64 136, !6, i64 144, !10, i64 152, !6, i64 160, !6, i64 168, !10, i64 176}
!22 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!23 = !{!21, !6, i64 80}
!24 = !{!21, !6, i64 104}
!25 = !{!26, !10, i64 0}
!26 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !7, i64 112, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !7, i64 144, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200}
!27 = !{!26, !10, i64 4}


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

%struct.ADC_HandleTypeDef = type { ptr, %struct.ADC_InitTypeDef, ptr, i32, i32, i32, %struct.ADC_InjectionConfigTypeDef }
%struct.ADC_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.ADC_OversamplingTypeDef }
%struct.ADC_OversamplingTypeDef = type { i32, i32, i32, i32 }
%struct.ADC_InjectionConfigTypeDef = type { i32, i32 }

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

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

declare i32 @ADC_Enable(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_MultiModeStart_DMA(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct.ADC_HandleTypeDef, align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #4
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = tail call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %5)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %46

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  %9 = load i32, ptr %8, align 8, !tbaa !14
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %46, label %11

11:                                               ; preds = %7
  store i32 1, ptr %8, align 8, !tbaa !14
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %.not30 = icmp eq ptr %12, inttoptr (i64 1073881088 to ptr)
  %. = select i1 %.not30, ptr inttoptr (i64 1073881344 to ptr), ptr null
  store ptr %., ptr %4, align 8, !tbaa !5
  br i1 %.not30, label %17, label %13

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 100
  %15 = load volatile i32, ptr %14, align 4, !tbaa !15
  %16 = or i32 %15, 32
  store volatile i32 %16, ptr %14, align 4, !tbaa !15
  store i32 0, ptr %8, align 8, !tbaa !14
  br label %46

17:                                               ; preds = %11
  %18 = tail call i32 @ADC_Enable(ptr noundef nonnull %0) #4
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %.thread

20:                                               ; preds = %17
  %21 = call i32 @ADC_Enable(ptr noundef nonnull %4) #4
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %.thread

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 100
  %25 = load volatile i32, ptr %24, align 4, !tbaa !15
  %26 = and i32 %25, -3842
  %27 = or disjoint i32 %26, 256
  store volatile i32 %27, ptr %24, align 4, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %0, i64 104
  store volatile i32 0, ptr %28, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %30, i64 72
  store ptr @ADC_DMAConvCplt, ptr %31, align 8, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %30, i64 80
  store ptr @ADC_DMAHalfConvCplt, ptr %32, align 8, !tbaa !21
  %33 = getelementptr inbounds i8, ptr %30, i64 104
  store ptr @ADC_DMAError, ptr %33, align 8, !tbaa !22
  %34 = load ptr, ptr %0, align 8, !tbaa !5
  %35 = icmp eq ptr %34, inttoptr (i64 1073881088 to ptr)
  %36 = icmp eq ptr %34, inttoptr (i64 1073881344 to ptr)
  %37 = or i1 %35, %36
  %38 = select i1 %37, i32 1073881868, i32 1476551436
  store volatile i32 28, ptr %34, align 4, !tbaa !23
  store i32 0, ptr %8, align 8, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %34, i64 4
  %40 = load volatile i32, ptr %39, align 4, !tbaa !25
  %41 = or i32 %40, 16
  store volatile i32 %41, ptr %39, align 4, !tbaa !25
  %42 = ptrtoint ptr %1 to i64
  %43 = trunc i64 %42 to i32
  %44 = call i32 @HAL_DMA_Start_IT(ptr noundef %30, i32 noundef %38, i32 noundef %43, i32 noundef %2) #4
  %45 = load ptr, ptr %0, align 8, !tbaa !5
  call void @LL_ADC_REG_StartConversion(ptr noundef %45)
  br label %46

.thread:                                          ; preds = %17, %20
  %.02732 = phi i32 [ %21, %20 ], [ %18, %17 ]
  store i32 0, ptr %8, align 8, !tbaa !14
  br label %46

46:                                               ; preds = %23, %.thread, %7, %3, %13
  %.0 = phi i32 [ 1, %13 ], [ 2, %3 ], [ 2, %7 ], [ %44, %23 ], [ %.02732, %.thread ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #4
  ret i32 %.0
}

declare void @ADC_DMAConvCplt(ptr noundef) #1

declare void @ADC_DMAHalfConvCplt(ptr noundef) #1

declare void @ADC_DMAError(ptr noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @LL_ADC_REG_StartConversion(ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !7, i64 88, !11, i64 96, !11, i64 100, !11, i64 104, !13, i64 108}
!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, !12, i64 60}
!11 = !{!"int", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!13 = !{!"", !11, i64 0, !11, i64 4}
!14 = !{!6, !11, i64 96}
!15 = !{!6, !11, i64 100}
!16 = !{!6, !11, i64 104}
!17 = !{!6, !7, i64 88}
!18 = !{!19, !7, i64 72}
!19 = !{!"__DMA_HandleTypeDef", !7, i64 0, !20, 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}
!20 = !{!"", !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}
!21 = !{!19, !7, i64 80}
!22 = !{!19, !7, i64 104}
!23 = !{!24, !11, i64 0}
!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, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !8, i64 80, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !8, i64 112, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !8, i64 144, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200}
!25 = !{!24, !11, i64 4}


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