; LLVM IR from albertobsd/keyhunt :: secp256k1/SECP256K1.ll (ZN9Secp256K116ComputePublicKeyEP3Int)

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

%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%class.Secp256K1 = type { %class.Point, %class.Int, %class.Int, [8192 x %class.Point] }

declare void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind noalias writable sret(%class.Point) align 8 %0, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.Point, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i1 false, ptr %9, align 1
  call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %14 unwind label %26

14:                                               ; preds = %3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %31, %14
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp slt i32 %16, 32
  br i1 %17, label %18, label %34

18:                                               ; preds = %15
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %19, i32 noundef %20)
          to label %22 unwind label %26

22:                                               ; preds = %18
  store i8 %21, ptr %8, align 1, !tbaa !11
  %23 = load i8, ptr %8, align 1, !tbaa !11
  %24 = icmp ne i8 %23, 0
  br i1 %24, label %25, label %30

25:                                               ; preds = %22
  br label %34

26:                                               ; preds = %75, %49, %18, %3
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %10, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %11, align 4
  br label %80

30:                                               ; preds = %22
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %7, align 4, !tbaa !9
  br label %15, !llvm.loop !12

34:                                               ; preds = %25, %15
  %35 = getelementptr inbounds %class.Secp256K1, ptr %13, i32 0, i32 3
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = mul nsw i32 256, %36
  %38 = load i8, ptr %8, align 1, !tbaa !11
  %39 = zext i8 %38 to i32
  %40 = sub nsw i32 %39, 1
  %41 = add nsw i32 %37, %40
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [8192 x %class.Point], ptr %35, i64 0, i64 %42
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %43, i64 120, i1 false), !tbaa.struct !14
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %7, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %72, %34
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = icmp slt i32 %47, 32
  br i1 %48, label %49, label %75

49:                                               ; preds = %46
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %50, i32 noundef %51)
          to label %53 unwind label %26

53:                                               ; preds = %49
  store i8 %52, ptr %8, align 1, !tbaa !11
  %54 = load i8, ptr %8, align 1, !tbaa !11
  %55 = icmp ne i8 %54, 0
  br i1 %55, label %56, label %71

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 120, ptr %12) #5
  %57 = getelementptr inbounds %class.Secp256K1, ptr %13, i32 0, i32 3
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = mul nsw i32 256, %58
  %60 = load i8, ptr %8, align 1, !tbaa !11
  %61 = zext i8 %60 to i32
  %62 = sub nsw i32 %61, 1
  %63 = add nsw i32 %59, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [8192 x %class.Point], ptr %57, i64 0, i64 %64
  invoke void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(983240) %13, ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %65)
          to label %66 unwind label %67

66:                                               ; preds = %56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %12, i64 120, i1 false), !tbaa.struct !14
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %12) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %12) #5
  br label %71

67:                                               ; preds = %56
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %12) #5
  br label %80

71:                                               ; preds = %66, %53
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %7, align 4, !tbaa !9
  br label %46, !llvm.loop !15

75:                                               ; preds = %46
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %76 unwind label %26

76:                                               ; preds = %75
  store i1 true, ptr %9, align 1
  %77 = load i1, ptr %9, align 1
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  br label %79

79:                                               ; preds = %78, %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void

80:                                               ; preds = %67, %26
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %10, align 8
  %83 = load i32, ptr %11, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

declare void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120)) #0

declare noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind noalias writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) #4 align 2

declare void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120)) #0

attributes #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 = { nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i64 0, i64 40, !11, i64 40, i64 40, !11, i64 80, i64 40, !11}
!15 = distinct !{!15, !13}


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

%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }

declare void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind noalias nonnull writable sret(%class.Point) align 8 %0, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Point, align 8
  tail call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %.preheader.preheader unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader.preheader:                             ; preds = %3
  %5 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 0)
          to label %6 unwind label %.loopexit.split-lp.loopexit

6:                                                ; preds = %.preheader.preheader
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %.preheader.1, label %69

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.preheader.31, %.preheader.30, %.preheader.29, %.preheader.28, %.preheader.27, %.preheader.26, %.preheader.25, %.preheader.24, %.preheader.23, %.preheader.22, %.preheader.21, %.preheader.20, %.preheader.19, %.preheader.18, %.preheader.17, %.preheader.16, %.preheader.15, %.preheader.14, %.preheader.13, %.preheader.12, %.preheader.11, %.preheader.10, %.preheader.9, %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %lpad.loopexit27 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %._crit_edge, %3
  %lpad.loopexit.split-lp28 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.preheader.1:                                     ; preds = %6
  %7 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 1)
          to label %8 unwind label %.loopexit.split-lp.loopexit

8:                                                ; preds = %.preheader.1
  %.not.1 = icmp eq i8 %7, 0
  br i1 %.not.1, label %.preheader.2, label %69

.preheader.2:                                     ; preds = %8
  %9 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 2)
          to label %10 unwind label %.loopexit.split-lp.loopexit

10:                                               ; preds = %.preheader.2
  %.not.2 = icmp eq i8 %9, 0
  br i1 %.not.2, label %.preheader.3, label %69

.preheader.3:                                     ; preds = %10
  %11 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 3)
          to label %12 unwind label %.loopexit.split-lp.loopexit

12:                                               ; preds = %.preheader.3
  %.not.3 = icmp eq i8 %11, 0
  br i1 %.not.3, label %.preheader.4, label %69

.preheader.4:                                     ; preds = %12
  %13 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 4)
          to label %14 unwind label %.loopexit.split-lp.loopexit

14:                                               ; preds = %.preheader.4
  %.not.4 = icmp eq i8 %13, 0
  br i1 %.not.4, label %.preheader.5, label %69

.preheader.5:                                     ; preds = %14
  %15 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 5)
          to label %16 unwind label %.loopexit.split-lp.loopexit

16:                                               ; preds = %.preheader.5
  %.not.5 = icmp eq i8 %15, 0
  br i1 %.not.5, label %.preheader.6, label %69

.preheader.6:                                     ; preds = %16
  %17 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 6)
          to label %18 unwind label %.loopexit.split-lp.loopexit

18:                                               ; preds = %.preheader.6
  %.not.6 = icmp eq i8 %17, 0
  br i1 %.not.6, label %.preheader.7, label %69

.preheader.7:                                     ; preds = %18
  %19 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 7)
          to label %20 unwind label %.loopexit.split-lp.loopexit

20:                                               ; preds = %.preheader.7
  %.not.7 = icmp eq i8 %19, 0
  br i1 %.not.7, label %.preheader.8, label %69

.preheader.8:                                     ; preds = %20
  %21 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 8)
          to label %22 unwind label %.loopexit.split-lp.loopexit

22:                                               ; preds = %.preheader.8
  %.not.8 = icmp eq i8 %21, 0
  br i1 %.not.8, label %.preheader.9, label %69

.preheader.9:                                     ; preds = %22
  %23 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 9)
          to label %24 unwind label %.loopexit.split-lp.loopexit

24:                                               ; preds = %.preheader.9
  %.not.9 = icmp eq i8 %23, 0
  br i1 %.not.9, label %.preheader.10, label %69

.preheader.10:                                    ; preds = %24
  %25 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 10)
          to label %26 unwind label %.loopexit.split-lp.loopexit

26:                                               ; preds = %.preheader.10
  %.not.10 = icmp eq i8 %25, 0
  br i1 %.not.10, label %.preheader.11, label %69

.preheader.11:                                    ; preds = %26
  %27 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 11)
          to label %28 unwind label %.loopexit.split-lp.loopexit

28:                                               ; preds = %.preheader.11
  %.not.11 = icmp eq i8 %27, 0
  br i1 %.not.11, label %.preheader.12, label %69

.preheader.12:                                    ; preds = %28
  %29 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 12)
          to label %30 unwind label %.loopexit.split-lp.loopexit

30:                                               ; preds = %.preheader.12
  %.not.12 = icmp eq i8 %29, 0
  br i1 %.not.12, label %.preheader.13, label %69

.preheader.13:                                    ; preds = %30
  %31 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 13)
          to label %32 unwind label %.loopexit.split-lp.loopexit

32:                                               ; preds = %.preheader.13
  %.not.13 = icmp eq i8 %31, 0
  br i1 %.not.13, label %.preheader.14, label %69

.preheader.14:                                    ; preds = %32
  %33 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 14)
          to label %34 unwind label %.loopexit.split-lp.loopexit

34:                                               ; preds = %.preheader.14
  %.not.14 = icmp eq i8 %33, 0
  br i1 %.not.14, label %.preheader.15, label %69

.preheader.15:                                    ; preds = %34
  %35 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 15)
          to label %36 unwind label %.loopexit.split-lp.loopexit

36:                                               ; preds = %.preheader.15
  %.not.15 = icmp eq i8 %35, 0
  br i1 %.not.15, label %.preheader.16, label %69

.preheader.16:                                    ; preds = %36
  %37 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 16)
          to label %38 unwind label %.loopexit.split-lp.loopexit

38:                                               ; preds = %.preheader.16
  %.not.16 = icmp eq i8 %37, 0
  br i1 %.not.16, label %.preheader.17, label %69

.preheader.17:                                    ; preds = %38
  %39 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 17)
          to label %40 unwind label %.loopexit.split-lp.loopexit

40:                                               ; preds = %.preheader.17
  %.not.17 = icmp eq i8 %39, 0
  br i1 %.not.17, label %.preheader.18, label %69

.preheader.18:                                    ; preds = %40
  %41 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 18)
          to label %42 unwind label %.loopexit.split-lp.loopexit

42:                                               ; preds = %.preheader.18
  %.not.18 = icmp eq i8 %41, 0
  br i1 %.not.18, label %.preheader.19, label %69

.preheader.19:                                    ; preds = %42
  %43 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 19)
          to label %44 unwind label %.loopexit.split-lp.loopexit

44:                                               ; preds = %.preheader.19
  %.not.19 = icmp eq i8 %43, 0
  br i1 %.not.19, label %.preheader.20, label %69

.preheader.20:                                    ; preds = %44
  %45 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 20)
          to label %46 unwind label %.loopexit.split-lp.loopexit

46:                                               ; preds = %.preheader.20
  %.not.20 = icmp eq i8 %45, 0
  br i1 %.not.20, label %.preheader.21, label %69

.preheader.21:                                    ; preds = %46
  %47 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 21)
          to label %48 unwind label %.loopexit.split-lp.loopexit

48:                                               ; preds = %.preheader.21
  %.not.21 = icmp eq i8 %47, 0
  br i1 %.not.21, label %.preheader.22, label %69

.preheader.22:                                    ; preds = %48
  %49 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 22)
          to label %50 unwind label %.loopexit.split-lp.loopexit

50:                                               ; preds = %.preheader.22
  %.not.22 = icmp eq i8 %49, 0
  br i1 %.not.22, label %.preheader.23, label %69

.preheader.23:                                    ; preds = %50
  %51 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 23)
          to label %52 unwind label %.loopexit.split-lp.loopexit

52:                                               ; preds = %.preheader.23
  %.not.23 = icmp eq i8 %51, 0
  br i1 %.not.23, label %.preheader.24, label %69

.preheader.24:                                    ; preds = %52
  %53 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 24)
          to label %54 unwind label %.loopexit.split-lp.loopexit

54:                                               ; preds = %.preheader.24
  %.not.24 = icmp eq i8 %53, 0
  br i1 %.not.24, label %.preheader.25, label %69

.preheader.25:                                    ; preds = %54
  %55 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 25)
          to label %56 unwind label %.loopexit.split-lp.loopexit

56:                                               ; preds = %.preheader.25
  %.not.25 = icmp eq i8 %55, 0
  br i1 %.not.25, label %.preheader.26, label %69

.preheader.26:                                    ; preds = %56
  %57 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 26)
          to label %58 unwind label %.loopexit.split-lp.loopexit

58:                                               ; preds = %.preheader.26
  %.not.26 = icmp eq i8 %57, 0
  br i1 %.not.26, label %.preheader.27, label %69

.preheader.27:                                    ; preds = %58
  %59 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 27)
          to label %60 unwind label %.loopexit.split-lp.loopexit

60:                                               ; preds = %.preheader.27
  %.not.27 = icmp eq i8 %59, 0
  br i1 %.not.27, label %.preheader.28, label %69

.preheader.28:                                    ; preds = %60
  %61 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 28)
          to label %62 unwind label %.loopexit.split-lp.loopexit

62:                                               ; preds = %.preheader.28
  %.not.28 = icmp eq i8 %61, 0
  br i1 %.not.28, label %.preheader.29, label %69

.preheader.29:                                    ; preds = %62
  %63 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 29)
          to label %64 unwind label %.loopexit.split-lp.loopexit

64:                                               ; preds = %.preheader.29
  %.not.29 = icmp eq i8 %63, 0
  br i1 %.not.29, label %.preheader.30, label %69

.preheader.30:                                    ; preds = %64
  %65 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 30)
          to label %66 unwind label %.loopexit.split-lp.loopexit

66:                                               ; preds = %.preheader.30
  %.not.30 = icmp eq i8 %65, 0
  br i1 %.not.30, label %.preheader.31, label %69

.preheader.31:                                    ; preds = %66
  %67 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 31)
          to label %68 unwind label %.loopexit.split-lp.loopexit

68:                                               ; preds = %.preheader.31
  %.not.31 = icmp eq i8 %67, 0
  %spec.select = select i1 %.not.31, i32 32, i32 31
  br label %69

69:                                               ; preds = %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6
  %70 = phi i1 [ true, %6 ], [ true, %8 ], [ true, %10 ], [ true, %12 ], [ true, %14 ], [ true, %16 ], [ true, %18 ], [ true, %20 ], [ true, %22 ], [ true, %24 ], [ true, %26 ], [ true, %28 ], [ true, %30 ], [ true, %32 ], [ true, %34 ], [ true, %36 ], [ true, %38 ], [ true, %40 ], [ true, %42 ], [ true, %44 ], [ true, %46 ], [ true, %48 ], [ true, %50 ], [ true, %52 ], [ true, %54 ], [ true, %56 ], [ true, %58 ], [ true, %60 ], [ true, %62 ], [ true, %64 ], [ true, %66 ], [ false, %68 ]
  %.020.lcssa = phi i32 [ 0, %6 ], [ 1, %8 ], [ 2, %10 ], [ 3, %12 ], [ 4, %14 ], [ 5, %16 ], [ 6, %18 ], [ 7, %20 ], [ 8, %22 ], [ 9, %24 ], [ 10, %26 ], [ 11, %28 ], [ 12, %30 ], [ 13, %32 ], [ 14, %34 ], [ 15, %36 ], [ 16, %38 ], [ 17, %40 ], [ 18, %42 ], [ 19, %44 ], [ 20, %46 ], [ 21, %48 ], [ 22, %50 ], [ 23, %52 ], [ 24, %54 ], [ 25, %56 ], [ 26, %58 ], [ 27, %60 ], [ 28, %62 ], [ 29, %64 ], [ 30, %66 ], [ %spec.select, %68 ]
  %.1 = phi i8 [ %5, %6 ], [ %7, %8 ], [ %9, %10 ], [ %11, %12 ], [ %13, %14 ], [ %15, %16 ], [ %17, %18 ], [ %19, %20 ], [ %21, %22 ], [ %23, %24 ], [ %25, %26 ], [ %27, %28 ], [ %29, %30 ], [ %31, %32 ], [ %33, %34 ], [ %35, %36 ], [ %37, %38 ], [ %39, %40 ], [ %41, %42 ], [ %43, %44 ], [ %45, %46 ], [ %47, %48 ], [ %49, %50 ], [ %51, %52 ], [ %53, %54 ], [ %55, %56 ], [ %57, %58 ], [ %59, %60 ], [ %61, %62 ], [ %63, %64 ], [ %65, %66 ], [ %67, %68 ]
  %71 = getelementptr inbounds i8, ptr %1, i64 200
  %72 = shl nuw nsw i32 %.020.lcssa, 8
  %73 = zext i8 %.1 to i32
  %74 = add nsw i32 %72, -1
  %75 = add nsw i32 %74, %73
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [8192 x %class.Point], ptr %71, i64 0, i64 %76
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %77, i64 120, i1 false), !tbaa.struct !5
  br i1 %70, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %69, %90
  %.12133.in = phi i32 [ %.12133, %90 ], [ %.020.lcssa, %69 ]
  %.12133 = add nuw nsw i32 %.12133.in, 1
  %78 = invoke noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %.12133)
          to label %79 unwind label %.loopexit

79:                                               ; preds = %.lr.ph
  %.not25 = icmp eq i8 %78, 0
  br i1 %.not25, label %90, label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #5
  %81 = shl nuw nsw i32 %.12133, 8
  %82 = zext i8 %78 to i32
  %83 = add nsw i32 %81, -1
  %84 = add i32 %83, %82
  %85 = zext nneg i32 %84 to i64
  %86 = getelementptr inbounds [8192 x %class.Point], ptr %71, i64 0, i64 %85
  invoke void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %4, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %86)
          to label %87 unwind label %88

87:                                               ; preds = %80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %4, i64 120, i1 false), !tbaa.struct !5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #5
  br label %90

88:                                               ; preds = %80
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #5
  br label %.loopexit.split-lp

90:                                               ; preds = %79, %87
  %exitcond.not = icmp eq i32 %.12133, 31
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %90, %69
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %91 unwind label %.loopexit.split-lp.loopexit.split-lp

91:                                               ; preds = %._crit_edge
  ret void

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %88
  %.pn = phi { ptr, i32 } [ %89, %88 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit27, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp28, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

declare noundef zeroext i8 @_ZN3Int7GetByteEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind noalias writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #4 align 2

declare void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

attributes #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 = { nounwind "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 #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 = !{i64 0, i64 40, !6, i64 40, i64 40, !6, i64 80, i64 40, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass