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

; 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._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 }
%struct._gsModMethod = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECVerify(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct._cpGFpECPoint, align 8
  %17 = alloca %struct._cpGFpECPoint, 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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp eq ptr null, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %3
  store i32 -8, ptr %4, align 4
  br label %257

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

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

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

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

34:                                               ; preds = %30
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._cpGFpEC, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = load ptr, ptr %6, 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, 1129136461
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %34
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %45, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._cpGFpEC, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  store ptr %48, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._cpGFp, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  store ptr %51, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._gsModEngine, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !16
  store i32 %54, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._gsModEngine, ptr %55, i32 0, i32 6
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = getelementptr inbounds %struct._gsModMethod, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  store ptr %59, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._gsModEngine, ptr %60, i32 0, i32 6
  %62 = load ptr, ptr %61, align 8, !tbaa !19
  %63 = getelementptr inbounds %struct._gsModMethod, ptr %62, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  store ptr %64, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._gsModEngine, ptr %65, i32 0, i32 6
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = getelementptr inbounds %struct._gsModMethod, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  store ptr %69, ptr %13, align 8, !tbaa !5
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load i32, ptr %70, align 4, !tbaa !12
  %72 = icmp eq i32 0, %71
  br i1 %72, label %73, label %160

73:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = call ptr @gsModPoolAlloc(ptr noundef %74, i32 noundef 1)
  store ptr %75, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = call ptr @gsModPoolAlloc(ptr noundef %76, i32 noundef 1)
  store ptr %77, ptr %15, align 8, !tbaa !5
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._cpGFpEC, ptr %78, i32 0, i32 10
  %80 = load i32, ptr %79, align 8, !tbaa !24
  %81 = icmp eq i32 %80, 2
  br i1 %81, label %82, label %86

82:                                               ; preds = %73
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = load i32, ptr %10, align 4, !tbaa !12
  %85 = call ptr @cpGFpElementPad(ptr noundef %83, i32 noundef %84, i64 noundef 0)
  br label %110

86:                                               ; preds = %73
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._cpGFpEC, ptr %89, i32 0, i32 6
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._cpGFpEC, ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !25
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = call ptr %87(ptr noundef %88, ptr noundef %91, ptr noundef %94, ptr noundef %95)
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = call ptr %97(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._cpGFpEC, ptr %104, i32 0, i32 6
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = call ptr %102(ptr noundef %103, ptr noundef %106, ptr noundef %107, ptr noundef %108)
  br label %110

110:                                              ; preds = %86, %82
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._cpGFpEC, ptr %113, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !26
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._cpGFpEC, ptr %116, i32 0, i32 7
  %118 = load ptr, ptr %117, align 8, !tbaa !26
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = call ptr %111(ptr noundef %112, ptr noundef %115, ptr noundef %118, ptr noundef %119)
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._cpGFpEC, ptr %124, i32 0, i32 7
  %126 = load ptr, ptr %125, align 8, !tbaa !26
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = call ptr %121(ptr noundef %122, ptr noundef %123, ptr noundef %126, ptr noundef %127)
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = call ptr %129(ptr noundef %130, ptr noundef %131, ptr noundef %132)
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = call ptr %134(ptr noundef %135, ptr noundef %136, ptr noundef %137, ptr noundef %138)
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = load ptr, ptr %14, align 8, !tbaa !5
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = call ptr %140(ptr noundef %141, ptr noundef %142, ptr noundef %143, ptr noundef %144)
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = call ptr %146(ptr noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %150)
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = load i32, ptr %10, align 4, !tbaa !12
  %154 = call i32 @cpGFpElementIsEquChunk(ptr noundef %152, i32 noundef %153, i64 noundef 0)
  %155 = icmp ne i32 %154, 0
  %156 = zext i1 %155 to i64
  %157 = select i1 %155, i32 3, i32 0
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %157, ptr %158, align 4, !tbaa !12
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %159, i32 noundef 2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %160

160:                                              ; preds = %110, %44
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._cpGFpEC, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 8, !tbaa !27
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %256

165:                                              ; preds = %160
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load i32, ptr %166, align 4, !tbaa !12
  %168 = icmp eq i32 0, %167
  br i1 %168, label %169, label %220

169:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._cpGFpEC, ptr %170, i32 0, i32 8
  %172 = load ptr, ptr %171, align 8, !tbaa !28
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = call ptr @cpEcGFpInitPoint(ptr noundef %16, ptr noundef %172, i32 noundef 3, ptr noundef %173)
  %175 = call i32 @gfec_IsPointAtInfinity(ptr noundef %16)
  %176 = icmp ne i32 %175, 0
  %177 = zext i1 %176 to i64
  %178 = select i1 %176, i32 13, i32 0
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %178, ptr %179, align 4, !tbaa !12
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load i32, ptr %180, align 4, !tbaa !12
  %182 = icmp eq i32 0, %181
  br i1 %182, label %183, label %190

183:                                              ; preds = %169
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = call i32 @gfec_IsPointOnCurve(ptr noundef %16, ptr noundef %184)
  %186 = icmp ne i32 %185, 0
  %187 = zext i1 %186 to i64
  %188 = select i1 %186, i32 0, i32 14
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %188, ptr %189, align 4, !tbaa !12
  br label %190

190:                                              ; preds = %183, %169
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load i32, ptr %191, align 4, !tbaa !12
  %193 = icmp eq i32 0, %192
  br i1 %193, label %194, label %219

194:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %195)
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = call ptr @cpEcGFpInitPoint(ptr noundef %17, ptr noundef %196, i32 noundef 0, ptr noundef %197)
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct._cpGFpEC, ptr %199, i32 0, i32 13
  %201 = load ptr, ptr %200, align 8, !tbaa !29
  %202 = getelementptr inbounds %struct._gsModEngine, ptr %201, i32 0, i32 8
  %203 = load ptr, ptr %202, align 8, !tbaa !30
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._cpGFpEC, ptr %204, i32 0, i32 5
  %206 = load i32, ptr %205, align 8, !tbaa !31
  %207 = add nsw i32 %206, 64
  %208 = sub nsw i32 %207, 1
  %209 = sdiv i32 %208, 64
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = load ptr, ptr %7, align 8, !tbaa !5
  %212 = call ptr @gfec_MulBasePoint(ptr noundef %17, ptr noundef %203, i32 noundef %209, ptr noundef %210, ptr noundef %211)
  %213 = call i32 @gfec_IsPointAtInfinity(ptr noundef %17)
  %214 = icmp ne i32 %213, 0
  %215 = zext i1 %214 to i64
  %216 = select i1 %214, i32 0, i32 5
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %216, ptr %217, align 4, !tbaa !12
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %218)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  br label %219

219:                                              ; preds = %194, %190
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  br label %220

220:                                              ; preds = %219, %165
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = load i32, ptr %221, align 4, !tbaa !12
  %223 = icmp eq i32 0, %222
  br i1 %223, label %224, label %255

224:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct._gsModEngine, ptr %225, i32 0, i32 8
  %227 = load ptr, ptr %226, align 8, !tbaa !30
  store ptr %227, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct._gsModEngine, ptr %228, i32 0, i32 3
  %230 = load i32, ptr %229, align 8, !tbaa !16
  store i32 %230, ptr %19, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._cpGFpEC, ptr %231, i32 0, i32 13
  %233 = load ptr, ptr %232, align 8, !tbaa !29
  store ptr %233, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %234 = load ptr, ptr %20, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._gsModEngine, ptr %234, i32 0, i32 8
  %236 = load ptr, ptr %235, align 8, !tbaa !30
  store ptr %236, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %237 = load ptr, ptr %20, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._gsModEngine, ptr %237, i32 0, i32 3
  %239 = load i32, ptr %238, align 8, !tbaa !16
  store i32 %239, ptr %22, align 4, !tbaa !12
  %240 = load i32, ptr %19, align 4, !tbaa !12
  %241 = load i32, ptr %22, align 4, !tbaa !12
  %242 = icmp eq i32 %240, %241
  br i1 %242, label %243, label %250

243:                                              ; preds = %224
  %244 = load ptr, ptr %18, align 8, !tbaa !5
  %245 = load i32, ptr %19, align 4, !tbaa !12
  %246 = load ptr, ptr %21, align 8, !tbaa !5
  %247 = load i32, ptr %19, align 4, !tbaa !12
  %248 = call i32 @cpCmp_BNU(ptr noundef %244, i32 noundef %245, ptr noundef %246, i32 noundef %247)
  %249 = icmp eq i32 0, %248
  br label %250

250:                                              ; preds = %243, %224
  %251 = phi i1 [ false, %224 ], [ %249, %243 ]
  %252 = zext i1 %251 to i64
  %253 = select i1 %251, i32 7, i32 0
  %254 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %253, ptr %254, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %255

255:                                              ; preds = %250, %220
  br label %256

256:                                              ; preds = %255, %160
  store i32 0, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %257

257:                                              ; preds = %256, %43, %33, %29, %25
  %258 = load i32, ptr %4, align 4
  ret i32 %258
}

; 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 @gsModPoolAlloc(ptr noundef, i32 noundef) #1

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 i32 @gfec_IsPointAtInfinity(ptr noundef) #1

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

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

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

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

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

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 = !{!"_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 = !{!11, !11, i64 0}
!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 16}
!17 = !{!"_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, !18, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !6, i64 104}
!18 = !{!"long long", !7, i64 0}
!19 = !{!17, !6, i64 32}
!20 = !{!21, !6, i64 16}
!21 = !{!"_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}
!22 = !{!21, !6, i64 24}
!23 = !{!21, !6, i64 40}
!24 = !{!10, !11, i64 64}
!25 = !{!10, !6, i64 32}
!26 = !{!10, !6, i64 40}
!27 = !{!10, !11, i64 16}
!28 = !{!10, !6, i64 48}
!29 = !{!10, !6, i64 80}
!30 = !{!17, !6, i64 48}
!31 = !{!10, !11, i64 24}


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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -13, 1) i32 @ippsGFpECVerify(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct._cpGFpECPoint, align 8
  %5 = alloca %struct._cpGFpECPoint, align 8
  %6 = icmp eq ptr %1, null
  %7 = icmp eq ptr %0, null
  %or.cond = or i1 %7, %6
  %8 = icmp eq ptr %2, null
  %or.cond103 = or i1 %or.cond, %8
  br i1 %or.cond103, label %.thread, label %9

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

15:                                               ; preds = %9
  store i32 0, ptr %0, align 4, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %21 = load i32, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %19, i64 32
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %23, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %23, i64 40
  %29 = load ptr, ptr %28, align 8, !tbaa !22
  %30 = tail call ptr @gsModPoolAlloc(ptr noundef %19, i32 noundef 1)
  %31 = tail call ptr @gsModPoolAlloc(ptr noundef %19, i32 noundef 1)
  %32 = getelementptr inbounds i8, ptr %1, i64 64
  %33 = load i32, ptr %32, align 8, !tbaa !23
  %34 = icmp eq i32 %33, 2
  br i1 %34, label %35, label %37

35:                                               ; preds = %15
  %36 = tail call ptr @cpGFpElementPad(ptr noundef %30, i32 noundef %21, i64 noundef 0)
  br label %44

37:                                               ; preds = %15
  %38 = getelementptr inbounds i8, ptr %1, i64 32
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = tail call ptr %29(ptr noundef %30, ptr noundef %39, ptr noundef %39, ptr noundef nonnull %19) #4
  %41 = tail call ptr %27(ptr noundef %30, ptr noundef %30, ptr noundef nonnull %19) #4
  %42 = load ptr, ptr %38, align 8, !tbaa !24
  %43 = tail call ptr %25(ptr noundef %30, ptr noundef %42, ptr noundef %30, ptr noundef nonnull %19) #4
  br label %44

44:                                               ; preds = %37, %35
  %45 = getelementptr inbounds i8, ptr %1, i64 40
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %47 = tail call ptr %29(ptr noundef %31, ptr noundef %46, ptr noundef %46, ptr noundef nonnull %19) #4
  %48 = load ptr, ptr %45, align 8, !tbaa !25
  %49 = tail call ptr %29(ptr noundef %31, ptr noundef %31, ptr noundef %48, ptr noundef nonnull %19) #4
  %50 = tail call ptr %27(ptr noundef %31, ptr noundef %31, ptr noundef nonnull %19) #4
  %51 = tail call ptr %29(ptr noundef %30, ptr noundef %31, ptr noundef %30, ptr noundef nonnull %19) #4
  %52 = tail call ptr %29(ptr noundef %30, ptr noundef %31, ptr noundef %30, ptr noundef nonnull %19) #4
  %53 = tail call ptr %29(ptr noundef %30, ptr noundef %31, ptr noundef %30, ptr noundef nonnull %19) #4
  %54 = tail call i32 @cpGFpElementIsEquChunk(ptr noundef %30, i32 noundef %21, i64 noundef 0)
  %.not = icmp eq i32 %54, 0
  %55 = select i1 %.not, i32 0, i32 3
  store i32 %55, ptr %0, align 4, !tbaa !11
  tail call void @gsModPoolFree(ptr noundef nonnull %19, i32 noundef 2)
  %56 = getelementptr inbounds i8, ptr %1, i64 16
  %57 = load i32, ptr %56, align 8, !tbaa !26
  %.not99 = icmp eq i32 %57, 0
  br i1 %.not99, label %.thread, label %58

58:                                               ; preds = %44
  %59 = load i32, ptr %0, align 4, !tbaa !11
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %.thread

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  %62 = getelementptr inbounds i8, ptr %1, i64 48
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %4, ptr noundef %63, i32 noundef 3, ptr noundef nonnull %1)
  %65 = call i32 @gfec_IsPointAtInfinity(ptr noundef nonnull %4)
  %.not100 = icmp eq i32 %65, 0
  %66 = select i1 %.not100, i32 0, i32 13
  store i32 %66, ptr %0, align 4, !tbaa !11
  br i1 %.not100, label %67, label %.thread.critedge

67:                                               ; preds = %61
  %68 = call i32 @gfec_IsPointOnCurve(ptr noundef nonnull %4, ptr noundef nonnull %1) #4
  %.not101.not = icmp eq i32 %68, 0
  %69 = select i1 %.not101.not, i32 14, i32 0
  store i32 %69, ptr %0, align 4, !tbaa !11
  br i1 %.not101.not, label %.thread.critedge, label %.critedge

.critedge:                                        ; preds = %67
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  %70 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef nonnull %1)
  %71 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %5, ptr noundef %70, i32 noundef 0, ptr noundef nonnull %1)
  %72 = getelementptr inbounds i8, ptr %1, i64 80
  %73 = load ptr, ptr %72, align 8, !tbaa !28
  %74 = getelementptr inbounds i8, ptr %73, i64 48
  %75 = load ptr, ptr %74, align 8, !tbaa !29
  %76 = getelementptr inbounds i8, ptr %1, i64 24
  %77 = load i32, ptr %76, align 8, !tbaa !30
  %78 = add nsw i32 %77, 63
  %79 = sdiv i32 %78, 64
  %80 = call ptr @gfec_MulBasePoint(ptr noundef nonnull %5, ptr noundef %75, i32 noundef %79, ptr noundef nonnull %1, ptr noundef nonnull %2) #4
  %81 = call i32 @gfec_IsPointAtInfinity(ptr noundef nonnull %5)
  %.not102 = icmp eq i32 %81, 0
  %82 = select i1 %.not102, i32 5, i32 0
  store i32 %82, ptr %0, align 4, !tbaa !11
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  %.pr.pre = load i32, ptr %0, align 4, !tbaa !11
  %83 = icmp eq i32 %.pr.pre, 0
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br i1 %83, label %84, label %.thread

84:                                               ; preds = %.critedge
  %85 = load i32, ptr %20, align 8, !tbaa !15
  %86 = getelementptr inbounds i8, ptr %1, i64 80
  %87 = load ptr, ptr %86, align 8, !tbaa !28
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %89 = load i32, ptr %88, align 8, !tbaa !15
  %90 = icmp eq i32 %85, %89
  br i1 %90, label %91, label %99

91:                                               ; preds = %84
  %92 = getelementptr inbounds i8, ptr %87, i64 48
  %93 = load ptr, ptr %92, align 8, !tbaa !29
  %94 = getelementptr inbounds i8, ptr %19, i64 48
  %95 = load ptr, ptr %94, align 8, !tbaa !29
  %96 = call i32 @cpCmp_BNU(ptr noundef %95, i32 noundef %85, ptr noundef %93, i32 noundef %85)
  %97 = icmp eq i32 %96, 0
  %98 = select i1 %97, i32 7, i32 0
  br label %99

99:                                               ; preds = %91, %84
  %100 = phi i32 [ 0, %84 ], [ %98, %91 ]
  store i32 %100, ptr %0, align 4, !tbaa !11
  br label %.thread

.thread.critedge:                                 ; preds = %67, %61
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %.thread

.thread:                                          ; preds = %.thread.critedge, %58, %44, %99, %.critedge, %9, %3
  %.0 = phi i32 [ -8, %3 ], [ -13, %9 ], [ 0, %.critedge ], [ 0, %99 ], [ 0, %44 ], [ 0, %58 ], [ 0, %.thread.critedge ]
  ret i32 %.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

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

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

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

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

; 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 i32 @gfec_IsPointAtInfinity(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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 = !{!"_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 = !{!7, !7, i64 0}
!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 16}
!16 = !{!"_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, !17, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!17 = !{!"long long", !8, i64 0}
!18 = !{!16, !10, i64 32}
!19 = !{!20, !10, i64 16}
!20 = !{!"_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}
!21 = !{!20, !10, i64 24}
!22 = !{!20, !10, i64 40}
!23 = !{!6, !7, i64 64}
!24 = !{!6, !10, i64 32}
!25 = !{!6, !10, i64 40}
!26 = !{!6, !7, i64 16}
!27 = !{!6, !10, i64 48}
!28 = !{!6, !10, i64 80}
!29 = !{!16, !10, i64 48}
!30 = !{!6, !7, i64 24}


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