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

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.Secp256K1 = type { %class.Point, %class.Int, %class.Int, [8192 x %class.Point] }
%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }

@GSn = external dso_local global %"class.std::vector", align 8
@_2GSn = external dso_local global %class.Point, align 8
@write_keys = external dso_local global %union.pthread_mutex_t, align 8
@mutex_bsgs_thread = external dso_local global %union.pthread_mutex_t, align 8
@BSGSkeyfound = external dso_local global %class.Int, align 8
@bsgs_found = external dso_local global i32, align 4
@OriginalPointsBSGS = external dso_local global %class.Point, align 8
@OriginalPointsBSGScompressed = external dso_local global i8, align 1
@bloom_bP = external dso_local global ptr, align 8
@bsgs_aux = external dso_local global i64, align 8
@BSGS_CURRENT = external dso_local global %class.Int, align 8
@BSGS_N = external dso_local global %class.Int, align 8
@BSGS_M = external dso_local global %class.Int, align 8
@BSGS_M_double = external dso_local global %class.Int, align 8
@n_range_end = external dso_local global %class.Int, align 8
@secp = external dso_local global ptr, align 8
@.str.137 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare i32 @printf(ptr noundef, ...) #0

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

declare noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40)) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

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) #5

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

; 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) #6 align 2

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 noalias ptr @fopen(ptr noundef, ptr noundef) #0

declare i32 @fclose(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) #1

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

36:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 120, ptr %13) #9
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %37 unwind label %82

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %38 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #10
          to label %39 unwind label %86

39:                                               ; preds = %37
  invoke void @_ZN8IntGroupC1Ei(ptr noundef nonnull align 8 dereferenceable(20) %38, i32 noundef 513)
          to label %40 unwind label %90

40:                                               ; preds = %39
  store ptr %38, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 120, ptr %17) #9
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17)
          to label %41 unwind label %94

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 511, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 20520, ptr %19) #9
  %42 = getelementptr inbounds [513 x %class.Int], ptr %19, i32 0, i32 0
  %43 = getelementptr inbounds %class.Int, ptr %42, i64 513
  br label %44

44:                                               ; preds = %46, %41
  %45 = phi ptr [ %42, %41 ], [ %47, %46 ]
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %45)
          to label %46 unwind label %98

46:                                               ; preds = %44
  %47 = getelementptr inbounds %class.Int, ptr %45, i64 1
  %48 = icmp eq ptr %47, %43
  br i1 %48, label %49, label %44

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 122880, ptr %20) #9
  %50 = getelementptr inbounds [1024 x %class.Point], ptr %20, i32 0, i32 0
  %51 = getelementptr inbounds %class.Point, ptr %50, i64 1024
  br label %52

52:                                               ; preds = %54, %49
  %53 = phi ptr [ %50, %49 ], [ %55, %54 ]
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %53)
          to label %54 unwind label %102

54:                                               ; preds = %52
  %55 = getelementptr inbounds %class.Point, ptr %53, i64 1
  %56 = icmp eq ptr %55, %51
  br i1 %56, label %57, label %52

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %21)
          to label %58 unwind label %112

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %59 unwind label %116

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %60 unwind label %120

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %61 unwind label %124

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %25)
          to label %62 unwind label %128

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #9
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %26)
          to label %63 unwind label %132

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 120, ptr %27) #9
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %27)
          to label %64 unwind label %136

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 120, ptr %28) #9
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %28)
          to label %65 unwind label %140

65:                                               ; preds = %64
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 0
  invoke void @_ZN8IntGroup3SetEP3Int(ptr noundef nonnull align 8 dereferenceable(20) %66, ptr noundef %67)
          to label %68 unwind label %144

68:                                               ; preds = %65
  %69 = load i64, ptr @bsgs_aux, align 8, !tbaa !11
  %70 = udiv i64 %69, 1024
  %71 = trunc i64 %70 to i32
  store i32 %71, ptr %15, align 4, !tbaa !9
  %72 = load i64, ptr @bsgs_aux, align 8, !tbaa !11
  %73 = urem i64 %72, 1024
  %74 = icmp ne i64 %73, 0
  br i1 %74, label %75, label %148

75:                                               ; preds = %68
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %15, align 4, !tbaa !9
  br label %148

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

82:                                               ; preds = %36
  %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 %502

86:                                               ; preds = %37
  %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
  br label %501

90:                                               ; preds = %39
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %11, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %38, i64 noundef 24) #11
  br label %501

94:                                               ; preds = %40
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %11, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %12, align 4
  br label %500

98:                                               ; preds = %44
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %11, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %12, align 4
  br label %499

102:                                              ; preds = %52
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %11, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %12, align 4
  %106 = icmp eq ptr %50, %53
  br i1 %106, label %111, label %107

107:                                              ; preds = %107, %102
  %108 = phi ptr [ %53, %102 ], [ %109, %107 ]
  %109 = getelementptr inbounds %class.Point, ptr %108, i64 -1
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %109) #9
  %110 = icmp eq ptr %109, %50
  br i1 %110, label %111, label %107

111:                                              ; preds = %107, %102
  br label %498

112:                                              ; preds = %57
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %490

116:                                              ; preds = %58
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %489

120:                                              ; preds = %59
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  br label %488

124:                                              ; preds = %60
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %11, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %12, align 4
  br label %487

128:                                              ; preds = %61
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %11, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %12, align 4
  br label %486

132:                                              ; preds = %62
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %11, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %12, align 4
  br label %485

136:                                              ; preds = %63
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %11, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %12, align 4
  br label %484

140:                                              ; preds = %64
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %11, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %12, align 4
  br label %483

144:                                              ; preds = %480, %468, %209, %193, %187, %184, %179, %176, %174, %171, %168, %165, %164, %163, %156, %155, %154, %152, %150, %149, %148, %65
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %11, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %12, align 4
  br label %482

148:                                              ; preds = %75, %68
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef @BSGS_M_double)
          to label %149 unwind label %144

149:                                              ; preds = %148
  invoke void @_ZN3Int4MultEm(ptr noundef nonnull align 8 dereferenceable(40) %26, i64 noundef 512)
          to label %150 unwind label %144

150:                                              ; preds = %149
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef @BSGS_M)
          to label %151 unwind label %144

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %474, %151
  %153 = call i32 @pthread_mutex_lock(ptr noundef @mutex_bsgs_thread) #9
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @BSGS_CURRENT)
          to label %154 unwind label %144

154:                                              ; preds = %152
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef @BSGS_N)
          to label %155 unwind label %144

155:                                              ; preds = %154
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef @BSGS_N)
          to label %156 unwind label %144

156:                                              ; preds = %155
  %157 = call i32 @pthread_mutex_unlock(ptr noundef @mutex_bsgs_thread) #9
  %158 = invoke noundef zeroext i1 @_ZN3Int16IsGreaterOrEqualEPS_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @n_range_end)
          to label %159 unwind label %144

159:                                              ; preds = %156
  br i1 %158, label %160, label %161

160:                                              ; preds = %159
  br label %476

161:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 120, ptr %29) #9
  %162 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8 %29, ptr noundef nonnull align 8 dereferenceable(983240) %162, ptr noundef %7)
          to label %163 unwind label %201

163:                                              ; preds = %161
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %29, i64 120, i1 false), !tbaa.struct !13
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %29) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %29) #9
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef %7)
          to label %164 unwind label %144

164:                                              ; preds = %163
  invoke void @_ZN3Int3NegEv(ptr noundef nonnull align 8 dereferenceable(40) %25)
          to label %165 unwind label %144

165:                                              ; preds = %164
  %166 = load ptr, ptr @secp, align 8, !tbaa !5
  %167 = getelementptr inbounds %class.Secp256K1, ptr %166, i32 0, i32 2
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef %167)
          to label %168 unwind label %144

168:                                              ; preds = %165
  invoke void @_ZN3Int3SubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef %26)
          to label %169 unwind label %144

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 120, ptr %30) #9
  %170 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8 %30, ptr noundef nonnull align 8 dereferenceable(983240) %170, ptr noundef %25)
          to label %171 unwind label %205

171:                                              ; preds = %169
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %30, i64 120, i1 false), !tbaa.struct !13
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %30) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %30) #9
  %172 = invoke noundef zeroext i1 @_ZN5Point6equalsERS_(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS)
          to label %173 unwind label %144

173:                                              ; preds = %171
  br i1 %172, label %174, label %214

174:                                              ; preds = %173
  %175 = invoke noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %176 unwind label %144

176:                                              ; preds = %174
  store ptr %175, ptr %6, align 8, !tbaa !5
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.137, ptr noundef %177)
          to label %179 unwind label %144

179:                                              ; preds = %176
  %180 = load ptr, ptr @secp, align 8, !tbaa !5
  %181 = load i8, ptr @OriginalPointsBSGScompressed, align 1, !tbaa !15, !range !17, !noundef !18
  %182 = trunc i8 %181 to i1
  %183 = invoke noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240) %180, i1 noundef zeroext %182, ptr noundef nonnull align 8 dereferenceable(120) %9)
          to label %184 unwind label %144

184:                                              ; preds = %179
  store ptr %183, ptr %5, align 8, !tbaa !5
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.138, ptr noundef %185)
          to label %187 unwind label %144

187:                                              ; preds = %184
  %188 = call i32 @pthread_mutex_lock(ptr noundef @write_keys) #9
  %189 = invoke noalias ptr @fopen(ptr noundef @.str.139, ptr noundef @.str.140)
          to label %190 unwind label %144

190:                                              ; preds = %187
  store ptr %189, ptr %3, align 8, !tbaa !5
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %209

193:                                              ; preds = %190
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.141, ptr noundef %195, ptr noundef %196) #9
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = invoke i32 @fclose(ptr noundef %198)
          to label %200 unwind label %144

200:                                              ; preds = %193
  br label %209

201:                                              ; preds = %161
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %11, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %29) #9
  br label %482

205:                                              ; preds = %169
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %11, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %30) #9
  br label %482

209:                                              ; preds = %200, %190
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound, ptr noundef %7)
          to label %210 unwind label %144

210:                                              ; preds = %209
  %211 = call i32 @pthread_mutex_unlock(ptr noundef @write_keys) #9
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %212) #9
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %213) #9
  store i32 1, ptr @bsgs_found, align 4, !tbaa !9
  br label %467

214:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 120, ptr %31) #9
  %215 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind writable sret(%class.Point) align 8 %31, ptr noundef nonnull align 8 dereferenceable(983240) %215, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS, ptr noundef nonnull align 8 dereferenceable(120) %10)
          to label %216 unwind label %244

216:                                              ; preds = %214
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %31, i64 120, i1 false), !tbaa.struct !13
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %31) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %462, %216
  %218 = load i32, ptr %32, align 4, !tbaa !9
  %219 = load i32, ptr %15, align 4, !tbaa !9
  %220 = icmp ult i32 %218, %219
  br i1 %220, label %221, label %224

221:                                              ; preds = %217
  %222 = load i32, ptr @bsgs_found, align 4, !tbaa !9
  %223 = icmp eq i32 %222, 0
  br label %224

224:                                              ; preds = %221, %217
  %225 = phi i1 [ false, %217 ], [ %223, %221 ]
  br i1 %225, label %226, label %466

226:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %227

227:                                              ; preds = %241, %226
  %228 = load i32, ptr %33, align 4, !tbaa !9
  %229 = load i32, ptr %18, align 4, !tbaa !9
  %230 = icmp slt i32 %228, %229
  br i1 %230, label %231, label %252

231:                                              ; preds = %227
  %232 = load i32, ptr %33, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %233
  %235 = load i32, ptr %33, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %236) #9
  %238 = getelementptr inbounds %class.Point, ptr %237, i32 0, i32 0
  %239 = getelementptr inbounds %class.Point, ptr %17, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %234, ptr noundef %238, ptr noundef %239)
          to label %240 unwind label %248

240:                                              ; preds = %231
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %33, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %33, align 4, !tbaa !9
  br label %227, !llvm.loop !19

244:                                              ; preds = %214
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %11, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %31) #9
  br label %482

248:                                              ; preds = %460, %458, %455, %453, %451, %449, %448, %443, %441, %350, %348, %346, %345, %341, %339, %338, %333, %313, %311, %309, %308, %304, %302, %301, %296, %290, %288, %286, %285, %281, %275, %267, %261, %252, %231
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %11, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %12, align 4
  br label %465

252:                                              ; preds = %227
  %253 = load i32, ptr %33, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %254
  %256 = load i32, ptr %33, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %257) #9
  %259 = getelementptr inbounds %class.Point, ptr %258, i32 0, i32 0
  %260 = getelementptr inbounds %class.Point, ptr %17, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %255, ptr noundef %259, ptr noundef %260)
          to label %261 unwind label %248

261:                                              ; preds = %252
  %262 = load i32, ptr %33, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %264
  %266 = getelementptr inbounds %class.Point, ptr %17, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %265, ptr noundef @_2GSn, ptr noundef %266)
          to label %267 unwind label %248

267:                                              ; preds = %261
  %268 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN8IntGroup6ModInvEv(ptr noundef nonnull align 8 dereferenceable(20) %268)
          to label %269 unwind label %248

269:                                              ; preds = %267
  %270 = getelementptr inbounds [1024 x %class.Point], ptr %20, i64 0, i64 512
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %270, ptr align 8 %17, i64 120, i1 false), !tbaa.struct !13
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %271

271:                                              ; preds = %330, %269
  %272 = load i32, ptr %33, align 4, !tbaa !9
  %273 = load i32, ptr %18, align 4, !tbaa !9
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %275, label %333

275:                                              ; preds = %271
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %17, i64 120, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %17, i64 120, i1 false), !tbaa.struct !13
  %276 = load i32, ptr %33, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %277) #9
  %279 = getelementptr inbounds %class.Point, ptr %278, i32 0, i32 1
  %280 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 1
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef %279, ptr noundef %280)
          to label %281 unwind label %248

281:                                              ; preds = %275
  %282 = load i32, ptr %33, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %283
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef %21, ptr noundef %284)
          to label %285 unwind label %248

285:                                              ; preds = %281
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef %23)
          to label %286 unwind label %248

286:                                              ; preds = %285
  %287 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %287)
          to label %288 unwind label %248

288:                                              ; preds = %286
  %289 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %289, ptr noundef %24)
          to label %290 unwind label %248

290:                                              ; preds = %288
  %291 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  %292 = load i32, ptr %33, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %293) #9
  %295 = getelementptr inbounds %class.Point, ptr %294, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %291, ptr noundef %295)
          to label %296 unwind label %248

296:                                              ; preds = %290
  %297 = load i32, ptr %33, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %298) #9
  %300 = getelementptr inbounds %class.Point, ptr %299, i32 0, i32 1
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef %300)
          to label %301 unwind label %248

301:                                              ; preds = %296
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %302 unwind label %248

302:                                              ; preds = %301
  %303 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 1
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef %303)
          to label %304 unwind label %248

304:                                              ; preds = %302
  %305 = load i32, ptr %33, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %306
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef %22, ptr noundef %307)
          to label %308 unwind label %248

308:                                              ; preds = %304
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef %23)
          to label %309 unwind label %248

309:                                              ; preds = %308
  %310 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %310)
          to label %311 unwind label %248

311:                                              ; preds = %309
  %312 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %312, ptr noundef %24)
          to label %313 unwind label %248

313:                                              ; preds = %311
  %314 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  %315 = load i32, ptr %33, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %316) #9
  %318 = getelementptr inbounds %class.Point, ptr %317, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %314, ptr noundef %318)
          to label %319 unwind label %248

319:                                              ; preds = %313
  %320 = load i32, ptr %33, align 4, !tbaa !9
  %321 = add nsw i32 %320, 1
  %322 = add nsw i32 512, %321
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [1024 x %class.Point], ptr %20, i64 0, i64 %323
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %324, ptr align 8 %27, i64 120, i1 false), !tbaa.struct !13
  %325 = load i32, ptr %33, align 4, !tbaa !9
  %326 = add nsw i32 %325, 1
  %327 = sub nsw i32 512, %326
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [1024 x %class.Point], ptr %20, i64 0, i64 %328
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %329, ptr align 8 %28, i64 120, i1 false), !tbaa.struct !13
  br label %330

330:                                              ; preds = %319
  %331 = load i32, ptr %33, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %33, align 4, !tbaa !9
  br label %271, !llvm.loop !21

333:                                              ; preds = %271
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %17, i64 120, i1 false), !tbaa.struct !13
  %334 = load i32, ptr %33, align 4, !tbaa !9
  %335 = sext i32 %334 to i64
  %336 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %335) #9
  %337 = getelementptr inbounds %class.Point, ptr %336, i32 0, i32 1
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef %337)
          to label %338 unwind label %248

338:                                              ; preds = %333
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %339 unwind label %248

339:                                              ; preds = %338
  %340 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 1
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef %340)
          to label %341 unwind label %248

341:                                              ; preds = %339
  %342 = load i32, ptr %33, align 4, !tbaa !9
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %343
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef %22, ptr noundef %344)
          to label %345 unwind label %248

345:                                              ; preds = %341
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef %23)
          to label %346 unwind label %248

346:                                              ; preds = %345
  %347 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %347)
          to label %348 unwind label %248

348:                                              ; preds = %346
  %349 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %349, ptr noundef %24)
          to label %350 unwind label %248

350:                                              ; preds = %348
  %351 = getelementptr inbounds %class.Point, ptr %28, i32 0, i32 0
  %352 = load i32, ptr %33, align 4, !tbaa !9
  %353 = sext i32 %352 to i64
  %354 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %353) #9
  %355 = getelementptr inbounds %class.Point, ptr %354, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %351, ptr noundef %355)
          to label %356 unwind label %248

356:                                              ; preds = %350
  %357 = getelementptr inbounds [1024 x %class.Point], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %357, ptr align 8 %28, i64 120, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %358

358:                                              ; preds = %437, %356
  %359 = load i32, ptr %34, align 4, !tbaa !9
  %360 = icmp slt i32 %359, 1024
  br i1 %360, label %361, label %364

361:                                              ; preds = %358
  %362 = load i32, ptr @bsgs_found, align 4, !tbaa !9
  %363 = icmp eq i32 %362, 0
  br label %364

364:                                              ; preds = %361, %358
  %365 = phi i1 [ false, %358 ], [ %363, %361 ]
  br i1 %365, label %367, label %366

366:                                              ; preds = %364
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %441

367:                                              ; preds = %364
  %368 = load i32, ptr %34, align 4, !tbaa !9
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [1024 x %class.Point], ptr %20, i64 0, i64 %369
  %371 = getelementptr inbounds %class.Point, ptr %370, i32 0, i32 0
  %372 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(40) %371, ptr noundef %372)
          to label %373 unwind label %422

373:                                              ; preds = %367
  %374 = load ptr, ptr @bloom_bP, align 8, !tbaa !5
  %375 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %376 = load i8, ptr %375, align 16, !tbaa !14
  %377 = zext i8 %376 to i64
  %378 = getelementptr inbounds %struct.bloom, ptr %374, i64 %377
  %379 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %380 = invoke i32 @bloom_check(ptr noundef %378, ptr noundef %379, i32 noundef 32)
          to label %381 unwind label %422

381:                                              ; preds = %373
  store i32 %380, ptr %14, align 4, !tbaa !9
  %382 = load i32, ptr %14, align 4, !tbaa !9
  %383 = icmp ne i32 %382, 0
  br i1 %383, label %384, label %436

384:                                              ; preds = %381
  %385 = load i32, ptr %32, align 4, !tbaa !9
  %386 = mul i32 %385, 1024
  %387 = load i32, ptr %34, align 4, !tbaa !9
  %388 = add i32 %386, %387
  %389 = invoke noundef i32 @_Z16bsgs_secondcheckP3IntjS0_(ptr noundef %7, i32 noundef %388, ptr noundef %8)
          to label %390 unwind label %422

390:                                              ; preds = %384
  store i32 %389, ptr %14, align 4, !tbaa !9
  %391 = load i32, ptr %14, align 4, !tbaa !9
  %392 = icmp ne i32 %391, 0
  br i1 %392, label %393, label %435

393:                                              ; preds = %390
  %394 = invoke noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) %8)
          to label %395 unwind label %422

395:                                              ; preds = %393
  store ptr %394, ptr %6, align 8, !tbaa !5
  %396 = load ptr, ptr %6, align 8, !tbaa !5
  %397 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.142, ptr noundef %396)
          to label %398 unwind label %422

398:                                              ; preds = %395
  call void @llvm.lifetime.start.p0(i64 120, ptr %35) #9
  %399 = load ptr, ptr @secp, align 8, !tbaa !5
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind writable sret(%class.Point) align 8 %35, ptr noundef nonnull align 8 dereferenceable(983240) %399, ptr noundef %8)
          to label %400 unwind label %426

400:                                              ; preds = %398
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %35, i64 120, i1 false), !tbaa.struct !13
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %35) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %35) #9
  %401 = load ptr, ptr @secp, align 8, !tbaa !5
  %402 = load i8, ptr @OriginalPointsBSGScompressed, align 1, !tbaa !15, !range !17, !noundef !18
  %403 = trunc i8 %402 to i1
  %404 = invoke noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240) %401, i1 noundef zeroext %403, ptr noundef nonnull align 8 dereferenceable(120) %13)
          to label %405 unwind label %422

405:                                              ; preds = %400
  store ptr %404, ptr %5, align 8, !tbaa !5
  %406 = load ptr, ptr %5, align 8, !tbaa !5
  %407 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.138, ptr noundef %406)
          to label %408 unwind label %422

408:                                              ; preds = %405
  %409 = call i32 @pthread_mutex_lock(ptr noundef @write_keys) #9
  %410 = invoke noalias ptr @fopen(ptr noundef @.str.139, ptr noundef @.str.140)
          to label %411 unwind label %422

411:                                              ; preds = %408
  store ptr %410, ptr %3, align 8, !tbaa !5
  %412 = load ptr, ptr %3, align 8, !tbaa !5
  %413 = icmp ne ptr %412, null
  br i1 %413, label %414, label %430

414:                                              ; preds = %411
  %415 = load ptr, ptr %3, align 8, !tbaa !5
  %416 = load ptr, ptr %6, align 8, !tbaa !5
  %417 = load ptr, ptr %5, align 8, !tbaa !5
  %418 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %415, ptr noundef @.str.141, ptr noundef %416, ptr noundef %417) #9
  %419 = load ptr, ptr %3, align 8, !tbaa !5
  %420 = invoke i32 @fclose(ptr noundef %419)
          to label %421 unwind label %422

421:                                              ; preds = %414
  br label %430

422:                                              ; preds = %430, %414, %408, %405, %400, %395, %393, %384, %373, %367
  %423 = landingpad { ptr, i32 }
          cleanup
  %424 = extractvalue { ptr, i32 } %423, 0
  store ptr %424, ptr %11, align 8
  %425 = extractvalue { ptr, i32 } %423, 1
  store i32 %425, ptr %12, align 4
  br label %440

426:                                              ; preds = %398
  %427 = landingpad { ptr, i32 }
          cleanup
  %428 = extractvalue { ptr, i32 } %427, 0
  store ptr %428, ptr %11, align 8
  %429 = extractvalue { ptr, i32 } %427, 1
  store i32 %429, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %35) #9
  br label %440

430:                                              ; preds = %421, %411
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound, ptr noundef %8)
          to label %431 unwind label %422

431:                                              ; preds = %430
  %432 = call i32 @pthread_mutex_unlock(ptr noundef @write_keys) #9
  %433 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %433) #9
  %434 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %434) #9
  store i32 1, ptr @bsgs_found, align 4, !tbaa !9
  br label %435

435:                                              ; preds = %431, %390
  br label %436

436:                                              ; preds = %435, %381
  br label %437

437:                                              ; preds = %436
  %438 = load i32, ptr %34, align 4, !tbaa !9
  %439 = add nsw i32 %438, 1
  store i32 %439, ptr %34, align 4, !tbaa !9
  br label %358, !llvm.loop !22

440:                                              ; preds = %426, %422
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %465

441:                                              ; preds = %366
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %17, i64 120, i1 false), !tbaa.struct !13
  %442 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 1
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef getelementptr inbounds (%class.Point, ptr @_2GSn, i32 0, i32 1), ptr noundef %442)
          to label %443 unwind label %248

443:                                              ; preds = %441
  %444 = load i32, ptr %33, align 4, !tbaa !9
  %445 = add nsw i32 %444, 1
  %446 = sext i32 %445 to i64
  %447 = getelementptr inbounds [513 x %class.Int], ptr %19, i64 0, i64 %446
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef %21, ptr noundef %447)
          to label %448 unwind label %248

448:                                              ; preds = %443
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef %23)
          to label %449 unwind label %248

449:                                              ; preds = %448
  %450 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %450)
          to label %451 unwind label %248

451:                                              ; preds = %449
  %452 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %452, ptr noundef %24)
          to label %453 unwind label %248

453:                                              ; preds = %451
  %454 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %454, ptr noundef @_2GSn)
          to label %455 unwind label %248

455:                                              ; preds = %453
  %456 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 1
  %457 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 0
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %456, ptr noundef @_2GSn, ptr noundef %457)
          to label %458 unwind label %248

458:                                              ; preds = %455
  %459 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 1
  invoke void @_ZN3Int8ModMulK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %459, ptr noundef %23)
          to label %460 unwind label %248

460:                                              ; preds = %458
  %461 = getelementptr inbounds %class.Point, ptr %27, i32 0, i32 1
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %461, ptr noundef getelementptr inbounds (%class.Point, ptr @_2GSn, i32 0, i32 1))
          to label %462 unwind label %248

462:                                              ; preds = %460
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %27, i64 120, i1 false), !tbaa.struct !13
  %463 = load i32, ptr %32, align 4, !tbaa !9
  %464 = add i32 %463, 1
  store i32 %464, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %217, !llvm.loop !23

465:                                              ; preds = %440, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %482

466:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %467

467:                                              ; preds = %466, %210
  br label %468

468:                                              ; preds = %467
  %469 = invoke noundef zeroext i1 @_ZN3Int7IsLowerEPS_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @n_range_end)
          to label %470 unwind label %144

470:                                              ; preds = %468
  br i1 %469, label %471, label %474

471:                                              ; preds = %470
  %472 = load i32, ptr @bsgs_found, align 4, !tbaa !9
  %473 = icmp eq i32 %472, 0
  br label %474

474:                                              ; preds = %471, %470
  %475 = phi i1 [ false, %470 ], [ %473, %471 ]
  br i1 %475, label %152, label %476, !llvm.loop !24

476:                                              ; preds = %474, %160
  %477 = load ptr, ptr %16, align 8, !tbaa !5
  %478 = icmp eq ptr %477, null
  br i1 %478, label %480, label %479

479:                                              ; preds = %476
  call void @_ZN8IntGroupD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %477) #9
  call void @_ZdlPvm(ptr noundef %477, i64 noundef 24) #11
  br label %480

480:                                              ; preds = %479, %476
  invoke void @pthread_exit(ptr noundef null) #12
          to label %481 unwind label %144

481:                                              ; preds = %480
  unreachable

482:                                              ; preds = %465, %244, %205, %201, %144
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %28) #9
  br label %483

483:                                              ; preds = %482, %140
  call void @llvm.lifetime.end.p0(i64 120, ptr %28) #9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %27) #9
  br label %484

484:                                              ; preds = %483, %136
  call void @llvm.lifetime.end.p0(i64 120, ptr %27) #9
  br label %485

485:                                              ; preds = %484, %132
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #9
  br label %486

486:                                              ; preds = %485, %128
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #9
  br label %487

487:                                              ; preds = %486, %124
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #9
  br label %488

488:                                              ; preds = %487, %120
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #9
  br label %489

489:                                              ; preds = %488, %116
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #9
  br label %490

490:                                              ; preds = %489, %112
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #9
  %491 = getelementptr inbounds [1024 x %class.Point], ptr %20, i32 0, i32 0
  %492 = getelementptr inbounds %class.Point, ptr %491, i64 1024
  br label %493

493:                                              ; preds = %493, %490
  %494 = phi ptr [ %492, %490 ], [ %495, %493 ]
  %495 = getelementptr inbounds %class.Point, ptr %494, i64 -1
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %495) #9
  %496 = icmp eq ptr %495, %491
  br i1 %496, label %497, label %493

497:                                              ; preds = %493
  br label %498

498:                                              ; preds = %497, %111
  call void @llvm.lifetime.end.p0(i64 122880, ptr %20) #9
  br label %499

499:                                              ; preds = %498, %98
  call void @llvm.lifetime.end.p0(i64 20520, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17) #9
  br label %500

500:                                              ; preds = %499, %94
  call void @llvm.lifetime.end.p0(i64 120, ptr %17) #9
  br label %501

501:                                              ; preds = %500, %90, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #9
  br label %502

502:                                              ; preds = %501, %82
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #9
  br label %503

503:                                              ; preds = %502, %78
  call void @llvm.lifetime.end.p0(i64 120, ptr %10) #9
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  br label %504

504:                                              ; preds = %503
  %505 = load ptr, ptr %11, align 8
  %506 = load i32, ptr %12, align 4
  %507 = insertvalue { ptr, i32 } poison, ptr %505, 0
  %508 = insertvalue { ptr, i32 } %507, i32 %506, 1
  resume { ptr, i32 } %508
}

declare void @_ZN8IntGroupC1Ei(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #0

declare void @_ZN8IntGroup3SetEP3Int(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) #0

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

declare noundef zeroext i1 @_ZN3Int16IsGreaterOrEqualEPS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #0

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

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

declare noundef zeroext i1 @_ZN5Point6equalsERS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) #0

declare noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240), i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(120)) #0

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

declare void @_ZN8IntGroup6ModInvEv(ptr noundef nonnull align 8 dereferenceable(20)) #0

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

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

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

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

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

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

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

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

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

declare noundef zeroext i1 @_ZN3Int7IsLowerEPS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #0

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

; Function Attrs: noreturn
declare void @pthread_exit(ptr noundef) #8

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 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { noreturn "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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }
attributes #12 = { noreturn }

!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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 40, !14, i64 40, i64 40, !14, i64 80, i64 40, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }

@GSn = external dso_local global %"class.std::vector", align 8
@_2GSn = external dso_local global %class.Point, align 8
@write_keys = external dso_local global %union.pthread_mutex_t, align 8
@mutex_bsgs_thread = external dso_local global %union.pthread_mutex_t, align 8
@BSGSkeyfound = external dso_local global %class.Int, align 8
@bsgs_found = external dso_local local_unnamed_addr global i32, align 4
@OriginalPointsBSGS = external dso_local global %class.Point, align 8
@OriginalPointsBSGScompressed = external dso_local local_unnamed_addr global i8, align 1
@bloom_bP = external dso_local local_unnamed_addr global ptr, align 8
@bsgs_aux = external dso_local local_unnamed_addr global i64, align 8
@BSGS_CURRENT = external dso_local global %class.Int, align 8
@BSGS_N = external dso_local global %class.Int, align 8
@BSGS_M = external dso_local global %class.Int, align 8
@BSGS_M_double = external dso_local global %class.Int, align 8
@n_range_end = external dso_local global %class.Int, align 8
@secp = external dso_local local_unnamed_addr global ptr, align 8
@.str.137 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

declare noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6

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) #7

; 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 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 #8 align 2

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress noreturn uwtable
define dso_local noalias noundef nonnull ptr @_Z19thread_process_bsgsPv(ptr nocapture noundef readnone %0) local_unnamed_addr #9 personality ptr @__gxx_personality_v0 {
  %2 = alloca [32 x i8], align 16
  %3 = alloca %class.Int, align 8
  %4 = alloca %class.Int, align 8
  %5 = alloca %class.Point, align 8
  %6 = alloca %class.Point, align 8
  %7 = alloca %class.Point, align 8
  %8 = alloca %class.Point, align 8
  %9 = alloca [513 x %class.Int], align 16
  %10 = alloca [1024 x %class.Point], align 16
  %11 = alloca %class.Int, align 8
  %12 = alloca %class.Int, align 8
  %13 = alloca %class.Int, align 8
  %14 = alloca %class.Int, align 8
  %15 = alloca %class.Int, align 8
  %16 = alloca %class.Int, align 8
  %17 = alloca %class.Point, align 8
  %18 = alloca %class.Point, align 8
  %19 = alloca %class.Point, align 8
  %20 = alloca %class.Point, align 8
  %21 = alloca %class.Point, align 8
  %22 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #12
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #12
  call void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #12
  call void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %4)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %5) #12
  call void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %5)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #12
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %23 unwind label %52

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #12
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7)
          to label %24 unwind label %54

24:                                               ; preds = %23
  %25 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #13
          to label %26 unwind label %56

26:                                               ; preds = %24
  invoke void @_ZN8IntGroupC1Ei(ptr noundef nonnull align 8 dereferenceable(20) %25, i32 noundef 513)
          to label %27 unwind label %58

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

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 20520, ptr nonnull %9) #12
  br label %29

29:                                               ; preds = %30, %28
  %.idx = phi i64 [ 0, %28 ], [ %.add, %30 ]
  %.ptr = getelementptr inbounds i8, ptr %9, i64 %.idx
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %.ptr)
          to label %30 unwind label %62

30:                                               ; preds = %29
  %.add = add nuw nsw i64 %.idx, 40
  %31 = icmp eq i64 %.add, 20520
  br i1 %31, label %32, label %29

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 122880, ptr nonnull %10) #12
  %33 = getelementptr inbounds i8, ptr %10, i64 122880
  br label %34

34:                                               ; preds = %35, %32
  %.idx85 = phi i64 [ 0, %32 ], [ %.add86, %35 ]
  %.ptr87 = getelementptr inbounds i8, ptr %10, i64 %.idx85
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %.ptr87)
          to label %35 unwind label %64

35:                                               ; preds = %34
  %.add86 = add nuw nsw i64 %.idx85, 120
  %36 = icmp eq i64 %.add86, 122880
  br i1 %36, label %37, label %34

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %38 unwind label %70

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %39 unwind label %72

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %40 unwind label %74

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %41 unwind label %76

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %42 unwind label %78

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #12
  invoke void @_ZN3IntC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %16)
          to label %43 unwind label %80

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %17) #12
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17)
          to label %44 unwind label %82

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %18) #12
  invoke void @_ZN5PointC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %18)
          to label %45 unwind label %84

45:                                               ; preds = %44
  invoke void @_ZN8IntGroup3SetEP3Int(ptr noundef nonnull align 8 dereferenceable(20) %25, ptr noundef nonnull %9)
          to label %46 unwind label %.loopexit.split-lp119

46:                                               ; preds = %45
  %47 = load i64, ptr @bsgs_aux, align 8, !tbaa !5
  %48 = lshr i64 %47, 10
  %49 = trunc i64 %48 to i32
  %50 = and i64 %47, 1023
  %.not = icmp ne i64 %50, 0
  %51 = zext i1 %.not to i32
  %spec.select = add i32 %51, %49
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull @BSGS_M_double)
          to label %86 unwind label %.loopexit.split-lp119

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

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

56:                                               ; preds = %24
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %273

58:                                               ; preds = %26
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 24) #14
  br label %273

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

62:                                               ; preds = %29
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %271

64:                                               ; preds = %34
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = icmp eq i64 %.idx85, 0
  br i1 %66, label %.loopexit, label %.preheader122

.preheader122:                                    ; preds = %64, %.preheader122
  %67 = phi ptr [ %68, %.preheader122 ], [ %.ptr87, %64 ]
  %68 = getelementptr inbounds i8, ptr %67, i64 -120
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %68) #12
  %69 = icmp eq ptr %68, %10
  br i1 %69, label %.loopexit, label %.preheader122

70:                                               ; preds = %37
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %266

72:                                               ; preds = %38
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %265

74:                                               ; preds = %39
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %264

76:                                               ; preds = %40
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %263

78:                                               ; preds = %41
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %262

80:                                               ; preds = %42
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %261

82:                                               ; preds = %43
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %260

84:                                               ; preds = %44
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %259

.loopexit118:                                     ; preds = %95, %97, %98, %99, %105, %106, %107, %110, %113, %116, %118, %135, %.loopexit116
  %lpad.loopexit120 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp119:                            ; preds = %45, %46, %86, %87, %257
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

86:                                               ; preds = %46
  invoke void @_ZN3Int4MultEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef 512)
          to label %87 unwind label %.loopexit.split-lp119

87:                                               ; preds = %86
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull @BSGS_M)
          to label %.preheader117 unwind label %.loopexit.split-lp119

.preheader117:                                    ; preds = %87
  %88 = icmp ne i32 %spec.select, 0
  %89 = getelementptr inbounds i8, ptr %10, i64 61440
  %90 = getelementptr inbounds i8, ptr %17, i64 40
  %91 = getelementptr inbounds i8, ptr %18, i64 40
  %92 = zext i32 %spec.select to i64
  %93 = getelementptr inbounds i8, ptr %9, i64 20440
  %94 = getelementptr inbounds i8, ptr %9, i64 20480
  br label %95

95:                                               ; preds = %.preheader117, %253
  %96 = call i32 @pthread_mutex_lock(ptr noundef nonnull @mutex_bsgs_thread) #12
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull @BSGS_CURRENT)
          to label %97 unwind label %.loopexit118

97:                                               ; preds = %95
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef nonnull @BSGS_N)
          to label %98 unwind label %.loopexit118

98:                                               ; preds = %97
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef nonnull @BSGS_N)
          to label %99 unwind label %.loopexit118

99:                                               ; preds = %98
  %100 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @mutex_bsgs_thread) #12
  %101 = invoke noundef zeroext i1 @_ZN3Int16IsGreaterOrEqualEPS_(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull @n_range_end)
          to label %102 unwind label %.loopexit118

102:                                              ; preds = %99
  br i1 %101, label %257, label %103

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %19) #12
  %104 = load ptr, ptr @secp, align 8, !tbaa !9
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %19, ptr noundef nonnull align 8 dereferenceable(983240) %104, ptr noundef nonnull %3)
          to label %105 unwind label %131

105:                                              ; preds = %103
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %5, ptr noundef nonnull align 8 dereferenceable(120) %19, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %19) #12
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %19) #12
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull %3)
          to label %106 unwind label %.loopexit118

106:                                              ; preds = %105
  invoke void @_ZN3Int3NegEv(ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %107 unwind label %.loopexit118

107:                                              ; preds = %106
  %108 = load ptr, ptr @secp, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %108, i64 160
  invoke void @_ZN3Int3AddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull %109)
          to label %110 unwind label %.loopexit118

110:                                              ; preds = %107
  invoke void @_ZN3Int3SubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull %16)
          to label %111 unwind label %.loopexit118

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %20) #12
  %112 = load ptr, ptr @secp, align 8, !tbaa !9
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %20, ptr noundef nonnull align 8 dereferenceable(983240) %112, ptr noundef nonnull %15)
          to label %113 unwind label %133

113:                                              ; preds = %111
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %20, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %20) #12
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %20) #12
  %114 = invoke noundef zeroext i1 @_ZN5Point6equalsERS_(ptr noundef nonnull align 8 dereferenceable(120) %5, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS)
          to label %115 unwind label %.loopexit118

115:                                              ; preds = %113
  br i1 %114, label %116, label %138

116:                                              ; preds = %115
  %117 = invoke noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %118 unwind label %.loopexit118

118:                                              ; preds = %116
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.137, ptr noundef %117)
  %120 = load ptr, ptr @secp, align 8, !tbaa !9
  %121 = load i8, ptr @OriginalPointsBSGScompressed, align 1, !tbaa !13, !range !15, !noundef !16
  %122 = trunc nuw i8 %121 to i1
  %123 = invoke noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240) %120, i1 noundef zeroext %122, ptr noundef nonnull align 8 dereferenceable(120) %5)
          to label %124 unwind label %.loopexit118

124:                                              ; preds = %118
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.138, ptr noundef %123)
  %126 = call i32 @pthread_mutex_lock(ptr noundef nonnull @write_keys) #12
  %127 = call noalias ptr @fopen(ptr noundef nonnull @.str.139, ptr noundef nonnull @.str.140)
  %.not95 = icmp eq ptr %127, null
  br i1 %.not95, label %135, label %128

128:                                              ; preds = %124
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %127, ptr noundef nonnull @.str.141, ptr noundef %117, ptr noundef %123) #12
  %130 = call i32 @fclose(ptr noundef nonnull %127)
  br label %135

131:                                              ; preds = %103
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %19) #12
  br label %.loopexit.split-lp

133:                                              ; preds = %111
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %20) #12
  br label %.loopexit.split-lp

135:                                              ; preds = %128, %124
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound, ptr noundef nonnull %3)
          to label %136 unwind label %.loopexit118

136:                                              ; preds = %135
  %137 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @write_keys) #12
  call void @free(ptr noundef %117) #12
  call void @free(ptr noundef %123) #12
  store i32 1, ptr @bsgs_found, align 4, !tbaa !17
  br label %.loopexit116

138:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %21) #12
  %139 = load ptr, ptr @secp, align 8, !tbaa !9
  invoke void @_ZN9Secp256K19AddDirectER5PointS1_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %21, ptr noundef nonnull align 8 dereferenceable(983240) %139, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %140 unwind label %148

140:                                              ; preds = %138
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %8, ptr noundef nonnull align 8 dereferenceable(120) %21, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %21) #12
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %21) #12
  %141 = load i32, ptr @bsgs_found, align 4
  %142 = icmp eq i32 %141, 0
  %143 = select i1 %88, i1 %142, i1 false
  br i1 %143, label %.preheader, label %.loopexit116

.preheader:                                       ; preds = %140, %247
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %247 ], [ 0, %140 ]
  br label %144

144:                                              ; preds = %.preheader, %147
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %147 ]
  %145 = getelementptr inbounds [513 x %class.Int], ptr %9, i64 0, i64 %indvars.iv
  %146 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %indvars.iv) #12
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %145, ptr noundef nonnull %146, ptr noundef nonnull %8)
          to label %147 unwind label %.loopexit.split-lp.loopexit

147:                                              ; preds = %144
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 511
  br i1 %exitcond.not, label %150, label %144, !llvm.loop !19

148:                                              ; preds = %138
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %21) #12
  br label %.loopexit.split-lp

.loopexit112:                                     ; preds = %155, %158, %160, %161, %162, %163, %165, %168, %169, %170, %171, %172, %173, %174
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %144
  %lpad.loopexit113 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %246, %245, %244, %243, %242, %241, %240, %239, %._crit_edge, %190, %189, %188, %187, %186, %185, %184, %181, %153, %152, %150
  %lpad.loopexit.split-lp114 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

150:                                              ; preds = %147
  %151 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef 511) #12
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %93, ptr noundef nonnull %151, ptr noundef nonnull %8)
          to label %152 unwind label %.loopexit.split-lp.loopexit.split-lp

152:                                              ; preds = %150
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %94, ptr noundef nonnull @_2GSn, ptr noundef nonnull %8)
          to label %153 unwind label %.loopexit.split-lp.loopexit.split-lp

153:                                              ; preds = %152
  invoke void @_ZN8IntGroup6ModInvEv(ptr noundef nonnull align 8 dereferenceable(20) %25)
          to label %154 unwind label %.loopexit.split-lp.loopexit.split-lp

154:                                              ; preds = %153
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(120) %89, ptr noundef nonnull align 8 dereferenceable(120) %8, i64 120, i1 false), !tbaa.struct !11
  br label %155

155:                                              ; preds = %154, %176
  %indvars.iv139 = phi i64 [ 0, %154 ], [ %indvars.iv.next140, %176 ]
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef nonnull align 8 dereferenceable(120) %8, i64 120, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(120) %8, i64 120, i1 false), !tbaa.struct !11
  %156 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %indvars.iv139) #12
  %157 = getelementptr inbounds i8, ptr %156, i64 40
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull %157, ptr noundef nonnull %90)
          to label %158 unwind label %.loopexit112

158:                                              ; preds = %155
  %159 = getelementptr inbounds [513 x %class.Int], ptr %9, i64 0, i64 %indvars.iv139
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull %11, ptr noundef nonnull %159)
          to label %160 unwind label %.loopexit112

160:                                              ; preds = %158
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %13)
          to label %161 unwind label %.loopexit112

161:                                              ; preds = %160
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %162 unwind label %.loopexit112

162:                                              ; preds = %161
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull %14)
          to label %163 unwind label %.loopexit112

163:                                              ; preds = %162
  %164 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %indvars.iv139) #12
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull %164)
          to label %165 unwind label %.loopexit112

165:                                              ; preds = %163
  %166 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %indvars.iv139) #12
  %167 = getelementptr inbounds i8, ptr %166, i64 40
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull %167)
          to label %168 unwind label %.loopexit112

168:                                              ; preds = %165
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %169 unwind label %.loopexit112

169:                                              ; preds = %168
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull %91)
          to label %170 unwind label %.loopexit112

170:                                              ; preds = %169
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull %12, ptr noundef nonnull %159)
          to label %171 unwind label %.loopexit112

171:                                              ; preds = %170
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %13)
          to label %172 unwind label %.loopexit112

172:                                              ; preds = %171
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %173 unwind label %.loopexit112

173:                                              ; preds = %172
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull %14)
          to label %174 unwind label %.loopexit112

174:                                              ; preds = %173
  %175 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef %indvars.iv139) #12
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull %175)
          to label %176 unwind label %.loopexit112

176:                                              ; preds = %174
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %177 = add nuw nsw i64 %indvars.iv139, 513
  %178 = getelementptr inbounds [1024 x %class.Point], ptr %10, i64 0, i64 %177
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %178, ptr noundef nonnull align 8 dereferenceable(120) %17, i64 120, i1 false), !tbaa.struct !11
  %179 = sub nuw nsw i64 511, %indvars.iv139
  %180 = getelementptr inbounds [1024 x %class.Point], ptr %10, i64 0, i64 %179
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %180, ptr noundef nonnull align 8 dereferenceable(120) %18, i64 120, i1 false), !tbaa.struct !11
  %exitcond142.not = icmp eq i64 %indvars.iv.next140, 511
  br i1 %exitcond142.not, label %181, label %155, !llvm.loop !21

181:                                              ; preds = %176
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(120) %8, i64 120, i1 false), !tbaa.struct !11
  %182 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef 511) #12
  %183 = getelementptr inbounds i8, ptr %182, i64 40
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull %183)
          to label %184 unwind label %.loopexit.split-lp.loopexit.split-lp

184:                                              ; preds = %181
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %185 unwind label %.loopexit.split-lp.loopexit.split-lp

185:                                              ; preds = %184
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull %91)
          to label %186 unwind label %.loopexit.split-lp.loopexit.split-lp

186:                                              ; preds = %185
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull %12, ptr noundef nonnull %93)
          to label %187 unwind label %.loopexit.split-lp.loopexit.split-lp

187:                                              ; preds = %186
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %13)
          to label %188 unwind label %.loopexit.split-lp.loopexit.split-lp

188:                                              ; preds = %187
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %189 unwind label %.loopexit.split-lp.loopexit.split-lp

189:                                              ; preds = %188
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull %14)
          to label %190 unwind label %.loopexit.split-lp.loopexit.split-lp

190:                                              ; preds = %189
  %191 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @GSn, i64 noundef 511) #12
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull %191)
          to label %192 unwind label %.loopexit.split-lp.loopexit.split-lp

192:                                              ; preds = %190
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(120) %18, i64 120, i1 false), !tbaa.struct !11
  %193 = load i32, ptr @bsgs_found, align 4
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %192
  %195 = shl i64 %indvars.iv146, 10
  br label %196

._crit_edge:                                      ; preds = %234, %192
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef nonnull align 8 dereferenceable(120) %8, i64 120, i1 false), !tbaa.struct !11
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull getelementptr inbounds (i8, ptr @_2GSn, i64 40), ptr noundef nonnull %90)
          to label %239 unwind label %.loopexit.split-lp.loopexit.split-lp

196:                                              ; preds = %.lr.ph, %234
  %indvars.iv143 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next144, %234 ]
  %197 = getelementptr inbounds [1024 x %class.Point], ptr %10, i64 0, i64 %indvars.iv143
  invoke void @_ZN3Int10Get32BytesEPh(ptr noundef nonnull align 8 dereferenceable(40) %197, ptr noundef nonnull %2)
          to label %198 unwind label %227

198:                                              ; preds = %196
  %199 = load ptr, ptr @bloom_bP, align 8, !tbaa !9
  %200 = load i8, ptr %2, align 16, !tbaa !12
  %201 = zext i8 %200 to i64
  %202 = getelementptr inbounds %struct.bloom, ptr %199, i64 %201
  %203 = invoke i32 @bloom_check(ptr noundef %202, ptr noundef nonnull %2, i32 noundef 32)
          to label %204 unwind label %227

204:                                              ; preds = %198
  %.not89 = icmp eq i32 %203, 0
  br i1 %.not89, label %234, label %205

205:                                              ; preds = %204
  %206 = add i64 %indvars.iv143, %195
  %207 = trunc i64 %206 to i32
  %208 = invoke noundef i32 @_Z16bsgs_secondcheckP3IntjS0_(ptr noundef nonnull %3, i32 noundef %207, ptr noundef nonnull %4)
          to label %209 unwind label %227

209:                                              ; preds = %205
  %.not90 = icmp eq i32 %208, 0
  br i1 %.not90, label %234, label %210

210:                                              ; preds = %209
  %211 = invoke noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %212 unwind label %227

212:                                              ; preds = %210
  %213 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.142, ptr noundef %211)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %22) #12
  %214 = load ptr, ptr @secp, align 8, !tbaa !9
  invoke void @_ZN9Secp256K116ComputePublicKeyEP3Int(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %22, ptr noundef nonnull align 8 dereferenceable(983240) %214, ptr noundef nonnull %4)
          to label %215 unwind label %229

215:                                              ; preds = %212
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %7, ptr noundef nonnull align 8 dereferenceable(120) %22, i64 120, i1 false), !tbaa.struct !11
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %22) #12
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %22) #12
  %216 = load ptr, ptr @secp, align 8, !tbaa !9
  %217 = load i8, ptr @OriginalPointsBSGScompressed, align 1, !tbaa !13, !range !15, !noundef !16
  %218 = trunc nuw i8 %217 to i1
  %219 = invoke noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240) %216, i1 noundef zeroext %218, ptr noundef nonnull align 8 dereferenceable(120) %7)
          to label %220 unwind label %227

220:                                              ; preds = %215
  %221 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.138, ptr noundef %219)
  %222 = call i32 @pthread_mutex_lock(ptr noundef nonnull @write_keys) #12
  %223 = call noalias ptr @fopen(ptr noundef nonnull @.str.139, ptr noundef nonnull @.str.140)
  %.not91 = icmp eq ptr %223, null
  br i1 %.not91, label %231, label %224

224:                                              ; preds = %220
  %225 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %223, ptr noundef nonnull @.str.141, ptr noundef %211, ptr noundef %219) #12
  %226 = call i32 @fclose(ptr noundef nonnull %223)
  br label %231

227:                                              ; preds = %231, %215, %210, %205, %198, %196
  %228 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

229:                                              ; preds = %212
  %230 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %22) #12
  br label %.loopexit.split-lp

231:                                              ; preds = %224, %220
  invoke void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound, ptr noundef nonnull %4)
          to label %232 unwind label %227

232:                                              ; preds = %231
  %233 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @write_keys) #12
  call void @free(ptr noundef %211) #12
  call void @free(ptr noundef %219) #12
  store i32 1, ptr @bsgs_found, align 4, !tbaa !17
  br label %234

234:                                              ; preds = %204, %232, %209
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %235 = icmp ult i64 %indvars.iv143, 1023
  %236 = load i32, ptr @bsgs_found, align 4
  %237 = icmp eq i32 %236, 0
  %238 = select i1 %235, i1 %237, i1 false
  br i1 %238, label %196, label %._crit_edge, !llvm.loop !22

239:                                              ; preds = %._crit_edge
  invoke void @_ZN3Int8ModMulK1EPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull %11, ptr noundef nonnull %94)
          to label %240 unwind label %.loopexit.split-lp.loopexit.split-lp

240:                                              ; preds = %239
  invoke void @_ZN3Int11ModSquareK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %13)
          to label %241 unwind label %.loopexit.split-lp.loopexit.split-lp

241:                                              ; preds = %240
  invoke void @_ZN3Int6ModNegEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %242 unwind label %.loopexit.split-lp.loopexit.split-lp

242:                                              ; preds = %241
  invoke void @_ZN3Int6ModAddEPS_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull %14)
          to label %243 unwind label %.loopexit.split-lp.loopexit.split-lp

243:                                              ; preds = %242
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull @_2GSn)
          to label %244 unwind label %.loopexit.split-lp.loopexit.split-lp

244:                                              ; preds = %243
  invoke void @_ZN3Int6ModSubEPS_S0_(ptr noundef nonnull align 8 dereferenceable(40) %90, ptr noundef nonnull @_2GSn, ptr noundef nonnull %17)
          to label %245 unwind label %.loopexit.split-lp.loopexit.split-lp

245:                                              ; preds = %244
  invoke void @_ZN3Int8ModMulK1EPS_(ptr noundef nonnull align 8 dereferenceable(40) %90, ptr noundef nonnull %13)
          to label %246 unwind label %.loopexit.split-lp.loopexit.split-lp

246:                                              ; preds = %245
  invoke void @_ZN3Int6ModSubEPS_(ptr noundef nonnull align 8 dereferenceable(40) %90, ptr noundef nonnull getelementptr inbounds (i8, ptr @_2GSn, i64 40))
          to label %247 unwind label %.loopexit.split-lp.loopexit.split-lp

247:                                              ; preds = %246
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %8, ptr noundef nonnull align 8 dereferenceable(120) %17, i64 120, i1 false), !tbaa.struct !11
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %248 = icmp ult i64 %indvars.iv.next147, %92
  %249 = load i32, ptr @bsgs_found, align 4
  %250 = icmp eq i32 %249, 0
  %251 = select i1 %248, i1 %250, i1 false
  br i1 %251, label %.preheader, label %.loopexit116, !llvm.loop !23

.loopexit116:                                     ; preds = %247, %140, %136
  %252 = invoke noundef zeroext i1 @_ZN3Int7IsLowerEPS_(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull @n_range_end)
          to label %253 unwind label %.loopexit118

253:                                              ; preds = %.loopexit116
  %254 = load i32, ptr @bsgs_found, align 4
  %255 = icmp eq i32 %254, 0
  %256 = select i1 %252, i1 %255, i1 false
  br i1 %256, label %95, label %257, !llvm.loop !24

257:                                              ; preds = %253, %102
  call void @_ZN8IntGroupD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %25) #12
  call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 24) #14
  invoke void @pthread_exit(ptr noundef null) #15
          to label %258 unwind label %.loopexit.split-lp119

258:                                              ; preds = %257
  unreachable

.loopexit.split-lp:                               ; preds = %.loopexit112, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %.loopexit118, %.loopexit.split-lp119, %229, %227, %148, %133, %131
  %.pn96 = phi { ptr, i32 } [ %149, %148 ], [ %134, %133 ], [ %132, %131 ], [ %228, %227 ], [ %230, %229 ], [ %lpad.loopexit120, %.loopexit118 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp119 ], [ %lpad.loopexit, %.loopexit112 ], [ %lpad.loopexit113, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp114, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %18) #12
  br label %259

259:                                              ; preds = %.loopexit.split-lp, %84
  %.pn96.pn = phi { ptr, i32 } [ %.pn96, %.loopexit.split-lp ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %18) #12
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %17) #12
  br label %260

260:                                              ; preds = %259, %82
  %.pn96.pn.pn = phi { ptr, i32 } [ %.pn96.pn, %259 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %17) #12
  br label %261

261:                                              ; preds = %260, %80
  %.pn96.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn, %260 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #12
  br label %262

262:                                              ; preds = %261, %78
  %.pn96.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn, %261 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #12
  br label %263

263:                                              ; preds = %262, %76
  %.pn96.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn, %262 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #12
  br label %264

264:                                              ; preds = %263, %74
  %.pn96.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn, %263 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #12
  br label %265

265:                                              ; preds = %264, %72
  %.pn96.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn, %264 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #12
  br label %266

266:                                              ; preds = %265, %70
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn, %265 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #12
  br label %267

267:                                              ; preds = %267, %266
  %268 = phi ptr [ %33, %266 ], [ %269, %267 ]
  %269 = getelementptr inbounds i8, ptr %268, i64 -120
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %269) #12
  %270 = icmp eq ptr %269, %10
  br i1 %270, label %.loopexit, label %267

.loopexit:                                        ; preds = %.preheader122, %267, %64
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %65, %64 ], [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn, %267 ], [ %65, %.preheader122 ]
  call void @llvm.lifetime.end.p0(i64 122880, ptr nonnull %10) #12
  br label %271

271:                                              ; preds = %.loopexit, %62
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn, %.loopexit ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 20520, ptr nonnull %9) #12
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #12
  br label %272

272:                                              ; preds = %271, %60
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %271 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %8) #12
  br label %273

273:                                              ; preds = %272, %58, %56
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %272 ], [ %59, %58 ], [ %57, %56 ]
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #12
  br label %274

274:                                              ; preds = %273, %54
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %273 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #12
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #12
  br label %275

275:                                              ; preds = %274, %52
  %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %274 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #12
  call void @_ZN5PointD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %5) #12
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #12
  resume { ptr, i32 } %.pn96.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

declare void @_ZN8IntGroupC1Ei(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #0

declare void @_ZN8IntGroup3SetEP3Int(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) local_unnamed_addr #0

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

declare noundef zeroext i1 @_ZN3Int16IsGreaterOrEqualEPS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #0

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

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

declare noundef zeroext i1 @_ZN5Point6equalsERS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

declare noundef ptr @_ZN9Secp256K115GetPublicKeyHexEbR5Point(ptr noundef nonnull align 8 dereferenceable(983240), i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

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

declare void @_ZN8IntGroup6ModInvEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #0

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

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

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

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

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

declare void @_ZN3Int10Get32BytesEPh(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

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

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

declare noundef zeroext i1 @_ZN3Int7IsLowerEPS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn
declare void @pthread_exit(ptr noundef) local_unnamed_addr #11

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 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { nofree 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 #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { mustprogress noreturn 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 #10 = { 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 #11 = { noreturn "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 #12 = { nounwind }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }
attributes #15 = { noreturn }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


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