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

; 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_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_CompareCfgTypeDef = type { 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: nounwind uwtable
define dso_local i32 @HAL_HRTIM_WaveformCompareConfig(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %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
  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
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %10, i32 0, i32 4
  %12 = load volatile i32, ptr %11, align 8, !tbaa !11
  %13 = icmp eq i32 %12, 2
  br i1 %13, label %14, label %15

14:                                               ; preds = %4
  store i32 2, ptr %5, align 4
  br label %293

15:                                               ; preds = %4
  br label %16

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

21:                                               ; preds = %16
  store i32 2, ptr %5, align 4
  br label %293

22:                                               ; preds = %16
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %23, i32 0, i32 3
  store i32 1, ptr %24, align 4, !tbaa !14
  br label %25

25:                                               ; preds = %22
  br label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %27, i32 0, i32 4
  store volatile i32 2, ptr %28, align 8, !tbaa !11
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp eq i32 %29, 5
  br i1 %30, label %31, label %83

31:                                               ; preds = %26
  %32 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %32, label %69 [
    i32 1, label %33
    i32 2, label %42
    i32 4, label %51
    i32 8, label %60
  ]

33:                                               ; preds = %31
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !15
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %40, i32 0, i32 7
  store volatile i32 %36, ptr %41, align 4, !tbaa !18
  br label %76

42:                                               ; preds = %31
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !15
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %49, i32 0, i32 9
  store volatile i32 %45, ptr %50, align 4, !tbaa !22
  br label %76

51:                                               ; preds = %31
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !15
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %58, i32 0, i32 10
  store volatile i32 %54, ptr %59, align 4, !tbaa !23
  br label %76

60:                                               ; preds = %31
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %66, i32 0, i32 0
  %68 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %67, i32 0, i32 11
  store volatile i32 %63, ptr %68, align 4, !tbaa !24
  br label %76

69:                                               ; preds = %31
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %70, i32 0, i32 4
  store volatile i32 7, ptr %71, align 8, !tbaa !11
  br label %72

72:                                               ; preds = %69
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %73, i32 0, i32 3
  store i32 0, ptr %74, align 4, !tbaa !14
  br label %75

75:                                               ; preds = %72
  br label %76

76:                                               ; preds = %75, %60, %51, %42, %33
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %77, i32 0, i32 4
  %79 = load volatile i32, ptr %78, align 8, !tbaa !11
  %80 = icmp eq i32 %79, 7
  br i1 %80, label %81, label %82

81:                                               ; preds = %76
  store i32 1, ptr %5, align 4
  br label %293

82:                                               ; preds = %76
  br label %286

83:                                               ; preds = %26
  %84 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %84, label %272 [
    i32 1, label %85
    i32 2, label %97
    i32 4, label %178
    i32 8, label %190
  ]

85:                                               ; preds = %83
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 4, !tbaa !15
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %92, i64 0, i64 %94
  %96 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %95, i32 0, i32 7
  store volatile i32 %88, ptr %96, align 4, !tbaa !25
  br label %279

97:                                               ; preds = %83
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !15
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %104, i64 0, i64 %106
  %108 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %107, i32 0, i32 9
  store volatile i32 %100, ptr %108, align 4, !tbaa !27
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !28
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %177

113:                                              ; preds = %97
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !17
  %117 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %117, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %120, i32 0, i32 0
  %122 = load volatile i32, ptr %121, align 4, !tbaa !29
  %123 = zext i32 %122 to i64
  %124 = and i64 %123, -12289
  %125 = trunc i64 %124 to i32
  store volatile i32 %125, ptr %121, align 4, !tbaa !29
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !28
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !17
  %132 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %132, i64 0, i64 %134
  %136 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %135, i32 0, i32 0
  %137 = load volatile i32, ptr %136, align 4, !tbaa !29
  %138 = or i32 %137, %128
  store volatile i32 %138, ptr %136, align 4, !tbaa !29
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 4, !tbaa !28
  %142 = zext i32 %141 to i64
  %143 = icmp eq i64 %142, 8192
  br i1 %143, label %144, label %156

144:                                              ; preds = %113
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %145, i32 0, i32 2
  %147 = load i32, ptr %146, align 4, !tbaa !30
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !17
  %151 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %150, i32 0, i32 1
  %152 = load i32, ptr %7, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %151, i64 0, i64 %153
  %155 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %154, i32 0, i32 7
  store volatile i32 %147, ptr %155, align 4, !tbaa !25
  br label %176

156:                                              ; preds = %113
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %157, i32 0, i32 1
  %159 = load i32, ptr %158, align 4, !tbaa !28
  %160 = zext i32 %159 to i64
  %161 = icmp eq i64 %160, 12288
  br i1 %161, label %162, label %174

162:                                              ; preds = %156
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %163, i32 0, i32 2
  %165 = load i32, ptr %164, align 4, !tbaa !30
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !17
  %169 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %168, i32 0, i32 1
  %170 = load i32, ptr %7, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %169, i64 0, i64 %171
  %173 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %172, i32 0, i32 10
  store volatile i32 %165, ptr %173, align 4, !tbaa !31
  br label %175

174:                                              ; preds = %156
  br label %175

175:                                              ; preds = %174, %162
  br label %176

176:                                              ; preds = %175, %144
  br label %177

177:                                              ; preds = %176, %97
  br label %279

178:                                              ; preds = %83
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %179, i32 0, i32 0
  %181 = load i32, ptr %180, align 4, !tbaa !15
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !17
  %185 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %7, align 4, !tbaa !9
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %185, i64 0, i64 %187
  %189 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %188, i32 0, i32 10
  store volatile i32 %181, ptr %189, align 4, !tbaa !31
  br label %279

190:                                              ; preds = %83
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !15
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %194, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8, !tbaa !17
  %197 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %196, i32 0, i32 1
  %198 = load i32, ptr %7, align 4, !tbaa !9
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %197, i64 0, i64 %199
  %201 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %200, i32 0, i32 11
  store volatile i32 %193, ptr %201, align 4, !tbaa !32
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %202, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !28
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %271

206:                                              ; preds = %190
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !17
  %210 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %209, i32 0, i32 1
  %211 = load i32, ptr %7, align 4, !tbaa !9
  %212 = zext i32 %211 to i64
  %213 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %210, i64 0, i64 %212
  %214 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %213, i32 0, i32 0
  %215 = load volatile i32, ptr %214, align 4, !tbaa !29
  %216 = zext i32 %215 to i64
  %217 = and i64 %216, -49153
  %218 = trunc i64 %217 to i32
  store volatile i32 %218, ptr %214, align 4, !tbaa !29
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !28
  %222 = shl i32 %221, 2
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !17
  %226 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %225, i32 0, i32 1
  %227 = load i32, ptr %7, align 4, !tbaa !9
  %228 = zext i32 %227 to i64
  %229 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %226, i64 0, i64 %228
  %230 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %229, i32 0, i32 0
  %231 = load volatile i32, ptr %230, align 4, !tbaa !29
  %232 = or i32 %231, %222
  store volatile i32 %232, ptr %230, align 4, !tbaa !29
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %233, i32 0, i32 1
  %235 = load i32, ptr %234, align 4, !tbaa !28
  %236 = zext i32 %235 to i64
  %237 = icmp eq i64 %236, 8192
  br i1 %237, label %238, label %250

238:                                              ; preds = %206
  %239 = load ptr, ptr %9, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %239, i32 0, i32 2
  %241 = load i32, ptr %240, align 4, !tbaa !30
  %242 = load ptr, ptr %6, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !17
  %245 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %244, i32 0, i32 1
  %246 = load i32, ptr %7, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %245, i64 0, i64 %247
  %249 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %248, i32 0, i32 7
  store volatile i32 %241, ptr %249, align 4, !tbaa !25
  br label %270

250:                                              ; preds = %206
  %251 = load ptr, ptr %9, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !28
  %254 = zext i32 %253 to i64
  %255 = icmp eq i64 %254, 12288
  br i1 %255, label %256, label %268

256:                                              ; preds = %250
  %257 = load ptr, ptr %9, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.HRTIM_CompareCfgTypeDef, ptr %257, i32 0, i32 2
  %259 = load i32, ptr %258, align 4, !tbaa !30
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %260, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !17
  %263 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %262, i32 0, i32 1
  %264 = load i32, ptr %7, align 4, !tbaa !9
  %265 = zext i32 %264 to i64
  %266 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %263, i64 0, i64 %265
  %267 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %266, i32 0, i32 10
  store volatile i32 %259, ptr %267, align 4, !tbaa !31
  br label %269

268:                                              ; preds = %250
  br label %269

269:                                              ; preds = %268, %256
  br label %270

270:                                              ; preds = %269, %238
  br label %271

271:                                              ; preds = %270, %190
  br label %279

272:                                              ; preds = %83
  %273 = load ptr, ptr %6, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %273, i32 0, i32 4
  store volatile i32 7, ptr %274, align 8, !tbaa !11
  br label %275

275:                                              ; preds = %272
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %276, i32 0, i32 3
  store i32 0, ptr %277, align 4, !tbaa !14
  br label %278

278:                                              ; preds = %275
  br label %279

279:                                              ; preds = %278, %271, %178, %177, %85
  %280 = load ptr, ptr %6, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %280, i32 0, i32 4
  %282 = load volatile i32, ptr %281, align 8, !tbaa !11
  %283 = icmp eq i32 %282, 7
  br i1 %283, label %284, label %285

284:                                              ; preds = %279
  store i32 1, ptr %5, align 4
  br label %293

285:                                              ; preds = %279
  br label %286

286:                                              ; preds = %285, %82
  %287 = load ptr, ptr %6, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %287, i32 0, i32 4
  store volatile i32 1, ptr %288, align 8, !tbaa !11
  br label %289

289:                                              ; preds = %286
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %290, i32 0, i32 3
  store i32 0, ptr %291, align 4, !tbaa !14
  br label %292

292:                                              ; preds = %289
  store i32 0, ptr %5, align 4
  br label %293

293:                                              ; preds = %292, %284, %81, %21, %14
  %294 = load i32, ptr %5, align 4
  ret i32 %294
}

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, !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}
!17 = !{!12, !6, i64 0}
!18 = !{!19, !10, i64 28}
!19 = !{!"", !20, i64 0, !7, i64 128, !7, i64 768, !21, i64 896}
!20 = !{!"", !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, !7, i64 48}
!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, !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, !10, i64 108, !10, i64 112}
!22 = !{!19, !10, i64 36}
!23 = !{!19, !10, i64 40}
!24 = !{!19, !10, i64 44}
!25 = !{!26, !10, i64 28}
!26 = !{!"", !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}
!27 = !{!26, !10, i64 36}
!28 = !{!16, !10, i64 4}
!29 = !{!26, !10, i64 0}
!30 = !{!16, !10, i64 8}
!31 = !{!26, !10, i64 40}
!32 = !{!26, !10, i64 44}


; 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_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: nofree norecurse nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_HRTIM_WaveformCompareConfig(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 200
  %6 = load volatile i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 2
  br i1 %7, label %98, label %8

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

12:                                               ; preds = %8
  store i32 1, ptr %9, align 4, !tbaa !12
  store volatile i32 2, ptr %5, align 8, !tbaa !5
  %13 = icmp eq i32 %1, 5
  br i1 %13, label %14, label %35

14:                                               ; preds = %12
  switch i32 %2, label %31 [
    i32 1, label %15
    i32 2, label %19
    i32 4, label %23
    i32 8, label %27
  ]

15:                                               ; preds = %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 28
  store volatile i32 %16, ptr %18, align 4, !tbaa !16
  br label %32

19:                                               ; preds = %14
  %20 = load i32, ptr %3, align 4, !tbaa !13
  %21 = load ptr, ptr %0, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %21, i64 36
  store volatile i32 %20, ptr %22, align 4, !tbaa !20
  br label %32

23:                                               ; preds = %14
  %24 = load i32, ptr %3, align 4, !tbaa !13
  %25 = load ptr, ptr %0, align 8, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  store volatile i32 %24, ptr %26, align 4, !tbaa !21
  br label %32

27:                                               ; preds = %14
  %28 = load i32, ptr %3, align 4, !tbaa !13
  %29 = load ptr, ptr %0, align 8, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %29, i64 44
  store volatile i32 %28, ptr %30, align 4, !tbaa !22
  br label %32

31:                                               ; preds = %14
  store volatile i32 7, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %32

32:                                               ; preds = %31, %27, %23, %19, %15
  %33 = load volatile i32, ptr %5, align 8, !tbaa !5
  %34 = icmp eq i32 %33, 7
  br i1 %34, label %98, label %97

35:                                               ; preds = %12
  switch i32 %2, label %93 [
    i32 1, label %36
    i32 2, label %42
    i32 4, label %64
    i32 8, label %70
  ]

36:                                               ; preds = %35
  %37 = load i32, ptr %3, align 4, !tbaa !13
  %38 = load ptr, ptr %0, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %38, i64 128
  %40 = zext i32 %1 to i64
  %41 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %39, i64 0, i64 %40, i32 7
  store volatile i32 %37, ptr %41, align 4, !tbaa !23
  br label %94

42:                                               ; preds = %35
  %43 = load i32, ptr %3, align 4, !tbaa !13
  %44 = load ptr, ptr %0, align 8, !tbaa !15
  %45 = getelementptr inbounds i8, ptr %44, i64 128
  %46 = zext i32 %1 to i64
  %47 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %45, i64 0, i64 %46, i32 9
  store volatile i32 %43, ptr %47, align 4, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %3, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !26
  %.not66 = icmp eq i32 %49, 0
  br i1 %.not66, label %94, label %50

50:                                               ; preds = %42
  %51 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %45, i64 0, i64 %46
  %52 = load volatile i32, ptr %51, align 4, !tbaa !27
  %53 = and i32 %52, -12289
  store volatile i32 %53, ptr %51, align 4, !tbaa !27
  %54 = load volatile i32, ptr %51, align 4, !tbaa !27
  %55 = or i32 %54, %49
  store volatile i32 %55, ptr %51, align 4, !tbaa !27
  switch i32 %49, label %94 [
    i32 8192, label %56
    i32 12288, label %60
  ]

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %3, i64 8
  %58 = load i32, ptr %57, align 4, !tbaa !28
  %59 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %45, i64 0, i64 %46, i32 7
  store volatile i32 %58, ptr %59, align 4, !tbaa !23
  br label %94

60:                                               ; preds = %50
  %61 = getelementptr inbounds i8, ptr %3, i64 8
  %62 = load i32, ptr %61, align 4, !tbaa !28
  %63 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %45, i64 0, i64 %46, i32 10
  store volatile i32 %62, ptr %63, align 4, !tbaa !29
  br label %94

64:                                               ; preds = %35
  %65 = load i32, ptr %3, align 4, !tbaa !13
  %66 = load ptr, ptr %0, align 8, !tbaa !15
  %67 = getelementptr inbounds i8, ptr %66, i64 128
  %68 = zext i32 %1 to i64
  %69 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %67, i64 0, i64 %68, i32 10
  store volatile i32 %65, ptr %69, align 4, !tbaa !29
  br label %94

70:                                               ; preds = %35
  %71 = load i32, ptr %3, align 4, !tbaa !13
  %72 = load ptr, ptr %0, align 8, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %72, i64 128
  %74 = zext i32 %1 to i64
  %75 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %73, i64 0, i64 %74, i32 11
  store volatile i32 %71, ptr %75, align 4, !tbaa !30
  %76 = getelementptr inbounds i8, ptr %3, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !26
  %.not = icmp eq i32 %77, 0
  br i1 %.not, label %94, label %78

78:                                               ; preds = %70
  %79 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %73, i64 0, i64 %74
  %80 = load volatile i32, ptr %79, align 4, !tbaa !27
  %81 = and i32 %80, -49153
  store volatile i32 %81, ptr %79, align 4, !tbaa !27
  %82 = shl i32 %77, 2
  %83 = load volatile i32, ptr %79, align 4, !tbaa !27
  %84 = or i32 %83, %82
  store volatile i32 %84, ptr %79, align 4, !tbaa !27
  switch i32 %77, label %94 [
    i32 8192, label %85
    i32 12288, label %89
  ]

85:                                               ; preds = %78
  %86 = getelementptr inbounds i8, ptr %3, i64 8
  %87 = load i32, ptr %86, align 4, !tbaa !28
  %88 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %73, i64 0, i64 %74, i32 7
  store volatile i32 %87, ptr %88, align 4, !tbaa !23
  br label %94

89:                                               ; preds = %78
  %90 = getelementptr inbounds i8, ptr %3, i64 8
  %91 = load i32, ptr %90, align 4, !tbaa !28
  %92 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %73, i64 0, i64 %74, i32 10
  store volatile i32 %91, ptr %92, align 4, !tbaa !29
  br label %94

93:                                               ; preds = %35
  store volatile i32 7, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %94

94:                                               ; preds = %78, %50, %70, %89, %85, %42, %60, %56, %93, %64, %36
  %95 = load volatile i32, ptr %5, align 8, !tbaa !5
  %96 = icmp eq i32 %95, 7
  br i1 %96, label %98, label %97

97:                                               ; preds = %94, %32
  store volatile i32 1, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %98

98:                                               ; preds = %94, %32, %8, %4, %97
  %.0 = phi i32 [ 0, %97 ], [ 2, %4 ], [ 2, %8 ], [ 1, %32 ], [ 1, %94 ]
  ret i32 %.0
}

attributes #0 = { nofree norecurse 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 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}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !11, i64 28}
!17 = !{!"", !18, i64 0, !8, i64 128, !8, i64 768, !19, i64 896}
!18 = !{!"", !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, !8, i64 48}
!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, !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, !11, i64 108, !11, i64 112}
!20 = !{!17, !11, i64 36}
!21 = !{!17, !11, i64 40}
!22 = !{!17, !11, i64 44}
!23 = !{!24, !11, i64 28}
!24 = !{!"", !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}
!25 = !{!24, !11, i64 36}
!26 = !{!14, !11, i64 4}
!27 = !{!24, !11, i64 0}
!28 = !{!14, !11, i64 8}
!29 = !{!24, !11, i64 40}
!30 = !{!24, !11, i64 44}


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