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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECSetPointRandom(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 i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %struct._cpGFpECPoint, align 8
  %24 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = icmp eq ptr null, %25
  br i1 %26, label %27, label %28

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

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

31:                                               ; preds = %28
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

32:                                               ; preds = %28
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp eq ptr null, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

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

45:                                               ; preds = %36
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

46:                                               ; preds = %36
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._cpGFpECPoint, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !12
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = call i64 @IPP_UINT_PTR(ptr noundef %50)
  %52 = trunc i64 %51 to i32
  %53 = xor i32 %49, %52
  %54 = icmp eq i32 %53, 1129136462
  br i1 %54, label %56, label %55

55:                                               ; preds = %46
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

56:                                               ; preds = %46
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._cpGFpEC, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !14
  store ptr %59, ptr %12, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._cpGFp, ptr %60, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  store ptr %62, ptr %13, align 8, !tbaa !5
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._cpGFpECPoint, ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 8, !tbaa !17
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._gsModEngine, ptr %66, i32 0, i32 3
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = icmp ne i32 %65, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %56
  store i32 -11, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

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

74:                                               ; preds = %71
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

75:                                               ; preds = %71
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = icmp eq ptr null, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  store i32 -8, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %213

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._gsModEngine, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !21
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %141

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = call ptr @gsModPoolAlloc(ptr noundef %85, i32 noundef 1)
  store ptr %86, ptr %16, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %105, %84
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = call ptr @cpGFpRand(ptr noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91)
  %93 = icmp eq ptr null, %92
  %94 = zext i1 %93 to i32
  store i32 %94, ptr %15, align 4, !tbaa !22
  br label %95

95:                                               ; preds = %87
  %96 = load i32, ptr %15, align 4, !tbaa !22
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %105, label %98

98:                                               ; preds = %95
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call i32 @gfec_MakePoint(ptr noundef %99, ptr noundef %100, ptr noundef %101)
  %103 = icmp ne i32 %102, 0
  %104 = xor i1 %103, true
  br label %105

105:                                              ; preds = %98, %95
  %106 = phi i1 [ false, %95 ], [ %104, %98 ]
  br i1 %106, label %87, label %107, !llvm.loop !23

107:                                              ; preds = %105
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %108, i32 noundef 1)
  %109 = load i32, ptr %15, align 4, !tbaa !22
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %140, label %111

111:                                              ; preds = %107
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._cpGFpEC, ptr %112, i32 0, i32 3
  %114 = load i32, ptr %113, align 8, !tbaa !25
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %140

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._cpGFpEC, ptr %117, i32 0, i32 9
  %119 = load ptr, ptr %118, align 8, !tbaa !26
  store ptr %119, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._gsModEngine, ptr %120, i32 0, i32 3
  %122 = load i32, ptr %121, align 8, !tbaa !18
  store i32 %122, ptr %18, align 4, !tbaa !22
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = load i32, ptr %18, align 4, !tbaa !22
  %125 = call i32 @cpGFpElementIsEquChunk(ptr noundef %123, i32 noundef %124, i64 noundef 1)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %139, label %127

127:                                              ; preds = %116
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._cpGFpEC, ptr %130, i32 0, i32 9
  %132 = load ptr, ptr %131, align 8, !tbaa !26
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._gsModEngine, ptr %133, i32 0, i32 3
  %135 = load i32, ptr %134, align 8, !tbaa !18
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = call ptr @gfec_MulPoint(ptr noundef %128, ptr noundef %129, ptr noundef %132, i32 noundef %135, ptr noundef %136, ptr noundef %137)
  br label %139

139:                                              ; preds = %127, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %140

140:                                              ; preds = %139, %111, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %207

141:                                              ; preds = %79
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._cpGFpEC, ptr %142, i32 0, i32 3
  %144 = load i32, ptr %143, align 8, !tbaa !25
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %147, label %146

146:                                              ; preds = %141
  store i32 -13, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %212

147:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._cpGFpEC, ptr %148, i32 0, i32 5
  %150 = load i32, ptr %149, align 8, !tbaa !27
  %151 = add nsw i32 %150, 128
  store i32 %151, ptr %19, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %152 = load i32, ptr %19, align 4, !tbaa !22
  %153 = add nsw i32 %152, 64
  %154 = sub nsw i32 %153, 1
  %155 = sdiv i32 %154, 64
  store i32 %155, ptr %20, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %156 = load i32, ptr %20, align 4, !tbaa !22
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._gsModEngine, ptr %157, i32 0, i32 5
  %159 = load i32, ptr %158, align 8, !tbaa !28
  %160 = add nsw i32 %156, %159
  %161 = sub nsw i32 %160, 1
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._gsModEngine, ptr %162, i32 0, i32 5
  %164 = load i32, ptr %163, align 8, !tbaa !28
  %165 = sdiv i32 %161, %164
  store i32 %165, ptr %21, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = load i32, ptr %21, align 4, !tbaa !22
  %168 = call ptr @gsModPoolAlloc(ptr noundef %166, i32 noundef %167)
  store ptr %168, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #4
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._cpGFpEC, ptr %169, i32 0, i32 8
  %171 = load ptr, ptr %170, align 8, !tbaa !29
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = call ptr @cpEcGFpInitPoint(ptr noundef %23, ptr noundef %171, i32 noundef 3, ptr noundef %172)
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = load ptr, ptr %22, align 8, !tbaa !5
  %176 = load i32, ptr %19, align 4, !tbaa !22
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = call i32 %174(ptr noundef %175, i32 noundef %176, ptr noundef %177)
  %179 = icmp ne i32 0, %178
  %180 = zext i1 %179 to i32
  store i32 %180, ptr %15, align 4, !tbaa !22
  %181 = load i32, ptr %15, align 4, !tbaa !22
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %204, label %183

183:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %184 = load ptr, ptr %22, align 8, !tbaa !5
  %185 = load i32, ptr %20, align 4, !tbaa !22
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._cpGFpEC, ptr %186, i32 0, i32 13
  %188 = load ptr, ptr %187, align 8, !tbaa !30
  %189 = getelementptr inbounds %struct._gsModEngine, ptr %188, i32 0, i32 8
  %190 = load ptr, ptr %189, align 8, !tbaa !31
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._cpGFpEC, ptr %191, i32 0, i32 5
  %193 = load i32, ptr %192, align 8, !tbaa !27
  %194 = add nsw i32 %193, 64
  %195 = sub nsw i32 %194, 1
  %196 = sdiv i32 %195, 64
  %197 = call i32 @cpMod_BNU(ptr noundef %184, i32 noundef %185, ptr noundef %190, i32 noundef %196)
  store i32 %197, ptr %24, align 4, !tbaa !22
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = load ptr, ptr %22, align 8, !tbaa !5
  %200 = load i32, ptr %24, align 4, !tbaa !22
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  %203 = call ptr @gfec_MulPoint(ptr noundef %198, ptr noundef %23, ptr noundef %199, i32 noundef %200, ptr noundef %201, ptr noundef %202)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %204

204:                                              ; preds = %183, %147
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = load i32, ptr %21, align 4, !tbaa !22
  call void @gsModPoolFree(ptr noundef %205, i32 noundef %206)
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %207

207:                                              ; preds = %204, %140
  %208 = load i32, ptr %15, align 4, !tbaa !22
  %209 = icmp ne i32 %208, 0
  %210 = zext i1 %209 to i64
  %211 = select i1 %209, i32 -2, i32 0
  store i32 %211, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %212

212:                                              ; preds = %207, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %213

213:                                              ; preds = %212, %78, %74, %70, %55, %45, %35, %31, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %214 = load i32, ptr %6, align 4
  ret i32 %214
}

; 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

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

declare ptr @cpGFpRand(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpMod_BNU(ptr noundef, i32 noundef, ptr noundef, i32 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 = !{!13, !11, i64 0}
!13 = !{!"_cpGFpECPoint", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16}
!14 = !{!10, !6, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"_cpGFp", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!13, !11, i64 8}
!18 = !{!19, !11, i64 16}
!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, !6, i64 0}
!22 = !{!11, !11, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !11, i64 16}
!26 = !{!10, !6, i64 56}
!27 = !{!10, !11, i64 24}
!28 = !{!19, !11, i64 24}
!29 = !{!10, !6, i64 48}
!30 = !{!10, !6, i64 80}
!31 = !{!19, !6, i64 48}


; 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 @ippsGFpECSetPointRandom(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 = icmp eq ptr %0, null
  %8 = icmp eq ptr %1, null
  %or.cond = or i1 %7, %8
  %9 = icmp eq ptr %4, null
  %or.cond74 = or i1 %or.cond, %9
  br i1 %or.cond74, label %.thread, label %10

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

16:                                               ; preds = %10
  %17 = load i32, ptr %0, align 8, !tbaa !11
  %18 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %0)
  %19 = trunc i64 %18 to i32
  %20 = xor i32 %17, %19
  %21 = icmp eq i32 %20, 1129136462
  br i1 %21, label %22, label %.thread

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %26, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !17
  %.not = icmp eq i32 %28, %30
  br i1 %.not, label %31, label %.thread

31:                                               ; preds = %22
  %32 = icmp eq ptr %2, null
  %33 = icmp eq ptr %3, null
  %or.cond75 = or i1 %32, %33
  br i1 %or.cond75, label %.thread, label %34

34:                                               ; preds = %31
  %35 = load ptr, ptr %26, align 8, !tbaa !20
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %56

37:                                               ; preds = %34
  %38 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %26, i32 noundef 1)
  br label %39

39:                                               ; preds = %42, %37
  %40 = tail call ptr @cpGFpRand(ptr noundef %38, ptr noundef nonnull %26, ptr noundef nonnull %2, ptr noundef nonnull %3) #4
  %41 = icmp eq ptr %40, null
  br i1 %41, label %.thread77, label %42

42:                                               ; preds = %39
  %43 = tail call i32 @gfec_MakePoint(ptr noundef nonnull %0, ptr noundef %38, ptr noundef nonnull %1) #4
  %.not70 = icmp eq i32 %43, 0
  br i1 %.not70, label %39, label %44, !llvm.loop !21

44:                                               ; preds = %42
  tail call void @gsModPoolFree(ptr noundef nonnull %26, i32 noundef 1)
  %45 = getelementptr inbounds i8, ptr %1, i64 16
  %46 = load i32, ptr %45, align 8, !tbaa !23
  %.not71 = icmp eq i32 %46, 0
  br i1 %.not71, label %.thread, label %47

47:                                               ; preds = %44
  %48 = getelementptr inbounds i8, ptr %1, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = load i32, ptr %29, align 8, !tbaa !17
  %51 = tail call i32 @cpGFpElementIsEquChunk(ptr noundef %49, i32 noundef %50, i64 noundef 1)
  %.not72 = icmp eq i32 %51, 0
  br i1 %.not72, label %52, label %.thread

52:                                               ; preds = %47
  %53 = load ptr, ptr %48, align 8, !tbaa !24
  %54 = load i32, ptr %29, align 8, !tbaa !17
  %55 = tail call ptr @gfec_MulPoint(ptr noundef nonnull %0, ptr noundef nonnull %0, ptr noundef %53, i32 noundef %54, ptr noundef nonnull %1, ptr noundef nonnull %4) #4
  br label %.thread

.thread77:                                        ; preds = %39
  tail call void @gsModPoolFree(ptr noundef nonnull %26, i32 noundef 1)
  br label %.thread

56:                                               ; preds = %34
  %57 = getelementptr inbounds i8, ptr %1, i64 16
  %58 = load i32, ptr %57, align 8, !tbaa !23
  %.not69 = icmp eq i32 %58, 0
  br i1 %.not69, label %.thread, label %59

59:                                               ; preds = %56
  %60 = getelementptr inbounds i8, ptr %1, i64 24
  %61 = load i32, ptr %60, align 8, !tbaa !25
  %62 = add nsw i32 %61, 128
  %63 = add nsw i32 %61, 191
  %64 = sdiv i32 %63, 64
  %65 = getelementptr inbounds i8, ptr %26, i64 24
  %66 = load i32, ptr %65, align 8, !tbaa !26
  %67 = add i32 %66, -1
  %68 = add i32 %67, %64
  %69 = sdiv i32 %68, %66
  %70 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %26, i32 noundef %69)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %71 = getelementptr inbounds i8, ptr %1, i64 48
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  %73 = call ptr @cpEcGFpInitPoint(ptr noundef nonnull %6, ptr noundef %72, i32 noundef 3, ptr noundef nonnull %1)
  %74 = call i32 %2(ptr noundef %70, i32 noundef %62, ptr noundef nonnull %3) #4
  %.not80 = icmp eq i32 %74, 0
  br i1 %.not80, label %75, label %.thread79

.thread79:                                        ; preds = %59
  call void @gsModPoolFree(ptr noundef nonnull %26, i32 noundef %69)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %.thread

75:                                               ; preds = %59
  %76 = getelementptr inbounds i8, ptr %1, i64 80
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  %78 = getelementptr inbounds i8, ptr %77, i64 48
  %79 = load ptr, ptr %78, align 8, !tbaa !29
  %80 = load i32, ptr %60, align 8, !tbaa !25
  %81 = add nsw i32 %80, 63
  %82 = sdiv i32 %81, 64
  %83 = call i32 @cpMod_BNU(ptr noundef %70, i32 noundef %64, ptr noundef %79, i32 noundef %82)
  %84 = call ptr @gfec_MulPoint(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef %70, i32 noundef %83, ptr noundef nonnull %1, ptr noundef nonnull %4) #4
  call void @gsModPoolFree(ptr noundef nonnull %26, i32 noundef %69)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %.thread

.thread:                                          ; preds = %44, %52, %47, %75, %.thread79, %.thread77, %56, %31, %22, %16, %10, %5
  %.1 = phi i32 [ -8, %5 ], [ -13, %10 ], [ -13, %16 ], [ -11, %22 ], [ -8, %31 ], [ -13, %56 ], [ 0, %75 ], [ -2, %.thread79 ], [ -2, %.thread77 ], [ 0, %47 ], [ 0, %52 ], [ 0, %44 ]
  ret i32 %.1
}

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

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

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

declare ptr @cpGFpRand(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpGFpElementIsEquChunk(ptr noundef, i32 noundef, i64 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: 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 ptr @cpEcGFpInitPoint(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpMod_BNU(ptr noundef, i32 noundef, ptr noundef, i32 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 = !{!12, !7, i64 0}
!12 = !{!"_cpGFpECPoint", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!13 = !{!6, !10, i64 8}
!14 = !{!15, !10, i64 8}
!15 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!16 = !{!12, !7, i64 8}
!17 = !{!18, !7, i64 16}
!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, !10, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 16}
!24 = !{!6, !10, i64 56}
!25 = !{!6, !7, i64 24}
!26 = !{!18, !7, i64 24}
!27 = !{!6, !10, i64 48}
!28 = !{!6, !10, i64 80}
!29 = !{!18, !10, i64 48}


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