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

; 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_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 }

@TimerIdxToTimerId = external hidden global [6 x i32], align 16

; 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
define dso_local i32 @HAL_HRTIM_SimpleCaptureStop_IT(ptr noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  br label %11

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

16:                                               ; preds = %11
  store i32 2, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %281

17:                                               ; preds = %11
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %18, i32 0, i32 3
  store i32 1, ptr %19, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %17
  br label %21

21:                                               ; preds = %20
  br label %22

22:                                               ; preds = %21
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %23, i32 0, i32 4
  store volatile i32 2, ptr %24, align 8, !tbaa !14
  %25 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %25, label %68 [
    i32 1, label %26
    i32 2, label %47
  ]

26:                                               ; preds = %22
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %30, i64 0, i64 %32
  %34 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %33, i32 0, i32 23
  store volatile i32 0, ptr %34, align 4, !tbaa !16
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %38, i64 0, i64 %40
  %42 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %41, i32 0, i32 3
  %43 = load volatile i32, ptr %42, align 4, !tbaa !18
  %44 = zext i32 %43 to i64
  %45 = and i64 %44, -129
  %46 = trunc i64 %45 to i32
  store volatile i32 %46, ptr %42, align 4, !tbaa !18
  br label %76

47:                                               ; preds = %22
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %51, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %54, i32 0, i32 24
  store volatile i32 0, ptr %55, align 4, !tbaa !19
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  %59 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %59, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %62, i32 0, i32 3
  %64 = load volatile i32, ptr %63, align 4, !tbaa !18
  %65 = zext i32 %64 to i64
  %66 = and i64 %65, -257
  %67 = trunc i64 %66 to i32
  store volatile i32 %67, ptr %63, align 4, !tbaa !18
  br label %76

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

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

74:                                               ; preds = %71
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %47, %26
  %77 = load ptr, ptr %5, 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 !14
  %80 = icmp eq i32 %79, 7
  br i1 %80, label %81, label %82

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

82:                                               ; preds = %76
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %86, i64 0, i64 %88
  %90 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %89, i32 0, i32 23
  %91 = load volatile i32, ptr %90, align 4, !tbaa !16
  store i32 %91, ptr %8, align 4, !tbaa !9
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !15
  %95 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %6, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %95, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.HRTIM_Timerx_TypeDef, ptr %98, i32 0, i32 24
  %100 = load volatile i32, ptr %99, align 4, !tbaa !19
  store i32 %100, ptr %9, align 4, !tbaa !9
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %273

103:                                              ; preds = %82
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %273

106:                                              ; preds = %103
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %6, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = and i64 %112, 65536
  %114 = icmp eq i64 %113, 65536
  br i1 %114, label %115, label %125

115:                                              ; preds = %107
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !15
  %119 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %118, i32 0, i32 0
  %120 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %119, i32 0, i32 0
  %121 = load volatile i32, ptr %120, align 4, !tbaa !20
  %122 = zext i32 %121 to i64
  %123 = and i64 %122, -65537
  %124 = trunc i64 %123 to i32
  store volatile i32 %124, ptr %120, align 4, !tbaa !20
  br label %125

125:                                              ; preds = %115, %107
  %126 = load i32, ptr %6, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = and i64 %130, 131072
  %132 = icmp eq i64 %131, 131072
  br i1 %132, label %133, label %154

133:                                              ; preds = %125
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !15
  %137 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %136, i32 0, i32 3
  %138 = getelementptr inbounds %struct.HRTIM_Common_TypeDef, ptr %137, i32 0, i32 5
  %139 = load volatile i32, ptr %138, align 4, !tbaa !24
  %140 = zext i32 %139 to i64
  %141 = and i64 %140, 3
  %142 = icmp eq i64 %141, 0
  br i1 %142, label %143, label %153

143:                                              ; preds = %133
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !15
  %147 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %147, i32 0, i32 0
  %149 = load volatile i32, ptr %148, align 4, !tbaa !20
  %150 = zext i32 %149 to i64
  %151 = and i64 %150, -131073
  %152 = trunc i64 %151 to i32
  store volatile i32 %152, ptr %148, align 4, !tbaa !20
  br label %153

153:                                              ; preds = %143, %133
  br label %154

154:                                              ; preds = %153, %125
  %155 = load i32, ptr %6, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = and i64 %159, 262144
  %161 = icmp eq i64 %160, 262144
  br i1 %161, label %162, label %183

162:                                              ; preds = %154
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %165, i32 0, i32 3
  %167 = getelementptr inbounds %struct.HRTIM_Common_TypeDef, ptr %166, i32 0, i32 5
  %168 = load volatile i32, ptr %167, align 4, !tbaa !24
  %169 = zext i32 %168 to i64
  %170 = and i64 %169, 12
  %171 = icmp eq i64 %170, 0
  br i1 %171, label %172, label %182

172:                                              ; preds = %162
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !15
  %176 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %176, i32 0, i32 0
  %178 = load volatile i32, ptr %177, align 4, !tbaa !20
  %179 = zext i32 %178 to i64
  %180 = and i64 %179, -262145
  %181 = trunc i64 %180 to i32
  store volatile i32 %181, ptr %177, align 4, !tbaa !20
  br label %182

182:                                              ; preds = %172, %162
  br label %183

183:                                              ; preds = %182, %154
  %184 = load i32, ptr %6, align 4, !tbaa !9
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = zext i32 %187 to i64
  %189 = and i64 %188, 524288
  %190 = icmp eq i64 %189, 524288
  br i1 %190, label %191, label %212

191:                                              ; preds = %183
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !15
  %195 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %194, i32 0, i32 3
  %196 = getelementptr inbounds %struct.HRTIM_Common_TypeDef, ptr %195, i32 0, i32 5
  %197 = load volatile i32, ptr %196, align 4, !tbaa !24
  %198 = zext i32 %197 to i64
  %199 = and i64 %198, 48
  %200 = icmp eq i64 %199, 0
  br i1 %200, label %201, label %211

201:                                              ; preds = %191
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !15
  %205 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %204, i32 0, i32 0
  %206 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %205, i32 0, i32 0
  %207 = load volatile i32, ptr %206, align 4, !tbaa !20
  %208 = zext i32 %207 to i64
  %209 = and i64 %208, -524289
  %210 = trunc i64 %209 to i32
  store volatile i32 %210, ptr %206, align 4, !tbaa !20
  br label %211

211:                                              ; preds = %201, %191
  br label %212

212:                                              ; preds = %211, %183
  %213 = load i32, ptr %6, align 4, !tbaa !9
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !9
  %217 = zext i32 %216 to i64
  %218 = and i64 %217, 1048576
  %219 = icmp eq i64 %218, 1048576
  br i1 %219, label %220, label %241

220:                                              ; preds = %212
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !15
  %224 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %223, i32 0, i32 3
  %225 = getelementptr inbounds %struct.HRTIM_Common_TypeDef, ptr %224, i32 0, i32 5
  %226 = load volatile i32, ptr %225, align 4, !tbaa !24
  %227 = zext i32 %226 to i64
  %228 = and i64 %227, 192
  %229 = icmp eq i64 %228, 0
  br i1 %229, label %230, label %240

230:                                              ; preds = %220
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !15
  %234 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %233, i32 0, i32 0
  %235 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %234, i32 0, i32 0
  %236 = load volatile i32, ptr %235, align 4, !tbaa !20
  %237 = zext i32 %236 to i64
  %238 = and i64 %237, -1048577
  %239 = trunc i64 %238 to i32
  store volatile i32 %239, ptr %235, align 4, !tbaa !20
  br label %240

240:                                              ; preds = %230, %220
  br label %241

241:                                              ; preds = %240, %212
  %242 = load i32, ptr %6, align 4, !tbaa !9
  %243 = zext i32 %242 to i64
  %244 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = zext i32 %245 to i64
  %247 = and i64 %246, 2097152
  %248 = icmp eq i64 %247, 2097152
  br i1 %248, label %249, label %270

249:                                              ; preds = %241
  %250 = load ptr, ptr %5, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %251, align 8, !tbaa !15
  %253 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %252, i32 0, i32 3
  %254 = getelementptr inbounds %struct.HRTIM_Common_TypeDef, ptr %253, i32 0, i32 5
  %255 = load volatile i32, ptr %254, align 4, !tbaa !24
  %256 = zext i32 %255 to i64
  %257 = and i64 %256, 768
  %258 = icmp eq i64 %257, 0
  br i1 %258, label %259, label %269

259:                                              ; preds = %249
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %260, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !15
  %263 = getelementptr inbounds %struct.HRTIM_TypeDef, ptr %262, i32 0, i32 0
  %264 = getelementptr inbounds %struct.HRTIM_Master_TypeDef, ptr %263, i32 0, i32 0
  %265 = load volatile i32, ptr %264, align 4, !tbaa !20
  %266 = zext i32 %265 to i64
  %267 = and i64 %266, -2097153
  %268 = trunc i64 %267 to i32
  store volatile i32 %268, ptr %264, align 4, !tbaa !20
  br label %269

269:                                              ; preds = %259, %249
  br label %270

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

271:                                              ; preds = %270
  br label %272

272:                                              ; preds = %271
  br label %273

273:                                              ; preds = %272, %103, %82
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.HRTIM_HandleTypeDef, ptr %274, i32 0, i32 4
  store volatile i32 1, ptr %275, align 8, !tbaa !14
  br label %276

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

279:                                              ; preds = %276
  br label %280

280:                                              ; preds = %279
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %281

281:                                              ; preds = %280, %81, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  %282 = load i32, ptr %4, align 4
  ret i32 %282
}

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 196}
!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 200}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !10, i64 92}
!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, !7, i64 108}
!18 = !{!17, !10, i64 12}
!19 = !{!17, !10, i64 96}
!20 = !{!21, !10, i64 0}
!21 = !{!"", !22, i64 0, !7, i64 128, !7, i64 768, !23, i64 896}
!22 = !{!"", !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}
!23 = !{!"", !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}
!24 = !{!21, !10, i64 916}


; 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] }

@TimerIdxToTimerId = external hidden local_unnamed_addr global [6 x i32], align 16

; Function Attrs: nofree norecurse nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_HRTIM_SimpleCaptureStop_IT(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 196
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 1
  br i1 %6, label %102, label %7

7:                                                ; preds = %3
  store i32 1, ptr %4, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 200
  store volatile i32 2, ptr %8, align 8, !tbaa !12
  switch i32 %2, label %25 [
    i32 1, label %9
    i32 2, label %17
  ]

9:                                                ; preds = %7
  %10 = load ptr, ptr %0, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %10, i64 128
  %12 = zext i32 %1 to i64
  %13 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %11, i64 0, i64 %12, i32 23
  store volatile i32 0, ptr %13, align 4, !tbaa !14
  %14 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %11, i64 0, i64 %12, i32 3
  %15 = load volatile i32, ptr %14, align 4, !tbaa !16
  %16 = and i32 %15, -129
  store volatile i32 %16, ptr %14, align 4, !tbaa !16
  br label %26

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

25:                                               ; preds = %7
  store volatile i32 7, ptr %8, align 8, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %25, %17, %9
  %27 = load volatile i32, ptr %8, align 8, !tbaa !12
  %28 = icmp eq i32 %27, 7
  br i1 %28, label %102, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %0, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %30, i64 128
  %32 = zext i32 %1 to i64
  %33 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %31, i64 0, i64 %32, i32 23
  %34 = load volatile i32, ptr %33, align 4, !tbaa !14
  %35 = getelementptr inbounds [5 x %struct.HRTIM_Timerx_TypeDef], ptr %31, i64 0, i64 %32, i32 24
  %36 = load volatile i32, ptr %35, align 4, !tbaa !17
  %37 = icmp eq i32 %34, 0
  %38 = icmp eq i32 %36, 0
  %or.cond = select i1 %37, i1 %38, i1 false
  br i1 %or.cond, label %39, label %101

39:                                               ; preds = %29
  %40 = getelementptr inbounds [6 x i32], ptr @TimerIdxToTimerId, i64 0, i64 %32
  %41 = load i32, ptr %40, align 4, !tbaa !18
  %42 = and i32 %41, 65536
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %46, label %43

43:                                               ; preds = %39
  %44 = load volatile i32, ptr %30, align 4, !tbaa !19
  %45 = and i32 %44, -65537
  store volatile i32 %45, ptr %30, align 4, !tbaa !19
  %.pre = load i32, ptr %40, align 4, !tbaa !18
  br label %46

46:                                               ; preds = %43, %39
  %47 = phi i32 [ %.pre, %43 ], [ %41, %39 ]
  %48 = and i32 %47, 131072
  %.not41 = icmp eq i32 %48, 0
  br i1 %.not41, label %57, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i8, ptr %30, i64 916
  %51 = load volatile i32, ptr %50, align 4, !tbaa !23
  %52 = and i32 %51, 3
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %57

54:                                               ; preds = %49
  %55 = load volatile i32, ptr %30, align 4, !tbaa !19
  %56 = and i32 %55, -131073
  store volatile i32 %56, ptr %30, align 4, !tbaa !19
  %.pre46 = load i32, ptr %40, align 4, !tbaa !18
  br label %57

57:                                               ; preds = %49, %54, %46
  %58 = phi i32 [ %47, %49 ], [ %.pre46, %54 ], [ %47, %46 ]
  %59 = and i32 %58, 262144
  %.not42 = icmp eq i32 %59, 0
  br i1 %.not42, label %68, label %60

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %30, i64 916
  %62 = load volatile i32, ptr %61, align 4, !tbaa !23
  %63 = and i32 %62, 12
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %60
  %66 = load volatile i32, ptr %30, align 4, !tbaa !19
  %67 = and i32 %66, -262145
  store volatile i32 %67, ptr %30, align 4, !tbaa !19
  %.pre47 = load i32, ptr %40, align 4, !tbaa !18
  br label %68

68:                                               ; preds = %60, %65, %57
  %69 = phi i32 [ %58, %60 ], [ %.pre47, %65 ], [ %58, %57 ]
  %70 = and i32 %69, 524288
  %.not43 = icmp eq i32 %70, 0
  br i1 %.not43, label %79, label %71

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %30, i64 916
  %73 = load volatile i32, ptr %72, align 4, !tbaa !23
  %74 = and i32 %73, 48
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %79

76:                                               ; preds = %71
  %77 = load volatile i32, ptr %30, align 4, !tbaa !19
  %78 = and i32 %77, -524289
  store volatile i32 %78, ptr %30, align 4, !tbaa !19
  %.pre48 = load i32, ptr %40, align 4, !tbaa !18
  br label %79

79:                                               ; preds = %71, %76, %68
  %80 = phi i32 [ %69, %71 ], [ %.pre48, %76 ], [ %69, %68 ]
  %81 = and i32 %80, 1048576
  %.not44 = icmp eq i32 %81, 0
  br i1 %.not44, label %90, label %82

82:                                               ; preds = %79
  %83 = getelementptr inbounds i8, ptr %30, i64 916
  %84 = load volatile i32, ptr %83, align 4, !tbaa !23
  %85 = and i32 %84, 192
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %90

87:                                               ; preds = %82
  %88 = load volatile i32, ptr %30, align 4, !tbaa !19
  %89 = and i32 %88, -1048577
  store volatile i32 %89, ptr %30, align 4, !tbaa !19
  %.pre49 = load i32, ptr %40, align 4, !tbaa !18
  br label %90

90:                                               ; preds = %82, %87, %79
  %91 = phi i32 [ %80, %82 ], [ %.pre49, %87 ], [ %80, %79 ]
  %92 = and i32 %91, 2097152
  %.not45 = icmp eq i32 %92, 0
  br i1 %.not45, label %101, label %93

93:                                               ; preds = %90
  %94 = getelementptr inbounds i8, ptr %30, i64 916
  %95 = load volatile i32, ptr %94, align 4, !tbaa !23
  %96 = and i32 %95, 768
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %101

98:                                               ; preds = %93
  %99 = load volatile i32, ptr %30, align 4, !tbaa !19
  %100 = and i32 %99, -2097153
  store volatile i32 %100, ptr %30, align 4, !tbaa !19
  br label %101

101:                                              ; preds = %90, %98, %93, %29
  store volatile i32 1, ptr %8, align 8, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %26, %3, %101
  %.0 = phi i32 [ 0, %101 ], [ 2, %3 ], [ 1, %26 ]
  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 196}
!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 200}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !11, i64 92}
!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, !8, i64 108}
!16 = !{!15, !11, i64 12}
!17 = !{!15, !11, i64 96}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !11, i64 0}
!20 = !{!"", !21, i64 0, !8, i64 128, !8, i64 768, !22, i64 896}
!21 = !{!"", !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}
!22 = !{!"", !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}
!23 = !{!20, !11, i64 916}


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