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

; 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.FDCAN_HandleTypeDef = type { ptr, ptr, %struct.FDCAN_InitTypeDef, %struct.FDCAN_MsgRamAddressTypeDef, i32, i32, i32, i32 }
%struct.FDCAN_InitTypeDef = 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.FDCAN_MsgRamAddressTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.FDCAN_GlobalTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], i32, i32, i32, i32, i32, i32, i32, i32, [8 x 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, [2 x i32], i32, i32, i32, i32 }
%struct.FDCAN_RxHeaderTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@DLCtoBytes = external hidden constant [16 x i8], 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_FDCAN_GetRxMessage(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %16, i32 0, i32 5
  %18 = load volatile i32, ptr %17, align 8, !tbaa !11
  store i32 %18, ptr %14, align 4, !tbaa !9
  %19 = load i32, ptr %14, align 4, !tbaa !9
  %20 = icmp eq i32 %19, 2
  br i1 %20, label %21, label %296

21:                                               ; preds = %4
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 64
  br i1 %23, label %24, label %77

24:                                               ; preds = %21
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %27, i32 0, i32 30
  %29 = load volatile i32, ptr %28, align 4, !tbaa !16
  %30 = zext i32 %29 to i64
  %31 = and i64 %30, 8323072
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %24
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %34, i32 0, i32 7
  %36 = load volatile i32, ptr %35, align 8, !tbaa !18
  %37 = or i32 %36, 32
  store volatile i32 %37, ptr %35, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

38:                                               ; preds = %24
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %41, i32 0, i32 31
  %43 = load volatile i32, ptr %42, align 4, !tbaa !19
  %44 = zext i32 %43 to i64
  %45 = and i64 %44, 127
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %47, label %52

47:                                               ; preds = %38
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %48, i32 0, i32 7
  %50 = load volatile i32, ptr %49, align 8, !tbaa !18
  %51 = or i32 %50, 256
  store volatile i32 %51, ptr %49, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

52:                                               ; preds = %38
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %55, i32 0, i32 31
  %57 = load volatile i32, ptr %56, align 4, !tbaa !19
  %58 = zext i32 %57 to i64
  %59 = and i64 %58, 16128
  %60 = lshr i64 %59, 8
  %61 = trunc i64 %60 to i32
  store i32 %61, ptr %13, align 4, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %62, i32 0, i32 3
  %64 = getelementptr inbounds %struct.FDCAN_MsgRamAddressTypeDef, ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 4, !tbaa !20
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds %struct.FDCAN_InitTypeDef, ptr %68, i32 0, i32 17
  %70 = load i32, ptr %69, align 4, !tbaa !21
  %71 = mul i32 %66, %70
  %72 = mul i32 %71, 4
  %73 = add i32 %65, %72
  %74 = zext i32 %73 to i64
  %75 = inttoptr i64 %74 to ptr
  store ptr %75, ptr %10, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %52
  br label %162

77:                                               ; preds = %21
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = icmp eq i32 %78, 65
  br i1 %79, label %80, label %133

80:                                               ; preds = %77
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !15
  %84 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %83, i32 0, i32 34
  %85 = load volatile i32, ptr %84, align 4, !tbaa !22
  %86 = zext i32 %85 to i64
  %87 = and i64 %86, 8323072
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %94

89:                                               ; preds = %80
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %90, i32 0, i32 7
  %92 = load volatile i32, ptr %91, align 8, !tbaa !18
  %93 = or i32 %92, 32
  store volatile i32 %93, ptr %91, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

94:                                               ; preds = %80
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %97, i32 0, i32 35
  %99 = load volatile i32, ptr %98, align 4, !tbaa !23
  %100 = zext i32 %99 to i64
  %101 = and i64 %100, 127
  %102 = icmp eq i64 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %94
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %104, i32 0, i32 7
  %106 = load volatile i32, ptr %105, align 8, !tbaa !18
  %107 = or i32 %106, 256
  store volatile i32 %107, ptr %105, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

108:                                              ; preds = %94
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  %112 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %111, i32 0, i32 35
  %113 = load volatile i32, ptr %112, align 4, !tbaa !23
  %114 = zext i32 %113 to i64
  %115 = and i64 %114, 16128
  %116 = lshr i64 %115, 8
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr %13, align 4, !tbaa !9
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %118, i32 0, i32 3
  %120 = getelementptr inbounds %struct.FDCAN_MsgRamAddressTypeDef, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 4, !tbaa !24
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %123, i32 0, i32 2
  %125 = getelementptr inbounds %struct.FDCAN_InitTypeDef, ptr %124, i32 0, i32 19
  %126 = load i32, ptr %125, align 4, !tbaa !25
  %127 = mul i32 %122, %126
  %128 = mul i32 %127, 4
  %129 = add i32 %121, %128
  %130 = zext i32 %129 to i64
  %131 = inttoptr i64 %130 to ptr
  store ptr %131, ptr %10, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %108
  br label %161

133:                                              ; preds = %77
  %134 = load i32, ptr %7, align 4, !tbaa !9
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds %struct.FDCAN_InitTypeDef, ptr %136, i32 0, i32 20
  %138 = load i32, ptr %137, align 8, !tbaa !26
  %139 = icmp uge i32 %134, %138
  br i1 %139, label %140, label %145

140:                                              ; preds = %133
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %141, i32 0, i32 7
  %143 = load volatile i32, ptr %142, align 8, !tbaa !18
  %144 = or i32 %143, 32
  store volatile i32 %144, ptr %142, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

145:                                              ; preds = %133
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %146, i32 0, i32 3
  %148 = getelementptr inbounds %struct.FDCAN_MsgRamAddressTypeDef, ptr %147, i32 0, i32 4
  %149 = load i32, ptr %148, align 4, !tbaa !27
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %151, i32 0, i32 2
  %153 = getelementptr inbounds %struct.FDCAN_InitTypeDef, ptr %152, i32 0, i32 21
  %154 = load i32, ptr %153, align 4, !tbaa !28
  %155 = mul i32 %150, %154
  %156 = mul i32 %155, 4
  %157 = add i32 %149, %156
  %158 = zext i32 %157 to i64
  %159 = inttoptr i64 %158 to ptr
  store ptr %159, ptr %10, align 8, !tbaa !5
  br label %160

160:                                              ; preds = %145
  br label %161

161:                                              ; preds = %160, %132
  br label %162

162:                                              ; preds = %161, %76
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = and i32 %164, 1073741824
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %166, i32 0, i32 1
  store i32 %165, ptr %167, align 4, !tbaa !29
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %168, i32 0, i32 1
  %170 = load i32, ptr %169, align 4, !tbaa !29
  %171 = icmp eq i32 %170, 0
  br i1 %171, label %172, label %179

172:                                              ; preds = %162
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = load i32, ptr %173, align 4, !tbaa !9
  %175 = and i32 %174, 536608768
  %176 = lshr i32 %175, 18
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %177, i32 0, i32 0
  store i32 %176, ptr %178, align 4, !tbaa !30
  br label %185

179:                                              ; preds = %162
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = and i32 %181, 536870911
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %183, i32 0, i32 0
  store i32 %182, ptr %184, align 4, !tbaa !30
  br label %185

185:                                              ; preds = %179, %172
  %186 = load ptr, ptr %10, align 8, !tbaa !5
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = and i32 %187, 536870912
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %189, i32 0, i32 2
  store i32 %188, ptr %190, align 4, !tbaa !31
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = and i32 %192, -2147483648
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %194, i32 0, i32 4
  store i32 %193, ptr %195, align 4, !tbaa !32
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = getelementptr inbounds i32, ptr %196, i32 1
  store ptr %197, ptr %10, align 8, !tbaa !5
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = and i32 %199, 65535
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %201, i32 0, i32 7
  store i32 %200, ptr %202, align 4, !tbaa !33
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = and i32 %204, 983040
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %206, i32 0, i32 3
  store i32 %205, ptr %207, align 4, !tbaa !34
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = load i32, ptr %208, align 4, !tbaa !9
  %210 = and i32 %209, 1048576
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %211, i32 0, i32 5
  store i32 %210, ptr %212, align 4, !tbaa !35
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = load i32, ptr %213, align 4, !tbaa !9
  %215 = and i32 %214, 2097152
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %216, i32 0, i32 6
  store i32 %215, ptr %217, align 4, !tbaa !36
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = and i32 %219, 2130706432
  %221 = lshr i32 %220, 24
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %222, i32 0, i32 8
  store i32 %221, ptr %223, align 4, !tbaa !37
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = and i32 %225, -2147483648
  %227 = lshr i32 %226, 31
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %228, i32 0, i32 9
  store i32 %227, ptr %229, align 4, !tbaa !38
  %230 = load ptr, ptr %10, align 8, !tbaa !5
  %231 = getelementptr inbounds i32, ptr %230, i32 1
  store ptr %231, ptr %10, align 8, !tbaa !5
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %232, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %254, %185
  %234 = load i32, ptr %12, align 4, !tbaa !9
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.FDCAN_RxHeaderTypeDef, ptr %235, i32 0, i32 3
  %237 = load i32, ptr %236, align 4, !tbaa !34
  %238 = lshr i32 %237, 16
  %239 = zext i32 %238 to i64
  %240 = getelementptr inbounds [16 x i8], ptr @DLCtoBytes, i64 0, i64 %239
  %241 = load i8, ptr %240, align 1, !tbaa !39
  %242 = zext i8 %241 to i32
  %243 = icmp ult i32 %234, %242
  br i1 %243, label %244, label %257

244:                                              ; preds = %233
  %245 = load ptr, ptr %11, align 8, !tbaa !5
  %246 = load i32, ptr %12, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds i8, ptr %245, i64 %247
  %249 = load i8, ptr %248, align 1, !tbaa !39
  %250 = load ptr, ptr %9, align 8, !tbaa !5
  %251 = load i32, ptr %12, align 4, !tbaa !9
  %252 = zext i32 %251 to i64
  %253 = getelementptr inbounds i8, ptr %250, i64 %252
  store i8 %249, ptr %253, align 1, !tbaa !39
  br label %254

254:                                              ; preds = %244
  %255 = load i32, ptr %12, align 4, !tbaa !9
  %256 = add i32 %255, 1
  store i32 %256, ptr %12, align 4, !tbaa !9
  br label %233, !llvm.loop !40

257:                                              ; preds = %233
  %258 = load i32, ptr %7, align 4, !tbaa !9
  %259 = icmp eq i32 %258, 64
  br i1 %259, label %260, label %266

260:                                              ; preds = %257
  %261 = load i32, ptr %13, align 4, !tbaa !9
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !15
  %265 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %264, i32 0, i32 32
  store volatile i32 %261, ptr %265, align 4, !tbaa !42
  br label %295

266:                                              ; preds = %257
  %267 = load i32, ptr %7, align 4, !tbaa !9
  %268 = icmp eq i32 %267, 65
  br i1 %268, label %269, label %275

269:                                              ; preds = %266
  %270 = load i32, ptr %13, align 4, !tbaa !9
  %271 = load ptr, ptr %6, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %271, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8, !tbaa !15
  %274 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %273, i32 0, i32 36
  store volatile i32 %270, ptr %274, align 4, !tbaa !43
  br label %294

275:                                              ; preds = %266
  %276 = load i32, ptr %7, align 4, !tbaa !9
  %277 = icmp ult i32 %276, 32
  br i1 %277, label %278, label %285

278:                                              ; preds = %275
  %279 = load i32, ptr %7, align 4, !tbaa !9
  %280 = shl i32 1, %279
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %282, align 8, !tbaa !15
  %284 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %283, i32 0, i32 28
  store volatile i32 %280, ptr %284, align 4, !tbaa !44
  br label %293

285:                                              ; preds = %275
  %286 = load i32, ptr %7, align 4, !tbaa !9
  %287 = and i32 %286, 31
  %288 = shl i32 1, %287
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %289, i32 0, i32 0
  %291 = load ptr, ptr %290, align 8, !tbaa !15
  %292 = getelementptr inbounds %struct.FDCAN_GlobalTypeDef, ptr %291, i32 0, i32 29
  store volatile i32 %288, ptr %292, align 4, !tbaa !45
  br label %293

293:                                              ; preds = %285, %278
  br label %294

294:                                              ; preds = %293, %269
  br label %295

295:                                              ; preds = %294, %260
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

296:                                              ; preds = %4
  %297 = load ptr, ptr %6, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.FDCAN_HandleTypeDef, ptr %297, i32 0, i32 7
  %299 = load volatile i32, ptr %298, align 8, !tbaa !18
  %300 = or i32 %299, 8
  store volatile i32 %300, ptr %298, align 8, !tbaa !18
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %301

301:                                              ; preds = %296, %295, %140, %103, %89, %47, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  %302 = load i32, ptr %5, align 4
  ret i32 %302
}

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 168}
!12 = !{!"", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 124, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176}
!13 = !{!"", !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}
!14 = !{!"", !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}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !10, i64 160}
!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, !7, i64 48, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !7, i64 232, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252}
!18 = !{!12, !10, i64 176}
!19 = !{!17, !10, i64 164}
!20 = !{!12, !10, i64 132}
!21 = !{!12, !10, i64 84}
!22 = !{!17, !10, i64 176}
!23 = !{!17, !10, i64 180}
!24 = !{!12, !10, i64 136}
!25 = !{!12, !10, i64 92}
!26 = !{!12, !10, i64 96}
!27 = !{!12, !10, i64 140}
!28 = !{!12, !10, i64 100}
!29 = !{!14, !10, i64 4}
!30 = !{!14, !10, i64 0}
!31 = !{!14, !10, i64 8}
!32 = !{!14, !10, i64 16}
!33 = !{!14, !10, i64 28}
!34 = !{!14, !10, i64 12}
!35 = !{!14, !10, i64 20}
!36 = !{!14, !10, i64 24}
!37 = !{!14, !10, i64 32}
!38 = !{!14, !10, i64 36}
!39 = !{!7, !7, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!17, !10, i64 168}
!43 = !{!17, !10, i64 184}
!44 = !{!17, !10, i64 152}
!45 = !{!17, !10, i64 156}


; 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"

@DLCtoBytes = external hidden local_unnamed_addr constant [16 x i8], align 16

; Function Attrs: nofree norecurse nounwind uwtable
define dso_local range(i32 0, 2) i32 @HAL_FDCAN_GetRxMessage(ptr noundef %0, i32 noundef %1, ptr nocapture noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 168
  %6 = load volatile i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 2
  br i1 %7, label %8, label %147

8:                                                ; preds = %4
  %9 = icmp eq i32 %1, 64
  br i1 %9, label %10, label %36

10:                                               ; preds = %8
  %11 = load ptr, ptr %0, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %11, i64 160
  %13 = load volatile i32, ptr %12, align 4, !tbaa !14
  %14 = and i32 %13, 8323072
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %20

16:                                               ; preds = %10
  %17 = getelementptr inbounds i8, ptr %0, i64 176
  %18 = load volatile i32, ptr %17, align 8, !tbaa !16
  %19 = or i32 %18, 32
  store volatile i32 %19, ptr %17, align 8, !tbaa !16
  br label %151

20:                                               ; preds = %10
  %21 = getelementptr inbounds i8, ptr %11, i64 164
  %22 = load volatile i32, ptr %21, align 4, !tbaa !17
  %23 = and i32 %22, 127
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %29

25:                                               ; preds = %20
  %26 = getelementptr inbounds i8, ptr %0, i64 176
  %27 = load volatile i32, ptr %26, align 8, !tbaa !16
  %28 = or i32 %27, 256
  store volatile i32 %28, ptr %26, align 8, !tbaa !16
  br label %151

29:                                               ; preds = %20
  %30 = load volatile i32, ptr %21, align 4, !tbaa !17
  %31 = lshr i32 %30, 8
  %32 = and i32 %31, 63
  %33 = getelementptr inbounds i8, ptr %0, i64 132
  %34 = getelementptr inbounds i8, ptr %0, i64 84
  %35 = load i32, ptr %34, align 4, !tbaa !18
  br label %75

36:                                               ; preds = %8
  %37 = icmp eq i32 %1, 65
  br i1 %37, label %38, label %64

38:                                               ; preds = %36
  %39 = load ptr, ptr %0, align 8, !tbaa !13
  %40 = getelementptr inbounds i8, ptr %39, i64 176
  %41 = load volatile i32, ptr %40, align 4, !tbaa !19
  %42 = and i32 %41, 8323072
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %48

44:                                               ; preds = %38
  %45 = getelementptr inbounds i8, ptr %0, i64 176
  %46 = load volatile i32, ptr %45, align 8, !tbaa !16
  %47 = or i32 %46, 32
  store volatile i32 %47, ptr %45, align 8, !tbaa !16
  br label %151

48:                                               ; preds = %38
  %49 = getelementptr inbounds i8, ptr %39, i64 180
  %50 = load volatile i32, ptr %49, align 4, !tbaa !20
  %51 = and i32 %50, 127
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %48
  %54 = getelementptr inbounds i8, ptr %0, i64 176
  %55 = load volatile i32, ptr %54, align 8, !tbaa !16
  %56 = or i32 %55, 256
  store volatile i32 %56, ptr %54, align 8, !tbaa !16
  br label %151

57:                                               ; preds = %48
  %58 = load volatile i32, ptr %49, align 4, !tbaa !20
  %59 = lshr i32 %58, 8
  %60 = and i32 %59, 63
  %61 = getelementptr inbounds i8, ptr %0, i64 136
  %62 = getelementptr inbounds i8, ptr %0, i64 92
  %63 = load i32, ptr %62, align 4, !tbaa !21
  br label %75

64:                                               ; preds = %36
  %65 = getelementptr inbounds i8, ptr %0, i64 96
  %66 = load i32, ptr %65, align 8, !tbaa !22
  %.not = icmp ugt i32 %66, %1
  br i1 %.not, label %71, label %67

67:                                               ; preds = %64
  %68 = getelementptr inbounds i8, ptr %0, i64 176
  %69 = load volatile i32, ptr %68, align 8, !tbaa !16
  %70 = or i32 %69, 32
  store volatile i32 %70, ptr %68, align 8, !tbaa !16
  br label %151

71:                                               ; preds = %64
  %72 = getelementptr inbounds i8, ptr %0, i64 140
  %73 = getelementptr inbounds i8, ptr %0, i64 100
  %74 = load i32, ptr %73, align 4, !tbaa !23
  br label %75

75:                                               ; preds = %57, %71, %29
  %.sink = phi i32 [ %63, %57 ], [ %1, %71 ], [ %35, %29 ]
  %.sink80 = phi i32 [ %60, %57 ], [ %74, %71 ], [ %32, %29 ]
  %.sink78.in = phi ptr [ %61, %57 ], [ %72, %71 ], [ %33, %29 ]
  %.071 = phi i32 [ %60, %57 ], [ 0, %71 ], [ %32, %29 ]
  %.sink78 = load i32, ptr %.sink78.in, align 4, !tbaa !24
  %76 = shl i32 %.sink, 2
  %77 = mul i32 %76, %.sink80
  %78 = add i32 %77, %.sink78
  %.073.in = zext i32 %78 to i64
  %.073 = inttoptr i64 %.073.in to ptr
  %79 = load i32, ptr %.073, align 4, !tbaa !24
  %80 = and i32 %79, 1073741824
  %81 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %80, ptr %81, align 4, !tbaa !25
  %82 = icmp eq i32 %80, 0
  %83 = load i32, ptr %.073, align 4, !tbaa !24
  %84 = and i32 %83, 536870911
  %85 = lshr i32 %83, 18
  %86 = and i32 %85, 2047
  %storemerge = select i1 %82, i32 %86, i32 %84
  store i32 %storemerge, ptr %2, align 4, !tbaa !26
  %87 = load i32, ptr %.073, align 4, !tbaa !24
  %88 = and i32 %87, 536870912
  %89 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 %88, ptr %89, align 4, !tbaa !27
  %90 = load i32, ptr %.073, align 4, !tbaa !24
  %91 = and i32 %90, -2147483648
  %92 = getelementptr inbounds i8, ptr %2, i64 16
  store i32 %91, ptr %92, align 4, !tbaa !28
  %93 = getelementptr inbounds i8, ptr %.073, i64 4
  %94 = load i32, ptr %93, align 4, !tbaa !24
  %95 = and i32 %94, 65535
  %96 = getelementptr inbounds i8, ptr %2, i64 28
  store i32 %95, ptr %96, align 4, !tbaa !29
  %97 = load i32, ptr %93, align 4, !tbaa !24
  %98 = and i32 %97, 983040
  %99 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 %98, ptr %99, align 4, !tbaa !30
  %100 = load i32, ptr %93, align 4, !tbaa !24
  %101 = and i32 %100, 1048576
  %102 = getelementptr inbounds i8, ptr %2, i64 20
  store i32 %101, ptr %102, align 4, !tbaa !31
  %103 = load i32, ptr %93, align 4, !tbaa !24
  %104 = and i32 %103, 2097152
  %105 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 %104, ptr %105, align 4, !tbaa !32
  %106 = load i32, ptr %93, align 4, !tbaa !24
  %107 = lshr i32 %106, 24
  %108 = and i32 %107, 127
  %109 = getelementptr inbounds i8, ptr %2, i64 32
  store i32 %108, ptr %109, align 4, !tbaa !33
  %110 = load i32, ptr %93, align 4, !tbaa !24
  %111 = lshr i32 %110, 31
  %112 = getelementptr inbounds i8, ptr %2, i64 36
  store i32 %111, ptr %112, align 4, !tbaa !34
  %113 = getelementptr inbounds i8, ptr %.073, i64 8
  %114 = lshr exact i32 %98, 16
  %115 = zext nneg i32 %114 to i64
  %116 = getelementptr inbounds [16 x i8], ptr @DLCtoBytes, i64 0, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !35
  %.not76 = icmp eq i8 %117, 0
  br i1 %.not76, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %75, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %75 ]
  %118 = getelementptr inbounds i8, ptr %113, i64 %indvars.iv
  %119 = load i8, ptr %118, align 1, !tbaa !35
  %120 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv
  store i8 %119, ptr %120, align 1, !tbaa !35
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %121 = load i32, ptr %99, align 4, !tbaa !30
  %122 = lshr i32 %121, 16
  %123 = zext nneg i32 %122 to i64
  %124 = getelementptr inbounds [16 x i8], ptr @DLCtoBytes, i64 0, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !35
  %126 = zext i8 %125 to i64
  %127 = icmp ult i64 %indvars.iv.next, %126
  br i1 %127, label %.lr.ph, label %._crit_edge, !llvm.loop !36

._crit_edge:                                      ; preds = %.lr.ph, %75
  br i1 %9, label %128, label %131

128:                                              ; preds = %._crit_edge
  %129 = load ptr, ptr %0, align 8, !tbaa !13
  %130 = getelementptr inbounds i8, ptr %129, i64 168
  store volatile i32 %.071, ptr %130, align 4, !tbaa !38
  br label %151

131:                                              ; preds = %._crit_edge
  %132 = icmp eq i32 %1, 65
  br i1 %132, label %133, label %136

133:                                              ; preds = %131
  %134 = load ptr, ptr %0, align 8, !tbaa !13
  %135 = getelementptr inbounds i8, ptr %134, i64 184
  store volatile i32 %.071, ptr %135, align 4, !tbaa !39
  br label %151

136:                                              ; preds = %131
  %137 = icmp ult i32 %1, 32
  br i1 %137, label %138, label %142

138:                                              ; preds = %136
  %139 = shl nuw i32 1, %1
  %140 = load ptr, ptr %0, align 8, !tbaa !13
  %141 = getelementptr inbounds i8, ptr %140, i64 152
  store volatile i32 %139, ptr %141, align 4, !tbaa !40
  br label %151

142:                                              ; preds = %136
  %143 = and i32 %1, 31
  %144 = shl nuw i32 1, %143
  %145 = load ptr, ptr %0, align 8, !tbaa !13
  %146 = getelementptr inbounds i8, ptr %145, i64 156
  store volatile i32 %144, ptr %146, align 4, !tbaa !41
  br label %151

147:                                              ; preds = %4
  %148 = getelementptr inbounds i8, ptr %0, i64 176
  %149 = load volatile i32, ptr %148, align 8, !tbaa !16
  %150 = or i32 %149, 8
  store volatile i32 %150, ptr %148, align 8, !tbaa !16
  br label %151

151:                                              ; preds = %128, %138, %142, %133, %147, %67, %53, %44, %25, %16
  %.0 = phi i32 [ 1, %16 ], [ 1, %25 ], [ 1, %44 ], [ 1, %53 ], [ 1, %67 ], [ 1, %147 ], [ 0, %133 ], [ 0, %142 ], [ 0, %138 ], [ 0, %128 ]
  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 168}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 124, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !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 = !{!"int", !8, i64 0}
!12 = !{!"", !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}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !11, i64 160}
!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, !8, i64 48, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !8, i64 96, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !8, i64 232, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252}
!16 = !{!6, !11, i64 176}
!17 = !{!15, !11, i64 164}
!18 = !{!6, !11, i64 84}
!19 = !{!15, !11, i64 176}
!20 = !{!15, !11, i64 180}
!21 = !{!6, !11, i64 92}
!22 = !{!6, !11, i64 96}
!23 = !{!6, !11, i64 100}
!24 = !{!11, !11, i64 0}
!25 = !{!12, !11, i64 4}
!26 = !{!12, !11, i64 0}
!27 = !{!12, !11, i64 8}
!28 = !{!12, !11, i64 16}
!29 = !{!12, !11, i64 28}
!30 = !{!12, !11, i64 12}
!31 = !{!12, !11, i64 20}
!32 = !{!12, !11, i64 24}
!33 = !{!12, !11, i64 32}
!34 = !{!12, !11, i64 36}
!35 = !{!8, !8, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!15, !11, i64 168}
!39 = !{!15, !11, i64 184}
!40 = !{!15, !11, i64 152}
!41 = !{!15, !11, i64 156}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass