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

; 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._cpStateECES_SM2 = type { i32, ptr, i32, i32, i32, [32 x i8], i8, i8, ptr, 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._gsModEngine = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECESSetKey_SM2(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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct._cpGFpECPoint, align 8
  %16 = alloca %struct._cpGFpElement, align 8
  %17 = alloca %struct._cpGFpElement, align 8
  %18 = alloca i32, align 4
  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
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp eq ptr null, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %5
  store i32 -8, ptr %6, align 4
  br label %172

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

25:                                               ; preds = %22
  store i32 -8, ptr %6, align 4
  br label %172

26:                                               ; preds = %22
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = icmp eq ptr null, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  store i32 -8, ptr %6, align 4
  br label %172

30:                                               ; preds = %26
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = icmp eq ptr null, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  store i32 -8, ptr %6, align 4
  br label %172

34:                                               ; preds = %30
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = call i64 @IPP_UINT_PTR(ptr noundef %38)
  %40 = trunc i64 %39 to i32
  %41 = xor i32 %37, %40
  %42 = icmp eq i32 %41, 1129136468
  br i1 %42, label %44, label %43

43:                                               ; preds = %34
  store i32 -13, ptr %6, align 4
  br label %172

44:                                               ; preds = %34
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._cpGFpEC, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !12
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = call i64 @IPP_UINT_PTR(ptr noundef %48)
  %50 = trunc i64 %49 to i32
  %51 = xor i32 %47, %50
  %52 = icmp eq i32 %51, 1129136461
  br i1 %52, label %54, label %53

53:                                               ; preds = %44
  store i32 -13, ptr %6, align 4
  br label %172

54:                                               ; preds = %44
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._cpGFpEC, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !14
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %60, label %59

59:                                               ; preds = %54
  store i32 -13, ptr %6, align 4
  br label %172

60:                                               ; preds = %54
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._cpGFpEC, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = getelementptr inbounds %struct._cpGFp, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = getelementptr inbounds %struct._gsModEngine, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = icmp slt i32 1, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %60
  store i32 -14, ptr %6, align 4
  br label %172

70:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._cpGFpEC, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  %74 = getelementptr inbounds %struct._cpGFp, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  store ptr %75, ptr %12, align 8, !tbaa !5
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._gsModEngine, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !21
  %79 = add nsw i32 %78, 7
  %80 = ashr i32 %79, 3
  %81 = mul nsw i32 %80, 2
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 8, !tbaa !22
  %85 = icmp ne i32 %81, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %70
  store i32 -5, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %171

87:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !23
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %88)
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = call ptr @cpEcGFpInitPoint(ptr noundef %15, ptr noundef %89, i32 noundef 0, ptr noundef %90)
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = call i32 @ippsGFpECMulPoint(ptr noundef %92, ptr noundef %93, ptr noundef %15, ptr noundef %94, ptr noundef %95)
  store i32 %96, ptr %14, align 4, !tbaa !23
  %97 = load i32, ptr %14, align 4, !tbaa !23
  %98 = icmp eq i32 0, %97
  br i1 %98, label %99, label %159

99:                                               ; preds = %87
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = call ptr @gsModPoolAlloc(ptr noundef %100, i32 noundef 1)
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._gsModEngine, ptr %102, i32 0, i32 3
  %104 = load i32, ptr %103, align 8, !tbaa !24
  %105 = call ptr @cpGFpElementConstruct(ptr noundef %16, ptr noundef %101, i32 noundef %104)
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = call ptr @gsModPoolAlloc(ptr noundef %106, i32 noundef 1)
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._gsModEngine, ptr %108, i32 0, i32 3
  %110 = load i32, ptr %109, align 8, !tbaa !24
  %111 = call ptr @cpGFpElementConstruct(ptr noundef %17, ptr noundef %107, i32 noundef %110)
  %112 = getelementptr inbounds %struct._cpGFpElement, ptr %16, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !25
  %114 = getelementptr inbounds %struct._cpGFpElement, ptr %17, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !25
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = call i32 @gfec_GetPoint(ptr noundef %113, ptr noundef %115, ptr noundef %15, ptr noundef %116)
  store i32 %117, ptr %18, align 4, !tbaa !23
  %118 = load i32, ptr %18, align 4, !tbaa !23
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %157

120:                                              ; preds = %99
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !27
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 8, !tbaa !22
  %127 = sdiv i32 %126, 2
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._cpGFpEC, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = call i32 @ippsGFpGetElementOctString(ptr noundef %16, ptr noundef %123, i32 noundef %127, ptr noundef %130)
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %132, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !27
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %135, i32 0, i32 2
  %137 = load i32, ptr %136, align 8, !tbaa !22
  %138 = sdiv i32 %137, 2
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %134, i64 %139
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %141, i32 0, i32 2
  %143 = load i32, ptr %142, align 8, !tbaa !22
  %144 = sdiv i32 %143, 2
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._cpGFpEC, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !15
  %148 = call i32 @ippsGFpGetElementOctString(ptr noundef %17, ptr noundef %140, i32 noundef %144, ptr noundef %147)
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %149, i32 0, i32 4
  store i32 0, ptr %150, align 8, !tbaa !28
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %151, i32 0, i32 7
  store i8 32, ptr %152, align 1, !tbaa !29
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %153, i32 0, i32 6
  store i8 0, ptr %154, align 4, !tbaa !30
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._cpStateECES_SM2, ptr %155, i32 0, i32 3
  store i32 1, ptr %156, align 4, !tbaa !31
  br label %157

157:                                              ; preds = %120, %99
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %158, i32 noundef 2)
  br label %159

159:                                              ; preds = %157, %87
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %160)
  %161 = load i32, ptr %14, align 4, !tbaa !23
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %159
  %164 = load i32, ptr %14, align 4, !tbaa !23
  store i32 %164, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %170

165:                                              ; preds = %159
  %166 = load i32, ptr %18, align 4, !tbaa !23
  %167 = icmp ne i32 %166, 0
  %168 = zext i1 %167 to i64
  %169 = select i1 %167, i32 0, i32 -1015
  store i32 %169, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %170

170:                                              ; preds = %165, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %171

171:                                              ; preds = %170, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %172

172:                                              ; preds = %171, %69, %59, %53, %43, %33, %29, %25, %21
  %173 = load i32, ptr %6, align 4
  ret i32 %173
}

; 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

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_cpStateECES_SM2", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !7, i64 28, !7, i64 60, !7, i64 61, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_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}
!14 = !{!13, !11, i64 16}
!15 = !{!13, !6, i64 8}
!16 = !{!17, !6, i64 8}
!17 = !{!"_cpGFp", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!19, !11, i64 8}
!19 = !{!"_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, !20, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !6, i64 104}
!20 = !{!"long long", !7, i64 0}
!21 = !{!19, !11, i64 12}
!22 = !{!10, !11, i64 16}
!23 = !{!11, !11, i64 0}
!24 = !{!19, !11, i64 16}
!25 = !{!26, !6, i64 8}
!26 = !{!"_cpGFpElement", !11, i64 0, !11, i64 4, !6, i64 8}
!27 = !{!10, !6, i64 8}
!28 = !{!10, !11, i64 24}
!29 = !{!10, !7, i64 61}
!30 = !{!10, !7, i64 60}
!31 = !{!10, !11, i64 20}


; 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 i32 @ippsGFpECESSetKey_SM2(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 = alloca %struct._cpGFpElement, align 8
  %9 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %10 = insertelement <4 x ptr> %9, ptr %1, i64 1
  %11 = insertelement <4 x ptr> %10, ptr %2, i64 2
  %12 = insertelement <4 x ptr> %11, ptr %3, i64 3
  %13 = icmp eq <4 x ptr> %12, zeroinitializer
  %14 = bitcast <4 x i1> %13 to i4
  %.not54 = icmp eq i4 %14, 0
  br i1 %.not54, label %15, label %85

15:                                               ; preds = %5
  %16 = load i32, ptr %2, align 8, !tbaa !5
  %17 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %18 = trunc i64 %17 to i32
  %19 = xor i32 %16, %18
  %20 = icmp eq i32 %19, 1129136468
  br i1 %20, label %21, label %85

21:                                               ; preds = %15
  %22 = load i32, ptr %3, align 8, !tbaa !11
  %23 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %3)
  %24 = trunc i64 %23 to i32
  %25 = xor i32 %22, %24
  %26 = icmp eq i32 %25, 1129136461
  br i1 %26, label %27, label %85

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %3, i64 16
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %85, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = icmp sgt i32 %36, 1
  br i1 %37, label %85, label %38

38:                                               ; preds = %30
  %39 = getelementptr inbounds i8, ptr %34, i64 12
  %40 = load i32, ptr %39, align 4, !tbaa !20
  %41 = add nsw i32 %40, 7
  %42 = ashr i32 %41, 2
  %43 = and i32 %42, -2
  %44 = getelementptr inbounds i8, ptr %2, i64 16
  %45 = load i32, ptr %44, align 8, !tbaa !21
  %.not48 = icmp eq i32 %43, %45
  br i1 %.not48, label %46, label %85

46:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %47 = tail call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef nonnull %3)
  %48 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %6, ptr noundef %47, i32 noundef 0, ptr noundef nonnull %3)
  %49 = call i32 @ippsGFpECMulPoint(ptr noundef nonnull %1, ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %3, ptr noundef %4) #4
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %84

51:                                               ; preds = %46
  %52 = call ptr @gsModPoolAlloc(ptr noundef nonnull %34, i32 noundef 1)
  %53 = getelementptr inbounds i8, ptr %34, i64 16
  %54 = load i32, ptr %53, align 8, !tbaa !22
  %55 = call ptr @cpGFpElementConstruct(ptr noundef nonnull %7, ptr noundef %52, i32 noundef %54)
  %56 = call ptr @gsModPoolAlloc(ptr noundef nonnull %34, i32 noundef 1)
  %57 = load i32, ptr %53, align 8, !tbaa !22
  %58 = call ptr @cpGFpElementConstruct(ptr noundef nonnull %8, ptr noundef %56, i32 noundef %57)
  %59 = getelementptr inbounds i8, ptr %7, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds i8, ptr %8, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !23
  %63 = call i32 @gfec_GetPoint(ptr noundef %60, ptr noundef %62, ptr noundef nonnull %6, ptr noundef nonnull %3) #4
  %.not49 = icmp eq i32 %63, 0
  br i1 %.not49, label %82, label %64

64:                                               ; preds = %51
  %65 = getelementptr inbounds i8, ptr %2, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %67 = load i32, ptr %44, align 8, !tbaa !21
  %68 = sdiv i32 %67, 2
  %69 = load ptr, ptr %31, align 8, !tbaa !14
  %70 = call i32 @ippsGFpGetElementOctString(ptr noundef nonnull %7, ptr noundef %66, i32 noundef %68, ptr noundef %69) #4
  %71 = load ptr, ptr %65, align 8, !tbaa !25
  %72 = load i32, ptr %44, align 8, !tbaa !21
  %73 = sdiv i32 %72, 2
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %71, i64 %74
  %76 = load ptr, ptr %31, align 8, !tbaa !14
  %77 = call i32 @ippsGFpGetElementOctString(ptr noundef nonnull %8, ptr noundef %75, i32 noundef %73, ptr noundef %76) #4
  %78 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 0, ptr %78, align 8, !tbaa !26
  %79 = getelementptr inbounds i8, ptr %2, i64 61
  store i8 32, ptr %79, align 1, !tbaa !27
  %80 = getelementptr inbounds i8, ptr %2, i64 60
  store i8 0, ptr %80, align 4, !tbaa !28
  %81 = getelementptr inbounds i8, ptr %2, i64 20
  store i32 1, ptr %81, align 4, !tbaa !29
  br label %82

82:                                               ; preds = %64, %51
  %83 = phi i32 [ 0, %64 ], [ -1015, %51 ]
  call void @gsModPoolFree(ptr noundef nonnull %34, i32 noundef 2)
  br label %84

84:                                               ; preds = %82, %46
  %.0. = phi i32 [ %83, %82 ], [ %49, %46 ]
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %85

85:                                               ; preds = %84, %38, %30, %27, %21, %15, %5
  %.2 = phi i32 [ -8, %5 ], [ -13, %15 ], [ -13, %21 ], [ -13, %27 ], [ -14, %30 ], [ %.0., %84 ], [ -5, %38 ]
  ret i32 %.2
}

; 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

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

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

declare i32 @ippsGFpECMulPoint(ptr noundef, ptr noundef, ptr 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 #1

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpEcGFpReleasePool(i32 noundef, 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

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 = { 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 = !{!"_cpStateECES_SM2", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 28, !8, i64 60, !8, i64 61, !10, i64 64, !10, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_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}
!13 = !{!12, !7, i64 16}
!14 = !{!12, !10, i64 8}
!15 = !{!16, !10, i64 8}
!16 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!17 = !{!18, !7, i64 8}
!18 = !{!"_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, !19, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!19 = !{!"long long", !8, i64 0}
!20 = !{!18, !7, i64 12}
!21 = !{!6, !7, i64 16}
!22 = !{!18, !7, i64 16}
!23 = !{!24, !10, i64 8}
!24 = !{!"_cpGFpElement", !7, i64 0, !7, i64 4, !10, i64 8}
!25 = !{!6, !10, i64 8}
!26 = !{!6, !7, i64 24}
!27 = !{!6, !8, i64 61}
!28 = !{!6, !8, i64 60}
!29 = !{!6, !7, i64 20}


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