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

; 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.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 }

; 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_INJ_IsConversionOngoing(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_InjectedStart(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %8, i32 0, i32 0
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp eq ptr %10, inttoptr (i64 1073881088 to ptr)
  br i1 %11, label %17, label %12

12:                                               ; preds = %1
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = icmp eq ptr %15, inttoptr (i64 1073881344 to ptr)
  br label %17

17:                                               ; preds = %12, %1
  %18 = phi i1 [ true, %1 ], [ %16, %12 ]
  %19 = zext i1 %18 to i64
  %20 = select i1 %18, ptr inttoptr (i64 1073881856 to ptr), ptr inttoptr (i64 1476551424 to ptr)
  %21 = call i32 @LL_ADC_GetMultimode(ptr noundef %20)
  store i32 %21, ptr %6, align 4, !tbaa !15
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %24)
  %26 = zext i32 %25 to i64
  %27 = icmp ne i64 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %17
  store i32 2, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %190

29:                                               ; preds = %17
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.ADC_TypeDef, ptr %32, i32 0, i32 3
  %34 = load volatile i32, ptr %33, align 4, !tbaa !16
  %35 = zext i32 %34 to i64
  %36 = and i64 %35, 2147483648
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %5, align 4, !tbaa !15
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.ADC_TypeDef, ptr %40, i32 0, i32 19
  %42 = load volatile i32, ptr %41, align 4, !tbaa !18
  %43 = zext i32 %42 to i64
  %44 = and i64 %43, 384
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %46, label %57

46:                                               ; preds = %29
  %47 = load i32, ptr %5, align 4, !tbaa !15
  %48 = zext i32 %47 to i64
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %50, label %57

50:                                               ; preds = %46
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %51, i32 0, i32 4
  %53 = load volatile i32, ptr %52, align 4, !tbaa !19
  %54 = zext i32 %53 to i64
  %55 = or i64 %54, 32
  %56 = trunc i64 %55 to i32
  store volatile i32 %56, ptr %52, align 4, !tbaa !19
  store i32 1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %190

57:                                               ; preds = %46, %29
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %59, i32 0, i32 3
  %61 = load i32, ptr %60, align 8, !tbaa !20
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  store i32 2, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %190

64:                                               ; preds = %58
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %65, i32 0, i32 3
  store i32 1, ptr %66, align 8, !tbaa !20
  br label %67

67:                                               ; preds = %64
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = call i32 @ADC_Enable(ptr noundef %70)
  store i32 %71, ptr %4, align 4, !tbaa !15
  %72 = load i32, ptr %4, align 4, !tbaa !15
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %182

74:                                               ; preds = %69
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %75, i32 0, i32 4
  %77 = load volatile i32, ptr %76, align 4, !tbaa !19
  %78 = zext i32 %77 to i64
  %79 = and i64 %78, 256
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %86

81:                                               ; preds = %74
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %82, i32 0, i32 5
  %84 = load volatile i32, ptr %83, align 8, !tbaa !21
  %85 = and i32 %84, -9
  store volatile i32 %85, ptr %83, align 8, !tbaa !21
  br label %89

86:                                               ; preds = %74
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %87, i32 0, i32 5
  store volatile i32 0, ptr %88, align 8, !tbaa !21
  br label %89

89:                                               ; preds = %86, %81
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %90, i32 0, i32 4
  %92 = load volatile i32, ptr %91, align 4, !tbaa !19
  %93 = zext i32 %92 to i64
  %94 = and i64 %93, -8194
  %95 = or i64 %94, 4096
  %96 = trunc i64 %95 to i32
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %97, i32 0, i32 4
  store volatile i32 %96, ptr %98, align 4, !tbaa !19
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = icmp eq ptr %101, inttoptr (i64 1073881344 to ptr)
  br i1 %102, label %103, label %104

103:                                              ; preds = %89
  br label %108

104:                                              ; preds = %89
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %104, %103
  %109 = phi ptr [ inttoptr (i64 1073881088 to ptr), %103 ], [ %107, %104 ]
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = icmp eq ptr %109, %112
  br i1 %113, label %118, label %114

114:                                              ; preds = %108
  %115 = load i32, ptr %6, align 4, !tbaa !15
  %116 = zext i32 %115 to i64
  %117 = icmp eq i64 %116, 0
  br i1 %117, label %118, label %125

118:                                              ; preds = %114, %108
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %119, i32 0, i32 4
  %121 = load volatile i32, ptr %120, align 4, !tbaa !19
  %122 = zext i32 %121 to i64
  %123 = and i64 %122, -1048577
  %124 = trunc i64 %123 to i32
  store volatile i32 %124, ptr %120, align 4, !tbaa !19
  br label %125

125:                                              ; preds = %118, %114
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.ADC_TypeDef, ptr %128, i32 0, i32 0
  store volatile i32 96, ptr %129, align 4, !tbaa !22
  br label %130

130:                                              ; preds = %125
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %131, i32 0, i32 3
  store i32 0, ptr %132, align 8, !tbaa !20
  br label %133

133:                                              ; preds = %130
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = icmp eq ptr %137, inttoptr (i64 1073881344 to ptr)
  br i1 %138, label %139, label %140

139:                                              ; preds = %134
  br label %144

140:                                              ; preds = %134
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  br label %144

144:                                              ; preds = %140, %139
  %145 = phi ptr [ inttoptr (i64 1073881088 to ptr), %139 ], [ %143, %140 ]
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !9
  %149 = icmp eq ptr %145, %148
  br i1 %149, label %162, label %150

150:                                              ; preds = %144
  %151 = load i32, ptr %6, align 4, !tbaa !15
  %152 = zext i32 %151 to i64
  %153 = icmp eq i64 %152, 0
  br i1 %153, label %162, label %154

154:                                              ; preds = %150
  %155 = load i32, ptr %6, align 4, !tbaa !15
  %156 = zext i32 %155 to i64
  %157 = icmp eq i64 %156, 6
  br i1 %157, label %162, label %158

158:                                              ; preds = %154
  %159 = load i32, ptr %6, align 4, !tbaa !15
  %160 = zext i32 %159 to i64
  %161 = icmp eq i64 %160, 7
  br i1 %161, label %162, label %174

162:                                              ; preds = %158, %154, %150, %144
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  %166 = call i32 @LL_ADC_INJ_GetTrigAuto(ptr noundef %165)
  %167 = zext i32 %166 to i64
  %168 = icmp eq i64 %167, 0
  br i1 %168, label %169, label %173

169:                                              ; preds = %162
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  call void @LL_ADC_INJ_StartConversion(ptr noundef %172)
  br label %173

173:                                              ; preds = %169, %162
  br label %181

174:                                              ; preds = %158
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %175, i32 0, i32 4
  %177 = load volatile i32, ptr %176, align 4, !tbaa !19
  %178 = zext i32 %177 to i64
  %179 = or i64 %178, 1048576
  %180 = trunc i64 %179 to i32
  store volatile i32 %180, ptr %176, align 4, !tbaa !19
  br label %181

181:                                              ; preds = %174, %173
  br label %188

182:                                              ; preds = %69
  br label %183

183:                                              ; preds = %182
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %184, i32 0, i32 3
  store i32 0, ptr %185, align 8, !tbaa !20
  br label %186

186:                                              ; preds = %183
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187, %181
  %189 = load i32, ptr %4, align 4, !tbaa !15
  store i32 %189, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %190

190:                                              ; preds = %188, %63, %50, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %191 = load i32, ptr %2, align 4
  ret i32 %191
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @LL_ADC_INJ_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, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !6, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !14, i64 108}
!11 = !{!"", !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, !13, i64 60}
!12 = !{!"int", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!14 = !{!"", !12, i64 0, !12, i64 4}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !12, i64 12}
!17 = !{!"", !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, !7, i64 80, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !7, i64 112, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !7, i64 144, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200}
!18 = !{!17, !12, i64 76}
!19 = !{!10, !12, i64 100}
!20 = !{!10, !12, i64 96}
!21 = !{!10, !12, i64 104}
!22 = !{!17, !12, 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"

declare i32 @ADC_Enable(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_InjectedStart(ptr noundef %0) local_unnamed_addr #2 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = icmp eq ptr %2, inttoptr (i64 1073881088 to ptr)
  %4 = icmp eq ptr %2, inttoptr (i64 1073881344 to ptr)
  %spec.select = or i1 %3, %4
  %5 = select i1 %spec.select, ptr inttoptr (i64 1073881856 to ptr), ptr inttoptr (i64 1476551424 to ptr)
  %6 = tail call i32 @LL_ADC_GetMultimode(ptr noundef nonnull %5)
  %7 = load ptr, ptr %0, align 8, !tbaa !5
  %8 = tail call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %7)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %56

9:                                                ; preds = %1
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 12
  %12 = load volatile i32, ptr %11, align 4, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %10, i64 76
  %14 = load volatile i32, ptr %13, align 4, !tbaa !16
  %15 = and i32 %14, 384
  %16 = icmp eq i32 %15, 0
  %17 = icmp sgt i32 %12, -1
  %or.cond = select i1 %16, i1 %17, i1 false
  br i1 %or.cond, label %18, label %22

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %0, i64 100
  %20 = load volatile i32, ptr %19, align 4, !tbaa !17
  %21 = or i32 %20, 32
  store volatile i32 %21, ptr %19, align 4, !tbaa !17
  br label %56

22:                                               ; preds = %9
  %23 = getelementptr inbounds i8, ptr %0, i64 96
  %24 = load i32, ptr %23, align 8, !tbaa !18
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %56, label %26

26:                                               ; preds = %22
  store i32 1, ptr %23, align 8, !tbaa !18
  %27 = tail call i32 @ADC_Enable(ptr noundef nonnull %0) #3
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %55

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 100
  %31 = load volatile i32, ptr %30, align 4, !tbaa !17
  %32 = and i32 %31, 256
  %.not51 = icmp eq i32 %32, 0
  %33 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not51, label %37, label %34

34:                                               ; preds = %29
  %35 = load volatile i32, ptr %33, align 8, !tbaa !19
  %36 = and i32 %35, -9
  br label %37

37:                                               ; preds = %29, %34
  %.sink = phi i32 [ %36, %34 ], [ 0, %29 ]
  store volatile i32 %.sink, ptr %33, align 8, !tbaa !19
  %38 = load volatile i32, ptr %30, align 4, !tbaa !17
  %39 = and i32 %38, -12290
  %40 = or disjoint i32 %39, 4096
  store volatile i32 %40, ptr %30, align 4, !tbaa !17
  %41 = load ptr, ptr %0, align 8, !tbaa !5
  %.fr = freeze ptr %41
  %42 = icmp ne ptr %.fr, inttoptr (i64 1073881344 to ptr)
  %43 = icmp eq i32 %6, 0
  %or.cond5 = select i1 %42, i1 true, i1 %43
  br i1 %or.cond5, label %44, label %.thread

.thread:                                          ; preds = %37
  store volatile i32 96, ptr %.fr, align 4, !tbaa !20
  store i32 0, ptr %23, align 8, !tbaa !18
  br label %switch.early.test

44:                                               ; preds = %37
  %45 = load volatile i32, ptr %30, align 4, !tbaa !17
  %46 = and i32 %45, -1048577
  store volatile i32 %46, ptr %30, align 4, !tbaa !17
  store volatile i32 96, ptr %.fr, align 4, !tbaa !20
  store i32 0, ptr %23, align 8, !tbaa !18
  br i1 %42, label %47, label %switch.early.test

switch.early.test:                                ; preds = %.thread, %44
  switch i32 %6, label %52 [
    i32 7, label %47
    i32 6, label %47
    i32 0, label %47
  ]

47:                                               ; preds = %switch.early.test, %switch.early.test, %switch.early.test, %44
  %48 = tail call i32 @LL_ADC_INJ_GetTrigAuto(ptr noundef nonnull %.fr)
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  %51 = load ptr, ptr %0, align 8, !tbaa !5
  tail call void @LL_ADC_INJ_StartConversion(ptr noundef %51)
  br label %56

52:                                               ; preds = %switch.early.test
  %53 = load volatile i32, ptr %30, align 4, !tbaa !17
  %54 = or i32 %53, 1048576
  store volatile i32 %54, ptr %30, align 4, !tbaa !17
  br label %56

55:                                               ; preds = %26
  store i32 0, ptr %23, align 8, !tbaa !18
  br label %56

56:                                               ; preds = %55, %47, %50, %52, %22, %1, %18
  %.0 = phi i32 [ 1, %18 ], [ 2, %1 ], [ 2, %22 ], [ 0, %52 ], [ 0, %50 ], [ 0, %47 ], [ %27, %55 ]
  ret i32 %.0
}

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

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

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

attributes #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 = { 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 #2 = { 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 }

!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 = !{!15, !11, i64 12}
!15 = !{!"", !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}
!16 = !{!15, !11, i64 76}
!17 = !{!6, !11, i64 100}
!18 = !{!6, !11, i64 96}
!19 = !{!6, !11, i64 104}
!20 = !{!15, !11, i64 0}


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