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

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

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

declare void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #0

; 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K13AddER5PointS1_(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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K16DoubleER5Point(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)) #4 align 2

declare noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(40)) #0

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

19:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 120, ptr %13) #5
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %20 unwind label %44

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = invoke noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %21)
          to label %23 unwind label %48

23:                                               ; preds = %20
  store i32 %22, ptr %14, align 4, !tbaa !9
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %24 unwind label %48

24:                                               ; preds = %23
  %25 = getelementptr inbounds %class.Point, ptr %0, i32 0, i32 2
  invoke void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40) %25, i32 noundef 1)
          to label %26 unwind label %48

26:                                               ; preds = %24
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = invoke noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(40) %27)
          to label %29 unwind label %48

29:                                               ; preds = %26
  br i1 %28, label %81, label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(120) %31)
          to label %32 unwind label %48

32:                                               ; preds = %30
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40) %33, i32 noundef 0)
          to label %35 unwind label %48

35:                                               ; preds = %32
  %36 = icmp eq i32 %34, 1
  br i1 %36, label %37, label %52

37:                                               ; preds = %35
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %38)
          to label %39 unwind label %48

39:                                               ; preds = %37
  br label %52

40:                                               ; preds = %4
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %11, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %12, align 4
  br label %86

44:                                               ; preds = %19
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  br label %85

48:                                               ; preds = %81, %60, %59, %58, %37, %32, %30, %26, %24, %23, %20
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %11, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %12, align 4
  br label %84

52:                                               ; preds = %39, %35
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %77, %52
  %54 = load i32, ptr %15, align 4, !tbaa !9
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %80

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 120, ptr %16) #5
  invoke void @_ZN9Secp256K16DoubleER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %16, ptr noundef nonnull align 8 dereferenceable(983240) %18, ptr noundef nonnull align 8 dereferenceable(120) %10)
          to label %58 unwind label %68

58:                                               ; preds = %57
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %16, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %16) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %16) #5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %59 unwind label %48

59:                                               ; preds = %58
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %60 unwind label %48

60:                                               ; preds = %59
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40) %61, i32 noundef %62)
          to label %64 unwind label %48

64:                                               ; preds = %60
  %65 = icmp ne i32 %63, 0
  br i1 %65, label %66, label %76

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 120, ptr %17) #5
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %17, ptr noundef nonnull align 8 dereferenceable(983240) %18, ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef nonnull align 8 dereferenceable(120) %10)
          to label %67 unwind label %72

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

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

72:                                               ; preds = %66
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %17) #5
  br label %84

76:                                               ; preds = %67, %64
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %15, align 4, !tbaa !9
  br label %53, !llvm.loop !13

80:                                               ; preds = %53
  br label %81

81:                                               ; preds = %80, %29
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %82 unwind label %48

82:                                               ; preds = %81
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %10) #5
  %83 = load i1, ptr %9, align 1
  br i1 %83, label %88, label %87

84:                                               ; preds = %72, %68, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #5
  br label %85

85:                                               ; preds = %84, %44
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #5
  br label %86

86:                                               ; preds = %85, %40
  call void @llvm.lifetime.end.p0(i64 120, ptr %10) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  br label %89

87:                                               ; preds = %82
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  br label %88

88:                                               ; preds = %87, %82
  ret void

89:                                               ; preds = %86
  %90 = load ptr, ptr %11, align 8
  %91 = load i32, ptr %12, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

declare noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) #0

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

declare noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #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 = !{i64 0, i64 40, !12, i64 40, i64 40, !12, i64 80, i64 40, !12}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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

declare void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #0

; 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K13AddER5PointS1_(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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K16DoubleER5Point(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)) local_unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K120ScalarMultiplicationER5PointP3Int(ptr dead_on_unwind noalias nonnull writable sret(%class.Point) align 8 %0, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef nonnull align 8 dereferenceable(120) %2, ptr noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.Point, align 8
  %6 = alloca %class.Point, align 8
  %7 = alloca %class.Point, align 8
  %8 = alloca %class.Point, align 8
  tail call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %5) #5
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %5)
          to label %9 unwind label %24

9:                                                ; preds = %4
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #5
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %10 unwind label %26

10:                                               ; preds = %9
  %11 = invoke noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %12 unwind label %.loopexit.split-lp

12:                                               ; preds = %10
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %13 unwind label %.loopexit.split-lp

13:                                               ; preds = %12
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  invoke void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40) %14, i32 noundef 1)
          to label %15 unwind label %.loopexit.split-lp

15:                                               ; preds = %13
  %16 = invoke noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %17 unwind label %.loopexit.split-lp

17:                                               ; preds = %15
  br i1 %16, label %.loopexit, label %18

18:                                               ; preds = %17
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %5, ptr noundef nonnull align 8 dereferenceable(120) %2)
          to label %19 unwind label %.loopexit.split-lp

19:                                               ; preds = %18
  %20 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40) %3, i32 noundef 0)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %19
  %22 = icmp eq i32 %20, 1
  br i1 %22, label %23, label %28

23:                                               ; preds = %21
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %2)
          to label %28 unwind label %.loopexit.split-lp

24:                                               ; preds = %4
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %46

26:                                               ; preds = %9
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %45

.loopexit20:                                      ; preds = %30, %31, %32
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %44

.loopexit.split-lp:                               ; preds = %10, %12, %13, %15, %18, %19, %23, %.loopexit
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %44

28:                                               ; preds = %23, %21
  %29 = icmp sgt i32 %11, 1
  br i1 %29, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %28, %41
  %.021 = phi i32 [ %42, %41 ], [ 1, %28 ]
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #5
  invoke void @_ZN9Secp256K16DoubleER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %7, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef nonnull align 8 dereferenceable(120) %5)
          to label %30 unwind label %37

30:                                               ; preds = %.lr.ph
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %7, i64 120, i1 false), !tbaa.struct !5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %5, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %31 unwind label %.loopexit20

31:                                               ; preds = %30
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %32 unwind label %.loopexit20

32:                                               ; preds = %31
  %33 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40) %3, i32 noundef %.021)
          to label %34 unwind label %.loopexit20

34:                                               ; preds = %32
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %41, label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %8) #5
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(983240) %1, ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %5)
          to label %36 unwind label %39

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

37:                                               ; preds = %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #5
  br label %44

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %8) #5
  br label %44

41:                                               ; preds = %34, %36
  %42 = add nuw nsw i32 %.021, 1
  %exitcond.not = icmp eq i32 %42, %11
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !9

.loopexit:                                        ; preds = %41, %28, %17
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %.loopexit
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %5) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #5
  ret void

44:                                               ; preds = %.loopexit20, %.loopexit.split-lp, %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ], [ %lpad.loopexit, %.loopexit20 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #5
  br label %45

45:                                               ; preds = %44, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %5) #5
  br label %46

46:                                               ; preds = %45, %24
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %45 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #5
  resume { ptr, i32 } %.pn.pn.pn
}

declare noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

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

declare noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) 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: GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass