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

; 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.sketch::LPCQF" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.schism::Schismatic" = type { i32, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sketch::LPCQF.0" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.sketch::LPCQF", align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"struct.sketch::LPCQF.0", align 8
  %10 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 132, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 128, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr %4) #6
  %11 = load i64, ptr %3, align 8, !tbaa !5
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %11, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %45, %0
  %13 = load i64, ptr %5, align 8, !tbaa !5
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = icmp ult i64 %13, %14
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %12
  %18 = load i64, ptr %5, align 8, !tbaa !5
  %19 = load i64, ptr %5, align 8, !tbaa !5
  %20 = add i64 %19, 1
  invoke void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %18, i64 noundef %20)
          to label %21 unwind label %39

21:                                               ; preds = %17
  %22 = load ptr, ptr @stderr, align 8, !tbaa !9
  %23 = load i64, ptr %5, align 8, !tbaa !5
  %24 = load i64, ptr %5, align 8, !tbaa !5
  %25 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %24)
          to label %26 unwind label %39

26:                                               ; preds = %21
  %27 = zext i32 %25 to i64
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str, i64 noundef %23, i64 noundef %27) #6
  %29 = load i64, ptr %5, align 8, !tbaa !5
  %30 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %4, i64 noundef %29)
          to label %31 unwind label %39

31:                                               ; preds = %26
  %32 = zext i32 %30 to i64
  %33 = load i64, ptr %5, align 8, !tbaa !5
  %34 = add i64 %33, 1
  %35 = add i64 %34, 512
  %36 = icmp ule i64 %32, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %31
  br label %44

38:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 10, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

39:                                               ; preds = %26, %21, %17
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %92

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %37
  br label %45

45:                                               ; preds = %44
  %46 = load i64, ptr %5, align 8, !tbaa !5
  %47 = add i64 %46, 1
  store i64 %47, ptr %5, align 8, !tbaa !5
  br label %12, !llvm.loop !11

48:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %49 = invoke noundef i64 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE13inner_productERKS1_(ptr noundef nonnull align 8 dereferenceable(88) %4, ptr noundef nonnull align 8 dereferenceable(88) %4)
          to label %50 unwind label %61

50:                                               ; preds = %48
  store i64 %49, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr @stderr, align 8, !tbaa !9
  %52 = load i64, ptr %8, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.3, i64 noundef %52) #6
  call void @llvm.lifetime.start.p0(i64 88, ptr %9) #6
  %54 = load i64, ptr %3, align 8, !tbaa !5
  invoke void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %9, i64 noundef %54, i64 noundef 0)
          to label %55 unwind label %65

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

56:                                               ; preds = %81, %55
  %57 = load i64, ptr %10, align 8, !tbaa !5
  %58 = load i64, ptr %2, align 8, !tbaa !5
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %69, label %60

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

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %91

65:                                               ; preds = %50
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  br label %90

69:                                               ; preds = %56
  %70 = load i64, ptr %10, align 8, !tbaa !5
  %71 = load i64, ptr %10, align 8, !tbaa !5
  %72 = add i64 %71, 1
  invoke void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %9, i64 noundef %70, i64 noundef %72)
          to label %73 unwind label %84

73:                                               ; preds = %69
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = load i64, ptr %10, align 8, !tbaa !5
  %76 = load i64, ptr %10, align 8, !tbaa !5
  %77 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %9, i64 noundef %76)
          to label %78 unwind label %84

78:                                               ; preds = %73
  %79 = zext i32 %77 to i64
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.4, i64 noundef %75, i64 noundef %79) #6
  br label %81

81:                                               ; preds = %78
  %82 = load i64, ptr %10, align 8, !tbaa !5
  %83 = add i64 %82, 1
  store i64 %83, ptr %10, align 8, !tbaa !5
  br label %56, !llvm.loop !13

84:                                               ; preds = %73, %69
  %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
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %9) #6
  br label %90

88:                                               ; preds = %60
  call void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %9) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #6
  call void @llvm.lifetime.end.p0(i64 88, 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
  %89 = load i32, ptr %1, align 4
  ret i32 %89

90:                                               ; preds = %84, %65
  call void @llvm.lifetime.end.p0(i64 88, ptr %9) #6
  br label %91

91:                                               ; preds = %90, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %92

92:                                               ; preds = %91, %39
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #6
  call void @llvm.lifetime.end.p0(i64 88, 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 %93

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) 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 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 = { 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 #4 = { noreturn 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 = { noreturn 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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.sketch::LPCQF" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }
%"struct.schism::Schismatic" = type { i32, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, sse::AlignedAllocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sketch::LPCQF.0" = type { i64, i64, i32, %"struct.schism::Schismatic", %"class.std::vector", i32, i64, i64 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 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 %"struct.sketch::LPCQF", align 8
  %2 = alloca %"struct.sketch::LPCQF.0", align 8
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %1) #6
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %1, i64 noundef 128, i64 noundef 0)
  br label %3

3:                                                ; preds = %15, %0
  %.021 = phi i64 [ 0, %0 ], [ %7, %15 ]
  %exitcond.not = icmp eq i64 %.021, 132
  br i1 %exitcond.not, label %4, label %6

4:                                                ; preds = %3
  %5 = invoke noundef i64 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE13inner_productERKS1_(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 8 dereferenceable(88) %1)
          to label %21 unwind label %25

6:                                                ; preds = %3
  %7 = add nuw nsw i64 %.021, 1
  invoke void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %1, i64 noundef %.021, i64 noundef %7)
          to label %8 unwind label %19

8:                                                ; preds = %6
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %1, i64 noundef %.021)
          to label %11 unwind label %19

11:                                               ; preds = %8
  %12 = zext i32 %10 to i64
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, i64 noundef %.021, i64 noundef %12) #7
  %14 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %1, i64 noundef %.021)
          to label %15 unwind label %19

15:                                               ; preds = %11
  %16 = zext i32 %14 to i64
  %17 = add nuw nsw i64 %.021, 513
  %.not = icmp ult i64 %17, %16
  br i1 %.not, label %18, label %3, !llvm.loop !9

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 10, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

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

21:                                               ; preds = %4
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.3, i64 noundef %5) #7
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %2) #6
  invoke void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef 128, i64 noundef 0)
          to label %.preheader unwind label %27

24:                                               ; preds = %33
  call void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #6
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %1) #6
  ret i32 0

25:                                               ; preds = %4
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %39

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %38

.preheader:                                       ; preds = %21, %33
  %.030 = phi i64 [ %29, %33 ], [ 0, %21 ]
  %29 = add nuw nsw i64 %.030, 1
  invoke void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE6updateImvEEvmT_(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef %.030, i64 noundef %29)
          to label %30 unwind label %36

30:                                               ; preds = %.preheader
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = invoke noundef i32 @_ZNK6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef %.030)
          to label %33 unwind label %36

33:                                               ; preds = %30
  %34 = zext i32 %32 to i64
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.4, i64 noundef %.030, i64 noundef %34) #7
  %exitcond31.not = icmp eq i64 %29, 132
  br i1 %exitcond31.not, label %24, label %.preheader, !llvm.loop !11

36:                                               ; preds = %30, %.preheader
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #6
  br label %38

38:                                               ; preds = %36, %27
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #6
  br label %39

39:                                               ; preds = %25, %38, %19
  %.pn28 = phi { ptr, i32 } [ %20, %19 ], [ %.pn, %38 ], [ %26, %25 ]
  call void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn28
}

; 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 uwtable
declare dso_local void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EEC2Emm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef, i64 noundef) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sketch5LPCQFIjLm0ELi8ELm2ELm1EjLx64EE14count_estimateEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sketch5LPCQFIjLm5ELi9ELm2ELm1EjLx64EED2Ev(ptr noundef nonnull align 8 dereferenceable(88)) 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 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 = { 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 #4 = { noreturn 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 }
attributes #8 = { noreturn 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 = !{!"any pointer", !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}


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