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

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

%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }
%struct.address_value = type { [20 x i8] }

@bloom = external dso_local global %struct.bloom, align 16
@N = external dso_local global i64, align 8
@MAXLENGTHADDRESS = external dso_local global i32, align 4
@addressTable = external dso_local global ptr, align 8
@stderr = external global ptr, align 8
@.str.81 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.290 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [30 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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

declare noundef i32 @_Z10isValidHexPc(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z19isValidBase58StringPc(ptr noundef) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #2

declare noundef ptr @_Z4trimPcPKc(ptr noundef, ptr noundef) #2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

declare i32 @bloom_add(ptr noundef, ptr noundef, i32 noundef) #2

declare zeroext i1 @b58tobin(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15initBloomFilterP5bloomm(ptr noundef, i64 noundef) #8

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z20forceReadFileAddressPc(ptr noundef %0) #8 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca [50 x i8], align 16
  %11 = alloca [100 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 50, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 100, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call noalias ptr @fopen(ptr noundef %14, ptr noundef @.str.290)
  store ptr %15, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %22

18:                                               ; preds = %1
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.301, ptr noundef %20, i32 noundef 6309) #9
  store i1 false, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %148

22:                                               ; preds = %1
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %46, %22
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call i32 @feof(ptr noundef %24) #9
  %26 = icmp ne i32 %25, 0
  %27 = xor i1 %26, true
  br i1 %27, label %28, label %47

28:                                               ; preds = %23
  %29 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call ptr @fgets(ptr noundef %29, i32 noundef 100, ptr noundef %30)
  store ptr %31, ptr %12, align 8, !tbaa !5
  %32 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %33 = call noundef ptr @_Z4trimPcPKc(ptr noundef %32, ptr noundef @.str.152)
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %36 = icmp eq ptr %34, %35
  br i1 %36, label %37, label %46

37:                                               ; preds = %28
  %38 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %39 = call i64 @strlen(ptr noundef %38) #10
  store i64 %39, ptr %8, align 8, !tbaa !9
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = icmp ugt i64 %40, 20
  br i1 %41, label %42, label %45

42:                                               ; preds = %37
  %43 = load i64, ptr %6, align 8, !tbaa !9
  %44 = add i64 %43, 1
  store i64 %44, ptr %6, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %42, %37
  br label %46

46:                                               ; preds = %45, %28
  br label %23, !llvm.loop !11

47:                                               ; preds = %23
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call i32 @fseek(ptr noundef %48, i64 noundef 0, i32 noundef 0)
  store i32 20, ptr @MAXLENGTHADDRESS, align 4, !tbaa !13
  %50 = load i64, ptr %6, align 8, !tbaa !9
  %51 = load i64, ptr %6, align 8, !tbaa !9
  %52 = uitofp i64 %51 to double
  %53 = fmul double 2.000000e+01, %52
  %54 = fdiv double %53, 0x4130000000000000
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.300, i64 noundef %50, double noundef %54)
  %56 = load i64, ptr %6, align 8, !tbaa !9
  %57 = mul i64 20, %56
  %58 = call noalias ptr @malloc(i64 noundef %57) #11
  store ptr %58, ptr @addressTable, align 8, !tbaa !5
  %59 = load ptr, ptr @addressTable, align 8, !tbaa !5
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %59, ptr noundef @.str.81, ptr noundef @.str.82, ptr noundef @.str.302, i32 noundef 6331)
  %60 = load i64, ptr %6, align 8, !tbaa !9
  %61 = call noundef zeroext i1 @_Z15initBloomFilterP5bloomm(ptr noundef @bloom, i64 noundef %60)
  br i1 %61, label %63, label %62

62:                                               ; preds = %47
  store i1 false, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %148

63:                                               ; preds = %47
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %145, %63
  %65 = load i64, ptr %7, align 8, !tbaa !9
  %66 = load i64, ptr %6, align 8, !tbaa !9
  %67 = icmp ult i64 %65, %66
  br i1 %67, label %68, label %146

68:                                               ; preds = %64
  store i8 0, ptr %5, align 1, !tbaa !15
  %69 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %69, i8 0, i64 100, i1 false)
  %70 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %71 = load i64, ptr %7, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.address_value, ptr %70, i64 %71
  %73 = getelementptr inbounds %struct.address_value, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds [20 x i8], ptr %73, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %74, i8 0, i64 20, i1 false)
  %75 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call ptr @fgets(ptr noundef %75, i32 noundef 100, ptr noundef %76)
  store ptr %77, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %79 = call noundef ptr @_Z4trimPcPKc(ptr noundef %78, ptr noundef @.str.152)
  %80 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %81 = call i64 @strlen(ptr noundef %80) #10
  store i64 %81, ptr %8, align 8, !tbaa !9
  %82 = load i64, ptr %8, align 8, !tbaa !9
  %83 = icmp ugt i64 %82, 0
  br i1 %83, label %84, label %136

84:                                               ; preds = %68
  %85 = load i64, ptr %8, align 8, !tbaa !9
  %86 = icmp ule i64 %85, 40
  br i1 %86, label %87, label %136

87:                                               ; preds = %84
  %88 = load i64, ptr %8, align 8, !tbaa !9
  %89 = icmp ult i64 %88, 40
  br i1 %89, label %90, label %114

90:                                               ; preds = %87
  %91 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %92 = call noundef zeroext i1 @_Z19isValidBase58StringPc(ptr noundef %91)
  br i1 %92, label %93, label %114

93:                                               ; preds = %90
  store i64 25, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  %95 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %96 = load i64, ptr %8, align 8, !tbaa !9
  %97 = call zeroext i1 @b58tobin(ptr noundef %94, ptr noundef %9, ptr noundef %95, i64 noundef %96)
  %98 = load i64, ptr %9, align 8, !tbaa !9
  %99 = icmp eq i64 %98, 25
  br i1 %99, label %100, label %113

100:                                              ; preds = %93
  %101 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  %102 = getelementptr inbounds i8, ptr %101, i64 1
  %103 = call i32 @bloom_add(ptr noundef @bloom, ptr noundef %102, i32 noundef 20)
  %104 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %105 = load i64, ptr %7, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.address_value, ptr %104, i64 %105
  %107 = getelementptr inbounds %struct.address_value, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds [20 x i8], ptr %107, i64 0, i64 0
  %109 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  %110 = getelementptr inbounds i8, ptr %109, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %108, ptr align 1 %110, i64 20, i1 false)
  %111 = load i64, ptr %7, align 8, !tbaa !9
  %112 = add i64 %111, 1
  store i64 %112, ptr %7, align 8, !tbaa !9
  store i8 1, ptr %5, align 1, !tbaa !15
  br label %113

113:                                              ; preds = %100, %93
  br label %114

114:                                              ; preds = %113, %90, %87
  %115 = load i64, ptr %8, align 8, !tbaa !9
  %116 = icmp eq i64 %115, 40
  br i1 %116, label %117, label %135

117:                                              ; preds = %114
  %118 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %119 = call noundef i32 @_Z10isValidHexPc(ptr noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %135

121:                                              ; preds = %117
  %122 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %123 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  %124 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef %122, ptr noundef %123)
  %125 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  %126 = call i32 @bloom_add(ptr noundef @bloom, ptr noundef %125, i32 noundef 20)
  %127 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %128 = load i64, ptr %7, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.address_value, ptr %127, i64 %128
  %130 = getelementptr inbounds %struct.address_value, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds [20 x i8], ptr %130, i64 0, i64 0
  %132 = getelementptr inbounds [50 x i8], ptr %10, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %131, ptr align 16 %132, i64 20, i1 false)
  %133 = load i64, ptr %7, align 8, !tbaa !9
  %134 = add i64 %133, 1
  store i64 %134, ptr %7, align 8, !tbaa !9
  store i8 1, ptr %5, align 1, !tbaa !15
  br label %135

135:                                              ; preds = %121, %117, %114
  br label %136

136:                                              ; preds = %135, %84, %68
  %137 = load i8, ptr %5, align 1, !tbaa !15, !range !17, !noundef !18
  %138 = trunc i8 %137 to i1
  br i1 %138, label %145, label %139

139:                                              ; preds = %136
  %140 = load ptr, ptr @stderr, align 8, !tbaa !5
  %141 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 0
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.303, ptr noundef %141) #9
  %143 = load i64, ptr %6, align 8, !tbaa !9
  %144 = add i64 %143, -1
  store i64 %144, ptr %6, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %139, %136
  br label %64, !llvm.loop !19

146:                                              ; preds = %64
  %147 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %147, ptr @N, align 8, !tbaa !9
  store i1 true, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %148

148:                                              ; preds = %146, %62, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 50, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  %149 = load i1, ptr %2, align 1
  ret i1 %149
}

declare noundef i32 @_Z8hexs2binPcPh(ptr noundef, ptr noundef) #2

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

!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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}


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

%struct.bloom = type { i64, i64, i64, i8, x86_fp80, i8, i8, i8, double, ptr }
%struct.address_value = type { [20 x i8] }

@bloom = external dso_local global %struct.bloom, align 16
@N = external dso_local local_unnamed_addr global i64, align 8
@MAXLENGTHADDRESS = external dso_local local_unnamed_addr global i32, align 4
@addressTable = external dso_local local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.81 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.290 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [30 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 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z19isValidBase58StringPc(ptr noundef) local_unnamed_addr #2

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

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

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

declare noundef ptr @_Z4trimPcPKc(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

declare i32 @bloom_add(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare zeroext i1 @b58tobin(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15initBloomFilterP5bloomm(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z20forceReadFileAddressPc(ptr noundef %0) local_unnamed_addr #8 {
  %2 = alloca i64, align 8
  %3 = alloca [50 x i8], align 16
  %4 = alloca [100 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 50, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %4) #9
  %5 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.290)
  %6 = icmp eq ptr %5, null
  br i1 %6, label %8, label %.preheader55

.preheader55:                                     ; preds = %1
  %7 = tail call i32 @feof(ptr noundef nonnull %5) #9
  %.not56 = icmp eq i32 %7, 0
  br i1 %.not56, label %.lr.ph, label %._crit_edge

8:                                                ; preds = %1
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.301, ptr noundef %0, i32 noundef 6309) #10
  br label %61

.lr.ph:                                           ; preds = %.preheader55, %18
  %.03057 = phi i64 [ %.131, %18 ], [ 0, %.preheader55 ]
  %11 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 100, ptr noundef nonnull %5)
  %12 = call noundef ptr @_Z4trimPcPKc(ptr noundef nonnull %4, ptr noundef nonnull @.str.152)
  %13 = icmp eq ptr %11, %4
  br i1 %13, label %14, label %18

14:                                               ; preds = %.lr.ph
  %15 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #11
  %16 = icmp ugt i64 %15, 20
  %17 = zext i1 %16 to i64
  %spec.select = add i64 %.03057, %17
  br label %18

18:                                               ; preds = %14, %.lr.ph
  %.131 = phi i64 [ %.03057, %.lr.ph ], [ %spec.select, %14 ]
  %19 = call i32 @feof(ptr noundef nonnull %5) #9
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %18, %.preheader55
  %.030.lcssa = phi i64 [ 0, %.preheader55 ], [ %.131, %18 ]
  %20 = call i32 @fseek(ptr noundef nonnull %5, i64 noundef 0, i32 noundef 0)
  store i32 20, ptr @MAXLENGTHADDRESS, align 4, !tbaa !11
  %21 = uitofp i64 %.030.lcssa to double
  %22 = fmul double %21, 2.000000e+01
  %23 = fmul double %22, 0x3EB0000000000000
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.300, i64 noundef %.030.lcssa, double noundef %23)
  %25 = mul i64 %.030.lcssa, 20
  %26 = call noalias ptr @malloc(i64 noundef %25) #12
  store ptr %26, ptr @addressTable, align 8, !tbaa !5
  call void @_Z12checkpointerPvPKcS1_S1_i(ptr noundef %26, ptr noundef nonnull @.str.81, ptr noundef nonnull @.str.82, ptr noundef nonnull @.str.302, i32 noundef 6331)
  %27 = call noundef zeroext i1 @_Z15initBloomFilterP5bloomm(ptr noundef nonnull @bloom, i64 noundef %.030.lcssa)
  br i1 %27, label %.preheader, label %61

.preheader:                                       ; preds = %._crit_edge
  %.not63 = icmp eq i64 %.030.lcssa, 0
  br i1 %.not63, label %._crit_edge61, label %.lr.ph60

.lr.ph60:                                         ; preds = %.preheader
  %28 = getelementptr inbounds i8, ptr %3, i64 1
  br label %29

29:                                               ; preds = %.lr.ph60, %59
  %.059 = phi i64 [ 0, %.lr.ph60 ], [ %.247, %59 ]
  %.23258 = phi i64 [ %.030.lcssa, %.lr.ph60 ], [ %.3, %59 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %4, i8 0, i64 100, i1 false)
  %30 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.address_value, ptr %30, i64 %.059
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %31, i8 0, i64 20, i1 false)
  %32 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 100, ptr noundef nonnull %5)
  %33 = call noundef ptr @_Z4trimPcPKc(ptr noundef nonnull %4, ptr noundef nonnull @.str.152)
  %34 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #11
  %35 = add i64 %34, -1
  %or.cond = icmp ult i64 %35, 40
  br i1 %or.cond, label %36, label %.thread43

36:                                               ; preds = %29
  %37 = icmp ult i64 %34, 40
  br i1 %37, label %38, label %44

38:                                               ; preds = %36
  %39 = call noundef zeroext i1 @_Z19isValidBase58StringPc(ptr noundef nonnull %4)
  br i1 %39, label %40, label %.thread43

40:                                               ; preds = %38
  store i64 25, ptr %2, align 8, !tbaa !13
  %41 = call zeroext i1 @b58tobin(ptr noundef nonnull %3, ptr noundef nonnull %2, ptr noundef nonnull %4, i64 noundef %34)
  %42 = load i64, ptr %2, align 8, !tbaa !13
  %43 = icmp eq i64 %42, 25
  br i1 %43, label %51, label %.thread43

44:                                               ; preds = %36
  %45 = call noundef i32 @_Z10isValidHexPc(ptr noundef nonnull %4)
  %.not39 = icmp eq i32 %45, 0
  br i1 %.not39, label %.thread43, label %.thread48

.thread48:                                        ; preds = %44
  %46 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %47 = call i32 @bloom_add(ptr noundef nonnull @bloom, ptr noundef nonnull %3, i32 noundef 20)
  %48 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.address_value, ptr %48, i64 %.059
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %49, ptr noundef nonnull align 16 dereferenceable(20) %3, i64 20, i1 false)
  %50 = add nuw i64 %.059, 1
  br label %59

51:                                               ; preds = %40
  %52 = call i32 @bloom_add(ptr noundef nonnull @bloom, ptr noundef nonnull %28, i32 noundef 20)
  %53 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.address_value, ptr %53, i64 %.059
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %54, ptr noundef nonnull align 1 dereferenceable(20) %28, i64 20, i1 false)
  %55 = add nuw i64 %.059, 1
  br label %59

.thread43:                                        ; preds = %40, %38, %29, %44
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.303, ptr noundef nonnull %4) #10
  %58 = add i64 %.23258, -1
  br label %59

59:                                               ; preds = %51, %.thread48, %.thread43
  %.247 = phi i64 [ %55, %51 ], [ %.059, %.thread43 ], [ %50, %.thread48 ]
  %.3 = phi i64 [ %.23258, %51 ], [ %58, %.thread43 ], [ %.23258, %.thread48 ]
  %60 = icmp ult i64 %.247, %.3
  br i1 %60, label %29, label %._crit_edge61, !llvm.loop !15

._crit_edge61:                                    ; preds = %59, %.preheader
  %.232.lcssa = phi i64 [ 0, %.preheader ], [ %.3, %59 ]
  store i64 %.232.lcssa, ptr @N, align 8, !tbaa !13
  br label %61

61:                                               ; preds = %._crit_edge, %._crit_edge61, %8
  %.035 = phi i1 [ false, %8 ], [ true, %._crit_edge61 ], [ false, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 50, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret i1 %.035
}

declare noundef i32 @_Z8hexs2binPcPh(ptr noundef, ptr noundef) local_unnamed_addr #5

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 = { 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 #3 = { 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 #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) 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 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { nounwind allocsize(0) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !10}


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