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

declare i32 @ADC_Disable(ptr noundef) #1

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

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

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

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

declare i32 @HAL_GetTick() #1

declare i32 @HAL_DMA_Abort(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_RegularMultiModeStop_DMA(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 %struct.ADC_HandleTypeDef, align 8
  %7 = alloca i32, align 4
  %8 = 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 120, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  br label %9

9:                                                ; preds = %1
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %10, i32 0, i32 3
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %14, label %15

14:                                               ; preds = %9
  store i32 2, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %167

15:                                               ; preds = %9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %16, i32 0, i32 3
  store i32 1, ptr %17, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = call i32 @ADC_ConversionStop(ptr noundef %21, i32 noundef 1)
  store i32 %22, ptr %4, align 4, !tbaa !15
  %23 = load i32, ptr %4, align 4, !tbaa !15
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %160

25:                                               ; preds = %20
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %26, i32 0, i32 4
  %28 = load volatile i32, ptr %27, align 4, !tbaa !16
  %29 = zext i32 %28 to i64
  %30 = and i64 %29, -257
  %31 = trunc i64 %30 to i32
  store volatile i32 %31, ptr %27, align 4, !tbaa !16
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = icmp eq ptr %34, inttoptr (i64 1073881088 to ptr)
  br i1 %35, label %36, label %38

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

38:                                               ; preds = %25
  %39 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  store ptr null, ptr %39, align 8, !tbaa !17
  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 %6, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %57

45:                                               ; preds = %40
  %46 = load ptr, ptr %3, 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 !16
  %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 !16
  br label %52

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

55:                                               ; preds = %52
  br label %56

56:                                               ; preds = %55
  store i32 1, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %167

57:                                               ; preds = %40
  %58 = call i32 @HAL_GetTick()
  store i32 %58, ptr %5, align 4, !tbaa !15
  %59 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %60)
  store i32 %61, ptr %7, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %93, %57
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %65)
  %67 = zext i32 %66 to i64
  %68 = icmp eq i64 %67, 1
  br i1 %68, label %73, label %69

69:                                               ; preds = %62
  %70 = load i32, ptr %7, align 4, !tbaa !15
  %71 = zext i32 %70 to i64
  %72 = icmp eq i64 %71, 1
  br label %73

73:                                               ; preds = %69, %62
  %74 = phi i1 [ true, %62 ], [ %72, %69 ]
  br i1 %74, label %75, label %97

75:                                               ; preds = %73
  %76 = call i32 @HAL_GetTick()
  %77 = load i32, ptr %5, align 4, !tbaa !15
  %78 = sub i32 %76, %77
  %79 = zext i32 %78 to i64
  %80 = icmp ugt i64 %79, 5
  br i1 %80, label %81, label %93

81:                                               ; preds = %75
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %82, i32 0, i32 4
  %84 = load volatile i32, ptr %83, align 4, !tbaa !16
  %85 = zext i32 %84 to i64
  %86 = or i64 %85, 16
  %87 = trunc i64 %86 to i32
  store volatile i32 %87, ptr %83, align 4, !tbaa !16
  br label %88

88:                                               ; preds = %81
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %89, i32 0, i32 3
  store i32 0, ptr %90, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %88
  br label %92

92:                                               ; preds = %91
  store i32 1, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %167

93:                                               ; preds = %75
  %94 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %95)
  store i32 %96, ptr %7, align 4, !tbaa !15
  br label %62, !llvm.loop !18

97:                                               ; preds = %73
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = call i32 @HAL_DMA_Abort(ptr noundef %100)
  store i32 %101, ptr %4, align 4, !tbaa !15
  %102 = load i32, ptr %4, align 4, !tbaa !15
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %111

104:                                              ; preds = %97
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %105, i32 0, i32 4
  %107 = load volatile i32, ptr %106, align 4, !tbaa !16
  %108 = zext i32 %107 to i64
  %109 = or i64 %108, 64
  %110 = trunc i64 %109 to i32
  store volatile i32 %110, ptr %106, align 4, !tbaa !16
  br label %111

111:                                              ; preds = %104, %97
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !17
  %115 = getelementptr inbounds %struct.ADC_TypeDef, ptr %114, i32 0, i32 1
  %116 = load volatile i32, ptr %115, align 4, !tbaa !21
  %117 = zext i32 %116 to i64
  %118 = and i64 %117, -17
  %119 = trunc i64 %118 to i32
  store volatile i32 %119, ptr %115, align 4, !tbaa !21
  %120 = load i32, ptr %4, align 4, !tbaa !15
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %122, label %159

122:                                              ; preds = %111
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %125)
  %127 = zext i32 %126 to i64
  %128 = icmp eq i64 %127, 0
  br i1 %128, label %129, label %144

129:                                              ; preds = %122
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = call i32 @ADC_Disable(ptr noundef %130)
  store i32 %131, ptr %4, align 4, !tbaa !15
  %132 = load i32, ptr %4, align 4, !tbaa !15
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %143

134:                                              ; preds = %129
  %135 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %136)
  %138 = zext i32 %137 to i64
  %139 = icmp eq i64 %138, 0
  br i1 %139, label %140, label %142

140:                                              ; preds = %134
  %141 = call i32 @ADC_Disable(ptr noundef %6)
  store i32 %141, ptr %4, align 4, !tbaa !15
  br label %142

142:                                              ; preds = %140, %134
  br label %143

143:                                              ; preds = %142, %129
  br label %144

144:                                              ; preds = %143, %122
  %145 = load i32, ptr %4, align 4, !tbaa !15
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %157

147:                                              ; preds = %144
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %148, i32 0, i32 4
  %150 = load volatile i32, ptr %149, align 4, !tbaa !16
  %151 = zext i32 %150 to i64
  %152 = and i64 %151, -4097
  %153 = or i64 %152, 1
  %154 = trunc i64 %153 to i32
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %155, i32 0, i32 4
  store volatile i32 %154, ptr %156, align 4, !tbaa !16
  br label %158

157:                                              ; preds = %144
  br label %158

158:                                              ; preds = %157, %147
  br label %159

159:                                              ; preds = %158, %111
  br label %160

160:                                              ; preds = %159, %20
  br label %161

161:                                              ; preds = %160
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %162, i32 0, i32 3
  store i32 0, ptr %163, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %161
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %4, align 4, !tbaa !15
  store i32 %166, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %167

167:                                              ; preds = %165, %92, %56, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 120, 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
  %168 = load i32, ptr %2, align 4
  ret i32 %168
}

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, !12, i64 96}
!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 = !{!10, !12, i64 100}
!17 = !{!10, !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !6, i64 88}
!21 = !{!22, !12, i64 4}
!22 = !{!"", !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}


; 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

declare i32 @ADC_Disable(ptr noundef) local_unnamed_addr #1

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

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

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

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

declare i32 @HAL_GetTick() local_unnamed_addr #1

declare i32 @HAL_DMA_Abort(ptr noundef) local_unnamed_addr #1

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

6:                                                ; preds = %1
  store i32 1, ptr %3, align 8, !tbaa !5
  %7 = tail call i32 @ADC_ConversionStop(ptr noundef nonnull %0, i32 noundef 1) #4
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %.sink.split

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 100
  %11 = load volatile i32, ptr %10, align 4, !tbaa !14
  %12 = and i32 %11, -257
  store volatile i32 %12, ptr %10, align 4, !tbaa !14
  %13 = load ptr, ptr %0, align 8, !tbaa !15
  %.not = icmp eq ptr %13, inttoptr (i64 1073881088 to ptr)
  %. = select i1 %.not, ptr inttoptr (i64 1073881344 to ptr), ptr null
  store ptr %., ptr %2, align 8, !tbaa !15
  br i1 %.not, label %17, label %14

14:                                               ; preds = %9
  %15 = load volatile i32, ptr %10, align 4, !tbaa !14
  %16 = or i32 %15, 32
  store volatile i32 %16, ptr %10, align 4, !tbaa !14
  br label %.sink.split

17:                                               ; preds = %9
  %18 = tail call i32 @HAL_GetTick() #4
  %19 = tail call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef nonnull inttoptr (i64 1073881344 to ptr))
  %20 = load ptr, ptr %0, align 8, !tbaa !15
  %21 = tail call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %20)
  %22 = icmp eq i32 %21, 1
  %23 = icmp eq i32 %19, 1
  %24 = select i1 %22, i1 true, i1 %23
  br i1 %24, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17, %31
  %25 = tail call i32 @HAL_GetTick() #4
  %26 = sub i32 %25, %18
  %27 = icmp ugt i32 %26, 5
  br i1 %27, label %28, label %31

28:                                               ; preds = %.lr.ph
  %29 = load volatile i32, ptr %10, align 4, !tbaa !14
  %30 = or i32 %29, 16
  store volatile i32 %30, ptr %10, align 4, !tbaa !14
  br label %.sink.split

31:                                               ; preds = %.lr.ph
  %32 = tail call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %.)
  %33 = load ptr, ptr %0, align 8, !tbaa !15
  %34 = tail call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %33)
  %35 = icmp eq i32 %34, 1
  %36 = icmp eq i32 %32, 1
  %37 = select i1 %35, i1 true, i1 %36
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %31, %17
  %38 = getelementptr inbounds i8, ptr %0, i64 88
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  %40 = tail call i32 @HAL_DMA_Abort(ptr noundef %39) #4
  %.not33 = icmp eq i32 %40, 0
  br i1 %.not33, label %48, label %41

41:                                               ; preds = %._crit_edge
  %42 = load volatile i32, ptr %10, align 4, !tbaa !14
  %43 = or i32 %42, 64
  store volatile i32 %43, ptr %10, align 4, !tbaa !14
  %44 = load ptr, ptr %0, align 8, !tbaa !15
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  %46 = load volatile i32, ptr %45, align 4, !tbaa !19
  %47 = and i32 %46, -17
  store volatile i32 %47, ptr %45, align 4, !tbaa !19
  br label %.sink.split

48:                                               ; preds = %._crit_edge
  %49 = load ptr, ptr %0, align 8, !tbaa !15
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %51 = load volatile i32, ptr %50, align 4, !tbaa !19
  %52 = and i32 %51, -17
  store volatile i32 %52, ptr %50, align 4, !tbaa !19
  %53 = tail call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %49)
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %.thread34

55:                                               ; preds = %48
  %56 = tail call i32 @ADC_Disable(ptr noundef nonnull %0) #4
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %.sink.split

58:                                               ; preds = %55
  %59 = tail call i32 @LL_ADC_INJ_IsConversionOngoing(ptr noundef %.)
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %.thread34

61:                                               ; preds = %58
  %62 = call i32 @ADC_Disable(ptr noundef nonnull %2) #4
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %.thread34, label %.sink.split

.thread34:                                        ; preds = %48, %58, %61
  %64 = load volatile i32, ptr %10, align 4, !tbaa !14
  %65 = and i32 %64, -4098
  %66 = or disjoint i32 %65, 1
  store volatile i32 %66, ptr %10, align 4, !tbaa !14
  br label %.sink.split

.sink.split:                                      ; preds = %61, %.thread34, %6, %41, %55, %14, %28
  %.026.ph = phi i32 [ 1, %28 ], [ 1, %14 ], [ 0, %.thread34 ], [ %62, %61 ], [ %40, %41 ], [ %7, %6 ], [ %56, %55 ]
  store i32 0, ptr %3, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %.sink.split, %1
  %.026 = phi i32 [ 2, %1 ], [ %.026.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %2) #4
  ret i32 %.026
}

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, !11, i64 96}
!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 100}
!15 = !{!6, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !7, i64 88}
!19 = !{!20, !11, i64 4}
!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, !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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass