; LLVM IR from ctlst-tech/catpilot :: bsp/mcu/core/stm32/h753/hal/src (stm32h7xx_hal_tim)

; 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.TIM_HandleTypeDef = type { ptr, %struct.TIM_Base_InitTypeDef, i32, [7 x ptr], i32, i32, [6 x i32], [4 x i32], i32 }
%struct.TIM_Base_InitTypeDef = type { i32, i32, i32, i32, i32, i32 }
%struct.TIM_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.TIM_ClockConfigTypeDef = type { i32, i32, i32, i32 }

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @TIM_ETR_SetConfig(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_TIM_ConfigClockSource(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  br label %9

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

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

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

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %21, i32 0, i32 5
  store volatile i32 2, ptr %22, align 4, !tbaa !14
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = getelementptr inbounds %struct.TIM_TypeDef, ptr %25, i32 0, i32 2
  %27 = load volatile i32, ptr %26, align 4, !tbaa !16
  store i32 %27, ptr %7, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = and i64 %29, -3211384
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %7, align 4, !tbaa !9
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = and i64 %33, -65281
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %7, align 4, !tbaa !9
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = getelementptr inbounds %struct.TIM_TypeDef, ptr %39, i32 0, i32 2
  store volatile i32 %36, ptr %40, align 4, !tbaa !16
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 4, !tbaa !18
  switch i32 %43, label %139 [
    i32 4096, label %44
    i32 112, label %45
    i32 8192, label %72
    i32 80, label %93
    i32 96, label %106
    i32 64, label %119
    i32 0, label %132
    i32 16, label %132
    i32 32, label %132
    i32 48, label %132
    i32 1048576, label %132
    i32 1048592, label %132
    i32 1048608, label %132
    i32 1048624, label %132
    i32 1048640, label %132
  ]

44:                                               ; preds = %20
  br label %140

45:                                               ; preds = %20
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !20
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !21
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !22
  call void @TIM_ETR_SetConfig(ptr noundef %48, i32 noundef %51, i32 noundef %54, i32 noundef %57)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = getelementptr inbounds %struct.TIM_TypeDef, ptr %60, i32 0, i32 2
  %62 = load volatile i32, ptr %61, align 4, !tbaa !16
  store i32 %62, ptr %7, align 4, !tbaa !9
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = or i64 %64, 119
  %66 = trunc i64 %65 to i32
  store i32 %66, ptr %7, align 4, !tbaa !9
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds %struct.TIM_TypeDef, ptr %70, i32 0, i32 2
  store volatile i32 %67, ptr %71, align 4, !tbaa !16
  br label %140

72:                                               ; preds = %20
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !20
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !21
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 4, !tbaa !22
  call void @TIM_ETR_SetConfig(ptr noundef %75, i32 noundef %78, i32 noundef %81, i32 noundef %84)
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  %88 = getelementptr inbounds %struct.TIM_TypeDef, ptr %87, i32 0, i32 2
  %89 = load volatile i32, ptr %88, align 4, !tbaa !16
  %90 = zext i32 %89 to i64
  %91 = or i64 %90, 16384
  %92 = trunc i64 %91 to i32
  store volatile i32 %92, ptr %88, align 4, !tbaa !16
  br label %140

93:                                               ; preds = %20
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !21
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 4, !tbaa !22
  call void @TIM_TI1_ConfigInputStage(ptr noundef %96, i32 noundef %99, i32 noundef %102)
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !15
  call void @TIM_ITRx_SetConfig(ptr noundef %105, i32 noundef 80)
  br label %140

106:                                              ; preds = %20
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !15
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !21
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %113, i32 0, i32 3
  %115 = load i32, ptr %114, align 4, !tbaa !22
  call void @TIM_TI2_ConfigInputStage(ptr noundef %109, i32 noundef %112, i32 noundef %115)
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !15
  call void @TIM_ITRx_SetConfig(ptr noundef %118, i32 noundef 96)
  br label %140

119:                                              ; preds = %20
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !21
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %126, i32 0, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !22
  call void @TIM_TI1_ConfigInputStage(ptr noundef %122, i32 noundef %125, i32 noundef %128)
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  call void @TIM_ITRx_SetConfig(ptr noundef %131, i32 noundef 64)
  br label %140

132:                                              ; preds = %20, %20, %20, %20, %20, %20, %20, %20, %20
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.TIM_ClockConfigTypeDef, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 4, !tbaa !18
  call void @TIM_ITRx_SetConfig(ptr noundef %135, i32 noundef %138)
  br label %140

139:                                              ; preds = %20
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %139, %132, %119, %106, %93, %72, %45, %44
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %141, i32 0, i32 5
  store volatile i32 1, ptr %142, align 4, !tbaa !14
  br label %143

143:                                              ; preds = %140
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.TIM_HandleTypeDef, ptr %144, i32 0, i32 4
  store i32 0, ptr %145, align 8, !tbaa !11
  br label %146

146:                                              ; preds = %143
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %148, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %149

149:                                              ; preds = %147, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  %150 = load i32, ptr %3, align 4
  ret i32 %150
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !10, i64 96}
!12 = !{!"", !6, i64 0, !13, i64 8, !10, i64 32, !7, i64 40, !10, i64 96, !10, i64 100, !7, i64 104, !7, i64 128, !10, i64 144}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!14 = !{!12, !10, i64 100}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"", !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, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104}
!18 = !{!19, !10, i64 0}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!20 = !{!19, !10, i64 8}
!21 = !{!19, !10, i64 4}
!22 = !{!19, !10, i64 12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
declare dso_local void @TIM_ETR_SetConfig(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @HAL_TIM_ConfigClockSource(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %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 %56, label %6

6:                                                ; preds = %2
  store i32 1, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 100
  store volatile i32 2, ptr %7, align 4, !tbaa !12
  %8 = load ptr, ptr %0, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load volatile i32, ptr %9, align 4, !tbaa !14
  %11 = and i32 %10, -3276664
  store volatile i32 %11, ptr %9, align 4, !tbaa !14
  %12 = load i32, ptr %1, align 4, !tbaa !16
  switch i32 %12, label %54 [
    i32 4096, label %55
    i32 112, label %13
    i32 8192, label %24
    i32 80, label %35
    i32 96, label %41
    i32 64, label %47
    i32 0, label %53
    i32 16, label %53
    i32 32, label %53
    i32 48, label %53
    i32 1048576, label %53
    i32 1048592, label %53
    i32 1048608, label %53
    i32 1048624, label %53
    i32 1048640, label %53
  ]

13:                                               ; preds = %6
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %1, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %1, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !20
  tail call void @TIM_ETR_SetConfig(ptr noundef nonnull %8, i32 noundef %15, i32 noundef %17, i32 noundef %19)
  %20 = load ptr, ptr %0, align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load volatile i32, ptr %21, align 4, !tbaa !14
  %23 = or i32 %22, 119
  store volatile i32 %23, ptr %21, align 4, !tbaa !14
  br label %55

24:                                               ; preds = %6
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %1, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %1, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !20
  tail call void @TIM_ETR_SetConfig(ptr noundef nonnull %8, i32 noundef %26, i32 noundef %28, i32 noundef %30)
  %31 = load ptr, ptr %0, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load volatile i32, ptr %32, align 4, !tbaa !14
  %34 = or i32 %33, 16384
  store volatile i32 %34, ptr %32, align 4, !tbaa !14
  br label %55

35:                                               ; preds = %6
  %36 = getelementptr inbounds i8, ptr %1, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !19
  %38 = getelementptr inbounds i8, ptr %1, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !20
  tail call void @TIM_TI1_ConfigInputStage(ptr noundef nonnull %8, i32 noundef %37, i32 noundef %39)
  %40 = load ptr, ptr %0, align 8, !tbaa !13
  tail call void @TIM_ITRx_SetConfig(ptr noundef %40, i32 noundef 80)
  br label %55

41:                                               ; preds = %6
  %42 = getelementptr inbounds i8, ptr %1, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !19
  %44 = getelementptr inbounds i8, ptr %1, i64 12
  %45 = load i32, ptr %44, align 4, !tbaa !20
  tail call void @TIM_TI2_ConfigInputStage(ptr noundef nonnull %8, i32 noundef %43, i32 noundef %45)
  %46 = load ptr, ptr %0, align 8, !tbaa !13
  tail call void @TIM_ITRx_SetConfig(ptr noundef %46, i32 noundef 96)
  br label %55

47:                                               ; preds = %6
  %48 = getelementptr inbounds i8, ptr %1, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !19
  %50 = getelementptr inbounds i8, ptr %1, i64 12
  %51 = load i32, ptr %50, align 4, !tbaa !20
  tail call void @TIM_TI1_ConfigInputStage(ptr noundef nonnull %8, i32 noundef %49, i32 noundef %51)
  %52 = load ptr, ptr %0, align 8, !tbaa !13
  tail call void @TIM_ITRx_SetConfig(ptr noundef %52, i32 noundef 64)
  br label %55

53:                                               ; preds = %6, %6, %6, %6, %6, %6, %6, %6, %6
  tail call void @TIM_ITRx_SetConfig(ptr noundef nonnull %8, i32 noundef %12)
  br label %55

54:                                               ; preds = %6
  br label %55

55:                                               ; preds = %6, %54, %53, %47, %41, %35, %24, %13
  %.0 = phi i32 [ 1, %54 ], [ 0, %53 ], [ 0, %47 ], [ 0, %41 ], [ 0, %35 ], [ 0, %24 ], [ 0, %13 ], [ 0, %6 ]
  store volatile i32 1, ptr %7, align 4, !tbaa !12
  store i32 0, ptr %3, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %2, %55
  %.039 = phi i32 [ %.0, %55 ], [ 2, %2 ]
  ret i32 %.039
}

; Function Attrs: nounwind uwtable
declare hidden void @TIM_TI1_ConfigInputStage(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @TIM_ITRx_SetConfig(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @TIM_TI2_ConfigInputStage(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !11, i64 32, !8, i64 40, !11, i64 96, !11, i64 100, !8, i64 104, !8, i64 128, !11, i64 144}
!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 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 100}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !11, i64 8}
!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, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104}
!16 = !{!17, !11, i64 0}
!17 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!18 = !{!17, !11, i64 8}
!19 = !{!17, !11, i64 4}
!20 = !{!17, !11, i64 12}


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