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

; 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.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }

@OriginalPointsBSGS = external dso_local global %"class.std::vector", align 8
@bloom_bPx2nd = external dso_local global ptr, align 8
@BSGS_M_double = external dso_local global %class.Int, align 8
@BSGS_AMP2 = external dso_local global %"class.std::vector", align 8
@secp = external dso_local global ptr, align 8

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

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

declare void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3Int4MultEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

declare i32 @bloom_check(ptr noundef, ptr noundef, i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z16bsgs_secondcheckP3IntjjS0_(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.Int, align 8
  %13 = alloca %class.Point, align 8
  %14 = alloca %class.Point, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.Point, align 8
  %18 = alloca %class.Point, align 8
  %19 = alloca %class.Point, align 8
  %20 = alloca [32 x i8], align 16
  %21 = alloca %class.Point, align 8
  %22 = alloca %class.Point, align 8
  %23 = alloca %class.Point, align 8
  %24 = alloca %class.Point, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #6
  call void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %12)
  call void @llvm.lifetime.start.p0(i64 120, ptr %13) #6
  call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13)
  call void @llvm.lifetime.start.p0(i64 120, ptr %14) #6
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %14)
          to label %25 unwind label %71

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

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

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

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef @BSGS_M_double)
          to label %29 unwind label %87

29:                                               ; preds = %28
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  invoke void @_ZN3Int4MultEm(ptr noundef nonnull align 8 dereferenceable(40) %12, i64 noundef %31)
          to label %32 unwind label %87

32:                                               ; preds = %29
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef %33)
          to label %34 unwind label %87

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 120, ptr %21) #6
  %35 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8 %21, ptr noundef nonnull align 8 dereferenceable(983240) %35, ptr noundef %12)
          to label %36 unwind label %91

36:                                               ; preds = %34
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %21, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %21) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr %22) #6
  %37 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K18NegationER5Point(ptr dead_on_unwind writable sret(%class.Point) align 8 %22, ptr noundef nonnull align 8 dereferenceable(983240) %37, ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %38 unwind label %95

38:                                               ; preds = %36
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %22, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %22) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr %23) #6
  %39 = load ptr, ptr @secp, align 8, !tbaa !5
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @OriginalPointsBSGS, i64 noundef %41) #6
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %23, ptr noundef nonnull align 8 dereferenceable(983240) %39, ptr noundef nonnull align 8 dereferenceable(120) %42, ptr noundef nonnull align 8 dereferenceable(120) %14)
          to label %43 unwind label %99

43:                                               ; preds = %38
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %23, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %23) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %23) #6
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef nonnull align 8 dereferenceable(120) %18)
          to label %44 unwind label %87

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %117, %44
  call void @llvm.lifetime.start.p0(i64 120, ptr %24) #6
  %46 = load ptr, ptr @secp, align 8, !tbaa !5
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @BSGS_AMP2, i64 noundef %48) #6
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %24, ptr noundef nonnull align 8 dereferenceable(983240) %46, ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef nonnull align 8 dereferenceable(120) %49)
          to label %50 unwind label %103

50:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %24, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %24) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %24) #6
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(120) %19)
          to label %51 unwind label %87

51:                                               ; preds = %50
  %52 = getelementptr inbounds %class.Point, ptr %18, i32 0, i32 0
  %53 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(40) %52, ptr noundef %53)
          to label %54 unwind label %87

54:                                               ; preds = %51
  %55 = load ptr, ptr @bloom_bPx2nd, align 8, !tbaa !5
  %56 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  %57 = load i8, ptr %56, align 16, !tbaa !12
  %58 = zext i8 %57 to i64
  %59 = getelementptr inbounds %struct.bloom, ptr %55, i64 %58
  %60 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  %61 = invoke i32 @bloom_check(ptr noundef %59, ptr noundef %60, i32 noundef 32)
          to label %62 unwind label %87

62:                                               ; preds = %54
  store i32 %61, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %107

65:                                               ; preds = %62
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = invoke noundef i32 @_Z15bsgs_thirdcheckP3IntjjS0_(ptr noundef %12, i32 noundef %66, i32 noundef %67, ptr noundef %68)
          to label %70 unwind label %87

70:                                               ; preds = %65
  store i32 %69, ptr %10, align 4, !tbaa !9
  br label %107

71:                                               ; preds = %4
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %15, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %16, align 4
  br label %125

75:                                               ; preds = %25
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %15, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %16, align 4
  br label %124

79:                                               ; preds = %26
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %15, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %16, align 4
  br label %123

83:                                               ; preds = %27
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %15, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %16, align 4
  br label %122

87:                                               ; preds = %65, %54, %51, %50, %43, %32, %29, %28
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %15, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %16, align 4
  br label %121

91:                                               ; preds = %34
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %15, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %21) #6
  br label %121

95:                                               ; preds = %36
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %15, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %22) #6
  br label %121

99:                                               ; preds = %38
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %15, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %23) #6
  br label %121

103:                                              ; preds = %45
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %15, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %24) #6
  br label %121

107:                                              ; preds = %70, %62
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %9, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %107
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = icmp slt i32 %111, 32
  br i1 %112, label %113, label %117

113:                                              ; preds = %110
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = icmp ne i32 %114, 0
  %116 = xor i1 %115, true
  br label %117

117:                                              ; preds = %113, %110
  %118 = phi i1 [ false, %110 ], [ %116, %113 ]
  br i1 %118, label %45, label %119, !llvm.loop !13

119:                                              ; preds = %117
  %120 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %19) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %19) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %18) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %18) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %17) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %14) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret i32 %120

121:                                              ; preds = %103, %99, %95, %91, %87
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %19) #6
  br label %122

122:                                              ; preds = %121, %83
  call void @llvm.lifetime.end.p0(i64 120, ptr %19) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %18) #6
  br label %123

123:                                              ; preds = %122, %79
  call void @llvm.lifetime.end.p0(i64 120, ptr %18) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17) #6
  br label %124

124:                                              ; preds = %123, %75
  call void @llvm.lifetime.end.p0(i64 120, ptr %17) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #6
  br label %125

125:                                              ; preds = %124, %71
  call void @llvm.lifetime.end.p0(i64 120, ptr %14) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %15, align 8
  %128 = load i32, ptr %16, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z15bsgs_thirdcheckP3IntjjS0_(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #5

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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nounwind }

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

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


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

%"class.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.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }

@OriginalPointsBSGS = external dso_local global %"class.std::vector", align 8
@bloom_bPx2nd = external dso_local local_unnamed_addr global ptr, align 8
@BSGS_M_double = external dso_local global %class.Int, align 8
@BSGS_AMP2 = external dso_local global %"class.std::vector", align 8
@secp = external dso_local local_unnamed_addr global ptr, align 8

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

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

declare void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) 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 i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

declare i32 @bloom_check(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z16bsgs_secondcheckP3IntjjS0_(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.Int, 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
  %11 = alloca [32 x i8], align 16
  %12 = alloca %class.Point, align 8
  %13 = alloca %class.Point, align 8
  %14 = alloca %class.Point, align 8
  %15 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #6
  call void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #6
  call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #6
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7)
          to label %16 unwind label %46

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

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

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

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull @BSGS_M_double)
          to label %20 unwind label %.loopexit.split-lp

20:                                               ; preds = %19
  %21 = zext i32 %1 to i64
  invoke void @_ZN3Int4MultEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %21)
          to label %22 unwind label %.loopexit.split-lp

22:                                               ; preds = %20
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef %0)
          to label %23 unwind label %.loopexit.split-lp

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %12) #6
  %24 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(983240) %24, ptr noundef nonnull %5)
          to label %25 unwind label %54

25:                                               ; preds = %23
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %12, i64 120, i1 false), !tbaa.struct !9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %12) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %13) #6
  %26 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K18NegationER5Point(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %13, ptr noundef nonnull align 8 dereferenceable(983240) %26, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %27 unwind label %56

27:                                               ; preds = %25
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %7, ptr noundef nonnull align 8 dereferenceable(120) %13, i64 120, i1 false), !tbaa.struct !9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %14) #6
  %28 = load ptr, ptr @secp, align 8, !tbaa !5
  %29 = zext i32 %2 to i64
  %30 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @OriginalPointsBSGS, i64 noundef %29) #6
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %14, ptr noundef nonnull align 8 dereferenceable(983240) %28, ptr noundef nonnull align 8 dereferenceable(120) %30, ptr noundef nonnull align 8 dereferenceable(120) %7)
          to label %31 unwind label %58

31:                                               ; preds = %27
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(120) %14, i64 120, i1 false), !tbaa.struct !9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %14) #6
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %8, ptr noundef nonnull align 8 dereferenceable(120) %9)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %31, %62
  %indvars.iv = phi i64 [ %indvars.iv.next, %62 ], [ 0, %31 ]
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %15) #6
  %32 = load ptr, ptr @secp, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @BSGS_AMP2, i64 noundef %indvars.iv) #6
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(983240) %32, ptr noundef nonnull align 8 dereferenceable(120) %8, ptr noundef nonnull align 8 dereferenceable(120) %33)
          to label %34 unwind label %60

34:                                               ; preds = %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(120) %15, i64 120, i1 false), !tbaa.struct !9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %15) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %15) #6
  invoke void @_ZN5Point3SetERS_(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(120) %10)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %34
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull %11)
          to label %36 unwind label %.loopexit

36:                                               ; preds = %35
  %37 = load ptr, ptr @bloom_bPx2nd, align 8, !tbaa !5
  %38 = load i8, ptr %11, align 16, !tbaa !10
  %39 = zext i8 %38 to i64
  %40 = getelementptr inbounds %struct.bloom, ptr %37, i64 %39
  %41 = invoke i32 @bloom_check(ptr noundef %40, ptr noundef nonnull %11, i32 noundef 32)
          to label %42 unwind label %.loopexit

42:                                               ; preds = %36
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %62, label %43

43:                                               ; preds = %42
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  %45 = invoke noundef i32 @_Z15bsgs_thirdcheckP3IntjjS0_(ptr noundef nonnull %5, i32 noundef %44, i32 noundef %2, ptr noundef %3)
          to label %62 unwind label %.loopexit

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

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

50:                                               ; preds = %17
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %68

52:                                               ; preds = %18
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %67

.loopexit:                                        ; preds = %34, %35, %36, %43
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %66

.loopexit.split-lp:                               ; preds = %19, %20, %22, %31
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %66

54:                                               ; preds = %23
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %12) #6
  br label %66

56:                                               ; preds = %25
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #6
  br label %66

58:                                               ; preds = %27
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %14) #6
  br label %66

60:                                               ; preds = %.preheader
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %15) #6
  br label %66

62:                                               ; preds = %43, %42
  %.119 = phi i32 [ 0, %42 ], [ %45, %43 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = icmp ult i64 %indvars.iv, 31
  %.not27 = icmp eq i32 %.119, 0
  %64 = and i1 %63, %.not27
  br i1 %64, label %.preheader, label %65, !llvm.loop !11

65:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %9) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %8) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  ret i32 %.119

66:                                               ; preds = %.loopexit, %.loopexit.split-lp, %60, %58, %56, %54
  %.pn = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ], [ %57, %56 ], [ %55, %54 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #6
  br label %67

67:                                               ; preds = %66, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %66 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #6
  br label %68

68:                                               ; preds = %67, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %67 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %9) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #6
  br label %69

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

70:                                               ; preds = %69, %46
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %69 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #6
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z15bsgs_thirdcheckP3IntjjS0_(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 = !{i64 0, i64 40, !10, i64 40, i64 40, !10, i64 80, i64 40, !10}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass