; LLVM IR from TheAlgorithms/C-Plus-Plus :: hashing/quadratic_probing_hash_table.ll (ZN17quadratic_probing14quadraticProbeEib)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl" }
%"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl" = type { %"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.quadratic_probing::Entry" = type { i32 }

@_ZN17quadratic_probing10notPresentE = external dso_local global i32, align 4
@_ZN17quadratic_probing5tableE = external dso_local global %"class.std::vector", align 8
@_ZN17quadratic_probing9totalSizeE = external dso_local global i32, align 4
@_ZN17quadratic_probing9rehashingE = external dso_local global i8, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN17quadratic_probing7hashFxnEi(i32 noundef) #0

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

; 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
define dso_local noundef i32 @_ZN17quadratic_probing14quadraticProbeEib(i32 noundef %0, i1 noundef zeroext %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.quadratic_probing::Entry", align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  %11 = zext i1 %1 to i8
  store i8 %11, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = call noundef i64 @_ZN17quadratic_probing7hashFxnEi(i32 noundef %12)
  %14 = trunc i64 %13 to i32
  store i32 %14, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %15 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  call void @_ZN17quadratic_probing5EntryC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %15)
  br label %16

16:                                               ; preds = %97, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %19, i32 noundef 2)
  %21 = call double @llvm.round.f64(double %20)
  %22 = fptoui double %21 to i64
  %23 = add i64 %18, %22
  %24 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = urem i64 %23, %25
  store i64 %26, ptr %9, align 8, !tbaa !11
  %27 = load i64, ptr %9, align 8, !tbaa !11
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN17quadratic_probing5EntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN17quadratic_probing5tableE, i64 noundef %27) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %28, i64 4, i1 false), !tbaa.struct !13
  %29 = load i8, ptr %5, align 1, !tbaa !9, !range !14, !noundef !15
  %30 = trunc i8 %29 to i1
  br i1 %30, label %31, label %51

31:                                               ; preds = %16
  %32 = getelementptr inbounds %"struct.quadratic_probing::Entry", ptr %8, i32 0, i32 0
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  %35 = icmp eq i32 %33, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %31
  %37 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  store i32 %37, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %94

38:                                               ; preds = %31
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN17quadratic_probing15searchingProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %39)
  br i1 %40, label %41, label %46

41:                                               ; preds = %38
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %44 = load i64, ptr %9, align 8, !tbaa !11
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %94

46:                                               ; preds = %38
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !5
  br label %84

51:                                               ; preds = %16
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = call noundef zeroext i1 @_ZN17quadratic_probing9putProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %52)
  br i1 %53, label %54, label %63

54:                                               ; preds = %51
  %55 = load i8, ptr @_ZN17quadratic_probing9rehashingE, align 1, !tbaa !9, !range !14, !noundef !15
  %56 = trunc i8 %55 to i1
  br i1 %56, label %60, label %57

57:                                               ; preds = %54
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %60

60:                                               ; preds = %57, %54
  %61 = load i64, ptr %9, align 8, !tbaa !11
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %94

63:                                               ; preds = %51
  %64 = load i8, ptr @_ZN17quadratic_probing9rehashingE, align 1, !tbaa !9, !range !14, !noundef !15
  %65 = trunc i8 %64 to i1
  br i1 %65, label %81, label %66

66:                                               ; preds = %63
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %71, i32 noundef 2)
  %73 = call double @llvm.round.f64(double %72)
  %74 = fptoui double %73 to i64
  %75 = add i64 %69, %74
  %76 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = urem i64 %75, %77
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %67, i64 noundef %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %81

81:                                               ; preds = %66, %63
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %81, %46
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %87 = mul nsw i32 %86, 100
  %88 = icmp eq i32 %85, %87
  br i1 %88, label %89, label %93

89:                                               ; preds = %84
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %92 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  store i32 %92, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %94

93:                                               ; preds = %84
  store i32 0, ptr %10, align 4
  br label %94

94:                                               ; preds = %93, %89, %60, %41, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %95 = load i32, ptr %10, align 4
  switch i32 %95, label %104 [
    i32 0, label %96
  ]

96:                                               ; preds = %94
  br label %97

97:                                               ; preds = %96
  %98 = getelementptr inbounds %"struct.quadratic_probing::Entry", ptr %8, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !16
  %100 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  %101 = icmp ne i32 %99, %100
  br i1 %101, label %16, label %102, !llvm.loop !18

102:                                              ; preds = %97
  %103 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  store i32 %103, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %104

104:                                              ; preds = %102, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %105 = load i32, ptr %3, align 4
  ret i32 %105
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17quadratic_probing5EntryC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN17quadratic_probing5EntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 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) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN17quadratic_probing15searchingProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN17quadratic_probing9putProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #0

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

attributes #0 = { 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 #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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint 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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 4, !5}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSN17quadratic_probing5EntryE", !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl" }
%"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl" = type { %"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<quadratic_probing::Entry, std::allocator<quadratic_probing::Entry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.quadratic_probing::Entry" = type { i32 }

@_ZN17quadratic_probing10notPresentE = external dso_local local_unnamed_addr global i32, align 4
@_ZN17quadratic_probing5tableE = external dso_local global %"class.std::vector", align 8
@_ZN17quadratic_probing9totalSizeE = external dso_local local_unnamed_addr global i32, align 4
@_ZN17quadratic_probing9rehashingE = external dso_local local_unnamed_addr global i8, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN17quadratic_probing7hashFxnEi(i32 noundef) local_unnamed_addr #0

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17quadratic_probing14quadraticProbeEib(i32 noundef %0, i1 noundef zeroext %1) local_unnamed_addr #2 {
  %3 = alloca %"struct.quadratic_probing::Entry", align 4
  %4 = tail call noundef i64 @_ZN17quadratic_probing7hashFxnEi(i32 noundef %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %5 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  call void @_ZN17quadratic_probing5EntryC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %5)
  %sext = shl i64 %4, 32
  %6 = ashr exact i64 %sext, 32
  br i1 %1, label %.split.us, label %.split

.split.us:                                        ; preds = %2, %26
  %.017.us = phi i32 [ %.118.us, %26 ], [ 0, %2 ]
  %7 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %.017.us, i32 noundef 2)
  %8 = call double @llvm.round.f64(double %7)
  %9 = fptoui double %8 to i64
  %10 = add i64 %6, %9
  %11 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = urem i64 %10, %12
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN17quadratic_probing5EntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN17quadratic_probing5tableE, i64 noundef %13) #6
  %15 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %15, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  %17 = icmp eq i32 %15, %16
  br i1 %17, label %.thread, label %18

18:                                               ; preds = %.split.us
  %19 = call noundef zeroext i1 @_ZN17quadratic_probing15searchingProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %0)
  br i1 %19, label %.split29.us, label %20

20:                                               ; preds = %18
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.118.us = add nuw nsw i32 %.017.us, 1
  %23 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %24 = mul nsw i32 %23, 100
  %25 = icmp eq i32 %.118.us, %24
  br i1 %25, label %.split32.us, label %26

26:                                               ; preds = %20
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  %.not.us = icmp eq i32 %27, %28
  br i1 %.not.us, label %.thread, label %.split.us, !llvm.loop !11

.split:                                           ; preds = %2, %70
  %.017 = phi i32 [ %.118.pre-phi, %70 ], [ 0, %2 ]
  %29 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %.017, i32 noundef 2)
  %30 = call double @llvm.round.f64(double %29)
  %31 = fptoui double %30 to i64
  %32 = add i64 %6, %31
  %33 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = urem i64 %32, %34
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN17quadratic_probing5EntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN17quadratic_probing5tableE, i64 noundef %35) #6
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %3, align 4, !tbaa !5
  %38 = call noundef zeroext i1 @_ZN17quadratic_probing9putProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %0)
  %39 = load i8, ptr @_ZN17quadratic_probing9rehashingE, align 1, !tbaa !13, !range !15, !noundef !16
  %40 = trunc nuw i8 %39 to i1
  br i1 %38, label %44, label %50

.split29.us:                                      ; preds = %18
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %43 = trunc i64 %13 to i32
  br label %.thread

44:                                               ; preds = %.split
  br i1 %40, label %48, label %45

45:                                               ; preds = %44
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %48

48:                                               ; preds = %45, %44
  %49 = trunc i64 %35 to i32
  br label %.thread

50:                                               ; preds = %.split
  br i1 %40, label %._crit_edge, label %51

._crit_edge:                                      ; preds = %50
  %.pre = add nuw nsw i32 %.017, 1
  br label %63

51:                                               ; preds = %50
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %53 = add nuw nsw i32 %.017, 1
  %54 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %53, i32 noundef 2)
  %55 = call double @llvm.round.f64(double %54)
  %56 = fptoui double %55 to i64
  %57 = add i64 %6, %56
  %58 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = urem i64 %57, %59
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %52, i64 noundef %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %63

63:                                               ; preds = %._crit_edge, %51
  %.118.pre-phi = phi i32 [ %.pre, %._crit_edge ], [ %53, %51 ]
  %64 = load i32, ptr @_ZN17quadratic_probing9totalSizeE, align 4, !tbaa !5
  %65 = mul nsw i32 %64, 100
  %66 = icmp eq i32 %.118.pre-phi, %65
  br i1 %66, label %.split32.us, label %70

.split32.us:                                      ; preds = %63, %20
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %69 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  br label %.thread

70:                                               ; preds = %63
  %71 = load i32, ptr %3, align 4, !tbaa !9
  %72 = load i32, ptr @_ZN17quadratic_probing10notPresentE, align 4, !tbaa !5
  %.not = icmp eq i32 %71, %72
  br i1 %.not, label %.thread, label %.split, !llvm.loop !11

.thread:                                          ; preds = %70, %26, %.split.us, %48, %.split32.us, %.split29.us
  %.2 = phi i32 [ %49, %48 ], [ %69, %.split32.us ], [ %43, %.split29.us ], [ %15, %.split.us ], [ %27, %26 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 %.2
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17quadratic_probing5EntryC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN17quadratic_probing5EntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN17quadratic_probing15searchingProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN17quadratic_probing9putProberERKNS_5EntryEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #0

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

attributes #0 = { 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 #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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN17quadratic_probing5EntryE", !6, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


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