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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; 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

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

16:                                               ; preds = %3
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef %18)
          to label %19 unwind label %31

19:                                               ; preds = %16
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %36, %19
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 32
  br i1 %22, label %23, label %39

23:                                               ; preds = %20
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !11
  store i8 %27, ptr %9, align 1, !tbaa !11
  %28 = load i8, ptr %9, align 1, !tbaa !11
  %29 = icmp ne i8 %28, 0
  br i1 %29, label %30, label %35

30:                                               ; preds = %23
  br label %39

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

35:                                               ; preds = %23
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %8, align 4, !tbaa !9
  br label %20, !llvm.loop !12

39:                                               ; preds = %30, %20
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 32
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i1 true, ptr %10, align 1
  store i32 1, ptr %13, align 4
  br label %97

43:                                               ; preds = %39
  %44 = getelementptr inbounds %class.Secp256K1, ptr %15, i32 0, i32 3
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = sub nsw i32 31, %45
  %47 = mul nsw i32 256, %46
  %48 = load i8, ptr %9, align 1, !tbaa !11
  %49 = zext i8 %48 to i32
  %50 = sub nsw i32 %49, 1
  %51 = add nsw i32 %47, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [8192 x %class.Point], ptr %44, i64 0, i64 %52
  %54 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %53)
          to label %55 unwind label %31

55:                                               ; preds = %43
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %8, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %92, %55
  %59 = load i32, ptr %8, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 32
  br i1 %60, label %61, label %95

61:                                               ; preds = %58
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !11
  store i8 %65, ptr %9, align 1, !tbaa !11
  %66 = load i8, ptr %9, align 1, !tbaa !11
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %91

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #4
  %69 = getelementptr inbounds %class.Secp256K1, ptr %15, i32 0, i32 3
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = sub nsw i32 31, %70
  %72 = mul nsw i32 256, %71
  %73 = load i8, ptr %9, align 1, !tbaa !11
  %74 = zext i8 %73 to i32
  %75 = sub nsw i32 %74, 1
  %76 = add nsw i32 %72, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [8192 x %class.Point], ptr %69, i64 0, i64 %77
  invoke void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %14, ptr noundef nonnull align 8 dereferenceable(393296) %15, ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %78)
          to label %79 unwind label %82

79:                                               ; preds = %68
  %80 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %81 unwind label %86

81:                                               ; preds = %79
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #4
  br label %91

82:                                               ; preds = %68
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  br label %90

86:                                               ; preds = %79
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %11, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %12, align 4
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #4
  br label %101

91:                                               ; preds = %81, %61
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !9
  br label %58, !llvm.loop !14

95:                                               ; preds = %58
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %96 unwind label %31

96:                                               ; preds = %95
  store i1 true, ptr %10, align 1
  store i32 1, ptr %13, align 4
  br label %97

97:                                               ; preds = %96, %42
  %98 = load i1, ptr %10, align 1
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  br label %100

100:                                              ; preds = %99, %97
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  ret void

101:                                              ; preds = %90, %31
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %11, align 8
  %104 = load i32, ptr %12, align 4
  %105 = insertvalue { ptr, i32 } poison, ptr %103, 0
  %106 = insertvalue { ptr, i32 } %105, i32 %104, 1
  resume { ptr, i32 } %106
}

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

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

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

declare void @_ZN5Point6ReduceEv(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 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { [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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind noalias nonnull writable sret(%class.Point) align 8 %0, ptr noundef nonnull align 8 dereferenceable(393296) %1, ptr noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [32 x i8], align 16
  %5 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  tail call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  invoke void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %6 unwind label %8

6:                                                ; preds = %3
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull %4)
          to label %.preheader34.preheader unwind label %8

.preheader34.preheader:                           ; preds = %6
  %7 = load i8, ptr %4, align 16, !tbaa !5
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %.preheader34.1, label %.thread

8:                                                ; preds = %._crit_edge, %.thread, %6, %3
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %99

.preheader34.1:                                   ; preds = %.preheader34.preheader
  %10 = getelementptr inbounds i8, ptr %4, i64 1
  %11 = load i8, ptr %10, align 1, !tbaa !5
  %.not.1 = icmp eq i8 %11, 0
  br i1 %.not.1, label %.preheader34.2, label %.thread

.preheader34.2:                                   ; preds = %.preheader34.1
  %12 = getelementptr inbounds i8, ptr %4, i64 2
  %13 = load i8, ptr %12, align 2, !tbaa !5
  %.not.2 = icmp eq i8 %13, 0
  br i1 %.not.2, label %.preheader34.3, label %.thread

.preheader34.3:                                   ; preds = %.preheader34.2
  %14 = getelementptr inbounds i8, ptr %4, i64 3
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %.not.3 = icmp eq i8 %15, 0
  br i1 %.not.3, label %.preheader34.4, label %.thread

.preheader34.4:                                   ; preds = %.preheader34.3
  %16 = getelementptr inbounds i8, ptr %4, i64 4
  %17 = load i8, ptr %16, align 4, !tbaa !5
  %.not.4 = icmp eq i8 %17, 0
  br i1 %.not.4, label %.preheader34.5, label %.thread

.preheader34.5:                                   ; preds = %.preheader34.4
  %18 = getelementptr inbounds i8, ptr %4, i64 5
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %.not.5 = icmp eq i8 %19, 0
  br i1 %.not.5, label %.preheader34.6, label %.thread

.preheader34.6:                                   ; preds = %.preheader34.5
  %20 = getelementptr inbounds i8, ptr %4, i64 6
  %21 = load i8, ptr %20, align 2, !tbaa !5
  %.not.6 = icmp eq i8 %21, 0
  br i1 %.not.6, label %.preheader34.7, label %.thread

.preheader34.7:                                   ; preds = %.preheader34.6
  %22 = getelementptr inbounds i8, ptr %4, i64 7
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %.not.7 = icmp eq i8 %23, 0
  br i1 %.not.7, label %.preheader34.8, label %.thread

.preheader34.8:                                   ; preds = %.preheader34.7
  %24 = getelementptr inbounds i8, ptr %4, i64 8
  %25 = load i8, ptr %24, align 8, !tbaa !5
  %.not.8 = icmp eq i8 %25, 0
  br i1 %.not.8, label %.preheader34.9, label %.thread

.preheader34.9:                                   ; preds = %.preheader34.8
  %26 = getelementptr inbounds i8, ptr %4, i64 9
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %.not.9 = icmp eq i8 %27, 0
  br i1 %.not.9, label %.preheader34.10, label %.thread

.preheader34.10:                                  ; preds = %.preheader34.9
  %28 = getelementptr inbounds i8, ptr %4, i64 10
  %29 = load i8, ptr %28, align 2, !tbaa !5
  %.not.10 = icmp eq i8 %29, 0
  br i1 %.not.10, label %.preheader34.11, label %.thread

.preheader34.11:                                  ; preds = %.preheader34.10
  %30 = getelementptr inbounds i8, ptr %4, i64 11
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %.not.11 = icmp eq i8 %31, 0
  br i1 %.not.11, label %.preheader34.12, label %.thread

.preheader34.12:                                  ; preds = %.preheader34.11
  %32 = getelementptr inbounds i8, ptr %4, i64 12
  %33 = load i8, ptr %32, align 4, !tbaa !5
  %.not.12 = icmp eq i8 %33, 0
  br i1 %.not.12, label %.preheader34.13, label %.thread

.preheader34.13:                                  ; preds = %.preheader34.12
  %34 = getelementptr inbounds i8, ptr %4, i64 13
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %.not.13 = icmp eq i8 %35, 0
  br i1 %.not.13, label %.preheader34.14, label %.thread

.preheader34.14:                                  ; preds = %.preheader34.13
  %36 = getelementptr inbounds i8, ptr %4, i64 14
  %37 = load i8, ptr %36, align 2, !tbaa !5
  %.not.14 = icmp eq i8 %37, 0
  br i1 %.not.14, label %.preheader34.15, label %.thread

.preheader34.15:                                  ; preds = %.preheader34.14
  %38 = getelementptr inbounds i8, ptr %4, i64 15
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %.not.15 = icmp eq i8 %39, 0
  br i1 %.not.15, label %.preheader34.16, label %.thread

.preheader34.16:                                  ; preds = %.preheader34.15
  %40 = getelementptr inbounds i8, ptr %4, i64 16
  %41 = load i8, ptr %40, align 16, !tbaa !5
  %.not.16 = icmp eq i8 %41, 0
  br i1 %.not.16, label %.preheader34.17, label %.thread

.preheader34.17:                                  ; preds = %.preheader34.16
  %42 = getelementptr inbounds i8, ptr %4, i64 17
  %43 = load i8, ptr %42, align 1, !tbaa !5
  %.not.17 = icmp eq i8 %43, 0
  br i1 %.not.17, label %.preheader34.18, label %.thread

.preheader34.18:                                  ; preds = %.preheader34.17
  %44 = getelementptr inbounds i8, ptr %4, i64 18
  %45 = load i8, ptr %44, align 2, !tbaa !5
  %.not.18 = icmp eq i8 %45, 0
  br i1 %.not.18, label %.preheader34.19, label %.thread

.preheader34.19:                                  ; preds = %.preheader34.18
  %46 = getelementptr inbounds i8, ptr %4, i64 19
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %.not.19 = icmp eq i8 %47, 0
  br i1 %.not.19, label %.preheader34.20, label %.thread

.preheader34.20:                                  ; preds = %.preheader34.19
  %48 = getelementptr inbounds i8, ptr %4, i64 20
  %49 = load i8, ptr %48, align 4, !tbaa !5
  %.not.20 = icmp eq i8 %49, 0
  br i1 %.not.20, label %.preheader34.21, label %.thread

.preheader34.21:                                  ; preds = %.preheader34.20
  %50 = getelementptr inbounds i8, ptr %4, i64 21
  %51 = load i8, ptr %50, align 1, !tbaa !5
  %.not.21 = icmp eq i8 %51, 0
  br i1 %.not.21, label %.preheader34.22, label %.thread

.preheader34.22:                                  ; preds = %.preheader34.21
  %52 = getelementptr inbounds i8, ptr %4, i64 22
  %53 = load i8, ptr %52, align 2, !tbaa !5
  %.not.22 = icmp eq i8 %53, 0
  br i1 %.not.22, label %.preheader34.23, label %.thread

.preheader34.23:                                  ; preds = %.preheader34.22
  %54 = getelementptr inbounds i8, ptr %4, i64 23
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %.not.23 = icmp eq i8 %55, 0
  br i1 %.not.23, label %.preheader34.24, label %.thread

.preheader34.24:                                  ; preds = %.preheader34.23
  %56 = getelementptr inbounds i8, ptr %4, i64 24
  %57 = load i8, ptr %56, align 8, !tbaa !5
  %.not.24 = icmp eq i8 %57, 0
  br i1 %.not.24, label %.preheader34.25, label %.thread

.preheader34.25:                                  ; preds = %.preheader34.24
  %58 = getelementptr inbounds i8, ptr %4, i64 25
  %59 = load i8, ptr %58, align 1, !tbaa !5
  %.not.25 = icmp eq i8 %59, 0
  br i1 %.not.25, label %.preheader34.26, label %.thread

.preheader34.26:                                  ; preds = %.preheader34.25
  %60 = getelementptr inbounds i8, ptr %4, i64 26
  %61 = load i8, ptr %60, align 2, !tbaa !5
  %.not.26 = icmp eq i8 %61, 0
  br i1 %.not.26, label %.preheader34.27, label %.thread

.preheader34.27:                                  ; preds = %.preheader34.26
  %62 = getelementptr inbounds i8, ptr %4, i64 27
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %.not.27 = icmp eq i8 %63, 0
  br i1 %.not.27, label %.preheader34.28, label %.thread

.preheader34.28:                                  ; preds = %.preheader34.27
  %64 = getelementptr inbounds i8, ptr %4, i64 28
  %65 = load i8, ptr %64, align 4, !tbaa !5
  %.not.28 = icmp eq i8 %65, 0
  br i1 %.not.28, label %.preheader34.29, label %.thread

.preheader34.29:                                  ; preds = %.preheader34.28
  %66 = getelementptr inbounds i8, ptr %4, i64 29
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %.not.29 = icmp eq i8 %67, 0
  br i1 %.not.29, label %.preheader34.30, label %.thread

.preheader34.30:                                  ; preds = %.preheader34.29
  %68 = getelementptr inbounds i8, ptr %4, i64 30
  %69 = load i8, ptr %68, align 2, !tbaa !5
  %.not.30 = icmp eq i8 %69, 0
  br i1 %.not.30, label %.preheader34.31, label %.thread

.preheader34.31:                                  ; preds = %.preheader34.30
  %70 = getelementptr inbounds i8, ptr %4, i64 31
  %71 = load i8, ptr %70, align 1, !tbaa !5
  %.not.31 = icmp eq i8 %71, 0
  br i1 %.not.31, label %98, label %.thread

.thread:                                          ; preds = %.preheader34.preheader, %.preheader34.1, %.preheader34.2, %.preheader34.3, %.preheader34.4, %.preheader34.5, %.preheader34.6, %.preheader34.7, %.preheader34.8, %.preheader34.9, %.preheader34.10, %.preheader34.11, %.preheader34.12, %.preheader34.13, %.preheader34.14, %.preheader34.15, %.preheader34.16, %.preheader34.17, %.preheader34.18, %.preheader34.19, %.preheader34.20, %.preheader34.21, %.preheader34.22, %.preheader34.23, %.preheader34.24, %.preheader34.25, %.preheader34.26, %.preheader34.27, %.preheader34.28, %.preheader34.29, %.preheader34.30, %.preheader34.31
  %72 = phi i1 [ true, %.preheader34.preheader ], [ true, %.preheader34.1 ], [ true, %.preheader34.2 ], [ true, %.preheader34.3 ], [ true, %.preheader34.4 ], [ true, %.preheader34.5 ], [ true, %.preheader34.6 ], [ true, %.preheader34.7 ], [ true, %.preheader34.8 ], [ true, %.preheader34.9 ], [ true, %.preheader34.10 ], [ true, %.preheader34.11 ], [ true, %.preheader34.12 ], [ true, %.preheader34.13 ], [ true, %.preheader34.14 ], [ true, %.preheader34.15 ], [ true, %.preheader34.16 ], [ true, %.preheader34.17 ], [ true, %.preheader34.18 ], [ true, %.preheader34.19 ], [ true, %.preheader34.20 ], [ true, %.preheader34.21 ], [ true, %.preheader34.22 ], [ true, %.preheader34.23 ], [ true, %.preheader34.24 ], [ true, %.preheader34.25 ], [ true, %.preheader34.26 ], [ true, %.preheader34.27 ], [ true, %.preheader34.28 ], [ true, %.preheader34.29 ], [ true, %.preheader34.30 ], [ false, %.preheader34.31 ]
  %.02337.lcssa.wide = phi i32 [ 0, %.preheader34.preheader ], [ 1, %.preheader34.1 ], [ 2, %.preheader34.2 ], [ 3, %.preheader34.3 ], [ 4, %.preheader34.4 ], [ 5, %.preheader34.5 ], [ 6, %.preheader34.6 ], [ 7, %.preheader34.7 ], [ 8, %.preheader34.8 ], [ 9, %.preheader34.9 ], [ 10, %.preheader34.10 ], [ 11, %.preheader34.11 ], [ 12, %.preheader34.12 ], [ 13, %.preheader34.13 ], [ 14, %.preheader34.14 ], [ 15, %.preheader34.15 ], [ 16, %.preheader34.16 ], [ 17, %.preheader34.17 ], [ 18, %.preheader34.18 ], [ 19, %.preheader34.19 ], [ 20, %.preheader34.20 ], [ 21, %.preheader34.21 ], [ 22, %.preheader34.22 ], [ 23, %.preheader34.23 ], [ 24, %.preheader34.24 ], [ 25, %.preheader34.25 ], [ 26, %.preheader34.26 ], [ 27, %.preheader34.27 ], [ 28, %.preheader34.28 ], [ 29, %.preheader34.29 ], [ 30, %.preheader34.30 ], [ 31, %.preheader34.31 ]
  %.lcssa = phi i8 [ %7, %.preheader34.preheader ], [ %11, %.preheader34.1 ], [ %13, %.preheader34.2 ], [ %15, %.preheader34.3 ], [ %17, %.preheader34.4 ], [ %19, %.preheader34.5 ], [ %21, %.preheader34.6 ], [ %23, %.preheader34.7 ], [ %25, %.preheader34.8 ], [ %27, %.preheader34.9 ], [ %29, %.preheader34.10 ], [ %31, %.preheader34.11 ], [ %33, %.preheader34.12 ], [ %35, %.preheader34.13 ], [ %37, %.preheader34.14 ], [ %39, %.preheader34.15 ], [ %41, %.preheader34.16 ], [ %43, %.preheader34.17 ], [ %45, %.preheader34.18 ], [ %47, %.preheader34.19 ], [ %49, %.preheader34.20 ], [ %51, %.preheader34.21 ], [ %53, %.preheader34.22 ], [ %55, %.preheader34.23 ], [ %57, %.preheader34.24 ], [ %59, %.preheader34.25 ], [ %61, %.preheader34.26 ], [ %63, %.preheader34.27 ], [ %65, %.preheader34.28 ], [ %67, %.preheader34.29 ], [ %69, %.preheader34.30 ], [ %71, %.preheader34.31 ]
  %73 = getelementptr inbounds i8, ptr %1, i64 80
  %74 = zext i8 %.lcssa to i32
  %75 = shl nuw nsw i32 %.02337.lcssa.wide, 8
  %reass.sub = sub nsw i32 %74, %75
  %76 = add nsw i32 %reass.sub, 7935
  %77 = zext nneg i32 %76 to i64
  %78 = getelementptr inbounds [8192 x %class.Point], ptr %73, i64 0, i64 %77
  %79 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %78)
          to label %.preheader unwind label %8

.preheader:                                       ; preds = %.thread
  br i1 %72, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %80 = zext nneg i32 %.02337.lcssa.wide to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %97
  %indvars.iv = phi i64 [ %80, %.lr.ph.preheader ], [ %indvars.iv.next, %97 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 %indvars.iv.next
  %82 = load i8, ptr %81, align 1, !tbaa !5
  %.not28 = icmp eq i8 %82, 0
  br i1 %.not28, label %97, label %83

83:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  %84 = zext i8 %82 to i64
  %85 = shl i64 %indvars.iv, 8
  %reass.sub42 = sub i64 %84, %85
  %86 = add i64 %reass.sub42, 7679
  %87 = and i64 %86, 4294967295
  %88 = getelementptr inbounds [8192 x %class.Point], ptr %73, i64 0, i64 %87
  invoke void @_ZN9Secp256K14Add2ER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(393296) %1, ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %88)
          to label %89 unwind label %92

89:                                               ; preds = %83
  %90 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %91 unwind label %94

91:                                               ; preds = %89
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  br label %97

92:                                               ; preds = %83
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %89
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  br label %96

96:                                               ; preds = %94, %92
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  br label %99

97:                                               ; preds = %.lr.ph, %91
  %exitcond.not = icmp eq i64 %indvars.iv.next, 31
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %97, %.preheader
  invoke void @_ZN5Point6ReduceEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %98 unwind label %8

98:                                               ; preds = %.preheader34.31, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret void

99:                                               ; preds = %96, %8
  %.pn.pn = phi { ptr, i32 } [ %.pn, %96 ], [ %9, %8 ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn
}

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

declare void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #0

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

declare void @_ZN5Point6ReduceEv(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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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