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

; 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.HRTIM_OutputCfgTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.HRTIM_EventCfgTypeDef = type { i32, i32, i32, i32, i32 }
%struct.HRTIM_HandleTypeDef = type { ptr, %struct.HRTIM_InitTypeDef, [6 x %struct.HRTIM_TimerParamTypeDef], i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.HRTIM_InitTypeDef = type { i32, i32, i32, i32, i32 }
%struct.HRTIM_TimerParamTypeDef = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.HRTIM_SimpleOnePulseChannelCfgTypeDef = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.HRTIM_TypeDef = type { %struct.HRTIM_Master_TypeDef, [5 x %struct.HRTIM_Timerx_TypeDef], [32 x i32], %struct.HRTIM_Common_TypeDef }
%struct.HRTIM_Master_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [20 x i32] }
%struct.HRTIM_Timerx_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, [5 x i32] }
%struct.HRTIM_Common_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, 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 hidden void @HRTIM_OutputConfig(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_HRTIM_SimpleOnePulseChannelConfig(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.HRTIM_OutputCfgTypeDef, align 4
  %11 = alloca %struct.HRTIM_EventCfgTypeDef, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 20, ptr %11) #2
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %13, i32 0, i32 4
  %15 = load volatile i32, ptr %14, align 8, !tbaa !11
  %16 = icmp eq i32 %15, 2
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  store i32 2, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %136

18:                                               ; preds = %4
  br label %19

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

24:                                               ; preds = %19
  store i32 2, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %136

25:                                               ; preds = %19
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %26, i32 0, i32 3
  store i32 1, ptr %27, align 4, !tbaa !14
  br label %28

28:                                               ; preds = %25
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %31, i32 0, i32 4
  store volatile i32 2, ptr %32, align 8, !tbaa !11
  %33 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %33, label %60 [
    i32 1, label %34
    i32 4, label %34
    i32 16, label %34
    i32 64, label %34
    i32 256, label %34
    i32 2, label %47
    i32 8, label %47
    i32 32, label %47
    i32 128, label %47
    i32 512, label %47
  ]

34:                                               ; preds = %30, %30, %30, %30, %30
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %41, i64 0, i64 %43
  %45 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %44, i32 0, i32 7
  store volatile i32 %37, ptr %45, align 4, !tbaa !18
  %46 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 1
  store i32 8, ptr %46, align 4, !tbaa !20
  br label %68

47:                                               ; preds = %30, %30, %30, %30, %30
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !17
  %54 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %54, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %57, i32 0, i32 9
  store volatile i32 %50, ptr %58, align 4, !tbaa !22
  %59 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 1
  store i32 16, ptr %59, align 4, !tbaa !20
  br label %68

60:                                               ; preds = %30
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %61, i32 0, i32 4
  store volatile i32 7, ptr %62, align 8, !tbaa !11
  br label %63

63:                                               ; preds = %60
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %64, i32 0, i32 3
  store i32 0, ptr %65, align 4, !tbaa !14
  br label %66

66:                                               ; preds = %63
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67, %47, %34
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %69, i32 0, i32 4
  %71 = load volatile i32, ptr %70, align 8, !tbaa !11
  %72 = icmp eq i32 %71, 7
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  store i32 1, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %136

74:                                               ; preds = %68
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !23
  %78 = zext i32 %77 to i64
  %79 = and i64 %78, 2
  %80 = trunc i64 %79 to i32
  %81 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 0
  store i32 %80, ptr %81, align 4, !tbaa !24
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !25
  %85 = zext i32 %84 to i64
  %86 = and i64 %85, 8
  %87 = trunc i64 %86 to i32
  %88 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 4
  store i32 %87, ptr %88, align 4, !tbaa !26
  %89 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 5
  store i32 0, ptr %89, align 4, !tbaa !27
  %90 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 3
  store i32 0, ptr %90, align 4, !tbaa !28
  %91 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 6
  store i32 0, ptr %91, align 4, !tbaa !29
  %92 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 7
  store i32 0, ptr %92, align 4, !tbaa !30
  %93 = getelementptr inbounds %struct.HRTIM_OutputCfgTypeDef, ptr %10, i32 0, i32 2
  store i32 4, ptr %93, align 4, !tbaa !31
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = load i32, ptr %8, align 4, !tbaa !9
  call void @HRTIM_OutputConfig(ptr noundef %94, i32 noundef %95, i32 noundef %96, ptr noundef %10)
  %97 = getelementptr inbounds %struct.HRTIM_EventCfgTypeDef, ptr %11, i32 0, i32 4
  store i32 0, ptr %97, align 4, !tbaa !32
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %98, i32 0, i32 6
  %100 = load i32, ptr %99, align 4, !tbaa !33
  %101 = zext i32 %100 to i64
  %102 = and i64 %101, 15
  %103 = trunc i64 %102 to i32
  %104 = getelementptr inbounds %struct.HRTIM_EventCfgTypeDef, ptr %11, i32 0, i32 3
  store i32 %103, ptr %104, align 4, !tbaa !34
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %105, i32 0, i32 4
  %107 = load i32, ptr %106, align 4, !tbaa !35
  %108 = zext i32 %107 to i64
  %109 = and i64 %108, 2
  %110 = trunc i64 %109 to i32
  %111 = getelementptr inbounds %struct.HRTIM_EventCfgTypeDef, ptr %11, i32 0, i32 1
  store i32 %110, ptr %111, align 4, !tbaa !36
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %112, i32 0, i32 5
  %114 = load i32, ptr %113, align 4, !tbaa !37
  %115 = zext i32 %114 to i64
  %116 = and i64 %115, 24
  %117 = trunc i64 %116 to i32
  %118 = getelementptr inbounds %struct.HRTIM_EventCfgTypeDef, ptr %11, i32 0, i32 2
  store i32 %117, ptr %118, align 4, !tbaa !38
  %119 = getelementptr inbounds %struct.HRTIM_EventCfgTypeDef, ptr %11, i32 0, i32 0
  store i32 0, ptr %119, align 4, !tbaa !39
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %121, i32 0, i32 3
  %123 = load i32, ptr %122, align 4, !tbaa !40
  call void @HRTIM_EventConfig(ptr noundef %120, i32 noundef %123, ptr noundef %11)
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.HRTIM_SimpleOnePulseChannelCfgTypeDef, ptr %126, i32 0, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !40
  call void @HRTIM_TIM_ResetConfig(ptr noundef %124, i32 noundef %125, i32 noundef %128)
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %129, i32 0, i32 4
  store volatile i32 1, ptr %130, align 8, !tbaa !11
  br label %131

131:                                              ; preds = %74
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %132, i32 0, i32 3
  store i32 0, ptr %133, align 4, !tbaa !14
  br label %134

134:                                              ; preds = %131
  br label %135

135:                                              ; preds = %134
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %136

136:                                              ; preds = %135, %73, %24, %17
  call void @llvm.lifetime.end.p0(i64 20, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #2
  %137 = load i32, ptr %5, align 4
  ret i32 %137
}

; Function Attrs: nounwind uwtable
declare hidden void @HRTIM_TIM_ResetConfig(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 200}
!12 = !{!"", !6, i64 0, !13, i64 8, !7, i64 28, !10, i64 196, !10, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!14 = !{!12, !10, i64 196}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!17 = !{!12, !6, i64 0}
!18 = !{!19, !10, i64 28}
!19 = !{!"", !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, !7, i64 108}
!20 = !{!21, !10, i64 4}
!21 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!22 = !{!19, !10, i64 36}
!23 = !{!16, !10, i64 4}
!24 = !{!21, !10, i64 0}
!25 = !{!16, !10, i64 8}
!26 = !{!21, !10, i64 16}
!27 = !{!21, !10, i64 20}
!28 = !{!21, !10, i64 12}
!29 = !{!21, !10, i64 24}
!30 = !{!21, !10, i64 28}
!31 = !{!21, !10, i64 8}
!32 = !{!13, !10, i64 16}
!33 = !{!16, !10, i64 24}
!34 = !{!13, !10, i64 12}
!35 = !{!16, !10, i64 16}
!36 = !{!13, !10, i64 4}
!37 = !{!16, !10, i64 20}
!38 = !{!13, !10, i64 8}
!39 = !{!13, !10, i64 0}
!40 = !{!16, !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"

%struct.HRTIM_OutputCfgTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.HRTIM_EventCfgTypeDef = type { i32, i32, i32, i32, i32 }
%struct.HRTIM_Timerx_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, [5 x i32] }

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_HRTIM_SimpleOnePulseChannelConfig(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #1 {
  %5 = alloca %struct.HRTIM_OutputCfgTypeDef, align 4
  %6 = alloca %struct.HRTIM_EventCfgTypeDef, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %6) #2
  %7 = getelementptr inbounds i8, ptr %0, i64 200
  %8 = load volatile i32, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 2
  br i1 %9, label %58, label %10

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %0, i64 196
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %58, label %14

14:                                               ; preds = %10
  store i32 1, ptr %11, align 4, !tbaa !12
  store volatile i32 2, ptr %7, align 8, !tbaa !5
  switch i32 %2, label %29 [
    i32 1, label %15
    i32 4, label %15
    i32 16, label %15
    i32 64, label %15
    i32 256, label %15
    i32 2, label %22
    i32 8, label %22
    i32 32, label %22
    i32 128, label %22
    i32 512, label %22
  ]

15:                                               ; preds = %14, %14, %14, %14, %14
  %16 = load i32, ptr %3, align 4, !tbaa !13
  %17 = load ptr, ptr %0, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %17, i64 128
  %19 = zext i32 %1 to i64
  %20 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %18, i64 0, i64 %19, i32 7
  store volatile i32 %16, ptr %20, align 4, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 8, ptr %21, align 4, !tbaa !18
  br label %30

22:                                               ; preds = %14, %14, %14, %14, %14
  %23 = load i32, ptr %3, align 4, !tbaa !13
  %24 = load ptr, ptr %0, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %24, i64 128
  %26 = zext i32 %1 to i64
  %27 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %25, i64 0, i64 %26, i32 9
  store volatile i32 %23, ptr %27, align 4, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 16, ptr %28, align 4, !tbaa !18
  br label %30

29:                                               ; preds = %14
  store volatile i32 7, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !12
  br label %30

30:                                               ; preds = %29, %22, %15
  %31 = load volatile i32, ptr %7, align 8, !tbaa !5
  %32 = icmp eq i32 %31, 7
  br i1 %32, label %58, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %3, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !21
  %36 = and i32 %35, 2
  store i32 %36, ptr %5, align 4, !tbaa !22
  %37 = getelementptr inbounds i8, ptr %3, i64 8
  %38 = load i32, ptr %37, align 4, !tbaa !23
  %39 = and i32 %38, 8
  %40 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 %39, ptr %40, align 4, !tbaa !24
  %41 = getelementptr inbounds i8, ptr %5, i64 20
  store i32 0, ptr %41, align 4, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %5, i64 12
  store i32 0, ptr %42, align 4, !tbaa !26
  %43 = getelementptr inbounds i8, ptr %5, i64 24
  store i32 0, ptr %43, align 4, !tbaa !27
  %44 = getelementptr inbounds i8, ptr %5, i64 28
  store i32 0, ptr %44, align 4, !tbaa !28
  %45 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 4, ptr %45, align 4, !tbaa !29
  call void @HRTIM_OutputConfig(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %5)
  %46 = getelementptr inbounds i8, ptr %6, i64 16
  store i32 0, ptr %46, align 4, !tbaa !30
  %47 = getelementptr inbounds i8, ptr %3, i64 24
  %48 = load i32, ptr %47, align 4, !tbaa !31
  %49 = and i32 %48, 15
  %50 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 %49, ptr %50, align 4, !tbaa !32
  %51 = getelementptr inbounds i8, ptr %3, i64 16
  %52 = getelementptr inbounds i8, ptr %6, i64 4
  %53 = load <2 x i32>, ptr %51, align 4, !tbaa !33
  %54 = and <2 x i32> %53, <i32 2, i32 24>
  store <2 x i32> %54, ptr %52, align 4, !tbaa !33
  store i32 0, ptr %6, align 4, !tbaa !34
  %55 = getelementptr inbounds i8, ptr %3, i64 12
  %56 = load i32, ptr %55, align 4, !tbaa !35
  call void @HRTIM_EventConfig(ptr noundef nonnull %0, i32 noundef %56, ptr noundef nonnull %6)
  %57 = load i32, ptr %55, align 4, !tbaa !35
  call void @HRTIM_TIM_ResetConfig(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %57)
  store volatile i32 1, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !12
  br label %58

58:                                               ; preds = %30, %10, %4, %33
  %.0 = phi i32 [ 0, %33 ], [ 2, %4 ], [ 2, %10 ], [ 1, %30 ]
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %6) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #2
  ret i32 %.0
}

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

attributes #0 = { mustprogress 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, !11, i64 200}
!6 = !{!"", !7, i64 0, !10, i64 8, !8, i64 28, !11, i64 196, !11, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248}
!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 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 196}
!13 = !{!14, !11, i64 0}
!14 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !11, i64 28}
!17 = !{!"", !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, !8, i64 108}
!18 = !{!19, !11, i64 4}
!19 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!20 = !{!17, !11, i64 36}
!21 = !{!14, !11, i64 4}
!22 = !{!19, !11, i64 0}
!23 = !{!14, !11, i64 8}
!24 = !{!19, !11, i64 16}
!25 = !{!19, !11, i64 20}
!26 = !{!19, !11, i64 12}
!27 = !{!19, !11, i64 24}
!28 = !{!19, !11, i64 28}
!29 = !{!19, !11, i64 8}
!30 = !{!10, !11, i64 16}
!31 = !{!14, !11, i64 24}
!32 = !{!10, !11, i64 12}
!33 = !{!11, !11, i64 0}
!34 = !{!10, !11, i64 0}
!35 = !{!14, !11, i64 12}


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