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

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

@BSGSkeyfound = external dso_local global %class.Int, align 8
@NTHREADS = external dso_local global i32, align 4
@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
@BSGS_CURRENT = external dso_local global %class.Int, align 8
@n_range_start = 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.70 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.162 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.163 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.164 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

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

declare void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #1

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z14client_handlerPv(ptr noundef %0) #5 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca [1024 x i8], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.str_tokenizer, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %18, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %19 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  store ptr null, ptr %19, align 8, !tbaa !11
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %22 = call i64 @recv(i32 noundef %20, ptr noundef %21, i64 noundef 1023, i32 noundef 2)
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %6, align 4, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp sle i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %1
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = call i32 @close(i32 noundef %27)
  call void @pthread_exit(ptr noundef null) #9
  unreachable

29:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %30 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call noundef ptr @memchr(ptr noundef %30, i32 noundef 10, i64 noundef %32) #10
  store ptr %33, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %43

36:                                               ; preds = %29
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %39 = ptrtoint ptr %37 to i64
  %40 = ptrtoint ptr %38 to i64
  %41 = sub i64 %39, %40
  %42 = add nsw i64 %41, 1
  br label %46

43:                                               ; preds = %29
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  br label %46

46:                                               ; preds = %43, %36
  %47 = phi i64 [ %42, %36 ], [ %45, %43 ]
  store i64 %47, ptr %9, align 8, !tbaa !13
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %50 = load i64, ptr %9, align 8, !tbaa !13
  %51 = call i64 @recv(i32 noundef %48, ptr noundef %49, i64 noundef %50, i32 noundef 0)
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %6, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = icmp sle i32 %53, 0
  br i1 %54, label %55, label %58

55:                                               ; preds = %46
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = call i32 @close(i32 noundef %56)
  call void @pthread_exit(ptr noundef null) #9
  unreachable

58:                                               ; preds = %46
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 %60
  store i8 0, ptr %61, align 1, !tbaa !15
  %62 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  call void @_Z15stringtokenizerPcP13str_tokenizer(ptr noundef %62, ptr noundef %7)
  %63 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !16
  %65 = icmp ne i32 %64, 3
  br i1 %65, label %66, label %75

66:                                               ; preds = %58
  %67 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !16
  %69 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.156, i32 noundef %68, ptr noundef %69)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef %7)
  %71 = load i32, ptr %3, align 4, !tbaa !9
  %72 = call noundef i32 @_Z7sendstriPKc(i32 noundef %71, ptr noundef @.str.157)
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = call i32 @close(i32 noundef %73)
  call void @pthread_exit(ptr noundef null) #9
  unreachable

75:                                               ; preds = %58
  %76 = load ptr, ptr @secp, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds ptr, ptr %78, i64 0
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = call noundef zeroext i1 @_ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb(ptr noundef nonnull align 8 dereferenceable(983240) %76, ptr noundef %80, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS, ptr noundef nonnull align 1 dereferenceable(1) @OriginalPointsBSGScompressed)
  br i1 %81, label %92, label %82

82:                                               ; preds = %75
  %83 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds ptr, ptr %84, i64 0
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.158, ptr noundef %86)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef %7)
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = call noundef i32 @_Z7sendstriPKc(i32 noundef %88, ptr noundef @.str.157)
  %90 = load i32, ptr %3, align 4, !tbaa !9
  %91 = call i32 @close(i32 noundef %90)
  call void @pthread_exit(ptr noundef null) #9
  unreachable

92:                                               ; preds = %75
  %93 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = getelementptr inbounds ptr, ptr %94, i64 1
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = call noundef i32 @_Z10isValidHexPc(ptr noundef %96)
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %106

99:                                               ; preds = %92
  %100 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = getelementptr inbounds ptr, ptr %101, i64 2
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = call noundef i32 @_Z10isValidHexPc(ptr noundef %103)
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %120, label %106

106:                                              ; preds = %99, %92
  %107 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds ptr, ptr %108, i64 1
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = getelementptr inbounds ptr, ptr %112, i64 2
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.159, ptr noundef %110, ptr noundef %114)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef %7)
  %116 = load i32, ptr %3, align 4, !tbaa !9
  %117 = call noundef i32 @_Z7sendstriPKc(i32 noundef %116, ptr noundef @.str.157)
  %118 = load i32, ptr %3, align 4, !tbaa !9
  %119 = call i32 @close(i32 noundef %118)
  call void @pthread_exit(ptr noundef null) #9
  unreachable

120:                                              ; preds = %99
  %121 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds ptr, ptr %122, i64 1
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(40) @n_range_start, ptr noundef %124)
  %125 = getelementptr inbounds %struct.str_tokenizer, ptr %7, i32 0, i32 2
  %126 = load ptr, ptr %125, align 8, !tbaa !11
  %127 = getelementptr inbounds ptr, ptr %126, i64 2
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(40) @n_range_end, ptr noundef %128)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef %7)
  call void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef @n_range_start)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %129 = load i32, ptr @NTHREADS, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = call noalias ptr @calloc(i64 noundef %130, i64 noundef 1) #11
  store ptr %131, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr @NTHREADS, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = call noalias ptr @calloc(i64 noundef %133, i64 noundef 8) #11
  store ptr %134, ptr %11, align 8, !tbaa !5
  %135 = load i32, ptr @NTHREADS, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call noalias ptr @calloc(i64 noundef %136, i64 noundef 4) #11
  store ptr %137, ptr %12, align 8, !tbaa !5
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %138, ptr noundef @.str.70, ptr noundef @.str.71, ptr noundef @.str.160, i32 noundef 2408)
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %139, ptr noundef @.str.70, ptr noundef @.str.71, ptr noundef @.str.161, i32 noundef 2409)
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %140, ptr noundef @.str.70, ptr noundef @.str.71, ptr noundef @.str.162, i32 noundef 2410)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %174, %120
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = load i32, ptr @NTHREADS, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %177

145:                                              ; preds = %141
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  store i32 %146, ptr %150, align 4, !tbaa !9
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i8, ptr %151, i64 %153
  store i8 1, ptr %154, align 1, !tbaa !17
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i64, ptr %155, i64 %157
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %159, i64 %161
  %163 = call i32 @pthread_create(ptr noundef %158, ptr noundef null, ptr noundef @_Z19thread_process_bsgsPv, ptr noundef %162) #8
  store i32 %163, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %173

166:                                              ; preds = %145
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str.163, i32 noundef %167)
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i8, ptr %169, i64 %171
  store i8 0, ptr %172, align 1, !tbaa !17
  br label %173

173:                                              ; preds = %166, %145
  br label %174

174:                                              ; preds = %173
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %13, align 4, !tbaa !9
  br label %141, !llvm.loop !19

177:                                              ; preds = %141
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %203, %177
  %179 = load i32, ptr %13, align 4, !tbaa !9
  %180 = load i32, ptr @NTHREADS, align 4, !tbaa !9
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %206

182:                                              ; preds = %178
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i8, ptr %183, i64 %185
  %187 = load i8, ptr %186, align 1, !tbaa !17, !range !21, !noundef !22
  %188 = trunc i8 %187 to i1
  br i1 %188, label %189, label %202

189:                                              ; preds = %182
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  %191 = load i32, ptr %13, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i64, ptr %190, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !13
  %195 = call i32 @pthread_join(i64 noundef %194, ptr noundef null)
  store i32 %195, ptr %14, align 4, !tbaa !9
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %201

198:                                              ; preds = %189
  %199 = load i32, ptr %13, align 4, !tbaa !9
  %200 = call i32 (ptr, ...) @printf(ptr noundef @.str.164, i32 noundef %199)
  br label %201

201:                                              ; preds = %198, %189
  br label %202

202:                                              ; preds = %201, %182
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %13, align 4, !tbaa !9
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %13, align 4, !tbaa !9
  br label %178, !llvm.loop !23

206:                                              ; preds = %178
  %207 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %207) #8
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %208) #8
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %209) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %210 = load i32, ptr @bsgs_found, align 4, !tbaa !9
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %218

212:                                              ; preds = %206
  %213 = call noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound)
  store ptr %213, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %214, i64 noundef 1024, ptr noundef @.str.165, ptr noundef %215) #8
  store i32 %216, ptr %15, align 4, !tbaa !9
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %217) #8
  br label %221

218:                                              ; preds = %206
  %219 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %220 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %219, i64 noundef 1024, ptr noundef @.str.166) #8
  store i32 %220, ptr %15, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %218, %212
  store i32 0, ptr @bsgs_found, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %222 = load i32, ptr %3, align 4, !tbaa !9
  %223 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = call i64 @send(i32 noundef %222, ptr noundef %223, i64 noundef %225, i32 noundef 0)
  %227 = trunc i64 %226 to i32
  store i32 %227, ptr %16, align 4, !tbaa !9
  %228 = load i32, ptr %16, align 4, !tbaa !9
  %229 = icmp eq i32 %228, -1
  br i1 %229, label %230, label %232

230:                                              ; preds = %221
  %231 = call i32 (ptr, ...) @printf(ptr noundef @.str.167)
  br label %232

232:                                              ; preds = %230, %221
  %233 = load i32, ptr %3, align 4, !tbaa !9
  %234 = call i32 @close(i32 noundef %233)
  call void @pthread_exit(ptr noundef null) #9
  unreachable
}

declare i32 @pthread_join(i64 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19thread_process_bsgsPv(ptr noundef) #5

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

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #1

declare i32 @close(i32 noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @memchr(ptr noundef, i32 noundef, i64 noundef) #7

declare void @_Z15stringtokenizerPcP13str_tokenizer(ptr noundef, ptr noundef) #1

declare void @_Z13freetokenizerP13str_tokenizer(ptr noundef) #1

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

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

declare noundef i32 @_Z10isValidHexPc(ptr noundef) #1

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind willreturn memory(read) "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 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { nounwind allocsize(0,1) }

!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, !6, i64 8}
!12 = !{!"_ZTS13str_tokenizer", !10, i64 0, !10, i64 4, !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!12, !10, i64 4}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !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.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%class.Point = type { %class.Int, %class.Int, %class.Int }
%struct.str_tokenizer = type { i32, i32, ptr }

@BSGSkeyfound = external dso_local global %class.Int, align 8
@NTHREADS = external dso_local local_unnamed_addr global i32, align 4
@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 global i8, align 1
@BSGS_CURRENT = external dso_local global %class.Int, align 8
@n_range_start = 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.70 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.162 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.163 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.164 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress noreturn uwtable
define dso_local noalias noundef nonnull ptr @_Z14client_handlerPv(ptr nocapture noundef readonly %0) local_unnamed_addr #7 {
  %2 = alloca [1024 x i8], align 16
  %3 = alloca %struct.str_tokenizer, align 8
  %4 = load i32, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr null, ptr %5, align 8, !tbaa !9
  %6 = call i64 @recv(i32 noundef %4, ptr noundef nonnull %2, i64 noundef 1023, i32 noundef 2)
  %7 = trunc i64 %6 to i32
  %8 = icmp slt i32 %7, 1
  br i1 %8, label %9, label %11

9:                                                ; preds = %1
  %10 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable

11:                                               ; preds = %1
  %12 = and i64 %6, 2147483647
  %13 = call noundef ptr @memchr(ptr noundef nonnull %2, i32 noundef 10, i64 noundef %12) #13
  %.not = icmp eq ptr %13, null
  %14 = ptrtoint ptr %13 to i64
  %15 = ptrtoint ptr %2 to i64
  %reass.sub = sub i64 %14, %15
  %16 = add i64 %reass.sub, 1
  %17 = select i1 %.not, i64 %12, i64 %16
  %18 = call i64 @recv(i32 noundef %4, ptr noundef nonnull %2, i64 noundef %17, i32 noundef 0)
  %19 = trunc i64 %18 to i32
  %20 = icmp slt i32 %19, 1
  br i1 %20, label %21, label %23

21:                                               ; preds = %11
  %22 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable

23:                                               ; preds = %11
  %24 = and i64 %18, 2147483647
  %25 = getelementptr inbounds [1024 x i8], ptr %2, i64 0, i64 %24
  store i8 0, ptr %25, align 1, !tbaa !12
  call void @_Z15stringtokenizerPcP13str_tokenizer(ptr noundef nonnull %2, ptr noundef nonnull %3)
  %26 = getelementptr inbounds i8, ptr %3, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %.not57 = icmp eq i32 %27, 3
  br i1 %.not57, label %32, label %28

28:                                               ; preds = %23
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.156, i32 noundef %27, ptr noundef nonnull %2)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef nonnull %3)
  %30 = call noundef i32 @_Z7sendstriPKc(i32 noundef %4, ptr noundef nonnull @.str.157)
  %31 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable

32:                                               ; preds = %23
  %33 = load ptr, ptr @secp, align 8, !tbaa !14
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = call noundef zeroext i1 @_ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb(ptr noundef nonnull align 8 dereferenceable(983240) %33, ptr noundef %35, ptr noundef nonnull align 8 dereferenceable(120) @OriginalPointsBSGS, ptr noundef nonnull align 1 dereferenceable(1) @OriginalPointsBSGScompressed)
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  br i1 %36, label %43, label %38

38:                                               ; preds = %32
  %39 = load ptr, ptr %37, align 8, !tbaa !14
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.158, ptr noundef %39)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef nonnull %3)
  %41 = call noundef i32 @_Z7sendstriPKc(i32 noundef %4, ptr noundef nonnull @.str.157)
  %42 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable

43:                                               ; preds = %32
  %44 = getelementptr inbounds i8, ptr %37, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = call noundef i32 @_Z10isValidHexPc(ptr noundef %45)
  %.not58 = icmp eq i32 %46, 0
  br i1 %.not58, label %52, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = call noundef i32 @_Z10isValidHexPc(ptr noundef %50)
  %.not59 = icmp eq i32 %51, 0
  br i1 %.not59, label %52, label %61

52:                                               ; preds = %47, %43
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds i8, ptr %53, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !14
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.159, ptr noundef %55, ptr noundef %57)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef nonnull %3)
  %59 = call noundef i32 @_Z7sendstriPKc(i32 noundef %4, ptr noundef nonnull @.str.157)
  %60 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable

61:                                               ; preds = %47
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load ptr, ptr %63, align 8, !tbaa !14
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(40) @n_range_start, ptr noundef %64)
  %65 = load ptr, ptr %5, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  call void @_ZN3Int9SetBase16EPKc(ptr noundef nonnull align 8 dereferenceable(40) @n_range_end, ptr noundef %67)
  call void @_Z13freetokenizerP13str_tokenizer(ptr noundef nonnull %3)
  call void @_ZN3Int3SetEPS_(ptr noundef nonnull align 8 dereferenceable(40) @BSGS_CURRENT, ptr noundef nonnull @n_range_start)
  %68 = load i32, ptr @NTHREADS, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noalias ptr @calloc(i64 noundef %69, i64 noundef 1) #14
  %71 = call noalias ptr @calloc(i64 noundef %69, i64 noundef 8) #14
  %72 = call noalias ptr @calloc(i64 noundef %69, i64 noundef 4) #14
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %70, ptr noundef nonnull @.str.70, ptr noundef nonnull @.str.71, ptr noundef nonnull @.str.160, i32 noundef 2408)
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %71, ptr noundef nonnull @.str.70, ptr noundef nonnull @.str.71, ptr noundef nonnull @.str.161, i32 noundef 2409)
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %72, ptr noundef nonnull @.str.70, ptr noundef nonnull @.str.71, ptr noundef nonnull @.str.162, i32 noundef 2410)
  %73 = load i32, ptr @NTHREADS, align 4, !tbaa !5
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %83
  %75 = icmp sgt i32 %84, 0
  br i1 %75, label %.lr.ph65, label %._crit_edge

.lr.ph:                                           ; preds = %61, %83
  %indvars.iv = phi i64 [ %indvars.iv.next, %83 ], [ 0, %61 ]
  %76 = getelementptr inbounds i32, ptr %72, i64 %indvars.iv
  %77 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %77, ptr %76, align 4, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %70, i64 %indvars.iv
  store i8 1, ptr %78, align 1, !tbaa !15
  %79 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv
  %80 = call i32 @pthread_create(ptr noundef %79, ptr noundef null, ptr noundef nonnull @_Z19thread_process_bsgsPv, ptr noundef nonnull %76) #11
  %.not62 = icmp eq i32 %80, 0
  br i1 %.not62, label %83, label %81

81:                                               ; preds = %.lr.ph
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.163, i32 noundef %77)
  store i8 0, ptr %78, align 1, !tbaa !15
  br label %83

83:                                               ; preds = %.lr.ph, %81
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %84 = load i32, ptr @NTHREADS, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next, %85
  br i1 %86, label %.lr.ph, label %.preheader, !llvm.loop !17

.lr.ph65:                                         ; preds = %.preheader, %97
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %97 ], [ 0, %.preheader ]
  %87 = getelementptr inbounds i8, ptr %70, i64 %indvars.iv67
  %88 = load i8, ptr %87, align 1, !tbaa !15, !range !19, !noundef !20
  %89 = trunc nuw i8 %88 to i1
  br i1 %89, label %90, label %97

90:                                               ; preds = %.lr.ph65
  %91 = getelementptr inbounds i64, ptr %71, i64 %indvars.iv67
  %92 = load i64, ptr %91, align 8, !tbaa !21
  %93 = call i32 @pthread_join(i64 noundef %92, ptr noundef null)
  %.not61 = icmp eq i32 %93, 0
  br i1 %.not61, label %97, label %94

94:                                               ; preds = %90
  %95 = trunc nuw nsw i64 %indvars.iv67 to i32
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.164, i32 noundef %95)
  br label %97

97:                                               ; preds = %.lr.ph65, %94, %90
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %98 = load i32, ptr @NTHREADS, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next68, %99
  br i1 %100, label %.lr.ph65, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %97, %61, %.preheader
  call void @free(ptr noundef %70) #11
  call void @free(ptr noundef %71) #11
  call void @free(ptr noundef %72) #11
  %101 = load i32, ptr @bsgs_found, align 4, !tbaa !5
  %.not60 = icmp eq i32 %101, 0
  br i1 %.not60, label %105, label %102

102:                                              ; preds = %._crit_edge
  %103 = call noundef ptr @_ZN3Int9GetBase16Ev(ptr noundef nonnull align 8 dereferenceable(40) @BSGSkeyfound)
  %104 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 1024, ptr noundef nonnull @.str.165, ptr noundef %103) #11
  call void @free(ptr noundef %103) #11
  br label %107

105:                                              ; preds = %._crit_edge
  %106 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 1024, ptr noundef nonnull @.str.166) #11
  br label %107

107:                                              ; preds = %105, %102
  %.0 = phi i32 [ %104, %102 ], [ %106, %105 ]
  store i32 0, ptr @bsgs_found, align 4, !tbaa !5
  %108 = sext i32 %.0 to i64
  %109 = call i64 @send(i32 noundef %4, ptr noundef nonnull %2, i64 noundef %108, i32 noundef 0)
  %110 = and i64 %109, 4294967295
  %111 = icmp eq i64 %110, 4294967295
  br i1 %111, label %112, label %114

112:                                              ; preds = %107
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.167)
  br label %114

114:                                              ; preds = %112, %107
  %115 = call i32 @close(i32 noundef %4)
  call void @pthread_exit(ptr noundef null) #12
  unreachable
}

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19thread_process_bsgsPv(ptr noundef) #8

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

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @close(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare noundef ptr @memchr(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #10

declare void @_Z15stringtokenizerPcP13str_tokenizer(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_Z13freetokenizerP13str_tokenizer(ptr noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb(ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef, ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

declare noundef i32 @_Z10isValidHexPc(ptr noundef) local_unnamed_addr #2

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

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


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