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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsDLPPublicKey(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 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
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = icmp eq ptr null, %14
  br i1 %15, label %16, label %17

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

17:                                               ; preds = %3
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._cpDLP, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = call i64 @IPP_UINT_PTR(ptr noundef %21)
  %23 = trunc i64 %22 to i32
  %24 = xor i32 %20, %23
  %25 = icmp eq i32 %24, 541346896
  br i1 %25, label %27, label %26

26:                                               ; preds = %17
  store i32 -13, ptr %4, align 4
  br label %164

27:                                               ; preds = %17
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._cpDLP, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !12
  %31 = icmp eq i32 %30, 7
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  store i32 -1013, ptr %4, align 4
  br label %164

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

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

37:                                               ; preds = %33
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = icmp eq ptr null, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  store i32 -8, ptr %4, align 4
  br label %164

41:                                               ; preds = %37
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._cpBigNum, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !13
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call i64 @IPP_UINT_PTR(ptr noundef %45)
  %47 = trunc i64 %46 to i32
  %48 = xor i32 %44, %47
  %49 = icmp eq i32 %48, 1112098638
  br i1 %49, label %51, label %50

50:                                               ; preds = %41
  store i32 -13, ptr %4, align 4
  br label %164

51:                                               ; preds = %41
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._cpBigNum, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call i64 @IPP_UINT_PTR(ptr noundef %55)
  %57 = trunc i64 %56 to i32
  %58 = xor i32 %54, %57
  %59 = icmp eq i32 %58, 1112098638
  br i1 %59, label %61, label %60

60:                                               ; preds = %51
  store i32 -13, ptr %4, align 4
  br label %164

61:                                               ; preds = %51
  %62 = call ptr @cpBN_OneRef()
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call i32 @cpBN_cmp(ptr noundef %62, ptr noundef %63)
  %65 = icmp sle i32 0, %64
  br i1 %65, label %86, label %66

66:                                               ; preds = %61
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._cpBigNum, ptr %67, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._cpBigNum, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !16
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._cpDLP, ptr %73, i32 0, i32 7
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = getelementptr inbounds %struct._gsModEngine, ptr %75, i32 0, i32 8
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._cpDLP, ptr %78, i32 0, i32 3
  %80 = load i32, ptr %79, align 4, !tbaa !21
  %81 = add nsw i32 %80, 64
  %82 = sub nsw i32 %81, 1
  %83 = sdiv i32 %82, 64
  %84 = call i32 @cpCmp_BNU(ptr noundef %69, i32 noundef %72, ptr noundef %77, i32 noundef %83)
  %85 = icmp sle i32 0, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %66, %61
  store i32 -1008, ptr %4, align 4
  br label %164

87:                                               ; preds = %66
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._cpBigNum, ptr %88, i32 0, i32 3
  %90 = load i32, ptr %89, align 4, !tbaa !22
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._cpDLP, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 8, !tbaa !23
  %94 = add nsw i32 %93, 64
  %95 = sub nsw i32 %94, 1
  %96 = sdiv i32 %95, 64
  %97 = icmp slt i32 %90, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %87
  store i32 -7, ptr %4, align 4
  br label %164

99:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._cpDLP, ptr %100, i32 0, i32 5
  %102 = load ptr, ptr %101, align 8, !tbaa !24
  store ptr %102, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._cpDLP, ptr %103, i32 0, i32 7
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  store ptr %105, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._gsModEngine, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 8, !tbaa !25
  store i32 %108, ptr %10, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._cpDLP, ptr %109, i32 0, i32 13
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  store ptr %111, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %112 = call ptr @cpBigNumListGet(ptr noundef %11)
  store ptr %112, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !26
  br label %113

113:                                              ; preds = %133, %99
  %114 = load i32, ptr %13, align 4, !tbaa !26
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._cpBigNum, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 8, !tbaa !16
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %119, label %136

119:                                              ; preds = %113
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._cpBigNum, ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = load i32, ptr %13, align 4, !tbaa !26
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i64, ptr %122, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !28
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._cpBigNum, ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !15
  %130 = load i32, ptr %13, align 4, !tbaa !26
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i64, ptr %129, i64 %131
  store i64 %126, ptr %132, align 8, !tbaa !28
  br label %133

133:                                              ; preds = %119
  %134 = load i32, ptr %13, align 4, !tbaa !26
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %13, align 4, !tbaa !26
  br label %113, !llvm.loop !29

136:                                              ; preds = %113
  br label %137

137:                                              ; preds = %148, %136
  %138 = load i32, ptr %13, align 4, !tbaa !26
  %139 = load i32, ptr %10, align 4, !tbaa !26
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %141, label %151

141:                                              ; preds = %137
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._cpBigNum, ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !15
  %145 = load i32, ptr %13, align 4, !tbaa !26
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i64, ptr %144, i64 %146
  store i64 0, ptr %147, align 8, !tbaa !28
  br label %148

148:                                              ; preds = %141
  %149 = load i32, ptr %13, align 4, !tbaa !26
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %13, align 4, !tbaa !26
  br label %137, !llvm.loop !31

151:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %152 = load i32, ptr %10, align 4, !tbaa !26
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._cpBigNum, ptr %153, i32 0, i32 2
  store i32 %152, ptr %154, align 8, !tbaa !16
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._cpDLP, ptr %156, i32 0, i32 8
  %158 = load ptr, ptr %157, align 8, !tbaa !32
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  call void @cpMontExpBin_BN_sscm(ptr noundef %155, ptr noundef %158, ptr noundef %159, ptr noundef %160)
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  call void @cpMontDec_BN(ptr noundef %161, ptr noundef %162, ptr noundef %163)
  store i32 0, ptr %4, align 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 %164

164:                                              ; preds = %151, %98, %86, %60, %50, %40, %36, %32, %26, %16
  %165 = load i32, ptr %4, align 4
  ret i32 %165
}

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

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

declare ptr @cpBN_OneRef() #2

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

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

declare ptr @cpBigNumListGet(ptr noundef) #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpMontDec_BN(ptr noundef, ptr noundef, ptr 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_cpDLP", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, 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, !6, i64 88, !6, i64 96, !6, i64 104}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!14, !11, i64 0}
!14 = !{!"_cpBigNum", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24}
!15 = !{!14, !6, i64 16}
!16 = !{!14, !11, i64 8}
!17 = !{!10, !6, i64 40}
!18 = !{!19, !6, i64 48}
!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 = !{!10, !11, i64 12}
!22 = !{!14, !11, i64 12}
!23 = !{!10, !11, i64 8}
!24 = !{!10, !6, i64 24}
!25 = !{!19, !11, i64 16}
!26 = !{!11, !11, i64 0}
!27 = !{!10, !6, i64 88}
!28 = !{!20, !20, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!10, !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"

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1013, 1) i32 @ippsDLPPublicKey(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca ptr, align 8
  %5 = icmp eq ptr %2, null
  br i1 %5, label %110, label %6

6:                                                ; preds = %3
  %7 = load i32, ptr %2, align 8, !tbaa !5
  %8 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %9 = trunc i64 %8 to i32
  %10 = xor i32 %7, %9
  %11 = icmp eq i32 %10, 541346896
  br i1 %11, label %12, label %110

12:                                               ; preds = %6
  %13 = getelementptr inbounds i8, ptr %2, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp eq i32 %14, 7
  br i1 %15, label %16, label %110

16:                                               ; preds = %12
  %17 = icmp eq ptr %0, null
  %18 = icmp eq ptr %1, null
  %or.cond = or i1 %17, %18
  br i1 %or.cond, label %110, label %19

19:                                               ; preds = %16
  %20 = load i32, ptr %0, align 8, !tbaa !12
  %21 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %0)
  %22 = trunc i64 %21 to i32
  %23 = xor i32 %20, %22
  %24 = icmp eq i32 %23, 1112098638
  br i1 %24, label %25, label %110

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

31:                                               ; preds = %25
  %32 = tail call ptr @cpBN_OneRef() #5
  %33 = tail call i32 @cpBN_cmp(ptr noundef %32, ptr noundef nonnull %0)
  %34 = icmp sgt i32 %33, -1
  br i1 %34, label %110, label %35

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %2, i64 40
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %41, i64 48
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = getelementptr inbounds i8, ptr %2, i64 12
  %45 = load i32, ptr %44, align 4, !tbaa !20
  %46 = add nsw i32 %45, 63
  %47 = sdiv i32 %46, 64
  %48 = tail call i32 @cpCmp_BNU(ptr noundef %37, i32 noundef %39, ptr noundef %43, i32 noundef %47)
  %49 = icmp sgt i32 %48, -1
  br i1 %49, label %110, label %50

50:                                               ; preds = %35
  %51 = getelementptr inbounds i8, ptr %1, i64 12
  %52 = load i32, ptr %51, align 4, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %2, i64 8
  %54 = load i32, ptr %53, align 8, !tbaa !22
  %55 = add nsw i32 %54, 63
  %56 = sdiv i32 %55, 64
  %57 = icmp slt i32 %52, %56
  br i1 %57, label %110, label %58

58:                                               ; preds = %50
  %59 = getelementptr inbounds i8, ptr %2, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = load ptr, ptr %40, align 8, !tbaa !16
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load i32, ptr %62, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %64 = getelementptr inbounds i8, ptr %2, i64 88
  %65 = load ptr, ptr %64, align 8, !tbaa !25
  store ptr %65, ptr %4, align 8, !tbaa !26
  %66 = call ptr @cpBigNumListGet(ptr noundef nonnull %4) #5
  %67 = load i32, ptr %38, align 8, !tbaa !15
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %58
  %69 = load ptr, ptr %36, align 8, !tbaa !14
  %70 = getelementptr inbounds i8, ptr %66, i64 16
  %71 = load ptr, ptr %70, align 8, !tbaa !14
  %wide.trip.count = zext nneg i32 %67 to i64
  %min.iters.check = icmp ult i32 %67, 6
  %72 = ptrtoint ptr %71 to i64
  %73 = ptrtoint ptr %69 to i64
  %74 = sub i64 %72, %73
  %diff.check = icmp ult i64 %74, 32
  %or.cond57 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond57, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %75 = getelementptr inbounds i64, ptr %69, i64 %indvars.iv.prol
  %76 = load i64, ptr %75, align 8, !tbaa !27
  %77 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv.prol
  store i64 %76, ptr %77, align 8, !tbaa !27
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !28

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %78 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %79 = icmp ugt i64 %78, -4
  br i1 %79, label %.preheader, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %80 = getelementptr inbounds i64, ptr %69, i64 %index
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  %wide.load = load <2 x i64>, ptr %80, align 8, !tbaa !27
  %wide.load54 = load <2 x i64>, ptr %81, align 8, !tbaa !27
  %82 = getelementptr inbounds i64, ptr %71, i64 %index
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  store <2 x i64> %wide.load, ptr %82, align 8, !tbaa !27
  store <2 x i64> %wide.load54, ptr %83, align 8, !tbaa !27
  %index.next = add nuw i64 %index, 4
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %scalar.ph.preheader

.preheader:                                       ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %58
  %.0.lcssa = phi i32 [ 0, %58 ], [ %67, %middle.block ], [ %67, %scalar.ph ], [ %67, %scalar.ph.prol.loopexit ]
  %85 = icmp slt i32 %.0.lcssa, %63
  br i1 %85, label %.lr.ph49, label %._crit_edge

.lr.ph49:                                         ; preds = %.preheader
  %86 = getelementptr inbounds i8, ptr %66, i64 16
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  %88 = zext nneg i32 %.0.lcssa to i64
  %89 = shl nuw nsw i64 %88, 3
  %scevgep = getelementptr i8, ptr %87, i64 %89
  %90 = xor i32 %.0.lcssa, -1
  %91 = add i32 %63, %90
  %92 = zext i32 %91 to i64
  %93 = shl nuw nsw i64 %92, 3
  %94 = add nuw nsw i64 %93, 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %94, i1 false), !tbaa !27
  br label %._crit_edge

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %95 = getelementptr inbounds i64, ptr %69, i64 %indvars.iv
  %96 = load i64, ptr %95, align 8, !tbaa !27
  %97 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv
  store i64 %96, ptr %97, align 8, !tbaa !27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %98 = getelementptr inbounds i64, ptr %69, i64 %indvars.iv.next
  %99 = load i64, ptr %98, align 8, !tbaa !27
  %100 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv.next
  store i64 %99, ptr %100, align 8, !tbaa !27
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %101 = getelementptr inbounds i64, ptr %69, i64 %indvars.iv.next.1
  %102 = load i64, ptr %101, align 8, !tbaa !27
  %103 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv.next.1
  store i64 %102, ptr %103, align 8, !tbaa !27
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %104 = getelementptr inbounds i64, ptr %69, i64 %indvars.iv.next.2
  %105 = load i64, ptr %104, align 8, !tbaa !27
  %106 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv.next.2
  store i64 %105, ptr %106, align 8, !tbaa !27
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %.preheader, label %scalar.ph, !llvm.loop !34

._crit_edge:                                      ; preds = %.lr.ph49, %.preheader
  %107 = getelementptr inbounds i8, ptr %66, i64 8
  store i32 %63, ptr %107, align 8, !tbaa !15
  %108 = getelementptr inbounds i8, ptr %2, i64 48
  %109 = load ptr, ptr %108, align 8, !tbaa !35
  call void @cpMontExpBin_BN_sscm(ptr noundef nonnull %1, ptr noundef %109, ptr noundef %66, ptr noundef %60)
  call void @cpMontDec_BN(ptr noundef nonnull %1, ptr noundef nonnull %1, ptr noundef %60)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %110

110:                                              ; preds = %50, %31, %35, %25, %19, %16, %12, %6, %3, %._crit_edge
  %.042 = phi i32 [ 0, %._crit_edge ], [ -8, %3 ], [ -13, %6 ], [ -1013, %12 ], [ -8, %16 ], [ -13, %19 ], [ -13, %25 ], [ -1008, %35 ], [ -1008, %31 ], [ -7, %50 ]
  ret i32 %.042
}

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

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

declare ptr @cpBN_OneRef() local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpCmp_BNU(ptr noundef, i32 noundef, ptr noundef, i32 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) #3

declare ptr @cpBigNumListGet(ptr 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) #3

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_cpDLP", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, 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, !10, i64 88, !10, i64 96, !10, i64 104}
!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 4}
!12 = !{!13, !7, i64 0}
!13 = !{!"_cpBigNum", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24}
!14 = !{!13, !10, i64 16}
!15 = !{!13, !7, i64 8}
!16 = !{!6, !10, i64 40}
!17 = !{!18, !10, i64 48}
!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 = !{!6, !7, i64 12}
!21 = !{!13, !7, i64 12}
!22 = !{!6, !7, i64 8}
!23 = !{!6, !10, i64 24}
!24 = !{!18, !7, i64 16}
!25 = !{!6, !10, i64 88}
!26 = !{!10, !10, i64 0}
!27 = !{!19, !19, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.unroll.disable"}
!30 = distinct !{!30, !31, !32, !33}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!"llvm.loop.isvectorized", i32 1}
!33 = !{!"llvm.loop.unroll.runtime.disable"}
!34 = distinct !{!34, !31, !32}
!35 = !{!6, !10, i64 48}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass