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

; 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._cpGFpECPoint = type { i32, i32, i32, ptr }
%struct._cpGFpElement = type { i32, i32, ptr }
%struct._cpGFpEC = type { i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpGFp = type { i32, i32, ptr }
%struct._cpBigNum = type { i32, i32, i32, i32, ptr, ptr }
%struct._gsModEngine = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, i32, ptr }
%struct._gsModMethod = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

23:                                               ; preds = %5
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

24:                                               ; preds = %5
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = icmp eq ptr null, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

28:                                               ; preds = %24
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._cpGFpEC, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !9
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call i64 @IPP_UINT_PTR(ptr noundef %32)
  %34 = trunc i64 %33 to i32
  %35 = xor i32 %31, %34
  %36 = icmp eq i32 %35, 1129136461
  br i1 %36, label %38, label %37

37:                                               ; preds = %28
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

38:                                               ; preds = %28
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._cpGFpEC, ptr %39, i32 0, i32 3
  %41 = load i32, ptr %40, align 8, !tbaa !12
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %38
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

44:                                               ; preds = %38
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._cpGFpEC, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  store ptr %47, ptr %12, align 8, !tbaa !5
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._cpGFp, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  store ptr %50, ptr %13, align 8, !tbaa !5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = icmp eq ptr null, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %44
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

54:                                               ; preds = %44
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._cpBigNum, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !16
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call i64 @IPP_UINT_PTR(ptr noundef %58)
  %60 = trunc i64 %59 to i32
  %61 = xor i32 %57, %60
  %62 = icmp eq i32 %61, 1112098638
  br i1 %62, label %64, label %63

63:                                               ; preds = %54
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

64:                                               ; preds = %54
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = call i32 @gfec_CheckPrivateKey(ptr noundef %65, ptr noundef %66)
  %68 = icmp eq i32 0, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %64
  store i32 -1008, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

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

73:                                               ; preds = %70
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

74:                                               ; preds = %70
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._cpGFpECPoint, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !18
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call i64 @IPP_UINT_PTR(ptr noundef %78)
  %80 = trunc i64 %79 to i32
  %81 = xor i32 %77, %80
  %82 = icmp eq i32 %81, 1129136462
  br i1 %82, label %84, label %83

83:                                               ; preds = %74
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

84:                                               ; preds = %74
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = call i32 @gfec_IsPointOnCurve(ptr noundef %85, ptr noundef %86)
  %88 = icmp eq i32 0, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %84
  store i32 -1017, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

90:                                               ; preds = %84
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = icmp eq ptr null, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

94:                                               ; preds = %90
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._cpBigNum, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !16
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = call i64 @IPP_UINT_PTR(ptr noundef %98)
  %100 = trunc i64 %99 to i32
  %101 = xor i32 %97, %100
  %102 = icmp eq i32 %101, 1112098638
  br i1 %102, label %104, label %103

103:                                              ; preds = %94
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

104:                                              ; preds = %94
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._cpBigNum, ptr %105, i32 0, i32 3
  %107 = load i32, ptr %106, align 4, !tbaa !20
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._gsModEngine, ptr %108, i32 0, i32 3
  %110 = load i32, ptr %109, align 8, !tbaa !21
  %111 = icmp slt i32 %107, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %104
  store i32 -7, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %185

113:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %114)
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = call ptr @cpEcGFpInitPoint(ptr noundef %15, ptr noundef %115, i32 noundef 0, ptr noundef %116)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._gsModEngine, ptr %118, i32 0, i32 3
  %120 = load i32, ptr %119, align 8, !tbaa !21
  store i32 %120, ptr %17, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._cpBigNum, ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !25
  store ptr %123, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._cpBigNum, ptr %124, i32 0, i32 3
  %126 = load i32, ptr %125, align 4, !tbaa !20
  store i32 %126, ptr %19, align 4, !tbaa !24
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._cpBigNum, ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !25
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._cpBigNum, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 8, !tbaa !26
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = call ptr @gfec_MulPoint(ptr noundef %15, ptr noundef %127, ptr noundef %130, i32 noundef %133, ptr noundef %134, ptr noundef %135)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = call ptr @gsModPoolAlloc(ptr noundef %137, i32 noundef 1)
  %139 = load i32, ptr %17, align 4, !tbaa !24
  %140 = call ptr @cpGFpElementConstruct(ptr noundef %20, ptr noundef %138, i32 noundef %139)
  %141 = getelementptr inbounds %struct._cpGFpElement, ptr %20, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !27
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = call i32 @gfec_GetPoint(ptr noundef %142, ptr noundef null, ptr noundef %15, ptr noundef %143)
  store i32 %144, ptr %16, align 4, !tbaa !24
  %145 = load i32, ptr %16, align 4, !tbaa !24
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %166

147:                                              ; preds = %113
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._gsModEngine, ptr %148, i32 0, i32 6
  %150 = load ptr, ptr %149, align 8, !tbaa !29
  %151 = getelementptr inbounds %struct._gsModMethod, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !30
  %153 = load ptr, ptr %18, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._cpGFpElement, ptr %20, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !27
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = call ptr %152(ptr noundef %153, ptr noundef %155, ptr noundef %156)
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = load i32, ptr %17, align 4, !tbaa !24
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i64, ptr %158, i64 %160
  %162 = load i32, ptr %19, align 4, !tbaa !24
  %163 = load i32, ptr %17, align 4, !tbaa !24
  %164 = sub nsw i32 %162, %163
  %165 = call ptr @cpGFpElementPad(ptr noundef %161, i32 noundef %164, i64 noundef 0)
  br label %166

166:                                              ; preds = %147, %113
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %167, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  %168 = load i32, ptr %16, align 4, !tbaa !24
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %179

170:                                              ; preds = %166
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._cpBigNum, ptr %171, i32 0, i32 1
  store i32 1, ptr %172, align 4, !tbaa !32
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = load i32, ptr %19, align 4, !tbaa !24
  %175 = call i32 @cpFix_BNU(ptr noundef %173, i32 noundef %174)
  store i32 %175, ptr %19, align 4, !tbaa !24
  %176 = load i32, ptr %19, align 4, !tbaa !24
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._cpBigNum, ptr %177, i32 0, i32 2
  store i32 %176, ptr %178, align 8, !tbaa !26
  br label %179

179:                                              ; preds = %170, %166
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %180)
  %181 = load i32, ptr %16, align 4, !tbaa !24
  %182 = icmp ne i32 %181, 0
  %183 = zext i1 %182 to i64
  %184 = select i1 %182, i32 0, i32 -1009
  store i32 %184, ptr %6, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 24, ptr %15) #4
  br label %185

185:                                              ; preds = %179, %112, %103, %93, %89, %83, %73, %69, %63, %53, %43, %37, %27, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %186 = load i32, ptr %6, align 4
  ret i32 %186
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: 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 @cpFix_BNU(ptr noundef, i32 noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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, !11, i64 0}
!10 = !{!"_cpGFpEC", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 16}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !6, i64 8}
!15 = !{!"_cpGFp", !11, i64 0, !11, i64 4, !6, i64 8}
!16 = !{!17, !11, i64 0}
!17 = !{!"_cpBigNum", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24}
!18 = !{!19, !11, i64 0}
!19 = !{!"_cpGFpECPoint", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16}
!20 = !{!17, !11, i64 12}
!21 = !{!22, !11, i64 16}
!22 = !{!"_gsModEngine", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !23, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !6, i64 104}
!23 = !{!"long long", !7, i64 0}
!24 = !{!11, !11, i64 0}
!25 = !{!17, !6, i64 16}
!26 = !{!17, !11, i64 8}
!27 = !{!28, !6, i64 8}
!28 = !{!"_cpGFpElement", !11, i64 0, !11, i64 4, !6, i64 8}
!29 = !{!22, !6, i64 32}
!30 = !{!31, !6, i64 8}
!31 = !{!"_gsModMethod", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!32 = !{!17, !11, i64 4}


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

%struct._cpGFpECPoint = type { i32, i32, i32, ptr }
%struct._cpGFpElement = type { i32, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1017, 1) i32 @ippsGFpECSharedSecretDH(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca %struct._cpGFpECPoint, align 8
  %7 = alloca %struct._cpGFpElement, align 8
  %8 = icmp eq ptr %3, null
  %9 = icmp eq ptr %4, null
  %or.cond = or i1 %8, %9
  br i1 %or.cond, label %92, label %10

10:                                               ; preds = %5
  %11 = load i32, ptr %3, align 8, !tbaa !5
  %12 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %3)
  %13 = trunc i64 %12 to i32
  %14 = xor i32 %11, %13
  %15 = icmp eq i32 %14, 1129136461
  br i1 %15, label %16, label %92

16:                                               ; preds = %10
  %17 = getelementptr inbounds i8, ptr %3, i64 16
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %92, label %19

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %3, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = icmp eq ptr %0, null
  br i1 %24, label %92, label %25

25:                                               ; preds = %19
  %26 = load i32, ptr %0, align 8, !tbaa !15
  %27 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %0)
  %28 = trunc i64 %27 to i32
  %29 = xor i32 %26, %28
  %30 = icmp eq i32 %29, 1112098638
  br i1 %30, label %31, label %92

31:                                               ; preds = %25
  %32 = tail call i32 @gfec_CheckPrivateKey(ptr noundef nonnull %0, ptr noundef nonnull %3) #4
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %92, label %34

34:                                               ; preds = %31
  %35 = icmp eq ptr %1, null
  br i1 %35, label %92, label %36

36:                                               ; preds = %34
  %37 = load i32, ptr %1, align 8, !tbaa !17
  %38 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %1)
  %39 = trunc i64 %38 to i32
  %40 = xor i32 %37, %39
  %41 = icmp eq i32 %40, 1129136462
  br i1 %41, label %42, label %92

42:                                               ; preds = %36
  %43 = tail call i32 @gfec_IsPointOnCurve(ptr noundef nonnull %1, ptr noundef nonnull %3) #4
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %92, label %45

45:                                               ; preds = %42
  %46 = icmp eq ptr %2, null
  br i1 %46, label %92, label %47

47:                                               ; preds = %45
  %48 = load i32, ptr %2, align 8, !tbaa !15
  %49 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %50 = trunc i64 %49 to i32
  %51 = xor i32 %48, %50
  %52 = icmp eq i32 %51, 1112098638
  br i1 %52, label %53, label %92

53:                                               ; preds = %47
  %54 = getelementptr inbounds i8, ptr %2, i64 12
  %55 = load i32, ptr %54, align 4, !tbaa !19
  %56 = getelementptr inbounds i8, ptr %23, i64 16
  %57 = load i32, ptr %56, align 8, !tbaa !20
  %58 = icmp slt i32 %55, %57
  br i1 %58, label %92, label %59

59:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %60 = tail call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef nonnull %3)
  %61 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %6, ptr noundef %60, i32 noundef 0, ptr noundef nonnull %3)
  %62 = load i32, ptr %56, align 8, !tbaa !20
  %63 = getelementptr inbounds i8, ptr %2, i64 16
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  %65 = load i32, ptr %54, align 4, !tbaa !19
  %66 = getelementptr inbounds i8, ptr %0, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  %68 = getelementptr inbounds i8, ptr %0, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !24
  %70 = call ptr @gfec_MulPoint(ptr noundef nonnull %6, ptr noundef nonnull %1, ptr noundef %67, i32 noundef %69, ptr noundef nonnull %3, ptr noundef nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %71 = call ptr @gsModPoolAlloc(ptr noundef nonnull %23, i32 noundef 1)
  %72 = call ptr @cpGFpElementConstruct(ptr noundef nonnull %7, ptr noundef %71, i32 noundef %62)
  %73 = getelementptr inbounds i8, ptr %7, i64 8
  %74 = load ptr, ptr %73, align 8, !tbaa !25
  %75 = call i32 @gfec_GetPoint(ptr noundef %74, ptr noundef null, ptr noundef nonnull %6, ptr noundef nonnull %3) #4
  %.not57 = icmp eq i32 %75, 0
  br i1 %.not57, label %.critedge, label %76

76:                                               ; preds = %59
  %77 = getelementptr inbounds i8, ptr %23, i64 32
  %78 = load ptr, ptr %77, align 8, !tbaa !27
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  %80 = load ptr, ptr %79, align 8, !tbaa !28
  %81 = load ptr, ptr %73, align 8, !tbaa !25
  %82 = call ptr %80(ptr noundef %64, ptr noundef %81, ptr noundef nonnull %23) #4
  %83 = sext i32 %62 to i64
  %84 = getelementptr inbounds i64, ptr %64, i64 %83
  %85 = sub nsw i32 %65, %62
  %86 = call ptr @cpGFpElementPad(ptr noundef %84, i32 noundef %85, i64 noundef 0)
  call void @gsModPoolFree(ptr noundef nonnull %23, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %87 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 1, ptr %87, align 4, !tbaa !30
  %88 = call i32 @cpFix_BNU(ptr noundef %64, i32 noundef %65)
  %89 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 %88, ptr %89, align 8, !tbaa !24
  br label %90

.critedge:                                        ; preds = %59
  call void @gsModPoolFree(ptr noundef nonnull %23, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %90

90:                                               ; preds = %.critedge, %76
  %91 = phi i32 [ 0, %76 ], [ -1009, %.critedge ]
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %92

92:                                               ; preds = %53, %47, %45, %42, %36, %34, %31, %25, %19, %16, %10, %5, %90
  %.0 = phi i32 [ %91, %90 ], [ -8, %5 ], [ -13, %10 ], [ -13, %16 ], [ -8, %19 ], [ -13, %25 ], [ -1008, %31 ], [ -8, %34 ], [ -13, %36 ], [ -1017, %42 ], [ -8, %45 ], [ -13, %47 ], [ -7, %53 ]
  ret i32 %.0
}

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

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

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

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

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

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

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

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

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

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

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

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

; 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 @cpFix_BNU(ptr noundef, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = !{!"_cpGFpEC", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!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 16}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !10, i64 8}
!14 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!15 = !{!16, !7, i64 0}
!16 = !{!"_cpBigNum", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24}
!17 = !{!18, !7, i64 0}
!18 = !{!"_cpGFpECPoint", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!19 = !{!16, !7, i64 12}
!20 = !{!21, !7, i64 16}
!21 = !{!"_gsModEngine", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !22, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!22 = !{!"long long", !8, i64 0}
!23 = !{!16, !10, i64 16}
!24 = !{!16, !7, i64 8}
!25 = !{!26, !10, i64 8}
!26 = !{!"_cpGFpElement", !7, i64 0, !7, i64 4, !10, i64 8}
!27 = !{!21, !10, i64 32}
!28 = !{!29, !10, i64 8}
!29 = !{!"_gsModMethod", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!30 = !{!16, !7, i64 4}


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