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

; 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_SIVDecrypt.vmask = external hidden unnamed_addr constant [16 x i8], align 16

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

35:                                               ; preds = %11
  store i32 -8, ptr %12, align 4
  br label %188

36:                                               ; preds = %11
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  %38 = icmp eq ptr null, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  store i32 -8, ptr %12, align 4
  br label %188

40:                                               ; preds = %36
  %41 = load i32, ptr %15, align 4, !tbaa !9
  %42 = icmp sge i32 0, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  store i32 -15, ptr %12, align 4
  br label %188

44:                                               ; preds = %40
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = icmp eq ptr null, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  store i32 -8, ptr %12, align 4
  br label %188

48:                                               ; preds = %44
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = icmp eq ptr null, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 -8, ptr %12, align 4
  br label %188

52:                                               ; preds = %48
  %53 = load i32, ptr %19, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 16
  br i1 %54, label %55, label %62

55:                                               ; preds = %52
  %56 = load i32, ptr %19, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 24
  br i1 %57, label %58, label %62

58:                                               ; preds = %55
  %59 = load i32, ptr %19, align 4, !tbaa !9
  %60 = icmp ne i32 %59, 32
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i32 -15, ptr %12, align 4
  br label %188

62:                                               ; preds = %58, %55, %52
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = icmp eq ptr null, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store i32 -8, ptr %12, align 4
  br label %188

66:                                               ; preds = %62
  %67 = load ptr, ptr %23, align 8, !tbaa !5
  %68 = icmp eq ptr null, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  store i32 -8, ptr %12, align 4
  br label %188

70:                                               ; preds = %66
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = icmp eq ptr null, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i32 -8, ptr %12, align 4
  br label %188

74:                                               ; preds = %70
  %75 = load ptr, ptr %21, align 8, !tbaa !5
  %76 = icmp eq ptr null, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store i32 -8, ptr %12, align 4
  br label %188

78:                                               ; preds = %74
  %79 = load i32, ptr %22, align 4, !tbaa !9
  %80 = icmp sgt i32 0, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  store i32 -15, ptr %12, align 4
  br label %188

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %111, %82
  %84 = load i32, ptr %24, align 4, !tbaa !9
  %85 = load i32, ptr %22, align 4, !tbaa !9
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %87, label %114

87:                                               ; preds = %83
  %88 = load ptr, ptr %21, align 8, !tbaa !5
  %89 = load i32, ptr %24, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %88, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = icmp slt i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %87
  store i32 -15, ptr %12, align 4
  store i32 1, ptr %25, align 4
  br label %115

95:                                               ; preds = %87
  %96 = load ptr, ptr %21, align 8, !tbaa !5
  %97 = load i32, ptr %24, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %110

102:                                              ; preds = %95
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load i32, ptr %24, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = icmp ne ptr %107, null
  br i1 %108, label %110, label %109

109:                                              ; preds = %102
  store i32 -8, ptr %12, align 4
  store i32 1, ptr %25, align 4
  br label %115

110:                                              ; preds = %102, %95
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %24, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %24, align 4, !tbaa !9
  br label %83, !llvm.loop !11

114:                                              ; preds = %83
  store i32 0, ptr %25, align 4
  br label %115

115:                                              ; preds = %114, %109, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  %116 = load i32, ptr %25, align 4
  switch i32 %116, label %190 [
    i32 0, label %117
    i32 1, label %188
  ]

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 @__const.ippsAES_SIVDecrypt.vmask, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 568, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %118 = getelementptr inbounds [568 x i8], ptr %29, i64 0, i64 0
  store ptr %118, ptr %30, align 8, !tbaa !5
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  %120 = load i32, ptr %19, align 4, !tbaa !9
  %121 = load ptr, ptr %30, align 8, !tbaa !5
  %122 = call i32 @ippsAESInit(ptr noundef %119, i32 noundef %120, ptr noundef %121, i32 noundef 568)
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %143, %117
  %124 = load i32, ptr %26, align 4, !tbaa !9
  %125 = icmp slt i32 %124, 16
  br i1 %125, label %126, label %146

126:                                              ; preds = %123
  %127 = load ptr, ptr %23, align 8, !tbaa !5
  %128 = load i32, ptr %26, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %127, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = zext i8 %131 to i32
  %133 = load i32, ptr %26, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !13
  %137 = zext i8 %136 to i32
  %138 = and i32 %132, %137
  %139 = trunc i32 %138 to i8
  %140 = load i32, ptr %26, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 %141
  store i8 %139, ptr %142, align 1, !tbaa !13
  br label %143

143:                                              ; preds = %126
  %144 = load i32, ptr %26, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %26, align 4, !tbaa !9
  br label %123, !llvm.loop !14

146:                                              ; preds = %123
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = load i32, ptr %15, align 4, !tbaa !9
  %150 = load ptr, ptr %30, align 8, !tbaa !5
  %151 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %152 = call i32 @ippsAESDecryptCTR(ptr noundef %147, ptr noundef %148, i32 noundef %149, ptr noundef %150, ptr noundef %151, i32 noundef 128)
  call void @PurgeBlock(ptr noundef %29, i32 noundef 568)
  call void @llvm.lifetime.start.p0(i64 640, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %153 = getelementptr inbounds [640 x i8], ptr %31, i64 0, i64 0
  store ptr %153, ptr %32, align 8, !tbaa !5
  %154 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = load i32, ptr %19, align 4, !tbaa !9
  %157 = load ptr, ptr %32, align 8, !tbaa !5
  %158 = call i32 @cpAES_S2V_init(ptr noundef %154, ptr noundef %155, i32 noundef %156, ptr noundef %157, i32 noundef 640)
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %176, %146
  %160 = load i32, ptr %26, align 4, !tbaa !9
  %161 = load i32, ptr %22, align 4, !tbaa !9
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %163, label %179

163:                                              ; preds = %159
  %164 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = load i32, ptr %26, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = load ptr, ptr %21, align 8, !tbaa !5
  %171 = load i32, ptr %26, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %170, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !9
  %175 = load ptr, ptr %32, align 8, !tbaa !5
  call void @cpAES_S2V_update(ptr noundef %164, ptr noundef %169, i32 noundef %174, ptr noundef %175)
  br label %176

176:                                              ; preds = %163
  %177 = load i32, ptr %26, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %26, align 4, !tbaa !9
  br label %159, !llvm.loop !15

179:                                              ; preds = %159
  %180 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = load ptr, ptr %32, align 8, !tbaa !5
  call void @cpAES_S2V_final(ptr noundef %180, ptr noundef %181, i32 noundef %182, ptr noundef %183)
  call void @PurgeBlock(ptr noundef %31, i32 noundef 640)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 640, ptr %31) #5
  %184 = load ptr, ptr %23, align 8, !tbaa !5
  %185 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %186 = call i32 @EquBlock(ptr noundef %184, ptr noundef %185, i32 noundef 16)
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 %186, ptr %187, align 4, !tbaa !9
  store i32 0, ptr %12, align 4
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 568, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %188

188:                                              ; preds = %179, %115, %81, %77, %73, %69, %65, %61, %51, %47, %43, %39, %35
  %189 = load i32, ptr %12, align 4
  ret i32 %189

190:                                              ; preds = %115
  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

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

declare i32 @ippsAESDecryptCTR(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

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

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

; 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 i32 @EquBlock(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 = { "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 = { 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 #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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!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_SIVDecrypt.vmask = external hidden unnamed_addr constant [16 x i8], align 16

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

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

19:                                               ; preds = %17
  %20 = icmp eq ptr %4, null
  %21 = icmp eq ptr %5, null
  %or.cond71 = or i1 %20, %21
  br i1 %or.cond71, label %.thread, label %22

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

23:                                               ; preds = %22, %22, %22
  %24 = insertelement <4 x ptr> poison, ptr %3, i64 0
  %25 = insertelement <4 x ptr> %24, ptr %10, i64 1
  %26 = insertelement <4 x ptr> %25, ptr %7, i64 2
  %27 = insertelement <4 x ptr> %26, ptr %8, i64 3
  %28 = icmp eq <4 x ptr> %27, zeroinitializer
  %29 = bitcast <4 x i1> %28 to i4
  %.not95 = icmp eq i4 %29, 0
  br i1 %.not95, label %30, label %.thread

30:                                               ; preds = %23
  %31 = icmp slt i32 %9, 0
  br i1 %31, label %.thread, label %.preheader

.preheader:                                       ; preds = %30
  %.not83 = icmp eq i32 %9, 0
  br i1 %.not83, label %._crit_edge, label %.lr.ph.preheader

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

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

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

36:                                               ; preds = %35
  %37 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %.not70 = icmp eq ptr %38, null
  br i1 %.not70, label %.thread, label %39

39:                                               ; preds = %35, %36
  %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 = %39, %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 568, ptr nonnull %13) #5
  %40 = call i32 @ippsAESInit(ptr noundef nonnull %5, i32 noundef %6, ptr noundef nonnull %13, i32 noundef 568) #5
  %41 = load <16 x i8>, ptr %10, align 1, !tbaa !13
  %42 = load <16 x i8>, ptr @__const.ippsAES_SIVDecrypt.vmask, align 16, !tbaa !13
  %43 = and <16 x i8> %42, %41
  store <16 x i8> %43, ptr %12, align 16, !tbaa !13
  %44 = call i32 @ippsAESDecryptCTR(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %2, ptr noundef nonnull %13, ptr noundef nonnull %12, i32 noundef 128) #5
  call void @PurgeBlock(ptr noundef nonnull %13, i32 noundef 568)
  call void @llvm.lifetime.start.p0(i64 640, ptr nonnull %14) #5
  %45 = call i32 @cpAES_S2V_init(ptr noundef nonnull %12, ptr noundef nonnull %4, i32 noundef %6, ptr noundef nonnull %14, i32 noundef 640)
  br i1 %.not83, label %._crit_edge82, label %.lr.ph81.preheader

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

.lr.ph81:                                         ; preds = %.lr.ph81.preheader, %.lr.ph81
  %indvars.iv90 = phi i64 [ 0, %.lr.ph81.preheader ], [ %indvars.iv.next91, %.lr.ph81 ]
  %46 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv90
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv90
  %49 = load i32, ptr %48, align 4, !tbaa !5
  call void @cpAES_S2V_update(ptr noundef nonnull %12, ptr noundef %47, i32 noundef %49, ptr noundef nonnull %14)
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %._crit_edge82, label %.lr.ph81, !llvm.loop !14

._crit_edge82:                                    ; preds = %.lr.ph81, %._crit_edge
  call void @cpAES_S2V_final(ptr noundef nonnull %12, ptr noundef nonnull %1, i32 noundef %2, ptr noundef nonnull %14)
  call void @PurgeBlock(ptr noundef nonnull %14, i32 noundef 640)
  call void @llvm.lifetime.end.p0(i64 640, ptr nonnull %14) #5
  %50 = call i32 @EquBlock(ptr noundef nonnull %10, ptr noundef nonnull %12, i32 noundef 16)
  store i32 %50, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 568, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %.thread

.thread:                                          ; preds = %.lr.ph, %36, %30, %23, %22, %19, %17, %11, %._crit_edge82
  %.1 = phi i32 [ 0, %._crit_edge82 ], [ -8, %11 ], [ -15, %17 ], [ -8, %19 ], [ -15, %22 ], [ -8, %23 ], [ -15, %30 ], [ -15, %.lr.ph ], [ -8, %36 ]
  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

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

declare i32 @ippsAESDecryptCTR(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

; 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 i32 @EquBlock(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 = { "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 = { 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 = { 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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}


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