; LLVM IR from albertobsd/keyhunt :: keyhunt_legacy.ll (Z14init_generatorv)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { [1 x %struct.__mpz_struct] }
%struct.__mpz_struct = type { i32, i32, ptr }

@Gn = external dso_local global %"class.std::vector", align 8
@_2Gn = external dso_local global %class.Point, align 8
@stride = external dso_local global %class.Int, align 8
@secp = external dso_local global ptr, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14init_generatorv() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.Point, align 8
  %2 = alloca %class.Point, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %class.Point, align 8
  %6 = alloca i32, align 4
  %7 = alloca %class.Point, align 8
  %8 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %1) #5
  %9 = load ptr, ptr @secp, align 8, !tbaa !5
  call void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8 %1, ptr noundef nonnull align 8 dereferenceable(393296) %9, ptr noundef @stride)
  call void @llvm.lifetime.start.p0(i64 48, ptr %2) #5
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %10 unwind label %27

10:                                               ; preds = %0
  invoke void @_ZNSt6vectorI5PointSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 512, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %11 unwind label %31

11:                                               ; preds = %10
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %12 unwind label %31

12:                                               ; preds = %11
  %13 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 0) #5
  %14 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %15 unwind label %31

15:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #5
  %16 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(393296) %16, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %17 unwind label %35

17:                                               ; preds = %15
  %18 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %19 unwind label %39

19:                                               ; preds = %17
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #5
  %20 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 1) #5
  %21 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %22 unwind label %31

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 2, ptr %6, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %54, %22
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp slt i32 %24, 512
  br i1 %25, label %44, label %26

26:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %71

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %3, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %4, align 4
  br label %87

31:                                               ; preds = %19, %12, %11, %10
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %3, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %4, align 4
  br label %86

35:                                               ; preds = %15
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %3, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %4, align 4
  br label %43

39:                                               ; preds = %17
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %3, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %4, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  br label %43

43:                                               ; preds = %39, %35
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #5
  br label %86

44:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #5
  %45 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %7, ptr noundef nonnull align 8 dereferenceable(393296) %45, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %46 unwind label %57

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %48 unwind label %61

48:                                               ; preds = %46
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef %50) #5
  %52 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %51, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %53 unwind label %66

53:                                               ; preds = %48
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %6, align 4, !tbaa !9
  br label %23, !llvm.loop !11

57:                                               ; preds = %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %3, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %4, align 4
  br label %65

61:                                               ; preds = %46
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %3, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %4, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  br label %65

65:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  br label %70

66:                                               ; preds = %48
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %3, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %4, align 4
  br label %70

70:                                               ; preds = %66, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %86

71:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #5
  %72 = load ptr, ptr @secp, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 511) #5
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(393296) %72, ptr noundef nonnull align 8 dereferenceable(48) %73)
          to label %74 unwind label %77

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) @_2Gn, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %76 unwind label %81

76:                                               ; preds = %74
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #5
  ret void

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %3, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %4, align 4
  br label %85

81:                                               ; preds = %74
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %3, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %4, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  br label %86

86:                                               ; preds = %85, %70, %43, %31
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  br label %87

87:                                               ; preds = %86, %27
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #5
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %3, align 8
  %90 = load i32, ptr %4, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5PointSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

declare void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(393296), ptr noundef) #0

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 @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(393296), ptr noundef nonnull align 8 dereferenceable(48)) #0

declare void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind 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)) #0

declare void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { [1 x %struct.__mpz_struct] }
%struct.__mpz_struct = type { i32, i32, ptr }

@Gn = external dso_local global %"class.std::vector", align 8
@_2Gn = external dso_local global %class.Point, align 8
@stride = external dso_local global %class.Int, align 8
@secp = external dso_local local_unnamed_addr global ptr, align 8

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

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

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
define dso_local void @_Z14init_generatorv() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.Point, align 8
  %2 = alloca %class.Point, align 8
  %3 = alloca %class.Point, align 8
  %4 = alloca %class.Point, align 8
  %5 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #5
  %6 = load ptr, ptr @secp, align 8, !tbaa !5
  call void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %1, ptr noundef nonnull align 8 dereferenceable(393296) %6, ptr noundef nonnull @stride)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #5
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %7 unwind label %22

7:                                                ; preds = %0
  invoke void @_ZNSt6vectorI5PointSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 512, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %8 unwind label %24

8:                                                ; preds = %7
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %9 unwind label %24

9:                                                ; preds = %8
  %10 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 0) #5
  %11 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %12 unwind label %24

12:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  %13 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %3, ptr noundef nonnull align 8 dereferenceable(393296) %13, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %14 unwind label %26

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %16 unwind label %28

16:                                               ; preds = %14
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  %17 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 1) #5
  %18 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %.preheader unwind label %24

19:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #5
  %20 = load ptr, ptr @secp, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef 511) #5
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(393296) %20, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %45 unwind label %48

22:                                               ; preds = %0
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %54

24:                                               ; preds = %16, %9, %8, %7
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %53

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

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  br label %30

30:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br label %53

.preheader:                                       ; preds = %16, %37
  %indvars.iv = phi i64 [ %indvars.iv.next, %37 ], [ 2, %16 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  %31 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %4, ptr noundef nonnull align 8 dereferenceable(393296) %31, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %32 unwind label %38

32:                                               ; preds = %.preheader
  %33 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %34 unwind label %40

34:                                               ; preds = %32
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  %35 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Gn, i64 noundef %indvars.iv) #5
  %36 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %37 unwind label %43

37:                                               ; preds = %34
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 512
  br i1 %exitcond.not, label %19, label %.preheader, !llvm.loop !9

38:                                               ; preds = %.preheader
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn14 = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  br label %53

43:                                               ; preds = %34
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %53

45:                                               ; preds = %19
  %46 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) @_2Gn, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %47 unwind label %50

47:                                               ; preds = %45
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  ret void

48:                                               ; preds = %19
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

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

52:                                               ; preds = %50, %48
  %.pn12 = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  br label %53

53:                                               ; preds = %42, %43, %52, %30, %24
  %.pn16.pn = phi { ptr, i32 } [ %.pn12, %52 ], [ %25, %24 ], [ %.pn, %30 ], [ %44, %43 ], [ %.pn14, %42 ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  br label %54

54:                                               ; preds = %53, %22
  %.pn16.pn.pn = phi { ptr, i32 } [ %.pn16.pn, %53 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn16.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5PointSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

declare void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(393296), ptr noundef) local_unnamed_addr #0

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 @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(393296), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0

declare void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind 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 #0

declare void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass