; LLVM IR from dnbaker/sketch :: testsrc (pctest)

; 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.sketch::pc::ProbabilisticCounter" = type { i64 }
%"class.sketch::pc::PCSA" = type { %"class.std::unique_ptr", i64 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.wy::WyRand" = type <{ i64, [1 x i64], i32, [4 x i8] }>

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.sketch::pc::ProbabilisticCounter", align 8
  %3 = alloca %"class.sketch::pc::ProbabilisticCounter", align 8
  %4 = alloca %"class.sketch::pc::PCSA", align 8
  %5 = alloca %"class.wy::WyRand", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.sketch::pc::PCSA", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #6
  call void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef 1000)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  invoke void @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEC2Em(ptr noundef nonnull align 8 dereferenceable(20) %5, i64 noundef 0)
          to label %13 unwind label %18

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %29, %13
  %15 = load i64, ptr %8, align 8, !tbaa !5
  %16 = icmp ult i64 %15, 100000
  br i1 %16, label %22, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %36

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %6, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %7, align 4
  br label %90

22:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %23 = invoke noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20) %5)
          to label %24 unwind label %32

24:                                               ; preds = %22
  store i64 %23, ptr %9, align 8, !tbaa !5
  %25 = load i64, ptr %9, align 8, !tbaa !5
  invoke void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %25)
          to label %26 unwind label %32

26:                                               ; preds = %24
  %27 = load i64, ptr %9, align 8, !tbaa !5
  invoke void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %27)
          to label %28 unwind label %32

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %29

29:                                               ; preds = %28
  %30 = load i64, ptr %8, align 8, !tbaa !5
  %31 = add i64 %30, 1
  store i64 %31, ptr %8, align 8, !tbaa !5
  br label %14, !llvm.loop !9

32:                                               ; preds = %26, %24, %22
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %90

36:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  invoke void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef 1000)
          to label %37 unwind label %42

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %53, %37
  %39 = load i64, ptr %11, align 8, !tbaa !5
  %40 = icmp ult i64 %39, 100000
  br i1 %40, label %46, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %60

42:                                               ; preds = %36
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  br label %89

46:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %47 = invoke noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20) %5)
          to label %48 unwind label %56

48:                                               ; preds = %46
  store i64 %47, ptr %12, align 8, !tbaa !5
  %49 = load i64, ptr %12, align 8, !tbaa !5
  invoke void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %49)
          to label %50 unwind label %56

50:                                               ; preds = %48
  %51 = load i64, ptr %12, align 8, !tbaa !5
  invoke void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %51)
          to label %52 unwind label %56

52:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %11, align 8, !tbaa !5
  %55 = add i64 %54, 1
  store i64 %55, ptr %11, align 8, !tbaa !5
  br label %38, !llvm.loop !11

56:                                               ; preds = %50, %48, %46
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %88

60:                                               ; preds = %41
  %61 = load ptr, ptr @stderr, align 8, !tbaa !12
  %62 = invoke noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %63 unwind label %84

63:                                               ; preds = %60
  %64 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %65 unwind label %84

65:                                               ; preds = %63
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str, double noundef %62, double noundef %64) #6
  %67 = load ptr, ptr @stderr, align 8, !tbaa !12
  %68 = invoke noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %69 unwind label %84

69:                                               ; preds = %65
  %70 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %71 unwind label %84

71:                                               ; preds = %69
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str, double noundef %68, double noundef %70) #6
  %73 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6sketch2pc4PCSAImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %74 unwind label %84

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6sketch2pc20ProbabilisticCounterImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %76 unwind label %84

76:                                               ; preds = %74
  %77 = load ptr, ptr @stderr, align 8, !tbaa !12
  %78 = invoke noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %79 unwind label %84

79:                                               ; preds = %76
  %80 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %81 unwind label %84

81:                                               ; preds = %79
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.1, double noundef %78, double noundef %80) #6
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %83 = load i32, ptr %1, align 4
  ret i32 %83

84:                                               ; preds = %79, %76, %74, %71, %69, %65, %63, %60
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %6, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %7, align 4
  br label %88

88:                                               ; preds = %84, %56
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %89

89:                                               ; preds = %88, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %90

90:                                               ; preds = %89, %32, %18
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %6, align 8
  %93 = load i32, ptr %7, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEC2Em(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6sketch2pc4PCSAImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6sketch2pc20ProbabilisticCounterImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 "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 = { inlinehint 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 }

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

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


; 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.sketch::pc::ProbabilisticCounter" = type { i64 }
%"class.sketch::pc::PCSA" = type { %"class.std::unique_ptr", i64 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.wy::WyRand" = type <{ i64, [1 x i64], i32, [4 x i8] }>

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.sketch::pc::ProbabilisticCounter", align 8
  %2 = alloca %"class.sketch::pc::ProbabilisticCounter", align 8
  %3 = alloca %"class.sketch::pc::PCSA", align 8
  %4 = alloca %"class.wy::WyRand", align 8
  %5 = alloca %"class.sketch::pc::PCSA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef 1000)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEC2Em(ptr noundef nonnull align 8 dereferenceable(20) %4, i64 noundef 0)
  br label %7

6:                                                ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  invoke void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 1000)
          to label %.preheader unwind label %19

7:                                                ; preds = %0, %11
  %.01419 = phi i64 [ 0, %0 ], [ %12, %11 ]
  %8 = invoke noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20) %4)
          to label %9 unwind label %13

9:                                                ; preds = %7
  invoke void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %8)
          to label %10 unwind label %13

10:                                               ; preds = %9
  invoke void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %8)
          to label %11 unwind label %13

11:                                               ; preds = %10
  %12 = add nuw nsw i64 %.01419, 1
  %exitcond.not = icmp eq i64 %12, 100000
  br i1 %exitcond.not, label %6, label %7, !llvm.loop !5

13:                                               ; preds = %10, %9, %7
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %46

15:                                               ; preds = %24
  %16 = load ptr, ptr @stderr, align 8, !tbaa !7
  %17 = call noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %18 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %28 unwind label %42

19:                                               ; preds = %6
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %45

.preheader:                                       ; preds = %6, %24
  %.01020 = phi i64 [ %25, %24 ], [ 0, %6 ]
  %21 = invoke noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20) %4)
          to label %22 unwind label %26

22:                                               ; preds = %.preheader
  invoke void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %21)
          to label %23 unwind label %26

23:                                               ; preds = %22
  invoke void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %21)
          to label %24 unwind label %26

24:                                               ; preds = %23
  %25 = add nuw nsw i64 %.01020, 1
  %exitcond21.not = icmp eq i64 %25, 100000
  br i1 %exitcond21.not, label %15, label %.preheader, !llvm.loop !11

26:                                               ; preds = %23, %22, %.preheader
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %44

28:                                               ; preds = %15
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str, double noundef %17, double noundef %18) #7
  %30 = load ptr, ptr @stderr, align 8, !tbaa !7
  %31 = call noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %32 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %33 unwind label %42

33:                                               ; preds = %28
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str, double noundef %31, double noundef %32) #7
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6sketch2pc4PCSAImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6sketch2pc20ProbabilisticCounterImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %37 = load ptr, ptr @stderr, align 8, !tbaa !7
  %38 = call noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %39 = invoke noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %40 unwind label %42

40:                                               ; preds = %33
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.1, double noundef %38, double noundef %39) #7
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

42:                                               ; preds = %33, %28, %15
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %44

44:                                               ; preds = %42, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %43, %42 ]
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  br label %45

45:                                               ; preds = %44, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %46

46:                                               ; preds = %45, %13
  %.pn17 = phi { ptr, i32 } [ %14, %13 ], [ %.pn.pn, %45 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn17
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch2pc20ProbabilisticCounterImvEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvEC2Em(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEC2Em(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN2wy6WyRandImLm0ENS_10WyHashFuncEEclEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc20ProbabilisticCounterImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvE4addhEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6sketch2pc20ProbabilisticCounterImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6sketch2pc4PCSAImvE6reportEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6sketch2pc4PCSAImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6sketch2pc20ProbabilisticCounterImvEoRERKS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch2pc4PCSAImvED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #5 = { inlinehint 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 }
attributes #7 = { cold nounwind }

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

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


; Effective O3 passes: GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass