; LLVM IR from albertobsd/keyhunt :: gmp256k1/GMP256K1.ll (ZN9Secp256K14InitEv)

; 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 }
%class.Secp256K1 = type { %class.Point, %class.Int, %class.Int, [8192 x %class.Point] }

@.str = external hidden unnamed_addr constant [65 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K14InitEv(ptr noundef nonnull align 8 dereferenceable(393296) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.Point, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.Point, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.Point, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 1
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef @.str)
  %13 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 1
  call void @_ZN3Int10SetupFieldEPS_(ptr noundef %13)
  %14 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 0
  %15 = getelementptr inbounds %class.Point, ptr %14, i32 0, i32 0
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @.str.1)
  %16 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 0
  %17 = getelementptr inbounds %class.Point, ptr %16, i32 0, i32 1
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef @.str.2)
  %18 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 0
  %19 = getelementptr inbounds %class.Point, ptr %18, i32 0, i32 2
  call void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef 1)
  %20 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 2
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef @.str.3)
  %21 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 2
  call void @_ZN3Int6InitK1EPS_(ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #4
  %22 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 0
  call void @_ZN5PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %99, %1
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = icmp slt i32 %24, 32
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %103

27:                                               ; preds = %23
  %28 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 3
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = mul nsw i32 %29, 256
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [8192 x %class.Point], ptr %28, i64 0, i64 %31
  %33 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %34 unwind label %42

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #4
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(393296) %11, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %35 unwind label %46

35:                                               ; preds = %34
  %36 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %37 unwind label %50

37:                                               ; preds = %35
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %73, %37
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 255
  br i1 %40, label %55, label %41

41:                                               ; preds = %38
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %90

42:                                               ; preds = %90, %27
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  br label %102

46:                                               ; preds = %34
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %6, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %7, align 4
  br label %54

50:                                               ; preds = %35
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  br label %54

54:                                               ; preds = %50, %46
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  br label %102

55:                                               ; preds = %38
  %56 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 3
  %57 = load i32, ptr %4, align 4, !tbaa !9
  %58 = mul nsw i32 %57, 256
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = add nsw i32 %58, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [8192 x %class.Point], ptr %56, i64 0, i64 %61
  %63 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %62, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %64 unwind label %76

64:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #4
  %65 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 3
  %66 = load i32, ptr %4, align 4, !tbaa !9
  %67 = mul nsw i32 %66, 256
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [8192 x %class.Point], ptr %65, i64 0, i64 %68
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(393296) %11, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %69)
          to label %70 unwind label %80

70:                                               ; preds = %64
  %71 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %72 unwind label %84

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

73:                                               ; preds = %72
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %9, align 4, !tbaa !9
  br label %38, !llvm.loop !11

76:                                               ; preds = %55
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %6, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %7, align 4
  br label %89

80:                                               ; preds = %64
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %6, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %7, align 4
  br label %88

84:                                               ; preds = %70
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %6, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %7, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #4
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %102

90:                                               ; preds = %41
  %91 = getelementptr inbounds %class.Secp256K1, ptr %11, i32 0, i32 3
  %92 = load i32, ptr %4, align 4, !tbaa !9
  %93 = mul nsw i32 %92, 256
  %94 = add nsw i32 %93, 255
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [8192 x %class.Point], ptr %91, i64 0, i64 %95
  %97 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %98 unwind label %42

98:                                               ; preds = %90
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %4, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %4, align 4, !tbaa !9
  br label %23, !llvm.loop !13

102:                                              ; preds = %89, %54, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #4
  br label %104

103:                                              ; preds = %26
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #4
  ret void

104:                                              ; preds = %102
  %105 = load ptr, ptr %6, align 8
  %106 = load i32, ptr %7, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

declare void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2

declare void @_ZN3Int10SetupFieldEPS_(ptr noundef) #2

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

declare void @_ZN3Int6InitK1EPS_(ptr noundef) #2

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

declare void @_ZN5PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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

@.str = external hidden unnamed_addr constant [65 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K14InitEv(ptr noundef nonnull align 8 dereferenceable(393296) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.Point, align 8
  %3 = alloca %class.Point, align 8
  %4 = alloca %class.Point, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str)
  tail call void @_ZN3Int10SetupFieldEPS_(ptr noundef nonnull %5)
  tail call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull @.str.1)
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str.2)
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(16) %7, i32 noundef 1)
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.3)
  tail call void @_ZN3Int6InitK1EPS_(ptr noundef nonnull %8)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  call void @_ZN5PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %0)
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  br label %11

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

11:                                               ; preds = %1, %45
  %indvars.iv25 = phi i64 [ 0, %1 ], [ %indvars.iv.next26, %45 ]
  %12 = shl nuw nsw i64 %indvars.iv25, 8
  %13 = getelementptr inbounds [8192 x %class.Point], ptr %9, i64 0, i64 %12
  %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 %23

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #4
  invoke void @_ZN9Secp256K112DoubleDirectER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %3, ptr noundef nonnull align 8 dereferenceable(393296) %0, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %16 unwind label %25

16:                                               ; preds = %15
  %17 = 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 %18 unwind label %27

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

19:                                               ; preds = %37
  %20 = or disjoint i64 %12, 255
  %21 = getelementptr inbounds [8192 x %class.Point], ptr %9, i64 0, i64 %20
  %22 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %45 unwind label %23

23:                                               ; preds = %19, %11
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %46

25:                                               ; preds = %15
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

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

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

30:                                               ; preds = %18, %37
  %indvars.iv = phi i64 [ 1, %18 ], [ %indvars.iv.next, %37 ]
  %31 = or disjoint i64 %indvars.iv, %12
  %32 = getelementptr inbounds [8192 x %class.Point], ptr %9, i64 0, i64 %31
  %33 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %34 unwind label %38

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #4
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %4, ptr noundef nonnull align 8 dereferenceable(393296) %0, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %35 unwind label %40

35:                                               ; preds = %34
  %36 = 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 %37 unwind label %42

37:                                               ; preds = %35
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 255
  br i1 %exitcond.not, label %19, label %30, !llvm.loop !5

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %46

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

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

44:                                               ; preds = %42, %40
  %.pn18 = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  br label %46

45:                                               ; preds = %19
  %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1
  %exitcond28.not = icmp eq i64 %indvars.iv.next26, 32
  br i1 %exitcond28.not, label %10, label %11, !llvm.loop !7

46:                                               ; preds = %38, %44, %29, %23
  %.pn18.pn.pn = phi { ptr, i32 } [ %24, %23 ], [ %.pn, %29 ], [ %.pn18, %44 ], [ %39, %38 ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn18.pn.pn
}

declare void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2

declare void @_ZN3Int10SetupFieldEPS_(ptr noundef) local_unnamed_addr #2

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

declare void @_ZN3Int6InitK1EPS_(ptr noundef) local_unnamed_addr #2

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

declare void @_ZN5PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #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 #2

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass