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

; 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

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

declare i32 @fclose(ptr noundef) #2

; 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

; 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 @_Z23forceReadFileAddressEthPc(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 [50 x i8], align 16
  %10 = alloca [100 x i8], align 16
  %11 = alloca ptr, align 8
  %12 = 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 50, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 100, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call noalias ptr @fopen(ptr noundef %13, ptr noundef @.str.290)
  store ptr %14, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %21

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

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

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

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

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

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

44:                                               ; preds = %41, %36
  br label %45

45:                                               ; preds = %44, %27
  br label %22, !llvm.loop !11

46:                                               ; preds = %22
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = call i32 @fseek(ptr noundef %47, i64 noundef 0, i32 noundef 0)
  store i32 20, ptr @MAXLENGTHADDRESS, align 4, !tbaa !13
  %49 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %49, ptr @N, align 8, !tbaa !9
  %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 6405)
  %60 = load i64, ptr @N, 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 = %46
  store i1 false, ptr %2, align 1
  store i32 1, ptr %12, align 4
  br label %143

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

64:                                               ; preds = %139, %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 %140

68:                                               ; preds = %64
  store i8 0, ptr %5, align 1, !tbaa !15
  %69 = getelementptr inbounds [100 x i8], ptr %10, 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 %10, 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 %11, align 8, !tbaa !5
  %78 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %79 = call noundef ptr @_Z4trimPcPKc(ptr noundef %78, ptr noundef @.str.152)
  %80 = getelementptr inbounds [100 x i8], ptr %10, 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 uge i64 %82, 40
  br i1 %83, label %84, label %130

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

87:                                               ; preds = %84
  %88 = load i64, ptr %8, align 8, !tbaa !9
  switch i64 %88, label %129 [
    i64 40, label %89
    i64 42, label %108
  ]

89:                                               ; preds = %87
  %90 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %91 = call noundef i32 @_Z10isValidHexPc(ptr noundef %90)
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %107

93:                                               ; preds = %89
  %94 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %95 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  %96 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef %94, ptr noundef %95)
  %97 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  %98 = call i32 @bloom_add(ptr noundef @bloom, ptr noundef %97, i32 noundef 20)
  %99 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %100 = load i64, ptr %7, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.address_value, ptr %99, i64 %100
  %102 = getelementptr inbounds %struct.address_value, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds [20 x i8], ptr %102, i64 0, i64 0
  %104 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %103, ptr align 16 %104, i64 20, i1 false)
  %105 = load i64, ptr %7, align 8, !tbaa !9
  %106 = add i64 %105, 1
  store i64 %106, ptr %7, align 8, !tbaa !9
  store i8 1, ptr %5, align 1, !tbaa !15
  br label %107

107:                                              ; preds = %93, %89
  br label %129

108:                                              ; preds = %87
  %109 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %110 = getelementptr inbounds i8, ptr %109, i64 2
  %111 = call noundef i32 @_Z10isValidHexPc(ptr noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %128

113:                                              ; preds = %108
  %114 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %115 = getelementptr inbounds i8, ptr %114, i64 2
  %116 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  %117 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef %115, ptr noundef %116)
  %118 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  %119 = call i32 @bloom_add(ptr noundef @bloom, ptr noundef %118, i32 noundef 20)
  %120 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %121 = load i64, ptr %7, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.address_value, ptr %120, i64 %121
  %123 = getelementptr inbounds %struct.address_value, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds [20 x i8], ptr %123, i64 0, i64 0
  %125 = getelementptr inbounds [50 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %124, ptr align 16 %125, i64 20, i1 false)
  %126 = load i64, ptr %7, align 8, !tbaa !9
  %127 = add i64 %126, 1
  store i64 %127, ptr %7, align 8, !tbaa !9
  store i8 1, ptr %5, align 1, !tbaa !15
  br label %128

128:                                              ; preds = %113, %108
  br label %129

129:                                              ; preds = %128, %107, %87
  br label %130

130:                                              ; preds = %129, %84, %68
  %131 = load i8, ptr %5, align 1, !tbaa !15, !range !17, !noundef !18
  %132 = trunc i8 %131 to i1
  br i1 %132, label %139, label %133

133:                                              ; preds = %130
  %134 = load ptr, ptr @stderr, align 8, !tbaa !5
  %135 = getelementptr inbounds [100 x i8], ptr %10, i64 0, i64 0
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.303, ptr noundef %135) #9
  %137 = load i64, ptr %6, align 8, !tbaa !9
  %138 = add i64 %137, -1
  store i64 %138, ptr %6, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %133, %130
  br label %64, !llvm.loop !19

140:                                              ; preds = %64
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = call i32 @fclose(ptr noundef %141)
  store i1 true, ptr %2, align 1
  store i32 1, ptr %12, align 4
  br label %143

143:                                              ; preds = %140, %62, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 50, 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
  %144 = load i1, ptr %2, align 1
  ret i1 %144
}

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: 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: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; 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

; 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 @_Z23forceReadFileAddressEthPc(ptr noundef %0) local_unnamed_addr #8 {
  %2 = alloca [50 x i8], align 16
  %3 = alloca [100 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 50, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %3) #9
  %4 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.290)
  %5 = icmp eq ptr %4, null
  br i1 %5, label %7, label %.preheader41

.preheader41:                                     ; preds = %1
  %6 = tail call i32 @feof(ptr noundef nonnull %4) #9
  %.not42 = icmp eq i32 %6, 0
  br i1 %.not42, label %.lr.ph, label %._crit_edge

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

.lr.ph:                                           ; preds = %.preheader41, %17
  %.02843 = phi i64 [ %.129, %17 ], [ 0, %.preheader41 ]
  %10 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 100, ptr noundef nonnull %4)
  %11 = call noundef ptr @_Z4trimPcPKc(ptr noundef nonnull %3, ptr noundef nonnull @.str.152)
  %12 = icmp eq ptr %10, %3
  br i1 %12, label %13, label %17

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

17:                                               ; preds = %13, %.lr.ph
  %.129 = phi i64 [ %.02843, %.lr.ph ], [ %spec.select, %13 ]
  %18 = call i32 @feof(ptr noundef nonnull %4) #9
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

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

.preheader:                                       ; preds = %._crit_edge
  %.not48 = icmp eq i64 %.028.lcssa, 0
  br i1 %.not48, label %._crit_edge47, label %.lr.ph46

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

29:                                               ; preds = %.lr.ph46, %57
  %.045 = phi i64 [ 0, %.lr.ph46 ], [ %.140, %57 ]
  %.244 = phi i64 [ %.028.lcssa, %.lr.ph46 ], [ %.3, %57 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %3, i8 0, i64 100, i1 false)
  %30 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.address_value, ptr %30, i64 %.045
  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 %3, i32 noundef 100, ptr noundef nonnull %4)
  %33 = call noundef ptr @_Z4trimPcPKc(ptr noundef nonnull %3, ptr noundef nonnull @.str.152)
  %34 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #11
  %35 = add i64 %34, -40
  %or.cond = icmp ult i64 %35, 3
  br i1 %or.cond, label %36, label %53

36:                                               ; preds = %29
  switch i64 %34, label %53 [
    i64 40, label %37
    i64 42, label %45
  ]

37:                                               ; preds = %36
  %38 = call noundef i32 @_Z10isValidHexPc(ptr noundef nonnull %3)
  %.not36 = icmp eq i32 %38, 0
  br i1 %.not36, label %53, label %39

39:                                               ; preds = %37
  %40 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef nonnull %3, ptr noundef nonnull %2)
  %41 = call i32 @bloom_add(ptr noundef nonnull @bloom, ptr noundef nonnull %2, i32 noundef 20)
  %42 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.address_value, ptr %42, i64 %.045
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %43, ptr noundef nonnull align 16 dereferenceable(20) %2, i64 20, i1 false)
  %44 = add nuw i64 %.045, 1
  br label %57

45:                                               ; preds = %36
  %46 = call noundef i32 @_Z10isValidHexPc(ptr noundef nonnull %28)
  %.not35 = icmp eq i32 %46, 0
  br i1 %.not35, label %53, label %47

47:                                               ; preds = %45
  %48 = call noundef i32 @_Z8hexs2binPcPh(ptr noundef nonnull %28, ptr noundef nonnull %2)
  %49 = call i32 @bloom_add(ptr noundef nonnull @bloom, ptr noundef nonnull %2, i32 noundef 20)
  %50 = load ptr, ptr @addressTable, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.address_value, ptr %50, i64 %.045
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(20) %51, ptr noundef nonnull align 16 dereferenceable(20) %2, i64 20, i1 false)
  %52 = add nuw i64 %.045, 1
  br label %57

53:                                               ; preds = %36, %45, %37, %29
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.303, ptr noundef nonnull %3) #10
  %56 = add i64 %.244, -1
  br label %57

57:                                               ; preds = %47, %39, %53
  %.140 = phi i64 [ %.045, %53 ], [ %52, %47 ], [ %44, %39 ]
  %.3 = phi i64 [ %56, %53 ], [ %.244, %47 ], [ %.244, %39 ]
  %58 = icmp ult i64 %.140, %.3
  br i1 %58, label %29, label %._crit_edge47, !llvm.loop !15

._crit_edge47:                                    ; preds = %57, %.preheader
  %59 = call i32 @fclose(ptr noundef nonnull %4)
  br label %60

60:                                               ; preds = %._crit_edge, %._crit_edge47, %7
  %.031 = phi i1 [ false, %7 ], [ true, %._crit_edge47 ], [ false, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 50, ptr nonnull %2) #9
  ret i1 %.031
}

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