; LLVM IR from albertobsd/keyhunt :: gmp256k1/GMP256K1.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 { [1 x %struct.__mpz_struct] }
%struct.__mpz_struct = type { i32, i32, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #0

; 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(48)) #0

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

declare noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(16)) #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(393296), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #3 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(393296), ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; 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(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef %3) #3 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 %class.Point, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %class.Point, align 8
  %18 = alloca %class.Point, align 8
  %19 = 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
  %20 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %21 unwind label %43

21:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %22 unwind label %47

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %23 unwind label %51

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = invoke noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %26 unwind label %55

26:                                               ; preds = %23
  store i32 %25, ptr %15, align 4, !tbaa !9
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %27 unwind label %55

27:                                               ; preds = %26
  %28 = getelementptr inbounds %class.Point, ptr %0, i32 0, i32 2
  invoke void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(16) %28, i32 noundef 1)
          to label %29 unwind label %55

29:                                               ; preds = %27
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = invoke noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %32 unwind label %55

32:                                               ; preds = %29
  br i1 %31, label %115, label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(48) %34)
          to label %35 unwind label %55

35:                                               ; preds = %33
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16) %36, i32 noundef 0)
          to label %38 unwind label %55

38:                                               ; preds = %35
  %39 = icmp eq i32 %37, 1
  br i1 %39, label %40, label %59

40:                                               ; preds = %38
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %41)
          to label %42 unwind label %55

42:                                               ; preds = %40
  br label %59

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

47:                                               ; preds = %21
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %11, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %12, align 4
  br label %120

51:                                               ; preds = %22
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  br label %119

55:                                               ; preds = %115, %69, %68, %67, %40, %35, %33, %29, %27, %26, %23
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  br label %118

59:                                               ; preds = %42, %38
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %111, %59
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %114

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #4
  invoke void @_ZN9Secp256K16DoubleER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %17, ptr noundef nonnull align 8 dereferenceable(393296) %20, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %65 unwind label %79

65:                                               ; preds = %64
  %66 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %17)
          to label %67 unwind label %83

67:                                               ; preds = %65
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #4
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %68 unwind label %55

68:                                               ; preds = %67
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %69 unwind label %55

69:                                               ; preds = %68
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16) %70, i32 noundef %71)
          to label %73 unwind label %55

73:                                               ; preds = %69
  %74 = icmp ne i32 %72, 0
  br i1 %74, label %75, label %97

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #4
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %18, ptr noundef nonnull align 8 dereferenceable(393296) %20, ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %76 unwind label %88

76:                                               ; preds = %75
  %77 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %18)
          to label %78 unwind label %92

78:                                               ; preds = %76
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #4
  br label %110

79:                                               ; preds = %64
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %11, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %12, align 4
  br label %87

83:                                               ; preds = %65
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #4
  br label %87

87:                                               ; preds = %83, %79
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #4
  br label %118

88:                                               ; preds = %75
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  br label %96

92:                                               ; preds = %76
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  br label %96

96:                                               ; preds = %92, %88
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #4
  br label %118

97:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #4
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %19, ptr noundef nonnull align 8 dereferenceable(393296) %20, ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %98 unwind label %101

98:                                               ; preds = %97
  %99 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %100 unwind label %105

100:                                              ; preds = %98
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #4
  br label %110

101:                                              ; preds = %97
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  br label %109

105:                                              ; preds = %98
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #4
  br label %109

109:                                              ; preds = %105, %101
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #4
  br label %118

110:                                              ; preds = %100, %78
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %16, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %16, align 4, !tbaa !9
  br label %60, !llvm.loop !11

114:                                              ; preds = %60
  br label %115

115:                                              ; preds = %114, %32
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %116 unwind label %55

116:                                              ; preds = %115
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #4
  %117 = load i1, ptr %9, align 1
  br i1 %117, label %123, label %122

118:                                              ; preds = %109, %96, %87, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  br label %119

119:                                              ; preds = %118, %51
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  br label %120

120:                                              ; preds = %119, %47
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  br label %121

121:                                              ; preds = %120, %43
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  br label %124

122:                                              ; preds = %116
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  br label %123

123:                                              ; preds = %122, %116
  ret void

124:                                              ; preds = %121
  %125 = load ptr, ptr %11, align 8
  %126 = load i32, ptr %12, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

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

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

declare noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16), 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 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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 { [1 x %struct.__mpz_struct] }
%struct.__mpz_struct = type { i32, i32, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(16), 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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0

; 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(48)) local_unnamed_addr #0

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

declare noundef zeroext i1 @_ZN3Int6IsZeroEv(ptr noundef nonnull align 8 dereferenceable(16)) 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(393296), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 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(393296), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; 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(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef %3) local_unnamed_addr #3 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
  %9 = alloca %class.Point, align 8
  %10 = alloca %class.Point, align 8
  tail call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %11 unwind label %27

11:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %12 unwind label %29

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #4
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %13 unwind label %31

13:                                               ; preds = %12
  %14 = invoke noundef i32 @_ZN3Int12GetBitLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %15 unwind label %.loopexit.split-lp

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

16:                                               ; preds = %15
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef 1)
          to label %18 unwind label %.loopexit.split-lp

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

20:                                               ; preds = %18
  br i1 %19, label %.loopexit, label %21

21:                                               ; preds = %20
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %22 unwind label %.loopexit.split-lp

22:                                               ; preds = %21
  %23 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef 0)
          to label %24 unwind label %.loopexit.split-lp

24:                                               ; preds = %22
  %25 = icmp eq i32 %23, 1
  br i1 %25, label %26, label %33

26:                                               ; preds = %24
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %33 unwind label %.loopexit.split-lp

27:                                               ; preds = %4
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %71

29:                                               ; preds = %11
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %70

31:                                               ; preds = %12
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %69

.loopexit31:                                      ; preds = %37, %38, %39
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %68

.loopexit.split-lp:                               ; preds = %13, %15, %16, %18, %21, %22, %26, %.loopexit
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %68

33:                                               ; preds = %26, %24
  %34 = icmp sgt i32 %14, 1
  br i1 %34, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %33, %65
  %.032 = phi i32 [ %66, %65 ], [ 1, %33 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #4
  invoke void @_ZN9Secp256K16DoubleER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %35 unwind label %46

35:                                               ; preds = %.lr.ph
  %36 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %37 unwind label %48

37:                                               ; preds = %35
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %38 unwind label %.loopexit31

38:                                               ; preds = %37
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %39 unwind label %.loopexit31

39:                                               ; preds = %38
  %40 = invoke noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.032)
          to label %41 unwind label %.loopexit31

41:                                               ; preds = %39
  %.not = icmp eq i32 %40, 0
  br i1 %.not, label %56, label %42

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #4
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %9, ptr noundef nonnull align 8 dereferenceable(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %43 unwind label %51

43:                                               ; preds = %42
  %44 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %45 unwind label %53

45:                                               ; preds = %43
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #4
  br label %65

46:                                               ; preds = %.lr.ph
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %35
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  br label %68

51:                                               ; preds = %42
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %43
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  br label %55

55:                                               ; preds = %53, %51
  %.pn24 = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #4
  br label %68

56:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #4
  invoke void @_ZN9Secp256K13AddER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %57 unwind label %60

57:                                               ; preds = %56
  %58 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %59 unwind label %62

59:                                               ; preds = %57
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #4
  br label %65

60:                                               ; preds = %56
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %57
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  br label %64

64:                                               ; preds = %62, %60
  %.pn22 = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #4
  br label %68

65:                                               ; preds = %45, %59
  %66 = add nuw nsw i32 %.032, 1
  %exitcond.not = icmp eq i32 %66, %14
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !5

.loopexit:                                        ; preds = %65, %33, %20
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %67 unwind label %.loopexit.split-lp

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

68:                                               ; preds = %.loopexit31, %.loopexit.split-lp, %64, %55, %50
  %.pn26 = phi { ptr, i32 } [ %.pn24, %55 ], [ %.pn22, %64 ], [ %.pn, %50 ], [ %lpad.loopexit, %.loopexit31 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #4
  br label %69

69:                                               ; preds = %68, %31
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %68 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #4
  br label %70

70:                                               ; preds = %69, %29
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %69 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  br label %71

71:                                               ; preds = %70, %27
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %70 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  resume { ptr, i32 } %.pn26.pn.pn.pn
}

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

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

declare noundef i32 @_ZN3Int6GetBitEj(ptr noundef nonnull align 8 dereferenceable(16), 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 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass