; LLVM IR from intel/cryptography-primitives :: sources/ippcp (pcpaes_sivencrypt)

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

@__const.ippsAES_SIVEncrypt.vmask = external hidden unnamed_addr constant [16 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsAES_SIVEncrypt(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, ptr noundef %8, i32 noundef %9) #0 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca [16 x i8], align 16
  %26 = alloca [16 x i8], align 16
  %27 = alloca [568 x i8], align 16
  %28 = alloca ptr, align 8
  %29 = alloca [640 x i8], align 16
  %30 = alloca ptr, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i32 %2, ptr %14, align 4, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store i32 %6, ptr %18, align 4, !tbaa !9
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store i32 %9, ptr %21, align 4, !tbaa !9
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = icmp eq ptr null, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %10
  store i32 -8, ptr %11, align 4
  br label %178

34:                                               ; preds = %10
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  %36 = icmp eq ptr null, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  store i32 -8, ptr %11, align 4
  br label %178

38:                                               ; preds = %34
  %39 = load i32, ptr %14, align 4, !tbaa !9
  %40 = icmp sge i32 0, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store i32 -15, ptr %11, align 4
  br label %178

42:                                               ; preds = %38
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  %44 = icmp eq ptr null, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  store i32 -8, ptr %11, align 4
  br label %178

46:                                               ; preds = %42
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = icmp eq ptr null, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  store i32 -8, ptr %11, align 4
  br label %178

50:                                               ; preds = %46
  %51 = load i32, ptr %18, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 16
  br i1 %52, label %53, label %60

53:                                               ; preds = %50
  %54 = load i32, ptr %18, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 24
  br i1 %55, label %56, label %60

56:                                               ; preds = %53
  %57 = load i32, ptr %18, align 4, !tbaa !9
  %58 = icmp ne i32 %57, 32
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  store i32 -15, ptr %11, align 4
  br label %178

60:                                               ; preds = %56, %53, %50
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = icmp eq ptr null, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  store i32 -8, ptr %11, align 4
  br label %178

64:                                               ; preds = %60
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = icmp eq ptr null, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %64
  store i32 -8, ptr %11, align 4
  br label %178

68:                                               ; preds = %64
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  %70 = icmp eq ptr null, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  store i32 -8, ptr %11, align 4
  br label %178

72:                                               ; preds = %68
  %73 = load i32, ptr %21, align 4, !tbaa !9
  %74 = icmp sgt i32 0, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  store i32 -15, ptr %11, align 4
  br label %178

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %105, %76
  %78 = load i32, ptr %22, align 4, !tbaa !9
  %79 = load i32, ptr %21, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %108

81:                                               ; preds = %77
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = load i32, ptr %22, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %82, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp slt i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %81
  store i32 -15, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %109

89:                                               ; preds = %81
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load i32, ptr %22, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %104

96:                                               ; preds = %89
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = load i32, ptr %22, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %104, label %103

103:                                              ; preds = %96
  store i32 -8, ptr %11, align 4
  store i32 1, ptr %23, align 4
  br label %109

104:                                              ; preds = %96, %89
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %22, align 4, !tbaa !9
  br label %77, !llvm.loop !11

108:                                              ; preds = %77
  store i32 0, ptr %23, align 4
  br label %109

109:                                              ; preds = %108, %103, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %110 = load i32, ptr %23, align 4
  switch i32 %110, label %180 [
    i32 0, label %111
    i32 1, label %178
  ]

111:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 @__const.ippsAES_SIVEncrypt.vmask, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 568, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %112 = getelementptr inbounds [568 x i8], ptr %27, i64 0, i64 0
  store ptr %112, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 640, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %113 = getelementptr inbounds [640 x i8], ptr %29, i64 0, i64 0
  store ptr %113, ptr %30, align 8, !tbaa !5
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = load i32, ptr %18, align 4, !tbaa !9
  %117 = load ptr, ptr %30, align 8, !tbaa !5
  %118 = call i32 @cpAES_S2V_init(ptr noundef %114, ptr noundef %115, i32 noundef %116, ptr noundef %117, i32 noundef 640)
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %136, %111
  %120 = load i32, ptr %24, align 4, !tbaa !9
  %121 = load i32, ptr %21, align 4, !tbaa !9
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %119
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = load i32, ptr %24, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load ptr, ptr %20, align 8, !tbaa !5
  %131 = load i32, ptr %24, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = load ptr, ptr %30, align 8, !tbaa !5
  call void @cpAES_S2V_update(ptr noundef %124, ptr noundef %129, i32 noundef %134, ptr noundef %135)
  br label %136

136:                                              ; preds = %123
  %137 = load i32, ptr %24, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %24, align 4, !tbaa !9
  br label %119, !llvm.loop !13

139:                                              ; preds = %119
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = load ptr, ptr %30, align 8, !tbaa !5
  call void @cpAES_S2V_final(ptr noundef %140, ptr noundef %141, i32 noundef %142, ptr noundef %143)
  call void @PurgeBlock(ptr noundef %29, i32 noundef 640)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 640, ptr %29) #5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load i32, ptr %18, align 4, !tbaa !9
  %146 = load ptr, ptr %28, align 8, !tbaa !5
  %147 = call i32 @ippsAESInit(ptr noundef %144, i32 noundef %145, ptr noundef %146, i32 noundef 568)
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %168, %139
  %149 = load i32, ptr %24, align 4, !tbaa !9
  %150 = icmp slt i32 %149, 16
  br i1 %150, label %151, label %171

151:                                              ; preds = %148
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = load i32, ptr %24, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds i8, ptr %152, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !14
  %157 = zext i8 %156 to i32
  %158 = load i32, ptr %24, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !14
  %162 = zext i8 %161 to i32
  %163 = and i32 %157, %162
  %164 = trunc i32 %163 to i8
  %165 = load i32, ptr %24, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 %166
  store i8 %164, ptr %167, align 1, !tbaa !14
  br label %168

168:                                              ; preds = %151
  %169 = load i32, ptr %24, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %24, align 4, !tbaa !9
  br label %148, !llvm.loop !15

171:                                              ; preds = %148
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load i32, ptr %14, align 4, !tbaa !9
  %175 = load ptr, ptr %28, align 8, !tbaa !5
  %176 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 0
  %177 = call i32 @ippsAESEncryptCTR(ptr noundef %172, ptr noundef %173, i32 noundef %174, ptr noundef %175, ptr noundef %176, i32 noundef 128)
  call void @PurgeBlock(ptr noundef %27, i32 noundef 568)
  store i32 0, ptr %11, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 568, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %178

178:                                              ; preds = %171, %109, %75, %71, %67, %63, %59, %49, %45, %41, %37, %33
  %179 = load i32, ptr %11, align 4
  ret i32 %179

180:                                              ; preds = %109
  unreachable
}

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpAES_S2V_init(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpAES_S2V_update(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @PurgeBlock(ptr noundef, i32 noundef) #3

declare i32 @ippsAESInit(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #4

declare i32 @ippsAESEncryptCTR(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #4

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { "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 #5 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}


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

@__const.ippsAES_SIVEncrypt.vmask = external hidden unnamed_addr constant [16 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @ippsAES_SIVEncrypt(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef readonly %7, ptr noundef readonly %8, i32 noundef %9) local_unnamed_addr #0 {
  %11 = alloca [16 x i8], align 16
  %12 = alloca [568 x i8], align 16
  %13 = alloca [640 x i8], align 16
  %14 = icmp eq ptr %0, null
  %15 = icmp eq ptr %1, null
  %or.cond = or i1 %14, %15
  br i1 %or.cond, label %.thread, label %16

16:                                               ; preds = %10
  %17 = icmp slt i32 %2, 1
  br i1 %17, label %.thread, label %18

18:                                               ; preds = %16
  %19 = icmp eq ptr %4, null
  %20 = icmp eq ptr %5, null
  %or.cond70 = or i1 %19, %20
  br i1 %or.cond70, label %.thread, label %21

21:                                               ; preds = %18
  switch i32 %6, label %.thread [
    i32 32, label %22
    i32 24, label %22
    i32 16, label %22
  ]

22:                                               ; preds = %21, %21, %21
  %23 = icmp eq ptr %3, null
  %24 = icmp eq ptr %7, null
  %or.cond71 = or i1 %23, %24
  %25 = icmp eq ptr %8, null
  %or.cond72 = or i1 %or.cond71, %25
  br i1 %or.cond72, label %.thread, label %26

26:                                               ; preds = %22
  %27 = icmp slt i32 %9, 0
  br i1 %27, label %.thread, label %.preheader

.preheader:                                       ; preds = %26
  %.not81 = icmp eq i32 %9, 0
  br i1 %.not81, label %._crit_edge.thread, label %.lr.ph.preheader

._crit_edge.thread:                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 568, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 640, ptr nonnull %13) #5
  %28 = call i32 @cpAES_S2V_init(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %6, ptr noundef nonnull %13, i32 noundef 640)
  br label %._crit_edge79

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %9 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %36 ]
  %29 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %.thread, label %32

32:                                               ; preds = %.lr.ph
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %36, label %33

33:                                               ; preds = %32
  %34 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %.not69 = icmp eq ptr %35, null
  br i1 %.not69, label %.thread, label %36

36:                                               ; preds = %32, %33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 568, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 640, ptr nonnull %13) #5
  %37 = call i32 @cpAES_S2V_init(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %6, ptr noundef nonnull %13, i32 noundef 640)
  br i1 %.not81, label %._crit_edge79, label %.lr.ph78.preheader

.lr.ph78.preheader:                               ; preds = %._crit_edge
  %smax = call i32 @llvm.smax.i32(i32 %9, i32 1)
  %wide.trip.count87 = zext nneg i32 %smax to i64
  br label %.lr.ph78

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %.lr.ph78
  %indvars.iv84 = phi i64 [ 0, %.lr.ph78.preheader ], [ %indvars.iv.next85, %.lr.ph78 ]
  %38 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv84
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv84
  %41 = load i32, ptr %40, align 4, !tbaa !5
  call void @cpAES_S2V_update(ptr noundef nonnull %3, ptr noundef %39, i32 noundef %41, ptr noundef nonnull %13)
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count87
  br i1 %exitcond88.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !13

._crit_edge79:                                    ; preds = %.lr.ph78, %._crit_edge.thread, %._crit_edge
  call void @cpAES_S2V_final(ptr noundef nonnull %3, ptr noundef nonnull %0, i32 noundef %2, ptr noundef nonnull %13)
  call void @PurgeBlock(ptr noundef nonnull %13, i32 noundef 640)
  call void @llvm.lifetime.end.p0(i64 640, ptr nonnull %13) #5
  %42 = call i32 @ippsAESInit(ptr noundef nonnull %5, i32 noundef %6, ptr noundef nonnull %12, i32 noundef 568) #5
  %43 = load <16 x i8>, ptr %3, align 1, !tbaa !14
  %44 = load <16 x i8>, ptr @__const.ippsAES_SIVEncrypt.vmask, align 16, !tbaa !14
  %45 = and <16 x i8> %44, %43
  store <16 x i8> %45, ptr %11, align 16, !tbaa !14
  %46 = call i32 @ippsAESEncryptCTR(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %2, ptr noundef nonnull %12, ptr noundef nonnull %11, i32 noundef 128) #5
  call void @PurgeBlock(ptr noundef nonnull %12, i32 noundef 568)
  call void @llvm.lifetime.end.p0(i64 568, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %.thread

.thread:                                          ; preds = %.lr.ph, %33, %26, %22, %21, %18, %16, %10, %._crit_edge79
  %.1 = phi i32 [ 0, %._crit_edge79 ], [ -8, %10 ], [ -15, %16 ], [ -8, %18 ], [ -15, %21 ], [ -8, %22 ], [ -15, %26 ], [ -15, %.lr.ph ], [ -8, %33 ]
  ret i32 %.1
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpAES_S2V_init(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpAES_S2V_update(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @PurgeBlock(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @ippsAESInit(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @ippsAESEncryptCTR(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 #3 = { "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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}


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