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

; 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.HASH_HandleTypeDef = type { %struct.HASH_InitTypeDef, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, i32 }
%struct.HASH_InitTypeDef = type { i32, i32, ptr }
%struct.HASH_TypeDef = type { i32, i32, i32, [5 x i32], i32, i32, [52 x i32], [54 x i32] }
%struct.__DMA_HandleTypeDef = type { ptr, %struct.DMA_InitTypeDef, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32 }
%struct.DMA_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

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

20:                                               ; preds = %4
  %21 = load i32, ptr %13, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 8
  br i1 %22, label %23, label %272

23:                                               ; preds = %20, %4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %61, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %61, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %30, i32 0, i32 0
  %32 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %31, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = icmp eq ptr %33, null
  br i1 %34, label %61, label %35

35:                                               ; preds = %29
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !15
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %61, label %41

41:                                               ; preds = %35
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %42, i32 0, i32 10
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = icmp ne i32 %44, 1
  br i1 %45, label %46, label %64

46:                                               ; preds = %41
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %47, i32 0, i32 10
  %49 = load i32, ptr %48, align 4, !tbaa !16
  %50 = icmp eq i32 %49, 3
  br i1 %50, label %64, label %51

51:                                               ; preds = %46
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %52, i32 0, i32 10
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = icmp eq i32 %54, 4
  br i1 %55, label %64, label %56

56:                                               ; preds = %51
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %57, i32 0, i32 10
  %59 = load i32, ptr %58, align 4, !tbaa !16
  %60 = icmp eq i32 %59, 5
  br i1 %60, label %64, label %61

61:                                               ; preds = %56, %35, %29, %26, %23
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %62, i32 0, i32 13
  store volatile i32 1, ptr %63, align 4, !tbaa !11
  store i32 1, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %273

64:                                               ; preds = %56, %51, %46, %41
  br label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %66, i32 0, i32 12
  %68 = load i32, ptr %67, align 8, !tbaa !17
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %71

70:                                               ; preds = %65
  store i32 2, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %273

71:                                               ; preds = %65
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %72, i32 0, i32 12
  store i32 1, ptr %73, align 8, !tbaa !17
  br label %74

74:                                               ; preds = %71
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %77, i32 0, i32 13
  %79 = load volatile i32, ptr %78, align 4, !tbaa !11
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %207

81:                                               ; preds = %76
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %82, i32 0, i32 10
  %84 = load i32, ptr %83, align 4, !tbaa !16
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %163

86:                                               ; preds = %81
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %87, i32 0, i32 13
  store volatile i32 2, ptr %88, align 4, !tbaa !11
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !15
  %93 = icmp ugt i32 %92, 64
  br i1 %93, label %94, label %105

94:                                               ; preds = %86
  %95 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %96 = zext i32 %95 to i64
  %97 = and i64 %96, -336069
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = or i64 %99, 64
  %101 = or i64 %100, 65536
  %102 = or i64 %101, 4
  %103 = or i64 %97, %102
  %104 = trunc i64 %103 to i32
  store volatile i32 %104, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  br label %115

105:                                              ; preds = %86
  %106 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %107 = zext i32 %106 to i64
  %108 = and i64 %107, -336069
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = or i64 %110, 64
  %112 = or i64 %111, 4
  %113 = or i64 %108, %112
  %114 = trunc i64 %113 to i32
  store volatile i32 %114, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  br label %115

115:                                              ; preds = %105, %94
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !15
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %120, i32 0, i32 6
  store volatile i32 %119, ptr %121, align 4, !tbaa !20
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !14
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %126, i32 0, i32 3
  store ptr %125, ptr %127, align 8, !tbaa !21
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !14
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %132, i32 0, i32 1
  store ptr %131, ptr %133, align 8, !tbaa !22
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %135, i32 0, i32 4
  store ptr %134, ptr %136, align 8, !tbaa !23
  %137 = load i32, ptr %8, align 4, !tbaa !9
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %138, i32 0, i32 5
  store i32 %137, ptr %139, align 8, !tbaa !24
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !14
  %144 = ptrtoint ptr %143 to i32
  store i32 %144, ptr %10, align 4, !tbaa !9
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !15
  store i32 %148, ptr %11, align 4, !tbaa !9
  %149 = load volatile i32, ptr getelementptr inbounds (%struct.HASH_TypeDef, ptr inttoptr (i64 1208095744 to ptr), i32 0, i32 2), align 4, !tbaa !25
  %150 = zext i32 %149 to i64
  %151 = and i64 %150, -32
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.HASH_InitTypeDef, ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !15
  %156 = urem i32 %155, 4
  %157 = mul i32 8, %156
  %158 = zext i32 %157 to i64
  %159 = or i64 %151, %158
  %160 = trunc i64 %159 to i32
  store volatile i32 %160, ptr getelementptr inbounds (%struct.HASH_TypeDef, ptr inttoptr (i64 1208095744 to ptr), i32 0, i32 2), align 4, !tbaa !25
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %161, i32 0, i32 10
  store i32 3, ptr %162, align 4, !tbaa !16
  br label %206

163:                                              ; preds = %81
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %164, i32 0, i32 10
  %166 = load i32, ptr %165, align 4, !tbaa !16
  %167 = icmp eq i32 %166, 4
  br i1 %167, label %168, label %199

168:                                              ; preds = %163
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %169, i32 0, i32 13
  store volatile i32 2, ptr %170, align 4, !tbaa !11
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %172, i32 0, i32 6
  store volatile i32 %171, ptr %173, align 4, !tbaa !20
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %175, i32 0, i32 1
  store ptr %174, ptr %176, align 8, !tbaa !22
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = ptrtoint ptr %177 to i32
  store i32 %178, ptr %10, align 4, !tbaa !9
  %179 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %179, ptr %11, align 4, !tbaa !9
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %180, i32 0, i32 15
  %182 = load i32, ptr %181, align 4, !tbaa !26
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %198

184:                                              ; preds = %168
  %185 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %186 = zext i32 %185 to i64
  %187 = and i64 %186, -8193
  %188 = trunc i64 %187 to i32
  store volatile i32 %188, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %189 = load volatile i32, ptr getelementptr inbounds (%struct.HASH_TypeDef, ptr inttoptr (i64 1208095744 to ptr), i32 0, i32 2), align 4, !tbaa !25
  %190 = zext i32 %189 to i64
  %191 = and i64 %190, -32
  %192 = load i32, ptr %11, align 4, !tbaa !9
  %193 = urem i32 %192, 4
  %194 = mul i32 8, %193
  %195 = zext i32 %194 to i64
  %196 = or i64 %191, %195
  %197 = trunc i64 %196 to i32
  store volatile i32 %197, ptr getelementptr inbounds (%struct.HASH_TypeDef, ptr inttoptr (i64 1208095744 to ptr), i32 0, i32 2), align 4, !tbaa !25
  br label %198

198:                                              ; preds = %184, %168
  br label %205

199:                                              ; preds = %163
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %201, i32 0, i32 12
  store i32 0, ptr %202, align 8, !tbaa !17
  br label %203

203:                                              ; preds = %200
  br label %204

204:                                              ; preds = %203
  store i32 1, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %273

205:                                              ; preds = %198
  br label %206

206:                                              ; preds = %205, %115
  br label %217

207:                                              ; preds = %76
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %208, i32 0, i32 13
  store volatile i32 2, ptr %209, align 4, !tbaa !11
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %210, i32 0, i32 1
  %212 = load ptr, ptr %211, align 8, !tbaa !22
  %213 = ptrtoint ptr %212 to i32
  store i32 %213, ptr %10, align 4, !tbaa !9
  %214 = load ptr, ptr %6, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %214, i32 0, i32 6
  %216 = load volatile i32, ptr %215, align 4, !tbaa !20
  store i32 %216, ptr %11, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %207, %206
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %218, i32 0, i32 11
  %220 = load ptr, ptr %219, align 8, !tbaa !27
  %221 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %220, i32 0, i32 5
  store ptr @HASH_DMAXferCplt, ptr %221, align 8, !tbaa !28
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %222, i32 0, i32 11
  %224 = load ptr, ptr %223, align 8, !tbaa !27
  %225 = getelementptr inbounds %struct.__DMA_HandleTypeDef, ptr %224, i32 0, i32 9
  store ptr @HASH_DMAError, ptr %225, align 8, !tbaa !31
  %226 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %227 = zext i32 %226 to i64
  %228 = and i64 %227, 3840
  %229 = lshr i64 %228, 8
  %230 = trunc i64 %229 to i32
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %231, i32 0, i32 16
  store volatile i32 %230, ptr %232, align 8, !tbaa !32
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %233, i32 0, i32 11
  %235 = load ptr, ptr %234, align 8, !tbaa !27
  %236 = load i32, ptr %10, align 4, !tbaa !9
  %237 = load i32, ptr %11, align 4, !tbaa !9
  %238 = urem i32 %237, 4
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %247

240:                                              ; preds = %217
  %241 = load i32, ptr %11, align 4, !tbaa !9
  %242 = load i32, ptr %11, align 4, !tbaa !9
  %243 = urem i32 %242, 4
  %244 = sub i32 4, %243
  %245 = add i32 %241, %244
  %246 = udiv i32 %245, 4
  br label %250

247:                                              ; preds = %217
  %248 = load i32, ptr %11, align 4, !tbaa !9
  %249 = udiv i32 %248, 4
  br label %250

250:                                              ; preds = %247, %240
  %251 = phi i32 [ %246, %240 ], [ %249, %247 ]
  %252 = call i32 @HAL_DMA_Start_IT(ptr noundef %235, i32 noundef %236, i32 noundef ptrtoint (ptr getelementptr inbounds (%struct.HASH_TypeDef, ptr inttoptr (i64 1208095744 to ptr), i32 0, i32 1) to i32), i32 noundef %251)
  store i32 %252, ptr %12, align 4, !tbaa !9
  %253 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  %254 = zext i32 %253 to i64
  %255 = or i64 %254, 8
  %256 = trunc i64 %255 to i32
  store volatile i32 %256, ptr inttoptr (i64 1208095744 to ptr), align 4, !tbaa !18
  br label %257

257:                                              ; preds = %250
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %258, i32 0, i32 12
  store i32 0, ptr %259, align 8, !tbaa !17
  br label %260

260:                                              ; preds = %257
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %12, align 4, !tbaa !9
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %264, label %267

264:                                              ; preds = %261
  %265 = load ptr, ptr %6, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %265, i32 0, i32 13
  store volatile i32 7, ptr %266, align 4, !tbaa !11
  br label %270

267:                                              ; preds = %261
  %268 = load ptr, ptr %6, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.HASH_HandleTypeDef, ptr %268, i32 0, i32 13
  store volatile i32 1, ptr %269, align 4, !tbaa !11
  br label %270

270:                                              ; preds = %267, %264
  %271 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %271, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %273

272:                                              ; preds = %20
  store i32 2, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %273

273:                                              ; preds = %272, %270, %204, %70, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %274 = load i32, ptr %5, align 4
  ret i32 %274
}

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

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

; Function Attrs: nounwind uwtable
declare hidden void @HASH_DMAXferCplt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @HASH_DMAError(ptr noundef) #0

declare i32 @HAL_DMA_Start_IT(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

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" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 #3 = { 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 84}
!12 = !{!"", !13, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !6, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100}
!13 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !10, i64 4}
!16 = !{!12, !10, i64 68}
!17 = !{!12, !10, i64 80}
!18 = !{!19, !10, i64 0}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 248}
!20 = !{!12, !10, i64 52}
!21 = !{!12, !6, i64 32}
!22 = !{!12, !6, i64 16}
!23 = !{!12, !6, i64 40}
!24 = !{!12, !10, i64 48}
!25 = !{!19, !10, i64 8}
!26 = !{!12, !10, i64 92}
!27 = !{!12, !6, i64 72}
!28 = !{!29, !6, i64 72}
!29 = !{!"__DMA_HandleTypeDef", !6, i64 0, !30, i64 8, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !10, i64 124, !10, i64 128, !6, i64 136, !6, i64 144, !10, i64 152, !6, i64 160, !6, i64 168, !10, i64 176}
!30 = !{!"", !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}
!31 = !{!29, !6, i64 104}
!32 = !{!12, !10, i64 96}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @HMAC_Start_DMA(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 84
  %6 = load volatile i32, ptr %5, align 4, !tbaa !5
  switch i32 %6, label %83 [
    i32 8, label %7
    i32 1, label %7
  ]

7:                                                ; preds = %4, %4
  %8 = icmp eq ptr %1, null
  %9 = icmp eq i32 %2, 0
  %or.cond3 = or i1 %8, %9
  br i1 %or.cond3, label %21, label %10

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = icmp eq ptr %12, null
  br i1 %13, label %21, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !13
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %21, label %18

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %0, i64 68
  %20 = load i32, ptr %19, align 4, !tbaa !14
  switch i32 %20, label %21 [
    i32 1, label %22
    i32 3, label %22
    i32 4, label %22
    i32 5, label %22
  ]

21:                                               ; preds = %18, %14, %10, %7
  store volatile i32 1, ptr %5, align 4, !tbaa !5
  br label %83

22:                                               ; preds = %18, %18, %18, %18
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = load i32, ptr %23, align 8, !tbaa !15
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %83, label %26

26:                                               ; preds = %22
  store i32 1, ptr %23, align 8, !tbaa !15
  %27 = load volatile i32, ptr %5, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 1
  br i1 %28, label %29, label %61

29:                                               ; preds = %26
  switch i32 %20, label %60 [
    i32 1, label %30
    i32 4, label %46
  ]

30:                                               ; preds = %29
  store volatile i32 2, ptr %5, align 4, !tbaa !5
  %31 = icmp ugt i32 %16, 64
  %32 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %33 = and i32 %32, -336069
  %34 = or i32 %33, %3
  %. = select i1 %31, i32 65604, i32 68
  %35 = or i32 %34, %.
  store volatile i32 %35, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %0, i64 52
  store volatile i32 %16, ptr %36, align 4, !tbaa !18
  %37 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %12, ptr %37, align 8, !tbaa !19
  %38 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %12, ptr %38, align 8, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %1, ptr %39, align 8, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %2, ptr %40, align 8, !tbaa !22
  %41 = load volatile i32, ptr inttoptr (i64 1208095752 to ptr), align 8, !tbaa !23
  %42 = and i32 %41, -32
  %43 = shl i32 %16, 3
  %44 = and i32 %43, 24
  %45 = or disjoint i32 %42, %44
  store volatile i32 %45, ptr inttoptr (i64 1208095752 to ptr), align 8, !tbaa !23
  store i32 3, ptr %19, align 4, !tbaa !14
  br label %66

46:                                               ; preds = %29
  store volatile i32 2, ptr %5, align 4, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %0, i64 52
  store volatile i32 %2, ptr %47, align 4, !tbaa !18
  %48 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %1, ptr %48, align 8, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %0, i64 92
  %50 = load i32, ptr %49, align 4, !tbaa !24
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %66

52:                                               ; preds = %46
  %53 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %54 = and i32 %53, -8193
  store volatile i32 %54, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %55 = load volatile i32, ptr inttoptr (i64 1208095752 to ptr), align 8, !tbaa !23
  %56 = and i32 %55, -32
  %57 = shl i32 %2, 3
  %58 = and i32 %57, 24
  %59 = or disjoint i32 %56, %58
  store volatile i32 %59, ptr inttoptr (i64 1208095752 to ptr), align 8, !tbaa !23
  br label %66

60:                                               ; preds = %29
  store i32 0, ptr %23, align 8, !tbaa !15
  br label %83

61:                                               ; preds = %26
  store volatile i32 2, ptr %5, align 4, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %0, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %0, i64 52
  %65 = load volatile i32, ptr %64, align 4, !tbaa !18
  br label %66

66:                                               ; preds = %30, %46, %52, %61
  %.066 = phi i32 [ %16, %30 ], [ %2, %52 ], [ %2, %46 ], [ %65, %61 ]
  %.065.in.in = phi ptr [ %12, %30 ], [ %1, %52 ], [ %1, %46 ], [ %63, %61 ]
  %.065.in = ptrtoint ptr %.065.in.in to i64
  %.065 = trunc i64 %.065.in to i32
  %67 = getelementptr inbounds i8, ptr %0, i64 72
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = getelementptr inbounds i8, ptr %68, i64 72
  store ptr @HASH_DMAXferCplt, ptr %69, align 8, !tbaa !26
  %70 = getelementptr inbounds i8, ptr %68, i64 104
  store ptr @HASH_DMAError, ptr %70, align 8, !tbaa !29
  %71 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %72 = lshr i32 %71, 8
  %73 = and i32 %72, 15
  %74 = getelementptr inbounds i8, ptr %0, i64 96
  store volatile i32 %73, ptr %74, align 8, !tbaa !30
  %75 = and i32 %.066, 3
  %.not72 = icmp eq i32 %75, 0
  %76 = add i32 %.066, 4
  %.in = select i1 %.not72, i32 %.066, i32 %76
  %77 = lshr i32 %.in, 2
  %78 = tail call i32 @HAL_DMA_Start_IT(ptr noundef %68, i32 noundef %.065, i32 noundef 1208095748, i32 noundef %77) #2
  %79 = load volatile i32, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  %80 = or i32 %79, 8
  store volatile i32 %80, ptr inttoptr (i64 1208095744 to ptr), align 1024, !tbaa !16
  store i32 0, ptr %23, align 8, !tbaa !15
  %.not73 = icmp eq i32 %78, 0
  br i1 %.not73, label %82, label %81

81:                                               ; preds = %66
  store volatile i32 7, ptr %5, align 4, !tbaa !5
  br label %83

82:                                               ; preds = %66
  store volatile i32 1, ptr %5, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %4, %81, %82, %22, %60, %21
  %.0 = phi i32 [ 1, %21 ], [ 1, %60 ], [ 2, %22 ], [ 0, %82 ], [ %78, %81 ], [ 2, %4 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @HASH_DMAXferCplt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @HASH_DMAError(ptr noundef) #0

declare i32 @HAL_DMA_Start_IT(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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" }
attributes #1 = { "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, !8, i64 84}
!6 = !{!"", !7, i64 0, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !8, i64 48, !8, i64 52, !8, i64 56, !8, i64 60, !8, i64 64, !8, i64 68, !11, i64 72, !8, i64 80, !8, i64 84, !8, i64 88, !8, i64 92, !8, i64 96, !8, i64 100}
!7 = !{!"", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !11, i64 8}
!13 = !{!6, !8, i64 4}
!14 = !{!6, !8, i64 68}
!15 = !{!6, !8, i64 80}
!16 = !{!17, !8, i64 0}
!17 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !9, i64 12, !8, i64 32, !8, i64 36, !9, i64 40, !9, i64 248}
!18 = !{!6, !8, i64 52}
!19 = !{!6, !11, i64 32}
!20 = !{!6, !11, i64 16}
!21 = !{!6, !11, i64 40}
!22 = !{!6, !8, i64 48}
!23 = !{!17, !8, i64 8}
!24 = !{!6, !8, i64 92}
!25 = !{!6, !11, i64 72}
!26 = !{!27, !11, i64 72}
!27 = !{!"__DMA_HandleTypeDef", !11, i64 0, !28, i64 8, !8, i64 56, !8, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !8, i64 120, !8, i64 124, !8, i64 128, !11, i64 136, !11, i64 144, !8, i64 152, !11, i64 160, !11, i64 168, !8, i64 176}
!28 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !8, i64 40, !8, i64 44}
!29 = !{!27, !11, i64 104}
!30 = !{!6, !8, i64 96}


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