; 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

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

declare i32 @HAL_GetTick() #1

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

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

15:                                               ; preds = %10
  store i32 2, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %148

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

19:                                               ; preds = %16
  br label %20

20:                                               ; preds = %19
  br label %21

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

26:                                               ; preds = %21
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !16
  %30 = icmp eq ptr %29, inttoptr (i64 1073881088 to ptr)
  br i1 %30, label %31, label %33

31:                                               ; preds = %26
  %32 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  store ptr inttoptr (i64 1073881344 to ptr), ptr %32, align 8, !tbaa !16
  br label %35

33:                                               ; preds = %26
  %34 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  store ptr null, ptr %34, align 8, !tbaa !16
  br label %35

35:                                               ; preds = %33, %31
  %36 = phi ptr [ inttoptr (i64 1073881344 to ptr), %31 ], [ null, %33 ]
  %37 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %52

40:                                               ; preds = %35
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %41, i32 0, i32 4
  %43 = load volatile i32, ptr %42, align 4, !tbaa !17
  %44 = zext i32 %43 to i64
  %45 = or i64 %44, 32
  %46 = trunc i64 %45 to i32
  store volatile i32 %46, ptr %42, align 4, !tbaa !17
  br label %47

47:                                               ; preds = %40
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %48, i32 0, i32 3
  store i32 0, ptr %49, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %148

52:                                               ; preds = %35
  %53 = call i32 @HAL_GetTick()
  store i32 %53, ptr %5, align 4, !tbaa !15
  %54 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %55)
  store i32 %56, ptr %7, align 4, !tbaa !15
  br label %57

57:                                               ; preds = %88, %52
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !16
  %61 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %60)
  %62 = zext i32 %61 to i64
  %63 = icmp eq i64 %62, 1
  br i1 %63, label %68, label %64

64:                                               ; preds = %57
  %65 = load i32, ptr %7, align 4, !tbaa !15
  %66 = zext i32 %65 to i64
  %67 = icmp eq i64 %66, 1
  br label %68

68:                                               ; preds = %64, %57
  %69 = phi i1 [ true, %57 ], [ %67, %64 ]
  br i1 %69, label %70, label %92

70:                                               ; preds = %68
  %71 = call i32 @HAL_GetTick()
  %72 = load i32, ptr %5, align 4, !tbaa !15
  %73 = sub i32 %71, %72
  %74 = zext i32 %73 to i64
  %75 = icmp ugt i64 %74, 5
  br i1 %75, label %76, label %88

76:                                               ; preds = %70
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %77, i32 0, i32 4
  %79 = load volatile i32, ptr %78, align 4, !tbaa !17
  %80 = zext i32 %79 to i64
  %81 = or i64 %80, 16
  %82 = trunc i64 %81 to i32
  store volatile i32 %82, ptr %78, align 4, !tbaa !17
  br label %83

83:                                               ; preds = %76
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %84, i32 0, i32 3
  store i32 0, ptr %85, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %148

88:                                               ; preds = %70
  %89 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %6, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = call i32 @LL_ADC_REG_IsConversionOngoing(ptr noundef %90)
  store i32 %91, ptr %7, align 4, !tbaa !15
  br label %57, !llvm.loop !18

92:                                               ; preds = %68
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = call i32 @HAL_DMA_Abort(ptr noundef %95)
  store i32 %96, ptr %4, align 4, !tbaa !15
  %97 = load i32, ptr %4, align 4, !tbaa !15
  %98 = icmp eq i32 %97, 1
  br i1 %98, label %99, label %106

99:                                               ; preds = %92
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %100, i32 0, i32 4
  %102 = load volatile i32, ptr %101, align 4, !tbaa !17
  %103 = zext i32 %102 to i64
  %104 = or i64 %103, 64
  %105 = trunc i64 %104 to i32
  store volatile i32 %105, ptr %101, align 4, !tbaa !17
  br label %106

106:                                              ; preds = %99, %92
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = getelementptr inbounds %struct.ADC_TypeDef, ptr %109, i32 0, i32 1
  %111 = load volatile i32, ptr %110, align 4, !tbaa !21
  %112 = zext i32 %111 to i64
  %113 = and i64 %112, -17
  %114 = trunc i64 %113 to i32
  store volatile i32 %114, ptr %110, align 4, !tbaa !21
  %115 = load i32, ptr %4, align 4, !tbaa !15
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %127

117:                                              ; preds = %106
  %118 = call i32 @ADC_Disable(ptr noundef %6)
  store i32 %118, ptr %8, align 4, !tbaa !15
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = call i32 @ADC_Disable(ptr noundef %119)
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %122, label %126

122:                                              ; preds = %117
  %123 = load i32, ptr %8, align 4, !tbaa !15
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %126

125:                                              ; preds = %122
  store i32 0, ptr %4, align 4, !tbaa !15
  br label %126

126:                                              ; preds = %125, %122, %117
  br label %131

127:                                              ; preds = %106
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = call i32 @ADC_Disable(ptr noundef %128)
  %130 = call i32 @ADC_Disable(ptr noundef %6)
  br label %131

131:                                              ; preds = %127, %126
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %132, i32 0, i32 4
  %134 = load volatile i32, ptr %133, align 4, !tbaa !17
  %135 = zext i32 %134 to i64
  %136 = and i64 %135, -4353
  %137 = or i64 %136, 1
  %138 = trunc i64 %137 to i32
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ADC_HandleTypeDef, ptr %139, i32 0, i32 4
  store volatile i32 %138, ptr %140, align 4, !tbaa !17
  br label %141

141:                                              ; preds = %131, %21
  br label %142

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

145:                                              ; preds = %142
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %4, align 4, !tbaa !15
  store i32 %147, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %148

148:                                              ; preds = %146, %87, %51, %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  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
  %149 = load i32, ptr %2, align 4
  ret i32 %149
}

declare i32 @HAL_DMA_Abort(ptr noundef) #1

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, !6, i64 0}
!17 = !{!10, !12, i64 100}
!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

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

declare i32 @HAL_GetTick() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ADCEx_MultiModeStop_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 %64, 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 3) #4
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %.sink.split

9:                                                ; preds = %6
  %10 = load ptr, ptr %0, align 8, !tbaa !14
  %.not = icmp eq ptr %10, inttoptr (i64 1073881088 to ptr)
  %. = select i1 %.not, ptr inttoptr (i64 1073881344 to ptr), ptr null
  store ptr %., ptr %2, align 8, !tbaa !14
  br i1 %.not, label %15, label %11

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 100
  %13 = load volatile i32, ptr %12, align 4, !tbaa !15
  %14 = or i32 %13, 32
  store volatile i32 %14, ptr %12, align 4, !tbaa !15
  br label %.sink.split

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

.lr.ph:                                           ; preds = %15, %30
  %23 = tail call i32 @HAL_GetTick() #4
  %24 = sub i32 %23, %16
  %25 = icmp ugt i32 %24, 5
  br i1 %25, label %26, label %30

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %0, i64 100
  %28 = load volatile i32, ptr %27, align 4, !tbaa !15
  %29 = or i32 %28, 16
  store volatile i32 %29, ptr %27, align 4, !tbaa !15
  br label %.sink.split

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

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

.thread:                                          ; preds = %._crit_edge
  %41 = getelementptr inbounds i8, ptr %0, i64 100
  %42 = load volatile i32, ptr %41, align 4, !tbaa !15
  %43 = or i32 %42, 64
  store volatile i32 %43, ptr %41, align 4, !tbaa !15
  %44 = load ptr, ptr %0, align 8, !tbaa !14
  %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 %56

48:                                               ; preds = %._crit_edge
  %49 = load ptr, ptr %0, align 8, !tbaa !14
  %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 = icmp eq i32 %39, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %48
  %55 = call i32 @ADC_Disable(ptr noundef nonnull %2) #4
  br label %58

56:                                               ; preds = %.thread, %48
  %57 = tail call i32 @ADC_Disable(ptr noundef nonnull %0) #4
  br label %58

58:                                               ; preds = %54, %56
  %.sink = phi ptr [ %0, %54 ], [ %2, %56 ]
  %59 = call i32 @ADC_Disable(ptr noundef nonnull %.sink) #4
  %60 = getelementptr inbounds i8, ptr %0, i64 100
  %61 = load volatile i32, ptr %60, align 4, !tbaa !15
  %62 = and i32 %61, -4354
  %63 = or disjoint i32 %62, 1
  store volatile i32 %63, ptr %60, align 4, !tbaa !15
  br label %.sink.split

.sink.split:                                      ; preds = %58, %6, %11, %26
  %.0.ph = phi i32 [ 1, %26 ], [ 1, %11 ], [ %39, %58 ], [ %7, %6 ]
  store i32 0, ptr %3, align 8, !tbaa !5
  br label %64

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

declare i32 @HAL_DMA_Abort(ptr noundef) local_unnamed_addr #1

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, !7, i64 0}
!15 = !{!6, !11, i64 100}
!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