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

; 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._cpRSA_private_key = type { i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsRSA_InitPrivateKeyType2(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !9
  %23 = icmp eq ptr null, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %4
  store i32 -8, ptr %5, align 4
  br label %215

25:                                               ; preds = %4
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = icmp sle i32 %26, 0
  br i1 %27, label %31, label %28

28:                                               ; preds = %25
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = icmp sle i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %28, %25
  store i32 -5, ptr %5, align 4
  br label %215

32:                                               ; preds = %28
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = add nsw i32 %33, %34
  %36 = icmp sgt i32 8, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = add nsw i32 %38, %39
  %41 = icmp sgt i32 %40, 16384
  br i1 %41, label %42, label %43

42:                                               ; preds = %37, %32
  store i32 -14, ptr %5, align 4
  br label %215

43:                                               ; preds = %37
  %44 = load i32, ptr %9, align 4, !tbaa !5
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = call i32 @cpSizeof_RSA_privateKey2(i32 noundef %45, i32 noundef %46)
  %48 = icmp slt i32 %44, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  store i32 -9, ptr %5, align 4
  br label %215

50:                                               ; preds = %43
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  %52 = call i64 @IPP_UINT_PTR(ptr noundef %51)
  %53 = trunc i64 %52 to i32
  %54 = xor i32 1381187890, %53
  %55 = load ptr, ptr %8, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct._cpRSA_private_key, ptr %55, i32 0, i32 0
  store i32 %54, ptr %56, align 8, !tbaa !11
  %57 = load ptr, ptr %8, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct._cpRSA_private_key, ptr %57, i32 0, i32 1
  store i32 0, ptr %58, align 4, !tbaa !13
  %59 = load ptr, ptr %8, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct._cpRSA_private_key, ptr %59, i32 0, i32 2
  store i32 0, ptr %60, align 8, !tbaa !14
  %61 = load ptr, ptr %8, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct._cpRSA_private_key, ptr %61, i32 0, i32 3
  store i32 0, ptr %62, align 4, !tbaa !15
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._cpRSA_private_key, ptr %63, i32 0, i32 4
  store i32 0, ptr %64, align 8, !tbaa !16
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = load ptr, ptr %8, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct._cpRSA_private_key, ptr %66, i32 0, i32 5
  store i32 %65, ptr %67, align 4, !tbaa !17
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._cpRSA_private_key, ptr %69, i32 0, i32 6
  store i32 %68, ptr %70, align 8, !tbaa !18
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct._cpRSA_private_key, ptr %71, i32 0, i32 7
  store ptr null, ptr %72, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %73 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %73, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = add nsw i32 %74, 64
  %76 = sub nsw i32 %75, 1
  %77 = sdiv i32 %76, 64
  store i32 %77, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = add nsw i32 %78, 64
  %80 = sub nsw i32 %79, 1
  %81 = sdiv i32 %80, 64
  store i32 %81, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = add nsw i32 %82, 31
  %84 = ashr i32 %83, 5
  store i32 %84, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = add nsw i32 %85, 31
  %87 = ashr i32 %86, 5
  store i32 %87, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = add nsw i32 %88, %89
  %91 = add nsw i32 %90, 31
  %92 = ashr i32 %91, 5
  store i32 %92, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %93 = load i32, ptr %13, align 4, !tbaa !5
  call void @rsaMontExpGetSize(i32 noundef %93, ptr noundef %16)
  %94 = load i32, ptr %14, align 4, !tbaa !5
  call void @rsaMontExpGetSize(i32 noundef %94, ptr noundef %17)
  %95 = load i32, ptr %15, align 4, !tbaa !5
  call void @rsaMontExpGetSize(i32 noundef %95, ptr noundef %18)
  %96 = load ptr, ptr %10, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 88
  store ptr %97, ptr %10, align 8, !tbaa !9
  %98 = load ptr, ptr %10, align 8, !tbaa !9
  %99 = load ptr, ptr %10, align 8, !tbaa !9
  %100 = call i64 @IPP_INT_PTR(ptr noundef %99)
  %101 = and i64 %100, 7
  %102 = xor i64 %101, -1
  %103 = add nsw i64 %102, 1
  %104 = and i64 %103, 7
  %105 = getelementptr inbounds i8, ptr %98, i64 %104
  %106 = load ptr, ptr %8, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct._cpRSA_private_key, ptr %106, i32 0, i32 8
  store ptr %105, ptr %107, align 8, !tbaa !20
  %108 = load i32, ptr %11, align 4, !tbaa !5
  %109 = mul nsw i32 %108, 8
  %110 = load ptr, ptr %10, align 8, !tbaa !9
  %111 = sext i32 %109 to i64
  %112 = getelementptr inbounds i8, ptr %110, i64 %111
  store ptr %112, ptr %10, align 8, !tbaa !9
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = load ptr, ptr %8, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct._cpRSA_private_key, ptr %114, i32 0, i32 9
  store ptr %113, ptr %115, align 8, !tbaa !21
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = mul nsw i32 %116, 8
  %118 = load ptr, ptr %10, align 8, !tbaa !9
  %119 = sext i32 %117 to i64
  %120 = getelementptr inbounds i8, ptr %118, i64 %119
  store ptr %120, ptr %10, align 8, !tbaa !9
  %121 = load ptr, ptr %10, align 8, !tbaa !9
  %122 = load ptr, ptr %8, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct._cpRSA_private_key, ptr %122, i32 0, i32 10
  store ptr %121, ptr %123, align 8, !tbaa !22
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = mul nsw i32 %124, 8
  %126 = load ptr, ptr %10, align 8, !tbaa !9
  %127 = sext i32 %125 to i64
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  store ptr %128, ptr %10, align 8, !tbaa !9
  %129 = load ptr, ptr %10, align 8, !tbaa !9
  %130 = load ptr, ptr %8, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct._cpRSA_private_key, ptr %130, i32 0, i32 11
  store ptr %129, ptr %131, align 8, !tbaa !23
  %132 = load i32, ptr %16, align 4, !tbaa !5
  %133 = load ptr, ptr %10, align 8, !tbaa !9
  %134 = sext i32 %132 to i64
  %135 = getelementptr inbounds i8, ptr %133, i64 %134
  store ptr %135, ptr %10, align 8, !tbaa !9
  %136 = load ptr, ptr %10, align 8, !tbaa !9
  %137 = load ptr, ptr %8, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct._cpRSA_private_key, ptr %137, i32 0, i32 12
  store ptr %136, ptr %138, align 8, !tbaa !24
  %139 = load i32, ptr %17, align 4, !tbaa !5
  %140 = load ptr, ptr %10, align 8, !tbaa !9
  %141 = sext i32 %139 to i64
  %142 = getelementptr inbounds i8, ptr %140, i64 %141
  store ptr %142, ptr %10, align 8, !tbaa !9
  %143 = load ptr, ptr %10, align 8, !tbaa !9
  %144 = load ptr, ptr %8, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct._cpRSA_private_key, ptr %144, i32 0, i32 13
  store ptr %143, ptr %145, align 8, !tbaa !25
  %146 = load i32, ptr %18, align 4, !tbaa !5
  %147 = load ptr, ptr %10, align 8, !tbaa !9
  %148 = sext i32 %146 to i64
  %149 = getelementptr inbounds i8, ptr %147, i64 %148
  store ptr %149, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %161, %50
  %151 = load i32, ptr %19, align 4, !tbaa !5
  %152 = load i32, ptr %11, align 4, !tbaa !5
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %154, label %164

154:                                              ; preds = %150
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct._cpRSA_private_key, ptr %155, i32 0, i32 8
  %157 = load ptr, ptr %156, align 8, !tbaa !20
  %158 = load i32, ptr %19, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i64, ptr %157, i64 %159
  store i64 0, ptr %160, align 8, !tbaa !26
  br label %161

161:                                              ; preds = %154
  %162 = load i32, ptr %19, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %19, align 4, !tbaa !5
  br label %150, !llvm.loop !28

164:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %176, %164
  %166 = load i32, ptr %20, align 4, !tbaa !5
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %169, label %179

169:                                              ; preds = %165
  %170 = load ptr, ptr %8, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct._cpRSA_private_key, ptr %170, i32 0, i32 9
  %172 = load ptr, ptr %171, align 8, !tbaa !21
  %173 = load i32, ptr %20, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i64, ptr %172, i64 %174
  store i64 0, ptr %175, align 8, !tbaa !26
  br label %176

176:                                              ; preds = %169
  %177 = load i32, ptr %20, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %20, align 4, !tbaa !5
  br label %165, !llvm.loop !30

179:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %191, %179
  %181 = load i32, ptr %21, align 4, !tbaa !5
  %182 = load i32, ptr %11, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %184, label %194

184:                                              ; preds = %180
  %185 = load ptr, ptr %8, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct._cpRSA_private_key, ptr %185, i32 0, i32 10
  %187 = load ptr, ptr %186, align 8, !tbaa !22
  %188 = load i32, ptr %21, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i64, ptr %187, i64 %189
  store i64 0, ptr %190, align 8, !tbaa !26
  br label %191

191:                                              ; preds = %184
  %192 = load i32, ptr %21, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %21, align 4, !tbaa !5
  br label %180, !llvm.loop !31

194:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  %195 = load ptr, ptr %8, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct._cpRSA_private_key, ptr %195, i32 0, i32 11
  %197 = load ptr, ptr %196, align 8, !tbaa !23
  %198 = load i32, ptr %6, align 4, !tbaa !5
  %199 = call ptr @gsModArithRSA()
  %200 = call i32 @gsModEngineInit(ptr noundef %197, ptr noundef null, i32 noundef %198, i32 noundef 2, ptr noundef %199)
  %201 = load ptr, ptr %8, align 8, !tbaa !9
  %202 = getelementptr inbounds %struct._cpRSA_private_key, ptr %201, i32 0, i32 12
  %203 = load ptr, ptr %202, align 8, !tbaa !24
  %204 = load i32, ptr %7, align 4, !tbaa !5
  %205 = call ptr @gsModArithRSA()
  %206 = call i32 @gsModEngineInit(ptr noundef %203, ptr noundef null, i32 noundef %204, i32 noundef 2, ptr noundef %205)
  %207 = load ptr, ptr %8, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct._cpRSA_private_key, ptr %207, i32 0, i32 13
  %209 = load ptr, ptr %208, align 8, !tbaa !25
  %210 = load i32, ptr %6, align 4, !tbaa !5
  %211 = load i32, ptr %7, align 4, !tbaa !5
  %212 = add nsw i32 %210, %211
  %213 = call ptr @gsModArithRSA()
  %214 = call i32 @gsModEngineInit(ptr noundef %209, ptr noundef null, i32 noundef %212, i32 noundef 2, ptr noundef %213)
  store i32 0, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %215

215:                                              ; preds = %194, %49, %42, %31, %24
  %216 = load i32, ptr %5, align 4
  ret i32 %216
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) #1

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

declare void @rsaMontExpGetSize(i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_INT_PTR(ptr noundef) #1

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

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

declare ptr @gsModArithRSA() #3

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 = { 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 #2 = { nocallback nofree nosync 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 = { 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 = !{!12, !6, i64 0}
!12 = !{!"_cpRSA_private_key", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 12}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !6, i64 20}
!18 = !{!12, !6, i64 24}
!19 = !{!12, !10, i64 32}
!20 = !{!12, !10, i64 40}
!21 = !{!12, !10, i64 48}
!22 = !{!12, !10, i64 56}
!23 = !{!12, !10, i64 64}
!24 = !{!12, !10, i64 72}
!25 = !{!12, !10, i64 80}
!26 = !{!27, !27, i64 0}
!27 = !{!"long long", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


; 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 range(i32 -14, 1) i32 @ippsRSA_InitPrivateKeyType2(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = icmp eq ptr %2, null
  br i1 %8, label %77, label %9

9:                                                ; preds = %4
  %10 = icmp slt i32 %0, 1
  %11 = icmp slt i32 %1, 1
  %or.cond = or i1 %10, %11
  br i1 %or.cond, label %77, label %12

12:                                               ; preds = %9
  %13 = add nuw nsw i32 %1, %0
  %14 = add nsw i32 %13, -16385
  %or.cond85 = icmp ult i32 %14, -16377
  br i1 %or.cond85, label %77, label %15

15:                                               ; preds = %12
  %16 = tail call i32 @cpSizeof_RSA_privateKey2(i32 noundef %0, i32 noundef %1)
  %17 = icmp sgt i32 %16, %3
  br i1 %17, label %77, label %._crit_edge

._crit_edge:                                      ; preds = %15
  %18 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %19 = trunc i64 %18 to i32
  %20 = xor i32 %19, 1381187890
  store i32 %20, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %2, i64 4
  %22 = getelementptr inbounds i8, ptr %2, i64 20
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %21, i8 0, i64 16, i1 false)
  store i32 %0, ptr %22, align 4, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 %1, ptr %23, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %2, i64 32
  store ptr null, ptr %24, align 8, !tbaa !13
  %25 = add nuw i32 %0, 63
  %26 = lshr i32 %25, 6
  %27 = add nuw i32 %1, 63
  %28 = add nuw nsw i32 %0, 31
  %29 = lshr i32 %28, 5
  %30 = add nuw nsw i32 %1, 31
  %31 = lshr i32 %30, 5
  %32 = add nuw nsw i32 %13, 31
  %33 = lshr i32 %32, 5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @rsaMontExpGetSize(i32 noundef %29, ptr noundef nonnull %5) #5
  call void @rsaMontExpGetSize(i32 noundef %31, ptr noundef nonnull %6) #5
  call void @rsaMontExpGetSize(i32 noundef %33, ptr noundef nonnull %7) #5
  %34 = getelementptr inbounds i8, ptr %2, i64 88
  %35 = call i64 @IPP_INT_PTR(ptr noundef nonnull %34)
  %36 = sub i64 0, %35
  %37 = and i64 %36, 7
  %38 = getelementptr i8, ptr %34, i64 %37
  %39 = getelementptr inbounds i8, ptr %2, i64 40
  store ptr %38, ptr %39, align 8, !tbaa !14
  %40 = shl nuw nsw i32 %26, 3
  %41 = zext nneg i32 %40 to i64
  %42 = getelementptr i8, ptr %34, i64 %41
  %43 = getelementptr inbounds i8, ptr %2, i64 48
  store ptr %42, ptr %43, align 8, !tbaa !15
  %44 = lshr i32 %27, 3
  %45 = and i32 %44, 536870904
  %46 = zext nneg i32 %45 to i64
  %47 = getelementptr i8, ptr %42, i64 %46
  %48 = getelementptr inbounds i8, ptr %2, i64 56
  store ptr %47, ptr %48, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %47, i64 %41
  %50 = getelementptr inbounds i8, ptr %2, i64 64
  store ptr %49, ptr %50, align 8, !tbaa !17
  %51 = load i32, ptr %5, align 4, !tbaa !18
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %49, i64 %52
  %54 = getelementptr inbounds i8, ptr %2, i64 72
  store ptr %53, ptr %54, align 8, !tbaa !19
  %55 = load i32, ptr %6, align 4, !tbaa !18
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %53, i64 %56
  %58 = getelementptr inbounds i8, ptr %2, i64 80
  store ptr %57, ptr %58, align 8, !tbaa !20
  %59 = add nsw i32 %26, -1
  %60 = zext nneg i32 %59 to i64
  %61 = shl nuw nsw i64 %60, 3
  %62 = add nuw nsw i64 %61, 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %38, i8 0, i64 %62, i1 false), !tbaa !21
  %63 = lshr i32 %27, 3
  %64 = and i32 %63, 536870904
  %65 = zext nneg i32 %64 to i64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %42, i8 0, i64 %65, i1 false), !tbaa !21
  %66 = lshr i32 %25, 3
  %67 = and i32 %66, 536870904
  %68 = zext nneg i32 %67 to i64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %47, i8 0, i64 %68, i1 false), !tbaa !21
  %69 = call ptr @gsModArithRSA() #5
  %70 = call i32 @gsModEngineInit(ptr noundef nonnull %49, ptr noundef null, i32 noundef %0, i32 noundef 2, ptr noundef %69) #5
  %71 = load ptr, ptr %54, align 8, !tbaa !19
  %72 = call ptr @gsModArithRSA() #5
  %73 = call i32 @gsModEngineInit(ptr noundef %71, ptr noundef null, i32 noundef %1, i32 noundef 2, ptr noundef %72) #5
  %74 = load ptr, ptr %58, align 8, !tbaa !20
  %75 = call ptr @gsModArithRSA() #5
  %76 = call i32 @gsModEngineInit(ptr noundef %74, ptr noundef null, i32 noundef %13, i32 noundef 2, ptr noundef %75) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %77

77:                                               ; preds = %15, %12, %9, %4, %._crit_edge
  %.079 = phi i32 [ 0, %._crit_edge ], [ -8, %4 ], [ -5, %9 ], [ -14, %12 ], [ -9, %15 ]
  ret i32 %.079
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) local_unnamed_addr #1

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

declare void @rsaMontExpGetSize(i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_INT_PTR(ptr noundef) local_unnamed_addr #1

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

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

declare ptr @gsModArithRSA() local_unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 #2 = { mustprogress nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !7, i64 0}
!6 = !{!"_cpRSA_private_key", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 20}
!12 = !{!6, !7, i64 24}
!13 = !{!6, !10, i64 32}
!14 = !{!6, !10, i64 40}
!15 = !{!6, !10, i64 48}
!16 = !{!6, !10, i64 56}
!17 = !{!6, !10, i64 64}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !10, i64 72}
!20 = !{!6, !10, i64 80}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass