; 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.CRYP_HandleTypeDef = type { ptr, %struct.CRYP_ConfigTypeDef, ptr, ptr, i16, i16, i16, i16, i32, ptr, ptr, i32, i32, i32, i32 }
%struct.CRYP_ConfigTypeDef = type { i32, i32, ptr, ptr, i32, ptr, i32, ptr, i32 }
%struct.CRYP_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, i32, i32, i32, i32, i32, i32, i32 }

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

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

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

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %18, i32 0, i32 12
  store volatile i32 2, ptr %19, align 4, !tbaa !13
  br label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %21, i32 0, i32 11
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  store i32 2, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %237

26:                                               ; preds = %20
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %27, i32 0, i32 11
  store i32 1, ptr %28, align 8, !tbaa !16
  br label %29

29:                                               ; preds = %26
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %32, i32 0, i32 5
  store volatile i16 0, ptr %33, align 2, !tbaa !17
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %34, i32 0, i32 6
  store volatile i16 0, ptr %35, align 4, !tbaa !18
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %37, i32 0, i32 2
  store ptr %36, ptr %38, align 8, !tbaa !19
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %40, i32 0, i32 3
  store ptr %39, ptr %41, align 8, !tbaa !20
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %43, i32 0, i32 8
  %45 = load i32, ptr %44, align 8, !tbaa !21
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %54

47:                                               ; preds = %31
  %48 = load i16, ptr %8, align 2, !tbaa !9
  %49 = zext i16 %48 to i32
  %50 = mul i32 %49, 4
  %51 = trunc i32 %50 to i16
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %52, i32 0, i32 7
  store i16 %51, ptr %53, align 2, !tbaa !22
  br label %58

54:                                               ; preds = %31
  %55 = load i16, ptr %8, align 2, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %56, i32 0, i32 7
  store i16 %55, ptr %57, align 2, !tbaa !22
  br label %58

58:                                               ; preds = %54, %47
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !23
  %62 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %61, i32 0, i32 0
  %63 = load volatile i32, ptr %62, align 4, !tbaa !24
  %64 = zext i32 %63 to i64
  %65 = and i64 %64, -5
  %66 = or i64 %65, 0
  %67 = trunc i64 %66 to i32
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %70, i32 0, i32 0
  store volatile i32 %67, ptr %71, align 4, !tbaa !24
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %74, i32 0, i32 0
  %76 = load volatile i32, ptr %75, align 4, !tbaa !24
  %77 = zext i32 %76 to i64
  %78 = and i64 %77, 524344
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr %10, align 4, !tbaa !11
  %80 = load i32, ptr %10, align 4, !tbaa !11
  switch i32 %80, label %224 [
    i32 16, label %81
    i32 24, label %81
    i32 0, label %81
    i32 8, label %81
    i32 32, label %215
    i32 40, label %215
    i32 48, label %215
    i32 524288, label %218
    i32 524296, label %221
  ]

81:                                               ; preds = %58, %58, %58, %58
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %82, i32 0, i32 1
  %84 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !26
  %86 = load i32, ptr %85, align 4, !tbaa !11
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %89, i32 0, i32 10
  store volatile i32 %86, ptr %90, align 4, !tbaa !27
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %91, i32 0, i32 1
  %93 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !26
  %95 = getelementptr inbounds i32, ptr %94, i64 1
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !23
  %100 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %99, i32 0, i32 11
  store volatile i32 %96, ptr %100, align 4, !tbaa !28
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %101, i32 0, i32 1
  %103 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %102, i32 0, i32 4
  %104 = load i32, ptr %103, align 8, !tbaa !29
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %113, label %106

106:                                              ; preds = %81
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %107, i32 0, i32 1
  %109 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %108, i32 0, i32 4
  %110 = load i32, ptr %109, align 8, !tbaa !29
  %111 = zext i32 %110 to i64
  %112 = icmp eq i64 %111, 8
  br i1 %112, label %113, label %154

113:                                              ; preds = %106, %81
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !26
  %118 = getelementptr inbounds i32, ptr %117, i64 2
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %122, i32 0, i32 12
  store volatile i32 %119, ptr %123, align 4, !tbaa !30
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %124, i32 0, i32 1
  %126 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %125, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !26
  %128 = getelementptr inbounds i32, ptr %127, i64 3
  %129 = load i32, ptr %128, align 4, !tbaa !11
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !23
  %133 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %132, i32 0, i32 13
  store volatile i32 %129, ptr %133, align 4, !tbaa !31
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %134, i32 0, i32 1
  %136 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !26
  %138 = getelementptr inbounds i32, ptr %137, i64 4
  %139 = load i32, ptr %138, align 4, !tbaa !11
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !23
  %143 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %142, i32 0, i32 14
  store volatile i32 %139, ptr %143, align 4, !tbaa !32
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %144, i32 0, i32 1
  %146 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !26
  %148 = getelementptr inbounds i32, ptr %147, i64 5
  %149 = load i32, ptr %148, align 4, !tbaa !11
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !23
  %153 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %152, i32 0, i32 15
  store volatile i32 %149, ptr %153, align 4, !tbaa !33
  br label %154

154:                                              ; preds = %113, %106
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %156, i32 0, i32 4
  %158 = load i32, ptr %157, align 8, !tbaa !29
  %159 = zext i32 %158 to i64
  %160 = icmp eq i64 %159, 24
  br i1 %160, label %168, label %161

161:                                              ; preds = %154
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %162, i32 0, i32 1
  %164 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %163, i32 0, i32 4
  %165 = load i32, ptr %164, align 8, !tbaa !29
  %166 = zext i32 %165 to i64
  %167 = icmp eq i64 %166, 8
  br i1 %167, label %168, label %188

168:                                              ; preds = %161, %154
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %169, i32 0, i32 1
  %171 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %170, i32 0, i32 3
  %172 = load ptr, ptr %171, align 8, !tbaa !34
  %173 = load i32, ptr %172, align 4, !tbaa !11
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !23
  %177 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %176, i32 0, i32 16
  store volatile i32 %173, ptr %177, align 4, !tbaa !35
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %178, i32 0, i32 1
  %180 = getelementptr inbounds %struct.CRYP_ConfigTypeDef, ptr %179, i32 0, i32 3
  %181 = load ptr, ptr %180, align 8, !tbaa !34
  %182 = getelementptr inbounds i32, ptr %181, i64 1
  %183 = load i32, ptr %182, align 4, !tbaa !11
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %184, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !23
  %187 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %186, i32 0, i32 17
  store volatile i32 %183, ptr %187, align 4, !tbaa !36
  br label %188

188:                                              ; preds = %168, %161
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !23
  %192 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %191, i32 0, i32 0
  %193 = load volatile i32, ptr %192, align 4, !tbaa !24
  %194 = zext i32 %193 to i64
  %195 = or i64 %194, 16384
  %196 = trunc i64 %195 to i32
  store volatile i32 %196, ptr %192, align 4, !tbaa !24
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %197, i32 0, i32 8
  store i32 2, ptr %198, align 8, !tbaa !37
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %199, i32 0, i32 0
  %201 = load ptr, ptr %200, align 8, !tbaa !23
  %202 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %201, i32 0, i32 5
  %203 = load volatile i32, ptr %202, align 4, !tbaa !38
  %204 = zext i32 %203 to i64
  %205 = or i64 %204, 3
  %206 = trunc i64 %205 to i32
  store volatile i32 %206, ptr %202, align 4, !tbaa !38
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !23
  %210 = getelementptr inbounds %struct.CRYP_TypeDef, ptr %209, i32 0, i32 0
  %211 = load volatile i32, ptr %210, align 4, !tbaa !24
  %212 = zext i32 %211 to i64
  %213 = or i64 %212, 32768
  %214 = trunc i64 %213 to i32
  store volatile i32 %214, ptr %210, align 4, !tbaa !24
  br label %229

215:                                              ; preds = %58, %58, %58
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = call i32 @CRYP_AES_Encrypt_IT(ptr noundef %216)
  store i32 %217, ptr %11, align 4, !tbaa !11
  br label %229

218:                                              ; preds = %58
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = call i32 @CRYP_AESGCM_Process_IT(ptr noundef %219)
  store i32 %220, ptr %11, align 4, !tbaa !11
  br label %229

221:                                              ; preds = %58
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = call i32 @CRYP_AESCCM_Process_IT(ptr noundef %222)
  store i32 %223, ptr %11, align 4, !tbaa !11
  br label %229

224:                                              ; preds = %58
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %225, i32 0, i32 13
  %227 = load volatile i32, ptr %226, align 8, !tbaa !39
  %228 = or i32 %227, 32
  store volatile i32 %228, ptr %226, align 8, !tbaa !39
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %229

229:                                              ; preds = %224, %221, %218, %215, %188
  br label %235

230:                                              ; preds = %4
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.CRYP_HandleTypeDef, ptr %231, i32 0, i32 13
  %233 = load volatile i32, ptr %232, align 8, !tbaa !39
  %234 = or i32 %233, 8
  store volatile i32 %234, ptr %232, align 8, !tbaa !39
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %235

235:                                              ; preds = %230, %229
  %236 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %236, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %237

237:                                              ; preds = %235, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  %238 = load i32, ptr %5, align 4
  ret i32 %238
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 124}
!14 = !{!"", !6, i64 0, !15, i64 8, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 90, !10, i64 92, !10, i64 94, !12, i64 96, !6, i64 104, !6, i64 112, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132}
!15 = !{!"", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !12, i64 40, !6, i64 48, !12, i64 56}
!16 = !{!14, !12, i64 120}
!17 = !{!14, !10, i64 90}
!18 = !{!14, !10, i64 92}
!19 = !{!14, !6, i64 72}
!20 = !{!14, !6, i64 80}
!21 = !{!14, !12, i64 64}
!22 = !{!14, !10, i64 94}
!23 = !{!14, !6, i64 0}
!24 = !{!25, !12, i64 0}
!25 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140}
!26 = !{!14, !6, i64 16}
!27 = !{!25, !12, i64 40}
!28 = !{!25, !12, i64 44}
!29 = !{!14, !12, i64 32}
!30 = !{!25, !12, i64 48}
!31 = !{!25, !12, i64 52}
!32 = !{!25, !12, i64 56}
!33 = !{!25, !12, i64 60}
!34 = !{!14, !6, i64 24}
!35 = !{!25, !12, i64 64}
!36 = !{!25, !12, i64 68}
!37 = !{!14, !12, i64 96}
!38 = !{!25, !12, i64 20}
!39 = !{!14, !12, i64 128}


; 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 @HAL_CRYP_Encrypt_IT(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 124
  %6 = load volatile i32, ptr %5, align 4, !tbaa !5
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %8, label %77

8:                                                ; preds = %4
  store volatile i32 2, ptr %5, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 120
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %81, label %12

12:                                               ; preds = %8
  store i32 1, ptr %9, align 8, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %0, i64 90
  store volatile i16 0, ptr %13, align 2, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %0, i64 92
  store volatile i16 0, ptr %14, align 4, !tbaa !15
  %15 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %1, ptr %15, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %3, ptr %16, align 8, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  %18 = load i32, ptr %17, align 8, !tbaa !18
  %19 = icmp eq i32 %18, 0
  %20 = shl i16 %2, 2
  %spec.select = select i1 %19, i16 %20, i16 %2
  %21 = getelementptr inbounds i8, ptr %0, i64 94
  store i16 %spec.select, ptr %21, align 2
  %22 = load ptr, ptr %0, align 8, !tbaa !19
  %23 = load volatile i32, ptr %22, align 4, !tbaa !20
  %24 = and i32 %23, -5
  store volatile i32 %24, ptr %22, align 4, !tbaa !20
  %25 = load volatile i32, ptr %22, align 4, !tbaa !20
  %26 = and i32 %25, 524344
  switch i32 %26, label %73 [
    i32 16, label %27
    i32 24, label %27
    i32 0, label %27
    i32 8, label %27
    i32 32, label %67
    i32 40, label %67
    i32 48, label %67
    i32 524288, label %69
    i32 524296, label %71
  ]

27:                                               ; preds = %12, %12, %12, %12
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !22
  %30 = load i32, ptr %29, align 4, !tbaa !23
  %31 = getelementptr inbounds i8, ptr %22, i64 40
  store volatile i32 %30, ptr %31, align 4, !tbaa !24
  %32 = getelementptr inbounds i8, ptr %29, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !23
  %34 = getelementptr inbounds i8, ptr %22, i64 44
  store volatile i32 %33, ptr %34, align 4, !tbaa !25
  %35 = getelementptr inbounds i8, ptr %0, i64 32
  %36 = load i32, ptr %35, align 8, !tbaa !26
  switch i32 %36, label %58 [
    i32 0, label %37
    i32 8, label %37
    i32 24, label %50
  ]

37:                                               ; preds = %27, %27
  %38 = getelementptr inbounds i8, ptr %29, i64 8
  %39 = load i32, ptr %38, align 4, !tbaa !23
  %40 = getelementptr inbounds i8, ptr %22, i64 48
  store volatile i32 %39, ptr %40, align 4, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %29, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %22, i64 52
  store volatile i32 %42, ptr %43, align 4, !tbaa !28
  %44 = getelementptr inbounds i8, ptr %29, i64 16
  %45 = load i32, ptr %44, align 4, !tbaa !23
  %46 = getelementptr inbounds i8, ptr %22, i64 56
  store volatile i32 %45, ptr %46, align 4, !tbaa !29
  %47 = getelementptr inbounds i8, ptr %29, i64 20
  %48 = load i32, ptr %47, align 4, !tbaa !23
  %49 = getelementptr inbounds i8, ptr %22, i64 60
  store volatile i32 %48, ptr %49, align 4, !tbaa !30
  %cond = icmp eq i32 %36, 8
  br i1 %cond, label %50, label %58

50:                                               ; preds = %37, %27
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !31
  %53 = load i32, ptr %52, align 4, !tbaa !23
  %54 = getelementptr inbounds i8, ptr %22, i64 64
  store volatile i32 %53, ptr %54, align 4, !tbaa !32
  %55 = getelementptr inbounds i8, ptr %52, i64 4
  %56 = load i32, ptr %55, align 4, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %22, i64 68
  store volatile i32 %56, ptr %57, align 4, !tbaa !33
  br label %58

58:                                               ; preds = %37, %27, %50
  %59 = load volatile i32, ptr %22, align 4, !tbaa !20
  %60 = or i32 %59, 16384
  store volatile i32 %60, ptr %22, align 4, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 2, ptr %61, align 8, !tbaa !34
  %62 = getelementptr inbounds i8, ptr %22, i64 20
  %63 = load volatile i32, ptr %62, align 4, !tbaa !35
  %64 = or i32 %63, 3
  store volatile i32 %64, ptr %62, align 4, !tbaa !35
  %65 = load volatile i32, ptr %22, align 4, !tbaa !20
  %66 = or i32 %65, 32768
  store volatile i32 %66, ptr %22, align 4, !tbaa !20
  br label %81

67:                                               ; preds = %12, %12, %12
  %68 = tail call i32 @CRYP_AES_Encrypt_IT(ptr noundef nonnull %0)
  br label %81

69:                                               ; preds = %12
  %70 = tail call i32 @CRYP_AESGCM_Process_IT(ptr noundef nonnull %0)
  br label %81

71:                                               ; preds = %12
  %72 = tail call i32 @CRYP_AESCCM_Process_IT(ptr noundef nonnull %0)
  br label %81

73:                                               ; preds = %12
  %74 = getelementptr inbounds i8, ptr %0, i64 128
  %75 = load volatile i32, ptr %74, align 8, !tbaa !36
  %76 = or i32 %75, 32
  store volatile i32 %76, ptr %74, align 8, !tbaa !36
  br label %81

77:                                               ; preds = %4
  %78 = getelementptr inbounds i8, ptr %0, i64 128
  %79 = load volatile i32, ptr %78, align 8, !tbaa !36
  %80 = or i32 %79, 8
  store volatile i32 %80, ptr %78, align 8, !tbaa !36
  br label %81

81:                                               ; preds = %77, %73, %71, %69, %67, %58, %8
  %.049 = phi i32 [ 2, %8 ], [ 1, %73 ], [ %72, %71 ], [ %70, %69 ], [ %68, %67 ], [ 0, %58 ], [ 1, %77 ]
  ret i32 %.049
}

; Function Attrs: nounwind uwtable
declare hidden i32 @CRYP_AES_Encrypt_IT(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @CRYP_AESGCM_Process_IT(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @CRYP_AESCCM_Process_IT(ptr noundef) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 124}
!6 = !{!"", !7, i64 0, !10, i64 8, !7, i64 72, !7, i64 80, !12, i64 88, !12, i64 90, !12, i64 92, !12, i64 94, !11, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !7, i64 8, !7, i64 16, !11, i64 24, !7, i64 32, !11, i64 40, !7, i64 48, !11, i64 56}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !11, i64 120}
!14 = !{!6, !12, i64 90}
!15 = !{!6, !12, i64 92}
!16 = !{!6, !7, i64 72}
!17 = !{!6, !7, i64 80}
!18 = !{!6, !11, i64 64}
!19 = !{!6, !7, i64 0}
!20 = !{!21, !11, i64 0}
!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, !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, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140}
!22 = !{!6, !7, i64 16}
!23 = !{!11, !11, i64 0}
!24 = !{!21, !11, i64 40}
!25 = !{!21, !11, i64 44}
!26 = !{!6, !11, i64 32}
!27 = !{!21, !11, i64 48}
!28 = !{!21, !11, i64 52}
!29 = !{!21, !11, i64 56}
!30 = !{!21, !11, i64 60}
!31 = !{!6, !7, i64 24}
!32 = !{!21, !11, i64 64}
!33 = !{!21, !11, i64 68}
!34 = !{!6, !11, i64 96}
!35 = !{!21, !11, i64 20}
!36 = !{!6, !11, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass